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]

Reply via email to