Re: Bug in wx.StatusBar.SetFieldsCount (Phoenix)

Werner <[email protected]>
Newsgroups gmane.comp.python.wxpython.devel
Message-ID <[email protected]>
On 3/31/2015 19:21, Const wrote:
> Documentations states:
>
>     SetFieldsCount(self, number=1, widths=None)
>     widths (int) – An array of n integers interpreted in the same way
>     as in SetStatusWidths()
>
> So statusBar.SetFieldsCount(2, [-1, -1]) should work, but it fails 
> with the error:
Should work according to doc, but probably needs some tuning in 
etg/statusbar.py - see below.
>
>     Traceback (most recent call last):
>       File "C:\users\millsj\sandbox\Py2Py3\wx_cursor.py", line 61, in
>     OnInit
>         frame = CanvasFrame()
>       File "C:\users\millsj\sandbox\Py2Py3\wx_cursor.py", line 40, in
>     __init__
>         self.statusBar.SetFieldsCount(2, [-1, -1])
>     TypeError: StatusBar.SetFieldsCount(): argument 2 has unexpected
>     type 'list'
>
> Now,  statusBar.SetFieldsCount(1, -1) unexpectedly works, and 
> statusBar.SetStatusWidths([-1, -1]) works as advertised.
A recent commit changed some of this to match documentation and to be 
consistent, but didn't touch SetFieldsCount.

https://github.com/wxWidgets/Phoenix/commit/b048fb93efd9cdee96ef49af70c1e4f4155c5f96

Werner

-- 
You received this message because you are subscribed to the Google Groups "wxPython-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.