[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/samples/testcases trigger/trigger.gfd form...
From: |
James Thompson |
Subject: |
gnue/samples/testcases trigger/trigger.gfd form... |
Date: |
Sat, 08 Mar 2003 13:09:08 -0500 |
CVSROOT: /cvsroot/gnue
Module name: gnue
Changes by: James Thompson <address@hidden> 03/03/08 13:09:08
Modified files:
samples/testcases/trigger: trigger.gfd
Added files:
samples/testcases/forms/layout: layout.gfd
Log message:
start of new forms testcases
layout form
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/samples/testcases/forms/layout/layout.gfd?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/samples/testcases/trigger/trigger.gfd.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
Patches:
Index: gnue/samples/testcases/trigger/trigger.gfd
diff -c gnue/samples/testcases/trigger/trigger.gfd:1.2
gnue/samples/testcases/trigger/trigger.gfd:1.3
*** gnue/samples/testcases/trigger/trigger.gfd:1.2 Thu Oct 31 21:40:53 2002
--- gnue/samples/testcases/trigger/trigger.gfd Sat Mar 8 13:09:08 2003
***************
*** 1,121 ****
! <?xml version="1.0"?>
!
! <!-- GNUe Designer (0.2.0a)
! Saved on: 2002-01-31 10:33:45 -->
!
! <form width="50" title="Trigger Sample" height="16">
! <options>
! <option value="0.0.3" name="version"/>
! <option value="GNUE Enterprise Developers" name="author"/>
! </options>
! <page name="Page_1">
! <block name="block1">
! <label x="1" y="1" name="Label_1" alignment="center" width="48"
! text="Field One"/>
! <entry x="1" y="2" name="one" width="48" typecast="number">
! <trigger name="Trigger_A" type="PRE-FOCUSOUT">
! block1.three.__properties__.readonly = True
! block1.three = "5"
! </trigger>
! </entry>
!
! <label x="1" y="3" name="Label_2" text="Field Two"/>
! <entry x="1" y="4" name="two" width="48">
! <trigger name="Trigger_A" type="PRE-FOCUSOUT">
! #setFocus(block2.alter)
! </trigger>
! </entry>
! <label x="1" y="5" name="Label_1a" text="Field Three"/>
! <entry x="1" y="6" name="three" width="48" />
! <label x="1" y="7" name="Label_2a" text="Field Four"/>
! <entry x="1" y="8" name="four" width="48"/>
! <label x="1" y="9" name="Label_3a" text="Field Five"/>
! <entry x="1" y="10" name="five" width="48">
! <trigger name="Trigger_B" type="PRE-FOCUSOUT">
! block1.three.__properties__.readonly = False
! block1.three = 'You can change me!'
! </trigger>
! </entry>
!
! </block>
! <block name="block2">
! <label x="1" y="12" name="Label_3" text="Block Two (Page Down to
enter)"/>
! <label x="1" y="13" name="Label_4"
! text="Alteration Field (Press tab to fire trigger)"/>
! <entry x="1" y="14" field="newValue" name="alter" width="48">
! <options>
! <option value="Type Field One's Replacement" name="tip"/>
! </options>
! <trigger name="Trigger_1" type="PRE-FOCUSOUT">
! # basics
! print "Value get test"
! print block2.alter
! # Function test
! print "Function test - global form var test"
! print form.Page_1.block2.alter.allowedValues()
!
! #
! # Test global
! #print testFunc()
!
!
! # Test to make sure assignment doesn't copy the objects only
! # their string values
! print "Setting value"
! block1.five = block2.alter
! block2.alter = "G"
! print block1.five
! print block2.alter
!
! # Properties
! print "Showing property"
! print block2.alter.__properties__.readonly
! print "Attempt to set a readonly property"
! block2.alter.__properties__.readonly = 23
!
! # Comparison
! if block1.one == block1.two:
! print "block1.one and block1.two match"
! elif block1.one > block1.two:
! print "block1.one greater than block1.two"
! elif block1.one < block1.two:
! print "block1.one less than block1.two"
! else:
! print "Comparison System needs food badly"
!
! # Slices
! print block1.one[:2]
!
! #
! # function call
! #
! from string import lower
! print lower ("FOO")
! print lower (str(block2.alter))
!
!
! #
! # validate local namespace
! #
! print "Showing local namespace access"
! print "Value"
! print self
!
! print "readonly"
! print self.__properties__.readonly
!
! # Things that don't work but probably should and how to fix it
! #
! # block1.five = block2.alter + block1.one + block1.two
! # (add __add__ support to GTriggerNSObject)
! #
! # print lower (block2.alter)
! # (this fails because block2.alter is a GTriggerNSObject
! # not a string so it fails when the lower function attempts
! # to call a lower() function that GTriggerNSObject doesn't implement
! # No good solution known at this time)
! </trigger>
! </entry>
! </block>
! </page>
! </form>
--- 1,130 ----
! <?xml version="1.0"?>
!
! <!-- GNUe Forms 0.5.0 Migration Tool
! Saved on: 2003-03-08 10:16:04 -->
!
! <form title="Trigger Sample">
! <options>
! <option name="version" value="0.0.3"/>
! <option name="author" value="GNUE Enterprise Developers"/>
! </options>
! <logic>
! <block name="block1">
! <field name="one" typecast="number">
! <trigger name="Trigger_A" type="PRE-FOCUSOUT"><![CDATA[
! block1.three.__properties__.readonly = True
! block1.three = "5"
! ]]></trigger>
! </field>
! <field name="two">
! <trigger name="Trigger_A" type="PRE-FOCUSOUT"><![CDATA[
! #setFocus(block2.alter)
! ]]></trigger>
! </field>
! <field name="three"/>
! <field name="four"/>
! <field name="five">
! <trigger name="Trigger_B" type="PRE-FOCUSOUT"><![CDATA[
! block1.three.__properties__.readonly = False
! block1.three = 'You can change me!'
! ]]></trigger>
! </field>
! </block>
! <block name="block2">
! <field name="alter" field="newValue">
! <options>
! <option name="tip" value="Type Field One's Replacement"/>
! </options>
! <trigger name="Trigger_1" type="PRE-FOCUSOUT"><![CDATA[
! # basics
! print "Value get test"
! print block2.alter
! # Function test
! print "Function test - global form var test"
! print form.block2.alter.allowedValues()
!
! #
! # Test global
! #print testFunc()
!
!
! # Test to make sure assignment doesn't copy the objects only
! # their string values
! print "Setting value"
! block1.five = block2.alter
! block2.alter = "G"
! print block1.five
! print block2.alter
!
! # Properties
! print "Showing property"
! print block2.alter.__properties__.readonly
! print "Attempt to set a readonly property"
! block2.alter.__properties__.readonly = 23
!
! # Comparison
! if block1.one == block1.two:
! print "block1.one and block1.two match"
! elif block1.one > block1.two:
! print "block1.one greater than block1.two"
! elif block1.one < block1.two:
! print "block1.one less than block1.two"
! else:
! print "Comparison System needs food badly"
!
! # Slices
! print block1.one[:2]
!
! #
! # function call
! #
! from string import lower
! print lower ("FOO")
! print lower (str(block2.alter))
!
!
! #
! # validate local namespace
! #
! print "Showing local namespace access"
! print "Value"
! print self
!
! print "readonly"
! print self.__properties__.readonly
!
! # Things that don't work but probably should and how to fix it
! #
! # block1.five = block2.alter + block1.one + block1.two
! # (add __add__ support to GTriggerNSObject)
! #
! # print lower (block2.alter)
! # (this fails because block2.alter is a GTriggerNSObject
! # not a string so it fails when the lower function attempts
! # to call a lower() function that GTriggerNSObject doesn't implement
! # No good solution known at this time)
! ]]></trigger>
! </field>
! </block>
! </logic>
! <layout xmlns:c="GNUe:Layout:Char" c:height="16" c:width="50">
! <page name="Page_1">
! <label name="Label_1" alignment="center" text="Field One" c:width="48"
! c:x="1" c:y="1"/>
! <entry block="block1" field="one" c:width="48" c:x="1" c:y="2"/>
! <label name="Label_2" text="Field Two" c:x="1" c:y="3"/>
! <entry block="block1" field="two" c:width="48" c:x="1" c:y="4"/>
! <label name="Label_1a" text="Field Three" c:x="1" c:y="5"/>
! <entry block="block1" field="three" c:width="48" c:x="1" c:y="6"/>
! <label name="Label_2a" text="Field Four" c:x="1" c:y="7"/>
! <entry block="block1" field="four" c:width="48" c:x="1" c:y="8"/>
! <label name="Label_3a" text="Field Five" c:x="1" c:y="9"/>
! <entry block="block1" field="five" c:width="48" c:x="1" c:y="10"/>
! <label name="Label_3" text="Block Two (Page Down to enter)" c:x="1"
! c:y="12"/>
! <label name="Label_4"
! text="Alteration Field (Press tab to fire trigger)" c:x="1"
c:y="13"/>
! <entry block="block2" field="alter" c:width="48" c:x="1" c:y="14"/>
! </page>
! </layout>
! </form>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue/samples/testcases trigger/trigger.gfd form...,
James Thompson <=