[Solved] Why functions created on Screen n1 are not displayed in screen n2

Dears thunkers,
i remarked that variables can be shared between screens, but functions aren’t… so we have to repeat coding the same function on all screens
is this a strategic choice from developpers or it’s just a small bug to be fixed in the news release ?

THANKS

That is the consequence of the architecture.
Each screen is its own little world, with it own scope. If the functions were carried over, you would not only have interference (click a button in screen1, should screen2 react as well, given that button in different screen can have the same name?), but screen2 would have to carry everything that was in screen1 as well (and vice versa). This would make each screen as big as the whole app in terms of memory footprint.

So basically, we need something like this:

image

I just raised a feature request: Feature request: "Copy block to other screen" option · Issue #294 · thunkable/thunkable-issues · GitHub. Please go to the link and upvote to get some attention from the developers.

Thanks

1 Like

So it looks like you can copy blocks already by using Ctlr+C and Ctrl+V on Windows/Linux or Cmd+C and Cmd+V on the Mac. Having universal functions would help though :slight_smile:

Case closed.

K

1 Like