Modules.addCached inside switch statement #509
Replies: 7 comments
-
Posted at 2015-11-22 by Sacha Espruino Version: 1v81.149 Copyright 2015 G.Williams |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-11-23 by @gfwilliams Thanks - seems like an issue with addCached resetting the state then. I'll file a bug for it. To be honest it's really not meant to be used like that - it's literally just for loading a module in right at the start of the code. What were you trying to achieve? There might be an easier way? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-11-23 by @allObjects ...looks like the idea of loading moudules one after the ohter for testing purposes... does this come close? (Edited: ...obviously not) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-11-23 by Sacha Hi Gordon No Problem. I transfer additional code via xbee to my espruino's as needed. Sacha |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-11-23 by @gfwilliams @sacha I think for the moment it might be better with |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-11-23 by Sacha Will do so. Thanks. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-11-24 by Sacha I've used Module.addCached successfull. Moved it temporarly out of the switch/case statment within a function. It's better than using eval. I can allways see and manage the loaded modules. My prototype is now able to load and replace modules via xbee without interupting or reset the pico. Very nice! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2015-11-22 by Sacha
Hi Gordon
this works:
When i call addCached inside a switch statement like this:
Beta Was this translation helpful? Give feedback.
All reactions