The weird thing is it only works in debug mode.
Well, the first bug turned out to be because the autoinclude machinery wasn't being called on the canvas layout attribute. The debugger
happened to include the layout library.
But even after I fixed that, the code still 't work in non debug mode, because the simplelayout component class has not yet been defined when the canvas tries to instantiate it.
The script code emitted in the app looks like
canvas = new LzCanvas({__LZproxied: "true", bgcolor: 16777215, embedfonts: true, fontname: "Verdana,Vera,sans-serif", fontsize: 11, fontstyle: "plain", height: 600, lpsbuild: "2489 C:\\users\\hqm\\openlaszlo\\branches\\legals", lpsbuilddate: "2006-11-11T23:24:29-0500", lpsrelease: "Latest", lpsversion: "
4.0.x", runtime: "swf7", width: 500});
LzInstantiateView({name: 'class', attrs: {parent: "layout", initobj: {attrs: {$setters: {axis: ...///this is the simplelayout class///
...
LzInstantiateView({name: 'class', attrs: {parent: "layout", initobj: {attrs: {$setters: {axis: ...///this is the simplelayout class///
...
I.e., the canvas is instantiated using "new LzCanvas", and then the various user classes (including the autoincluded simplelayout class) are then
instantiated.
LzView has a "delayed setter" for layout attributes, named setLayout. But I'm not sure when delayed setters are supposed to run. Do they run
at node init time? It seems like this will always be a case of the canvas trying to make a forward refrence to a layout class, unless the
delayed setter is guaranteed to run only after all the classes in the app are instantiated/defined. I know this must have worked once upon a time,
but I am not sure how.
--
Henry Minsky
Software Architect
[EMAIL PROTECTED]
