Grouped Buttons & clickText - Solved
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Grouped Buttons & clickText
Craig,
I tried that exact code
"answer label of me"
and the reply was empty
I tried that exact code
"answer label of me"
and the reply was empty
Re: Grouped Buttons & clickText
Did you try that script in the stack I posted?
Simon
EDIT I get Answer 1 , Answer 2 and Answer 3
Simon
EDIT I get Answer 1 , Answer 2 and Answer 3
Last edited by Simon on Tue Aug 27, 2013 1:53 am, edited 1 time in total.
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Grouped Buttons & clickText
Craig,
I used that exact code and it returned empty!
I used that exact code and it returned empty!
Re: Grouped Buttons & clickText
Craig,
I used that exact code and it returned empty!
I used that exact code and it returned empty!
Re: Grouped Buttons & clickText
Doc.
The label is a basic property of a button, and if it is not empty (the default) then you will get text back. Go to the property inspector and see if, in fact, there is a label or not.
If there is, and you are getting empty, we need to know about it. But I bet you not.
I do not suppose that the mouseUp message is being diverted somehow, and that the button script is not actually being executed? Put a breakpoint at the "on mouseup" line and make sure that the button handler is being run.
Craig
The label is a basic property of a button, and if it is not empty (the default) then you will get text back. Go to the property inspector and see if, in fact, there is a label or not.
If there is, and you are getting empty, we need to know about it. But I bet you not.
I do not suppose that the mouseUp message is being diverted somehow, and that the button script is not actually being executed? Put a breakpoint at the "on mouseup" line and make sure that the button handler is being run.
Craig
Re: Grouped Buttons & clickText
Maybe post your stack.
This is not a difficult task, answering the label of the button.
Really, it shouldn't be.
Simon
This is not a difficult task, answering the label of the button.
Really, it shouldn't be.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Grouped Buttons & clickText
Simon and Craig,
The label of my group is empty.
I want to get the label of one the the buttons in the group, when I click on the button.
My stack is the beginning of a large program and is a mess at this stage.
Thanks,
David
The label of my group is empty.
I want to get the label of one the the buttons in the group, when I click on the button.
My stack is the beginning of a large program and is a mess at this stage.
Thanks,
David
Re:answer label of me
Grouped Buttons & clickText - NOT Solved 

Re: Grouped Buttons & clickText
You have not responded to my question of replacing
put the short name of me
with
put the label of me.
As I said it does work here using the stack I posted!
Anybody else want to test the posted stack with the change?
Simon
put the short name of me
with
put the label of me.
As I said it does work here using the stack I posted!
Anybody else want to test the posted stack with the change?
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Grouped Buttons & clickText
Simon,
I tried the code below and it does not work for me:
on MouseDown
answer label of me
if the label of me contains "Easy" then Correct
end MouseDown
I tried the code below and it does not work for me:
on MouseDown
answer label of me
if the label of me contains "Easy" then Correct
end MouseDown
Re: Grouped Buttons & clickText
Please update the stack I posted with your updated code save it and post it here.
I will figure out what is wrong.
Simon
I will figure out what is wrong.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Grouped Buttons & clickText
Simon,
Here a test file that I cannot get the button label from one of the buttons in the group to return when I click on it with the mouse.
I got to get up at 5AM and I need to go to bed now.
Thanks for your effort,
David
Here a test file that I cannot get the button label from one of the buttons in the group to return when I click on it with the mouse.
I got to get up at 5AM and I need to go to bed now.
Thanks for your effort,
David
Re: Grouped Buttons & clickText
Sorry, looks like you forgot to attach??
I'm in no rush
Simon
I'm in no rush

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Grouped Buttons & clickText
Simon,
This file is for you!
This file is for you!
- Attachments
-
- Group.zip
- (798 Bytes) Downloaded 688 times
Re: Grouped Buttons & clickText
Ok.
Commenting out the group "on mouseDown" fixed the problem.
the "Answer.." in mouseDown threw the message path of the buttons on mouseUp.
But your code did respond as it was told to, you had "answer the label of me in the group" and since the label of the group was empty that is what you got.
You should drop some breakpoints throughout your code to see if the handler is even getting executed.
Not sure why you have so many nested groups, but it's your code.
Simon
Commenting out the group "on mouseDown" fixed the problem.
the "Answer.." in mouseDown threw the message path of the buttons on mouseUp.
But your code did respond as it was told to, you had "answer the label of me in the group" and since the label of the group was empty that is what you got.
You should drop some breakpoints throughout your code to see if the handler is even getting executed.
Not sure why you have so many nested groups, but it's your code.

Simon
- Attachments
-
- group_v2.zip
- LC 6
- (851 Bytes) Downloaded 918 times
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!