• 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
NSComboBoxCell example
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSComboBoxCell example


  • Subject: NSComboBoxCell example
  • From: "Theodore H. Smith" <email@hidden>
  • Date: Mon, 30 May 2005 21:56:47 +0100

Can someone direct me to a downloadable NSComboBoxCell example?

I've been looking for one on google but I can't find any that I understand or that is downloadable. For example this one here: http:// www.cocoadev.com/index.pl?NSComboBoxCellExample

It's not downloadable. I could spend maybe a few hours trying to put this together, only to find I did it wrong or that maybe it doesn't demonstrate what I need, at which point I must look for a different example and those hours are wasted.

And this, I totally don't get:

-(id)tableView:(NSTableView*)tableView objectValueForTableColumn: (NSTableColumn*)tableColumn row:(int)index
{
return [[records objectAtIndex:index] objectForKey:[tableColumn identifier]];
}



When you are using NSComboBoxCell, your table is now a 3D table! You have the row, column, and combobox selection as the indexes. So how is this code working then?


Don't tell me that NSComboBoxCell is being treated as a plain old string? If that is the case, then the I need to modify the behaviour. This is because for some (but not all) rows, I want the combobox to not allow arbitrary text to be entered, only allowing the values that are in the combo's list.

But for other rows, I want the user to be able to enter arbitrary text, even if it's not listed in the combo's list.

So then this really makes the table a 3d table. Do I need to look up the value of the string in objectValueForTableColumn, within the array of strings I have for that particular cell, to get the third index?

Thanks if you can help!

--
http://elfdata.com/plugin/ Industrial strength string processing, made easy.


"All things are logical. Putting free-will in the slot for premises in
a logical system, makes all of life both understandable, and free."

_______________________________________________
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


  • Follow-Ups:
    • Re: NSComboBoxCell example
      • From: "Sean McBride" <email@hidden>
    • Re: NSComboBoxCell example
      • From: Fritz Anderson <email@hidden>
  • Prev by Date: Re: NSTextFieldCell subclass - location of text displayed
  • Next by Date: Re: NSTextFieldCell subclass - location of text displayed
  • Previous by thread: Re: Timezone of NSCalendarDate
  • Next by thread: Re: NSComboBoxCell example
  • Index(es):
    • Date
    • Thread