Sheesh. Next time I want to stimulate a rant on proper application
design I'll be sure to ask an innocent little API question.
To summarize for the list archives, the question was:
How do I, using the Java APIs, get the equivalent of NSUserDefaults'
initWithUser: method? This method is missing from the Java APIs and
there's no obvious way to get it. If it were available from the Java
Preferences API, that'd be fine too.
The answer is to build a new Objective-C class that calls the method
and returns the desired NSUserDefaults instance. To use the new class
from Java, I had to generate native stubs for what Java thinks is the
class (using the bridget tool makes this semi-painless) and then build
a dylib that's ultimately loaded into Java.
I wrote a total of maybe 15 lines of code to do this, but it took half
a day to figure it all out!
cheers,
bri
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden