Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Clickable Links in NSTableView with Bindings



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.