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

Kevin Dangoor dangoor at gmail.com
Sat Aug 6 16:16:45 CEST 2005


On 8/5/05, Bob Ippolito <bob at redivi.com> wrote:
> You may have to do that with a get URL apple event handler, see here:
> http://developer.apple.com/documentation/Cocoa/Conceptual/
> Scriptability/Concepts/ScriptabilityOverview.html
> (you shouldn't need any Carbon)

I had actually been to that page, but I wasn't completely sure that
was the right place. Having some confirmation is good... I'll head
down that path.

> Speaking of which, it might be cool if someone submitted a patch to
> the PyDocURLProtocol example to make it handle the "pydoc" URL scheme
> from other applications, rather than just its own WebKit view.
> https://svn.red-bean.com/pyobjc/trunk/pyobjc/Examples/WebKit/
> PyDocURLProtocol

Seems like that'll be easy once I figure out how to do this in my app.

> > 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?
> 
> The application delegate is the object wired up to the delegate of
> the NSApplication instance.. it has nothing to do with what the
> superclass is.  NibClassBuilder.AutoBaseClass reads the nib file to
> determine what the superclass is.

I was confused about how this wiring was done, until I loaded one of
the example MainMenu.nib files in IB and noticed the delegate outlet.
D'oh. That's too easy.

Kevin


More information about the Pythonmac-SIG mailing list