• 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: NSTableView cross-coupling rows when editing strings?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableView cross-coupling rows when editing strings?


  • Subject: Re: NSTableView cross-coupling rows when editing strings?
  • From: Graham Cox <email@hidden>
  • Date: Fri, 19 Dec 2008 10:59:01 +1100


On 19 Dec 2008, at 10:50 am, Corbin Dunn wrote:


On Dec 18, 2008, at 3:28 PM, Graham Cox wrote:

The five kinds of representedObject are a) a custom class of my own, b) a NSColor, c) a NSString, d) a NSValue and d) an NSImage. Corresponding to these I set the dataCell to a,d) NSImageCell, b) a custom cell type to handle colours, c,d) a NSTextFieldCell.

A regular NSTextFieldCell, or a custom subclass? If so, what code is in in it?


corbin


Actually I'm using RSVerticallyCenteredTextFieldCell from Daniel Jalkut. But I've tried substituting an ordinary NSTextFieldCell and I get the same outcome. Just to show, the code where I make the cell is:

- (NSCell*)	dataCellForType:(int) aType
{
	NSCell* aCell = nil;

	switch( aType )
	{
		default:
			break;

		case kBinOutputTypeStyle:
		case kBinOutputTypeImage:
			aCell = [[NSImageCell alloc] init];
			break;

		case kBinOutputTypeColour:
			aCell = [[GCColourCell alloc] init];
			break;

		case kBinOutputTypeText:
		case kBinOutputTypeValue:
			aCell = [[NSTextFieldCell alloc] init];
			//aCell = [[RSVerticallyCenteredTextFieldCell alloc] init];
			// TODO: for value cell, attach suitable formatter
			break;
	}

	return [aCell autorelease];
}


--Graham


_______________________________________________

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 cross-coupling rows when editing strings?
      • From: Corbin Dunn <email@hidden>
References: 
 >NSTableView cross-coupling rows when editing strings? (From: Graham Cox <email@hidden>)
 >Re: NSTableView cross-coupling rows when editing strings? (From: Corbin Dunn <email@hidden>)

  • Prev by Date: Newbie scroll view problem
  • Next by Date: NSData downloaded over socket is bigger than it should be...
  • Previous by thread: Re: NSTableView cross-coupling rows when editing strings?
  • Next by thread: Re: NSTableView cross-coupling rows when editing strings?
  • Index(es):
    • Date
    • Thread