On Monday, July 14, 2003, at 09:25 PM, Thilo Planz wrote:

quite off-topic

Not if someone can find an answer that uses Perl. ;-)


I am amazed by these sherlock:// and itms:// URLs.

Does anyone know how this works, if everyone can register "protocols" for their own apps (or if it is closed to Apple's) and where I can find some documentation about this architecture?

Fair warning: I'm guessing, and I haven't tested my theory to verify it.


I haven't found any docs either, but reading between the lines a bit, it looks to me like the "URL Types" section of the "Application Settings" pane in Project Builder is where you list the URL schemes your app responds to. Then, in a document-based app, you would then implement -readFromURL:ofType: in your document class to open requests for the registered URL schemes.

Note that you would implement -readFromURL:ofType: *instead* of loadDataRepresentation:ofType: in your document class, so if you want to load from files as well as URLs, you'd need to check for file:// URLs in addition to any of the custom URL schemes you've registered.

If it's really as simple as that, there's no reason you couldn't do it from a CamelBones app - the latest 0.3 pre-release includes a project template for document-based apps.

Are other applications also using this?

I've thought about adding perldoc:// links to ShuX - one important step was making it document-based, and that's done now.


sherm--

The Golden Gate wasn't our fault either, but we still put a bridge
across it.
            --Larry Wall



Reply via email to