Very cool. Ok mind stretch for an OO guy. Mixins are interesting. It will take a bit to get used to it. Thanks to Abdul for a good blog on the topic and a pointer to the Flex 1.0 doc that has a discussion of mixins. Please bring it back in the doc if it is going to be used in the future.
Thanks,
-Kent
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Matt Chotin
Sent: Thursday, June 23, 2005 4:12 PM
To: [email protected]
Subject: RE: [flexcoders] Cairngorm, ValueObjects, and inheritance
Scenario A sounds fine. Here's a thread on making your faceless objects
event dispatchers:
http://www.mail-archive.com/[email protected]/msg06404.html
Matt
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Kent Henneuse
Sent: Thursday, June 23, 2005 4:04 PM
To: [email protected]
Subject: [flexcoders] Cairngorm, ValueObjects, and inheritance
I have a situation where I would like to eventually use either
inheritance
or composition to put my objects together. Properties of the
ValueObject
are bound dynamically to the UI.
Scenario A:
I could have ObjA_VO and ObjB_VO that extends ObjA_VO. Works great on
the
server side. On the Flash side I get the following warning "Changes for
dynamic property, YYY, with no declared [ChangeEvent] will not be
detected."
I can add the ChangeEvent as described on pg 389 but I can't call
dispatchEvent() because ValueObjects do not extend UIObject. Probably
shouldn't anyway.
Scenario B:
I could have ObjA_VO and ObjB_VO but have ObjB_VO own a reference to
ObjA_VO. (composition instead of inheritance). I then have functions to
return the values. I end up with the same warning message as in
Scenario A
which is to be expected based on the explanation in the side bar at the
bottom of pg 388.
Now a way that does work but seems be a bit of a hack and breaks OOP is
to
just have ObjA_VO and ObjB_VO. No inheritance or composition. This
will
work for some objects I have but I already have a situation where this
would
be a large amount of code copying. aka ClipBoard Inheritance. Yuck!
So how do I build a structure that can do this? Can I get a handle to
the
event dispatcher and fire the event so that data binding changes
correctly?
Thoughts?
Seems like it would be a pretty common problem. I am not even sure what
will happen with the Flex Gateway on the server side with inheritance or
object composition.
Thanks,
-Kent
I used to work in a fire hydrant factory. You couldn't park anywhere
near
the place.
- Steven Wright
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
smime.p7s
Description: S/MIME cryptographic signature

