• 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
App-specific URLs and the pasteboard. Need help.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

App-specific URLs and the pasteboard. Need help.


  • Subject: App-specific URLs and the pasteboard. Need help.
  • From: Duncan Champney <email@hidden>
  • Date: Fri, 18 Jan 2008 10:27:11 -0500

I'm having problems adding my application's app-specific URL to the pasteboard.

My application, FractalWorks, creates fractal images. It has the option to create a URL that encodes all the parameters to recreate the image. (The app is available as a free trial if you'd like to try it out. Click the above link to download it from dotMac.)

I use the URL prefix "fractalworks://"

I build my URL string in the variable theURLString, then add it to the general pasteboard using the following code:

theFW_URL = [NSURL URLWithString:theURLString];
[theFW_URL writeToPasteboard: thePasteBoard];
NSString* theURLName = [NSString stringWithFormat: NSLocalizedString(@FW_URL_PREFIX ,nil), theDocumentName];
success = [thePasteBoard setString:theURLName forType: NSStringPboardType];


My goal is to be able to paste the URL into different target applications (Apple's mail client, TextEdit, iChat, etc) and have it appear as a clickable link, with the document title as the displayed name, e.g. Fractalworks plot Mesh Julia. I'd also like to be able to paste the URL onto websites using Safari, FireFox, Sea Monkey, etc. Browsers generally want one of a couple of markup formats:

   <u><a href="link">clickable text</a></u>

or

   [url=link]clickable text[/url]

I could certainly add options to generate a simple string object in either of those formats.

The clickable link, though, has me stuck. TextEdit is the only app that recognizes my URLs and creates a clickable link like want it to. Some apps only paste the URL title as plain text, and others paste the body of the URL as plain text.

If I select the clickable link in TextEdit and copy it, I can paste it into other apps just fine. I can't figure out what format to use when adding my URL to the pasteboard.

Can somebody help?


Duncan Champney _______________________________________________

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: App-specific URLs and the pasteboard. Need help.
      • From: Jonathon Mah <email@hidden>
    • Re: App-specific URLs and the pasteboard. Need help.
      • From: Alastair Houghton <email@hidden>
  • Prev by Date: Packages are deleted during installation in Leopard
  • Next by Date: Re: NSFileManager and making sure you don't overwrite existing files 10.5
  • Previous by thread: Packages are deleted during installation in Leopard
  • Next by thread: Re: App-specific URLs and the pasteboard. Need help.
  • Index(es):
    • Date
    • Thread