diff options
author | nags <nags@nags-desktop.(none)> | 2009-08-13 21:33:22 -0700 |
---|---|---|
committer | nags <nags@nags-desktop.(none)> | 2009-08-13 21:33:22 -0700 |
commit | bc81dda089bff5d16e70b081af75d1dec69af80c (patch) | |
tree | af3d4fb2ff9d9ec454c891e1d84bebcb7caafa5f | |
parent | cc030db89688e9ca72edec15955928146e02e24b (diff) |
Updated onwindowcreate function arugments, which now take variable arguments that can be passed to the callback function.
-rw-r--r-- | doc/pyldtp-doc.h | 78 |
1 files changed, 33 insertions, 45 deletions
diff --git a/doc/pyldtp-doc.h b/doc/pyldtp-doc.h index 276647a..57e76f3 100644 --- a/doc/pyldtp-doc.h +++ b/doc/pyldtp-doc.h @@ -4959,7 +4959,8 @@ /** \page onwindowcreate onwindowcreate * \section Syntax * - * onwindowcreate ('<window title\>', '<call back function\>') + * onwindowcreate ('<window title\>', '<callback function\>'[, + * <arguments to callback function\>]) * * \section Description * @@ -4978,52 +4979,39 @@ * <pre> * * from ldtp import * - * * import threading - * - * - * callbackRunning = threading.Event () - * - * callbackRunning.clear () - * - * callbackState = threading.Event () - * - * callbackState.clear () - * - * - * def cb (): - * - * callbackState.set () - * - * waittillguiexist ('dlgReplace') - * - * click ('dlgReplace', 'btnClose') - * - * callbackState.clear () - * - * callbackRunning.set () - * - * print 'callbackend' - * * - * onwindowcreate ('Replace', cb) - * - * click ('*gedit', 'btnReplace') - * - * click ('*gedit', 'btnFind') - * - * waittillguiexist ('dlgFind') - * - * click ('dlgFind', 'btnClose') - * - * if callbackState.isSet (): - * - * print 'Waiting for callback to complete' - * - * callbackRunning.wait () - * - * print 'callbackset' - * + * callbackRunning = threading.Event() + * callbackRunning.clear() + * callbackState = threading.Event() + * callbackState.clear() + * + * def cb(): + * callbackState.set() + * waittillguiexist('dlgReplace') + * click('dlgReplace', 'btnClose') + * callbackState.clear() + * callbackRunning.set() + * print 'callbackend' + * + * def cbwithvarargs(*args): + * for arg in args: + * print arg + * print 'callbackend' + * + * onwindowcreate('Replace', cb) + * onwindowcreate('dlgFind', cbwithvarargs, 'test', 'var', 'args') + * + * click('*gedit', 'btnReplace') + * click('*gedit', 'btnFind') + * + * waittillguiexist('dlgFind') + * click('dlgFind', 'btnClose') + * + * if callbackState.isSet(): + * print 'Waiting for callback to complete' + * callbackRunning.wait() + * print 'callbackset' * print 'test end' * * </pre> |