Hamish,
On Jul 28, 2011, at 12:16 AM, Hamish Allan wrote:
> The annoying bit is calling super. [super foo] is resolved at compile
> time, so you need something like:
>
> struct objc_super s = { self, [self superclass] };
> objc_msgSendSuper(&s, @selector(foo));
That won't work well, since super does *not* go to self.superclass -- actually, that's the very reason it's solved compile-time :)
> You could probably use a trampoline in combination with a category on
> NSObject to achieve cleaner syntax, e.g.:
> [[self runtimeSuper] foo];
I believe it would be solveable; nevertheless, myself, I am yet to see a reasonable code which does [super something] in a trait code. So, in my implementation, I simply documented super as invalid with "undefined results" :)
Best,
---
Ondra Čada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Objc-language mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden