Hi,
I'm removing warnings and errors from the code (on lps-legals) and found a
potential issue with LzCanvas.buildDefaultMenu. I think it's just a simple
mistake, but I want to make sure I'm not missing anything. Here's the
entire function, although the issue is on the last line of code:
LzCanvas.prototype.buildDefaultMenu = function () {
var cproto = LzCanvas.prototype;
cproto.__LZDefaultCanvasMenu = new LzContextMenu();
cproto.__LZdefaultMenuItem = new LzContextMenuItem("About OpenLaszlo...",
new
LzDelegate(cproto, '__LZdefaultMenuItemHandler'));
cproto.__LZviewSourceMenuItem = new LzContextMenuItem("View Source",
new
LzDelegate(cproto, '__LZviewSourceMenuItemHandler'));
cproto.__LZDefaultCanvasMenu.hideBuiltInItems();
cproto.__LZDefaultCanvasMenu.addItem(cproto.__LZdefaultMenuItem);
cproto.__LZDefaultCanvasMenu.addItem(cproto.__LZviewSourceMenuItem);
// Install the default menu onto MovieClip, so it shows up everywhere
by default
MovieClip.prototype.menu = __LZDefaultCanvasMenu.__LZcontextMenu();
}
The reference to __LZDefaultCanvasMenu on the final line doesn't include
cproto and an error is being generated. Before I just make the line,
MovieClip.prototype.menu = cproto.__LZDefaultCanvasMenu.__LZcontextMenu();
I figured I'd ask.
Thanks!
Phil
_______________________________________________
Laszlo-dev mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev