Thread View: comp.sys.next.programmer
1 messages
1 total messages
Started by Tim Bissell
Thu, 27 Aug 1992 17:50
Initialisation of custom objects
Author: Tim Bissell
Date: Thu, 27 Aug 1992 17:50
Date: Thu, 27 Aug 1992 17:50
75 lines
1596 bytes
1596 bytes
<< My system: slab/2.1 >>
Hi,
I have run into an old problem. I want to create a custom object that
loads part of itself from a nib, and does some fiddling with the nib
objects at initialisation. If I just do a loadNibSection:owner: in
my init method, the nib object pointers are still nil (according to gdb)
e.g.
@interface X:Object
{
id window;
id splitView;
...
}
...
@end
@implementation X
- init
{
[super init];
[NXApp loadNibSection:"X.nib" owner:self];
// at this point window and splitView are still 0x0/nil
[window setBackgroundGray:NX_BLACK];
...
return self;
}
...
@end
In NextAnswers (#817 I think) it addresses this problem, and says it
can be cured by adding a new method (say awake) and doing the initialisation
in there:
- init
{
[super init];
[NXApp loadNibSection:"X.nib" owner:self];
[self awake];
return self;
}
- awake
{
[window setBackgroundGray:NX_BLACK];
....
return self;
}
Unfortunately, window and splitView are *still* set to nil. Any ideas?
Thanks in advance,
Tim
--
Tim Bissell | best... tim@athen.uucp
Work:+49 89 636 49542 | hmm... tim%sinix@germany.eu.net
Home:+49 89 692 5263 | UK only... uk.co.uel!sinix!athen!tim
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads