problem about wx-Collection of common programming errors
bdesham
wxpython wx
I’m creating a wx.Dialog subclass and I’m a little confused about how the dialog’s DefaultItem property is supposed to work. I’m running on OS X. I put together this short example:import wxclass DialogTest(wx.Dialog):def __init__(self, parent):wx.Dialog.__init__(self, parent)# text_entry = wx.TextCtrl(self, wx.NewId(), ”)button_sizer = wx.StdDialogButtonSizer()ok_button = wx.Button(self, wx.ID_OK, ‘OK’)button_sizer.SetAffirmativeButton(ok_button)self.SetDefaultItem(ok_button)cancel_button = wx.
Eric Wong
wxpython wxwidgets wx
In one of my program, I want to add a ‘Recent Used’ feature in the ‘File’ Menu. So, when users select ‘File > Recent Used’, it will show up a sub menu with the history list. I know how to append a sub menu using AppendSubMenu. But the problem is the ‘File’ menu is created statically when initializing the menubar as well as ‘File’,’View’ menus, etc. How to append a submenu dynamically at runtime? Thanks.
Artur
visual-studio-2010 visual-studio visual-c++ wxwidgets wx
I have been trying to upgrade to wxWidgets 2.9.4 over my old 2.8.12 and have run into problems. I compiled it without errors from the command line but when I try to use them in the program that worked just fine under the previous version I get unresolved externals. I cut it down to just a bare frame and TextCtrl object and it still does this (it’s basically identical to one of the sample codes at the moment).I tried the following commands to build the static libraries:nmake -f makefile.vc SHARED
Adam Crossland
python wxpython wxwidgets wx gui2exe
I have made an application in wxpython, and I want to make it executable. All goes ok. All dlls needed are there, but when I try to run my exe I get the following error:Runtime error R6034, An application has made an attempt to load C runtime library incorrectly.
Codemonkey
python wxpython wx
I have a grid application where a column can be, for instance, flagged as super-important. When this is done, I use Grid.SetColAttr to change the colour of the column. When the user removes the flag, however, I can’t seem to undo the SetColAttr. Calling it again with None instead of an attribute object causes Python to mysteriously crash with no error message, and iterating over all the cells and calling SetAttr(row, col, None) has no effect on the color of the column. I guess that’s because the
Dave Branton
python leak wx
I’m some way into building a fairly complex wxPython app using ode for physical modelling, openGL for rendering, and wx for UI. Everything was going swimmingly until the application started to crash. After a few days of making no progress I finally noticed that my application was leaking memory. I was able to distill into a smallish example script something that leaks at a quite extraordinary rate:#——————————————————————————- #—————–
HostileFork
python python-idle wx
When I run this code in IDLE, it crashes. However, if I run it outside of IDLE it works just fine.There are a couple of Python IDEs that are written in python that suffer the same problem, but if I use an IDE/editor that’s not based on it, those run fine as well.Is there any way of modifying this code so it doesn’t muck up IDLE & Friends?import wxdef MultiChoiceDialog(parent, title, message, choices):app = wx.PySimpleApp()app.MainLoop()dlg = wx.MultiChoiceDialog(parent, title, message, choi
linuxrules94
python multithreading exception assertion wx
I have a program (time lapse maker) which has two threads that updates a wx.StaticBitmap. When the two threads access the wx.StaticBitmap it crashes with the error python: xcb_io.c:221: poll_for_event: Assertion `(((long)(event_sequence) – (long) (dpy->request)) <= 0)’ failed.I tried a Google search for the answer and I tried to solve it myself but I still can’t figure it out.Simple piece of code that reproduces this error (this is not the actual program):#!/usr/bin/env pythonimport wx import
Erxin
crash wxpython wx wxgrid
The customized grid and grid table are used in my program. There is a strange program behavior when I call the method grid.DeleteCols, the method is overwrite in the customize grid table show as below def DeleteCols(self, pos, num=1): for n in xrange(num): if pos < self.col_count: self.data.pop(pos) self.col_count = self.col_count – 1 self.__msg((gridlib.GRIDTABLE_NOTIFY_COLS_DELETED, pos, num)) Currently if call the method directly from the instance of grid, a few seconds later the program w
unutbu
python unicode wxpython wx
I have a problem with wx and python which seems to be a unicode one.I’m using Portable python 2.7.2.1 and wx-2.8-msw-unicode.My python code at the point of failure is this statement:listbox.AppendText(“\n ” + dparser.parse(t[‘created_at’]).strftime(‘%H-%M-%S’) + ” ” +t[‘text’] + “\n”)t[‘text’] has a value: “RT @WebbieBmx: “@AlexColebornBmx: http://t.co/cN6zSO69″watch this an #retweet”which when printed in the DOS window from which I’m running python displays as:’RT @WebbieBmx: \xe2\x80\x9c@A
Casimir et Hippolyte
wxwidgets wx wxruby
I am trying to register a global hotkey using wxruby on Windows 7.require ‘wx’ frame = Wx::Frame.new frame.register_hot_key(100, Wx::MOD_ALT, Wx::K_F1)But I obtain this error message:NoMethodError: undefined method register_hot_key for #<Wx::Frame:0x38bfd70>Wx::Frame inherits from Wx::Window, so I would expect that method to be there. Any ideas on why this doesn not work? Am I doing something wrong?(I am using wxruby (2.0.1 x86-mingw32).)
Web site is in building