• 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: Fun with table column identifiers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fun with table column identifiers


  • Subject: Re: Fun with table column identifiers
  • From: Brian Webster <email@hidden>
  • Date: Mon, 28 Oct 2002 13:48:35 -0600

On Monday, October 28, 2002, at 01:26 PM, email@hidden wrote:

Hi,

I am working on an app that requires that the number of table columns in a
table view be determined at run time.

My first solution was to create the table view with no columns and then add
the columns at the appropriate time.

The problem with this approach is that the column headers lose their Aqua
look.

Hmm, I've got code that creates NSTableColumns from scratch, and I haven't experienced this problem. Could you post the code that you use to create the table columns?

If you type an integer in for the column identifier, how can you
retrieve the column?

You can use any object as a column identifier, but Interface Builder will only let you specify a string as a column's identifier. So, when you type in a number, you're actually giving it a string identifier, @"1". If you want to be able to use other types of objects for identifiers using IB, go ahead and file a feature request for Interface Builder on the bug reporter, but for now you're going to have to either set NSNumber identifiers in code or use NSStrings instead. NSNumber does have a stringValue method that you can use to get an appropriate string for a given number, so you could go that direction as well - it basically depends on which way you feel is less ugly. :)

--
Brian Webster
email@hidden
http://homepage.mac.com/bwebster
_______________________________________________
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.

  • Prev by Date: Fun with table column identifiers
  • Next by Date: Re: How to implement font bigger/smaller buttons?
  • Previous by thread: RE: Fun with table column identifiers
  • Next by thread: Fun with table column identifiers
  • Index(es):
    • Date
    • Thread