Re: Pref Panes and Instance Variables?
Re: Pref Panes and Instance Variables?
- Subject: Re: Pref Panes and Instance Variables?
- From: Andreas Monitzer <email@hidden>
- Date: Sun, 13 Jan 2002 11:23:46 +0100
On Sunday, January 13, 2002, at 09:34 , Josh M. Hurd wrote:
OK I figured out what was wrong.
I had instantiated my subclass of NSPrefPane in Interface Builder
making my connections to that instance.
This caused a second instance of my subclass to be created when the Nib
loaded. Who knows which one had control, I think they both had a
little here and there...
I thought this was how the Apple docs explained it but I must have
mis-read something...
The correct answer is change the class of the File's Owner to my
subclass of NSPrefPane then make connections to that.
The retain count thing will bite you anyways. Use [[<class> alloc] init]
when you want to keep something in memory.
Read the article at StepWise about that subject.
andy