cocoa - How to get the row in a NSTableView when rowAtPoint: doesn't reflect the partially visible top row? -
this result in nstableview top visible row visible:
====== rowatpoint: -> 0 rowatpoint: -> 0 ------ rowatpoint: -> 1 rowatpoint: -> 1 ------ but kind of result when nstableview in scroll position top visible row partially visible:
====== rowatpoint: -> 0 ------ rowatpoint: -> 0 should 1 rowatpoint: -> 1 ------ rowatpoint: -> 1 should 2 rowatpoint: -> 2 ------ am misunderstanding purpose of rowatpoint: ?
-[nstableview rowatpoint:] works in coordinate system of table. guess you're using point relative enclosing nsclipview. use -[nsview convertpoint:fromview:] or similar method proper coordinate.
Comments
Post a Comment