Python Forum
[WxPython] Which def is executed?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[WxPython] Which def is executed?
#6
traceback is what python prints out on the console when an error is encountered

Your code has changed, "sid = wx.ID_ANY" is no longer there, but in the menu definition.
This does not change the issue, which is:
The reason is that the initial value of wx.ID_ANY ire compiled into the menu
like a constant, not a variable. So it's permanent value is what it was when the
menu code was first encountered on initialization. The actual value of wx.ID_ANY can change,
but the menu value remains constant. You need to query that value at the time the menu
method is executed.
Reply


Messages In This Thread
Which def is executed? - by merlem - Feb-09-2017, 01:57 PM
RE: Which def is executed? - by Larz60+ - Feb-09-2017, 02:25 PM
RE: Which def is executed? - by merlem - Feb-09-2017, 03:14 PM
RE: Which def is executed? - by Larz60+ - Feb-09-2017, 06:44 PM
RE: Which def is executed? - by merlem - Feb-09-2017, 07:00 PM
RE: Which def is executed? - by Larz60+ - Feb-09-2017, 07:51 PM
RE: Which def is executed? - by merlem - Feb-09-2017, 08:13 PM
RE: Which def is executed? - by Larz60+ - Feb-09-2017, 09:22 PM
RE: Which def is executed? - by Yoriz - Feb-09-2017, 09:59 PM
RE: Which def is executed? - by merlem - Feb-10-2017, 10:26 AM
RE: Which def is executed? - by Yoriz - Feb-10-2017, 11:28 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [Tkinter] messagebox is not being executed please help erwinsiuda 2 2,319 Apr-02-2020, 01:56 AM
Last Post: Larz60+
  [Tkinter] Window unresponsive when executed. fawazcode 2 3,819 Sep-11-2017, 12:29 AM
Last Post: Larz60+
  [xbmc] How to block the code from executed twice under the loop chris0147 29 23,290 Oct-26-2016, 05:34 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020