Leopard weirdness

Christiaan Hofman cmhofman at gmail.com
Fri Jun 6 07:51:44 PDT 2008


On 6 Jun 2008, at 4:26 PM, Andreas Höschler wrote:

> Hi all,
>
> we are in the process of migrating our software from MacOSX 10.2 and  
> GNUstep to MacOSX 10.5 and figured out a bunch of weird issues  
> [modifications to AppKit we dislike to say the least, or that we  
> don't understand yet] that prevent our apps from working properly.
>
> Our apps build NSTableViews programmatically (based on a property  
> list) and sets the columns to editable or not using [tableColumn  
> setEditable:flag]. All our tableviews also get
>
> 	[tableView setDoubleAction:@selector(performDoubleActions)];
> 	[tableView setTarget:self];
>
> The behaviour we expect and are used to since the old OPENSTEP days  
> (the same on MacOSX 10.2 and GNUstep) is that a doubleclick in an  
> editable column starts editing the cell, a doubleclick on a non- 
> editable column invokes the doubleaction of the tableview. On MacoSX  
> 10.5 the action is always invoked, no cell is editable anymore  
> whether setEditable:YES was invoked or not. :-(

That's probably not correct. Initiating an edit has changed on 10.5  
though. You have to single click the cell in the selected row to edit,  
rather than double click. This means you first have to select the row,  
then wait at least the double-click time, and then click again. So it  
works like changing a file name in Finder.

I personally also feel this is annoying, but it's something we'll have  
to get used to, as it's now the reality.

On the other hand, this allows you to have both an editable cell and a  
double click action for the same cell.

> Is this supposed to be a feature? If so I don't understand the  
> reasoning. Or am I missing anything.

Yes for both questions.

>
> We commented out the line that sets the action for now. Now the  
> columns that got a setEditable:YES are editable. However, one has to  
> do a direct hit on the text to start editing. If one doubleclicks  
> slightly to the right of the text (but still within the cell)  
> editing is not started anymore. This is pretty annoying!! :-(
>

I also think that the need to click on the text is annoying behavior.  
I'm not sure if it's a bug though, but I truly fail to see any reason  
for this (AOT single-click editing I described above). Especially for  
still empty cells it makes it really hard to edit. I do believe this  
is cause for a bug report (or at least an enhancement request).

> Please tell me that I am doing things wrong and that these  
> incompatibilities can be overcome with a few #ifdefs! I can't  
> believe what I see...
>
> Thanks,
>
>  Andreas


So it's not an incompatibility you're seeing. Everything you could do  
in the past you can still do now. And in fact you can do more. It just  
works differently.

You can't simply revert back to the old editing behavior, it would  
require you to override several methods in NSTableView, like  
mouseDown:. It's very tricky to do that correctly. Moreover, this is  
now the standard behavior, so better be consistent. So I advice you to  
get used to it.

Christiaan



More information about the MacOSX-dev mailing list