discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Question about ToolTips


From: A. Arias
Subject: Question about ToolTips
Date: Sat, 01 Sep 2012 20:13:04 -0600

I'm having a problem with ToolTips in fisicalab (SVN). In fisicalab the
chalkboard is an NSView with NSBotton as subviews. Each button, if have
an element assigned, display the element's data in a tooltip. I have
implemented the -mouseMoved: method to handle the tooltips:

- (void) mouseMoved: (NSEvent *)theEvent
{
  NSPoint location = [self convertPoint: [theEvent locationInWindow]
                               fromView: nil];
  NSView *view = [self hitTest: location];
  
  if ( (view != nil) && ([view tag] > 0) )
    {
      NSNumber *num = [NSNumber numberWithInt: [view tag]];
      [view setToolTip: [informacion dataOfObject: num]];
    }
  
  [super mouseMoved: theEvent];
}

The problem with this is that don't work if you move the mouse between
two buttons when these are together (of course these two buttons have
elements assigned). The first button that gets the mouse update its
tooltip, but not the second. You should move the mouse over an empty
botton and then place the mouse over the second button, only in this way
the tooltip is updated. As far as I understand about the responder
chain, this should work. Am I doing something wrong here? or is this a
bug? Regards.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]