[wxPython-dev] 2.8.4.0 release

Roman Rolinsky rolinsky at femagsoft.com
Fri Apr 27 13:36:06 PDT 2007


Hi Robin,

On Fri, 2007-04-27 at 12:07 -0700, Robin Dunn wrote:
> Roman Rolinsky wrote:
> > On Fri, 2007-04-20 at 13:15 -0700, Robin Dunn wrote:
> >> Hi all, here's your official warning that a 2.8.4.0 release of wxPython 
> >> is coming soon (probably in a couple weeks) so if you have updates for 
> >> your contribs that need to be checked in and tested then get me patches 
> >> as soon as possible.  I'd especially like to have an updated 
> >> FloatCanvas.  (hint, hint...)
> > 
> > Hi, I just updated XRCed to revision 0.1.8-5. It has a new experimental
> > feature to add controls by draging icons on the test window using the
> > right button. Mouse position is tracked to highlight the future parent.
> 
> Hi Roman,
> 
> I've experimented a bit with this new code and have run into the 
> following problems:
> 
> * After starting XRCed I add a Panel to the tree, then click the test 
> button and then drag a box sizer onto the test window.  Although the 
> sizer is added successfully, I get this exception twice:
> 
> Traceback (most recent call last):
>    File "/home/work/projects/wx2.9/wxPython/wx/tools/XRCed/tree.py", 
> line 1359, in OnLeave
>      self.RemoveHL()
>    File "/home/work/projects/wx2.9/wxPython/wx/tools/XRCed/tree.py", 
> line 1364, in RemoveHL
>      if hl.item: g.tree.SetItemTextColour(hl.item, g.tree.itemColour)
> AttributeError: 'XML_Tree' object has no attribute 'itemColour'

fixed.

> * Then I added some controls, and when adding a wxEXPAND flag to a 
> TextCtrl I got this exception, and continued getting it when I tried to 
> do anything else with the items in the tree:
> 
> Traceback (most recent call last):
>    File "/home/work/projects/wx2.9/wxPython/wx/tools/XRCed/tree.py", 
> line 772, in OnSelChanged
>      self.SelectItem(evt.GetItem())
>    File "/home/work/projects/wx2.9/wxPython/wx/tools/XRCed/tree.py", 
> line 1126, in SelectItem
>      self.ChangeSelection(item)
>    File "/home/work/projects/wx2.9/wxPython/wx/tools/XRCed/tree.py", 
> line 786, in ChangeSelection
>      self.Apply(xxx, oldItem)
>    File "/home/work/projects/wx2.9/wxPython/wx/tools/XRCed/tree.py", 
> line 1252, in Apply
>      g.panel.Apply()
>    File "/home/work/projects/wx2.9/wxPython/wx/tools/XRCed/panel.py", 
> line 173, in Apply
>      for p in self.pages: p.Apply()
>    File "/home/work/projects/wx2.9/wxPython/wx/tools/XRCed/panel.py", 
> line 242, in Apply
>      paramObj = xxx.params[param]
> KeyError: 'border'

Can you tell exactly how to reproduce this?

> * In another test run I made a panel with a box sizer and a flex sizer 
> inside of that.  Then I added a bunch of controls to the flex sizer 
> without DnD.  Then I dragged some buttons using DnD.  Since they ended 
> up in the box sizer instead of the flex sizer I used the make child 
> button on the toolbar and although it did move as expected, I got this 
> exception:
> 
> Traceback (most recent call last):
>    File "xrced.py", line 1334, in OnIdle
>      tree.HighLight(tree.pendingHighLight)
>    File "/home/work/projects/wx2.9/wxPython/wx/tools/XRCed/tree.py", 
> line 827, in HighLight
>      obj = self.FindNodeObject(item)
>    File "/home/work/projects/wx2.9/wxPython/wx/tools/XRCed/tree.py", 
> line 760, in FindNodeObject
>      child = parentWin.GetChildren()[self.WindowIndex(item)]
> IndexError: list index out of range

I made some fixes, please try if it works now.

> * The green text in the tree is hard to read because of the greenish 
> background.  I expect that it would probably almost be invisible for 
> people with some forms of color blindness.  You should use a darker 
> color for that.  A dark green will probably be okay if you want to stick 
> with a green shade.  Also, what does the colored text indicate for that 
> item?

It indicates the future parent item. I changed the highlight colour to
dark green. The parent detection is based on the current window under
the mouse, and it if it's a panel it takes the panel's sizer which in
your case is the external one. If you drop on a object who can't have
children, then the tree parent of this object is used, which will be the
internal sizer. Unfortunately it only works for some controls, which do
not use drag-and-drop themselfs, the controls like TextCtrl are
invisible to the drop oject.

I plan to add usage of modifier keys similar to sibling/insert modes,
for example a mode to limit the future parent to be inside the currently
selected tree item.

*** Non-stop coding mode off ***

Regards,

Roman






More information about the wxpython-dev mailing list