Creating a function usable across screens

I’m teaching my students how to create user creation and login screens from scratch. I want them to learn about Salting and Hashing passwords.

I’d like user creation to be on it’s own screen, and login to be its own screen.

I’d like to write a salt, pepper and hashing function for storing and checking passwords. However, I’m not seeing how to re-use functions across multiple screeens, and it seems clumsy to rewrite the function on each screen.

I’m new to thunkable but excited about how it can be used to quickly teach programming and rapid prototyping in school.

2 Likes

It’s a great tool and one I use in my teaching but Thunkable does not have global functions. It should. So for now you’ll need to copy code to do that. You can copy and paste blocks from one screen to another within the same project.

Please consider posting a comment on the feature request here:

The more Thunkable hears from users like us who desire that feature, the more likely it is to get implemented.

2 Likes

It is unfortunate that Thunkable does not have the concept of Global Functions but in the other hand, it allows for function names to be the same in every screen.

What I do is use one of the screens that I only add functions to it. Then whenever I need a function in another screen I copy the function from the Functions Screen and paste it to the intended one. It will maintain the same name.

Not ideal but it works for now.

2 Likes