[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
some questions relate to selector and NSView
From: |
Banlu Kemiyatorn |
Subject: |
some questions relate to selector and NSView |
Date: |
Tue, 06 Aug 2002 06:20:38 +0700 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020615 Debian/1.0.0-3 |
I have some questions,
1) why can't there be sel_getUid() as an alias to sel_get_uid()?
2) if I send a non existing selector to anObject, eg [anObject hoho];
(or may be [anObject performSelector:sel_get_uid("hoho")];)
gstep will crash even I implement doesNotRecognizeSelector:
right after I choose to ignore from
"Critical Error in MyApp"
NSInternalInconsistencyException:GSFFCallInvocation.m:777
Assertion failed in GSInvocationCallback. No signature for selector hoho.
Why is that? It shouldn't crash, should it?
By implementing a blank method in any non-related object solve the crash
problem but that isn't dynamic. Instead, I can use respondsToSelector: to
prevent the problem before I send it to the reciever but that isn't as
comfortable
using doesNotRecognizeSelector or forwardInvocation:
3) Why NSView doesn't do mouseUp? But I guess this is a bug
since it didn't match the behavior of NSView according to oreilly's
learning cocoa book. (It is strange that sometimes it work)