[Laszlo-dev] Simple idea on how to update dynamic instantiation of user classes

Donald Anderson dda at ddanderson.com
Tue Jul 1 08:39:31 PDT 2008


Can I understand that these changes are made globally (not just in new/ 
instanceof expressions)?
Or do you only ever see them in new/instanceof anyway?

Yes, it's an easy change to make, the script includes a table for  
renames.

- Don

On Jul 1, 2008, at 11:13 AM, Philip Romanik wrote:

> Hi Don,
>
> I'm working on LPP-6570 to deprecate a number of global services  
> like LzModeManager. Will it be easy to  modify your script so that  
> these transformations are made to lzx files?
>
> LzAudio         => lz.Audio
> LzBrowser               => lz.Browser
> LzCursor                => lz.Cursor
> LzFocus         => lz.Focus
> LzGlobalMouse   => lz.GlobalMouse
> LzHistory               => lz.History
> LzIdle                  => lz.Idle
> LzInstantiator          => lz.Instantiator
> LzKeys          => lz.Keys
> LzModeManager   => lz.ModeManager
> LzTimer         => lz.Timer
> LzTrack         => lz.Track
>
>
> Thanks!
>
> Phil
>
>
>
>> Here's the perl script (attached).  I tried to upload it to the  
>> Runtime_Differences page,
>> but it looks like I can only update .gif/.jpeg files.  Any advice  
>> about where to put it?
>>
>> I think I got all the cases:
>>
>> -   if the class name already has lz. , no change
>>
>> -   if the class name is a class defined in the input, then add lz.  
>> (?)  [requires two passes]
>>
>> -   if the class name is class for a LFC tagname, convert it to  
>> tagname and add lz.  (new LzView => lz.view)
>>        I coded my list from WEB-INF/lps/server/src/org/openlaszlo/ 
>> compiler/ClassModel.java
>>
>> -   if the class name is a known laszlo class, then add lz.
>>        I have a fixed list embedded in the script, generated via  
>> find WEB-INF/lps | xargs grep class
>>
>> -   new global[*] is converted to new lz[*]
>>
>> -   otherwise, no change (this includes Object, Array, ...).
>>
>> Let me know if there are any changes, should be easy to modify.
>> Script includes a testcase to try all these situations.
>>
>> - Don
>


--

Don Anderson
Java/C/C++, Berkeley DB, systems consultant

voice: 617-547-7881
email: dda at ddanderson.com
www: http://www.ddanderson.com



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-dev/attachments/20080701/2f26afdd/attachment.html


More information about the Laszlo-dev mailing list