Re: [flexcoders] Re: Modify binding event

2010-06-10 Thread Technusiast
I believe you can listen for the change event dispatched by the associated 
textinput as the user edits.  This event should fire for each keystroke applied 
to the textinput that changes its value.  Assuming that the textinput value is 
valid, you can then make changes to the model.




From: rinogo2 warpr...@warproof.com
To: flexcoders@yahoogroups.com
Sent: Wednesday, June 9, 2010 17:10:44
Subject: [flexcoders] Re: Modify binding event

  
Update:

Clicking on the buttons yields the correct behavior.  The model is updated as 
expected, even if the button is held down.  (The model updates every time the 
value 'steps' higher or lower).

The functionality that isn't quite what I desire is when the user clicks in the 
associated text input box and types in a value.  The model is only updated once 
the value is committed (e.g. enter is pressed or the stepper loses focus).  
However, I'd like the model to be updated on every keypress.  Thoughts?

Thanks,
-Rich

--- In flexcoders@yahoogroups.com, rinogo2 warpr...@... wrote:

 Hello, all!
 
 I have a NumericStepper bound to my data model.  I'd like the model to be 
 updated *while* NumericStepper changes (e.g. while the user clicks and holds 
 the 'up' button) instead of only making the change once the stepper loses 
 focus.
 
 I have a feeling this requires some use of the following format:
 
 [Bindable(event=myCustomEvent)]
 
 My best guess is that I need to write listeners for the 
 mousedown/mouseup/keydown/keyup events to detect when the user is making 
 changes to the stepper.  These listeners will dispatch 'myCustomEvent' which 
 will cause the data model to be updated.  Is this the right approach?
 
 Thanks! :)
 -Rich



 



[flexcoders] Re: Modify binding event

2010-06-09 Thread rinogo2
Update:

Clicking on the buttons yields the correct behavior.  The model is updated as 
expected, even if the button is held down.  (The model updates every time the 
value 'steps' higher or lower).

The functionality that isn't quite what I desire is when the user clicks in the 
associated text input box and types in a value.  The model is only updated once 
the value is committed (e.g. enter is pressed or the stepper loses focus).  
However, I'd like the model to be updated on every keypress.  Thoughts?

Thanks,
-Rich

--- In flexcoders@yahoogroups.com, rinogo2 warpr...@... wrote:

 Hello, all!
 
 I have a NumericStepper bound to my data model.  I'd like the model to be 
 updated *while* NumericStepper changes (e.g. while the user clicks and holds 
 the 'up' button) instead of only making the change once the stepper loses 
 focus.
 
 I have a feeling this requires some use of the following format:
 
 [Bindable(event=myCustomEvent)]
 
 My best guess is that I need to write listeners for the 
 mousedown/mouseup/keydown/keyup events to detect when the user is making 
 changes to the stepper.  These listeners will dispatch 'myCustomEvent' which 
 will cause the data model to be updated.  Is this the right approach?
 
 Thanks! :)
 -Rich