name of button disappeared
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 11
- Joined: Thu Oct 26, 2006 8:15 pm
name of button disappeared
Hello,
Just messing around and getting started. I created a button of type Pull Down, put a small script into it. When it worked, I duplicated it several times. The names remained the same, and there was a small change in each script. Not efficient I know, but it worked.
Then, wondering what the other button types were like, in the dev environment I selected one of my Pull Down buttons and under Basic Properties/Type I selected each of the other types, ending up back at Pull Down.
The name of this button is now missing, and nothing I've tried -- including renaming it -- has managed to get the name back.
I know I can just delete it and make a new one, but ... any ideas what's going on?
Rob
Just messing around and getting started. I created a button of type Pull Down, put a small script into it. When it worked, I duplicated it several times. The names remained the same, and there was a small change in each script. Not efficient I know, but it worked.
Then, wondering what the other button types were like, in the dev environment I selected one of my Pull Down buttons and under Basic Properties/Type I selected each of the other types, ending up back at Pull Down.
The name of this button is now missing, and nothing I've tried -- including renaming it -- has managed to get the name back.
I know I can just delete it and make a new one, but ... any ideas what's going on?
Rob
Hi Rob,
I suspect the button will have its label property set. Try this in the message box:
set the label of button "myButton" to empty
This might not work as you have more than one button with the same name. So you might try this:
type in message box:
set the label of the mouseControl to empty
but do not hit enter yet. Instead move the mousepointer over the button with the "missing" name and hit enter then.
Hope this helps,
Malte
I suspect the button will have its label property set. Try this in the message box:
set the label of button "myButton" to empty
This might not work as you have more than one button with the same name. So you might try this:
type in message box:
set the label of the mouseControl to empty
but do not hit enter yet. Instead move the mousepointer over the button with the "missing" name and hit enter then.
Hope this helps,
Malte
-
- Posts: 11
- Joined: Thu Oct 26, 2006 8:15 pm
Thanks Malte. The second command worked; the name reappeared.
So am I to assume that setting the button type to any other type will cause this? Or is it just one of the types? Is this a bug or a "feature"?
By the way, in the inspector (is that what that window is called?) there was nothing in the label field, but setting it to empty worked anyway.
Rob
So am I to assume that setting the button type to any other type will cause this? Or is it just one of the types? Is this a bug or a "feature"?

By the way, in the inspector (is that what that window is called?) there was nothing in the label field, but setting it to empty worked anyway.
Rob
-
- Posts: 11
- Joined: Thu Oct 26, 2006 8:15 pm
Thanks again Malte,
I understand now -- makes perfect sense. Though perhaps if choosing either Option menu or Combo box sets the label property to something, choosing one of the other button types should quietly reset the label property to empty. Maybe the devs can fix that when they've got lots of time on their hands. :P
I understand now -- makes perfect sense. Though perhaps if choosing either Option menu or Combo box sets the label property to something, choosing one of the other button types should quietly reset the label property to empty. Maybe the devs can fix that when they've got lots of time on their hands. :P
HI Rob,
that would require a fair amount of tea leave reading by the engine
You can always change the label property for a button yourself. Imagine a situation where you want to loop over a set of buttons in a repeat loop. You name the butons "myButton 1", "myButton 2",...,"myButton 10"
Now you have a construct like
repeat with i=1 to 10
set the icon of btn ("myButton"&&i) to the ID of img ("myImage"&&i)
end repeat
The names make perfect sense in a programatical way, however your users will most likely not know what the buttons actually do, so you set the label property of the buttons to display a more descriptive string to your end users.
set the label of btn "myButton 1" to "play"
set the label of btn "myButton 2" to "Quit"
etc.
Setting the label is also helpful when localizing your app.
Long blahblah short, the engine will not know if you explicitly have set the label or if the setting of the label has happened when playing with the other properties.
All the best,
Malte
that would require a fair amount of tea leave reading by the engine

You can always change the label property for a button yourself. Imagine a situation where you want to loop over a set of buttons in a repeat loop. You name the butons "myButton 1", "myButton 2",...,"myButton 10"
Now you have a construct like
repeat with i=1 to 10
set the icon of btn ("myButton"&&i) to the ID of img ("myImage"&&i)
end repeat
The names make perfect sense in a programatical way, however your users will most likely not know what the buttons actually do, so you set the label property of the buttons to display a more descriptive string to your end users.
set the label of btn "myButton 1" to "play"
set the label of btn "myButton 2" to "Quit"
etc.
Setting the label is also helpful when localizing your app.
Long blahblah short, the engine will not know if you explicitly have set the label or if the setting of the label has happened when playing with the other properties.
All the best,
Malte