Re: Formatter for NSTableView[Solved]
Re: Formatter for NSTableView[Solved]
- Subject: Re: Formatter for NSTableView[Solved]
- From: Jonathan Jackel <email@hidden>
- Date: Sun, 31 Oct 2004 18:11:37 -0500
If you are going to use IB to hook up outlets, you might as well do it
in a way that doesn't require code.
First, make sure that IB knows about your formatter subclass. The
easiest way is to drag the "h" icon in the title bar of the header's
window in XCode into the nib's instances view in IB.
Then, drag a formatter to the instances view. If you've subclassed
NSNumberFormatter, drag one of those.
Then, Get Info... on the formatter. Go to the custom class display.
Change the class of the formatter to your subclass.
Then, select the header cell of the column you want to format. You'll
probably have to click a bunch of times. Make sure the info palette
shows that you have selected the header cell, not the scroll view,
table view, or table column.
Then ctrl-drag from the header cell to the formatter instance and hook
up the formatter outlet.
Jonathan
On Oct 21, 2004, at 2:57 PM, Peter Karlsson wrote:
It works, nice.
I just connected my controller to the formatter in IB and used this
line in
awakefromnib:
[[[[soundsquidWindow_DeviceTableviewOutlet tableColumns]
objectAtIndex:0]
dataCell] setFormatter:PartFieldFormatter];
Peter
Ursprungligt meddelande
Can someone please tell me what I need to do to connect my formatter
to my
tableview? I have tried the following code but I can't get it to work.
[[[[soundsquidWindow_DeviceTableviewOutlet tableColumns]
objectAtIndex:0]
dataCell] setFormatter:PartFieldFormatter];
Ursprungligt meddelande
Dear list!
I have a formatter for my NSTextField that works exactly as I want.
It's
done by subclassing NSFormatter. Most of the work is done in
isPartialStringValid.
Can I use the same formatter for my NSTableView? So the user can
edit a
row
in the table and my formatter checks every keypress?
Best regards Peter
_______________________________________________
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
_______________________________________________
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
_______________________________________________
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
_______________________________________________
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