Just a quicky, but why would you want to know when an object is created?
If you don't give anything back (like throwing an exception) you van
assume the contructing worked can't you?



-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Luca
Candela
Sent: donderdag 16 februari 2006 16:01
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] dispatching events at creation time?

------------------
class tryOut {

    public var addEventListener:Function;
    public var removeEventListener:Function;
    private var dispatchEvent:Function;

    function tryOut() {
        mx.events.EventDispatcher.initialize(this);
        trace("I am Here 1");
        dispatchEvent({type:"created", target:this});

    }

    public function callMe():Void {
        dispatchEvent({type:"created", target:this});
    }
}
------------------
when I instantiate this class everything works except the dispatchEvent
in the constructor of the class. Why and how can I do to force an object
to call me back when he is created?
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training http://www.figleaf.com
http://training.figleaf.com
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to