I want to pass a point to a C++ object to the selector invoked using performSelectorOnMainThread. Simply casting the pointer to an 'id' (objc_object*) doesn't seem to work. I could always write my own objective C wrapper class, but there should be a fairly standard way of doing this. I didn't really find anything on apple's documentation for it though.
What's the best way to do this?
Here's what I want to do:
...
Foo *foo = new Foo(); // Foo is a C++ class
MyObject *myObj = [[MyObject alloc] init]; // Obj-C class
[myObj performSelectorOnMainThread:@selector(someMethod:) withObject:foo waitUntilDone:NO];
...
Thanks!