• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Writing a delegate from a class
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: MOKit
  • Next by Date: NSView initWithFrame called twice
  • Previous by thread: STOP notification problem
  • Next by thread: NSView initWithFrame called twice
  • Index(es):
    • Date
    • Thread