CVS: anygui/test test_modv1.py,1.5,1.6 test_modv2.py,1.6,1.7 test_modv3.py,1.5,1.6

"Dallas T. Johnston" <[email protected]> Fri, 08 Nov 2002 02:52:25 -0800
Newsgroups gmane.comp.python.anygui.cvs
Message-ID <[email protected]>
Update of /cvsroot/anygui/anygui/test
In directory usw-pr-cvs1:/tmp/cvs-serv32337/test

Modified Files:
	test_modv1.py test_modv2.py test_modv3.py 
Log Message:
Finally got SF to accept the commit... =)


Index: test_modv1.py
===================================================================
RCS file: /cvsroot/anygui/anygui/test/test_modv1.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** test_modv1.py	23 Sep 2002 19:42:25 -0000	1.5
--- test_modv1.py	8 Nov 2002 10:52:23 -0000	1.6
***************
*** 10,13 ****
--- 10,16 ----
  newbtn = None
  
+ def model_event(event):
+     log("newbtn.text = " + newbtn.text)
+ 
  def say_hello(event):
      log("Hello, world!")
***************
*** 16,19 ****
--- 19,23 ----
          newbtn = Button(opt, y = g_y)
          newbtn.installTextModel(TextModel('new'))
+         link(newbtn.text, model_event)
          win.add(newbtn)
      else:

Index: test_modv2.py
===================================================================
RCS file: /cvsroot/anygui/anygui/test/test_modv2.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** test_modv2.py	23 Sep 2002 19:42:25 -0000	1.6
--- test_modv2.py	8 Nov 2002 10:52:23 -0000	1.7
***************
*** 10,18 ****
  newbtn = None
  
! def printit1(event):
!     log('printit1:',newbtn.text)
! 
! def printit2(event):
!     log('printit2:',newbtn.text)
  
  def say_hello(event):
--- 10,15 ----
  newbtn = None
  
! def printit(event):
!     log('printit:',newbtn.text)
  
  def say_hello(event):
***************
*** 22,27 ****
          newbtn = TextField(opt, y = g_y)
          newbtn.installTextModel(TextModel('new'))
!         link(newbtn, printit1)
!         link(newbtn.text, printit2)
          win.add(newbtn)
      else:
--- 19,23 ----
          newbtn = TextField(opt, y = g_y)
          newbtn.installTextModel(TextModel('new'))
!         link(newbtn.text, printit)
          win.add(newbtn)
      else:

Index: test_modv3.py
===================================================================
RCS file: /cvsroot/anygui/anygui/test/test_modv3.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** test_modv3.py	23 Sep 2002 19:42:26 -0000	1.5
--- test_modv3.py	8 Nov 2002 10:52:23 -0000	1.6
***************
*** 2,22 ****
  from anygui.Utils import log
  
  app = Application()
  
  g_y = 150
  
- win = Window(width = 110, height = 210)
  app.add(win)
- newbtn = None
  
  def printit1(event):
!     log('printit1:',newbtn.on)
! 
  def printit2(event):
!     log('printit2:',newbtn.on)
! 
  def say_hello(event):
!     log("Hello, world!")
!     global newbtn
      if newbtn is None:
          newbtn = CheckBox(opt, y = g_y)
--- 2,24 ----
  from anygui.Utils import log
  
+ newbtn = None
+ 
  app = Application()
  
+ win = Window(width = 110, height = 210)
+ 
  g_y = 150
  
  app.add(win)
  
  def printit1(event):
!    	log('printit1:',newbtn.on)
! 		
  def printit2(event):
!    	log('printit2:',newbtn.on)
! 			
  def say_hello(event):
!     #log("Hello, world!")
!     global newbtn, g_y, win
      if newbtn is None:
          newbtn = CheckBox(opt, y = g_y)
***************
*** 26,37 ****
          win.add(newbtn)
      else:
!         newbtn.on = not newbtn.on
! 
  opt = Options(x = 30, width = 50, height = 30)
  btn = Button(opt, y = 30, text = "Hello")
  link(btn, say_hello)
! 
  win.add(btn)
! 
  app.run()
- 
--- 28,39 ----
          win.add(newbtn)
      else:
!         val = not bool(newbtn.on)
!         newbtn.on = val
! 			
  opt = Options(x = 30, width = 50, height = 30)
  btn = Button(opt, y = 30, text = "Hello")
  link(btn, say_hello)
! 			
  win.add(btn)
! 			
  app.run()



-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm 
Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en