hi , I have a flex application with one component . in that component I have 
defined a variable named "correctUsername" . after I click a button in the 
component I give a value to the correctUsername variable . and I want to have 
that value in my main application . but seems I can't do it in a way I'm doing 
it . the code is as below :
my component is named "signIn"
-------------------------
.....
<!-- signIn component -->
<fx:script>
   public var correctUsername:String;
   .....
   public function submitLogin():void{
      correctUsername = "ok";
   }
   ...
</fx:script>
.....
<s:Button label="myBtn" click="submitLogin()"/>
---------------------------
---------------------------
my main application:
....
<!-- my main application -->
<fx:script>
   public var testSign:signIn;
   public funtion btnClick():void{
      testSign = new signIn();
      testInput.text = testSign.correctUsername;
   }
</fx:script>
....
<components:signIn id="myComponent"/>
<s:TextInput id="testInput"/>
<s:Button label="btn" click="btnClick()"/>

------------------------------------------
------------------------------------------

anyone knows where the problem is? the thing that has mixed me up is that if I 
give the value of correctUsername variable in my component outside of any 
funtions it works fine and my main application shows the value correctly , but 
if I give it value inside any functions the main application doesn't show the 
value . 
I'll be appreciated if you can help me with this . 


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: http://www.houseoffusion.com/groups/flex/message.cfm/messageid:6536
Subscription: http://www.houseoffusion.com/groups/flex/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/flex/unsubscribe.cfm

Reply via email to