[osflash] Value Objects, ModelLocator and property bindings in ARP/ARPX
xxx at nyls.demon.nl
Tue Apr 18 07:39:50 EDT 2006
Maybe you could take the command to fill a model and let different views
listen to changes to a model..(the MVC approach) The arpx modellocator from
christophe has a on change event fired when the value of a model changes ..
Or use the arpx extensions from Grant. In the command fill the ML and let
your command dispatch events (through the systemcontroller) You could let
views listen to the systemcontroller for events.. ?
just a few thought..
Van: osflash-bounces at osflash.org [mailto:osflash-bounces at osflash.org] Namens
Marcelo de Moraes Serpa
Verzonden: dinsdag 18 april 2006 13:22
Aan: Open Source Flash Mailing List
Onderwerp: Re: [osflash] Value Objects,ModelLocator and property bindings in
Thank you very much for helping! I will look into that.
For the ModelLocator issue, Maybe I will use the classic viewRef approach
and regarding this, I´ve got one question:
- How could I implement a command in such a way that it could be used by
more than one form? I´ve saw some examples of commands and they typecast
viewref to the class of the form using that... should I use some control
structure to handle that?
Or maybe I will try your ModelLocator (found at ARP repository).. I just
want to store the ValueObjects somewhere and so I´m able to decouple the
commands from the views (so it could be easily reused by many views without
headaches) ... could you point me to any example of this?
On 4/18/06, Aral Balkan <aral at ariaware.com> wrote:
> as I mostly return recordsets from the server (I use AMFPHP), I often
> typecast the ResultEvent.result to RecordSet (as its often contains an
> array) - where would be the best place to typecast the objects to its
> corresponding Value Object?
You shouldn't have to do any data massaging if you use the latest
Amfphp. It now supports Value Objects (VOs) in a very simple manner
(just specify the folder containing your VOs and it will take care of
the rest.) The Arp SVN tree has an example with the pre-release version
of Amfphp that demonstrates this also but the actual method has changed
in the final release so make sure you read the docs on that.
> I want to store these objects in the ModelLocator, until here, nice, I
> just have to use setModel(), but what about the bindings - what if I
> would need to bind only an Array´s (Recordset stored in the
> ModelLocator) object´s property (such as UserName) to a textfield.text
> property? I could not find a way...
I'll let Christophe handle that one as I haven't had a chance to use his
osflash mailing list
osflash at osflash.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the osflash