From: Paul P. <bay...@gm...> - 2011-03-26 19:34:11
|
That's fine with me too. Paul On Sat, Mar 26, 2011 at 11:55 AM, Arno Puder <ar...@pu...> wrote: > > I agree with you that (1) the name of a class/method should reflect its > semantics and (2) we should stick to the official API as much as > possible. In light of this, I also opt for the first option I mentioned > NSObject.performSelectorOnMainThread(NSSelector). > > Arno > > > On 3/26/11 3:46 AM, Panayotis Katsaloulis wrote: > > > > 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. > |