commit-gnue
[Top][All Lists]
Advanced

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

gnue/forms/samples/intro intro.gfd


From: Jason Cater
Subject: gnue/forms/samples/intro intro.gfd
Date: Thu, 31 Jan 2002 21:57:30 -0500

CVSROOT:        /home/cvs
Module name:    gnue
Changes by:     Jason Cater <address@hidden>    02/01/31 21:57:30

Modified files:
        forms/samples/intro: intro.gfd 

Log message:
        conversion to new trigger system

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/forms/samples/intro/intro.gfd.diff?cvsroot=OldCVS&tr1=1.4&tr2=1.5&r1=text&r2=text

Patches:
Index: gnue/forms/samples/intro/intro.gfd
diff -c gnue/forms/samples/intro/intro.gfd:1.4 
gnue/forms/samples/intro/intro.gfd:1.5
*** gnue/forms/samples/intro/intro.gfd:1.4      Thu Jan 31 21:25:51 2002
--- gnue/forms/samples/intro/intro.gfd  Thu Jan 31 21:57:30 2002
***************
*** 16,28 ****
  
  import string
  
! print "1"
! s = SampleBlock.NameEntry
  out = ''
- print "2"
  
  for word in string.splitfields(s,' '):
-   print "2a"
    if word:
      # check for punctuation
      p = 0
--- 16,25 ----
  
  import string
  
! s = SampleBlock.NameEntry[:]
  out = ''
  
  for word in string.splitfields(s,' '):
    if word:
      # check for punctuation
      p = 0
***************
*** 48,54 ****
      p = 0
      while p &lt; len(word) and word[p] not in "aoeuiyAOEUIY":
        p = p+1
!       
      if not p:
        word = append( word, "yay" )
      else:
--- 45,51 ----
      p = 0
      while p &lt; len(word) and word[p] not in "aoeuiyAOEUIY":
        p = p+1
! 
      if not p:
        word = append( word, "yay" )
      else:
***************
*** 61,90 ****
      word = prepunc + word + punc
  
    out = out + ' ' + word
- print "3"
  
  SampleBlock.CodeNameEntry = string.strip(out)
  </trigger>
    <trigger type="NAMED" name="MyFortune">
! Fortunes = ['You will have a long and fruitful life with GNUe.', 
!             'GNUe will solve your next IT problem.', 
!             'Why you not use GNUe before now?', 
!             'You will fall in love with a tall, dark GNUe form.', 
!             'Joy will overcome your new life with GNUe.', 
!             'You will live a free life with GNUe tools', 
!             'Move slowly but surely to success with GNUe.', 
!             'Others are drawn to your GNUe tools.', 
              'You have a magnetic personality with GNUe forms.',
              'Use GNUe and you will notice the extraordinary in the ordinary.']
!       
! if len(SampleBlock.YearEntry): 
  
    try:
!     val = 'Confucius say, "%s"'%Fortunes[int(SampleBlock.YearEntry[-1:])]
!   except ValueError: 
      val = "Please enter a valid birth year first."
!   
! else: 
    val = "Please enter a valid birth year first."
  
  SampleBlock.FortuneEntry = val
--- 58,86 ----
      word = prepunc + word + punc
  
    out = out + ' ' + word
  
  SampleBlock.CodeNameEntry = string.strip(out)
  </trigger>
    <trigger type="NAMED" name="MyFortune">
! Fortunes = ['You will have a long and fruitful life with GNUe.',
!             'GNUe will solve your next IT problem.',
!             'Why you not use GNUe before now?',
!             'You will fall in love with a tall, dark GNUe form.',
!             'Joy will overcome your new life with GNUe.',
!             'You will live a free life with GNUe tools',
!             'Move slowly but surely to success with GNUe.',
!             'Others are drawn to your GNUe tools.',
              'You have a magnetic personality with GNUe forms.',
              'Use GNUe and you will notice the extraordinary in the ordinary.']
! 
! if len(SampleBlock.YearEntry):
  
    try:
!     val = 'Confucius say, "%s"'%Fortunes[int(str(SampleBlock.YearEntry)[-1:])]
!   except ValueError:
      val = "Please enter a valid birth year first."
! 
! else:
    val = "Please enter a valid birth year first."
  
  SampleBlock.FortuneEntry = val
***************
*** 111,117 ****
      <label x="3" y="3" width="20" name="Label_6" text="Year you were born:"/>
      <label x="3" y="5" width="15" name="Label_7" text="Your Code Name:"/>
      <block name="SampleBlock">
!       <entry x="14" y="2" name="NameEntry" width="23" default="Foo!">
          <trigger type="PRE-FOCUSOUT" name="Trigger_1" src="PigLatin"/>
        </entry>
        <entry name="YearEntry" x="22" y="3" width="6"/>
--- 107,113 ----
      <label x="3" y="3" width="20" name="Label_6" text="Year you were born:"/>
      <label x="3" y="5" width="15" name="Label_7" text="Your Code Name:"/>
      <block name="SampleBlock">
!       <entry x="14" y="2" name="NameEntry" width="23">
          <trigger type="PRE-FOCUSOUT" name="Trigger_1" src="PigLatin"/>
        </entry>
        <entry name="YearEntry" x="22" y="3" width="6"/>



reply via email to

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