xrced issues - was Re: 20100113 Test build available

Hi,

just tried xrced and had to change a few things to make it work.

* Errors with wrong number of lines/columns specifed in
AttributePanel.py and params.py with GridSizers and FlexGridSizers
(only 2 files with these sizers as far as I can tell).

These will appear as
wx._core.PyAssertionError: C++ assertion "Assert failure" failed at
..\..\src\common\sizer.cpp(1352) in wxGridSizer::Insert(): too many
items (18 > 1*17) in grid sizer (maybe you should omit the number of
either rows or columns?)

In params.py, StylePanel
- sizer = wx.GridSizer(len(genericStyles), 1, 1, 5)
+ sizer = wx.GridSizer(0, 1, 1, 5)

- sizer = wx.GridSizer(len(styles), 1, 1, 5)
+ sizer = wx.GridSizer(0, 1, 1, 5)

Changed AttributePanel.py and params.py (see attached)
class Panel:
- sizer = wx.FlexGridSizer(2, 2, 1, 5)
+ sizer = wx.FlexGridSizer(0, 2, 1, 5)

class AttributePanel :
- sizer = wx.FlexGridSizer(len(attributes), 2, 0, 0)
+ sizer = wx.FlexGridSizer(0, 2, 0, 0)

class CodePanel :
- sizer = wx.GridSizer(len(events), 1, 0, 5)
+ sizer = wx.GridSizer(0, 1, 0, 5)

# Additional comboboxes
- self.eventSizer = wx.FlexGridSizer(1, 2, 0, 0)
+ self.eventSizer = wx.FlexGridSizer(0, 2, 0, 0)

* sets.Set() Deprecation warning in component.py - Found a solution in

and used (see attached)
+ try:
+ set
+ except NameError:
+ from sets import Set as se
instead of
- from sets import Set

Also in canHaveChild() used
- groups = Set(component.groups)
+ groups = set(component.groups)

* empty / new project is flagged as modified and will need to be saved
before a file can be opened.

in presenter.py, setApplied
- self.setModified(setDirty=False) # toggle global state
+ self.setModified(False,setDirty=False) # toggle global state

* Intermittent / not sure. Could be when opening two files in a row?
Will try and generate a test case for that.

Traceback (most recent call last):
  File "c:\python26\lib\site-packages\wx-2.9.0-msw-unicode\wx\_core.py",
line 16223, in <lambda>
    lambda event: event.callable(*event.args, **event.kw) )
  File "c:\python26\lib\site-packages\wx-2.9.0-msw-unicode\wx\tools\XRCed\presenter.py",
line 139, in setData
    TRACE('setData: %s', node.getAttribute('class'))
AttributeError: 'NoneType' object has no attribute 'getAttribute'

That's it for now.

Regards,
Egor

component.py (29.5 KB)

presenter.py (27.4 KB)

AttributePanel.py (16.7 KB)

params.py (39.8 KB)

···

On Fri, Jan 15, 2010 at 1:48 AM, Robin Dunn <robin@alldunn.com> wrote:

Hi All,

I've made another test build which includes fixes for most of the issues
that were reported with the previous build.

NameBright - Coming Soon

--
Robin Dunn
Software Craftsman
http://wxPython.org

--
To unsubscribe, send email to wxPython-dev+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-dev?hl=en

Could you please create an actual patch file for these changes please? Thanks.

···

On 1/15/10 9:52 AM, Egor Zindy wrote:

Hi,

just tried xrced and had to change a few things to make it work.

* Errors with wrong number of lines/columns specifed in
AttributePanel.py and params.py with GridSizers and FlexGridSizers
(only 2 files with these sizers as far as I can tell).

These will appear as
wx._core.PyAssertionError: C++ assertion "Assert failure" failed at
..\..\src\common\sizer.cpp(1352) in wxGridSizer::Insert(): too many
items (18> 1*17) in grid sizer (maybe you should omit the number of
either rows or columns?)

In params.py, StylePanel
- sizer = wx.GridSizer(len(genericStyles), 1, 1, 5)
+ sizer = wx.GridSizer(0, 1, 1, 5)

- sizer = wx.GridSizer(len(styles), 1, 1, 5)
+ sizer = wx.GridSizer(0, 1, 1, 5)

Changed AttributePanel.py and params.py (see attached)
class Panel:
- sizer = wx.FlexGridSizer(2, 2, 1, 5)
+ sizer = wx.FlexGridSizer(0, 2, 1, 5)

class AttributePanel :
- sizer = wx.FlexGridSizer(len(attributes), 2, 0, 0)
+ sizer = wx.FlexGridSizer(0, 2, 0, 0)

class CodePanel :
- sizer = wx.GridSizer(len(events), 1, 0, 5)
+ sizer = wx.GridSizer(0, 1, 0, 5)

# Additional comboboxes
- self.eventSizer = wx.FlexGridSizer(1, 2, 0, 0)
+ self.eventSizer = wx.FlexGridSizer(0, 2, 0, 0)

* sets.Set() Deprecation warning in component.py - Found a solution in
Bug #284660 “Python 2.6: DeprecationWarning on startup using set...” : Bugs : IPython

and used (see attached)
+ try:
+ set
+ except NameError:
+ from sets import Set as se
instead of
- from sets import Set

Also in canHaveChild() used
- groups = Set(component.groups)
+ groups = set(component.groups)

* empty / new project is flagged as modified and will need to be saved
before a file can be opened.

in presenter.py, setApplied
- self.setModified(setDirty=False) # toggle global state
+ self.setModified(False,setDirty=False) # toggle global state

* Intermittent / not sure. Could be when opening two files in a row?
Will try and generate a test case for that.

Traceback (most recent call last):
   File "c:\python26\lib\site-packages\wx-2.9.0-msw-unicode\wx\_core.py",
line 16223, in<lambda>
     lambda event: event.callable(*event.args, **event.kw) )
   File "c:\python26\lib\site-packages\wx-2.9.0-msw-unicode\wx\tools\XRCed\presenter.py",
line 139, in setData
     TRACE('setData: %s', node.getAttribute('class'))
AttributeError: 'NoneType' object has no attribute 'getAttribute'

That's it for now.

--
Robin Dunn
Software Craftsman

In the wxPython demo, I changed the source code from this

class TestPanel(wx.Panel):
    def __init__(self, parent, ID, log):
        wx.Panel.__init__(self, parent, ID)
        self.log = log

        native = wxcal.CalendarCtrl(self, -1, wx.DateTime.Now(),
style=wxcal.CAL_SEQUENTIAL_MONTH_SELECTION)

        txt = wx.StaticText(self, -1, description)
        txt.Wrap(300)

To this...

class TestPanel(wx.Panel):
    def __init__(self, parent, ID, log):
        wx.Panel.__init__(self, parent, ID)
        self.log = log

        native = wxcal.CalendarCtrl(self, -1, wx.DateTime.Now(),
style=wxcal.CAL_SEQUENTIAL_MONTH_SELECTION)
        native.GetDate()
        txt = wx.StaticText(self, -1, description)
        txt.Wrap(300)

The Demo errors out with an exception:
Details: C++ assertion "dt==m_date" failed at
..\..\src\msw\calctrl.cpp(244) in wxCalendarCtrl::GetDate(): mismatch
between data and control

It also fails in my own project. This seems to be a pretty basic
function call and I'm surprised it hasn't been caught yet. Needless
to say, one would think it should be fixed.

Chris.

Hi Robin,

Sorry about that, here’s an actual patch for the trunk/wx/tools/XRCed directory. I have only tested these changes in XP.

Also, I haven’t been able to reproduce the last reported bug, so please disregard, must’ve been something with my xrc file.

Regards,
Egor

fix_xrced.diff (3.85 KB)

···

On Sat, Jan 23, 2010 at 12:56 AM, Robin Dunn robin@alldunn.com wrote:

On 1/15/10 9:52 AM, Egor Zindy wrote:

Hi,

just tried xrced and had to change a few things to make it work.

  • Errors with wrong number of lines/columns specifed in

AttributePanel.py and params.py with GridSizers and FlexGridSizers

(only 2 files with these sizers as far as I can tell).

These will appear as

wx._core.PyAssertionError: C++ assertion “Assert failure” failed at

…..\src\common\sizer.cpp(1352) in wxGridSizer::Insert(): too many

items (18> 1*17) in grid sizer (maybe you should omit the number of

either rows or columns?)

In params.py, StylePanel

  • sizer = wx.GridSizer(len(genericStyles), 1, 1, 5)
  • sizer = wx.GridSizer(0, 1, 1, 5)
  • sizer = wx.GridSizer(len(styles), 1, 1, 5)
  • sizer = wx.GridSizer(0, 1, 1, 5)

Changed AttributePanel.py and params.py (see attached)

class Panel:

  • sizer = wx.FlexGridSizer(2, 2, 1, 5)
  • sizer = wx.FlexGridSizer(0, 2, 1, 5)

class AttributePanel :

  • sizer = wx.FlexGridSizer(len(attributes), 2, 0, 0)
  • sizer = wx.FlexGridSizer(0, 2, 0, 0)

class CodePanel :

  • sizer = wx.GridSizer(len(events), 1, 0, 5)
  • sizer = wx.GridSizer(0, 1, 0, 5)

Additional comboboxes

  • self.eventSizer = wx.FlexGridSizer(1, 2, 0, 0)
  • self.eventSizer = wx.FlexGridSizer(0, 2, 0, 0)
  • sets.Set() Deprecation warning in component.py - Found a solution in

https://bugs.launchpad.net/ipython/+bug/284660

and used (see attached)

  • try:

  • set

  • except NameError:

  • from sets import Set as se

instead of

  • from sets import Set

Also in canHaveChild() used

  • groups = Set(component.groups)
  • groups = set(component.groups)
  • empty / new project is flagged as modified and will need to be saved

before a file can be opened.

in presenter.py, setApplied

  • self.setModified(setDirty=False) # toggle global state
  • self.setModified(False,setDirty=False) # toggle global state
  • Intermittent / not sure. Could be when opening two files in a row?

Will try and generate a test case for that.

Traceback (most recent call last):

File “c:\python26\lib\site-packages\wx-2.9.0-msw-unicode\wx_core.py”,

line 16223, in

 lambda event: event.callable(*event.args, **[event.kw](http://event.kw)) )

File “c:\python26\lib\site-packages\wx-2.9.0-msw-unicode\wx\tools\XRCed\presenter.py”,

line 139, in setData

 TRACE('setData: %s', node.getAttribute('class'))

AttributeError: ‘NoneType’ object has no attribute ‘getAttribute’

That’s it for now.

Could you please create an actual patch file for these changes please? Thanks.

Robin Dunn

Software Craftsman

http://wxPython.org

To unsubscribe, send email to wxPython-dev+unsubscribe@googlegroups.com

or visit http://groups.google.com/group/wxPython-dev?hl=en