Better say `new lz['myclass']` just to be safe... On 2010-01-26, at 15:28, Henry Minsky wrote:
> Oh, I can verify that case by having a test case which attempts to make an > instance of the loadable class before the lib has been loaded. > > If we were still referring to classes by their actual classname, then that > wouldn't work, because the Flex compiler would see a reference to " new > myclass()" and would link it in with the > main app. > > But because we reference all classes through the 'lz' object, e.g., "new > lz.myclass(...)", the flex compiler won't attempt to link that at compile > time into the main app. > > > > On Tue, Jan 26, 2010 at 2:57 PM, P T Withington <[email protected]>wrote: > >> On 2010-01-25, at 20:54, Henry Minsky wrote: >> >>>> 2. Have you a test to ensure that non-anonymous classes that are defined >> in >>>> an import library and only used in the import library are actually >> emitted >>>> to the import library rather than the main program? >>>> >>> >>> I checked by inspection, but I'll see if there's some way to add an >>> automated test (it's >>> hard to think how to do it in LZX, given that the class is going to be >>> anonymous and >>> have a gensym'ed name) >> >> No, I am asking, if I have a named class in a snippet, are we sure that >> named class is emitted in the snippet? >> >> This bug showed up because we stopped putting anonymous classes in the `lz` >> table. We were emitting the (anonymous) snippet class in the main app, and >> it used to be kept by the flex compiler since it was referenced from `lz`, >> now it is not, so it was dropped. Hence the bug. >> >> My concern is: name (NOT anonymous) snippet classes may still have the same >> bug, may still be emitted into the main app, rather than the snippet. >> Programs will still work, but it seems not in the spirit of the class being >> in the snippet... > > > > > -- > Henry Minsky > Software Architect > [email protected] > _______________________________________________ > Laszlo-reviews mailing list > [email protected] > http://www.openlaszlo.org/mailman/listinfo/laszlo-reviews _______________________________________________ Laszlo-reviews mailing list [email protected] http://www.openlaszlo.org/mailman/listinfo/laszlo-reviews
