commit-gnue
[Top][All Lists]
Advanced

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

gnue/gnue-common/doc TriggerSpecifications.txt


From: Jason Cater
Subject: gnue/gnue-common/doc TriggerSpecifications.txt
Date: Tue, 30 Oct 2001 19:13:59 -0500

CVSROOT:        /home/cvs
Module name:    gnue
Changes by:     Jason Cater <address@hidden>    01/10/30 19:13:59

Modified files:
        gnue-common/doc: TriggerSpecifications.txt 

Log message:
        added my notes

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/doc/TriggerSpecifications.txt.diff?cvsroot=OldCVS&tr1=1.5&tr2=1.6&r1=text&r2=text

Patches:
Index: gnue/gnue-common/doc/TriggerSpecifications.txt
diff -u gnue/gnue-common/doc/TriggerSpecifications.txt:1.5 
gnue/gnue-common/doc/TriggerSpecifications.txt:1.6
--- gnue/gnue-common/doc/TriggerSpecifications.txt:1.5  Tue Oct 16 18:07:13 2001
+++ gnue/gnue-common/doc/TriggerSpecifications.txt      Tue Oct 30 19:13:59 2001
@@ -141,3 +141,102 @@
 
 
 
+
+
+---------------------------
+Jason's Scratchpad: 
+---------------------------
+
+Namespace Scope
+---------------
+(NOTE: This is partially language-dependent)
+
+
+All Objects: 
+ * "self" refers to the object containing the trigger (not the trigger 
+   object).  For example, if a block contains a "pre-focusin" trigger, 
+   then "self" within that trigger refers to the block.  This is true 
+   even for named triggers.  (Python specific)
+
+
+Global Namespace: 
+ * all page names
+
+ * all datasource names
+
+ * all blocks???
+
+ * "form" contains information specific to the current form (or "report", 
+   etc).  Possible attributes for "form" are GetCurrentBlock(), 
+   GetCurrentPage(), and GetCurrentField(), as well as all page names, 
+
+
+Pages: 
+ * All block, label, etc names located in the page (but not within blocks)
+
+
+Blocks: 
+ * all entry, label, etc names in the block
+
+ * jump(#)   (Move to record #)
+
+ * record()
+
+ * first()
+
+ * last()
+
+ * isfirst()
+
+ * islast()
+
+ * count()
+
+ 
+
+Fields: 
+ * sum() adds all the fields 
+
+ * count() returns a count of the fields that are non-null
+
+ * 
+
+  
+========
+findObject("myblock.myfield")
+
+ * For non-OO languages
+  
+ * For object names that cause problems in namespace
+
+========
+Convenience functions: 
+  myblock.field.sum()
+  myblock.field.count()
+  myblock.count()
+
+
+========
+How should we handle code other than triggers.
+
+
+
+Object Translation Services???
+------------------------------
+
+ <input name="myfield">
+   <import-trigger name="positiveTrigger"  ...  translate="field=myfield"/>
+ </input> 
+
+  ...
+
+ <trigger name="positiveTrigger"> 
+    if field.value < 0: 
+      gnue.warn( "%s must be at least 0" % field.getDescription() )
+      return 1
+    else: 
+      return 0
+  </trigger>
+
+  This way, positiveTrigger can be reused in many forms, even if the field 
+  name changes.  



reply via email to

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