>>variables but thats not the typical case and not really
viable if we are talking about a class that maybe in a collection
and/or bound to UI input controls
here i disagree. with complex views, charts and that kind of loving its best
to invalidate in bunches.

thats a good preso, understanding the changewatcher and binding utils is
necesary to build data centric applications.

On Wed, Sep 3, 2008 at 7:16 PM, reflexactions <[EMAIL PROTECTED]>wrote:

>   Of course if you have got some external routine that updates a bunch
> of props all in one go and then creates and dispatches the event the
> you can use variables but thats not the typical case and not really
> viable if we are talking about a class that maybe in a collection
> and/or bound to UI input controls or the DataGrid and it is getting
> updated one property at a time dependent on what the user is doing.
> Anyway thanks for ur viewpoint, I followed JM advise and its doing
> what I need to do for now, so I am happy lol.
>
> tks
>
> --- In [email protected] <flexcoders%40yahoogroups.com>,
> "Johannes Nel" <[EMAIL PROTECTED]>
> wrote:
> >
> > no you need to dispatch the event yourself. as i said in some cases
> a
> > get/set pair is needed, but not always. my strategy is to have
> multiple
> > events that updates multple properties dependent on which group
> changed.
> >
> > On Wed, Sep 3, 2008 at 4:15 PM, reflexactions
> <[EMAIL PROTECTED]>wrote:
> >
> > > Yeah but if u dont have a get/set how do you know the property
> > > changed and who will fires the event, or are you saying that Flex
> > > automatically creates and dispatches the event for you?
> > >
> > > tks
> > > --- In [email protected] 
> > > <flexcoders%40yahoogroups.com><flexcoders%
> 40yahoogroups.com>,
> > > "Johannes Nel" <johannes.nel@>
> > > wrote:
> > > >
> > >
> > > > >>I'm fairly certain you do need get/set functions to use custom
> > > events.
> > > > actually not.
> > > >
> > > > [Bindable("event")]
> > > > public var lala:Type;
> > > >
> > > > and an ad hoc event being dispatched works well. if the
> property is
> > > > being set on your model and you wish to dispatch a custom event,
> > > > creating a setter is the way to do it, but managing
> invalidations
> > > > based on logic and dispatching events can allow you to manage
> > > > multiple properties in batch schemas. remember that you can also
> > > have
> > > >
> > > > [Bindable("event2")]
> > > > [Bindable("event1")]
> > > > [Bindable("event")]
> > > > public var lala:Type;
> > > >
> > > > as for generators, i used to use python, these days i use JET
> which
> > > is
> > > > native to eclipse.
> > > > I would also recomend having a look at the eclipse modeling
> > > framework,
> > > > GEF, GMF and such things if you like code generation.
> > > >
> > > > On 9/3/08, Josh McDonald <dznuts@> wrote:
> > > > > I'm fairly certain you do need get/set functions to use custom
> > > events. It
> > > > > might be a pain, but unfortunately it's when you have objects
> > > with many
> > > > > bindable fields that you're more likely to need the custom
> events
> > > (otherwise
> > > > > binding becomes very cpu-intensive).
> > > > >
> > > > > -Josh
> > > > >
> > > > > On Wed, Sep 3, 2008 at 9:30 PM, Johannes Nel <johannes.nel@>
> > > wrote:
> > > > >
> > > > >> it does depend on the scale of your application. first off,
> to
> > > use custom
> > > > >> events you do not need getters and setters, but it does
> depend
> > > on how you
> > > > >> want to use it. my personal feeling around models are that
> they
> > > should
> > > > >> always be generated, its such a waste of time to code 'em by
> > > hand.
> > > > >>
> > > > >>
> > > > >> On Wed, Sep 3, 2008 at 1:28 PM, reflexactions
> > > > >> <reflexactions@>wrote:
> > >
> > > > >>
> > > > >>> But then you have to write all the event creation and
> > > dispatch, plus
> > > > >>> all the getter/setter.
> > > > >>>
> > > > >>> That might be fair enough if you have a handful of props
> but if
> > > this
> > > > >>> is a couple of data classes with says 100 props each thats
> > > quite a
> > > > >>> bit of typing when all you want is a couple of props not to
> fire
> > > > >>> events when they change... unless there is a tool to
> generate
> > > the
> > > > >>> code from a list of variables.
> > > > >>>
> > > > >>> Personally in some cases I use custom events and others I
> am ok
> > > with
> > > > >>> the default handling, depends on what I am doing as to
> which is
> > > more
> > > > >>> suited to the situation.
> > > > >>>
> > > > >>> --- In [email protected] 
> > > > >>> <flexcoders%40yahoogroups.com><flexcoders%
> 40yahoogroups.com><flexcoders%
>
> > > 40yahoogroups.com>,
> > > > >>> "Johannes Nel" <johannes.nel@>
> > > > >>> wrote:
> > > > >>>
> > > > >>> >
> > > > >>> > using custom events with your bindable metadata is not
> only
> > > best
> > > > >>> practice
> > > > >>> > but allows you to decide which properties you want to
> refresh.
> > > > >>> > [Bindable("myEvent")]
> > > > >>> > i would recomend using this at all times.
> > > > >>> >
> > > > >>> > On Wed, Sep 3, 2008 at 1:04 PM, Josh McDonald <dznuts@>
> wrote:
> > > > >>> >
> > > > >>> > > What it does is renames your variables, and creates
> get/set
> > > > >>> methods, but
> > > > >>> > > it doesn't wrap the whole class.
> > > > >>> > >
> > > > >>> > > So unfortunately it's either all-or-none with the class-
> > > level
> > > > >>> [Bindable]
> > > > >>> > >
> > > > >>> > > -Josh
> > > > >>> > >
> > > > >>> > > On Wed, Sep 3, 2008 at 9:01 PM, reflexactions
> > > > >>> <reflexactions@>wrote:
> > > > >>>
> > > > >>> > >
> > > > >>> > >> Ah ok..
> > > > >>> > >> I had thought the compiler generated a wrapper or sub
> class
> > > > >>> behind
> > > > >>> > >> the scenes when you used the bindable tag...
> > > > >>> > >>
> > > > >>> > >> Well ok learn something new eahc day...
> > > > >>> > >> tks
> > > > >>> > >>
> > > > >>> > >> --- In [email protected]<flexcoders%40yahoogroups.com>
> <flexcoders%
> 40yahoogroups.com><flexcoders%
>
> > > 40yahoogroups.com>,
> > > > >>> "Josh McDonald" <dznuts@>
> > > > >>> wrote:
> > > > >>> > >> >
> > > > >>> > >> > Nope. [Bindable] on a class doesn't wrap the class,
> it's
> > > just
> > > > >>> > >> exactly the
> > > > >>> > >> > same as putting [Bindable] on every public field.
> > > > >>> > >> >
> > > > >>> > >> > -Josh
> > > > >>> > >> >
> > > > >>> > >> > On Wed, Sep 3, 2008 at 8:45 PM, reflexactions
> > > > >>> > >> <reflexactions@>wrote:
> > > > >>> > >> >
> > > > >>> > >> > > If I add the Bindable tag at a class level every
> > > property is
> > > > >>> > >> wrapped in
> > > > >>> > >> > > by a sort of proxy that then raises PropertyChange
> > > events as
> > > > >>> > >> > > appropriate.
> > > > >>> > >> > >
> > > > >>> > >> > > This certainly saves a lot of time instead of
> having
> > > to go
> > > > >>> > >> through a
> > > > >>> > >> > > class and add Bindable to every single property.
> > > > >>> > >> > >
> > > > >>> > >> > > But...
> > > > >>> > >> > > What if there is one property that I dont want to
> be
> > > > >>> Bindable and
> > > > >>> > >> more
> > > > >>> > >> > > importantly I dont want it to raise PropertyChange
> > > events.
> > > > >>> > >> > >
> > > > >>> > >> > > Is there same NonBindable tag to achieve this???
> > > > >>> > >> > >
> > > > >>> > >> > > tks
> > > > >>> > >> > >
> > > > >>> > >> > >
> > > > >>> > >> > > ------------------------------------
> > > > >>> > >> > >
> > > > >>> > >> > > --
> > > > >>> > >> > > Flexcoders Mailing List
> > > > >>> > >> > > FAQ:
> > > > >>> > >>
> > > http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > > > >>> > >> > > Search Archives:
> > > > >>> > >> > > http://www.mail-archive.com/flexcoders%
> > > > >>> 40yahoogroups.comYahoo!
> > > > >>> > >> Groups
> > > > >>> > >> > > Links
> > > > >>> > >> > >
> > > > >>> > >> > >
> > > > >>> > >> > >
> > > > >>> > >> > >
> > > > >>> > >> >
> > > > >>> > >> >
> > > > >>> > >> > --
> > > > >>> > >> > "Therefore, send not to know For whom the bell
> tolls. It
> > > tolls
> > > > >>> for
> > > > >>> > >> thee."
> > > > >>> > >> >
> > > > >>> > >> > :: Josh 'G-Funk' McDonald
> > > > >>> > >> > :: 0437 221 380 :: josh@
> > > > >>> > >> >
> > > > >>> > >>
> > > > >>> > >>
> > > > >>> > >>
> > > > >>> > >> ------------------------------------
> > > > >>> > >>
> > > > >>> > >> --
> > > > >>> > >> Flexcoders Mailing List
> > > > >>> > >> FAQ:
> > > > >>>
> http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > > > >>> > >> Search Archives:
> > > > >>> > >> http://www.mail-archive.com/flexcoders%
> > > 40yahoogroups.comYahoo!
> > > > >>> Groups
> > > > >>> > >> Links
> > > > >>> > >>
> > > > >>> > >>
> > > > >>> > >>
> > > > >>> > >>
> > > > >>> > >
> > > > >>> > >
> > > > >>> > > --
> > > > >>> > > "Therefore, send not to know For whom the bell tolls. It
> > > tolls
> > > > >>> for thee."
> > > > >>> > >
> > > > >>> > > :: Josh 'G-Funk' McDonald
> > > > >>> > > :: 0437 221 380 :: josh@
> > > > >>> > >
> > > > >>> > >
> > > > >>> > >
> > > > >>> >
> > > > >>> >
> > > > >>> >
> > > > >>> > --
> > > > >>> > j:pn
> > > > >>> > \\no comment
> > > > >>> >
> > > > >>>
> > > > >>>
> > > > >>
> > > > >>
> > > > >> --
> > > > >> j:pn
> > > > >> \\no comment
> > > > >>
> > > > >>
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > "Therefore, send not to know For whom the bell tolls. It tolls
> > > for thee."
> > > > >
> > > > > :: Josh 'G-Funk' McDonald
> > > > > :: 0437 221 380 :: josh@
> > > > >
> > > >
> > > >
> > > > --
> > > > j:pn
> > > > \\no comment
> > > >
> > >
> > >
> > >
> >
> >
> >
> > --
> > j:pn
> > \\no comment
> >
>
>  
>



-- 
j:pn
\\no comment

Reply via email to