• 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
nstableview **very** basic question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

nstableview **very** basic question


  • Subject: nstableview **very** basic question
  • From: Michael <email@hidden>
  • Date: Sat, 21 Mar 2009 15:27:58 -0600

I've been struggling with this for a few days...so time to ask, if I may.
I am trying to emulate Scott Anguish's multiplication table in his book. I cannot get tableview to show columns of constant width.


I have looked at the guides of Apple, tried to understand all the nuances of tableview, scrollview, headers etc, looked at numerous tutorials on NSTableview, (most a little dated), discerned that perhaps I should be looking at NSTableColumn, and thought I had found the answer doing this.

-(void) awakeFromNib
{
	NSLog(@"awakeFromNib: setting \"sizeToFit\"");
	[tv sizeToFit];

}

where tv is declared as:  "IBOutlet NSTableView *tv;"

As far as I can tell, the outlet is set correctly, NSLog is called at the appropriate time.

What I get when I use the above code is the first couple of columns varying in size, then the next "n" columns equally space.

If I have missed something in the documentation, I would appreciate a pointer, but somehow, I cannot believe that it is this difficult to do, but perhaps I am doing something that will become a lot easier further into Hillegas tutorial?

Thanks in advance.
_______________________________________________

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


  • Follow-Ups:
    • Re: nstableview **very** basic question
      • From: Jerry Krinock <email@hidden>
  • Prev by Date: Why isn't NSString's caseInsensitiveCompare working correctly?
  • Next by Date: Re: Why isn't NSString's caseInsensitiveCompare working correctly?
  • Previous by thread: Re: Why isn't NSString's caseInsensitiveCompare working correctly?
  • Next by thread: Re: nstableview **very** basic question
  • Index(es):
    • Date
    • Thread