Writing a delegate from a class
Writing a delegate from a class
- Subject: Writing a delegate from a class
- From: Jasper Touwen <email@hidden>
- Date: Sun, 11 Aug 2002 17:11:06 +0200
Hai,
I'm trying to find some info on writing a delegate for my class...
At mamasan I find a lot of hits, but the only useful statement i found
was:
- Delegate: to retain or not? -> nope..
At objc book:
- use an informal protocol for delegates:
@interface NSObject ( RefCounting )
- (int)refCount;
- incrementCount;
- decrementCount;
@end
But nowhere how to really write it, do i need something like the
parallel thread:NSButton question, or do i use:
SEL oneOfMyDelegateMethods = @selector(doMyDelegateMethod:)
if ([delegateObject != nil] && [delegateObject
respondToSelector:onOfMyDelegateMethods])
[delegateObject performSelector:oneOfMyDelegateMethods];
Any pointers or examples are welcome...
Thanx in advance, Jasper
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.