TableView::setDoubleAction's action always responding even editable items

  • I subclassed TableView and called setDoubleAction: in
    myTableView::awakeFromNib to a method which I do a special edit on
    items a given column; All works fine for the column that I set
    UNeditable;
    According to the docs "If the double-clicked cell is editable, this
    message isn’t sent and the cell is edited instead."  In mine the
    double-click action is always called even for the columns that have
    been set editable.

    I set all columns except the one I want the doubleAction to be called,
    to editable in IB.  What am I missing?
  • On 2008 Jan, 20, at 9:14, John James wrote:

    > I subclassed TableView and called setDoubleAction: in
    > myTableView::awakeFromNib to a method which I do a special edit on
    > items a given column; All works fine for the column that I set
    > UNeditable;
    > According to the docs "If the double-clicked cell is editable, this
    > message isn’t sent and the cell is edited instead."  In mine the
    > double-click action is always called even for the columns that have
    > been set editable.
    >
    > I set all columns except the one I want the doubleAction to be
    > called, to editable in IB.  What am I missing?

    If I recall correctly, I believe that the "documentation" you are
    referring to is the Mac OS 10.5 AppKit Release Notes, and you are
    using the new "single-click to edit" feature in Leopard's NSTable/
    OutlineView.  Is that correct?

    If so, I see this in my app also, but it depends on where I click:

    STEPS TO REPRODUCE:

    1.  Click a row in an NSOutlineView to select it.
    2.  Wait 5 seconds and click again.  This should be a "single click".

    EXPECTED RESULT:  Begin editing cell.

    ACTUAL RESULT:  Depends whether or not I moved the mouse slightly
    between steps 1 and 2.  If I moved the mouse, I get the Expected
    Result.  But if I do not move the mouse, I get the doubleAction
    instead.  Very Annoying!

    I noticed that Path Finder (Steve Gehrman's Finder replacement) has
    this same issue, but Apple's Finder does not.  Is this possibly
    because Path Finder is a Cocoa app and uses an NSOutlineView subclass
    but Apple's Finder does not?

    Also, I am using an old Macally QBall Trackball (with old driver
    installed).  I wonder if that's why.  Or maybe it is a bug, but only
    noticed by people using a trackball or trackpad, since mouse users
    rarely hold their mouse perfectly still.

    Can you reproduce any of my results?
  • No, I was not intending to use that new Leopard feature. I guess you
    are using the new NSCell method hitTestForEvent:inRect:ofView.  I am
    using Leopard (development and runtime, w 10.4u SDK), but just
    subclassing TableView.  When I disconnect the new TableView all except
    the given column are editable. In fact the two clicks can be separated
    by a long time or short. It does not matter if I moved the cursor
    between the two clicks.

    However I get the same behavior you mention when the subclassed-
    TableView is hooked up.  Double clicking with the mouse in the same
    place does not edit the "editable" columns. If I move the cursor
    between clicks It does edit.  Sounds like a bug.

    On Jan 20, 2008, at 11:49 PM, Jerry Krinock wrote:

    >
    > On 2008 Jan, 20, at 9:14, John James wrote:
    >
    >> I subclassed TableView and called setDoubleAction: in
    >> myTableView::awakeFromNib to a method which I do a special edit on
    >> items a given column; All works fine for the column that I set
    >> UNeditable;
    >> According to the docs "If the double-clicked cell is editable, this
    >> message isn’t sent and the cell is edited instead."  In mine the
    >> double-click action is always called even for the columns that have
    >> been set editable.
    >>
    >> I set all columns except the one I want the doubleAction to be
    >> called, to editable in IB.  What am I missing?
    >
    > If I recall correctly, I believe that the "documentation" you are
    > referring to is the Mac OS 10.5 AppKit Release Notes, and you are
    > using the new "single-click to edit" feature in Leopard's NSTable/
    > OutlineView.  Is that correct?
previous month january 2008 next month
MTWTFSS
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
Go to today