Re: [Newbie] What's wrong with my code ?
Re: [Newbie] What's wrong with my code ?
- Subject: Re: [Newbie] What's wrong with my code ?
- From: Eric Morand <email@hidden>
- Date: Tue, 27 Dec 2005 14:18:39 +0100
I'm sorry if I didn't post in the correct list, I wasn't sure of the
one to choose...
Remember, AS != ObjC. With application scripting, you always
manipulate an existing application object model, not create
application objects in isolation.
OK, I think I'm too used to ObjC ! :o)
What is the correct way to add a menu item to a popup button in AS ?
Le 27 déc. 05 à 14:01, has a écrit :
Eric Morand wrote:
After a lot of years spent with Objective-C, I'm back to
Applescript...and I've to confess that it is NOT that easy to
return !!!
In fact, I'm stuck with newbies problems (yes that's a shame). In
particular, here is a snipet of code that doesn't work :
set aMenuItem to (make new menu item)
set (title of aMenuItem) to "Test"
display dialog (title of aMenuItem)
Can anyone tell me what's wrong with this code ? I just can't see
where I made a mistake.
I assume this is from a Studio project, in which case you'd be
better posting to the AppleScript-studio list. But anyway, looks
like you've forgotten to specify an insertion location for the new
'menu item' object in the 'make' command - see the 'make' command's
'at' parameter.
Remember, AS != ObjC. With application scripting, you always
manipulate an existing application object model, not create
application objects in isolation.
has
--
http://freespace.virgin.net/hamish.sanderson/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (Applescript-
email@hidden)
Help/Unsubscribe/Update your Subscription:
@mac.com
This email sent to email@hidden
Automator Ketchup : http://automatorketchup.blogspot.com/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden