Opened 14 years ago

Closed 14 years ago

Last modified 12 years ago

#598 closed defect (invalid)

MenuSeparator2 Does Not Work with CreateWidget

Reported by: colins Owned by: anonymous
Priority: high Milestone:
Component: Widgets Version: 0.2
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by alex)

	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.

Change History (4)

comment:1 Changed 14 years ago by anonymous

Resolution: invalid
Status: newclosed

comment:2 Changed 14 years ago by alex

Description: modified (diff)
Milestone: 0.3release

comment:3 Changed 14 years ago by tildahl

You need to pass in the parent to createWidget for MenuSeperator2. So in your code above change it to:

var q = dojo.widget.createWidget("MenuSeparator2", {parent: contextMenuStory});

comment:4 Changed 12 years ago by (none)

Milestone: 0.3release

Milestone 0.3release deleted

Note: See TracTickets for help on using tickets.