• 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
Handling hyperlinks in an NSBrowserCell
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Handling hyperlinks in an NSBrowserCell


  • Subject: Handling hyperlinks in an NSBrowserCell
  • From: Graham <email@hidden>
  • Date: Fri, 9 Jun 2006 12:33:35 -0400

I have an NSBrowser with custom cells.

The text I am displaying in the cells can have html hyperlink tags in it as well as plain text (the content of this text is out of my control).

I want to display the hyperlinks as actual links (in blue) and have a handcursor when the mouse is over them and when clicked launch the browser.
Since I am dealing with cells here and not Views it seems like I have to do all of the work myself, that is:


1) parse the text using NSXMLParser to find the <a tags and replace them with Link attributes and blue color (for example)

2) handle resetCursorRects in the parent matrix to draw the hand cursor in the appropriate positions

3) generate a message on mousedown when over some text that has a link attribute

Am I going the right path here or is there anything to reduce the amount of work for this?

Thanks
_______________________________________________
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


  • Prev by Date: Re: Open safari and send post variables
  • Next by Date: Re: Open safari and send post variables
  • Previous by thread: Re: launch cocoa app with argument
  • Next by thread: avoiding drags?
  • Index(es):
    • Date
    • Thread