On Fri, Sep 28, 2012 at 10:59 AM, Staffan Tylen <email@example.com> wrote:
I'm trying to implement a pop-up menu in a tree-view and am using the hitTestInfo method to determine whether to show the menu or not:
::method onTreeViewContext unguarded
expose tree cmenu
pos = .Point~new(x, y)
say tree~hitTestInfo(pos)~hItem tree~hitTestInfo(pos)~location
if tree~hitTestInfo(pos)~hItem <> 0 then cmenu~show(pos)
Where is x and y coming from? If you are getting erratic results, x and y are probably not correct.
I'd need to see more than the above to give you a definitive answer.