On Dec 20, 2005, at 12:14 PM, Jim Grandy wrote:
Since we're in a single-inheritance world, thinking of these pieces
of functionality as separate classes leads to very wide, very deep
class hierarchies with lots of duplicated code and (subtly-
different) APIs. My guess is that there is already enough internal
delegate use required to implement these features that we could
adopt an "attachment" pattern much more broadly in the LFC and the
components without losing much performance.
So instead of a mouseview, we'd have a mouseattachment that hooks
itself up to its parent at construct/init time.
<view>
<mouseattachment />
</view>
The option to ignore subview mouseouts would be declared with the
mouseattachment.
This seems so well supported with our existing delegate mechanism
that I'm wondering why it wasn't used more extensively in the LFC &
components? If it was considered, why wasn't it adopted?
(I also want to write a proposal for a compile-time version of
this, called "traits". I haven't been in a hurry to write it
because I don't think we can get it done in the 4.0 timeframe.)
"Whenever someone begins a question with 'why don't', the answer is
'money'."
I forgot who said this, although it sounds like Heinlein. But the
software development version is that whenever question begins "why
didn't you", the answer is "time."
(Unless you're doing enterprise development, in which case the answer
is one of standards, compliance, or scalability.)
This is a good idea. Someone, Adam or Sarah I think, realized that
always-on states were the same as mixins. We haven't used the
runtime version of this for performance reasons, and we haven't used
the compile-time version of this because there hasn't been time to
implement it, but please add the latter to the wishlist.
_______________________________________________
Laszlo-dev mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev