Re: shared instance and nstableview
Re: shared instance and nstableview
- Subject: Re: shared instance and nstableview
- From: "Lawrence Sanbourne" <email@hidden>
- Date: Wed, 10 May 2006 14:07:32 -0500
On 5/10/06, Yorh <email@hidden> wrote:
I made some test:
All the shared istances are ok.
The strange thing is this one:
If I try to add a new record in the nstableview using a IBAction it
works:
-(IBAction)add:(id)sender{
NSLog (@"awake");
NSMutableDictionary * theDict = [[NSMutableDictionary alloc]init];
[theDict setValue:@"1.2.3.4" forKey:@"ip"];
[theDict setValue:@"456" forKey:@"port"];
[theDict setValue:@"test da button" forKey:@"channelName"];
[theDict setValue:@"2000" forKey:@"users"];
[[GAChannelList sharedInstance]addOneChannel:theDict];
[channelListView reloadData];
NSLog (@"shared dal datasource after action:%@",[GAChannelList
sharedInstance]);
}
But if I try to add it via this method the nstableview isn't refreshed:
-(void)addChannel:(NSMutableDictionary*)allTheChannels{
[[GAChannelList sharedInstance]addOneChannel:allTheChannels];
[channelListView reloadData];
NSLog (@"shared dal datasource loop:%@",[GAChannelList
sharedInstance]);
}
Of course the allTheChannels dictionary isn't empty and if I try to
print it in this loop I can read all the correct data :(
Really don't know why!
Can you post the code that calls -addChannel:? Maybe allTheChannels is
empty? Maybe there's a bug in addOneChannel:?
Larry
_______________________________________________
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