Karax: Change element value

2020-02-27 Thread herdingSheep
How do I change an element valut at runtime? I know changeName.text = n.values is incorrect but what should it be? include karax / prelude import karax / [vstyles] proc onNameEnter(ev: Event; n: VNode) = if n.value.strip() != "": changeName.text

Re: Karax: Change element value

2020-02-27 Thread herdingSheep
Thank you kidandcat. But I still did not get it to work. I changed myText = "Name will appear here" to myText: kstring = "Name will appear here" as it said that it was expecting a string but was getting a kstring. Also found a typo I made myText = n.values to myText = n.value Th

Re: Karax: Change element value

2020-02-28 Thread herdingSheep
Perfect. Thank you @kidandcat, @hiteshjasani and @jyapayne.

Karax: Adding elements

2020-03-06 Thread herdingSheep
How do I add HTML elements at runtime? I am aware of the following example [https://github.com/pragmagic/karax#event-model ](https://github.com/pragmagic/karax#event-model) but I can not convert the example to anything else but a kstring. Manipulating the code ends in failure. What if I wanted

Re: Karax: Adding elements

2020-03-07 Thread herdingSheep
Thank you @jyapayne. It seems very simple now that I see code that works.