History | Log In     View a printable version of the current page.  
Issue Details (XML)

Key: SDK-12080
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: B B
Assignee: Kishan Venkataramana
Reporter: Kishan Venkataramana
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Flex SDK

Docked Application Control Bar breaks state change that results in Application Control Bars removal

Created: 08/06/07 04:46 AM   Updated: 08/28/07 01:41 AM
Component/s: mx: ApplicationControlBar
Security Level: Public (All JIRA Users )

Issue Links:
Duplicate
This issue duplicates:
SDK-12188 RTE when trying to remove docked Appl... None Closed
This issue is duplicated by:
SDK-12188 RTE when trying to remove docked Appl... None Closed
Relationship
 
This issue is related to by:
SDK-12188 RTE when trying to remove docked Appl... None Closed

Severity: Incorrectly Functioning
Reproducibility: Every Time
Discoverability: Medium
Found in Version: SDK Moxie M3 (Beta 2) - 178456
Milestone: SDK Flex 3 (Released)
Affected OS(s): Windows - XP
Steps to Reproduce:
Steps to reproduce:
1. Compile and run the below sample piece of code

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" >
<mx:states>
<mx:State name="controlBar">
<mx:AddChild>
<mx:ApplicationControlBar width="80%" dock="true">
<mx:Label text="Normal" color="blue"/>
<mx:Label text="Search:" />
<mx:TextInput width="100%" maxWidth="200" />
<mx:Spacer width="100%" />
<mx:Button label="Go adobe.com" />
</mx:ApplicationControlBar>
</mx:AddChild>
</mx:State>
</mx:states>
<mx:VBox id="v1">
<mx:Button id="b1" label="Goto controlBar" click="currentState='controlBar'"/>
<mx:Button id="b2" label="Goto Base" click="currentState=''"/>
</mx:VBox>
</mx:Application>

2. Click on the button 'Goto ControlBar', notice that ApplicationControlBar is shown.
3. Click on the button 'Goto Base' to go back to base state.
4. Notice that below RTE is thrown. It happens only when ApplcationControlBar dock property is set to true.

ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
at flash.display::DisplayObjectContainer/removeChild()
at mx.core::Container/removeChild()[E:\dev\flex\sdk\frameworks\projects\framework\src\mx\core\Container.as:2258]
at mx.states::AddChild/remove()[E:\dev\flex\sdk\frameworks\projects\framework\src\mx\states\AddChild.as:422]
at mx.core::UIComponent/removeState()[E:\dev\flex\sdk\frameworks\projects\framework\src\mx\core\UIComponent.as:6917]
at mx.core::UIComponent/commitCurrentState()[E:\dev\flex\sdk\frameworks\projects\framework\src\mx\core\UIComponent.as:6759]
at mx.core::UIComponent/setCurrentState()[E:\dev\flex\sdk\frameworks\projects\framework\src\mx\core\UIComponent.as:6698]
at mx.core::UIComponent/set currentState()[E:\dev\flex\sdk\frameworks\projects\framework\src\mx\core\UIComponent.as:4149]
at Test/__b2_click()[C:\mywork\FB\Test.mxml:18]

 

 Actual Results: Docked Application Control Bar breaks state change that results in Application Control Bars removal
 
 
 Expected Results: No RTE.
 
 
 Workaround (if any): Setting relativeTo Property for the container containing the buttons.
 
 <?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" >
<mx:states>
<mx:State name="controlBar">
<mx:AddChild relativeTo="{v1}">
<mx:ApplicationControlBar width="80%" dock="true">
<mx:Label text="Normal" color="blue"/>
<mx:Label text="Search:" />
<mx:TextInput width="100%" maxWidth="200" />
<mx:Spacer width="100%" />
<mx:Button label="Go adobe.com" />
</mx:ApplicationControlBar>
</mx:AddChild>
</mx:State>
</mx:states>
<mx:VBox id="v1">
<mx:Button id="b1" label="Goto controlBar" click="currentState='controlBar'"/>
<mx:Button id="b2" label="Goto Base" click="currentState=''"/>
</mx:VBox>
</mx:Application>
 
Language Found: English
Bugbase Id: none
Triaged: Yes
Regression: No
QA Owner: Kishan Venkataramana
Resolved by: sasha magee
Fixed Version: SDK Moxie M3 (Beta 2) - Next Build
Confirmed Version: SDK Moxie M3 (Beta 2) - 180570
Participants: Kishan Venkataramana, Lauren Park and sasha magee


 All   Comments      Sort Order:
Kishan Venkataramana - [08/06/07 04:49 AM ]
Reproducible in Flex 2.0.1

Lauren Park - [08/08/07 07:47 PM ]
PFR to Sasha.

sasha magee - [08/10/07 01:35 PM ]
This is a bug (a lack of special-casing a weird situation) in mx.states.AddChild. We should fix this.

Lauren Park - [08/15/07 07:42 PM ]
Opened.

sasha magee - [08/23/07 11:49 AM ]
Fixed in Changelist 180496

Kishan Venkataramana - [08/28/07 01:41 AM ]
Confirmed fixed with the build # 180813