[flexcoders] (unknown)

2007-11-27 Thread Almog K
Transition won't affect a component with children...:|

Hello all, I had a problem with transitions which I isolated into a very simple 
case:
I have a VBox with a text label and a button.
When user clicks the button, the current state changes into a new state in 
which new component is added to my VBox which I expect to grow smoothly.
This new component is just a canvas with a label.

The child canvas is added but it appears without a transition.
This is when the component is defined in a separate mxml file, BUT, if I define 
the exact same component, inline in the state definition, it works just as I 
expeted. I then went to the component mxml and deleted the label leaving it to 
be a simple canvas and it works. it seems that whatever is added to the 
component when it's defined in a separate file will disable the transition.

This is the main mxml:

?xml version=1.0 encoding=utf-8?


mx:states
mx:State name=myState
mx:AddChild relativeTo={container}
!--
mx:Canvas backgroundColor=0x678080
mx:Label text=I'm the new component, did I came in 
smoothly ? /
/mx:Canvas 
--
local:MyComp /
/mx:AddChild
/mx:State
/mx:states

mx:transitions
mx:Transition fromState=* toState=*
mx:Sequence target={container}
mx:Resize /
/mx:Sequence
/mx:Transition
/mx:transitions

mx:VBox id=container backgroundColor=0xFF
mx:Label text=Some text goes here /
mx:Button label=click me to add new component click=currentState = 
'myState' /
/mx:VBox

/mx:Application


And this is the very-simple component:

?xml version=1.0 encoding=utf-8?

mx:Label text=I'm the new component, did I came in smoothly ? /
/mx:Canvas


I attached the 2 files.
Notice that if you comment the component definition in the state and uncomment 
the same exact inline-component definition , it works great.



Thanks a lot !

Almog Kurtser





  

Get easy, one-click access to your favorites. 
Make Yahoo! your homepage.
http://www.yahoo.com/r/hs 

TransitionBug.mxml
Description: Binary data


MyComp.mxml
Description: Binary data


Re: [flexcoders] Cairngorm - what's you best practice on handling inital data from the server ?

2007-11-20 Thread Almog K
Hi Tom,

Thanks, I think your addition will help me too, yet, I think you refer to 
another issue which is whther the TabBar can accept user interaction, which is 
an issue I havn't  take  care of yet.
I could leverage the model.doneStartUp flag to start manipulating the view 
data, but I think when initializing a view component properties, it is more 
intuitive to first try binding the component to a specific function or property 
from the model or an helper function, this is a matter of personal taste, but 
also can help initializing components while configuration data is being 
retrieved from the server:

For example, if my app needs to get 10 configuration files that needs to be 
loaded before the user can start interaction, I'll show him a modal screen 
showing the process, but for the sake not delaying the user after the services 
were loaded by initializing complex component with the retrieved data, the 
binding can cause the components to initialize before all the services were 
loaded.

Best regards,
Almog Kurtser.

- Original Message 
From: Tom Chiverton [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Tuesday, November 20, 2007 11:58:12 AM
Subject: Re: [flexcoders] Cairngorm - what's you best practice on handling 
inital data from the server ?


On Monday 19 Nov 2007, mydarkspoon wrote:
 However, in the view I have a TabBar, that needs to manipulate the
 XML
 config file from the model, meaning that it has to know when this xml
 is retrieved.
 I found few approaches to this:

Have your app. start up result handler set something like
 model.doneStartUp, 
and bind your TabNavigator's enabled property to that ?

-- 
Tom Chiverton
Helping to advantageously introduce visionary e-tailers
on: http://thefalken.livejournal.com



This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England
 and Wales under registered number OC307980 whose registered office
 address is at St James's Court Brown Street Manchester M2 2JF.  A list of
 members is available for inspection at the registered office.  Any
 reference to a partner in relation to Halliwells LLP means a member of
 Halliwells LLP.  Regulated by The Solicitors Regulation Authority.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above
 and may be confidential or legally privileged.  If you are not the
 addressee you must not read it and must not use any information contained in
 nor copy it nor inform any person other than Halliwells LLP or the
 addressee of its existence or contents.  If you have received this email in
 error please delete it and notify Halliwells LLP IT Department on 0870
 365 2500.

For more information about Halliwells LLP visit www.halliwells.com.


--
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









  

Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs