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 however I can't figure out how to get the cursor to turn into a hand and allow a user to ac...
I am building a toy app using core data for two entities Log (attributes text and date) and Tag with a many-to-many tags relationship from Log to Tag.
I want to show logs in a table, so I:
created an NSArrayController instance, LogController in IB with entity set to Log (pic)
created a one-column NSTableView whose column is bound to ...
This is my table view delegate:
- (void)tableView:(NSTableView *)tableView willDisplayCell:(id)aCell forTableColumn:(NSTableColumn *)tableColumn row:(int)row
{
id theRecord;
NSMutableString *gid;
theRecord = [tableDataSource objectAtIndex:row];
gid = [theRecord objectForKey:@"gid"];
if (([gid intValue] % 2) != 0)
...
I've added a NSPathCell to a table view:
- (void)awakeFromNib {
NSPathCell *pathCell = [[[NSPathCell alloc] init] autorelease];
[pathCell setPathStyle:NSPathStylePopUp];
[pathCell setControlSize:NSSmallControlSize];
[pathCell setAllowedTypes:[NSArray arrayWithObject:@"public.folder"]];
[[tableView tableColumnWithIdentifier:@"destin...
An NSControl's cell isn't in the view hierarchy. Am I correct?
If it isn't, how is it being drawn on the view if it's not in the view hierarchy?
I ask because I want to have a View/Control subclass that I can drag out onto a contentview, then add buttons into that view, and have the lowest component be the cell. So the cell can get all...
Hello everybody,
in my cocoa application, I need a custom NSCell for an NSTableView. This NSCell subclass contains a custom NSButtonCell for handling a click (and two or three NSTextFieldCells for textual contents). You'll find a simplified example of my code below.
@implementation TheCustomCell
- (void)drawWithFrame:(NSRect)cellFrame ...
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 more NSObject instances of a model class. What I don't know how to do is expose the model i...
Currently I'm drawing an NSImage in a custom NSCell like so:
- (void)drawInteriorWithFrame:(NSRect)theCellFrame inView:(NSView *)theControlView {
// roundedCornerImage creates a new NSImage with rounded corners, rather than clipping.
[[anIcon roundedCornerImage:5] drawInRect:anIconBox fromRect:NSZeroRect operation:NSCompositeSou...
I'm struggling with trying to find an elegant way of displaying the column headers for a table view in a vertical fashion (rotated 90 deg counter clockwise from traditional). I'm not married to doing this as an actual NSTableHeaderCell, I figured it might be easier to do it by overriding NSTextFieldCell or NSCell.
The cells only contai...
In Cocoa, I have an NSOutlineView where the cells are NSTextFieldCell. The cell displays values which are strings that are formatted according to certain rules (such as floats or pairs of floats with a space in between). I have made a custom NSFormatter to validate the text, and this seems to work with no problem.
However, the cell (or ...
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 require a more complicated coordination between the view and the cell. Is there sample code ...
OK I'm really stumped on this one. I want to make a checkbox with a
NSTextFieldCell combined together. It's important that the checkbox
goes ON if the mouse hits the box, NOT the text. I've accomplished
this, more or less, but the issue is receiving the mouse event because
I click one checkbox in a row, but ALL of them turn to NSOnState....
I have several NSComboBoxes created in Interface Builder, and one created programmatically.
The NSComboBoxes created in Interface Builder are perfect. I have their Value bound to the Shared User Default Controller, and when their view is opened they are sitting there with the correct value. Importantly, this value is shown as "normal"...
Ok, so I am creating an iTunes overlay for a client. My question is, with a given index, how am I able to move the displayed cells/cells in a row to a specific entry in the table view, programatically.
In other words, replicating iTunes when you are on a playlist it jumps in its table view to the next song if the table view (strictly th...
I have a custom control that I use that has some (NSTextField *) NSCells in it.
I have attempted at the cell level to disable all cells from usage, yet my loop that goes through all the cells seems to do nothing.
[myCell setEnabled:NO];
compile and run...
cell is still clickable and editable.
My final goal is to ofcourse disable onl...
I have an NSArray of custom NSObjects. Each object has some properties and an image that I would like to display in a grid view. NSMatrix appears to be a good solution to my problem, but I am having issues getting the content of the objects to display.
Couple of things to note.
I am not using core data
I am trying to do this programm...
I display a file list and want to show the file icon and editable file name in a NSTableColumn.
Also what would be the best way to display an additional NSImage immediately behind the file name (i mean not adding an additional column at the right side for the second icon).
...
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 drawing the NSCell using - (void)drawInteriorWithFrame:(NSRect)theCellFrame inView:(NSV...