1

I have read and understand the answer given in this question:

How do I create delegates in Objective-C?

However, I wish to set a delegate to my main application window and was wondering where in my application I can do that - in my AppDelegate class, or somewhere else?

Community
  • 1
  • 1
frak
  • 858
  • 1
  • 10
  • 30

1 Answers1

5

Its been a long while since I did this but IIRC you simply set it up in Interface Builder. See the following screenshots:

  • Making connection between window and app controller

Making the connection http://grab.by/JXM

  • Shows available outlet choices

Available outlets http://grab.by/JXE

Note here I'm using the application's AppController, but this could be any controller you want (you would have to add an custom object in IB and set it's class to use something else).

HTH

jkp
  • 78,960
  • 28
  • 103
  • 104
  • That is exactly what I wanted to do and it works perfectly, thanks. I tried to vote you up, but I don't have enough reputation yet ;o) – frak Nov 23 '09 at 04:19
  • you can accept his answer if it is the best answer and it is useful – stefanB Nov 23 '09 at 05:11