Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon
Accepted Solution

BB10 ANE: Error 3500 "The extension context does not have a method"

I've tried this on both the simulator and the device, and I get the error no matter what:

ArgumentError: Error #3500: The extension context does not have a method with the name init.
	at flash.external::ExtensionContext/_call()
	at flash.external::ExtensionContext/call()
	at com.o2interactive.sensor.gps::GeolocationExt()

 In AS:

this.ext = ExtensionContext.createExtensionContext( 'com.o2interactive.sensor.gps', null );
this.ext.call( "init" );

 In ANE's ContextInitializer:

 

const char *functionNames[] = { "init", "gpsStart", "gpsStop", "gpsSupport", NULL };
FREFunction functionPtrs[] = { init, gpsStart, gpsStop, gpsSupport, NULL };

 Just dones not like when I call anything that has been mapped.

Any suggestions appreciated. 

 

Please use plain text.
BlackBerry Development Advisor (Retired)
dmalik
Posts: 427
Registered: ‎02-22-2012
My Device: BlackBerry Z10, BlackBerry Dev Alpha C, BlackBerry PlayBook
My Carrier: Bell

Re: BB10 ANE: Error 3500 "The extension context does not have a method"

I'm not an ANE expert by any means but you should make sure that the arguements that you're passing are of the same type. I'm not sure if the null you have will work. 

 

Have a look at this sample here - http://help.adobe.com/en_US/air/extensions/WSb464b1207c184b143961a5e412937b5d5c6-7ffd.html

 

More info on call here - http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/external/ExtensionContext.h... 

 

Sorry if I wasn't much help.

 

Regards,
Dustin 

Follow me on Twitter: @dustinmalik
-----------------------------------------------------------------------------------------------------
Keep up to date on BlackBerry development: http://devblog.blackberry.com/
Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: BB10 ANE: Error 3500 "The extension context does not have a method"

I agree the error indicates something with the arguments, but the arguments are fixed for it:  For example (true with all of them), "init" definition is:

FREObject init(FREContext ctx, void* functionData, uint32_t argc, FREObject argv[]);

 Any "arguments" from AS3 would be in argc/argv.

The AS3 side of this is just:

this.ext.call( "init" );

 Very confusing.

 

Please use plain text.
BlackBerry Development Advisor (Retired)
dmalik
Posts: 427
Registered: ‎02-22-2012
My Device: BlackBerry Z10, BlackBerry Dev Alpha C, BlackBerry PlayBook
My Carrier: Bell

Re: BB10 ANE: Error 3500 "The extension context does not have a method"

What I was thinking was:

 

private var init:int; 

this.ext = ExtensionContext.createExtensionContext( 'com.o2interactive.sensor.gps', "init");

 

Follow me on Twitter: @dustinmalik
-----------------------------------------------------------------------------------------------------
Keep up to date on BlackBerry development: http://devblog.blackberry.com/
Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: BB10 ANE: Error 3500 "The extension context does not have a method"

The second argument in createExtensionContext is the "context type", not a function name. The context type allows for the ANE to behave differently based on the context passed in. I tried it with a string value ("gps") and I get the same error.
Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: BB10 ANE: Error 3500 "The extension context does not have a method"

The 3500 error has to do because the "bps" library is not linked in with your app. You have to do this for "[All Configuration]" or you will get the same error depending on your deployment. This has changed in the latest build of the IDE (thanks to RIM who helped find this out).

 

* C/C++ Build / Settings Configuration: [All configurations]

* Select QCC Linker / Libraries.

* Under Libraries (-l) "add" "bps"

 

ane.png 

Please use plain text.
Contributor
IamSergio
Posts: 18
Registered: ‎07-05-2012
My Device: PlayBook
My Carrier: None

Re: BB10 ANE: Error 3500 "The extension context does not have a method"

[ Edited ]

2jtegen

 

It has helped you solve the your problem?

 

My program still did not work.

I've created new projects, added lib, compile now, load to my device... And not successful.

Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: BB10 ANE: Error 3500 "The extension context does not have a method"

If you are still getting the 3500 error, make certain you re-export to produce the ANE. Also try removing the ANE from the home app and re-add it. I think something gets cached here.
Please use plain text.
Contributor
IamSergio
Posts: 18
Registered: ‎07-05-2012
My Device: PlayBook
My Carrier: None

Re: BB10 ANE: Error 3500 "The extension context does not have a method"

I've created new projects (all: flex lib, ANE, AIR), added bps, deleted my application from the my device, compiled it, exported to ane file and run the AIR app. It is not successful. :No:

 

I've install the NDK 2.1b now. It is not successful too. :No:

 

Error 3500 here. :Wacko:

Please use plain text.
Contributor
IamSergio
Posts: 18
Registered: ‎07-05-2012
My Device: PlayBook
My Carrier: None

Re: BB10 ANE: Error 3500 "The extension context does not have a method"

So, which a tool are help me to disassemble the my SO files?

Maybe I will to see a names of the functions that were obtained by compiling and export ...

Please use plain text.