Re: [Flashcoders] Q:Tracing out objects in an array

2007-02-12 Thread Peter Kaptein
Hi all,
I have been out of the scene for a while.

Is there a "cloud menu" navigation FLA somewhere?
I can write one myself, but rather use what exists

Brief:
One object is connected to 1 or more other objects.
This is shown via lines.

Other objects are connected to these objects and connected via lines as
well.
An example:
http://amaznode.fladdict.net/

This week I will be prototyping a new code generator (based on old stuff I
have)
It will map database-tables to forms and auto-generate all code and
interactions.

Thanks for your help


==
Peter Kaptein
Instant Interfaces (www.instantinterfaces.nl) 
Senior Technical Consultant
06 284 310 14

==
Visit our product Quick Tours:
DocumentShare: http://www.instantinterfaces.nl/dsdemo/
Suite For Sales: http://www.instantinterfaces.nl/sfsdemo/

___
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


Re: [Flashcoders] Q:Tracing out objects in an array

2006-01-19 Thread John Grden
You can also just use the XrayTrace class if you'd like and modify it to
your liking.  One thing that it has built in is recursion checking - ie -
you won't hit a 256 levels of recursion error, which wasn't addressed in the
above mentioned methods.  If you have an array with objects or pointers that
would cause a circular reference, you'd get the 256 level error.

Example:

var obj = new Object();
obj.myObjRef = obj;

function searchMe(obj):Void
{
for(var items:String in obj)
{
if(typeof(obj[items]) == "object") searchMe(obj[items]);
}
}

searchMe(this);

This may seem like a rediculouse scenario, and it is, but it's to illustrate
situations where you register object references with other objects etc (ever
looked through any of the v2 components with Xray? that's a great example).
Recursion can get messy real fast.

If you have questions on the way I did the checking (IE: why not loop and
store object references?) I'd be glad to answer up ;)  I've been down this
road a million times with Xray and would LOVE to find different methods for
attacking this very issue.  So far, the current implementation is fast and
solid.

https://secure.sourcesecure.co.uk/trac/osflash/xray/browser/DEV_Source/xray/classes/com/blitzagency/xray/XrayTrace.as

Tanks!

On 1/19/06, Chris Allen <[EMAIL PROTECTED]> wrote:
>
> Try using Xray http://osflash.org/xray
>
> It comes with a tt(YourObject) method that will recursively trace your
> objects.  It also allows you to inspect objects, MovieClips or whatever is
> in your Flash movie and manipulate them with a GUI at run-time.  It's
> freaking great!
>
> -Chris
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>



--
John Grden - Blitz
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Q:Tracing out objects in an array

2006-01-19 Thread Chris Allen
Try using Xray http://osflash.org/xray

It comes with a tt(YourObject) method that will recursively trace your
objects.  It also allows you to inspect objects, MovieClips or whatever is
in your Flash movie and manipulate them with a GUI at run-time.  It's
freaking great!

-Chris
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Q:Tracing out objects in an array

2006-01-19 Thread zwetan
>
> toSource toschmorze.
>

Meaning ?


> Array.prototype.trace = function() {
>   var retString = "Array contents:"+newline;
>   for (var i = 0; i   retString+=i+": ";
>   if (typeof (this[i]) == "object") {
>   for(var prop in this[i]){
>   retString+=prop+" = "+this[i][prop]+newline;
>   }
>   retString+=newline;
>   }else{
>   retString+=this[i];
>   retString+=newline;
>   }
>   }
>   trace(retString);
> };
> //usage
> arr = ["lol", {horse:"yes",donkey:"no"}];
> arr.trace();
>
> Just an example.
>

Here another one

arr = [
"humm",["I",{wonder:["where","you","learned",{to:"indent",so:["badly"]}]}]
];

trace

Array contents:
0: humm
1: trace = [type Function]
1 = [object Object]
0 = I


Now let's try core2
#include "core2_v1.0.1_AS.as1"

trace( arr.toSource( 0 ) );

trace

[
"humm",
[
"I",
{
wonder:
[
"where",
"you",
"learned",
{
to:"indent",
so:
[
"badly"
]
}
]
}
]
]



You could also try that for some more fun

_global.walk = {the:{path:{of:{the:{object:{}};

trace( GetObjectPath( walk.the.path.of.the.object ) );

trace

walk.the.path.of.the.object


trace( "walk:" + walk.toSource( 1, "**" ) );

trace

walk:
{
the:
**{
**path:
{
of:
**{
**the:
{
object:
**{
**__path__:"walk.the.path.of.the.object"
**}
}
**}
}
**}
}



trace( String.format( "{0,40:_}", GetObjectPath( walk ) ) );
trace( String.format( "{0,40:_}", GetObjectPath( walk.the ) ) );
trace( String.format( "{0,40:_}", GetObjectPath( walk.the.path ) ) );
trace( String.format( "{0,40:_}", GetObjectPath( walk.the.path.of ) ) );
trace( String.format( "{0,40:_}", GetObjectPath( walk.the.path.of.the ) ) );
trace( String.format( "{0,40:_}", GetObjectPath( walk.the.path.of.the.object
) ) );

trace

walk
walk.the
___walk.the.path
walk.the.path.of
walk.the.path.of.the
_walk.the.path.of.the.object



Do you understand *now* the difference between a library
and a single function ?


zwetan



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Q:Tracing out objects in an array

2006-01-19 Thread Andreas Rønning

toSource toschmorze.

Array.prototype.trace = function() {
var retString = "Array contents:"+newline;
for (var i = 0; izwetan wrote:

Hi,



I'm populating an array with objects.
When I trace out the array I get
==[object Object]
Whats the best way to trace out the  contents of the objects once they're
in the array?




There are different ways

It could be as simple as

trace( myArray.toSource( 0 ) );

for more info see:
http://www.burrrn.com/projects/core2.html

http://www.burrrn.com/documentation/core2/files/buRRRn/core2/Array-es.html#A
rray.toSource

http://live.burrrn.com/browser/ECMA-262/core2/branches/core2_v1.0.x/src/buRR
Rn/core2/Array.es#L710


HTH
zwetan






___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


--

- Andreas Rønning

---
Flash guy
Rayon Visual Concepts, Oslo, Norway
---
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Q:Tracing out objects in an array

2006-01-19 Thread zwetan
Hi,

> I'm populating an array with objects.
> When I trace out the array I get
> ==[object Object]
> Whats the best way to trace out the  contents of the objects once they're
> in the array?
>

There are different ways

It could be as simple as

trace( myArray.toSource( 0 ) );

for more info see:
http://www.burrrn.com/projects/core2.html

http://www.burrrn.com/documentation/core2/files/buRRRn/core2/Array-es.html#A
rray.toSource

http://live.burrrn.com/browser/ECMA-262/core2/branches/core2_v1.0.x/src/buRR
Rn/core2/Array.es#L710


HTH
zwetan






___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Q:Tracing out objects in an array

2006-01-18 Thread Andreas Weber
Very convenient: mx.data.binding.ObjectDumper

http://weblogs.macromedia.com/dehaan/archives/2005/04/hidden_componen.cf
m

hth
--
Andreas Weber
motiondraw.com


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Donnerstag, 19. Januar 2006 00:18
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] Q:Tracing out objects in an array


Hi
I'm populating an array with objects.
When I trace out the array I get
==[object Object]
Whats the best way to trace out the  contents of the objects once
they're in the array?


Thansk in advance
Jim Bachalo 


[e] jbach at bitstream.ca
[c] 416.668.0034
[w] www.bitstream.ca

"...all improvisation is life in search of a style."
 - Bruce Mau,'LifeStyle'
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Q:Tracing out objects in an array

2006-01-18 Thread Andy Johnston

for(var i:Number=0; i
Hi
I'm populating an array with objects.
When I trace out the array I get
==[object Object]
Whats the best way to trace out the  contents of the objects once they're in 
the array?


Thansk in advance
Jim Bachalo 



[e] jbach at bitstream.ca
[c] 416.668.0034
[w] www.bitstream.ca

"...all improvisation is life in search of a style."
- Bruce Mau,'LifeStyle'
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


 



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders