Re: weak linking questions
Re: weak linking questions
- Subject: Re: weak linking questions
- From: Fritz Anderson <email@hidden>
- Date: Tue, 25 May 2004 19:08:23 -0500
Objective-C methods are accessed by (basically) a search of the class
hierarchy, so there isn't a pointer to be NULL or otherwise. Even if it
were a matter of a function pointer, why would you expect a call
through a NULL function pointer to be benign?
The way you handle methods that may not be implemented is to test them
in advance:
if ([myScrollView respondsToSelector:
@selector(setAutohidesScrollers:)] {
[myScrollView setAutohidesScrollers: YES];
}
-- F
On 25 May 2004, at 4:46 PM, Aurilien Hugeli wrote:
now i have
exception like this :
[NSScrollView setAutohidesScrollers:] selector not recognized... of
course i know it is panther only, but should n't it do nothing since
setAutohidesScrollers should be NULL because of weak linking ?
--
Fritz Anderson
Consulting Programmer
http://resume.manoverboard.org/
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.