That's not going to work. See line 101 of ClassModel. We need to be able to look up interstitial models in the schema class map so we don't end up re-creating the same insterstitial.
Class model already has a "publish" flag that determines whether the class is published in the lz namespace, we should just leverage off of that. So, when the tag compiler creates an intersitial, it should just pass an (additional) flag down to schema addElement. We want it entered in the schema class table (because it _is_ a class), but we don't want it published in lz (because it _is_not_ a tag). I don't like keying off the tag name (because we are omitting the tag name for unpublished classes in production and putting a "pretty" name there in debug mode). On 2009-11-29, at 23:44, Henry Minsky wrote: > Change 20091129-hqm-P by [email protected] on 2009-11-29 23:25:20 EST > in /Users/hqm/openlaszlo/trunk > for http://svn.openlaszlo.org/openlaszlo/trunk > > Summary: fix for 'compiler declares interstitial classnames in the lz > namespace' > > New Features: > > Bugs Fixed: LPP-8637 compiler declares interstitial classnames in the lz > namespace > > Technical Reviewer: ptw > QA Reviewer: max > Doc Reviewer: (pending) > > Documentation: > > Release Notes: > > Overview: > > > Details: > > + ClassModel: if we build interstitial classes, call ViewSchema.addElement > with classdef='false' > (classdef arg should probably be called something else, we're using it to > really mean 'publish as > user-visible tag'). > > + ViewSchema: addElement will add any tag name except 'anonymous' to the > mClassMap table. > > Note: mClassMap probably is not really the right name for this table, since > it has to keep track of > some tag special forms like 'import' which are not really classes. > > > Tests: > > smoke check, > test/smoke/mixin-simple.lzx > test/mixins.lzx > > compile with --script option, look at .lzs file and see that only > real classes are defined on the lz object. > > I.e., you should see class defs like > lz["colored_square"] = $lzc$class_colored_square; > lz["black_line"] = $lzc$class_black_line; > > But NOT interstitial classes (with '$' in the name), like this > lz["colored_square$view"] = $lzc$class_colored_square$view; > lz["black_line$colored_square$view"] = > $lzc$class_black_line$colored_square$view; > > > Files: > M WEB-INF/lps/server/src/org/openlaszlo/compiler/ViewSchema.java > M WEB-INF/lps/server/src/org/openlaszlo/compiler/ClassModel.java > > Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20091129-hqm-P.tar _______________________________________________ Laszlo-reviews mailing list [email protected] http://www.openlaszlo.org/mailman/listinfo/laszlo-reviews
