Can someone help me about problem that I can't save painting on canvas?

Hello! I'm planning to make an app that we can draw custom image. I wanna make a feature, saving my paintings and loading when I initialize pixel art mode. However, even though I've tried many times, the painting couldn't load no matter what. I can't figure out the problem.


Since I'm a Korean, there're words that you guys won't understand. So feel free to ask meanings

This is how the app looks like

1 Like

I think, the problem is here

You have to use the sublist instead of the main list

Taifun

Thanks for replying but it says select item list cannot accept the argument. Do you have another idea to share?

please provide the complete error message
also use Do it to debug your blocks to display your global variable

use Do it to debug your blocks, see also tip 4 here App Inventor: How to Learn | Pura Vida Apps
see also Live Development, Testing, and Debugging Tools
Taifun

image

image

Doesn't "-16777216" mean null?

Here is a simple example aia project that may help you:

recordPoints.aia (3.5 KB)

image
image

When I touched the canvas, this error message appeared. I think there's something wrong in list.

Do you have this checked in your Project Properties ? (you should have)

image

Yeah but the error message still appear

Please test my aia project.

If you are copying blocks, check your accuracy, what you show does not look the same.

I just tested and it worked perfectly. When pressing Button 2, the previous painting was loaded successfully

Your list is not a list, it is the text -11550091
How do you initialize that global variable? It shoukd be a create empty list block...
Clear TinyDB and restart testing

Taifun

I initialized it to create empty list.
image

μ…€_크기 = size of cell
κ²©μžμƒ‰μƒ = grid color
셀색상 = cell color
κ·Έλ¦Ό_데이터 = painting data
μ„ νƒλœ 색상 = selected color

instead of this global variable you could use Canvas1.PaintColor directly as @TIMAI2 is doing it in his example

Now

Let us know how it goes and if there are still issues, post an updated screenshot of your relevant blocks including Do it results

Taifun

I really appreciate all your help. However, it seems that this issue is still on.
image (When I initialize)
image (When I touch canvas)

I'm really sorry that my blocks are messy.


Here you store:

image

paintColor to your list, by itself, as a list item.

Then you add x,y,paintColor to that list

image
Like this?

Don't do it.