• 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
shared instance and nstableview
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: shared instance and nstableview
      • From: Andy Lee <email@hidden>
    • Re: shared instance and nstableview
      • From: "Lawrence Sanbourne" <email@hidden>
  • Prev by Date: Re: Is setNeedsDisplayInRect: smarter than I thought?
  • Next by Date: Re: shared instance and nstableview
  • Previous by thread: Re: Does a NSView's bounds.size always equal to frame.size?
  • Next by thread: Re: shared instance and nstableview
  • Index(es):
    • Date
    • Thread