highlighting menu item in main menu bar
highlighting menu item in main menu bar
- Subject: highlighting menu item in main menu bar
- From: "email@hidden" <email@hidden>
- Date: Mon, 1 Jun 2009 09:34:14 -0700
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 (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:
This email sent to email@hidden