Clickable Links in NSTableView with Bindings
Clickable Links in NSTableView with Bindings
- Subject: Clickable Links in NSTableView with Bindings
- From: Robert McNally <email@hidden>
- Date: Wed, 27 Jul 2005 16:26:23 -0700
I have an NSTableView in my CoreData/Bindings-based application. Each row of the table view is to contain a string of text, one or more parts of which will be clickable links. The table column has its value bound to an NSArrayController's arrangedObjects.myObjectAttributedString where myObjectAttributedString does in fact return an NSAttributedString.
Unfortunately my attributed string is not showing up as an attributed string-- I haven't even got as far as trying to add an NSLinkAttributeName to my attributed string; I'm still stuck on simple color or font changes. I have tried subclassing NSTextFieldCell to return YES for allowsEditingTextAttributes, but this had no effect.
I have seen some discussion on how to get links working in NSTextViews, but they don't seem to directly apply to NSTextFieldCells within NSTableViews. There doesn't even seem to be a path to receive link clicks such as NSTextView's clickedOnLink:atIndex: method.
I'm sure I could accomplish what I want by abandoning bindings and/or writing a custom NSCell subclass that draws an attributed string and handles clicks on the links, etc., but isn't there an easier way?
Thanks,
Robert
--
______________________________________________________________________
Robert McNally, Arciem Engineering <http://www.arciem.com>
626/963-7760
_______________________________________________
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