On Dec 14, 2005, at 12:37 PM, P T Withington wrote:
If we did this, we'd also want scoping on node names. (I think we might want scoping anyway.) There's a problem I just ran into with placement, where depending on the order in which subviews are instantiated, a view may be placed (using placement or defaultplacement) either within the intended subview, or within an entirely unexpected subview. This would happen if the names were the same: <class name="v1" defaultplacement="content"> <view name="structure"> <view name="content"> </view> </view </class> <v1> <view name="content" placement="structure"/> <view name="v2"/> </v1> Here, v2 will end up inside the wrong subview (the direct subview introduced by the v1 instance). But if v2 were declared first (assuming initialization matches lexical order), then it would go where the class declaration intended it. The right solution here, I think, is to have scoped naming, so that the "content" subview declared in the instance of v1 would not be incorrectly matched when searching for the "content" subview declared in the class v1. I see scoping here as just basic encapsulation, something we don't really provide. The problem is similar to the capture problem in macro expansion. Even given that it is a scripting language, the current semantics are pretty loose. jim |
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Laszlo-dev mailing list [email protected] http://www.openlaszlo.org/mailman/listinfo/laszlo-dev
