Can you file this as a bug in JIRA please? <div><br></div><div><br><br><div class="gmail_quote">On Mon, Oct 27, 2008 at 4:03 AM, Marco Lettere <span dir="ltr"><<a href="mailto:m.lettere@websynapsis.com">m.lettere@websynapsis.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Since I didn't see my mail appearing in the list I'll post it again.<br>
Sorry for multiple copies...<br>
<font color="#888888">M.<br>
</font><br>Hello all,<br>
I'm trying to dynamically load two different pieces of application that<br>
reside in very different directories but whose filename is the same<br>
(something like ../../dir1/dir2/standalone.lzx and<br>
../../dir3/dir4/standalone.lzx).<br>
I do it in OL 4.2 (but 4.1 seems to behave the same way) by using the<br>
import tag (with stage="defer").<br>
The two "import.load()" occur very close (in time) to each other and in<br>
particular might also overlap.<br>
So, it seems that OL gets confused actually it doesn't find one of the<br>
classes contained in the files to be instantiated. But if I change the<br>
name of one of the two files then everything seems to work.<br>
Am I right in the statement contained in the subject?<br>
Thank you all,<br>
M.<br>
<br>
The two imports for your documentation:<br>
<br>
<import name="mainmenuimport"<br>
href="../../../mainmenu/views/mainmenu/standalone.lzx" stage="defer"><br>
<attribute name="area" type="string"/><br>
<attribute name="classname" type="string"/><br>
<handler name="onload"><br>
//canvas.instantiate(this.classname, this.area)<br>
var constructor = eval(this.classname)<br>
if(constructor == null){<br>
Debug.warn("Cannot instantiate undefined class "+classname);<br>
Debug.warn("Trying with 'lz.' ...");<br>
constructor = eval('lz.'+this.classname)<br>
if(constructor == null){<br>
Debug.warn("Cannot instantiate undefined class lz."<br>
+ this.classname);<br>
return;<br>
}<br>
}<br>
new constructor(eval(this.area),{})<br>
</handler><br>
</import><br>
<br>
<import name="testimport"<br>
href="../../../guicontroller/views/test/standalone.lzx" stage="defer"><br>
<attribute name="area"/><br>
<attribute name="classname" type="string"/><br>
<handler name="onload"><br>
//canvas.instantiate(this.classname, this.area)<br>
var constructor = eval(this.classname)<br>
if(constructor == null){<br>
Debug.warn("Cannot instantiate undefined class "+classname);<br>
Debug.warn("Trying with 'lz.' ...");<br>
constructor = eval('lz.'+this.classname)<br>
if(constructor == null){<br>
Debug.warn("Cannot instantiate undefined class lz."<br>
+ this.classname);<br>
return;<br>
}<br>
}<br>
new constructor(eval(this.area),{})<br>
</handler><br>
</import><br>
<br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Henry Minsky<br>Software Architect<br><a href="mailto:hminsky@laszlosystems.com">hminsky@laszlosystems.com</a><br><br><br>
</div>