Re: Tootips in NSTextView/NSTextfields

Andy Lee

On Jan 4, 2018, at 12:25 PM, Andy Lee <aglee@...> wrote:
Your code works for me.  It's a little fussy though about placement of the text cursor.  I had to position the tiny horizontal mark in the middle of the text cursor just *under* the word "tooltip" instead of directly over it.

I did find a problem: the tooltip doesn't seem to work the first time I position the cursor, only on subsequent attempts.

For testing purposes I found it helped to add .cursor:NSCursor.pointingHand to the attribute dictionary.  That cursor's hot spot is the tip of the finger, so to me it feels easier to position the cursor in a way that triggers the tooltip.

I wonder if there is a bug in the iBeam cursor.  The docs say the default hot spot is "where the crossbeam intersects the I", but it doesn't seem to work that way for purposes of triggering the tooltip.


Join { to automatically receive all group messages.