deleting columns in a NSTableView
deleting columns in a NSTableView
- Subject: deleting columns in a NSTableView
- From: Martin Kautz <email@hidden>
- Date: Mon, 27 May 2002 10:45:00 +0200
Hello list,
since I'm using a NSTableView with dynamic generated amount of columns I
need to delete all columns before I start a new query (which could contain a
different result set with a different amount of columns).
What's wrong with that? My first result set contains 4 columns an this sort
of init code only deletes 2 columns instead of 4!
for (i=0; i<[table numberOfColumns]; i++) {
NSLog (@"Column %i to be removed: %d",
i, [[table tableColumns] objectAtIndex:i]);
[table removeTableColumn:[[table tableColumns] objectAtIndex:zz]];
NSLog (@"Now we do have %i columns", [table numberOfColumns]);
}
TIA,
Martin
_______________________________________________
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.