You want the name of the class or the
class itself? The type property in the descriptor is the class itself. I
think you might be able to get the class name by then getting the undocumented
symbolName property from the class object.
Matt
From: bhaq1972
[mailto:[EMAIL PROTECTED]
Sent: Friday, March 11, 20051:30
AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re:
childDescriptors array/ UIObjectDescriptors.id i s undefined
Hi Matt
> conflicts). What you'd want to dois
after creation give your
> parentDocument a property with the nameas
your class.
>
The problem is i'm also interested in objects
before creation. I'm
actually interested in the className but if the
component hasn't
been created, you get 'undefined'
eg
var mycomponent = container[i]; //
container=a flex container
var myclassname = mycomponent.className
//myclassname always=undefined if component hasnt
been created
However, childDescriptors does have info about
children before its
created.
My idea was to make the @id same as the className,
then i can do this
var myclassname =
container[i].childDescriptors[i2].id
This works but i dont want to go round giving all
my components @id.
i tried id = className early on which works,
but the
childDescriptors array doesnt pick it up.
thanks
--- In flexcoders@yahoogroups.com,
Matt Chotin <[EMAIL PROTECTED]> wrote:
> I'm not sure why you want the id to be the
same as the class
name. It may
> not work as you want (having ids the same as
a class name can lead
to weird
> conflicts). What you'd want to dois
after creation give your
> parentDocument a property with the nameas
your class.
>
>
>
> Matt
>
>
>
> _____
>
> From: bhaq1972 [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 10, 2005 7:01 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] childDescriptors array/
UIObjectDescriptors.id is
> undefined
>
>
>
>
> Hi
> As i understand things the childDescriptors
array (an array of
> UIObjectDescriptors) is created/populated
when you create the mxml.
> When i do this
>
> <myCustomComponent
id="myCustomComponent">
> </myCustomComponent>
>
> the id property of the UIObjectDescriptor is
'myCustomComponent'.
> which is correct.
>
> Is there a way i can force the id to bethe
className (ie
> myCustomComponent in this case)
>
> I tried 'id = className' in the constructor
of myBox (which
extends
> a mx:Box class).....the base container of
myCustomComponent i.e.
>
> myCustomComponent.mxml
> ----------------------
> <myBox>
> .....
> </myBox>
>
>
> thanks
>
>
>
>
>
>
>
>
> Yahoo! Groups Sponsor
>
>
>
> ADVERTISEMENT
>
>
<http://us.ard.yahoo.com/SIG=1294ah6uo/M=298184.6018725.7038619.30011
76/D=gr
>
oups/S=1705007207:HM/EXP=1110553365/A=2593423/R=0/SIG=11el9gslf/*http
:/www.n
> etflix.com/Default?mqso=60190075> click
here
>
>
>
> <http://us.adserver.yahoo.com/l?
M=298184.6018725.7038619.3001176/D=groups/S=
> :HM/A=2593423/rand=191065706>
>
>
>
> _____
>
> Yahoo! Groups Links
>
> * To visit your
group on the web, go to:
> http://groups.yahoo.com/group/flexcoders/
> <http://groups.yahoo.com/group/flexcoders/>
>
> * To
unsubscribe from this group, send an email to:
> [EMAIL PROTECTED]
>
<mailto:[EMAIL PROTECTED]
subject=Unsubscribe>
>
> * Your use of
Yahoo! Groups is subject to the Yahoo!
> <http://docs.yahoo.com/info/terms/>
Terms of Service.
|