[Laszlo-dev] case sensitivity in Laszlo

Eric Bloch bloch at laszlosystems.com
Fri Jan 21 10:20:59 PST 2005


namespaces lz:button would help here.

-E


John Sundman wrote:
> I'm with Henry on this one, although I admid that I have not thought 
> through the implications.
> 
> jrs
> 
> On Jan 20, 2005, at 12:18 PM, Henry Minsky wrote:
> 
>>  Note that there is a real advantage to having unique class names that
>> are prefixed by "Lz". If you type LzDatapointer into google, you get
>> the laszlo reference page for it as the first hit. We should
>> definitely strive to preserve this extremely useful naming, i.e., keep
>> our classnames unique as possible, so that we get indexed
>> preferentially in Google.
>>
>>
>>
>> On Wed, 19 Jan 2005 17:25:08 -0500, Oliver Steele
>> <steele at laszlosystems.com> wrote:
>>
>>> I'm just fleshing out the examples a bit here:
>>>
>>> On Jan 18, 2005, at 11:21 PM, P T Withington wrote:
>>>
>>>> People are uncomfortable with this complicated story.  Three ideas
>>>> have been proposed for making it simpler:
>>>>
>>>> 1. Capitalize all class names, change all tags that are implemented by
>>>> such classes to have capitalized names, e.g., <Canvas ... />, <View
>>>> ... />, etc.
>>>
>>>
>>> E.g. the windowed version of hello world would look like:
>>>    <Canvas>
>>>      <Window>
>>>        <Text>Hello World</Text>
>>>      </Window>
>>>    </Canvas>
>>>
>>> This begs the question of whether to also capitalize, or
>>> intercapitalize, attribute names:
>>>    <view onclick="f()"/> <!-- the status quo -->
>>>    <View onclick="f()"/> <!-- proposal (1) with unmodified attribute
>>> names -->
>>>    <View onClick="f()"/> <!-- proposal (1) with modified attribute names
>>> -->
>>>
>>>> 2. Make up a rule that <class name="foo" ... /> creates a class named
>>>> Foo, but you still instantiate it with a tag <foo ... />.
>>>
>>>
>>> E.g.:
>>>    <canvas layout="axis: y">
>>>      <class name="box" width="10" height="10" bgcolor="red"/>
>>>      <box/>
>>>      <button onclick="new Box(canvas)">Box</button>
>>>      <button onclick="new Window(canvas)">Window</button>
>>>    </canvas>
>>>
>>> (The XML '<box/>' looks natural, and the JavaScript 'new Box()' looks
>>> natural, but they don't match.)
>>>
>>>
>>>> 3. Maintain the status quo.  Create a style guide that suggests using
>>>> lower-case names for classes that define tags.  Create lower-case
>>>> aliases for the built-in types and classes.
>>>
>>>
>>> There are actually two possiblities: (3a) use lower-case only for
>>> non-ECMAScript classes, and (3b) use lower-case for built-in types and
>>> classes two.
>>>
>>> The XML for these looks the same as the status quo:
>>>    <canvas>
>>>      <window>
>>>        <text>Hello World</text>
>>>      </window>
>>>    </canvas>
>>>
>>> JavaScript references to Laszlo classes look the same in (3a) and (3b):
>>>    <canvas layout="axis: y">
>>>      <class name="box" width="10" height="10" bgcolor="red"/>
>>>      <box/>
>>>      <button onclick="new box(canvas)">Box</button>
>>>      <button onclick="new window(canvas)">Window</button>
>>>    </canvas>
>>>
>>> The difference is that (3a) uses the names of standard JavaScript
>>> classes:
>>>    var n = (new String(123)).valueOf();
>>>    var a = (new Number('2').valueOf();
>>>    var max = Number.MAX_VALUE;
>>> while (3b) recommends lowercase names:
>>>    var n = (new string(123)).valueOf();
>>>    var a = (new number('2').valueOf();
>>>    var max = number.MAX_VALUE;
>>> (although the uppercase names will work too in (3b)).
>>>
>>> (3a) is inconsistent between LZX classes and JavaScript classes; (3b)
>>> is inconsistent with other systems that embed JavaScript, and requires
>>> that libraries that are shared with them either fork or don't use the
>>> recommended capitalization.
>>> _______________________________________________
>>> Laszlo-dev mailing list
>>> Laszlo-dev at openlaszlo.org
>>> http://www.openlaszlo.org/mailman/listinfo/laszlo-dev
>>>
>> _______________________________________________
>> Laszlo-dev mailing list
>> Laszlo-dev at openlaszlo.org
>> http://www.openlaszlo.org/mailman/listinfo/laszlo-dev
> 
> 
> _______________________________________________
> Laszlo-dev mailing list
> Laszlo-dev at openlaszlo.org
> http://www.openlaszlo.org/mailman/listinfo/laszlo-dev


More information about the Laszlo-dev mailing list