[Dojo-checkins] Re: [dojo] #598: MenuSeparator2 Does Not Work with CreateWidget

dojo trac at dojotoolkit.org
Tue Apr 4 19:51:40 MDT 2006


#598: MenuSeparator2 Does Not Work with CreateWidget
---------------------+------------------------------------------------------
 Reporter:  colins   |        Owner:  anonymous 
     Type:  defect   |       Status:  closed    
 Priority:  high     |    Milestone:  0.3release
Component:  Widgets  |      Version:  0.2       
 Severity:  normal   |   Resolution:  invalid   
 Keywords:           |  
---------------------+------------------------------------------------------
Changes (by alex):

  * milestone:  => 0.3release

Old description:

> var contextMenuStory = dojo.widget.createWidget("PopupMenu2",{
>                 id: "story_cm",
>                 targetNodeIds:["blurbTextArea","headlineText"],
>                 contextMenuForWindow:"true"
>         });
>
>         var menuItem1 = dojo.widget.createWidget("MenuItem2", {
>                 id: "bold",
>                 caption:"Bold"
>         });
>         contextMenuStory.addChild(menuItem1);
>
>         var menuItem2 = dojo.widget.createWidget("MenuItem2", {
>                 id: "italics",
>                 caption:"Italics"
>         });
>         contextMenuStory.addChild(menuItem2);
>
>                 var q = dojo.widget.createWidget("MenuSeparator2");
>         contextMenuStory.addChild(q);
>
>         var menuItem3 = dojo.widget.createWidget("MenuItem2", {
>                 id: "underline",
>                 caption:"Underline"
>         });
>         contextMenuStory.addChild(menuItem3);
>
>         document.body.appendChild(contextMenuStory.domNode);
>
> I am trying to create the separator, apparently, it is complaining about
> the ITEMHEIGHT IS NULL OR NOT AN OBJECT.

New description:

 {{{
         var contextMenuStory = dojo.widget.createWidget("PopupMenu2",{
                 id: "story_cm",
                 targetNodeIds:["blurbTextArea","headlineText"],
                 contextMenuForWindow:"true"
         });

         var menuItem1 = dojo.widget.createWidget("MenuItem2", {
                 id: "bold",
                 caption:"Bold"
         });
         contextMenuStory.addChild(menuItem1);

         var menuItem2 = dojo.widget.createWidget("MenuItem2", {
                 id: "italics",
                 caption:"Italics"
         });
         contextMenuStory.addChild(menuItem2);

                 var q = dojo.widget.createWidget("MenuSeparator2");
         contextMenuStory.addChild(q);

         var menuItem3 = dojo.widget.createWidget("MenuItem2", {
                 id: "underline",
                 caption:"Underline"
         });
         contextMenuStory.addChild(menuItem3);

         document.body.appendChild(contextMenuStory.domNode);
 }}}
 I am trying to create the separator, apparently, it is complaining about
 the ITEMHEIGHT IS NULL OR NOT AN OBJECT.

-- 
Ticket URL: <http://trac.dojotoolkit.org/ticket/598>
dojo <http://dojotoolkit.org/>
The Dojo UI Toolkit


More information about the Dojo-checkins mailing list