So, is there any interest in this? It seems that at least several
people do think that there should be some kind of a solution to the
parent.parent.parent approach. Should I just post this code on my
blog with some examples and leave it be or would it be suitable for
the incubator?
On 18 Oct 2006, at 11:46, Geert Bevin wrote:
Hi everyone,
I've been doing a lot of OpenLaszlo work in the past months and one
of the main problems I found was the coupled nature of clearly
independent classes that still rely on each-other for global
functionalities. For example, you might have a control strip with
buttons that operate on views that are displayed in a central area.
Each of these items can be developed as individual classes that
have a well defined set of API methods. A user of these classes
will then compose these classes on a canvas and needs to wire them
up so that they are aware of each other. I found that it was much
easier to rely on the hierarchical nature of an OpenLaszlo layout
and to detect the relationships automatically instead of having to
refer to them specifically. This allows the code to be maintained
much more easily since the relationships will not break if
additional levels are added for layout purposes, for examples.
I developed a simple reference injection mechanism for this and
attached it as a zip archive to this post. It contains both the
'injmanaged' class and a test case.
Would something like this be a worthwhile contribution to
OpenLaszlo itself?
Can it be improved upon? Currently I rely on a prefix of the
attributes to check if they are illegible for receiving the
injected instances. I'd however much rather have a dedicated
attribute type for this or something else that clearly identifies
this functionality instead of relying on a hackish thing like a
prefix. Any thoughts about that?
Best regards,
Geert
<injmanagement.zip>
--
Geert Bevin
Uwyn "Use what you need" - http://uwyn.com
RIFE Java application framework - http://rifers.org
Music and words - http://gbevin.com
--
Geert Bevin
Uwyn "Use what you need" - http://uwyn.com
RIFE Java application framework - http://rifers.org
Music and words - http://gbevin.com