• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: shared instance and nstableview
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Re: shared instance and nstableview (From: Yorh <email@hidden>)

  • Prev by Date: Re: iClass example, core data and multiple stores
  • Next by Date: CoreData/problems with "cross-entity observing" / Undo / Redo / Save
  • Previous by thread: Re: shared instance and nstableview
  • Next by thread: indexing of objects in a subview array
  • Index(es):
    • Date
    • Thread