[LDTP-Dev] Callback example raises exception.

Wang Qi, Scott wangqi.s at gmail.com
Sat Nov 14 19:17:24 PST 2009


In addition to the pop-up dialog description below, it seems that it is
allowed to display 'Find' dialog and 'Open' dialog simultaneously. So the
behavior of pop-up windows depends on the type of pop up dialog.

Thanks
Scott
On Sun, Nov 15, 2009 at 11:13 AM, Wang Qi, Scott <wangqi.s at gmail.com> wrote:

> Hi,
>
> I tried the callback example at
> http://ldtp.freedesktop.org/user-doc/index.html on Ubunt 9.04 with LDTP
> 1.7.1.
>
> It seems as soon as the first callback function 'cb' is triggered. It raise
> a exception.
>
> >>> onwindowcreate('Replace', cb)
> 1
> >>> onwindowcreate('dlgFind', cbwithvarargs, 'test', 'var', 'args')
> 1
> >>> click('*gedit', 'btnReplace')
> 1
> >>> Unhandled exception in thread started by <function invokecallback at
> 0xa4f087c>
> Traceback (most recent call last):
>   File "/var/lib/python-support/python2.6/ldtp.py", line 351, in
> invokecallback
>     callback = _callbackFunctions.get (_responseData [1])[0]
> TypeError: 'NoneType' object is unsubscriptable
>
> But the callback with arguments works just fine. Is this a bug?
>
> Another observation is that it seems the default gedit installed with
> Ubuntu 9.04 only allow a single dialog to be pop-up in front of main window.
>
>
> click('*gedit', 'btnReplace') # This will pop up the Replace dialog.
> click('*gedit', 'btnFind') # But this one only highlight the Find button.
>
> Therefore, this example may not work any more as intended originally.
>
> Thanks
> Scott
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/ldtp-dev/attachments/20091115/f9757cb1/attachment.htm 


More information about the LDTP-dev mailing list