discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about message forwarding (with fix)


From: Andrew Ruder
Subject: Re: Question about message forwarding (with fix)
Date: Fri, 3 Apr 2009 07:48:55 -0700
User-agent: Mutt/1.5.13 (2006-08-11)

On Thu, Apr 02, 2009 at 11:31:43PM +0100, David Chisnall wrote:
> The selector handling mechanism in GNU libobjc is horrible.  Selectors  
> can lose type information depending on the order in which they are  
> registered.  It is one of the things I plan on addressing this year.

What is really unfortunate is that at least in the case of handling
forwarding, the libobjc callback just didn't provide enough information
to look up the real (typed) selector so you just had to guess.  All it
gave you was the SEL which didn't always have type information (or at
least the correct type information) associated with it.

I added a __objc_msg_forward2 callback a while ago to libobjc that gives
you the object you were attempting to send a message to AND the SEL.
>From there you can just ask the object itself the method signature for
forwarding (which is probably how it should be done in the first place,
IMO -- I hate the typed selectors).  Unfortunately, the hook is only
available in newer libobjcs so older gcc's are still always going to be
a pain.

Cheers,
Andy

-- 
Andrew Ruder <andy@aeruder.net>
http://www.aeruder.net




reply via email to

[Prev in Thread] Current Thread [Next in Thread]