[flexcoders] Re: BindSetter?

2006-12-19 Thread maikelsibbald
Binding 101 can be found here:
http://labs.flexcoders.nl/?p=24

--- In flexcoders@yahoogroups.com, Steve Hindle [EMAIL PROTECTED] wrote:

 Thank You Lachlan!!!
 
 I can't believe this isn't documented somewhere.
 Seems like a pretty basic thing.
 
 Anyway, glad to know I'm not going crazy..
 
 
 
 On 12/5/06, Lachlan Cotter [EMAIL PROTECTED] wrote:
 
I think you're right Steve. I have asked myself the same
question in the
  past and ended up using bindProperty… When you say *function set
():void*or function
  *get ():Something *you're really telling the method to masquerade as a
  property, so it makes sense that you can treat it as such. I have
used *
  BindingUtils.bindProperty* to bind a setter method and it seems to
work.
 
  Cheers,
  Lach
 
 
  On 04/12/2006, at 4:31 PM, Steve Hindle wrote:
 
  Sorry for reply to myself - but this is driving me _nuts_! I can't
  find an example of bindSetter with a 'real' accessor function with
  either yahoo or google. And the example on the 'bindUtils' page at
  adobe.com (stuck in the comments at the bottom) - doesn't bind to a
  'function set blah'... (isn't that the _required_ to consider a
  funciton/method a 'setter' ??) It just binds to a 'normal' function.
 
  Anyway, I'm starting to think that 'bindSetter' is really a poorly
  named 'bindFunction' and that _all_ properties - var OR accessor based
  should be using bindProperty.
 
  Can someone confirm/refute this and save my sanity please!
 
  Thanks
 
 
   
 





RE: [flexcoders] Re: BindSetter?

2006-12-19 Thread Stephen Gilson
Just a note, we added several examples on bindSetter() to the docs for
the 2.0.1 release.
 
Stephen



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of maikelsibbald
Sent: Tuesday, December 19, 2006 12:57 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: BindSetter?



Binding 101 can be found here:
http://labs.flexcoders.nl/?p=24 http://labs.flexcoders.nl/?p=24 

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Steve Hindle [EMAIL PROTECTED] wrote:

 Thank You Lachlan!!!
 
 I can't believe this isn't documented somewhere.
 Seems like a pretty basic thing.
 
 Anyway, glad to know I'm not going crazy..
 
 
 
 On 12/5/06, Lachlan Cotter [EMAIL PROTECTED] wrote:
 
  I think you're right Steve. I have asked myself the same
question in the
  past and ended up using bindProperty... When you say *function set
():void*or function
  *get ():Something *you're really telling the method to masquerade as
a
  property, so it makes sense that you can treat it as such. I have
used *
  BindingUtils.bindProperty* to bind a setter method and it seems to
work.
 
  Cheers,
  Lach
 
 
  On 04/12/2006, at 4:31 PM, Steve Hindle wrote:
 
  Sorry for reply to myself - but this is driving me _nuts_! I can't
  find an example of bindSetter with a 'real' accessor function with
  either yahoo or google. And the example on the 'bindUtils' page at
  adobe.com (stuck in the comments at the bottom) - doesn't bind to a
  'function set blah'... (isn't that the _required_ to consider a
  funciton/method a 'setter' ??) It just binds to a 'normal' function.
 
  Anyway, I'm starting to think that 'bindSetter' is really a poorly
  named 'bindFunction' and that _all_ properties - var OR accessor
based
  should be using bindProperty.
 
  Can someone confirm/refute this and save my sanity please!
 
  Thanks
 
 
  
 




 


Re: [flexcoders] Re: BindSetter?

2006-12-06 Thread Steve Hindle

Thank You Lachlan!!!

I can't believe this isn't documented somewhere.
Seems like a pretty basic thing.

Anyway, glad to know I'm not going crazy..



On 12/5/06, Lachlan Cotter [EMAIL PROTECTED] wrote:


  I think you're right Steve. I have asked myself the same question in the
past and ended up using bindProperty… When you say *function set ():void*or 
function
*get ():Something *you're really telling the method to masquerade as a
property, so it makes sense that you can treat it as such. I have used *
BindingUtils.bindProperty* to bind a setter method and it seems to work.

Cheers,
Lach


On 04/12/2006, at 4:31 PM, Steve Hindle wrote:

Sorry for reply to myself - but this is driving me _nuts_! I can't
find an example of bindSetter with a 'real' accessor function with
either yahoo or google. And the example on the 'bindUtils' page at
adobe.com (stuck in the comments at the bottom) - doesn't bind to a
'function set blah'... (isn't that the _required_ to consider a
funciton/method a 'setter' ??) It just binds to a 'normal' function.

Anyway, I'm starting to think that 'bindSetter' is really a poorly
named 'bindFunction' and that _all_ properties - var OR accessor based
should be using bindProperty.

Can someone confirm/refute this and save my sanity please!

Thanks


 



Re: [flexcoders] Re: BindSetter?

2006-12-05 Thread Lachlan Cotter
I think you're right Steve. I have asked myself the same question in  
the past and ended up using bindProperty… When you say function set  
():void or function get ():Something you're really telling the method  
to masquerade as a property, so it makes sense that you can treat it  
as such. I have used BindingUtils.bindProperty to bind a setter  
method and it seems to work.


Cheers,
Lach


On 04/12/2006, at 4:31 PM, Steve Hindle wrote:


Sorry for reply to myself - but this is driving me _nuts_! I can't
find an example of bindSetter with a 'real' accessor function with
either yahoo or google. And the example on the 'bindUtils' page at
adobe.com (stuck in the comments at the bottom) - doesn't bind to a
'function set blah'... (isn't that the _required_ to consider a
funciton/method a 'setter' ??) It just binds to a 'normal' function.

Anyway, I'm starting to think that 'bindSetter' is really a poorly
named 'bindFunction' and that _all_ properties - var OR accessor based
should be using bindProperty.

Can someone confirm/refute this and save my sanity please!

Thanks




[flexcoders] Re: BindSetter?

2006-12-03 Thread Steve Hindle
Sorry for reply to myself - but this is driving me _nuts_!  I can't
find an example of bindSetter with a 'real' accessor function with
either yahoo or google.  And the example on the 'bindUtils' page at
adobe.com (stuck in the comments at the bottom) - doesn't bind to a
'function set blah'... (isn't that the _required_ to consider a
funciton/method a 'setter' ??)  It just binds to a 'normal' function.

Anyway, I'm starting to think that 'bindSetter' is really a poorly
named 'bindFunction' and that _all_ properties - var OR accessor based
should be using bindProperty.

Can someone confirm/refute this and save my sanity please!

Thanks

On 12/3/06, Steve Hindle [EMAIL PROTECTED] wrote:
 I've got to be missing something silly here:

  _model:Model;

 BindSetter(_model.title,...   ? String to Function coercion error
 BindSetter(_model.title()...  ? Inaccessible method title error

 I thought about _model.title as Function - but that seems like it
 would interpret the title string as a function name ?  So what is the
 right syntax for this?

 I also noticed the same problem with setters defined in the same AS
 file - I get a 'blah to Function coercion error' ??

 TIA!