That's also the way it's implemented in Parsley, but the wrapper class can be 
very simple:

[from parsley]
package avmplus {

public class DescribeTypeJSONAccessor {
                        
        public static function get functionRef () : Function {
                try {
                        return describeTypeJSON;
                }
                catch (e:Error) {
                }
                return null;
        }

But its really worth using  compared to describeType:
- faster
- much less memory
- can extract only the needed information, thanks to flags arguments

-----Message d'origine-----
De : Erik de Bruin [mailto:[email protected]] 
Envoyé : mardi 5 novembre 2013 20:22
À : [email protected]
Objet : Re: [FLEXJS] describeType

Wow.

Getting this to work involves creating a wrapper class around an undocumented 
method in playerglobal.swc, which is not under our control.

That doesn't sound like a sustainable way forward :-(

EdB



On Tue, Nov 5, 2013 at 7:02 PM, Alex Harui <[email protected]> wrote:
> Told you it was under-documented ;-). The secret handshake is 
> apparently to ignore autocomplete and use google.  Looks like it is 
> avmplus.describeTypeJSON().  I've not used it, but there was a recent 
> thread about it.
>
> On 11/5/13 9:54 AM, "Erik de Bruin" <[email protected]> wrote:
>
>>My FlashBuilder's autocomplete is not aware of such a method. Any 
>>secret handshakes I should be aware of to activate it?
>>
>>EdB
>>
>>
>>
>>On Tue, Nov 5, 2013 at 6:32 PM, Alex Harui <[email protected]> wrote:
>>> Apparently, there is a under-documented describeTypeJSON which I 
>>>think the  application frameworks are using to get any and all 
>>>metadata on a class  and its methods because it is much faster than 
>>>regular describeType.
>>> Maybe we should do that.
>>>
>>> -Alex
>>>
>>> On 11/5/13 5:42 AM, "Erik de Bruin" <[email protected]> wrote:
>>>
>>>>Hi,
>>>>
>>>>flash.utils.describeType has an XML return type. JavaScript doesn't 
>>>>have anything like that and I'm sure we don't want to simulate it 
>>>>for the purpose of this exercise.
>>>>
>>>>I suggest we create a utility class
>>>>"org.apache.flex.utils.DescribeType" and put some static methods on 
>>>>it that allow us to get tailored introspection... Maybe start with 
>>>>'DescribeType.getMetaData(value:*)'?
>>>>
>>>>What metadata are you thinking of, specifically?
>>>>
>>>>EdB
>>>>
>>>>
>>>>
>>>>--
>>>>Ix Multimedia Software
>>>>
>>>>Jan Luykenstraat 27
>>>>3521 VB Utrecht
>>>>
>>>>T. 06-51952295
>>>>I. www.ixsoftware.nl
>>>
>>
>>
>>
>>--
>>Ix Multimedia Software
>>
>>Jan Luykenstraat 27
>>3521 VB Utrecht
>>
>>T. 06-51952295
>>I. www.ixsoftware.nl
>



--
Ix Multimedia Software

Jan Luykenstraat 27
3521 VB Utrecht

T. 06-51952295
I. www.ixsoftware.nl

Reply via email to