bug-gnustep
[Top][All Lists]
Advanced

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

[bug #41586] Invocation forwarding doesn't work on my system


From: Richard Frith-Macdonald
Subject: [bug #41586] Invocation forwarding doesn't work on my system
Date: Fri, 14 Feb 2014 17:24:25 +0000
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/537.71 (KHTML, like Gecko) Version/6.1 Safari/537.71

Update of bug #41586 (project gnustep):

                  Status:                    None => Invalid                
             Open/Closed:                Analyzed => Declined               

    _______________________________________________________

Follow-up Comment #6:

To implement forwarding you should generally implement
-methodSignatureForSelector: to deal with any methods your proxy object
doesn't implement itsself.

To make things friendlier (ie cope gracefully with code where
-methodSignatureForSelector: fails) GNUstep has long (pretty much always) had
an extension (not present in the NeXT/Apple codebase) allowing it to get type
information directly from the selector, or failing that to get type
information if one (and only one) selector with that name exists.

Mostly the compiler can ensure a correctly typed selector is used, but not
always, so this feature to try to make faulty code work is not 100% reliable.
It will fail if there is no selector of the required name with type
information (eg the receiver is actually in a different process or in a
loadable bundle which hasn't been loaded yet).
It will also fail if two or more selectors with that name exist (since we have
no way of knowing which one has the correct type info).

Possibly we should remove this in a later release and force people to write
'correct' (ie Apple compatible) code.  It appears that removing it might avoid
confusion (though it might also break quite a bit of code … so I guess we'd
have to start by deprecating and printing warning messages in one release
before actually removing it)

Anyway, I hope it's clear how to add a -methodSignatureForSelector:
implementation to make your code portable/reliable.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?41586>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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