No BurksPool encoding found

13 views
Skip to first unread message

Rob Terrell

unread,
Oct 19, 2010, 8:26:27 PM10/19/10
to JSCocoa
I've got a JavaScript method that looks like this:

-(void) update: (float)dt
{
log(dt);
}

Unfortunately it's throwing an error:

2010-10-19 20:15:11.930 iPhoneTest2[93104:207] No BurksPool
encoding found when adding JSSprite.update:(v@:f)

If I read this right, the BurksPool doesn't know how to pass a float
to the method. Is there a way i can teach it? I looked around in
BridgeSupport a bit but didn't see anything really obvious.

This is running in an iPhone app.

Thanks!

-- Rob

Patrick Geiller

unread,
Oct 20, 2010, 1:22:40 PM10/20/10
to jsc...@googlegroups.com

I've got a JavaScript method that looks like this:

-(void) update: (float)dt
{
log(dt);
}

Unfortunately it's throwing an error:

   2010-10-19 20:15:11.930 iPhoneTest2[93104:207] No BurksPool
encoding found when adding JSSprite.update:(v@:f)

You need a method with that signature in the BurksPool http://github.com/parmanoir/jscocoa/blob/master/JSCocoa/iPhone/BurksPool.m

- (void)v_f:(float)p1
{
[BurksPool callSelector:_cmd ofInstance:self writeContext:NULL withArguments:&p1, NULL];
}

The iPhone cannot create methods at runtime, so JSCocoa retargets methods from this pool to be used by js-defined classes. To make your methods callable, you need to add their signature counterpart (return value + parameters) in the BurksPool. 

Also, I think that JSCocoa is still prohibited on the iPhone as JavascriptCore is not a public framework. Use at your own risk.

-Patrick
Reply all
Reply to author
Forward
0 new messages