Hi There
I have a construcotr defined already,what I want is to create another
functiion to include menubar on my desktop application,but I'm getting this
error :
" TypeError: qx.ui.menubar.MenuBar is not a constructor"
how can I unclude two constructor?
here is my code:
qx.Class.define("control.MainWindow",
{
extend : qx.ui.container.Composite,
// Constructor
construct : function()
{
// Load default class constructor
this.base(arguments);
// Create a HBox layout
this.setLayout(new qx.ui.layout.VBox(5));
var border = new qx.ui.decoration.Single(3, "solid", "black");
var w1 = new qx.ui.core.Widget().set({
backgroundColor: "red",
decorator: border,
width: 400
});
// Fill the layout
this.fillLayout();
},
// Member functions
members : {
// Function: fill layout
fillLayout : function()
{
var bar = this.getMenuBar();
container.add(bar, {left: 20, top: 50});
// Create a new alert form window
},
getMenuBar : function() {
var frame = new qx.ui.container.Composite(new qx.ui.layout.Grow);
var menubar = new qx.ui.menubar.MenuBar;
menubar.setWidth(600);
frame.add(menubar);
var fileMenu = new qx.ui.menubar.Button("File", null,
this.getFileMenu());
var editMenu = new qx.ui.menubar.Button("Edit", null,
this.getEditMenu());
var searchMenu = new qx.ui.menubar.Button("Search", null,
this.getSearchMenu());
var viewMenu = new qx.ui.menubar.Button("View", null,
this.getViewMenu());
var formatMenu = new qx.ui.menubar.Button("Format", null,
this.getFormatMenu());
var helpMenu = new qx.ui.menubar.Button("Help", null,
this.getHelpMenu());
menubar.add(fileMenu);
menubar.add(editMenu);
menubar.add(searchMenu);
menubar.add(viewMenu);
menubar.add(formatMenu);
menubar.add(helpMenu);
return frame;
}
}
--
View this message in context:
http://qooxdoo.678.n2.nabble.com/Constructor-error-tp7580989.html
Sent from the qooxdoo mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel