Can you file this as a bug in JIRA please?&nbsp;<div><br></div><div><br><br><div class="gmail_quote">On Mon, Oct 27, 2008 at 4:03 AM, Marco Lettere <span dir="ltr">&lt;<a href="mailto:m.lettere@websynapsis.com">m.lettere@websynapsis.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Since I didn&#39;t see my mail appearing in the list I&#39;ll post it again.<br>
Sorry for multiple copies...<br>
<font color="#888888">M.<br>
</font><br>Hello all,<br>
I&#39;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=&quot;defer&quot;).<br>
The two &quot;import.load()&quot; 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&#39;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>
&lt;import name=&quot;mainmenuimport&quot;<br>
href=&quot;../../../mainmenu/views/mainmenu/standalone.lzx&quot; stage=&quot;defer&quot;&gt;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;&lt;attribute name=&quot;area&quot; type=&quot;string&quot;/&gt;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;&lt;attribute name=&quot;classname&quot; type=&quot;string&quot;/&gt;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;&lt;handler name=&quot;onload&quot;&gt;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//canvas.instantiate(this.classname, this.area)<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;var constructor = eval(this.classname)<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(constructor == null){<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Debug.warn(&quot;Cannot instantiate undefined class &quot;+classname);<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Debug.warn(&quot;Trying with &#39;lz.&#39; ...&quot;);<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;constructor = eval(&#39;lz.&#39;+this.classname)<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(constructor == null){<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Debug.warn(&quot;Cannot instantiate undefined class lz.&quot;<br>
+ this.classname);<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;new constructor(eval(this.area),{})<br>
 &nbsp; &nbsp; &nbsp; &nbsp;&lt;/handler&gt;<br>
 &nbsp; &nbsp;&lt;/import&gt;<br>
<br>
 &nbsp; &nbsp;&lt;import name=&quot;testimport&quot;<br>
href=&quot;../../../guicontroller/views/test/standalone.lzx&quot; stage=&quot;defer&quot;&gt;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;&lt;attribute name=&quot;area&quot;/&gt;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;&lt;attribute name=&quot;classname&quot; type=&quot;string&quot;/&gt;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;&lt;handler name=&quot;onload&quot;&gt;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//canvas.instantiate(this.classname, this.area)<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;var constructor = eval(this.classname)<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(constructor == null){<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Debug.warn(&quot;Cannot instantiate undefined class &quot;+classname);<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Debug.warn(&quot;Trying with &#39;lz.&#39; ...&quot;);<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;constructor = eval(&#39;lz.&#39;+this.classname)<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(constructor == null){<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Debug.warn(&quot;Cannot instantiate undefined class lz.&quot;<br>
+ this.classname);<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;new constructor(eval(this.area),{})<br>
 &nbsp; &nbsp; &nbsp; &nbsp;&lt;/handler&gt;<br>
 &nbsp; &nbsp;&lt;/import&gt;<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>