summaryrefslogtreecommitdiff
path: root/server/xml/macros/test_lineedit.xml
diff options
context:
space:
mode:
authordeva <deva>2010-08-12 10:57:04 +0000
committerdeva <deva>2010-08-12 10:57:04 +0000
commitd9338083192084613e5530b02710b796252d342b (patch)
treee0ec2b36e0de62328e5fd5d3b597f6ee71d1b18f /server/xml/macros/test_lineedit.xml
parentdbab8458dcce186e7eb7a114a83f759d7db5445a (diff)
New scripting system part2.
Diffstat (limited to 'server/xml/macros/test_lineedit.xml')
-rw-r--r--server/xml/macros/test_lineedit.xml12
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 />