Re: Multiple Selection in NSComboBoxCell
Kevin A. Sensenig <
ksen@...>
2012-02-25 02:01:51 GMT
Abhijeet,
I'm replying to you in private as well as to the list. I developed on Mac OS X and before that YellowBox
(NeXT-derived precursor to Cocoa that ran on Windows NT) in the late 1990s and early 2000s. You were very
clear in your question.
I don't have an answer to doing exactly what you intend here, since I haven't programmed in Cocoa for some
time, and the API has been upgraded. You could probably do something with the NSControl or NSView that
forms the NSItem in the combo box, to put NSSwitch (a checkbox) in that NSView. NSView is flexible and opens
up the entire domain of what you can put just about anywhere on the display. So if you can get to an NSView that
is part of the combo box item you can obtain multiple selections that way. That's the principle I would use
as you research the API documentation. I likely have some details wrong here, but as I recall from my
programming, the combo box or popup is made up of multiple NSItem or some such, and you may be able to access
the NSView for this item. Then you can nest. I can't check the API currently, and I'll research this myself later.
If that doesn't work for you, I would consider re-factoring the UI for that NSTableView and its parent
NSWindow. What I would do is to put the NSTableView at the top of the NSWindow and put detail controls for
data entry in ***form view*** below the NSTableView. That is, the user would select a row in the
NSTableView (which would not be editable) and then the user would data-enter the values in fields below,
on a form layout, using standard controls. For a combo-box type entry with intended multiple selections,
you could use another NSTableView instead.
I hope this helps! Feel free to let me know if I'm not clear, or if this does in fact help to clarify. And, of
course, you may have gotten clarification already.
Kevin
NeXT —> NiXU
On Feb 3, 2012, at 1:12 AM, Abhijeet Singh wrote:
(Continue reading)