FROM : Josh M. Hurd
DATE : Sat Jan 12 20:05:59 2002
Hello list,
I am having trouble with instance variables in my PrefPane.
I declare my variables in the header of my Principal Class like this:
@private
NSMutableArray *theAppList;
CFStringRef appID;
Then initialize them in initWithBundle like this:
- (id)initWithBundle:(NSBundle *)bundle
{
if ( ( self = [super initWithBundle:bundle] ) != nil )
{
appID = CFSTR("myPrefPaneBundleIdentifier");
theAppList = [NSMutableArray array];
}
return self;
}
Which is how Apple explains it in their PrefPane docs.
So far everything is OK.
I then fill my instance variable theAppList in mainViewDidLoad. This
too works fine but when I return out of this method all my variables are
killed. I set up a button which triggers a dump of these variables via
NSLog which confirm they are NULL or empty.
I can't imagine that this is a limitation to the PrefPane framework so
would someone kindly let me know what I am doing wrong?
Thanks!
M
DATE : Sat Jan 12 20:05:59 2002
Hello list,
I am having trouble with instance variables in my PrefPane.
I declare my variables in the header of my Principal Class like this:
@private
NSMutableArray *theAppList;
CFStringRef appID;
Then initialize them in initWithBundle like this:
- (id)initWithBundle:(NSBundle *)bundle
{
if ( ( self = [super initWithBundle:bundle] ) != nil )
{
appID = CFSTR("myPrefPaneBundleIdentifier");
theAppList = [NSMutableArray array];
}
return self;
}
Which is how Apple explains it in their PrefPane docs.
So far everything is OK.
I then fill my instance variable theAppList in mainViewDidLoad. This
too works fine but when I return out of this method all my variables are
killed. I set up a button which triggers a dump of these variables via
NSLog which confirm they are NULL or empty.
I can't imagine that this is a limitation to the PrefPane framework so
would someone kindly let me know what I am doing wrong?
Thanks!
M
| 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

