FROM : Andreas Monitzer
DATE : Sun Jan 13 11:23:46 2002
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
DATE : Sun Jan 13 11:23:46 2002
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
| Related mails | Author | Date |
|---|---|---|
| Josh M. Hurd | Jan 12, 20:05 | |
| Josh M. Hurd | Jan 13, 00:35 | |
| Josh M. Hurd | Jan 13, 09:34 | |
| Andreas Monitzer | Jan 13, 11:23 | |
| Josh M. Hurd | Jan 13, 12:24 |






Cocoa mail archive

