• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
[SOLVED] Re: Setting tooltips for a NSMatrix
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SOLVED] Re: Setting tooltips for a NSMatrix


  • Subject: [SOLVED] Re: Setting tooltips for a NSMatrix
  • From: Stephan Burlot <email@hidden>
  • Date: Wed, 15 Dec 2004 00:05:22 +0100

For the archive:

doing a [pixMatrix removeAllToolTips] before calling setToolTip solves this.

If anybody can explain this...

Le 14 déc. 04, à 15:36, Stephan Burlot a écrit :

Hi,
I have a problem while setting tooltips on a NSMatrix (of NSImageCells, iPhoto like):
I do iterate over all cells in my Matrix: if the cell has the attribute dpiIsTooLow, I set the toolTip to "dpiIsTooLow", if not, I set it to "OK".


Problem is that if I change the tooltips using the method below, it doesnt change on the screen. The old toolTip is still displayed when I mouse over. I have to resize my window (and this will call other methods not discussed here) to make it appear correctly.

Other problem found while trying to debug this is that the call [pixMatrix toolTipForCell:matrixCell] will return (null), but I can see on the scren that the tooltip is not empty.

Any ideas?

Stephan

- (void) rebuildToolTips
{
  NSEnumerator      *enumerator;
  CMCell            *matrixCell;	// subclass of NSImageCell

  MARK(1);
  enumerator = [[pixMatrix cells] objectEnumerator];

  while (matrixCell = [enumerator nextObject])
  {
    if (![matrixCell transparent])
    {
      NSLog(@"matrixCell %@ has originally tooltip: %@",
          [matrixCell title],
          [pixMatrix toolTipForCell:matrixCell]);

      if ([matrixCell dpiIsTooLow])
      {
        NSLog(@"Image %@ has dpiTooLow", [matrixCell title]);
        [pixMatrix setToolTip:@"dpiTooLow" forCell:matrixCell];
        NSLog(@"matrixCell %@ has now tooltip: %@",
            [matrixCell title],
            [pixMatrix toolTipForCell:matrixCell]);
      }
      else
      {
        NSLog(@"Image %@ has NOT dpiTooLow", [matrixCell title]);
        [pixMatrix setToolTip:@"OK" forCell:matrixCell];
      }
    }
  }
}

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden


This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Setting tooltips for a NSMatrix (From: Stephan Burlot <email@hidden>)

  • Prev by Date: NSView subview covering a control
  • Next by Date: Re: NSView subview covering a control
  • Previous by thread: Setting tooltips for a NSMatrix
  • Next by thread: Getting the computer name
  • Index(es):
    • Date
    • Thread