[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
r6177 - trunk/gnue-samples/testcases/forms/gauntlet
From: |
johannes |
Subject: |
r6177 - trunk/gnue-samples/testcases/forms/gauntlet |
Date: |
Mon, 9 Aug 2004 07:13:22 -0500 (CDT) |
Author: johannes
Date: 2004-08-09 07:13:21 -0500 (Mon, 09 Aug 2004)
New Revision: 6177
Modified:
trunk/gnue-samples/testcases/forms/gauntlet/gauntlet.gfd
Log:
Updated and fixed a lot of stuff -- all widgets should work as intended now
Modified: trunk/gnue-samples/testcases/forms/gauntlet/gauntlet.gfd
===================================================================
--- trunk/gnue-samples/testcases/forms/gauntlet/gauntlet.gfd 2004-08-09
10:23:10 UTC (rev 6176)
+++ trunk/gnue-samples/testcases/forms/gauntlet/gauntlet.gfd 2004-08-09
12:13:21 UTC (rev 6177)
@@ -1,11 +1,8 @@
-<?xml version="1.0" encoding="iso8859-1"?>
+<?xml version="1.0" encoding="utf-8"?>
-<!-- GNUe Designer (0.4.99)
- Saved on: 2003-03-08 17:23:40 -->
-
-<form name="__main__">
+<form name="__main__" title="Gauntlet">
<options/>
- <datasource name="dtsDrpStyleTest" type="static">
+ <datasource name="dtsDrpStyleTest" type="static" prequery="Y">
<staticset fields="key,descr">
<staticsetrow>
<staticsetfield name="key" value="Y"/>
@@ -21,11 +18,13 @@
</staticsetrow>
</staticset>
</datasource>
+
<trigger name="dialogButtonTrigger" type="NAMED"><![CDATA[##
modal = 1
parameters = {'placeholder':''}
activateDialog('dialogSelector', parameters, modal)
]]></trigger>
+
<logic>
<block name="styleFields">
<field name="defaultField"/>
@@ -36,10 +35,11 @@
]]></trigger>
</field>
<field name="checkboxField"/>
- <field name="dropdownField" fk_description="descr" fk_key="key"
- fk_source="dtsDrpStyleTest"/>
+ <field name="dropdownField" fk_description="descr"
+ fk_key="key" fk_source="dtsDrpStyleTest"/>
<field name="listboxField" fk_description="descr" fk_key="key"
fk_source="dtsDrpStyleTest"/>
+
<field name="UnboundField1" case="upper"/>
<field name="UnboundField2" case="lower"/>
<field name="UnboundField3" max_length="5"/>
@@ -56,238 +56,234 @@
<field name="messageValue"/>
</block>
</logic>
- <layout xmlns:Char="GNUe:Layout:Char" Char:height="16" Char:width="62"
- tabbed="top">
- <page name="Intro">
- <label name="Label1" Char:height="1" Char:width="62" Char:x="0"
- Char:y="0" alignment="center" text="Welcome To Gauntlet"/>
- <label name="Label2" Char:height="1" Char:width="58" Char:x="1"
- Char:y="1" text="This form is intended as a stress test for
gnue-forms and "/>
- <label name="Label3" Char:height="1" Char:width="54" Char:x="1"
- Char:y="2" text="gnue-designer. It is not designed as a learning
tool."/>
- <label name="Label4" Char:height="1" Char:width="54" Char:x="1"
- Char:y="3" text="That said, a lot of coding examples can be
pulled from"/>
- <label name="Label12" Char:height="1" Char:width="47" Char:x="1"
- Char:y="4" text="this form if you are willing to dig through
it."/>
- <label name="Label21" Char:height="1" Char:width="59" Char:x="1"
- Char:y="6"
- text="Not every forms feature is tested in this form.
Developers"/>
- <label name="Label22" Char:height="1" Char:width="56" Char:x="1"
- Char:y="7" text="should execute all the testcases relevant to the
section"/>
- <label name="Label23" Char:height="1" Char:width="27" Char:x="1"
- Char:y="8" text="upon which they are working"/>
- </page>
+
+ <layout xmlns:c="GNUe:Layout:Char" c:height="14" c:width="62" tabbed="top">
<page name="Widgets">
- <label name="Label5" Char:height="1" Char:width="62" Char:x="1"
- Char:y="0" alignment="center"
- text="The following widgets are currently available"/>
- <label name="Label7" Char:height="1" Char:width="7" Char:x="3"
- Char:y="2" text="Default"/>
- <label name="Label8" Char:height="1" Char:width="8" Char:x="3"
- Char:y="3" text="Password"/>
- <label name="Label9" Char:height="1" Char:width="9" Char:x="24"
- Char:y="3" text="Dropdown "/>
- <label name="Label21" Char:height="1" Char:width="9" Char:x="46"
- Char:y="1" text="Listbox"/>
- <label name="Label10" Char:height="1" Char:width="5" Char:x="24"
- Char:y="2" text="Label"/>
- <entry name="Entry1" Char:height="1" Char:width="10" Char:x="12"
- Char:y="2" block="styleFields" field="defaultField">
+
+ <label c:x="1" c:y="0" c:height="1" c:width="60" alignment="center"
+ text="The following widgets are currently available"/>
+
+ <box c:x="1" c:y="1" c:height="5" c:width="60" label="Entry Styles"/>
+ <label c:x="2" c:y="2" c:height="1" c:width="7" text="Default"/>
+ <label c:x="2" c:y="3" c:height="1" c:width="8" text="Password"/>
+ <label c:x="2" c:y="4" c:height="1" c:width="5" text="Label"/>
+
+ <label c:x="24" c:y="3" c:height="1" c:width="9" text="Dropdown "/>
+ <label c:x="42" c:y="2" c:height="1" c:width="7" text="Listbox"/>
+
+ <entry c:x="12" c:y="2" c:height="1" c:width="10" block="styleFields"
+ field="defaultField">
<options>
<option name="tip" value="A normal text entry widget"/>
</options>
</entry>
- <entry name="Entry2" Char:height="1" Char:width="10" Char:x="12"
- Char:y="3" block="styleFields" field="passwordField"
style="password">
+
+ <entry c:x="12" c:y="3" c:height="1" c:width="10" block="styleFields"
+ field="passwordField" style="password">
<options>
<option name="tip" value="Value entered will appear on label field"/>
</options>
</entry>
- <entry name="Entry3" Char:height="1" Char:width="10" Char:x="33"
- Char:y="2" block="styleFields" field="labelField" style="label"/>
- <entry name="Entry4" Char:height="1" Char:width="10" Char:x="33"
- Char:y="2" block="styleFields" field="checkboxField"
style="checkbox" label="Checkbox">
+
+ <entry c:x="12" c:y="4" c:height="1" c:width="10" block="styleFields"
+ field="labelField" style="label"/>
+
+ <entry c:x="24" c:y="2" c:height="1" c:width="10" block="styleFields"
+ field="checkboxField" style="checkbox" label="Checkbox">
<options>
<option name="tip" value="A checkbox entry widget"/>
</options>
</entry>
- <entry name="Entry5" Char:height="1" Char:width="10" Char:x="33"
- Char:y="3" block="styleFields" field="dropdownField"
style="dropdown">
+
+ <entry c:x="33" c:y="3" c:height="1" c:width="10" block="styleFields"
+ field="dropdownField" style="dropdown">
<options>
<option name="tip" value="A dropdown entry widget"/>
</options>
</entry>
- <entry name="Entry14" Char:height="4" Char:width="10" Char:x="46"
- Char:y="2" block="styleFields" field="listboxField"
style="listbox">
+
+ <entry c:x="50" c:y="2" c:height="3" c:width="10" block="styleFields"
+ field="listboxField" style="listbox">
<options>
<option name="tip" value="A listbox entry widget"/>
</options>
</entry>
- <box name="Box1" Char:height="6" Char:width="60" Char:x="1" Char:y="0"
- label="Entry Styles"/>
- <box name="Box2" Char:height="10" Char:width="60" Char:x="1" Char:y="5"
- label="<entry> features"/>
- <entry name="Entry6" Char:height="1" Char:width="10" Char:x="13"
- Char:y="7" block="styleFields" field="UnboundField1"/>
- <entry name="Entry7" Char:height="1" Char:width="10" Char:x="13"
- Char:y="8" block="styleFields" field="UnboundField2"/>
- <entry name="Entry8" Char:height="1" Char:width="10" Char:x="41"
- Char:y="7" block="styleFields" field="UnboundField3"/>
- <label name="Label13" Char:height="1" Char:width="9" Char:x="3"
- Char:y="7" text="Uppercase"/>
- <label name="Label14" Char:height="1" Char:width="9" Char:x="3"
- Char:y="8" text="Lowercase"/>
- <label name="Label15" Char:height="1" Char:width="15" Char:x="25"
- Char:y="7" text="Max Length of 5"/>
- <label name="Label17" Char:height="1" Char:width="13" Char:x="3"
- Char:y="9" text="Default Value"/>
- <label name="Label18" Char:height="1" Char:width="13" Char:x="28"
- Char:y="9" text="Query Default"/>
- <entry name="Entry10" Char:height="1" Char:width="10" Char:x="17"
- Char:y="9" block="styleFields" field="UnboundField7"/>
- <entry name="Entry11" Char:height="1" Char:width="10" Char:x="42"
- Char:y="9" block="styleFields" field="UnboundField8"/>
- <box name="Box3" Char:height="4" Char:width="56" Char:x="2" Char:y="10"
- label="Typecast"/>
- <entry name="Entry12" Char:height="1" Char:width="12" Char:x="8"
- Char:y="12" block="styleFields" field="UnboundField9"/>
- <entry name="Entry13" Char:height="1" Char:width="10" Char:x="28"
- Char:y="12" block="styleFields" field="UnboundField10"/>
- <label name="Label19" Char:height="1" Char:width="4" Char:x="3"
- Char:y="12" text="Date"/>
- <label name="Label20" Char:height="1" Char:width="6" Char:x="21"
- Char:y="12" text="Number"/>
+
+ <box c:x="1" c:y="6" c:height="8" c:width="60"
+ label="<entry> features"/>
+
+ <label c:x="3" c:y="7" c:height="1" c:width="13" text="Uppercase"/>
+ <label c:x="3" c:y="8" c:height="1" c:width="13" text="Lowercase"/>
+ <label c:x="3" c:y="9" c:height="1" c:width="13" text="Default Value"/>
+
+
+ <entry c:x="15" c:y="7" c:height="1" c:width="10" block="styleFields"
+ field="UnboundField1"/>
+ <entry c:x="15" c:y="8" c:height="1" c:width="10" block="styleFields"
+ field="UnboundField2"/>
+ <entry c:x="15" c:y="9" c:height="1" c:width="10" block="styleFields"
+ field="UnboundField7"/>
+
+ <label c:x="28" c:y="7" c:height="1" c:width="15" text="Max Length of
5"/>
+ <label c:x="28" c:y="9" c:height="1" c:width="15" text="Query Default"/>
+
+ <entry c:x="44" c:y="7" c:height="1" c:width="10" block="styleFields"
+ field="UnboundField3"/>
+ <entry c:x="44" c:y="9" c:height="1" c:width="10" block="styleFields"
+ field="UnboundField8"/>
+
+
+ <box c:x="2" c:y="10" c:height="3" c:width="56" label="Typecast"/>
+
+ <label c:x="3" c:y="11" c:height="1" c:width="13" text="Date"/>
+ <label c:x="28" c:y="11" c:height="1" c:width="15" text="Number"/>
+
+ <entry c:x="15" c:y="11" c:height="1" c:width="12" block="styleFields"
+ field="UnboundField9"/>
+ <entry c:x="44" c:y="11" c:height="1" c:width="10" block="styleFields"
+ field="UnboundField10"/>
</page>
+
<page name="Dialogs">
- <button name="aboutButton" Char:height="1" Char:width="23" Char:x="3"
- Char:y="2" label="Display About Box">
- <trigger name="Trigger3" type="ON-ACTION"><![CDATA[##
+ <button name="aboutButton" c:height="1" c:width="23" c:x="3"
+ c:y="2" label="Display About Box">
+ <trigger name="Trigger3" type="ON-ACTION"><![CDATA[
parameters = {
'appversion' : '1.2.3',
'ui_driver' : 'Neural',
'name' : 'Gauntlet',
'formversion' : '-3.2.1',
'author' : 'Joe Coder',
- 'description' : """
- This about box is generated by the gauntet
- form. It is not created by gnue-forms. All
- values displayed are just place holders.
- """
+ 'description' : """This about box is generated by the gauntet
form. It is not created by gnue-forms. All values displayed are just place
holders."""
}
- activateDialog('_about', parameters, 1)
-
- ]]></trigger>
+ activateDialog ('_about', parameters, True)]]>
+ </trigger>
</button>
- <button name="jumptoButton" Char:height="1" Char:width="32" Char:x="3"
- Char:y="3" label="Display Jump To Prompt">
- <trigger name="Trigger4" type="ON-ACTION"><![CDATA[##
- parameters = {
- 'recordnumber': ''
- }
- activateDialog('_jumpto', parameters, 1)
+ <button name="jumptoButton" c:height="1" c:width="32" c:x="3"
+ c:y="3" label="Display Jump To Prompt">
+ <trigger name="Trigger4" type="ON-ACTION"><![CDATA[
+ parameters = {'recordnumber': ''}
+ activateDialog ('_jumpto', parameters, True)
+
if parameters.has_key('cancel'):
- dialogFields.jumpToValue = "Cancel"
+ dialogFields.jumpToValue.set ("Cancel")
else:
- dialogFields.jumpToValue = parameters['recordnumber']
- ]]></trigger>
+ dialogFields.jumpToValue.set (parameters['recordnumber'])]]>
+ </trigger>
</button>
- <button name="messageButton" Char:height="1" Char:width="22" Char:x="3"
- Char:y="7" label="Display a message box">
- <trigger name="Trigger5" type="ON-ACTION"><![CDATA[##
- parameters = {'placeholder':''}
- modal = 1
- activateDialog('getMessageDialog',parameters,modal)
-
- showMessage(parameters['message'])
-
-]]></trigger>
+
+ <button name="messageButton" c:height="1" c:width="22" c:x="3"
+ c:y="7" label="Display a message box">
+ <trigger name="Trigger5" type="ON-ACTION"><![CDATA[
+ params = {'placeholder': ''}
+ activateDialog ('getMessageDialog', params, True)
+ if params.has_key ('message'):
+ messageBox (params ['message'], params ['kind'])]]>
+ </trigger>
</button>
- <button name="messageButton" Char:height="1" Char:width="32" Char:x="27"
- Char:y="7" label="Display a different message box">
- <trigger name="Trigger5" type="ON-ACTION"><![CDATA[##
- parameters = {'placeholder':''}
- modal = 1
- activateDialog('getSecondDialog',parameters,modal)
-
- showMessage(parameters['message'])
-
-]]></trigger>
- </button>
- <entry name="jumpToEntry" Char:height="1" Char:width="6" Char:x="51"
- Char:y="3" block="dialogFields" field="jumpToValue"/>
- <box name="Box4" Char:height="10" Char:width="60" Char:x="1" Char:y="0"
- label="Calling gnue-forms built in dialogs"/>
- <label name="Label6" Char:height="1" Char:width="51" Char:x="3"
- Char:y="5" text="A more complicated example using an embedded
dialog"/>
- <label name="Label16" Char:height="1" Char:width="41" Char:x="3"
- Char:y="6" text="to prompt for the message to be displayed"/>
- <label name="Label24" Char:height="1" Char:width="13" Char:x="37"
- Char:y="3" text="Value Entered"/>
+
+ <box c:x="1" c:y="0" c:height="10" c:width="60"
+ label="Calling gnue-forms built in dialogs"/>
+
+ <label c:x="3" c:y="5" c:height="1" c:width="51"
+ text="A more complicated example using an embedded dialog"/>
+ <label c:x="3" c:y="6" c:height="1" c:width="41"
+ text="to prompt for the message to be displayed"/>
+ <label c:x="37" c:y="3" c:height="1" c:width="13" text="Value Entered"/>
+
+ <entry c:x="51" c:y="3" c:height="1" c:width="6" block="dialogFields"
+ field="jumpToValue"/>
</page>
+
+ <page name="Intro">
+ <label c:x="0" c:y="0" c:height="1" c:width="62" alignment="center"
+ text="Welcome To Gauntlet"/>
+ <label c:x="1" c:y="1" c:height="1" c:width="58"
+ text="This form is intended as a stress test for gnue-forms and "/>
+ <label c:x="1" c:y="2" c:height="1" c:width="54"
+ text="gnue-designer. It is not designed as a learning tool."/>
+ <label c:x="1" c:y="3" c:height="1" c:width="54"
+ text="That said, a lot of coding examples can be pulled from"/>
+ <label c:x="1" c:y="4" c:height="1" c:width="47"
+ text="this form if you are willing to dig through it."/>
+ <label c:x="1" c:y="6" c:height="1" c:width="59"
+ text="Not every forms feature is tested in this form. Developers"/>
+ <label c:x="1" c:y="7" c:height="1" c:width="56"
+ text="should execute all the testcases relevant to the section"/>
+ <label c:x="1" c:y="8" c:height="1" c:width="27"
+ text="upon which they are working"/>
+ <button c:x="1" c:y="10" c:height="1" c:width="10" label="Ok"/>
+ </page>
</layout>
- <dialog xmlns:c="GNUe:Layout:Char" name="getMessageDialog">
+ <dialog xmlns:c="GNUe:Layout:Char" name="getMessageDialog"
+ title="Get Message Dialog details">
+ <datasource name="dts" type="static" prequery="Y">
+ <staticset fields="key,descr">
+ <staticsetrow>
+ <staticsetfield name="key" value="Info"/>
+ <staticsetfield name="descr" value="Information"/>
+ </staticsetrow>
+ <staticsetrow>
+ <staticsetfield name="key" value="Question"/>
+ <staticsetfield name="descr" value="Question"/>
+ </staticsetrow>
+ <staticsetrow>
+ <staticsetfield name="key" value="Warning"/>
+ <staticsetfield name="descr" value="Warning"/>
+ </staticsetrow>
+ <staticsetrow>
+ <staticsetfield name="key" value="Error"/>
+ <staticsetfield name="descr" value="Error"/>
+ </staticsetrow>
+ </staticset>
+ </datasource>
+
<trigger type="On-Startup">
form.setFeature('GUI:MENUBAR:SUPPRESS',1)
form.setFeature('GUI:TOOLBAR:SUPPRESS',1)
form.setFeature('GUI:STATUSBAR:SUPPRESS',1)
</trigger>
<trigger type="on-activation">
- msgBlock.message = ""
+ blk.message.set ("")
+ blk.kind.set ("Info")
+ setFocus (blk.message)
</trigger>
<options/>
<logic>
- <block name="msgBlock">
+ <block name="blk">
<field name="message"/>
+ <field name="kind" fk_description="descr" fk_key="key"
fk_source="dts"/>
</block>
</logic>
- <layout c:height="8" c:width="31">
- <page name="Page_1">
- <label name="Label" text="Enter your message to display" c:width="29"
c:x="1" c:y="1"/>
- <entry block="msgBlock" field="message" c:width="29" c:height="4"
c:x="1" c:y="2"/>
- <button name="ok" c:height="1" c:width="4" c:x="14" c:y="7"
- label="OK">
- <trigger name="Trigger1" type="On-Action"><![CDATA[##
- print "message %s" % msgBlock.message
- setParameter('message',"%s" % msgBlock.message)
- close()
-]]></trigger>
- </button>
- </page>
- </layout>
- </dialog>
- <dialog xmlns:c="GNUe:Layout:Char" name="getSecondDialog">
- <trigger type="On-Startup">
- form.setFeature('GUI:MENUBAR:SUPPRESS',1)
- form.setFeature('GUI:TOOLBAR:SUPPRESS',1)
- form.setFeature('GUI:STATUSBAR:SUPPRESS',1)
- </trigger>
- <trigger type="on-activation">
- msgBlock2.message = ""
- </trigger>
+ <layout c:height="9" c:width="40">
+ <page name="Page">
+ <label c:x="1" c:y="1" c:height="1" c:width="10"
+ text="Kind of message:"/>
+ <label c:x="1" c:y="2" c:height="1" c:width="10"
+ text="Text for the message:"/>
- <options/>
- <logic>
- <block name="msgBlock2">
- <field name="message"/>
- </block>
- </logic>
+ <entry c:x="20" c:y="1" c:height="1" c:width="19" block="blk"
+ field="kind" style="dropdown"/>
- <layout c:height="8" c:width="31">
- <page name="Page_1">
- <label name="Label" text="Enter your second message to display"
c:width="29" c:x="1" c:y="1"/>
- <entry block="msgBlock2" field="message" c:width="29" c:height="4"
c:x="1" c:y="2"/>
- <button name="ok" c:height="1" c:width="4" c:x="14" c:y="7"
- label="OK">
- <trigger name="Trigger1" type="On-Action"><![CDATA[##
- print "message %s" % msgBlock2.message
- setParameter('message',"%s" % msgBlock2.message)
- close()
-]]></trigger>
- </button>
+ <entry c:x="1" c:y="3" c:width="38" c:height="4" block="blk"
+ field="message"/>
+
+ <button c:x="18" c:y="8" c:height="1" c:width="10" label="Ok">
+ <trigger name="Trigger1" type="On-Action">
+ setParameter ('message', blk.message.get ())
+ setParameter ('kind', blk.kind.get ())
+ close()
+ </trigger>
+ </button>
+ <button c:x="29" c:y="8" c:height="1" c:width="10" label="Cancel">
+ <trigger type="ON-ACTION">
+ close ()
+ </trigger>
+ </button>
</page>
</layout>
</dialog>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- r6177 - trunk/gnue-samples/testcases/forms/gauntlet,
johannes <=