Another stab (hopefully the last) at how to handle the delayed

initialization of the stock objects.  Go ahead and create an
uninitialized instance using __new__, and then just set the .this
attribute when the app is initialized.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39350 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2006-05-26 16:43:24 +00:00
parent 293524e162
commit bd2903e1c3
3 changed files with 141 additions and 100 deletions

View File

@@ -120,13 +120,13 @@ source of the clipboard or DnD operation, and then you'll know which
of the component data objects to use to access the data.
Changed how the stock objects (wx.RED, wx.RED_PEN, wx.RED_BRUSH, etc.)
are initialized. They are now created after the wx.App has been
created, but before OnInit is called, so if you use any of these
objects before the wx.App is created you will need to adjust your
code. This was needed because of some delayed initialization
functionality that was implemented in wxWidgets, but the end result is
cleaner for wxPython as well, and allowed me to remove some ugly code
previously hidden under the covers.
are initialized. They are now created as uninitialized instances
using __new__. Then after the wx.App has been created, but before
OnInit is called, the .this attribute of each obhect is initialized.
This was needed because of some delayed initialization functionality
that was implemented in wxWidgets, but the end result is cleaner for
wxPython as well, and allowed me to remove some ugly code previously
hidden under the covers.
Added wx.StandardPaths.GetDocumentsDir.
@@ -146,6 +146,13 @@ Added wrappers for Julian's new wxRichTextCtrl class, visible in
wxPython as wx.richtext.RichTextCtrl window. It still needs some more
work, but it is a great start.
wx.lib.mixins.listctrl.TextEditMixin: Fixed the double END_LABEL_EDIT
event problem in TextEditMixin by checking if the editor was already
hidden before continuing with the CloseEditor method. Also added code
to OpenEditor to send the BEGIN_LABEL_EDIT event and to not allow the
opening of the editor to continue if the event handler doesn't allow
it.