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: Popup Button Unique ID



On Jul 8, 2005, at 1:24 PM, Chris Tracewell wrote:

Neil,

Thanks for the input - your code looks good. I might be able to extract some of your elements to see if they help me out. I did come to the conclusion that i need to use an "Associated Object" for each menu item because the "tag" only uses integers and if I ever switch or mix in alpha characters as key values I would be screwed. On that note does anyone have a snippet of how to set and retrieve an Associated Object? Specifically, I need the associated object to a variable string and attached to a menu item in a popup button.

At the time that I was trying to get this application working, I didn't have any success at all trying to use the "associated object" property. (Perhaps this has improved in Tiger?) That was the main reason that I fell back on a simple scheme of keeping the information for each menu entry in an object, keeping all the objects in a list, and using the list index of the object as the tag of the menu entry. Crude and inelegant, but it works reliably. After beating my head for weeks against a "clever, elegant" solution, "works reliably" looked awfully good to me. :-)


    -Neil Faiman
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-studio mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-studio/email@hidden

This email sent to email@hidden
References: 
 >RE: Popup Button Unique ID (From: "Christopher Hickman" <email@hidden>)
 >Re: Popup Button Unique ID (From: Chris Tracewell <email@hidden>)
 >Re: Popup Button Unique ID (From: Neil Faiman <email@hidden>)
 >Re: Popup Button Unique ID (From: Chris Tracewell <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.