shared instance and nstableview
shared instance and nstableview
- Subject: shared instance and nstableview
- From: Yorh <email@hidden>
- Date: Wed, 10 May 2006 00:57:36 +0200
Hi to all,
I have a strange problem with a nstableview and a data model.
I have a datasource with all the standard delegate methods of the
nstableview and a data model that is shared.
The data source is instatiate by IB , and the data model directly by
the init method:
+(GAChannelList*)sharedInstance{
static GAChannelList * sharedList = nil;
if (sharedList == nil) {
sharedList = [[GAChannelList alloc] init];
}
return sharedList;
}
- (id)init{
static GAChannelList * sharedList = nil;
if (self = [super init]) {
if (self){
sharedList = [self retain];
allData = [[NSMutableArray alloc]init];
}
}
return self;
}
When the app starts the nstableview is loaded in the right way, but
if I add some data in the data model the nstableview doesn't refresh
the view.
I tried to refresh the list putting reloadData method but without
success.
If I check the array after the adding the array is not empty .... I
really don't understand why I have this strange problem!
Anyone can help me please?
thank you all
Yorh
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden