Yes, you could calculate the vars - but as I said above it'll mess up saving/loading if there isn't a fixed number of vars.
One more question could we do something like Bluetooth = nothing;
This is what @Wilberforce suggested. If you had saved code there are still ways to keep access to that object so it can be used - but I guess if you're destroying any saved code when you update it's ok. On boot you'd need to jsvObjectSetChild(execInfo.root,"Bluetooth",0) - it can still be worked around though.
Personally I'd recommend modifying each function - that way the user actually gets a Bluetooth not enabled message.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Yes, you could calculate the vars - but as I said above it'll mess up saving/loading if there isn't a fixed number of vars.
This is what @Wilberforce suggested. If you had saved code there are still ways to keep access to that object so it can be used - but I guess if you're destroying any saved code when you update it's ok. On boot you'd need to
jsvObjectSetChild(execInfo.root,"Bluetooth",0)
- it can still be worked around though.Personally I'd recommend modifying each function - that way the user actually gets a
Bluetooth not enabled
message.