Hi,

 

*Note, this post is more directed towards a discussion rather than a fix.

I have been looking at this lately and am very intrigued.

These lines from this as2lib class basically set a __nKEY property on
everything with one line

 

// -----------------

private static var _bInitialized:Boolean =
HashCodeFactory._initialize(Object.prototype);

 

private static function _initialize(o) : Boolean

{

                o.__getKEY = function ()

                {

                                this.__nKEY = null;

                                if (this.__nKEY == null)

                                {

                                                this.__nKEY =
HashCodeFactory.getNextKEY();

                                                _global.ASSetPropFlags(this,
["__nKEY", "__KEY", "__getKEY"], 7, 1);

                                }

                                return this.__nKEY;

                };

                o.addProperty('__KEY', o.__getKEY, null);

                _global.ASSetPropFlags(o, ["__nKEY", "__KEY", "__getKEY"],
7, 1);

 

                return true;

}

//-----------------------

 

Therefore every instance in my app now has a __nKEY property.

Only problem is that if I run through xRay or the Flash Debugger I get the
256 levels of recursion error.

Can anyone think of a way I can achieve the same result ( applying the
__nKEY property to every instance with one line of code ) without destroy my
debugging capabilities.

Surely someone must have run into something similar before?

 

 

 

Bjorn Schultheiss 
Senior Flash Developer 

QDC

Personalised Communication Power

Level 2, 31 Coventry St.
South Melbourne

3205, VIC Australia

T:  +61 3 9674 7400
F:  +61 3 9645 9160
W:  http://www.qdc.net.au <http://www.qdc.net.au/> 

 

((------------This transmission is confidential and intended solely for the
person or organization to whom it is addressed. It may contain privileged
and confidential information. If you are not the intended recipient, you
should not copy, distribute or take any action in reliance on it. If you
believe you received this transmission in error, please notify the
sender.---------------))

 

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