# Use of images without assigning to component

**URL:** <https://community.thunkable.com/t/use-of-images-without-assigning-to-component/158374>\
**Category:** Questions about Thunkable X\
**Tags:** image\
**Created:** [July 27, 2019, 12:39pm UTC](https://community.thunkable.com/t/use-of-images-without-assigning-to-component/158374 "2019-07-27T12:39:05Z")\
**Posts on this page:** 10\
**Page:** 2

<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 29, 2019, 9:47am UTC](https://community.thunkable.com/t/use-of-images-without-assigning-to-component/158374/21 "2019-07-29T09:47:51Z")

</div>

I know about Mark’s warning. And you have a choice - either wait for the global variables to work adequately or use crutches. I prefer to use crutches.

Images from the database will work fine if the blocks working with them work.

Yes, I create function variables and then delete them.

Why I use. variable functions? Because they work correctly, they do not slow down the editor of the blocks and have scope only inside the screen containing them.

Why I try not to use global variables? Because they work in an incomprehensible and unsuitable way for me, they greatly inhibit the work in the block editor and are visible on all screens.

---

<div class="post-metadata">

**Author:** ![Mark](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mark/32/18133_2.png) [@Mark](https://community.thunkable.com/u/Mark)\
**Post date:** [July 29, 2019, 4:17pm UTC](https://community.thunkable.com/t/use-of-images-without-assigning-to-component/158374/22 "2019-07-29T16:17:39Z")

</div>

Max,

Can you post a link to a simple app that demonstrates the problem.

-Mark

> [@maxb](#):
>
> Right, I tested as you said a very basic one and it worked, so now I’m stepping up from there, and this is not working already.
> 
> ![4 Screenshot_2019-07-28 Thunkable.png](http://community.thunkable.com/uploads/thunkable1/original/3X/7/5/756401000efa82900bba8780bee6a6e917167e33.png)
> 
> I get the value that is set in the object’s property but not the image I set as the screen opens.
> 
> I think I’m stuck.

---

<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 29, 2019, 4:40pm UTC](https://community.thunkable.com/t/use-of-images-without-assigning-to-component/158374/23 "2019-07-29T16:40:07Z")

</div>

Those blocks and an initiated app variable that’s a list of 3 objects with , in this case, an “Immagine” property are all you need @Mark.

What happens in those blocks you quoted is that even if you just set the property to the image, the app will not do it if it’s an app variable, it only works if you use a function’s variable, as @actech pointed out.

You should find the problem in this example actech made if you change from the function variable to an app variable

> [@actech](#):
>
> I understood the problem. The point is in the type of the variable. If you use a global variable, it will not really work. This is surprising.
> 
> For this reason, I try to use variable functions that work as expected.
> 
> [https://x.thunkable.com/projects/5d3ddbda9288fa6ca26ec7d3/project/properties/designer/](https://x.thunkable.com/projects/5d3ddbda9288fa6ca26ec7d3/project/properties/designer/)

---

<div class="post-metadata">

**Author:** ![Mark](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mark/32/18133_2.png) [@Mark](https://community.thunkable.com/u/Mark)\
**Post date:** [July 29, 2019, 9:24pm UTC](https://community.thunkable.com/t/use-of-images-without-assigning-to-component/158374/24 "2019-07-29T21:24:47Z")

</div>

Thanks, Max. I’ll take a look.

-Mark

---

<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 30, 2019, 10:21am UTC](https://community.thunkable.com/t/use-of-images-without-assigning-to-component/158374/25 "2019-07-30T10:21:35Z")

</div>

BTW @Mark there is also this bug where you can’t initialize an image directly in an object’s property but you have to add it in a second moment with an ‘action’

> [@Use of images without assigning to component](http://community.thunkable.com/t/use-of-images-without-assigning-to-component/158374/3):
>
> I just tried to attach the block “from image x get the image” to the object propoerty but it says I can’t

---

<div class="post-metadata">

**Author:** ![Mark](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mark/32/18133_2.png) [@Mark](https://community.thunkable.com/u/Mark)\
**Post date:** [July 30, 2019, 4:52pm UTC](https://community.thunkable.com/t/use-of-images-without-assigning-to-component/158374/26 "2019-07-30T16:52:44Z")

</div>

This has to do with the order that things are initialized in an app. It is possible that a component property (like `Picture`) might not have yet been initialized before we initialize all the app variables, so we don’t allow those property getter blocks to be used within the `'initialize app variable ...'` block.

-Mark

---

<div class="post-metadata">

**Author:** ![Mark](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mark/32/18133_2.png) [@Mark](https://community.thunkable.com/u/Mark)\
**Post date:** [July 30, 2019, 5:07pm UTC](https://community.thunkable.com/t/use-of-images-without-assigning-to-component/158374/27 "2019-07-30T17:07:56Z")

</div>

This is a bug in our implementation of variables and we are working on fixing it.

-Mark

_As a geeky aside:_

_For those of you who have some experience with programming languages and their implementations, the issue is related to the fact that we support copy semantics for variable references, rather than reference semantics. Most existing textual languages, though, use reference semantics for variables. For most users of a product like ours, we feel that our approach makes more sense, as it is generally simpler to understand and reason about, but it could be confusing to those of you who have experience with programming._

_If you want to discuss this further, let me know in a DM, and we can continue the discussion there._

---

<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 31, 2019, 12:39am UTC](https://community.thunkable.com/t/use-of-images-without-assigning-to-component/158374/28 "2019-07-31T00:39:23Z")

</div>

Ok, so I can mark your answer as ‘solution’ and just wait for a fix?

Did this help you track the bug?  
I’m asking to understand if this is useful or a waste of your time.

Thanks.  
Hope thunkable gets better and better 👍

P.s.: I wish I could help but I’m not a programmer ☹

---

<div class="post-metadata">

**Author:** ![Mark](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mark/32/18133_2.png) [@Mark](https://community.thunkable.com/u/Mark)\
**Post date:** [August 5, 2019, 7:30pm UTC](https://community.thunkable.com/t/use-of-images-without-assigning-to-component/158374/29 "2019-08-05T19:30:15Z")

</div>

> [@maxb](#):
>
> Ok, so I can mark your answer as ‘solution’ and just wait for a fix?

That’s up to you.

> [@maxb](#):
>
> Did this help you track the bug?

Yes

> [@maxb](#):
>
> Hope thunkable gets better and better

We’re working hard!

-Mark

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 12:11pm UTC](https://community.thunkable.com/t/use-of-images-without-assigning-to-component/158374/30 "2024-11-08T12:11:58Z")

</div>



[Previous page](https://community.thunkable.com/t/use-of-images-without-assigning-to-component/158374.md?page=1)
