<DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="2" COLOR="#000000" LETTERSPACING="0" KERNING="0">&nbsp;I think this is an excellent proposal.&nbsp; cc'ing laszlo-user to see if other folks developing in LZX have strong feelings about this ...</FONT></DIV><FONT FACE="Verdana" SIZE="2" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><FONT FACE="Verdana" SIZE="2" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="2" COLOR="#000000" LETTERSPACING="0" KERNING="0">On Tue, Aug 28, 2007 at&nbsp; 3:12 PM, Bret Simister wrote:</FONT></DIV><FONT FACE="Verdana" SIZE="2" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><FONT FACE="Verdana" SIZE="2" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">Currently, in the OpenLaszlo platform, it was decided that declaring a resource twice within an LZX app&nbsp; <FONT SIZE="2"></FONT></FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">causes a server warning. This was intended to help developers just&nbsp; in case they accidentally overrode a&nbsp; <FONT SIZE="2"></FONT></FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">resource that had already been&nbsp; declared in another library. <FONT SIZE="2"></FONT></FONT></DIV><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><FONT FACE="Verdana" SIZE="2" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">&lt;!-- the following code produces a warning, but still compiles --&gt; <FONT SIZE="2"></FONT></FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">&lt;canvas&gt; </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">&nbsp;&nbsp;&nbsp; &lt;resource name=&quot;logo&quot; src=&quot;logo.gif&quot; /&gt; </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">&nbsp;&nbsp;&nbsp; &lt;resource name=&quot;logo&quot; src=&quot;logo2.gif&quot; /&gt; </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">&nbsp; </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">&nbsp;&lt;!-- view appears with logo2.gif --&gt; </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">&nbsp;&nbsp;&nbsp; &lt;view resource=&quot;logo&quot; /&gt; </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">&lt;/canvas&gt; </FONT></DIV><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">At this time, I would suggest that&nbsp; the&nbsp; platform remove these warnings and have&nbsp; <FONT FACE="Courier"></FONT></FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">the last resource declaration override all other previous declarations. <FONT FACE="Courier"></FONT></FONT></DIV><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">Here is why... <FONT FACE="Courier"></FONT></FONT></DIV><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">OpenLaszlo now has a CSS implementation. It gives developers an elegant method&nbsp; <FONT FACE="Courier"></FONT></FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">of skinning their applications. This works, currently,&nbsp; by first declaring a resource <FONT FACE="Courier"></FONT></FONT></DIV><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><DIV ALIGN="LEFT"><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">&lt;resource&nbsp; name=&quot;someimage_rsc&quot;&nbsp; src=&quot;somepath/someimage.jpg&quot; /&gt; </FONT></DIV><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">and then referring to that resource in a CSS selector <FONT FACE="Courier"></FONT></FONT></DIV><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><DIV ALIGN="LEFT"><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">view[name=&quot;someview&quot;] { </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">resource: someimage_rsc; </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">} </FONT></DIV><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">If a developer builds a library .... <FONT FACE="Courier"></FONT></FONT></DIV><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">&nbsp; myCustomLibrary&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ( folder ) <FONT FACE="Courier"></FONT></FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">&nbsp;&nbsp;&nbsp;&nbsp; library.lzx </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">&nbsp;&nbsp;&nbsp;&nbsp; myresources.lzx ( contains many resource definitions including 'lowerRightCorner_rsc' ) </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">&nbsp;&nbsp;&nbsp;&nbsp; mystyles.css&nbsp;&nbsp;&nbsp; ( contains many selectors including one that references 'lowerRightCorner_rsc' ) </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">&nbsp;&nbsp;&nbsp;&nbsp; ...&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ( other class and source image files ) </FONT></DIV><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><DIV ALIGN="LEFT"><FONT FACE="Helvetica" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">where <FONT FACE="Courier">&nbsp;library.lzx&nbsp; includes both&nbsp;&nbsp; myresources.lzx and mystyles.css </FONT></FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">Then library can be used with a simple inclusion in the main app. <FONT FACE="Courier"></FONT></FONT></DIV><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><DIV ALIGN="LEFT"><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">&lt;canvas&gt; </FONT></DIV><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">&lt;include name=&quot;myCustomLibrary&quot; /&gt; <FONT FACE="Courier"></FONT></FONT></DIV><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><DIV ALIGN="LEFT"><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">&lt;!-- instance of a class from myCustomLibrary --&gt; </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">&lt;mycustomclass /&gt; </FONT></DIV><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><DIV ALIGN="LEFT"><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">&lt;/canvas&gt; </FONT></DIV><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><DIV ALIGN="LEFT"><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">Let's assume that &quot; mycustomclass <FONT FACE="Helvetica">&quot; contains a number of resources, and that you ( as a developer ) </FONT></FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">only want to change one of those resources . The simplest method to accomplish this would be ... <FONT FACE="Courier"></FONT></FONT></DIV><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><DIV ALIGN="LEFT"><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">&lt;canvas&gt; </FONT></DIV><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">&lt;include name=&quot;myCustomLibrary&quot; /&gt; <FONT FACE="Courier"></FONT></FONT></DIV><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><DIV ALIGN="LEFT"><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">&lt;!-- override resource definition &quot;lowerRightCorner_rsc&quot; defined earlier in myresouces.lzx --&gt; </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">&lt;resource name=&quot;lowerRightCorner&quot; src=&quot;my_new_path/my_lower_right_corner.jpg&quot; /&gt; </FONT></DIV><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><DIV ALIGN="LEFT"><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">&lt;!-- instance of mycustomclass that will now display&nbsp; </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the new resource based on the unchanged css selector --&gt; </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">&lt;mycustomclass /&gt; </FONT></DIV><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><DIV ALIGN="LEFT"><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">&lt;/canvas&gt; </FONT></DIV><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><DIV ALIGN="LEFT"><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">Currently, this code would cause a compiler warning. To avoid these warnings ( without changing OpenLaszlo ) the&nbsp; resouces.lzx file(s) and possibly the&nbsp; library .lzx would have to be edited. </FONT></DIV><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><DIV ALIGN="LEFT"><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">If instead, we allow for resource overriding, then ... </FONT></DIV><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><DIV ALIGN="LEFT"><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">1) the original CSS and&nbsp; resource files will remain unchanged </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">2) The old resource for &quot; lowerRightCorner&quot;&nbsp; would NOT be included in the app&nbsp; </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">3) There&nbsp; would be clean separation between external libraries and the skinning of theses libraries&nbsp; included in an application. </FONT></DIV><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><FONT FACE="Courier" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br><FONT>