Page 1 of 1

Textentry and Acknowledge

Posted: Tue Jun 25, 2024 8:13 am
by GMKai

Code: Select all

<textentry id="txLoginPW" Acknowledge="true" Password="true">secret</textentry>
Error:

"Error in line 20 (Main.hws): Unknown attribute "Acknowledge" in line 10!"

Typo, or documentation mistake?

Re: Textentry and Acknowledge

Posted: Tue Jun 25, 2024 2:27 pm
by plouf
i also find confusing the way is implemented a few thinks :)

use it this way

Code: Select all

<textentry id="Password_test" Notify="Acknowledge" Password="true">secret</textentry>

Re: Textentry and Acknowledge

Posted: Sun Jun 30, 2024 8:45 pm
by airsoftsoftwair
plouf wrote: Tue Jun 25, 2024 2:27 pm i also find confusing the way is implemented a few things :)
It's not that confusing IMHO. Since some attributes can be used as setters, getters and listeners, it's impossible to install a listener by setting an attribute to TRUE just like GMKai has tried it because then it would be impossible to use it as a normal setter. Take Listview.Active for example. You can set it to a value but you can also listen to it. That's why you can't just set "active" to TRUE to listen to changes in the active item because setting the "active" attribute is reserved for setting the active item.

Re: Textentry and Acknowledge

Posted: Sun Jun 30, 2024 10:05 pm
by plouf
thats one reason is confusing, setters/getters/listeners

alternative IMHO should a completely different structured manual
in this case,gathered listeners in "group" under Textentry for
* attributes applicable to moai.Get) (getter?)
* attributes applicable to moai.Set (seeters?)
* attibutes which modify gadgets i.e moai.DoMethod()
* attributes applicable to functionality ,readonly/password etc
* notification for "notify"
..more ?

and using same structure in ALL gadgets (classes) helps...