[Laszlo-dev] declaring types for named views/nodes
P T Withington
ptw at pobox.com
Mon Apr 6 13:53:11 PDT 2009
Someday we should get rid of magic (implicit) replication.
On Apr 6, 2009, at 15:53, André Bargull <andre.bargull at udo.edu> wrote:
> Declaring types won't work with replication because the replication-
> manager takes the named slot of the node which gets replaced.
>
>
>> Yeah, only I realized it would be a little spotty because we only
>> compile
>> custom classes for views that have methods, so for the views that
>> do not
>> have any methods, we're still depending on
>> using dynamically added properties to point to the named child
>> views, so
>> those don't get the benefit of type declaration. Which might
>> confuse people
>> who would sometimes get type checking on their
>> references to child nodes and sometimes not.
>>
>>
>>
>> On Mon, Apr 6, 2009 at 3:33 PM, P T Withington <ptw at
>> laszlosystems.com <http://www.openlaszlo.org/mailman/listinfo/laszlo-dev
>> >>wrote:
>>
>> >/ Seems like a good idea, assuming you can compute the information
>> without
>> />/ having to add another pass to the compiler...
>> />/
>> />/
>> />/ On 2009-04-06, at 14:54EDT, Henry Minsky wrote:
>> />/
>> />/ Sorry, got cut off in mid message
>> />>/
>> />>/ On Mon, Apr 6, 2009 at 2:52 PM, Henry Minsky <hminsky at
>> laszlosystems.com <http://www.openlaszlo.org/mailman/listinfo/laszlo-dev
>> >
>> />>/ >wrote:
>> />>/
>> />>/ I was looking at declaring types for global named views, and
>> it occurred
>> />>>/ to
>> />>>/ me that we could do this for local names as well,e.g.,
>> />>>/
>> />>>/ <view>
>> />>>/ <view name="baz" onclick="bar.dosomething()"/>
>> />>>/ <view name="bar">
>> />>>/ <method name="dosomething"> ... </method>
>> />>>/
>> />>>/ </view>
>> />>/ </view>
>> />>/
>> />>/ So in this case, the "bar" and "baz" views actually get custom
>> anonymous
>> />>/ classes created
>> />>/ for them , and it would improve compile time error checking if
>> the vars
>> />>/ "baz" and "bar" were
>> />>/ declared with type being the actual class they will be bound
>> to.
>> />>
>>
>>
>
More information about the Laszlo-dev
mailing list