• 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
Problem with dynamic reconfiguration of a TableView?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with dynamic reconfiguration of a TableView?


  • Subject: Problem with dynamic reconfiguration of a TableView?
  • From: Jerry LeVan <email@hidden>
  • Date: Thu, 07 Nov 2002 14:22:44 -0500

Hi,

I am writing a small application that reads a data file, it then determines
the number of columns to add to a tableview, builds a represention of the
file and then adds the columns to a table view that was created with no
columns.

The data shows up in the table automagically.

The problems appear when I try to repeat the process with another file...
Application crashes via a seg violation.

I enter the routine and delete the columns from the table view using many
variations of code similar to:
// Try to determine if we have been here before if so then clean up...
colArray =[NSArray arrayWithArray: [tableView tableColumns]];
NSLog(@"tmp array %@",colArray);
if([colArray count]) {
for(i=0; i< [tmpArray count] ; i++){
[tableView removeTableColumn: [tmpArray objectAtIndex:i]];
}
NSLog(@"Finished releasing columns");
// [colArray release];
// [tableView tile];
// NSLog(@"Released tmpArray");

}

I then get the file name from the user and build the data array.
I then add new columns

Of course the data array is used in the tableView delegate methods.

Taint clear to me what a suitable protocol might be for switching the number
of columns and supplying an data source that reflects the new file.

Thanks for any insight...

--Jerry
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • RE: Problem with dynamic reconfiguration of a TableView?
      • From: "Jonathan E. Jackel" <email@hidden>
    • Re: Problem with dynamic reconfiguration of a TableView?
      • From: Stéphane Sudre <email@hidden>
    • Re: Problem with dynamic reconfiguration of a TableView?
      • From: Jerry LeVan <email@hidden>
  • Prev by Date: Re: [OT] iNet Unix Tools on OS X
  • Next by Date: Re: To all cocoa developers - new cocoa dev forum
  • Previous by thread: Re: Constants in Cocoa [Was Re: Magic Numbers]
  • Next by thread: Re: Problem with dynamic reconfiguration of a TableView?
  • Index(es):
    • Date
    • Thread