• 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: TableColumn visibility issue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TableColumn visibility issue


  • Subject: Re: TableColumn visibility issue
  • From: Jerry Krinock <email@hidden>
  • Date: Sun, 14 Oct 2007 13:30:10 -0700

On 2007 Oct, 14, at 12:43, Steve Cronin wrote:

I was under the impression that the tableView in the nib is archived
and not altered by any of the addTableColumn/removeTableColumn activity.

Yes, that is correct. (Or else we're all in big trouble!)

However, during a later application launch, when I read the [tv
tableColumns] in the tableView's -awakeFromNib what I find  is that
only the columns which were visible when the application was last
terminated are there.

It looks to me as though these statements in -windowDidLoad will do that...


NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
if ([ud boolForKey:@"hideFistName"] == YES) [listTableView
    removeTableColumn:[[listTableView myTableColumns]
         objectForKey:@"firstName"]];
if ([ud boolForKey:@"hideLastName"]  == YES) [listTableView
    removeTableColumn:[[listTableView myTableColumns]
         objectForKey:@"lastName"]];

Your NSUserDefaults, ud, ^are^ saved between application launches, in ~/Library/Preferences/com.myCompany.MyApp.plist
_______________________________________________


Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >TableColumn visibility issue (From: Steve Cronin <email@hidden>)

  • Prev by Date: Re: TableColumn visibility issue
  • Next by Date: Re: TableColumn visibility issue - SOLVED
  • Previous by thread: Re: TableColumn visibility issue - SOLVED
  • Next by thread: Pasting NSImage problems
  • Index(es):
    • Date
    • Thread