Page 1 of 1

Can't get Combo option button to action code.

Posted: Wed Feb 22, 2023 4:50 pm
by CAsba
Hi,
I've been trying to get the user's choice from a combo button into a field. Nothing I tried worked so I tried testing if a simple dialog would work, code...

Code: Select all

on menu pick
        answer "hhhh"  
end menu pick
but it didn't.
So obviously, more rarified code wouldn't work either.
Any ideas why the dialog doesn't appear on clicking on an option ?

Re: Can't get Combo option button to action code.

Posted: Wed Feb 22, 2023 4:52 pm
by Klaus
You want to use:

Code: Select all

on menupick the_picked_item
  answer the_picked_item
end menupick
Hint: The dictionary is way better than its reputation! 8)

Re: Can't get Combo option button to action code.

Posted: Wed Feb 22, 2023 6:48 pm
by CAsba
Many, many thanks, Klaus. I can now see my way through this phase of my project.

Re: Can't get Combo option button to action code.

Posted: Wed Feb 22, 2023 8:35 pm
by dunbarx
CAsba.

Be careful, "menuPick" is a message. it is not "menu pick"

Craig

Re: Can't get Combo option button to action code.

Posted: Thu Feb 23, 2023 10:31 am
by CAsba
Thanks, Dunbarx.

Re: Can't get Combo option button to action code.

Posted: Thu Feb 23, 2023 12:40 pm
by richmond62
Screen Shot 2023-02-23 at 1.38.58 pm.png
-
Did I miss something?

Re: Can't get Combo option button to action code.

Posted: Thu Feb 23, 2023 1:09 pm
by Klaus
richmond62 wrote:
Thu Feb 23, 2023 12:40 pm
Did I miss something?
Yes, you did!
Take a look at the initial posting.

Re: Can't get Combo option button to action code.

Posted: Thu Feb 23, 2023 1:24 pm
by richmond62
OK:
the user's choice from a combo button into a field

Re: Can't get Combo option button to action code.

Posted: Thu Feb 23, 2023 1:34 pm
by Klaus
richmond62 wrote:
Thu Feb 23, 2023 1:24 pm
OK:
the user's choice from a combo button into a field
Sigh, look at the script... :?

Re: Can't get Combo option button to action code.

Posted: Thu Feb 23, 2023 4:47 pm
by richmond62
George Bush senior said, "Read my lips."

Re: Can't get Combo option button to action code.

Posted: Thu Feb 23, 2023 4:49 pm
by Klaus
I give up...

Re: Can't get Combo option button to action code.

Posted: Thu Feb 23, 2023 9:27 pm
by richmond62
Well, Klaus, why would anyone write "I've been trying to get something into a field" if they've been
trying to get someone into a room?

I suppose that's just another example of muddy thinking.
-
SShot 2023-02-23 at 22.26.02.png

Re: Can't get Combo option button to action code.

Posted: Fri Feb 24, 2023 12:39 am
by dunbarx
Children...

I am not sure if CAsba really meant put the selected menuItem into a field or not. But the clear intent was to be able to extract the value of that selection and work with it.

CAsba. What are your intentions for the user's selection? The "hard" part was already solved by Klaus. I believe you are more than able to take it from there...

Craig

Re: Can't get Combo option button to action code.

Posted: Fri Feb 24, 2023 1:49 pm
by Klaus
Richmond,

the problem, which has been solved with my first reply, was not especailly to get something from a menu into a field or onto George Bush Jr/Sr lips or to get someone into a room (whatever you may mean with that? :shock: ), but that CAsba was just using a wrong syntax.

Nothing more and nothing less, is that so hard to understand?

Re: Can't get Combo option button to action code.

Posted: Fri Feb 24, 2023 7:39 pm
by richmond62
No difficulty understanding that the OP was using the wrong syntax.

Difficulty understanding what s/he was aiming at as their words seemed to signal something different from their wonky code.

Hence Bush's lips, if you get the historico-cultural reference.