Re: Popup buttons
Re: Popup buttons
- Subject: Re: Popup buttons
- From: Matthew Stuckwisch <email@hidden>
- Date: Sun, 31 Mar 2002 21:12:05 -0600
Now to make my problem stranger:
Even though I load the sheet with the popup button via the standard command
set thePanel to load panel "newgame" from nib "options"
display panel thePanel attached to window "Hangman"
It actually loads the panel (which I have an extra copy of it in) from
MainMenu.nib
For example, if I add a random widget to the one in Mainmenu but not in
options, I see the widget. But at the same time, I cannot call the one in
Mainmenu directly, I get an error. I'm thinking maybe it's loading both
panels at once which might cause the double checks with the "Animals"
category always checked. Unfortunatly I can't find a work-around for this.
Does anyone have any ideas? (for any of said 1001 problems)
Matthew Stuckwisch
[AIM/MSN]{GuifaSwimmer} | [Yahoo!]{SapphireTree} | [ICQ]{137477701}
[IRC]{guifa / G}(esperNET / irc.massinova.com)
In an AppleScript Studio application I'm working on, I have a popup
button being used for the user to make a choice. But when I make either
of these two calls...
set category to title of popup button "popupList" as string
set category to current menu item of popup button "popupList" as string
...I always am returned the first choice, even after I've set it to a
different option. So, trying to be a bit creative, I tried the "on
choose menu item" event handler. Using the test code...
on choose menu item theObject
set category to the title of theObject as string
display dialog category
end choose menu item
...I found that I was able to retrieve that new choice, and then by
adding the line "set the enabled of theObject to true" I could get it to
become the choice...sort of. After changing the current choice, if I
went back to change it again I would see two check marks in the same
popup button. For example (this is a Hangman app, btw), when I pull up
the menu the first time, I see this:
Category: [bAnimals]
[ Jobs ]
[ Foods ]
[ Sports ]
After choosing a category, in the sheet it looks like this (as it should)
:
Category: [ Foods ]
But then if I try to open it up again, I see this, which to my knowledge
should not happen:
[bAnimals]
[ Jobs B ]
Category: [bFoods ]
[ Sports ]
Even manually doing the line in the "on choose menu item" handler "set
current menu item of popup button "popupList" to theObject" keeps it with
the strange double chosen bug. Same for "set the enabled of theObject to
true". I can't though use "set the enabled of current menu item of popup
button "popupList" to false", that results in an error.
Is this a bug in my coding somewhere or a bug in the system?
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.
References: | |
| >Popup buttons (From: Matthew Stuckwisch <email@hidden>) |