From: Panayotis K. <pan...@pa...> - 2011-03-26 10:46:59
|
On Mar 25, 2011, at 3:19 AM, Arno Puder wrote: > > I guess the question boils down to the way to define the callback in > Java. Introduce a new interface (NSSelector) or use existing Java > interface (Runnable)? The method in question is > NSObject.performSelectorOnMainThread(). Considering the name of the > method, it might be awkward to pass a runnable. Perhaps renaming the > method to NSObject.performRunnableOnMainThread() although it doesn't > exists on the Objective-C side. > > So, the options are: > > 1. NSObject.performSelectorOnMainThread(NSSelector) I am actually more in favor of this solution, because it is similar (or practically the same) with NSTimerDelegate > 2. NSObject.performSelectorOnMainThread(Runnable) > 3. NSObject.performRunnableOnMainThread(Runnable) I am afraid that this is not standard and nowhere documented, and I am not really in favor for introducing non-existive API. More importantly though, it is required the others to express their opinion. |