missing reference in documentation for UIActionSimulator

UIActionSimulator is a class used to simulate user interface actions such as a mouse click or a key press.

Common usage for this class would be to provide playback and record (aka macro recording) functionality for users, or to drive unit tests by
simulating user sessions.

See the for an example of using this class.

The third sentence (the one referencing an example usage somewhere) seems to be incomplete.

I’d love to see an example of using this class.

thanks

···

On this page: http://wxpython.org/Phoenix/docs/html/UIActionSimulator.html#uiactionsimulator It says:

I should have added that I did find one example that Robin (I believe) posted somewhere else. It ends this way:

if name == ‘main’:
import sys,os
import run
run.main([’’, os.path.basename(sys.argv[0])] + sys.argv[1:])

When Python gets to the line that says “import run” it makes rude noises and then laughs at me.

···

jimmy@cs.cofc.edu wrote:

On this page:

http://wxpython.org/Phoenix/docs/html/UIActionSimulator.html#uiactionsimulator

It says:

/UIActionSimulator/
<http://wxpython.org/Phoenix/docs/html/UIActionSimulator.html#uiactionsimulator&gt;
is a class used to simulate user interface actions such as a mouse click
or a key press.

Common usage for this class would be to provide playback and record (aka
macro recording) functionality for users, or to drive unit tests by
simulating user sessions.

See the for an example of using this class.

The third sentence (the one referencing an example usage somewhere)
seems to be incomplete.

Probably a glitch in how the C++ docs are processed into Python docs.

···

--
Robin Dunn
Software Craftsman

jimmy@cs.cofc.edu wrote:

I should have added that I did find one example that Robin (I believe)
posted somewhere else. It ends this way:

if __name__ == '__main__':
import sys,os
import run
run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:])

When Python gets to the line that says "import run" it makes rude noises
and then laughs at me.

That is the standard startup code for modules that are meant to be in the demo framework, which is where the run module is located. You can either copy it there and run it standalone, (or run the one that is probably already there if you have a 2.9 version of the demo) or you can replace that with more typical startup code that creates a wx.App, a wx.Frame, and puts an instance of the TestPanel in that frame.

···

--
Robin Dunn
Software Craftsman