1 Reply Latest reply on Dec 5, 2012 10:15 AM by roymeo_

    ANE function parameters display as arg0, arg1, etc. how do I fix this?

    DaveGallant Level 1

      I am creating an ANE and all my functions that take parameters show them as arg0, arg1, arg2, etc..

       

      for example:

       

      ShowAlert(arg0:String, arg1:String, arg2:String = "Ok", arg3:Array = null)

       

      when it should be

       

      ShowAlert(title:String, message:String, defaultButtonText:String = "Ok", additionalButtons:Array = null)

       


      I did some searching and the only thing I was able to find was this:

       

      By default, these are defined as arg0 and arg1, but you can give them more descriptive names. Change the call() function definition to look like this:

      public FREObject call(FREContext context, FREObject[] passedArgs)

       

       

      from http://www.adobe.com/devnet/air/articles/developing-native-extensions-air.html

       

      hrm..
      I assume it's using flex (as pretty much everyone else is these days - I should get around to learning that) but I am using Flash Pro.

       

      Anyway, I don't really understand what he meant, so I started reading the rest of the document and I saw this line:

       

      Set the superclass to com.adobe.fre.FREContext.

       

      Hrm...

       

      Does this mean I am supposed my ANE is supposed to extend that? Right now, it's extending EventDispatcher.

       

      Regardless, can someone clarrify what he means, or what I am supposed to do to get my parameters appearing correctly?