Is it possible to call a procedure from another screen?

Hello friends !
If i create a procedure in screen1, is it possible to call it from screen2 ?
Thank you so much for your help !
Hassan

1 Like

No, just put the procedure in the backpack and copy it in the new screen.
Or if you need it to be in that specific screen, just pass the information to screen 1 and use that information to run the procedure when Screen 2 is closed.

2 Likes

Thank you Italo.
I wanted not to waste a lot of memory that’s why i was looking for a way to reuse the same procedure.
Hassan

1 Like

The procedure itself (code) doesn’t make much of a difference in memory. If you want to save memory, don’t use big images, don’t have a lot of images open at the same time and don’t use screens that are copies of other screens only with different data.

2 Likes

Thank you Italo.

It’s just a little disturbing to copy paste the same code but if we can not dot otherwise … i’ll do what it’s possible.

Hassan

Yes, I also programmed in other languages some time ago and I used to have all my functions (procedures) in a separate file which was called when needed. Unfortunately, that is not possible in Kodular.

2 Likes

@Hassan_AKHZAM
Now we have a great tool to copy blocks!!! See below.

2 Likes

@Italo
So do I.
It would be very useful to have a library, ready to load at willing.

4 Likes