• 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
Setting tooltips for a NSMatrix
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Setting tooltips for a NSMatrix


  • Subject: Setting tooltips for a NSMatrix
  • From: Stephan Burlot <email@hidden>
  • Date: Tue, 14 Dec 2004 15:36:51 +0100

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:
This email sent to email@hidden


  • Follow-Ups:
    • [SOLVED] Re: Setting tooltips for a NSMatrix
      • From: Stephan Burlot <email@hidden>
  • Prev by Date: Re: Parsing date strings with NSDate
  • Next by Date: Getting the computer name
  • Previous by thread: Re: Cocoa-dev Digest, Vol 1, Issue 409
  • Next by thread: [SOLVED] Re: Setting tooltips for a NSMatrix
  • Index(es):
    • Date
    • Thread