Do we really need to allow that though? It seems like: a) This is just another way to get the effect of defining a class (or mixin), but with none of the benefits. b) Since this is the first we have seen of it, probably a little-used feature. Could we scale back the set of things you do with includes at this point to be more like a normal language? I feel like some of the flexibility there was only needed in early stages of the language and perhaps are not so important now. On 2008-05-09, at 11:12 EDT, Henry Minsky wrote:> Yeah I forgot you could <include> code into anyplace except the top > level.> > > On Fri, May 9, 2008 at 11:08 AM, P T Withington <[EMAIL PROTECTED]> wrote: >>> We'd have to know that the two classes were identical too, which >> should be >> possible since you have your hands on the source element. >> Alternatively, we>> could add a UID to the name. >>>> I guess I didn't consider this case, that you might include the >> same file>> more than once! >> >>>> On May 9, 2008, at 8:46, "Henry Minsky" <[EMAIL PROTECTED]> >> wrote:>>>> In the example scrollbar_example.lzx, there is a <include> which is >> used to>> include a file twice, which contains >> a view that has a method (oninit-handler) in it. >>>> This causes the compiler to generate two class declarations with >> the same>> name: >> >> >> cd examples/components/ >> badtzmaru:components hqm$ lzc --runtime=swf9 scrollbar_example.lzx >> Compiling: scrollbar_example.lzx to scrollbar_example.lzr=swf9.swf >> Compilation errors occurred:>> org.openlaszlo.sc.CompilerError: cannot declare class name more >> than once: >> "$lzc$class_view_$$2E$2E$2F$2E$2E$2Fexamples$2Fcomponents >> $2Ftestmedia$2Ffrosty$2Elzx_1_21">> badtzmaru:components hqm$ >>>> Maybe we need to have something that checks if one of these >> generated class>> names is identical>> to one previously generated, and simply skip generating it more >> than once.>> >> >> >> >> -- >> Henry Minsky >> Software Architect >> <[EMAIL PROTECTED]>[EMAIL PROTECTED] >> >>> >> -- > Henry Minsky> Software Architect > [EMAIL PROTECTED]
A few people on the forum do use this feature, therefore I'm cc-ing
laszlo-user.
- [Laszlo-user] [Laszlo-dev] situation where the view-instanc... André Bargull
