load() parameters #4985
Replies: 1 comment
-
Posted at 2022-07-11 by @gfwilliams Thanks - yes, I can see that could be a good idea. The problem we have right now is that between apps literally everything gets torn down - including variables. So I guess to pass anything, Espruino would have to convert it into a string (JSON?) store that on the stack, and then pass it back in... Posted at 2022-07-11 by rigrig
Maybe restrict it to passing a string, and just make apps handle converting to/from JSON if they need to? That way Espruino doesn't need to handle conversion failures, and extending it later to allow more/complex values won't break anything. Posted at 2022-07-11 by @gfwilliams Good point, yes... |
Beta Was this translation helpful? Give feedback.
-
Posted at 2022-07-09 by rigrig
I get that we won't have persistent variables for good reasons, but maybe we could pass values when calling
load()
?The first case I'm thinking about would the messages app: it would be nice if incoming "music" could be passed directly into the app, instead of writing it to flash and reading it back inside the app.
And in general it might be nice if you could directly tell an app to load a specific screen.
Beta Was this translation helpful? Give feedback.
All reactions