Hi!

i've made it work :)
I think the problem was in the way how I changed views in viewstack.
Now I change the view and make the component invisible. Because of
that, now every time I make my component visible, a visible event is
fired. And in that visible event I can change my views. 
Thanks for help me out.

--- In [email protected], "Tracy Spratt" <[EMAIL PROTECTED]> wrote:
>
> Yes, creationComplete only fires when the component's creation is
> complete which only happens once. This is by design.
> 
>  
> 
> But you still haven't said how you are passing in your data.  From what
> you say it sounds like you are not binding.  Bindings are independent of
> events like creationComplete (they use their own internal event
> structure).
> 
>  
> 
> If you have the binding set up correctly, it will just work.
> 
>  
> 
> It sounds like you are doing something specific in the creationComplete
> event. I need some more detail.
> 
>  
> 
> Tracy
> 
>  
> 
>  
> 
> ________________________________
> 
> From: [email protected] [mailto:[EMAIL PROTECTED] On
> Behalf Of arnold_charming
> Sent: Friday, August 11, 2006 3:20 PM
> To: [email protected]
> Subject: [flexcoders] Re: window and firering functions
> 
>  
> 
> --- In [email protected] <mailto:flexcoders%40yahoogroups.com>
> , "Tracy Spratt" <tspratt@> 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] <mailto:flexcoders%40yahoogroups.com>
> [mailto:[email protected] <mailto:flexcoders%40yahoogroups.com>
> ] On
> > Behalf Of arnold_charming
> > Sent: Friday, August 11, 2006 11:11 AM
> > To: [email protected] <mailto:flexcoders%40yahoogroups.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.
> >
>







--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to