making a clickable link in NSTableView
Hello, I currently have a NSTableView which displays a list of files and normally the table view is not clickable or selectable. In this list of files I actually display the file path as a subtitle to the file name. What I would like to do is to turn that file path into a clickable link that when clicked would do the equivalent of Reveal in Finder. Ideally the file path in my table view would look the way it does currently but when the mouse hovers over it then the cursor would change to a hand indicating it's a link. I'm assuming I would have to turn the file path into an NSURL but could someone point me in the right direction how to make all of this happen? Thanks! rc___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: making a clickable link in NSTableView
Hi! Here is the solution I got from DTS: http://dl.dropbox.com/u/2381634/DTS/TableViewLinks-updated.zip At a later WWDC they introduced a more evolved version of the same code: http://developer.apple.com/library/mac/#samplecode/CocoaTipsAndTricks/Introduction/Intro.html Best, Pierre Bernard Houdah Software s.à r.l. On Jun 19, 2011, at 1:08 PM, Rick C. wrote: Hello, I currently have a NSTableView which displays a list of files and normally the table view is not clickable or selectable. In this list of files I actually display the file path as a subtitle to the file name. What I would like to do is to turn that file path into a clickable link that when clicked would do the equivalent of Reveal in Finder. Ideally the file path in my table view would look the way it does currently but when the mouse hovers over it then the cursor would change to a hand indicating it's a link. I'm assuming I would have to turn the file path into an NSURL but could someone point me in the right direction how to make all of this happen? Thanks! rc___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/pierre.bernard%40lists.houdah.com This email sent to pierre.bern...@lists.houdah.com - - - Houdah Software s. à r. l. http://www.houdah.com HoudahGeo: One-stop photo geocoding HoudahSpot: Powerful Spotlight frontend ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: making a clickable link in NSTableView
Look at TableViewLinks/NSAttributedStringAdditions.m in the sample code. - Original Message - From: Rick C. rickcort...@gmail.com To: Cocoa Development cocoa-dev@lists.apple.com Sent: Sunday, June 19, 2011 4:08:11 AM Subject: making a clickable link in NSTableView Hello, I currently have a NSTableView which displays a list of files and normally the table view is not clickable or selectable. In this list of files I actually display the file path as a subtitle to the file name. What I would like to do is to turn that file path into a clickable link that when clicked would do the equivalent of Reveal in Finder. Ideally the file path in my table view would look the way it does currently but when the mouse hovers over it then the cursor would change to a hand indicating it's a link. I'm assuming I would have to turn the file path into an NSURL but could someone point me in the right direction how to make all of this happen? Thanks! rc___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/lrucker%40vmware.com This email sent to lruc...@vmware.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: making a clickable link in NSTableView
Great thanks all for pointing me in the right direction. I'll post back if I have any further questions... On Jun 20, 2011, at 12:55 AM, Lee Ann Rucker wrote: Look at TableViewLinks/NSAttributedStringAdditions.m in the sample code. - Original Message - From: Rick C. rickcort...@gmail.com To: Cocoa Development cocoa-dev@lists.apple.com Sent: Sunday, June 19, 2011 4:08:11 AM Subject: making a clickable link in NSTableView Hello, I currently have a NSTableView which displays a list of files and normally the table view is not clickable or selectable. In this list of files I actually display the file path as a subtitle to the file name. What I would like to do is to turn that file path into a clickable link that when clicked would do the equivalent of Reveal in Finder. Ideally the file path in my table view would look the way it does currently but when the mouse hovers over it then the cursor would change to a hand indicating it's a link. I'm assuming I would have to turn the file path into an NSURL but could someone point me in the right direction how to make all of this happen? Thanks! rc___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/lrucker%40vmware.com This email sent to lruc...@vmware.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com