Hi all,

I have a document-based app.  Doc opening is working well.

Now my app also needs to be able to open .foo files.  However, these are
not document files, and there is no NSDocument subclass related to
them.  I want to treat .foo files specially (show a special window), and
let Cocoa handle other files as it normally does.  But how...?

I've tried:

1) Subclassing NSDocumentController and implementing
openDocumentWithContentsOfURL:display:error:.  This almost works
perfectly.  I can detect .foo files and do my special handling, but when
I return nil, Cocoa 'helpfully' displays a generic error message, which
I do not want.  Even overriding willPresentError: to return nil doesn't
suppress the alert.

2) I could install my own handler for the open AppleEvent, and
handle .foo properly, but how can I let Cocoa handle other files
normally?  There doesn't seem to be a way to get the current handler,
for me to delegate to.

I hope I'm missing something easy...

Cheers,

--
____________________________________________________________
Sean McBride, B. Eng                 [EMAIL PROTECTED]
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


_______________________________________________

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 [EMAIL PROTECTED]

Reply via email to