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

Re: Problem with dynamic reconfiguration of a TableView?


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

Arrgh,

Never mind... I corrected the typos "tmpArray" should be colArray...

It seems to be working Ok, I undoubtably have a bunch of memory leaks to
track down now ;(

--Jerry

> 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.

References: 
 >Problem with dynamic reconfiguration of a TableView? (From: Jerry LeVan <email@hidden>)

  • Prev by Date: Re: How to encode STL vector
  • Next by Date: Re: [ot] To all cocoa dev...
  • Previous by thread: Problem with dynamic reconfiguration of a TableView?
  • Next by thread: Re: Problem with dynamic reconfiguration of a TableView?
  • Index(es):
    • Date
    • Thread