Re: Calling a nib item from AppleScript (and more..)
Re: Calling a nib item from AppleScript (and more..)
- Subject: Re: Calling a nib item from AppleScript (and more..)
- From: "Sutapalli Satyanarayana" <email@hidden>
- Date: Mon, 02 Jun 2008 21:42:18 -0600
If u are using XCode and IB, did u select "Scriptable Application" or some other application while developing?
Thanks & Regards,
Satyanarayana SVV
Novell Software Development (I) Pvt. Ltd., Bangalore, India
9886555469 (mobile)
>>> "J. Todd Slack" <email@hidden> 6/3/2008 3:48 AM >>>
Hi All,
I have an application where I create an NSStatusItem on application
startup.
I want to call Applescript when a menu option is choosen.
In Interface builder, I have a menu whos has a script defined.
When I add a menu option it gets an index of 1 and a scope Global. I
then click on the Applescript tab and give it the name "RMCreate" and
select my Applescript and I select that it should respond to 'choose
menu item.
Then in AppleScript I have:
on choose menu item theObject
if the name of theObject is equal to "RMCreate" then
display dialog ("test")
end if
end choose menu item
So I am expecting that when I select that menu option that I get a
dialog that pops up so I can verify i hit inside that conditional.
But instead I get an error:
AppleScript Error: Can't get <class menl> id 3 of item if 1 (-1728)
Can anyone tell me what this means and what I am doing wrong?
I thought I have done this before.
Leopard 10.5.3, XCode 3.0
-Jason
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden