You are reading a single comment by @ChristianW and its replies. Click here to read the full conversation.
  • Thanks @allObjects for the insights.
    I will try to understand what you were saying and refactor my code a bit.
    It seems there were a fews ways of doing OOP in Javascript for some historical reasons, but it is hard to find the "right" just for the Espruino world since there are not many examples here.
    Most of the code snippets here are just simple and short and just do everything globally.
    I felt like having some things encapsulated, so this it what I ended up with.

    Minification is a thing to try, but I was worried about possible error messages and not being able to track them back to their source.

    Actually after one session when everything froze I had a syntax error in my ErrorLog object:

    >ErrorLog.log
    =[
      SyntaxError: SyntaxError: Got ')' expected EOF
     ]
    

    Any idea about that?
    The code had no errors when it was uploaded. May it have changed itself?
    Memory issues?

About

Avatar for ChristianW @ChristianW started