Custom component doesn't appear - erratic behavior


hi guys.

 

i have complex application written in flex 4.6, using mx, not spark.

 

there's custom component used within state of component, should appear after button pressed user.

 

the custom component appears only sometimes. seems problem related flash player's screen updating.

 

the component appears , function if call "alert.show()" method when component dispatches removedfromstage event. but, of course, don't want that alert popping during regular use.

 

if comment line out on component (the 1 calls alert popup), custom component again doesn't appear.

 

i guess fix somehow using calllater() or validatenow() or invalidateproperties(), i've been trying use methods no avail.

 

there must either don't understand updating display, or bug in flex.

 

i graterful if put me in right direction. i've been struggling week now.

 

___

 

the following code it appear:

 

<mx:state name="nameofthestate"> <mx:removechild target="{outercontentcanvas}"/> <mx:addchild relativeto="{canvas0}" position="before"> <!--_________________ custom component _________________--> <components:cpcustomcomponent id="mycustomcomponent" creationcomplete="{mycustomcomponent_added_hdl()}" removedfromstage="{alert.show('mycustomcomponent removed!!')}" /> ... 

 

the following code it not appear:

 

<mx:state name="nameofthestate"> <mx:removechild target="{outercontentcanvas}"/> <mx:addchild relativeto="{canvas0}" position="before"> <!--_________________ custom component _________________--> <components:cpcustomcomponent id="mycustomcomponent" creationcomplete="{mycustomcomponent_added_hdl()}" /> ... 

 

 

thank you!!!

if  component doesn’t appear, add code introspect display list see if component exists, size , position, visible , alpha properties , initialized property.

 

-alex



More discussions in Flex (Read Only)


adobe

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support