Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Creating popup menu



Luc and everyone,

I've had trouble with making menu separators dynamically under AppleScript Studio for some time as well.

I've used code nearly identical to yours with no success (i.e. - make new menu item at the end of menu items of menu of popup button X with properties {separator item:true})

Is setting this specific property non-functional under the 'menu item' class in ASS? Or are we not using the correct syntax?

I've always just had to use menu items with blank titles and their 'enabled' property set to false to build popup button menu separators.

Thanks in advance for any success stories,

Steve Elliott


On Dec 1, 2003, at 2.58 am, Luc Naets wrote:

Hi scripters

Does anybody know a way to create a separator in a popup menu on the fly?
I want to do something like this, where the item "-x-" will create the
separator.

Set mPopupContent to {"item 1", "item 2", "-x-", "item 3"}
repeat with mItem in mPopupContent
set mItem to mItem as string
if mItem is "-x-" then
make new menu item at the end of menu items of menu of popup
button mPopup with properties {separator item:true}
else
make new menu item at the end of menu items of menu of popup
button mPopup with properties {title:mItem, enabled:true}
end if
end repeat



--

Luc Naets

PrePress XTensions
Antwerpsestraat 108-116
2640 Mortsel
Tel 03 448 21 51 - Fax 03 448 21 50
_______________________________________________
applescript-studio mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-studio
Do not post admin requests to the list. They will be ignored.

References: 
 >Creating popup menu (From: Luc Naets <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.