From: Ian F. <ifr...@gm...> - 2011-02-21 13:00:47
|
Hello, I have been experimenting using XMLVM to generate an iPhone compatible library from java source meant to be the API on the Android side. I'm not trying to generate a full app for the iPhone using XMLVM, just an API library. I generated the objective C files, built a library using those files and your compatability files for objective C. Now I'm trying to use that library in a native iPhone application. My problem is that the implementation categories don't seem to be referenced properly as I see two things: 1 - warning like this: : warning: incompatible Objective-C types 'struct java_lang_String *', expected 'struct java_lang_String *' when passing argument 1 of '__init_com_newsdart_client_NDApi___java_lang_String:' from distinct Objective-C type 2 - runtime selector exception on this line in the generated code for one of my classes: [((java_lang_Object*) _r2.o) __init_java_lang_Object__]; The object it is operating on is an object I instantiated in the native iPhone code using: [[class alloc] init] This class had a constructor initializer of a String object in the original java code. It was translated into the init call you see in #1 above. The code above in #2 is near the top of that function. It seems that for some reason the object that I'm creating is created using the native NSObject, and not the NSObject modified using categories by java_lang_Object. I'm confused as to how I could control this as the steps I went through were pretty straight forward. Is there some compiler option needed for implementation categories to work correctly? (either for the library I'm creating or native application using the library? I think my problem must be pretty basic. Best Regards, Ian -- Ian D. Frisbie |