diff options
Diffstat (limited to 'server/xml/macros/test_lineedit.xml')
-rw-r--r-- | server/xml/macros/test_lineedit.xml | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/server/xml/macros/test_lineedit.xml b/server/xml/macros/test_lineedit.xml index 783ad57..d706b50 100644 --- a/server/xml/macros/test_lineedit.xml +++ b/server/xml/macros/test_lineedit.xml @@ -7,18 +7,14 @@ <maps> </maps> <scripts> - <script name="A" language="lua"> - if ( value == '4' ) - then - return true - end - return false - </script> + <script language="lua" src="regexp.lua"/> </scripts> <widgets caption="Test LineEdit" layout="vbox"> - <lineedit name="dims" value="tester" script="A" map="test.data" regexp="[0-9]"/> + <lineedit name="dims" value="tester" + map="test.data" + onChange="this:setValid(regexp('^%d?%d?%d$'))"/> <frame layout="hbox"> <spacer /> |