my app has a scripts menu item (in the main menu bar). the items in this menu correspond to applescript files the user has placed in my application support folder. when the user selects one of these menu items, i execute the appropriate script. i execute the script in a (sub) task (NSTask). i do it this way because i discovered (the hard/empirical way) that if an executing script, executes functionality in my app that calls -[NSScriptCommand suspendExecution], then the executing of that script will erroneously terminate early. using a sub task solves this problem.

in my app, when i launch this task, i register for the NSTaskDidTerminateNotification and in my notification routine, i display any errors returned.

this all works fine... except that as soon as i return from launching the sub task, the menu item (in the main menu bar) for the scripts menu un-highlights. i would like this to remain highlighted until my notification routine is called, in order to provide feedback to the user that his/her script is still executing.

is this possible? if so, could someone provide any code and/or documentation pointers?

thanx,
ken
_______________________________________________

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 arch...@mail-archive.com

Reply via email to