commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnue] r8199 - trunk/gnue-samples/tutorials/forms/simple


From: jan
Subject: [gnue] r8199 - trunk/gnue-samples/tutorials/forms/simple
Date: Fri, 3 Mar 2006 11:28:37 -0600 (CST)

Author: jan
Date: 2006-03-03 11:28:37 -0600 (Fri, 03 Mar 2006)
New Revision: 8199

Modified:
   trunk/gnue-samples/tutorials/forms/simple/helloworld2.gfd
   trunk/gnue-samples/tutorials/forms/simple/simpleform.gfd
Log:
updated forms to 5.x format of forms and fixed some small bugs


Modified: trunk/gnue-samples/tutorials/forms/simple/helloworld2.gfd
===================================================================
--- trunk/gnue-samples/tutorials/forms/simple/helloworld2.gfd   2006-03-03 
17:12:49 UTC (rev 8198)
+++ trunk/gnue-samples/tutorials/forms/simple/helloworld2.gfd   2006-03-03 
17:28:37 UTC (rev 8199)
@@ -1,52 +1,82 @@
-<?xml version="1.0"?>
-
-<!--  GNUe Designer (0.1.0)
-      Form saved on: 2001-11-04 21:41:44  -->
-
-<form width="35" height="15" title="Input Validation Test">
-  <options>
-    <option value="0.0.2" name="version"/>
-  </options>
-  <datasource name="nil" cache="5"/>
-  <trigger type="NAMED" name="HelloWorld">
-#
-#Populate User Name from Name
-#
-from string import *
-print "User", login.user
-
-#print "User", login.fields.user
-#print "Address", address.fields.name
-#print "self", self._value
-#print "log block", login
-
-#login.fields.user = address.fields.name
-</trigger>
-  <page name="Page_1">
-    <block name="address" datasource="nil">
-      <label x="1" y="1" name="Label_1" text="Full Name:"/>
-      <entry x="1" y="2" field="name" name="name" width="10">
-        <trigger type="PRE-FOCUSOUT" name="Trigger_1" src="HelloWorld"/>
-      </entry>
-      <label x="1" y="3" name="Label_2" text="Address:"/>
-      <entry name="address1" x="1" y="4" width="20" max_length="5" 
field="address1"/>
-      <entry name="address2" x="1" y="5" width="20" field="address2"/>
-      <entry name="address3" x="1" y="6" width="20" height="4" 
field="address3"/>
-    </block>
-    <block name="login" datasource="nil">
-      <label x="1" y="10" name="Label_3" text="User Name"/>
-      <entry x="1" y="11" value="Type Here" field="user" name="user" 
width="30">
-        <trigger type="PRE-FOCUSOUT" name="Trigger_2">
-           from string import lower
-
-           if lower(login.user[:3]) != lower(address.name[:3]):
-             print "ERROR! First 3 letters of user name MUST"
-             print "       match first three letters of full name."
-             login.user=""
-           print "User name updated to \"%s\"" % login.user</trigger>
-      </entry>
-      <entry x="1" y="12" value="Type Here" field="pass" name="password"
-             width="30"/>
-    </block>
-  </page>
-</form>
+<?xml version="1.0"?>
+
+<!--  GNUe Forms 0.5.0 Migration Tool
+      Saved on: 2006-03-04 02:14:36  -->
+
+<form title="Input Validation Test">
+  <options>
+    <option name="version" value="0.0.2"/>
+  </options>
+  <trigger name="HelloWorld" type="NAMED"><![CDATA[
+
+#
+
+#Populate User Name from Name
+
+#
+
+import string
+
+print "User", login.user
+
+
+
+#print "User", login.fields.user
+
+#print "Address", address.fields.name
+
+#print "self", self._value
+
+#print "log block", login
+
+
+
+#login.fields.user = address.fields.name
+
+]]></trigger>
+  <logic>
+    <block name="address">
+      <field name="name" field="name">
+        <trigger name="Trigger_1" src="HelloWorld" type="PRE-FOCUSOUT"/>
+      </field>
+      <field name="address1" field="address1" max_length="5"/>
+      <field name="address2" field="address2"/>
+      <field name="address3" field="address3"/>
+    </block>
+    <block name="login">
+      <field name="user" field="user" value="Type Here">
+        <trigger name="Trigger_2" type="PRE-FOCUSOUT"><![CDATA[
+
+           from string import lower
+
+
+
+           if lower(login.user[:3]) != lower(address.name[:3]):
+
+             print "ERROR! First 3 letters of user name MUST"
+
+             print "       match first three letters of full name."
+
+             login.user=""
+
+           print "User name updated to \"%s\"" % login.user]]></trigger>
+      </field>
+      <field name="password" field="pass" value="Type Here"/>
+    </block>
+  </logic>
+  <layout xmlns:c="GNUe:Layout:Char" c:height="15" c:width="35">
+    <page name="Page_1">
+      <label name="Label_1" text="Full Name:" c:x="1" c:y="1"/>
+      <entry block="address" field="name" c:width="10" c:x="1" c:y="2"/>
+      <label name="Label_2" text="Address:" c:x="1" c:y="3"/>
+      <entry block="address" field="address1" c:width="20" c:x="1" c:y="4"/>
+      <entry block="address" field="address2" c:width="20" c:x="1" c:y="5"/>
+      <entry block="address" field="address3" c:height="4" c:width="20"
+             c:x="1" c:y="6"/>
+      <label name="Label_3" text="User Name" c:x="1" c:y="10"/>
+      <entry block="login" field="user" c:width="30" c:x="1" c:y="11"/>
+      <entry block="login" field="password" style="password" c:width="30" 
c:x="1" c:y="12"/>
+    </page>
+  </layout>
+</form>
+

Modified: trunk/gnue-samples/tutorials/forms/simple/simpleform.gfd
===================================================================
--- trunk/gnue-samples/tutorials/forms/simple/simpleform.gfd    2006-03-03 
17:12:49 UTC (rev 8198)
+++ trunk/gnue-samples/tutorials/forms/simple/simpleform.gfd    2006-03-03 
17:28:37 UTC (rev 8199)
@@ -1,33 +1,38 @@
-<?xml version="1.0"?>
-
-<!--  GNUe Designer (0.1.0)
-      Form saved on: 2001-11-04 22:24:40  -->
-
-<form width="25" title="Simple Example" height="6">
-  <options>
-    <option value="0.0.2" name="version"/>
-  </options>
-  <page name="Page_1">
-    <block name="coding">
-      <label x="1" y="1" name="Label_1" text="Simple first page"/>
-      <label x="1" y="2" name="Label_2" text="Only contains labels"/>
-      <label x="1" y="3" name="Label_3" text="Page Up or Page Down"/>
-    </block>
-  </page>
-  <page name="Page_2">
-    <block name="testing">
-      <label x="1" y="1" name="Label_4" text="Text Box 1"/>
-      <entry name="text1" x="1" y="2" width="10">
-        <options>
-          <option name="tip" value="This is the tip for the first text box"/>
-        </options>
-      </entry>
-      <label x="1" y="4" name="Label_5" text="Text Box 2"/>
-      <entry name="text2" x="1" y="5" width="10">
-        <options>
-          <option name="tip" value="This is the tip for the second text box"/>
-        </options>
-      </entry>
-    </block>
-  </page>
-</form>
+<?xml version="1.0"?>
+
+<!--  GNUe Forms 0.5.0 Migration Tool
+      Saved on: 2006-03-04 02:14:44  -->
+
+<form title="Simple Example">
+  <options>
+    <option name="version" value="0.0.2"/>
+  </options>
+  <logic>
+    <block name="coding"/>
+    <block name="testing">
+      <field name="text1"/>
+      <field name="text2"/>
+    </block>
+  </logic>
+  <layout xmlns:c="GNUe:Layout:Char" c:height="6" c:width="25">
+    <page name="Page_1">
+      <label name="Label_1" text="Simple first page" c:x="1" c:y="1"/>
+      <label name="Label_2" text="Only contains labels" c:x="1" c:y="2"/>
+      <label name="Label_3" text="Page Up or Page Down" c:x="1" c:y="3"/>
+    </page>
+    <page name="Page_2">
+      <label name="Label_4" text="Text Box 1" c:x="1" c:y="1"/>
+      <entry block="testing" field="text1" c:width="10" c:x="1" c:y="2">
+        <options>
+          <option name="tip" value="This is the tip for the first text box"/>
+        </options>
+      </entry>
+      <label name="Label_5" text="Text Box 2" c:x="1" c:y="4"/>
+      <entry block="testing" field="text2" c:width="10" c:x="1" c:y="5">
+        <options>
+          <option name="tip" value="This is the tip for the second text box"/>
+        </options>
+      </entry>
+    </page>
+  </layout>
+</form>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]