After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 344157 - object.dump() output includes function names that cannot be executed
object.dump() output includes function names that cannot be executed
Status: RESOLVED NOTABUG
Product: dogtail
Classification: Deprecated
Component: Framework
0.4.x
Other All
: Normal normal
: ---
Assigned To: Dogtail Maintainers
Dogtail Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-06-07 13:40 UTC by Len DiMaggio
Modified: 2006-07-14 15:38 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Len DiMaggio 2006-06-07 13:40:41 UTC
Please describe the problem:
This may be a user error, but something funny is going on here. Using the dump() function on an object such as a GUI button returns a list of functions - some of which are not executable for the button. Corresponding dir(Button) output does not include these function names.

For example, selecting the 'Open' button in gedit returns a list of these functions:

 press
 release
 click

But, dir (Button) does not return press or release. This seems broken - shouldn't the press/release functions always be available for a button?


Steps to reproduce:
Here's a series of commands entered into the Python interpreter that recreate the problem:

>>> gedit = tree.root.application ('gedit')
>>> theButton = gedit.button('Open')
>>> dir (theButton)
['_Node__accessible', '_Node__action', '_Node__component', '_Node__hideChildren', '_Node__nodeIsIdentifiable', '_Node__text', '__doc__', '__getattr__', '__init__', '__module__', '__setattr__', '__str__', 'addSelection', 'blink', 'button', 'child', 'childLabelled', 'childNamed', 'click', 'contained', 'debugName', 'doAction', 'dump', 'findAncestor', 'findChild', 'findChildren', 'getAbsoluteSearchPath', 'getLogString', 'getNSelections', 'getRelativeSearch', 'getUserVisibleStrings', 'grabFocus', 'menu', 'menuItem', 'rawClick', 'rawType', 'removeSelection', 'satisfies', 'setSelection', 'tab', 'textentry', 'typeText']
>>> theButton.dump()
{"Open" button}
 press
 release
 click
>>> theButton.click()
click on {"Open" button}
1
>>> theButton.press()
Traceback (most recent call last):
  • File "<stdin>", line 1 in ?
  • File "/usr/lib/python2.4/site-packages/dogtail/tree.py", line 485 in __getattr__
    else: raise AttributeError, attr
AttributeError: press



Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Zack Cerza 2006-06-07 17:35:40 UTC
The output of Node.dump() wasn't intended to produce anything directly mappable to the output of dir() - it was written as a way to list the capabilities of the underlying Accessible objects. It's very outdated at this point, and I've been thinking of ripping it out. I just wonder if anyone at all is using it.