• 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: Assigning a custom formatter to a tablecolum in email@hidden
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Assigning a custom formatter to a tablecolum in email@hidden


  • Subject: Re: Assigning a custom formatter to a tablecolum in email@hidden
  • From: Bert Torfs <email@hidden>
  • Date: Thu, 20 Jan 2005 18:48:49 +0100

Thanks a lot! Works like a dream and allows me to set my numberFormatter once for all!

Bert


On 18-jan-05, at 22:51, Jonathan Jackel wrote:

That's because you need to attach the formatter to the data cell of the column, not the column itself. The data cell gets reused over and over when the column's contents are drawn.

Go to the Data palette. Find the NSTextFieldCell (represented by the word "Text" with lines above and below it). Drag that cell to the header of the relevant column. A triangle will appear in the column's header cell.

Click once on the header cell to select it. Then click once on the triangle to select it. Then control-drag from the triangle to your formatter in your nib's palette.

Jonathan

On Jan 18, 2005, at 3:22 PM, Bert Torfs wrote:

Hi all,

I guess this is basic, but I am basically stuck.
I dropped a NSNumberFormatter to my instances in IB and assigned it my custom class. Control dragging from a NSTextField to the instance allows me to set the formatter or that textfield. I want to do the same for tablecolumns (my table is a custom version of NSTableView). However, I can not find a formatter outlet. I keep clicking and clicking on the column header to get to the cell, but I cannot get any further than the column - which has only a tableCell outlet. What do I do wrong?


Thanks a lot.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden


This email sent to email@hidden




_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Assigning a custom formatter to a tablecolum in IB (From: Bert Torfs <email@hidden>)
 >Re: Assigning a custom formatter to a tablecolum in IB (From: Jonathan Jackel <email@hidden>)

  • Prev by Date: Re: NSTask output and input - Related question
  • Next by Date: Getting a Service-based app frontmost
  • Previous by thread: Re: Assigning a custom formatter to a tablecolum in IB
  • Next by thread: Window Menu
  • Index(es):
    • Date
    • Thread