--- In [EMAIL PROTECTED]ups.com,
"Tracy Spratt"
<[EMAIL PROTECTED]> wrote:
>
> That component architecture is fine.
>
Hi!
> Do you have the {Bindable] metadata tag over the selecteIndex variable
> in file2?
Yes I have. I don't think the problem is in binding. Because my
variable is always sent (I've double checked). I think the main
problem lies in creationComplete event. This event is only triggered
once. I'm positive in this. Why? Because I also tried creating a
simple function with Alert box inside it and it was also displayed
only once. And that occured when the window was for the first time
viewed.
Please help me out, because I really have no idea how to solve this
problem.
>
>
> If this works the first time, but not subsequently, that sounds to me
> like binding is not set up properly. You do not say how you are passing
> the selectedIndex value you want into the File2 component. Are you
> binding?
>
>
>
> Do you have the {Bindable] metadata tag over the selecteIndex variable
> in file2?
>
> {Bindable]
>
> Public var iSelectedIndex:int;
>
>
>
> Are you passing a binding expressing into File2?
>
> <myFile2 iSelectedIndex="{iSelectedIndex}" .../>
>
> And does iSelectedIndex in File1 have the {Bindable] tag?
>
>
>
> You should perhaps bind the File2 viewstack's property to the variable:
>
> <mx:ViewStack selectedIndex="{iSelectedIndex}".../>
>
>
>
> Or are you passing in the value by directly referencing the File2
> viwestack selectedIndex property?
>
>
>
> Tracy
>
>
>
>
>
> ________________________________
>
> From: [EMAIL PROTECTED]ups.com
[mailto:[EMAIL PROTECTED]ups.com]
On
> Behalf Of arnold_charming
> Sent: Friday, August 11, 2006 11:11 AM
> To: [EMAIL PROTECTED]ups.com
> Subject: [flexcoders] window and firering functions
>
>
>
> Hi!
>
> I'm stuck :(
> I have a file called File.mxml which has inside a custom component
> based on a <mx:Panel> called File2.mxml. Inside this new component,
> File2.mxml, I have a viewstack with 4 views. Every single view is in
> its' own custom component. Something like this:
>
> File2.mxml
> ----
> <mx:ViewStack id="myViews" width="100%"
height="100%">
> <mx:Panel id="knjigaScreen" width="100%"
height="100%">
> <view:DodajTehSpec_Knjiga />
> </mx:Panel>
> <mx:Panel title="" id="tiskovinaScreen"
width="100%" height="100%">
> <view:DodajTehSpec_Tiskovina />
> </mx:Panel>
> <mx:Panel width="100%" height="100%"
id="dodatekScreen" title="">
> <view:DodajTehSpec_Dodatek />
> </mx:Panel>
> <mx:Panel width="100%" height="100%"
id="skatlaScreen" title="">
> <view:DodajTehSpec_Skatla />
> </mx:Panel>
> <mx:Panel width="100%" height="100%"
id="raznoScreen" title="">
> <view:DodajTehSpec_Razno width="100%" height="100%"
"/>
> </mx:Panel>
> <mx:Panel width="100%" height="100%"
id="zgoscenkaScreen" title="">
> <view:DodajTehSpec_Zgoscenka width="100%"
height="100%""/>
> </mx:Panel>
> </mx:ViewStack>
>
> But the problem arises when I want to change from one view to another.
> From File1.mxml to File2.mxml I'm passing a variable called 'myVar'
> which tells' File2.mxml which view should be shown. But to my luck :(
> this only works the first time (when this File2.mxml is generated -
> creationComplete event). I tried with shown, hide nearlly everything
> but nothing works.
> Please tell me what should I do so this will work as it should. Thank
> you.
>