osx - NSTableView textfield cell should not go into edit on click -
i have 2 nstableview
s in app , both set same, same parameters, etc., have several columns nstextfield
cells , first column editable.
the first table behaves want it: if user clicks, row selected. if user clicks row second time textfield goes edit mode, letting user change text in it.
the second table should act same doesn't: if click row in it, of time goes straight edit mode textfield. very, not happen.
does know causes this? checked parameters (in ib) , code , same on both tables. if set 'refuses first responder' on textfield in naughty table, doesn't let me edit textfield @ option doesn't help.
solved it! reason why works on first table view caused edit issue on second table because first table allows dragging while second did not! seems somehow interferes doubleaction
(i read somewhere editable table cannot have doubleaction
seems work without problems). fix implementing tableview(_:writerowswithindexes:topasteboard:)
in second tableview's view controller , return false
(since 2. table should not have drag'n'drop ability) ...
func tableview(atableview:nstableview, writerowswithindexes rowindexes:nsindexset, topasteboard pboard:nspasteboard) -> bool { return false; }
Comments
Post a Comment