• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [Newbie] What's wrong with my code ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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:23:56 +0100

Ohhhh! You must be using AppleScript Studio. That's a whole 'nother kettle of beans.

Ooops, you confirm I'm on the wrong list !!!

No, you can. I'm guessing that your create is failing in the example you posted originally because there's no "at". In AS, you can't just create a free-floating menu item. You have to attach it to its menu at creation time.

Yes, in the original example, there was no "at" and it makes sense if it fails.


But what about the real code ?

set aMenuItem to (make new menu item at the end of menu items of menu of encodersPopup with properties {title:anEncoder, enabled:true})

I attach the newly created menu item to the menu of the popup button but I can't access to its properties.

In other words :


set aMenuItem to make new menu item at the end of menu items of menu of encodersPopup with properties {title:"Test", enabled:true}
display dialog (title of aMenuItem)



...doesn't work.




Eric.



Le 27 déc. 05 à 14:14, Mark J. Reed a écrit :

On 12/27/05, Eric Morand <email@hidden> wrote:
What seems strange to me is the syntax...

make new menu item at the end of menu items of menu of encodersPopup
with properties {title:anEncoder, enabled:true}

...works perfectly : it creates a menu item, add it the the end of
the popup menu items.

Ohhhh! You must be using AppleScript Studio. That's a whole 'nother kettle of beans.


But, once I add "set aMenuItem to" and try to access the properties of "aMenuItem", I have some error messages !

If I understand well, I can create a menu item but not reference it ?

No, you can. I'm guessing that your create is failing in the example you posted originally because there's no "at". In AS, you can't just create a free-floating menu item. You have to attach it to its menu at creation time.





--
Mark J. Reed <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


  • Follow-Ups:
    • Re: [Newbie] What's wrong with my code ?
      • From: "Mark J. Reed" <email@hidden>
References: 
 >[Newbie] What's wrong with my code ? (From: Eric Morand <email@hidden>)
 >Re: [Newbie] What's wrong with my code ? (From: "Mark J. Reed" <email@hidden>)
 >Re: [Newbie] What's wrong with my code ? (From: Eric Morand <email@hidden>)
 >Re: [Newbie] What's wrong with my code ? (From: "Mark J. Reed" <email@hidden>)

  • Prev by Date: Re: [Newbie] What's wrong with my code ? (addendum)
  • Next by Date: Re: [Newbie] What's wrong with my code ? (addendum)
  • Previous by thread: Re: [Newbie] What's wrong with my code ?
  • Next by thread: Re: [Newbie] What's wrong with my code ?
  • Index(es):
    • Date
    • Thread