RE: [flexcoders] How to find the actual type of a custom flex component?
I think describeType() gives the inheritance list. You could pick it out of that. It certainly gives the baseclass Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk blocked::http://www.inps.co.uk/ The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpd...@inps.co.uk From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of pmotzfeldt Sent: 26 February 2009 07:41 To: flexcoders@yahoogroups.com Subject: [flexcoders] How to find the actual type of a custom flex component? Hi, I am wondering if anybody knows how I can find the actual class type of a custom component? By that I mean I create a custom component that is a VBox, but I call it MyCustomBox, and whenever I call className on that it returns MyCustomBox, but I want to get the class VBox by any means. Appreciate any help, thanks!
Re: [flexcoders] How to find the actual type of a custom flex component?
You can use is operator to compare that object with your desired set of classes using if - else if conditions Best, Ashish On Thu, Feb 26, 2009 at 3:30 PM, Gregor Kiddie gkid...@inpses.co.uk wrote: I think describeType() gives the inheritance list. You could pick it out of that. It certainly gives the baseclass Gk. *Gregor Kiddie* Senior Developer *INPS* Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpd...@inps.co.uk -- *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *pmotzfeldt *Sent:* 26 February 2009 07:41 *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] How to find the actual type of a custom flex component? Hi, I am wondering if anybody knows how I can find the actual class type of a custom component? By that I mean I create a custom component that is a VBox, but I call it MyCustomBox, and whenever I call className on that it returns MyCustomBox, but I want to get the class VBox by any means. Appreciate any help, thanks!
Re: [flexcoders] How to find the actual type of a custom flex component?
You should be able to override the className property, something like this: override public function className():String{ return 'VBox' } Whether it is a good idea or not is open to discussion. pmotzfeldt wrote: Hi, I am wondering if anybody knows how I can find the actual class type of a custom component? By that I mean I create a custom component that is a VBox, but I call it MyCustomBox, and whenever I call className on that it returns MyCustomBox, but I want to get the class VBox by any means. Appreciate any help, thanks! -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links -- Jeffry Houser, Technical Entrepreneur Adobe Community Expert: http://tinyurl.com/684b5h http://www.twitter.com/reboog711 | Phone: 203-379-0773 -- Easy to use Interface Components for Flex Developers http://www.flextras.com?c=104 -- http://www.theflexshow.com http://www.jeffryhouser.com -- Part of the DotComIt Brain Trust
RE: [flexcoders] How to find the actual type of a custom flex component?
The actual type of your component is MyCustomBox. Its superclass is VBox. VBox's superclass is Box. Box's superclass is Container, etc. So you're looking for your immediate superclass. Use the getQualifiedSuperclassName() function in the flash.utils package. It will give you a String like mx.containers:VBox. (It think it puts a colon in there.) Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Ashish Verma Sent: Thursday, February 26, 2009 5:37 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] How to find the actual type of a custom flex component? You can use is operator to compare that object with your desired set of classes using if - else if conditions Best, Ashish On Thu, Feb 26, 2009 at 3:30 PM, Gregor Kiddie gkid...@inpses.co.ukmailto:gkid...@inpses.co.uk wrote: I think describeType() gives the inheritance list. You could pick it out of that. It certainly gives the baseclass Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpd...@inps.co.ukmailto:is.helpd...@inps.co.uk From: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com] On Behalf Of pmotzfeldt Sent: 26 February 2009 07:41 To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com Subject: [flexcoders] How to find the actual type of a custom flex component? Hi, I am wondering if anybody knows how I can find the actual class type of a custom component? By that I mean I create a custom component that is a VBox, but I call it MyCustomBox, and whenever I call className on that it returns MyCustomBox, but I want to get the class VBox by any means. Appreciate any help, thanks!
[flexcoders] How to find the actual type of a custom flex component?
Hi, I am wondering if anybody knows how I can find the actual class type of a custom component? By that I mean I create a custom component that is a VBox, but I call it MyCustomBox, and whenever I call className on that it returns MyCustomBox, but I want to get the class VBox by any means. Appreciate any help, thanks!