Loading ...
Sorry, an error occurred while loading the content.

Re: ContextMenu and adding MenuItem cause exception?

Expand Messages
  • vividsilvernl
    Todd, I ve got the same error on the same line number: [Exception... Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER)
    Message 1 of 4 , Mar 31, 2007
    View Source
    • 0 Attachment
      Todd,

      I've got the same error on the same line number:
      [Exception... "Component returned failure code: 0x80004003
      (NS_ERROR_INVALID_POINTER) [nsIDOMHTMLUListElement.appendChild]"
      nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)" location: "JS
      frame :: http://schanulleke/qbs2/inet/inet_v100/jsscripts/yui/menu-
      min.js :: anonymous :: line 51" data: no]

      I don't know if it has to do with an upgrade of FireFox from 1.5.0.9
      to 1.5.0.11, but my code has not changed and was working perfectly in
      FireFox 1.5.0.9.


      Maurice Uijlenbroek
      The Netherlands


      --- In ydn-javascript@yahoogroups.com, Todd Kloots <kloots@...> wrote:
      >
      > Should be:
      >
      > var cm = new YAHOO.widget.ContextMenu('ctxMenu', {trigger:
      document});
      > cm.addItem(new YAHOO.widget.ContextMenuItem('edit'));
      > cm.addItem(new YAHOO.widget.ContextMenuItem('copy'));
      > cm.addItem(new YAHOO.widget.ContextMenuItem('paste'));
      > cm.render(document.body);
      >
      >
      > Or better yet:
      >
      > var cm = new YAHOO.widget.ContextMenu('ctxMenu', {trigger:
      document});
      > cm.addItems(['edit', 'copy', 'paste']);
      > cm.render(document.body);
      >
      > - Todd
      >
      > ----- Original Message ----
      > From: tea for two <sysheen@...>
      > To: ydn-javascript@yahoogroups.com
      > Sent: Wednesday, March 7, 2007 5:27:22 AM
      > Subject: [ydn-javascript] ContextMenu and adding MenuItem cause
      exception?
      >
      > When I did this :
      >
      > var cm = new YAHOO.widget.ContextMenu('ctxMenu', {trigger:
      document});
      > cm.addItem(new YAHOO.widget.MenuItem('edit'));
      > cm.addItem(new YAHOO.widget.MenuItem('copy'));
      > cm.addItem(new YAHOO.widget.MenuItem('paste'));
      > cm.render(document.body);
      >
      > Create a context menu, and add some menu items. But I will get an
      > exception from firefox:
      >
      > [Exception... "Component returned failure code: 0x80004003
      > (NS_ERROR_INVALID_POINTER) [nsIDOMHTMLUListElement.appendChild]"
      > nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)" location: "JS
      frame
      > :: http://yui.yahooapis.com/2.2.0/build/menu/menu-min.js ::
      anonymous
      > :: line 51" data: no]
      >
      > Did I do something wrong?
      >
      >
      >
      >
      >
      >
      > Yahoo! Groups Links
      >
    • vividsilvernl
      Todd, I figured it out: the exception occurs when one of the (context)menu items has no label. This has probably nothing to do with my upgrade of firefox but
      Message 2 of 4 , Mar 31, 2007
      View Source
      • 0 Attachment
        Todd,

        I figured it out: the exception occurs when one of the (context)menu
        items has no label.

        This has probably nothing to do with my upgrade of firefox but was
        just a coincidence.

        Best regards,
        Maurice.

        --- In ydn-javascript@yahoogroups.com, "vividsilvernl" <yahoo@...>
        wrote:
        >
        > Todd,
        >
        > I've got the same error on the same line number:
        > [Exception... "Component returned failure code: 0x80004003
        > (NS_ERROR_INVALID_POINTER) [nsIDOMHTMLUListElement.appendChild]"
        > nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)" location: "JS
        > frame :: http://schanulleke/qbs2/inet/inet_v100/jsscripts/yui/menu-
        > min.js :: anonymous :: line 51" data: no]
        >
        > I don't know if it has to do with an upgrade of FireFox from
        1.5.0.9
        > to 1.5.0.11, but my code has not changed and was working perfectly
        in
        > FireFox 1.5.0.9.
        >
        >
        > Maurice Uijlenbroek
        > The Netherlands
        >
        >
        > --- In ydn-javascript@yahoogroups.com, Todd Kloots <kloots@> wrote:
        > >
        > > Should be:
        > >
        > > var cm = new YAHOO.widget.ContextMenu('ctxMenu', {trigger:
        > document});
        > > cm.addItem(new YAHOO.widget.ContextMenuItem('edit'));
        > > cm.addItem(new YAHOO.widget.ContextMenuItem('copy'));
        > > cm.addItem(new YAHOO.widget.ContextMenuItem('paste'));
        > > cm.render(document.body);
        > >
        > >
        > > Or better yet:
        > >
        > > var cm = new YAHOO.widget.ContextMenu('ctxMenu', {trigger:
        > document});
        > > cm.addItems(['edit', 'copy', 'paste']);
        > > cm.render(document.body);
        > >
        > > - Todd
        > >
        > > ----- Original Message ----
        > > From: tea for two <sysheen@>
        > > To: ydn-javascript@yahoogroups.com
        > > Sent: Wednesday, March 7, 2007 5:27:22 AM
        > > Subject: [ydn-javascript] ContextMenu and adding MenuItem cause
        > exception?
        > >
        > > When I did this :
        > >
        > > var cm = new YAHOO.widget.ContextMenu('ctxMenu', {trigger:
        > document});
        > > cm.addItem(new YAHOO.widget.MenuItem('edit'));
        > > cm.addItem(new YAHOO.widget.MenuItem('copy'));
        > > cm.addItem(new YAHOO.widget.MenuItem('paste'));
        > > cm.render(document.body);
        > >
        > > Create a context menu, and add some menu items. But I will get an
        > > exception from firefox:
        > >
        > > [Exception... "Component returned failure code: 0x80004003
        > > (NS_ERROR_INVALID_POINTER) [nsIDOMHTMLUListElement.appendChild]"
        > > nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)" location: "JS
        > frame
        > > :: http://yui.yahooapis.com/2.2.0/build/menu/menu-min.js ::
        > anonymous
        > > :: line 51" data: no]
        > >
        > > Did I do something wrong?
        > >
        > >
        > >
        > >
        > >
        > >
        > > Yahoo! Groups Links
        > >
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.