From: Panayotis K. <pan...@pa...> - 2010-11-11 19:52:11
|
On Nov 11, 2010, at 6:56 PM, Arno Puder wrote: > > that is a known issue. The code that XMLVM generates is correct. The > problem is that certain classes (such as UIAppication*) are instantiated > by Cocoa and Cocoa doesn't know about the __init__*() constructors that > were generated by XMLVM. The initialization of 'test' in your example > will end up in the default constructor for class Main and since Cocoa > doesn't call it, it won't get initialized. > > This will work perfectly fine for any other class (that is handled by > XMLVM). It is just this special case when Cocoa instantiates a Java > object. Back then I couldn't think of a solution for this. I'll revisit > this with the C backend. Here we might have more hooks to solve this > problem. > > Arno I actually found that problem in another, more complex structure that wasn't based on UIApplicationDelegate. In any case, you are right, probably we should push our efforts more in favor of C backend (although I believe the ObjC backend should not become obsolete) |