I'd recommend checking out Mike Labriola's talk "Dense and Hot" too, a really good overview of the component lifecycle. You should be able to get the slides from it from the flex 360 or webdu sites.

Toby

On 04/07/2008, at 9:13 AM, Alex Harui wrote:


Read up about event flow and the component lifecycle



From: [email protected] [mailto:[email protected] ] On Behalf Of fullerseth1992
Sent: Thursday, July 03, 2008 10:06 AM
To: [email protected]
Subject: [flexcomponents] Debugging Panel in Flex



I'm working on some debugging panels for Flex and to teach me more
about events and Flex Layout.

I've created a that will descend through a container's children and
their children, etc. and make each screen element a different color
and create a tooltip showing each component's x and y values, width,
height, and name.

Now I'm trying to create a popup window the code below this paragraph.
I've set up a right-click mouse event that triggers this function. The
ShowContainer class is an ActionScript class I've created derived from
TitleWindow. When I get the parent object in the createPopup function
it shows the container i right-clicked on. In the ShowContainer class
though, when I access its parent property it is null. Also I get
multiple copies of the ShowContainer window since several levels of
containers or controls have this event registered. I tried calling the
stopPropogate and then the stopImmediatePropogate methods in the event
handler, but that didn't seem to work. What did I do wrong.

protected function createPopup(event:MouseEvent):void {
var showCont:ShowContainer = new ShowContainer();
var parObj:DisplayObject = null;
parObj = event.target as DisplayObject;
if (null == parObj) {
trace('DebugPanel.createPopup parObj == null');
parObj = event.currentTarget as DisplayObject;
}
if (null == parObj) {
trace('DebugPanel.createPopup parObj == null');
}
else {
trace('DebugPanel.createPopup parObj == ' + parObj.toString());
}

PopUpManager.addPopUp(showCont, parObj, false);
}





-----------------------------------

Life is poetry, write it in your own words

-----------------------------------

Toby Tremayne
CEO
Code Poet and Zen Master of the Heavy Sleep
Lyricist Software
0416 048 090
ICQ: 13107913

Reply via email to