[flexcoders] Re: Flex address/handle for toString() tracing

2010-01-15 Thread yaksaver


Thanks for the response, Alex.

What's the bug/feature-request ID this is logged under, please?  I'd love to 
vote for it.

(I found it hard to find, probably since I wasn't sure what it was called!  ... 
bit of a case of "knowing a thing's name gives you power over it", huh!)

Thanks, R.


--- In flexcoders@yahoogroups.com, Alex Harui  wrote:
>
> There is no API for it.  Maybe someday
> 
> 
> On 1/14/10 5:03 AM, "yaksaver"  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
>




[flexcoders] Flex address/handle for toString() tracing

2010-01-14 Thread yaksaver
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 method 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.



[flexcoders] Re: using curve, drawPolyLine throws error.. any suggestions

2010-01-11 Thread yaksaver


I've just seen this error.  Was caused by there being a single datum on the 
dataProvider.  For some reason, LineChart does not complain whereas AreaChart 
does -- throwing this error.
HTH!

--- In flexcoders@yahoogroups.com, Alex Harui  wrote:
>
> Technically, "sealed" means "not dynamic".  Almost all Flex classes are 
> sealed.  Your pain is that source isn't available for everything.  That's 
> always going to be true somewhere since not everything will be opensource.
> 
> Anyway, see if the debugger will show you the parameters to drawPolyLine.  It 
> looks like it ran points to draw before it thought it should.
> 
> Alex Harui
> Flex SDK Developer
> Adobe Systems Inc.
> Blog: http://blogs.adobe.com/aharui
> 
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
> Behalf Of djhatrick
> Sent: Monday, September 14, 2009 1:43 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] using curve, drawPolyLine throws error.. any suggestions
> 
> 
> 
> love when classes are sealed, how do i debug?
> mx.charts.chartClasses::GraphicsUtilities$/drawPolyLine
> 
> TypeError: Error #1010: A term is undefined and has no properties.
> at 
> mx.charts.chartClasses::GraphicsUtilities$/drawPolyLine()[C:\work\flex\dmv_automation\projects\datavisualisation\src\mx\charts\chartClasses\GraphicsUtilities.as:305]
> at 
> mx.charts.renderers::AreaRenderer/updateDisplayList()[C:\work\flex\dmv_automation\projects\datavisualisation\src\mx\charts\renderers\AreaRenderer.as:153]
> at 
> mx.skins::ProgrammaticSkin/validateDisplayList()[C:\autobuild\3.3.0\frameworks\projects\framework\src\mx\skins\ProgrammaticSkin.as:421]
> at 
> mx.managers::LayoutManager/validateDisplayList()[C:\autobuild\3.3.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:622]
> at 
> mx.managers::LayoutManager/doPhasedInstantiation()[C:\autobuild\3.3.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:695]
> at Function/http://adobe.com/AS3/2006/builtin::apply()
> at 
> mx.core::UIComponent/callLaterDispatcher2()[C:\autobuild\3.3.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8633]
> at 
> mx.core::UIComponent/callLaterDispatcher()[C:\autobuild\3.3.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8573]
>




[flexcoders] Re: using curve, drawPolyLine throws error.. any suggestions

2010-01-11 Thread yaksaver


I've just seen this error.  Was caused by there being a single datum on the 
dataProvider.  For some reason, LineChart does not complain whereas AreaChart 
does -- throwing this error.
HTH!

--- In flexcoders@yahoogroups.com, Alex Harui  wrote:
>
> Technically, "sealed" means "not dynamic".  Almost all Flex classes are 
> sealed.  Your pain is that source isn't available for everything.  That's 
> always going to be true somewhere since not everything will be opensource.
> 
> Anyway, see if the debugger will show you the parameters to drawPolyLine.  It 
> looks like it ran points to draw before it thought it should.
> 
> Alex Harui
> Flex SDK Developer
> Adobe Systems Inc.
> Blog: http://blogs.adobe.com/aharui
> 
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
> Behalf Of djhatrick
> Sent: Monday, September 14, 2009 1:43 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] using curve, drawPolyLine throws error.. any suggestions
> 
> 
> 
> love when classes are sealed, how do i debug?
> mx.charts.chartClasses::GraphicsUtilities$/drawPolyLine
> 
> TypeError: Error #1010: A term is undefined and has no properties.
> at 
> mx.charts.chartClasses::GraphicsUtilities$/drawPolyLine()[C:\work\flex\dmv_automation\projects\datavisualisation\src\mx\charts\chartClasses\GraphicsUtilities.as:305]
> at 
> mx.charts.renderers::AreaRenderer/updateDisplayList()[C:\work\flex\dmv_automation\projects\datavisualisation\src\mx\charts\renderers\AreaRenderer.as:153]
> at 
> mx.skins::ProgrammaticSkin/validateDisplayList()[C:\autobuild\3.3.0\frameworks\projects\framework\src\mx\skins\ProgrammaticSkin.as:421]
> at 
> mx.managers::LayoutManager/validateDisplayList()[C:\autobuild\3.3.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:622]
> at 
> mx.managers::LayoutManager/doPhasedInstantiation()[C:\autobuild\3.3.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:695]
> at Function/http://adobe.com/AS3/2006/builtin::apply()
> at 
> mx.core::UIComponent/callLaterDispatcher2()[C:\autobuild\3.3.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8633]
> at 
> mx.core::UIComponent/callLaterDispatcher()[C:\autobuild\3.3.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8573]
>