hey, wait, it seems that there is an easy to reach fix (update blogpost):
    
    
    nbKaraxCode:
      const
        helloId = "helloId"
        inputId = "inputId"
      var
        hello = "welcome to the hello program"
        name = ""
        exited = false
      karaxHtml:
        if exited:
          p:
            text "Thanks for playing!"
        else:
          p(id=helloId):
            text hello
          label:
            text "enter a name or the word 'exit':"
          input(id = inputId, `type` = "text"):
            text name
          button:
            text "Enter"
            proc onClick() =
              name = $getVNodeById(inputId).getInputText
              if name == "exit":
                echo "exiting"
                exited = true
              else:
                hello = "Hello, " & name
    
    
    Run

Reply via email to