Mailing Lists: Apple Mailing Lists

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

How to pass a selected NSPopUpButton value to a variable



Hi!

I am using a simple pop up button (NSPopUpButton) with two values in it that
the user can select: 1 or 0

I am trying to figure out how to pass the selected value (either 1 or 0) to
an AppleScript variable. The name of the pop up button is 'control'. This
is the code I have so far:

on action theObject

if name of theObject is "control" then
set myVariable to contents of data cell "control"

end if

end action

Whenever I execute this script, I get an error: -1708

Thanks for any help!
Brendon Bruns
_______________________________________________
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.



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.