# Renaming isn't... real? Problem with any component blocks

**URL:** <https://community.thunkable.com/t/renaming-isnt-real-problem-with-any-component-blocks/146234>\
**Category:** Questions about Thunkable X\
**Tags:** design\
**Created:** [July 17, 2019, 1:46pm UTC](https://community.thunkable.com/t/renaming-isnt-real-problem-with-any-component-blocks/146234 "2019-07-17T13:46:13Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![maxb](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/maxb/32/35200_2.png) [@maxb](https://community.thunkable.com/u/maxb)\
**Post date:** [July 17, 2019, 1:46pm UTC](https://community.thunkable.com/t/renaming-isnt-real-problem-with-any-component-blocks/146234/1 "2019-07-17T13:46:13Z")

</div>

I discovered that even if I renamed a design element (a button in this case) the update hasn’t been registered so, since my any block component is looking for a specific name, which I set, in the design part of the app, but in the actual app it’s calling the button with an old name.

I explain:

My button was called “Button\_Pizza”.

Then I renamed it to “Main\_Button\_Pizza”.

So I created any blocks events that interacted with the new name “Main\_Button\_Pizza”.

But if I check and make the app show me the name of the component that I’m clicking, it shows that the button that I rename “Main\_Button\_Pizza” is called “Button\_Pizza”.

Hope it’s clear.

---

<div class="post-metadata">

**Author:** ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)\
**Post date:** [July 17, 2019, 1:54pm UTC](https://community.thunkable.com/t/renaming-isnt-real-problem-with-any-component-blocks/146234/2 "2019-07-17T13:54:04Z")

</div>

Thanks Max,

Can you share a screenshot of the blocks you are using to do this test please?

Thanks!

---

<div class="post-metadata">

**Author:** ![maxb](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/maxb/32/35200_2.png) [@maxb](https://community.thunkable.com/u/maxb)\
**Post date:** [July 17, 2019, 1:57pm UTC](https://community.thunkable.com/t/renaming-isnt-real-problem-with-any-component-blocks/146234/3 "2019-07-17T13:57:36Z")

</div>

A very simple one: ![Screenshot_2019-07-17%20Thunkable](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/0/209a4272dd5e39430a7a6acae94850f8b2cc7fa8.png)

Like, in this case, when I press that button, instead of “Pulsante\_Main\_Margh…etc”, I get and older name, and it’s the same for the other buttons.

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [July 17, 2019, 4:29pm UTC](https://community.thunkable.com/t/renaming-isnt-real-problem-with-any-component-blocks/146234/4 "2019-07-17T16:29:37Z")

</div>

You can show your screen, how could you get the name of the component with this block? As far as I understand, this block returns the hash code of the object and cannot return the object name.

---

<div class="post-metadata">

**Author:** ![maxb](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/maxb/32/35200_2.png) [@maxb](https://community.thunkable.com/u/maxb)\
**Post date:** [July 17, 2019, 4:49pm UTC](https://community.thunkable.com/t/renaming-isnt-real-problem-with-any-component-blocks/146234/5 "2019-07-17T16:49:14Z")

</div>

I don’t exactly know what the hash is,

What happens is that when i press the button that you can see in that screenshot, the “Pulsante\_Main\_Margherita al taglio” I get from the app “Pulsante\_Margherita”  
which is an old name that I gave to that button, but I changed to use it with anycomponent blocks and I should get “Pulsante\_Main\_Margherita al taglio” as text.

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [July 17, 2019, 4:55pm UTC](https://community.thunkable.com/t/renaming-isnt-real-problem-with-any-component-blocks/146234/6 "2019-07-17T16:55:14Z")

</div>

The name of my button is btnCreateComponent. When the block is executed below, the screen below is shown.

![%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/e/ae8f7ebd03d2692f9a27aee9bdd427eb202386a7.png)

 ![%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/0/804b0fb09703d9a6a78daf18b24493a6d72ff397.png)

How did you get the name I do not understand.

---

<div class="post-metadata">

**Author:** ![maxb](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/maxb/32/35200_2.png) [@maxb](https://community.thunkable.com/u/maxb)\
**Post date:** [July 17, 2019, 5:46pm UTC](https://community.thunkable.com/t/renaming-isnt-real-problem-with-any-component-blocks/146234/7 "2019-07-17T17:46:32Z")

</div>

Cause you created a JSON from the object but the “component” is the name of the button that is clicked in the “when any button is clicked” event

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [July 17, 2019, 6:21pm UTC](https://community.thunkable.com/t/renaming-isnt-real-problem-with-any-component-blocks/146234/8 "2019-07-17T18:21:40Z")

</div>

Let me disagree with you. JSON cannot affect the retrieved value in any way, because in this case this block is used to display data in string form, in case component is an object.

If you have this block returns the name of the object, then it says a bug.

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [July 17, 2019, 6:23pm UTC](https://community.thunkable.com/t/renaming-isnt-real-problem-with-any-component-blocks/146234/9 "2019-07-17T18:23:48Z")

</div>

In which version of Android and on which device is your name displayed?

---

<div class="post-metadata">

**Author:** ![maxb](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/maxb/32/35200_2.png) [@maxb](https://community.thunkable.com/u/maxb)\
**Post date:** [July 17, 2019, 6:24pm UTC](https://community.thunkable.com/t/renaming-isnt-real-problem-with-any-component-blocks/146234/10 "2019-07-17T18:24:39Z")

</div>

I think the component should return the name of the design object, other wise what’s the use of it?

It in fact works if I use the Pulsante\_Margherita name, but it should work with the new renaming to be perfect and very useful.

I’m on samsung s7, not sure about os version but it’s the same on iPhone

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [July 17, 2019, 6:25pm UTC](https://community.thunkable.com/t/renaming-isnt-real-problem-with-any-component-blocks/146234/11 "2019-07-17T18:25:55Z")

</div>

This is surprising, because the code is displayed on my iPhone6.

---

<div class="post-metadata">

**Author:** ![maxb](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/maxb/32/35200_2.png) [@maxb](https://community.thunkable.com/u/maxb)\
**Post date:** [July 17, 2019, 6:26pm UTC](https://community.thunkable.com/t/renaming-isnt-real-problem-with-any-component-blocks/146234/12 "2019-07-17T18:26:19Z")

</div>

What code?

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [July 17, 2019, 6:29pm UTC](https://community.thunkable.com/t/renaming-isnt-real-problem-with-any-component-blocks/146234/13 "2019-07-17T18:29:08Z")

</div>

Screenshot from my device (iPhone6 iOS 12.3.1) screen.

 ![%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/9/69e7c230d693dd1d0d8ed2000c054eeb999f41ee.png)

---

<div class="post-metadata">

**Author:** ![maxb](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/maxb/32/35200_2.png) [@maxb](https://community.thunkable.com/u/maxb)\
**Post date:** [July 17, 2019, 6:33pm UTC](https://community.thunkable.com/t/renaming-isnt-real-problem-with-any-component-blocks/146234/14 "2019-07-17T18:33:22Z")

</div>

do it with a button

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [July 17, 2019, 6:33pm UTC](https://community.thunkable.com/t/renaming-isnt-real-problem-with-any-component-blocks/146234/15 "2019-07-17T18:33:23Z")

</div>

Try my project. Do you press the button to show the name of the button in it as well?

[https://x.thunkable.com/projects/5d2f697d7ba3d8f40acd5825/project/properties/designer/](https://x.thunkable.com/projects/5d2f697d7ba3d8f40acd5825/project/properties/designer/)

---

<div class="post-metadata">

**Author:** ![maxb](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/maxb/32/35200_2.png) [@maxb](https://community.thunkable.com/u/maxb)\
**Post date:** [July 17, 2019, 6:35pm UTC](https://community.thunkable.com/t/renaming-isnt-real-problem-with-any-component-blocks/146234/16 "2019-07-17T18:35:49Z")

</div>

Ah ok ok, so, what I think is:

Renaming the design elements takes some time, it’s not instant,

So the code that you are getting is the code that the system gave to your button, if you leave it there, I don’t know for how long, it will be changed to the name you gave it

---

<div class="post-metadata">

**Author:** ![maxb](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/maxb/32/35200_2.png) [@maxb](https://community.thunkable.com/u/maxb)\
**Post date:** [July 17, 2019, 6:37pm UTC](https://community.thunkable.com/t/renaming-isnt-real-problem-with-any-component-blocks/146234/17 "2019-07-17T18:37:11Z")

</div>

In my app I don’t get a code, I get an older name that I gave to the button

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [July 17, 2019, 6:40pm UTC](https://community.thunkable.com/t/renaming-isnt-real-problem-with-any-component-blocks/146234/18 "2019-07-17T18:40:46Z")

</div>

As you know, there is a block for dynamically creating a button during program execution. When using this block, we do not specify a name. For this reason, it is more logical that the reference to the component returns the code representation of the object, and not its name.

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [July 17, 2019, 6:42pm UTC](https://community.thunkable.com/t/renaming-isnt-real-problem-with-any-component-blocks/146234/19 "2019-07-17T18:42:18Z")

</div>

Max, I did not understand. Does my application return a code when you click a button?

---

<div class="post-metadata">

**Author:** ![maxb](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/maxb/32/35200_2.png) [@maxb](https://community.thunkable.com/u/maxb)\
**Post date:** [July 17, 2019, 6:43pm UTC](https://community.thunkable.com/t/renaming-isnt-real-problem-with-any-component-blocks/146234/20 "2019-07-17T18:43:11Z")

</div>

Yes, it does return a code, instead of the button’s design name.

But in my app, the same blocks, return a name, instead of a code.

[Next page](https://community.thunkable.com/t/renaming-isnt-real-problem-with-any-component-blocks/146234.md?page=2)
