Add option to store tool references and use with Bind() in generated Python code
See original GitHub issueCurrently, tool references are not stored at least when generating Python code. Tool ID’s cannot be used when binding events to handlers.
self.frame_toolbar.AddTool(wx.ID_ANY, "Help", wx.Bitmap("help.png", wx.BITMAP_TYPE_ANY), wx.NullBitmap, wx.ITEM_NORMAL, "", "")
...
self.Bind(wx.EVT_TOOL, self.onHelpClicked, id=wx.ID_ANY)
Preferred way would be to have an option to store references and use them with Bind(). This would be consistent with how menu items are handled.
self.helpTool = self.frame_toolbar.AddTool(wx.ID_ANY, "Help", wx.Bitmap("help.png", wx.BITMAP_TYPE_ANY), wx.NullBitmap, wx.ITEM_NORMAL, "", "")
...
self.Bind(wx.EVT_TOOL, self.onHelpClicked, id=self.helpTool.GetId())
Issue Analytics
- State:
- Created 4 years ago
- Comments:8
Top Results From Across the Web
Python Bindings: Calling C or C++ From Python
What are Python bindings? Should you use ctypes, CFFI, or a different tool? In this step-by-step tutorial, you'll get an overview of some...
Read more >5. The import system — Python 3.11.1 documentation
When a regular package is imported, this __init__.py file is implicitly executed, and the objects it defines are bound to names in the...
Read more >Protocol Buffer Basics: Python - Google Developers
Here is a program which reads an AddressBook from a file, adds one new Person to it based on user input, and writes...
Read more >Using the Python Connector - Snowflake Documentation
The example below executes a USE DATABASE command before the CREATE SCHEMA command to ensure that the schema is created in the correct...
Read more >Python developer reference for Azure Functions
Create Python functions by using Visual Studio Code ... the following function.json tells the runtime to use the customentry() method in the ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fine. I will add some test cases and then integrate it into the master branch. I will put the optional (attribute) names on my todo list, but not with high priority. (Maybe someone volunteers for this.)
1.0.0a1 is online.