Could you show the logic block that you used to rename the component?
I rename it in the design part, I don’t know if you can rename in the block section, I’m checking it now
Well, can you see in your application what the block of this component returns (this is the lowest block on the Any Components tab)?
Yes I tried that: I get the same result.
The fact is that the names of the components in Thunkable X are not their identifiers, as I thought earlier. Therefore, they can not act as a reference to the object. Although it would be more familiar to work with them.
What?
You renamed it in the designer, then rebuilt it, re-installed it, and it retained the old name?
I would definitely call this a bug.
Unless you saved the component names in a persistent list, as opposed to a volatile one.
But why do I get “Pulsante_Margherita” instead of a code?
And for other buttons I get other names, or “button14” where I didn’t change the name, or “button 11”, I hope it’s just something that has to be fixed/addressed
@Mark, what’s your thought?
Since every button can be associated with dedicated events “when MyButton Click/ Long Click/ Touch Down/Touch Up” that uses the name of the component, it would be interesting to see if those names are properly changed when a button gets renamed, and what they return if you make them ‘talk’.
@maxb, When I create a very simple app like the one in your screenshot, the text that I see displayed in the app when I click on a button shows what we call a UUID, like the one that @actech shows in his screen shot. I do not see the name of the component. That is by design. The component block contains that UUID as a non-changing (even when the component is renamed) reference to the component.
If you are seeing the name of the component, could you please check the version of your Thunkable Live companion app? To do that, please go to your project list in the companion. You can do that from a live project by clicking the back button in the top left. In the project list, long press (i.e. click and hold) the “thunkable” text to the right of the beaver at the top of the screen until an alert appears saying which app version your are running. The current version is 88-1. If you are seeing an older version, please update via Google Play.
If you are running the latest version of the companion and are still seeing a component name rather than the UUID could you please post a link to your project and a screenshot (or video) from your running app showing the behavior that you are describing?
Thanks in advance.
-Mark
That’s very sad for me to hear as it would have drastically reduced the number of my project blocks (but maybe more computational stress on the phone?) and automation for future improvements/changes.
Is it possible to have this name thing implemented?
Live app is 88-1,
I have the project ready to share, but do I have to delete the various references to firebase and personal stuff or will it not be shared? I can’t remember
You are right about the fact that it was much easier to work with the names of the components. But in addition to this, it is necessary to replace the drop-down lists of component types with variables. Otherwise, everything will look too complicated, as on the screen scrAnyComponent
https://x.thunkable.com/projects/5cd84f23e3097f3353fdad45/project/properties/designer/
@maxb, I’d be interested in why you believe you need to have the displayed value of a component block be the name of the component in order to do what you want? Isn’t it sufficient that when you use the component block (in generic getters, setters, method calls, when blocks, etc.) that it refers uniquely to the component? Note that his remains true even when the component is renamed.
-Mark
Just so you know, you can specify the textual name of a component for any of the generic getters, setters, methods, events, etc. The one thing that is a bit confusing (and is a bug) is that you can use the textual name of a component in equality comparisons in some old projects, but not in others and not in new projects. Our intent was for those comparisons not to work, so please don’t use them, as they might stop working at some point. We do hope to add a block that allows you to get the name of a component, and at that point you’ll be able to do those comparisons safely.
-Mark
I’m not sure exactly what you mean by the above, but you can currently assign component values to variables and use those variables in any place that a component block can be used.
-Mark
Note that while you can use the textual name of a component to refer to it on the generic blocks it is generally not advisable, precisely because it won’t work if the component is renamed. It is much safer to use a real component valued block rather than the textual name. Please see my reply below for a little more on this.
-Mark
Mark, I noticed that to set the property, it is desirable to use a block, the type of which corresponds to the type of component. For example, if in the block below for a button, a label and a input to use one block with the type “Button”, then for the Label component the Text property will not be set. Therefore it is necessary to use three blocks. If the component type in the block was chosen not from the drop-down list, but by using a variable, then this would simplify the work with such algorithms by an order of magnitude. I will add this query to the desired functions.
I’m not sure sure how often the capability you’re asking for is really needed, but it is duly noted! I see that you have added the feature request at https://github.com/thunkable/thunkable-issues/issues/196. Thanks!
-Mark
Mark, I added request to https://github.com/thunkable/thunkable-issues/issues/199 I would call it the universal blocks Any Component for calling methods.
It may be too powerful and functional blocks, but one such block can replace dozens and even hundreds of similar simple blocks Any Component.
Got it.
Cause I intended to set the names of the buttons to specific references, like “Button_Main_Pizza”, “Button_Second_Pizza”… “Button_Main_Hamburger”, “Button_Second_Hamburger”, I have many button that have to do the same thing but with different variables and the results have to be displayed on different design elements, so I was naming all the design elements and variables with recurring elements that the system would look for when deciding what to do (I wish I could use your terminology )
And then set firebase and variable values accordingly to the names;
If you click the “Main_Pizza” button do the “Main_” things with the variables of “Pizza” in the row named “Row_Pizza”,
right now I don’t know if I can do that with one variable.
Hope I explained myself
I don’t think this works for me, What I would like to do is to use the name of the button pressed to change variables and design elements that have that same name.