Mike Cannon wrote:
Hi,
I'm building a wxPython application that is a wxNotebook with (so far)
40 tabs. Each tab has about 200 controls, mostly wxCheckBox,
wxTextCtrl, and wxStaticText.At this size, the app fails with the stack trace below. Mostly it
fails in a call to wxCheckBox() (there are more of them) but it will
also fail like this in wxTextCtrl() (example below) or wxStaticText().
[...]
Windows XP,
Python 2.3.2 (#49, Oct 2 2003, 20:02:00)
[MSC v.1200 32 bit (Intel)] on win32,
wxVERSION_STRING = '2.4.2.4'
[...]
File "r:\Mello-et-al\FWSPanel.py", line 474, in _ccwx4CheckBoxes
tb = wxTextCtrl ( pnl, cID, label, tbPos, tbSize )
File "C:\Python23\lib\site-packages\wxPython\controls.py", line 777,
in __init__
self.this = controlsc.new_wxTextCtrl(*_args,**_kwargs)
wxPython.wxc.wxPyAssertionError: C++ assertion "wxAssertFailure"
failed
in e:\Projects\wx2.4\src\msw\control.cpp(134): something is very wrong
[...]
The code snippet in \Projects\wx2.4\src\msw\control.cpp is below. It
doesn't show much except that CreateWindowEx failed for some reason.
...
m_hWnd = (WXHWND)::CreateWindowEx
(
exstyle, // extended style
classname, // the kind of control to
create
label, // the window name
style, // the window style
x, y, w, h, // the window position and
size
GetHwndOf(GetParent()), // parent
(HMENU)GetId(), // child id
wxGetInstance(), // app instance
NULL // creation parameters
);if ( !m_hWnd )
{
wxLogDebug(wxT("Failed to create a control of class '%s'"),
classname);
==> wxFAIL_MSG(_T("something is very wrong"));
return FALSE;
}
Adding a wxLogLastError call and rebuilding will give you info about the
actual failure. I don't know what the actual limits are but the fact
that you have over 8000 windows in your app seems to be a likely
culprit. Perhaps you could design your app such that the notebook pages
are empty when added to the notebook, and then are populated on demand,
and unpopulated when the page is no longer visible?
···
-----Original Message-----
From: Robin Dunn [mailto:robin@alldunn.com]
Sent: Monday, April 19, 2004 2:22 PM
To: wxPython-users@lists.wxwidgets.org
Subject: Re: [wxPython-users] Resource limits in wxPython/wxWidgets ?
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org
===========
There is more information on tabs at
Libero - Community - I siti personali.
htm
An alternate approach is given in an animation about 1/5 of the way down
the page.
Bruce