Can not use custom properties in b2dJson for Objective C ++

General discussion about the R.U.B.E editor
Post Reply
cuongv88
Posts: 3
Joined: Sat Feb 02, 2013 9:02 pm

Can not use custom properties in b2dJson for Objective C ++

Post by cuongv88 »

The function "getBodiesByCustomString()" is not exist in b2dJson.mm.
Is it not ported to Objective C ++ yet ? How can i use custom properties in Objective C ?
Thanks in advance.
iforce2d
Site Admin
Posts: 861
Joined: Sat Dec 22, 2012 7:20 pm

Re: Can not use custom properties in b2dJson for Objective C

Post by iforce2d »

Hm.... looks like I did not update the iOS sample project, if that's what you are using.

The loader does not really need to be 'ported' to Objective C++ because you can just change the file extension. You can take the b2dJson related files from the main sample (in folder titled "box2d-testbed-(C++)") and rename the .cpp file to .mm

I will have to update the sample sometime...
cuongv88
Posts: 3
Joined: Sat Feb 02, 2013 9:02 pm

Re: Can not use custom properties in b2dJson for Objective C

Post by cuongv88 »

I will try to use .cpp file and let you know the result.
Thanks.
cuongv88
Posts: 3
Joined: Sat Feb 02, 2013 9:02 pm

Re: Can not use custom properties in b2dJson for Objective C

Post by cuongv88 »

I checked C++ sample project but can not found where function "getBodiesByCustomString()" was defined.Maybe my main sample was out of date ?
iforce2d
Site Admin
Posts: 861
Joined: Sat Dec 22, 2012 7:20 pm

Re: Can not use custom properties in b2dJson for Objective C

Post by iforce2d »

It is in the b2dJson files (.h and .cpp). In the sample project these are under src/Box2D/Testbed/Tests/rubestuff

You can also find them at http://www.iforce2d.net/b2djson/
Post Reply