[Anygui-checkins] CVS: /anygui/doc tutorial.txt,1.5,1.6
Brought to you by:
mlh
From: Magnus L. H. <ml...@us...> - 2003-03-29 12:02:45
|
Update of /cvsroot/anygui//anygui/doc In directory sc8-pr-cvs1:/tmp/cvs-serv5768 Modified Files: tutorial.txt Log Message: Index: tutorial.txt =================================================================== RCS file: /cvsroot/anygui//anygui/doc/tutorial.txt,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** tutorial.txt 16 Feb 2003 02:11:24 -0000 1.5 --- tutorial.txt 29 Mar 2003 12:02:42 -0000 1.6 *************** *** 240,247 **** Cool, huh? ! (Note: Event handlers receive information about the event through Event objects. We ignore the specifics of these objects here. In version 0.1.1 and earlier, event handlers received information ! through keyword arguments.) 9. Further Exploration --- 240,254 ---- Cool, huh? ! Note: Event handlers receive information about the event through Event objects. We ignore the specifics of these objects here. In version 0.1.1 and earlier, event handlers received information ! through keyword arguments. So, if you're using Anygui 0.1.1, the ! event handler should be: ! ! def handler(**kwds): ! txt.text = sentence() ! ! If you use the definition without keyword arguments, you'll get a ! TypeError, which complains about unexpected keyword arguments. 9. Further Exploration *************** *** 331,334 **** --- 338,342 ---- win.height = txt.height + btn.height + 30 + # Remember to use keyword arguments in Anygui 0.1.1 def handler(event): txt.text = sentence() link(btn, 'click', handler) |