[Pythonmac-SIG] noob question: handling protocols and files

Kevin Dangoor dangoor at gmail.com
Sat Aug 6 04:51:50 CEST 2005


I've been looking through the docs on Apple's site a bit today, and
I'm not entirely certain where I *should* be looking. All I need is a
pointer to the correct terminology for what I'm trying to do (and if
PyObjC offers any specific bits that I should be aware of), and I
should be good to go from there.

I'm trying to figure out how to make my app open something the user
has requested to open from another app. My app is registered nicely
via LaunchServices with a trivial addition to Info.plist. I'm using
CFBundleURLTypes to register a URL scheme.

So, once that is registered, how do I actually get the incoming URL?

I've gathered that the application delegate gets called when the user
wants to open a file. Is a subclass of NibClassBuilder.AutoBaseClass
an application delegate?

Don't worry about writing a long description... any pointers at all
would be helpful, since the Apple docs are pretty good once you know
what you're looking for. Part of my problem is that searches on
Apple's site return an interesting mix of Carbon and Cocoa APIs,
making it less clear what the best way to do it is.

(For reference, my target is Python 2.4.1, Mac OS 10.3+, latest PyObjC...)

Thanks in advance!

Kevin


More information about the Pythonmac-SIG mailing list