Re: NSOutlineView, tracking in a custom NSTextFieldCell, & Shift&Cmd Keys

2009-01-19 Thread Eric Gorr
On Jan 19, 2009, at 10:40 AM, Eric Gorr wrote: The problem appears to be that my trackMouse code consumes the mouseUp event and that is preventing [super mouseDown:theEvent] from terminating. One possible solution is to add a method to my custom cell class to set a flag which tells the t

Re: NSOutlineView, tracking in a custom NSTextFieldCell, & Shift&Cmd Keys

2009-01-19 Thread Eric Gorr
On Jan 16, 2009, at 5:12 PM, Corbin Dunn wrote: On Jan 16, 2009, at 11:34 AM, Eric Gorr wrote: Note that for my custom cell class I have: + (BOOL)prefersTrackingUntilMouseUp { // NSCell returns NO for this by default. // If you want to have trackMouse:inRect:ofView:untilMous

Re: NSOutlineView, tracking in a custom NSTextFieldCell, & Shift&Cmd Keys

2009-01-16 Thread Corbin Dunn
On Jan 16, 2009, at 11:34 AM, Eric Gorr wrote: Note that for my custom cell class I have: + (BOOL)prefersTrackingUntilMouseUp { // NSCell returns NO for this by default. // If you want to have trackMouse:inRect:ofView:untilMouseUp: // always track until the mouse is up,

Re: NSOutlineView, tracking in a custom NSTextFieldCell, & Shift&Cmd Keys

2009-01-16 Thread Eric Gorr
Note that for my custom cell class I have: + (BOOL)prefersTrackingUntilMouseUp { // NSCell returns NO for this by default. // If you want to have trackMouse:inRect:ofView:untilMouseUp: // always track until the mouse is up, then you MUST return YES. // Otherwise, s

Re: NSOutlineView, tracking in a custom NSTextFieldCell, & Shift&Cmd Keys

2009-01-16 Thread Eric Gorr
Unfortunately, this does not appear to be a working solution quite yet. I have overridden the mouseDown method in my NSOutlineView subclass to be: - (void)mouseDown:(NSEvent *)theEvent { [super mouseDown:theEvent]; NSPoint eventLocation = [theEvent locationInWindow]; NSPoin

Re: NSOutlineView, tracking in a custom NSTextFieldCell, & Shift&Cmd Keys

2009-01-15 Thread Corbin Dunn
Reply for cocoa-dev: Eric is right -- NSTableView won't do tracking in a cell if the shift or alt keys are down. This is intentionally done, and has always been the case. A possible work around is what Eric is thinking about, which is to override mouseDown and do his own trackMouse logic.

Re: NSOutlineView, tracking in a custom NSTextFieldCell, & Shift&Cmd Keys

2009-01-15 Thread Eric Gorr
Thanks. Any thoughts on whether or not it is even valid to call trackMouse when obtaining a cell this (via preparedCellAtColumn) way? On Jan 15, 2009, at 4:16 PM, Corbin Dunn wrote: You want -frameOfCellAtRow:column:, not frameOfOutlineCellAtRow:row. Do you get a call to this method, if im

Re: NSOutlineView, tracking in a custom NSTextFieldCell, & Shift&Cmd Keys

2009-01-15 Thread Corbin Dunn
You want -frameOfCellAtRow:column:, not frameOfOutlineCellAtRow:row. Do you get a call to this method, if implemented on your delegate/ datasource: - (BOOL)outlineView:(NSOutlineView *)outlineView shouldTrackCell: (NSCell *)cell forTableColumn:(NSTableColumn *)tableColumn item:(id)item corb

Re: NSOutlineView, tracking in a custom NSTextFieldCell, & Shift&Cmd Keys

2009-01-15 Thread Eric Gorr
Now, one idea I had was to override the mouseDown method of my NSOutlineView to do something like: - (void)mouseDown:(NSEvent *)theEvent { NSPoint eventLocation = [theEvent locationInWindow]; NSPoint localPoint = [self convertPoint:eventLocation fromView:nil]; NSUI