• 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
Lazy calculation of tooltip text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Lazy calculation of tooltip text


  • Subject: Lazy calculation of tooltip text
  • From: Jonathan Taylor <email@hidden>
  • Date: Fri, 06 Jul 2018 16:22:56 +0100

I have a UI item (text field) that displays a tooltip when the user hovers over
it. However, the information to be displayed in the tooltip is dynamic and
relatively expensive to compute. At the moment the tooltip is bound to a string
property which I manually update twice a second. It seems that the right way to
handle all this would be to compute the information only when I know the
tooltip is about to display. However, googling and searching of headers has not
led me to a way to do this. It seems that NSTextView has a method
textView:willDisplayToolTip:forCharacterAtIndex: which would seem to offer the
functionality I want. However, I can’t find anything equivalent for other view
types.

Any suggestions on how I might supply tooltip text dynamically, when the
tooltip is about to display?

[University of Glasgow: The Times Scottish University of the Year 2018]
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Lazy calculation of tooltip text
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Re: Why are the simplest things the hardest?
  • Next by Date: Re: Lazy calculation of tooltip text
  • Previous by thread: Re: Why are the simplest things the hardest?
  • Next by thread: Re: Lazy calculation of tooltip text
  • Index(es):
    • Date
    • Thread