• 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: Sizing table columns to fit data - a solution looking for suggestions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sizing table columns to fit data - a solution looking for suggestions


  • Subject: Re: Sizing table columns to fit data - a solution looking for suggestions
  • From: Corbin Dunn <email@hidden>
  • Date: Fri, 30 Jan 2009 08:55:23 -0800


On Jan 30, 2009, at 8:33 AM, Steve Cronin wrote:

Corbin;

Hey thanks for replying!

First off, don't use the 'tableView:' prefix for your own delegate methods. Consider what would happen if AppKit introduced the same delegate method in a future release. Well, I can tell you from experience that it won't be good. So, please make it something like "scTableView:...".

This method is an existing method provided by NSObject from Apple! I didn't make the name up, I used an already existing delegate mechanism.
Am I not understanding your point?

Hah! No -- that was totally an error on my part; I thought you were making up your own delegate method...I didn't read the name carefully enough. Sorry about that mistake!



Use CGFloat not float.

OK, but why?

For 64-bit compatibility. You can read up on CGFloat / NSInteger for more info.



Setting the width in a loop is not good for performance; it might cause the table to relayout a lot of times.

The code you cited is NOT inside a loop!?? Or am I not understanding how something works?

No; your right here too; I wasn't reading it closely enough...


NSCell *cell = [tableView preparedCellAtRow:i column:column];

10.5 Only -- I wanted a 10.4 compatible solution. I didn't say that and I should have.

Ah, that's a bummer :)

That means you have to use float instead of CGFloat.

corbin


_______________________________________________

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: 
 >Sizing table columns to fit data - a solution looking for suggestions (From: Steve Cronin <email@hidden>)
 >Re: Sizing table columns to fit data - a solution looking for suggestions (From: Corbin Dunn <email@hidden>)
 >Re: Sizing table columns to fit data - a solution looking for suggestions (From: Steve Cronin <email@hidden>)

  • Prev by Date: Re: Sizing table columns to fit data - a solution looking for suggestions
  • Next by Date: Registering a protocol handler for an App
  • Previous by thread: Re: Sizing table columns to fit data - a solution looking for suggestions
  • Next by thread: Newbie question.
  • Index(es):
    • Date
    • Thread