Questions tagged [nscell]

The NSCell class provides a mechanism for displaying text or images in an NSView object without the overhead of a full NSView subclass. It’s used heavily by most of the NSControl classes to implement their internal workings.

The NSCell class provides a mechanism for displaying text or images in an NSView () object without the overhead of a full NSView subclass. It’s used heavily by most of the NSControl () classes to implement their internal workings.

References:

115 questions
4
votes
3 answers

Exposing model object using bindings in custom NSCell of NSTableView

I am struggling trying to perform what I would think would be a relatively common task. I have an NSTableView that is bound to it's array via an NSArrayController. The array controller has it's content set to an NSMutableArray that contains one or…
4
votes
2 answers

Why does NSTableView use NSCell instead of NSView?

This may be a general discussion instead of a real question. When I started using NSTableView and NSOutlineView, I thought : oh, a instance of NSView may do almost everything. So I return a NSView instance in my delegate and dataSource. Of couse it…
Andrew Chang
  • 1,289
  • 1
  • 18
  • 38
4
votes
1 answer

NSString drawInRect:withAttributes: causes 'unrecognized selector sent to instance ...'

I got something really strange: a method causes unrecognized selector sent to instance, but doesn't NSLog() anything at all. I made a custom NSControl subclass, where I try to draw my custom cells like this: - (void)drawRect:(NSRect)dirtyRect { …
11684
  • 7,356
  • 12
  • 48
  • 71
4
votes
2 answers

Clickable links within a custom NSCell

I have a custom NSCell with various elements inside of it (images, various text pieces) and one of those text blocks may have various clickable links inside of it. I have my NSAttributedString correctly identifying the links and coloring them blue…
Mike Rundle
  • 486
  • 4
  • 9
3
votes
1 answer

How to create a NSTextFieldCell, that in edit mode displays a custom view instead of NSTextField?

I have a tableView, with 3 columns containing NSTextFieldCell. Everything is populated with bindings. The text of the cells of one of the column is computed and is not editable directly. For this column, I would like when the cell goes into edit…
Guillaume
  • 21,685
  • 6
  • 63
  • 95
3
votes
1 answer

Animation on NSCell

I'm trying to animate some of the cells in my NSOutlineView. I need to animate an icon to rotate as the iTunes syncing icon next to the device, on the left panel. I'm not really experienced in the animating field, I found this simple solution by…
mikywan
  • 1,495
  • 1
  • 19
  • 38
3
votes
1 answer

Cocoa Bindings and Custom NSCell properties

I have a problem regarding subclassed NSCells (Check Box Cells). I want them to have a title and a subtitle next to the checkmark (so I created NSString properties for these). Their values shall be set via Bindings (from the IB would be awesome) but…
3
votes
7 answers

NSTableView Drag and Drop not working

I'm trying to set up very basic drag and drop for my NSTableView. The table view has a single column (with a custom cell). The column is bound to an NSArrayController, and the array controller's content array is bound to an NSArray on my controller…
indragie
  • 18,002
  • 16
  • 95
  • 164
3
votes
1 answer

Links in NSTableView NSCell

I have been reading and experimenting with allowing links in a custom drawn NSCell for the last few days and have basically got nothing usable, there's always issues with each approach. Does anyone know of a way of doing this that works? I am custom…
Craig
  • 89
  • 4
3
votes
3 answers

Cocoa: how to implement a custom NSView with an editable text area?

What's the minimum implementation needed to make a custom NSView with an editable text area? I assume NSTextFieldCell can be used for this. I've succeeded in drawing the cell in the view (which is straightforward), but making it editable seems to…
Rinzwind
  • 1,173
  • 11
  • 23
3
votes
1 answer

Override NSSearchField "Clear field" behavior

I need to override NSSearchField action which happens when you clear the contents of the field with the "Clear" button. The default fired selector is private: _searchFieldCancel. [UPDATE] OK, I've found a solution. But how can I prevent searchField…
NikGreen
  • 700
  • 9
  • 28
2
votes
2 answers

NSAttributedString on an NSCell

I'm filling an NSOutlineView with data that I format using NSAttributedString. So far I have formatted the text font, size and color. My problem is that the foreground color doesn't change when the row is selected. If you create an NSTextFieldCell…
mikywan
  • 1,495
  • 1
  • 19
  • 38
2
votes
1 answer

How to add an NSColorWell to an NSTableView?

Is it possible to wrap an NSColorWell as an NSCell so I can add it to an NSTableView? If not, is there another solution to the problem?
JJD
  • 50,076
  • 60
  • 203
  • 339
2
votes
1 answer

NSOutlineView Changing group row color

In my NSOutlineview i am using custom cell which is subclassed from NSTextFieldCell, I need to draw different color for group row and for normal row, when its selected, To do so, i have done following , -(id)_highlightColorForCell:(NSCell…
Amitg2k12
  • 3,765
  • 10
  • 48
  • 97
2
votes
1 answer

What is the easiest way to custom NSTableView cell?

I'm an iOS developer. I recently started my Mac project, but I found that unlike UITableViewCell, which is a subclass of UIView, the cell of NSTableView is NSCell, and I even can't create it in IB. I wonder if there are some easy ways to create…
nonamelive
  • 6,510
  • 8
  • 40
  • 47