Use of images without assigning to component

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.

Max,

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

-Mark

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

Thanks, Max. I’ll take a look.

-Mark

1 Like

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’

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

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.

1 Like

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 :+1:

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

2 Likes

That’s up to you.

Yes

We’re working hard!

-Mark

2 Likes