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 flexcoders@yahoogroups.com, Josh McDonald [EMAIL PROTECTED] wrote:
Nope. [Bindable] on a class doesn't wrap the class,
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 [EMAIL PROTECTED]wrote:
Ah ok..
I had thought the compiler
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 [EMAIL PROTECTED] wrote:
What it does is renames
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
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
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
On 03/09/2008, at 9:30 PM, 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,
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
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,
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 flexcoders@yahoogroups.com, Johannes Nel [EMAIL PROTECTED]
wrote:
I'm fairly certain you do need
Mike Labriola did a very good in depth presentation on how binding
works at 360 Flex which was recorded and is available online. It runs
about an hour and 20 minutes and is well worth the time if you want to
understand how bindings work.
Diving in the Data Binding Waters with Michael Labriola
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
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
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
Right, now I see what you're saying. I thought you were saying that Flex
will do what it normally does, only using your custom event instead of
propertychange :)
On Thu, Sep 4, 2008 at 2:22 AM, Johannes Nel [EMAIL PROTECTED] wrote:
no you need to dispatch the event yourself. as i said in some
15 matches
Mail list logo