Thanks. this is very useful as was the previous suggestion (using ObjectUtil).
--- In [email protected], "Matt Horn" <[EMAIL PROTECTED]> wrote: > > You can try the describeType() method. See if this does what you want: > > <?xml version="1.0"?> > <mx:Application xmlns:mx="http://www.macromedia.com/2005/mxml"> > <mx:Script> > import mx.utils.ObjectUtil; > import flash.util.*; > public function printObject(e:MouseEvent) { > // Get the event's E4X XML object description: > var classInfo:XML = describeType(e); > > // Dump the entire E4X XML object into ta1: > > ta1.text = classInfo.toString(); > > // List the object's variables, their values, > and their types: > for each (var v:XML in classInfo..variable) { > ta2.text += "Variable " + [EMAIL PROTECTED] + "=" > + [EMAIL PROTECTED] + " (" + [EMAIL PROTECTED] + ")\n"; > } > > // List accessors as properties: > for each (var a:XML in classInfo..accessor) { > ta2.text += "Property " + [EMAIL PROTECTED] + "=" > + [EMAIL PROTECTED] + " (" + [EMAIL PROTECTED] +")\n"; > } > > // List the object's methods: > for each (var m:XML in classInfo..method) { > ta2.text += "Method " + [EMAIL PROTECTED] + "():" > + [EMAIL PROTECTED] + "\n"; > } > > } > </mx:Script> > > <mx:Button id="b1" label="Click Me!" click="printObject (event)" > styleName="myButtonStyle"/> > > <mx:TextArea id="ta1" height="200" width="400"/> > <mx:TextArea id="ta2" height="200" width="400"/> > > </mx:Application> > > > -----Original Message----- > > From: [email protected] > > [mailto:[EMAIL PROTECTED] On Behalf Of bhaq1972 > > Sent: Tuesday, February 07, 2006 9:22 AM > > To: [email protected] > > Subject: [flexcoders] Re: how to loop thru > > mx.events.DataGridEvent (flex 2) > > > > Thanks for your suggestion, but its giving me a 'StackOverflowError' > > for this example. any ideas? > > > > > > > > --- In [email protected], Teoti Graphix <teoti.graphix@> > > wrote: > > > > > > Hey, > > > > > > import mx.utils.ObjectUtil; > > > > > > trace(ObjectUtil.toString(evt)); > > > > > > or... > > > > > > out.text += "\n" + ObjectUtil.toString(evt); > > > > > > Does a WONDERFUL job. You will never look at objects the same ;-) > > > > > > Peace, Mike > > > > > > > > > On 2/7/06, bhaq1972 <mbhaque@> wrote: > > > > > > > > i have cellPress event in my DataGrid. The following code > > doesnt work. > > > > can someone tell me the correct syntax > > > > > > > > private myCellPressEvnt(event:DataGridEvent):void > > > > { > > > > for(var obj1:Object in event) > > > > { > > > > //out is a <mx:TextArea > > > > > out.text += obj1 + event[obj1] + "\n"; > > > > } > > > > } > > > > > > > > TIA > > > > bod > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > Flexcoders Mailing List > > > > FAQ: > > http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > > > > Search Archives: http://www.mail-archive.com/flexcoders% > > 40yahoogroups.com > > > > > > > > > > > > > > > > SPONSORED LINKS > > > > Web site design development<http://groups.yahoo.com/gads? > > t=ms&k=Web+site+design+development&w1=Web+site+design+development&w2= > > Computer+software+development&w3=Software+design+and+development&w4=M > > acromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=L > > -4QTvxB_quFDtMyhrQaHQ> Computer > > > > software development<http://groups.yahoo.com/gads? > > t=ms&k=Computer+software+development&w1=Web+site+design+development&w > > 2=Computer+software+development&w3=Software+design+and+development&w4 > > =Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig > > =lvQjSRfQDfWudJSe1lLjHw> Software > > > > design and development<http://groups.yahoo.com/gads? > > t=ms&k=Software+design+and+development&w1=Web+site+design+development > > &w2=Computer+software+development&w3=Software+design+and+development& > > w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.s > > ig=1pMBCdo3DsJbuU9AEmO1oQ> Macromedia > > > > flex<http://groups.yahoo.com/gads? > > t=ms&k=Macromedia+flex&w1=Web+site+design+development&w2=Computer+sof > > tware+development&w3=Software+design+and+development&w4=Macromedia+fl > > ex&w5=Software+development+best+practice&c=5&s=166&.sig=OO6nPIrz7_EpZ > > I36cYzBjw> Software > > > > development best practice<http://groups.yahoo.com/gads? > > t=ms&k=Software+development+best+practice&w1=Web+site+design+developm > > ent&w2=Computer+software+development&w3=Software+design+and+developme > > nt&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166 > > &.sig=f89quyyulIDsnABLD6IXIw> > > > > ------------------------------ > > > > YAHOO! GROUPS LINKS > > > > > > > > > > > > - Visit your > > group "flexcoders<http://groups.yahoo.com/group/flexcoders>" > > > > on the web. > > > > > > > > - To unsubscribe from this group, send an email to: > > > > [EMAIL PROTECTED]<flexcoders- > > [EMAIL PROTECTED]> > > > > > > > > - Your use of Yahoo! Groups is subject to the Yahoo! Terms of > > > > Service <http://docs.yahoo.com/info/terms/>. > > > > > > > > > > > > ------------------------------ > > > > > > > > > > > > > > > > > > > > > > > -- > > Flexcoders Mailing List > > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > > Search Archives: > > http://www.mail-archive.com/flexcoders%40yahoogroups.com > > Yahoo! Groups Links > > > > > > > > > > > > > > > > > -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

