When defining a click event for a custom TitleWindow, clicking anywhere within 
the TitleWindow triggers the event, allthough the 
docs say it is used for the close button.
Furthermore, when trying to close the TitleWindow in the click event handler, 
an error pops up.

Here's the mxml:

<?xml version="1.0" encoding="utf-8"?>
<mx:TitleWindow xmlns:mx="http://www.macromedia.com/2005/mxml"; xmlns="*" 
closeButton="true" click="windowClickHandler(event)" 
width="400" height="200">
    <mx:Script>
    <![CDATA[
        import flash.events.Event;
        import mx.managers.PopUpManager;
        private function windowClickHandler(evt:Event) {
            PopUpManager.removePopUp(this);
        }
    ]]>
    </mx:Script>
</mx:TitleWindow>

This is the error message:

TypeError: Error #1009: null has no properties.
 at mx.managers::PopUpManager$/removePopUp()
 at TestWindow/TestWindow$287$private::windowClickHandler()
 at TestWindow/___TitleWindow0_click()


Is there any other event triggered when clicking the close button?
I find it strange that the event is triggered when clicking anywhere inside the 
TitleWindow, so maybe the docs mention the wrong 
event name or something.
A 'close' event would be more suitable IMO anyways..

regards,
Muzak




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM
--------------------------------------------------------------------~-> 

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