Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSAppleScript - executeAndReturnError & suspendExecution



At 10:18 PM +0000 11/8/07, has wrote:
Ken Victor wrote:

my app uses [NSAppleScript executeAndReturnError] to execute apple
scripts from its scripts menu. this works fine for many of the
functions in my app that may be invoked via an applescript. however...

if the applescript tells my app to print something, then in my
handling of the script, i will call:
	[NSAppleScript suspendExecution]
	[NSPrintOperation runOperationModalForWindow: ...]
and then in the delegate for runOperationModalForWindow... i call
	[NSAppleScript resumeExecutionWithResult:]


You appear to be confusing NSAppleScript with NSScriptCommand: -suspendExecution and -resumeExecutionWithResult: belong to the latter, not the former.

has

sorry, that was a typing into email error. the correct sequence is of course: -[NSScriptCommand suspendExecution] -[NSPrintOperation runOperationModalForWindow: ...] and then in the delegate for runOperationModalForWindow... i call -[NSScriptCommand resumeExecutionWithResult:]

and this has the above problem.
ken
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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/email@hidden

This email sent to email@hidden
References: 
 >Re: NSAppleScript - executeAndReturnError & suspendExecution (From: has <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.