discuss-gnustep
[Top][All Lists]
Advanced

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

Re: some questions relate to selector and NSView


From: Adam Fedor
Subject: Re: some questions relate to selector and NSView
Date: Mon, 05 Aug 2002 21:38:00 -0600
User-agent: Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.0rc2) Gecko/20020513

Banlu Kemiyatorn wrote:
I have some questions,
1) why can't there be sel_getUid() as an alias to sel_get_uid()?


You can make the alias yourself. It might look like the file gnustep-base/Headers/gnustep/base/objc-gnu2next.h, only in reverse. I'd prefer using the OpenStep function NSSelectorFromString(), however.

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?


Nope. Looks like a bug.


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)

What should it do? According to the docs, mouseUp: is implemented in NSResponder. If you want it to actually do something, you have to implement it yourself in your custom view subclass to do something appropriate.


--
Adam Fedor, Digital Optics Corp.      | I'm glad I hate spinach, because
http://www.doc.com                    | if I didn't, I'd eat it, and you
                                      | know how I hate the stuff.




reply via email to

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