Just a quicky, I believe this is the way it should do completion. "this" is 
always the class, not the flash quirks. Might be different though :)

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andreas Rønning
Sent: woensdag 1 maart 2006 13:20
To: Flashcoders mailing list
Subject: [Flashcoders] FlashDevelop and scope

A quick example class

class MyClass{
        var socket:XMLSocket;
        function parse(data:String):Void{
        }
        function MyClass(){
                socket = new XMLSocket();
                //interesting bit
                socket["creator"]=this;
                socket.onData = function(data){
                        this.creator.parse(data);
                }
        }
}

I know this isn't the best way to do it (hello delegate), but still.
One of the big things in FlashDevelop for me is the dynamic code completion, 
and when i type "this." in the onData handler, it gives me a list of methods 
for MyClass, when it should give me methods for socket. 
Or am i wrong? The scope of handlers confuses me.

- Andreas
_______________________________________________
[email protected]
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
_______________________________________________
[email protected]
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