@graf - your method can't handle a varying number of arguments. Note - I have tested my method, and it works fine :) It's actually pretty logical now that I've understood JS a bit better. The constructor is just a function, and I'm just passing a reference to it out :)
It does say a few messages back that I'd tried throttle before, and it doesn't help.
Actually, I'll be more specific. Right now I'm doing the following
Requiring date in my RHS test code - this works with throttle on
Requiring clock in my RHS test code
requiring date again inside my clock code
It seems to be only the LAST one that generates the odd errors.
This raises questions
If there's a module cache, why does my second-level require inside clock attempt to re-load date? (I can see it printing log messages, so it is doing
this)
Hmm - presumably the second-level require inside clock is being handled by the device, not the IDE. Maybe the problem is that the code in the device to read from an HTTP address also needs throttle?
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.
@graf - your method can't handle a varying number of arguments. Note - I have tested my method, and it works fine :) It's actually pretty logical now that I've understood JS a bit better. The constructor is just a function, and I'm just passing a reference to it out :)
@Gordon
It does say a few messages back that I'd tried throttle before, and it doesn't help.
Actually, I'll be more specific. Right now I'm doing the following
It seems to be only the LAST one that generates the odd errors.
This raises questions
If there's a module cache, why does my second-level require inside clock attempt to re-load date? (I can see it printing log messages, so it is doing
this)
Hmm - presumably the second-level require inside clock is being handled by the device, not the IDE. Maybe the problem is that the code in the device to read from an HTTP address also needs throttle?
Martin