Skip to main content
Participant
September 23, 2014
Answered

IOS + AIR SDK 15.0, arguments.callee 'undefined'

  • September 23, 2014
  • 2 replies
  • 888 views

Hi everybody,

I work on application use Flex SDK 13.0, Air SDK 15.0, and Robotlegs 2.2.1 MVC Framework.

Since I upgrated the AIR SDK to 15.0, there is an error in Robotlegs Framework. Searching, I found where the error was, so I create a simple project to test the problem.

When you use argument.callee in mobile application on IOS, the arguments.callee is 'undefined'.

This is simple code :

<?xml version="1.0" encoding="utf-8"?>

<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"

  xmlns:s="library://ns.adobe.com/flex/spark"

  applicationDPI="160"

  applicationComplete="viewnavigatorapplication1_applicationCompleteHandler(event)"

>

  <fx:Script>

  <![CDATA[

  import mx.events.FlexEvent;

  protected function viewnavigatorapplication1_applicationCompleteHandler(event:FlexEvent):void

  {

  var callee : Function = arguments.callee;

  if(callee != null)

  {

  testCalleeLabel.text = "find callee";

  }else

  {

  testCalleeLabel.text = "not find callee";

  }

  }

  ]]>

  </fx:Script>

  <s:Label id="testCalleeLabel"/>

</s:Application>

In Air Simulator, or Android APK, the 'arguments.callee' is defined, but if you build in IPA for IOS (or debug mode with "standard build", not "rapid build" on flash builder), the 'arguments.callee' is undefined.

With AIR 14, the 'arguments.callee' is ok on IOS.

Robotlegs framework uses 'arguments.callee', so the framework crashes during the instanciation.

Is it a bug ?

Thanks for yoru response.

This topic has been closed for replies.
Correct answer Govind11519869

Hi,

We have fixed this issue. It should be available in next release.

Thanks

Govinda Gupta

2 replies

gkngkc
Participant
September 24, 2014

Hi, you can use this workaround until its fixed.

public function wrapListener(f:Function):Function {

            return function (... args) : void {

                var func:Function = f;

                args[args.length] = func;

                f.apply(this, args);

            };

        }

addEventListener(event.EVENT, wrapListener(function(callee:Function):void {

    removeEventListener(event.EVENT, callee);

}));

Govind11519869Correct answer
Adobe Employee
September 23, 2014

Hi,

We have fixed this issue. It should be available in next release.

Thanks

Govinda Gupta

Tonic29Author
Participant
September 23, 2014

Thanks Govind for your reactivity

Have you got a date for the next release including this fix ?