[Laszlo-dev] lz['tagname']

Rami Ojares / AMG rami.ojares at archon.fi
Thu Nov 12 13:58:52 PST 2009


So would other kind of referring to objects under lz use the same syntax
Eg.

|lz.Audio.playSound('poof') would become
||<Audio>.playSound('poof')

Also this would mean that one needs to use more of those <![CDATA[ ... ]]>
because xml does not like < and > other than as tag markers.
But that's not a biggie since you have to use them most of the time already.

It is a nuisance in attributes however because there you can not use CDATA tags
Eg. <view someAttr="${<Browser>.getInitArg(..)}"/>

But one could still use lz.Browser in those situations.

Then again two ways to do the same thing adds complexity and confusion ...

- rami
|

> On 2009-11-12, at 16:34, Rami Ojares / AMG wrote:
>
>   
>> Do you mean new <'view'>(...) ?
>>
>> I am quite satisfied with new lz['view'](...)
>>
>> Or do you mean new <view>(...)
>> as in new lz.view(...)?
>>     
>
> Yes.  I was thinking:
>
>   new <view>
>
> might be more obvious.  And that it would be an extension, because <view> is not a valid Javascript symbol -- it would normally be an error.
>
>   
>> -rami
>>     
>>> I wonder if we should extend our script compiler to let you say:
>>>
>>>  new <view>(...)
>>>
>>> and if that would be any more obvious than:
>>>
>>>  new lz['view'](...)
>>>
>>> ?
>>>
>>> Is the <> syntax already used by some Javascript extension?
>>>  
>>>       
>
>   



More information about the Laszlo-dev mailing list