From: Arno P. <ar...@pu...> - 2010-03-06 22:18:53
|
On 3/6/10 11:10 AM, Tor Lillqvist wrote: >> My idea was that you define an Objective-C category in >> order to implement the native method on the Objective-C side (thereby >> 'overlaying' the error handler). > > OK, that is probably a better and more elegant idea as it enables you > to leave native methods unimplemented until you actually are sure they > will be needed, doesn't it? I just looked at your suggestion again. IMHO, I think my idea of using categories for native methods is more elegant. You map native methods to function calls. When you implement a native instance method you also need to explicitly pass the 'self' reference. You get all that for free with categories and you don't have to map native methods to functions. If you don't implement a native method, I throw an exception. Arno |