Re: Custom NSBox, init not called from IB/nib
Re: Custom NSBox, init not called from IB/nib
- Subject: Re: Custom NSBox, init not called from IB/nib
- From: Jean-Daniel Dupas <email@hidden>
- Date: Sun, 20 Jul 2008 23:44:06 +0200
Le 20 juil. 08 à 23:31, Jacob Ole Juul Kolding a écrit :
Hello List
I quite new to Obj-C and Cocoa.
I've implemented a custom NSBox with an overwritten init function
like this:
-(id) init {
self = [super init];
if (self) {
[self setBorderType:NSNoBorder];
}
return self;
}
Added a NSBox in IB and seleceted my custom class as the base class
for the box,
but my init function is never called?
Does anyone know what I might be doing wrong?
Yes, You assume that the Nib loading will call init for each object.
But most of objects are just unarchived.
See The Nib Object Life Cycle for details:
http://developer.apple.com/documentation/Cocoa/Conceptual/LoadingResources/CocoaNibs/chapter_3_section_3.html#/
/apple_ref/doc/uid/10000051i-CH4-DontLinkElementID_7
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden