views:

166

answers:

1

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

http://stackoverflow.com/questions/626898/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?

+3  A: 

Hi Frak

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

  • Shows available outlet choices

Available outlets

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
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
you can accept his answer if it is the best answer and it is useful
stefanB