[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: NSInvocation weirdness
From: |
Richard Frith-Macdonald |
Subject: |
Re: NSInvocation weirdness |
Date: |
Wed, 26 Nov 2008 09:20:21 +0000 |
On 23 Nov 2008, at 13:40, David Chisnall wrote:
Can we insert a assert into NSObject's methodSignatureForSelector to
check for this? Sometimes sel_get_type(aSel) will be NULL (e.g. if
the method was called via @selector()), but in this case there's
nothing we can do other than assume that the programmer knows what
he or she is doing.
Obviously this would come with a small performance penalty, but
forwarding invocations is already around 300 times slower than a
direct message send and this would make debugging certain categories
of problem a lot easier if people got a friendly 'method %s called
with incorrect signature' error.
Good idea ... I have added such a check in svn trunk.