BindingUtils will automatically notify "this" object about Property change 
event.
Make sure xyz is bindable.


Example look below:

BindingUtils.bindProperty(textBox,"text",grpCbx.selectedItem,"value");
 Here my textBox ix TextInput control and grpCbx is Combo Box . I used this 
statement in creation complete
So whenever my combo box selected item changes , it automatically binds into 
the TextInput Control.

Let me know your view and also if possible paste some part of the code.

Thanks,

with Regards,
Jitendra Jain
Software Engineer
91-9979960798 



----- Original Message ----
From: Manu Dhanda <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Tuesday, 23 September, 2008 4:43:12 PM
Subject: Re: [flexcoders] [Bindable] is not getting updated...



Do I explicitly need to dispatch any event for BindUtils.bindPrope rty(..) to
happen ??

Cuz, I am not getting my "xyz" var changed with the change in someVar.

Note: I am putting this line of code
(BindingUtils. bindProperty( this,"xyz" ,MyModel. getInstance, "someVar" ) in
creationComplete( ).

Thanks,
Manu.

jitendra jain wrote:
> 
> sorry, use this
> BindingUtils. bindProperty( this,"xyz" ,MyModel. getInstance, "someVar" );
>  Thanks,
> 
> with Regards,
> Jitendra Jain
> Software Engineer
> 91-9979960798 
> 
> 
> 
> ----- Original Message ----
> From: jitendra jain <jitendra_jain_ [EMAIL PROTECTED] com>
> To: [EMAIL PROTECTED] ups.com
> Sent: Monday, 22 September, 2008 9:03:42 AM
> Subject: Re: [flexcoders] [Bindable] is not getting updated..
> 
> 
> Hi,
> 
> Instead of this use
> BindingUitls. bindProperty( this,"xyz" ,MyModel, getInstance( ).someVar) ;
> This statement is called in the creationComplete of the component.
> Cheers it will work..
>  Thanks,
> 
> with Regards,
> Jitendra Jain
> Software Engineer
> 91-9979960798 
> 
> 
> 
> ----- Original Message ----
> From: Manu Dhanda <manuraj.dhanda@ gmail.com>
> To: [EMAIL PROTECTED] ups..com
> Sent: Monday, 22 September, 2008 8:56:09 AM
> Subject: Re: [flexcoders] [Bindable] is not getting updated..
> 
> 
> 
> Josh,
> 
> Is it a right way to do the following:
> 
> [Bindable] private var xyz:String = MyModel.getInstance ().someVar; 
> 
> Now, if I use xyz in my code then it is not updated. Where as if i use
> 'MyModel.getInstanc e().someVar' then I am getting perfect result. 
> 
> For Ex:
> 
> <mx:Label text="{xyz}" /> // view not updated with changes in model.
> <mx:Label text="{MyModel. getInstance( ).someVar} "/> //view updated
> everytime
> with changes in model..
> 
> So, I didn't get the difference between two above logically.
> 
> Please explain the case as above. Thanks.
> 
> Josh McDonald-4 wrote:
>> 
>> I get what you're saying, but you're coming at it from the wrong angle is
>> all.
>> 
>> When you have this:
>> 
>> [Bindable]
>> public var myvar = someFunction( );
>> 
>> You're making it so that *other code* will be called when myvar changes.
>> You're also giving it the initial value of someFunction( ). It won't
>> "escape"
>> back into the code for someFunction( ) and alter it so it becomes
>> bindable.
>> We need to have a difference betwen "X = Y" and "create a binding from X
>> to
>> Y", otherwise the entire virtual machine would slow to a crawl.
>> 
>> If you want to create a binding from actionscript from
>> "sourceObject. someValue" to "myValue" you do this:
>> 
>> BindingUtils. bindProperty( this, "myValue", sourceObject, "someValue") ;
>> 
>> Then whenever sourceObject tells the word that "someValue" has been
>> updated
>> (with events), Flex will set the "myValue" field on your object.
>> 
>> -Josh
>> 
>> On Mon, Sep 22, 2008 at 1:07 PM, Manu Dhanda
>> <manuraj.dhanda@ gmail.com>wrote:
>> 
>>>
>>> Hi Paul,
>>>
>>> if [Bindable] works just for initialization, then I think it is loosing
>>> it's
>>> existence altogether.
>>>
>>> At least I think it this way.. that [Bindable] changes with every change
>>> that it is bind to. And not just it's initialization. .
>>>
>>> Waiting for expert comments..
>>>
>>> Thanks,
>>> Manu.
>>>
>>>
>>> Paul Andrews-4 wrote:
>>> >
>>> > ----- Original Message -----
>>> > From: "Manu Dhanda" <manuraj.dhanda@ gmail.com>
>>> > To: <flexcoders@ yahoogro ups.com>
>>> > Sent: Monday, September 22, 2008 3:08 AM
>>> > Subject: [flexcoders] [Bindable] is not getting updated..
>>> >
>>> >
>>> >>
>>> >> Hii Guyz,
>>> >>
>>> >> Although it's very strange (even for me), but this [Bindable] tag is
>>> not
>>> >> working for me.
>>> >>
>>> >> I am following the cairngorm structure and storing a variable in
>>> Model.
>>> >>
>>> >> Now, in one of my code file, if I 'll create a local bindable
>>> variable,
>>> >> that
>>> >> binds to model.. then it is not being updated with the changes in
>>> model.
>>> >>
>>> >> [Bindable] private var xyz:String = MyModel.getInstance ().someVar;
>>> >>
>>> >> Now, if I use xyz in my code then it is not updated. Where as if i
>>> use
>>> >> 'MyModel.getInstanc e().someVar' then I am getting perfect result.
>>> >>
>>> >> Any thoughts here...
>>> >
>>> > Yes, some thoughts.
>>> >
>>> > [Bindable] private var xyz:String = MyModel.getInstance ().someVar
>>> >
>>> > Means that xyz is bindable and is initialised with the value of
>>> > MyModel.getInstance ().someVar .
>>> >
>>> > It does not mean that xyz changes with the value of
>>> > MyModel.getInstance ().someVar .
>>> >
>>> > If you wish to have a binding in an mxml file to
>>> > MyModel.getInstance ()..someVar then use "{MyModel.getInstan
>>> ce().someVar
>>> > }",
>>> > alternatively in actionscript you'll have to specifically set up a
>>> binding
>>> > for it.
>>> >
>>> > Paul
>>> >
>>> >
>>> >
>>> >
>>> >>
>>> >> Regards,
>>> >> Manu.
>>> >> --
>>> >> View this message in context:
>>> >>
>>> http://www.nabble. com/-Bindable- -is-not-getting- updated..
>>> -tp19600797p1960 0797.html
>>> >> Sent from the FlexCoders mailing list archive at Nabble.com.
>>> >>
>>> >>
>>> >> ------------ --------- --------- ------
>>> >>
>>> >> --
>>> >> Flexcoders Mailing List
>>> >> FAQ: http://groups. yahoo.com/ group/flexcoders /files/flexcoder
>>> sFAQ.txt
>>> >> Alternative FAQ location:
>>> >>
>>> https://share. acrobat.com/ adc/document. do?docid= 942dbdc8- e469-446f-
>>> b4cf-1e62079f684 7
>>> >> Search Archives:
>>> >> http://www.mail- archive.com/ flexcoders% 40yahoogroups. comYahoo!
>>> Groups
>>> >> Links
>>> >>
>>> >>
>>> >>
>>> >>
>>> >
>>> >
>>> >
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble. com/-Bindable- -is-not-getting- updated..
>>> -tp19600797p1960 1220.html
>>> Sent from the FlexCoders mailing list archive at Nabble.com.
>>>
>>>
>>> ------------ --------- --------- ------
>>>
>>> --
>>> Flexcoders Mailing List
>>> FAQ: http://groups. yahoo.com/ group/flexcoders /files/flexcoder
>>> sFAQ.txt
>>> Alternative FAQ location:
>>> https://share. acrobat.com/ adc/document. do?docid= 942dbdc8- e469-446f-
>>> b4cf-1e62079f684 7
>>> 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."
>> 
>> http://flex. joshmcdonald. info/
>> 
>> :: Josh 'G-Funk' McDonald
>> :: 0437 221 380 :: [EMAIL PROTECTED] com
>> 
>> 
> 
> -- 
> View this message in context: http://www.nabble. com/-Bindable-
> -is-not-getting- updated.. -tp19600797p1960 1339.html
> Sent from the FlexCoders mailing list archive at Nabble.com.
> 
> 
> ____________ _________ _________ __
> Unlimited freedom, unlimited storage. Get it now 
> 
> 
> Unlimited freedom, unlimited storage. Get it now, on
> http://help. yahoo.com/ l/in/yahoo/ mail/yahoomail/ tools/tools- 08.html/
> 

-- 
View this message in context: http://www.nabble. com/-Bindable- 
-is-not-getting- updated.. -tp19600797p1962 5519.html
Sent from the FlexCoders mailing list archive at Nabble.com.

 


      Did you know? You can CHAT without downloading messenger. Go to 
http://in.webmessenger.yahoo.com/

Reply via email to