There is no API for it.  Maybe someday

On 1/14/10 5:03 AM, "yaksaver" <[email protected]> wrote:






Hi,

How can one programmatically retrieve the address / handle that is seen in Flex 
Debugger?

Example:
  flash.system.ApplicationDomain (@788d1f1)

Background:
Classes without an explicit toString() method give the default Object String 
(e.g. "[object ApplicationDomain]") for trace() or logging statements.  This 
means one cannot spot the difference between different instances in the logs.

In Java (sorry, yes I'm more a Java guy but have been using Flex for the last 
6-odd months), the default toString() method gives the instance handle (the 
address-like thing).

Obviously, this exists within the AVM.  So my question is how to access it 
programmatically?  (perhaps some namespace, perhaps some me! thod we've 
overlooked?)

Some thoughts:

 *   The tripple-equals test must compare by this value so things like 
Dictionary must be indexing off it (but we can't find the source for this class)
 *
 *   It would be an obvious thing to use as default for a hash-table 
implementation.
 *   Obviously, since it's used for sending and offlining, describeType() 
doesn't include this information. (it would change per run)
 *
 *   ObjectUtil.toString() gives a something with "#0" at the end rather than 
this instance info.

All hints and thoughts welcome!
Cheers,
YakS[h]aver R.





--
Alex Harui
Flex SDK Team
Adobe System, Inc.
http://blogs.adobe.com/aharui

Reply via email to