Re: Why can I make a new document this way?!
Re: Why can I make a new document this way?!
- Subject: Re: Why can I make a new document this way?!
- From: Darkshadow <email@hidden>
- Date: Wed, 17 Mar 2004 11:23:56 -0500
Hmm, that's funny, trying to do that in the test app I wrote results in
this line from Script Editor:
AppleScript Error
testApp got an error: Can't make a document.
Mike Nickerson
On Mar 17, 2004, at 4:31 AM, Angela Brett wrote:
As I understand it, the delegate method
applicationShouldOpenUntitledFile: controls whether an untitled
document is opened when the application starts up, or when the app
icon is clicked and there are no documents open. Your script is
explicitly telling the app to make a new document, so that's what the
app will do.
Actually now that I look at the documentation for
applicationShouldOpenUntitledFile: I can see why you'd think it's
called for any untitled file... I guess that's a bug in the
documentation.
I suspect that if you don't ever want to create an untitled document,
what you really want to do is make your app a viewer rather than an
editor. You can do that by editing your app's document types (under
'Info.plist entries' in the target settings.) Go through the list of
documents and make sure the Role: pop-up menu is set to Viewer for
types you don't want to be able to edit.
--
Angela Brett
email@hidden
http://apronyms.com/angela
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.