wx.propgrid setting property editor failed.

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

wx.propgrid setting property editor failed.

sebastian lópez
Hi, I'm upgrading mi code to be used with wxpython phoenix and then I'll use python 3.6, So I was trying to set a property editor but it fails 

TypeError: PropertyGridInterface.SetPropertyEditor(): arguments did not match any overloaded call:
overload 1: argument 1 has unexpected type 'unicode'
overload 2: argument 1 has unexpected type 'unicode'

The code is the same as the documentation  https://wxpython.org/Phoenix/docs/html/wx.propgrid.PGMultiButton.html, finally I used

wx version 3.0.3.dev2832+e3fbb9f
python version v2.7.13:a06454b1afa1





--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: wx.propgrid setting property editor failed.

Scott Talbert-2
On Sun, 2 Apr 2017, sebastian lópez wrote:

> Hi, I'm upgrading mi code to be used with wxpython phoenix and then I'll
> use python 3.6, So I was trying to set a property editor but it fails 
> TypeError: PropertyGridInterface.SetPropertyEditor(): arguments did not
> match any overloaded call:
> overload 1: argument 1 has unexpected type 'unicode'
> overload 2: argument 1 has unexpected type 'unicode'
>
> The code is the same as the documentation
>  https://wxpython.org/Phoenix/docs/html/wx.propgrid.PGMultiButton.html,
> finally I used
>
> wx version 3.0.3.dev2832+e3fbb9f
> python version v2.7.13:a06454b1afa1
Can you try again with the latest snapshot?  It looks like Robin has made
some propgrid related fixes since that snapshot, and I can't reproduce
those errors with the demo.

Scott

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: wx.propgrid setting property editor failed.

sebastian lópez
Hi, I tryed the propertygrid example related to wx version 3.0.3.dev2875+9b743cf and I got this
 
================

*** Mon Apr 03 07:02:22 2017 ***
Traceback (most recent call last):
  File "<string>", line 189, in DoSetAttribute
wxAssertionError: C++ assertion "Assert failure" failed at ..\..\src\common\variant.cpp(837) in wxVariant::GetChar(): Could not convert to a char


*** Mon Apr 03 07:02:44 2017 ***
Traceback (most recent call last):
  File "<string>", line 189, in DoSetAttribute
wxAssertionError: C++ assertion "Assert failure" failed at ..\..\src\common\variant.cpp(837) in wxVariant::GetChar(): Could not convert to a char


*** Mon Apr 03 07:03:02 2017 ***
Traceback (most recent call last):
  File "<string>", line 189, in DoSetAttribute
wxAssertionError: C++ assertion "Assert failure" failed at ..\..\src\common\variant.cpp(837) in wxVariant::GetChar(): Could not convert to a char


*** Mon Apr 03 07:03:09 2017 ***
Traceback (most recent call last):
  File "<string>", line 183, in ValueToString
AttributeError: 'DirsProperty' object has no attribute 'm_display'
==================================================

In the other hand if I try to use my custom PGEditors the app silently crash, so I'm preparing a minimal example to be uploading.



El domingo, 2 de abril de 2017, 19:28:50 (UTC-5), Scott Talbert escribió:
On Sun, 2 Apr 2017, sebastian lópez wrote:

> Hi, I'm upgrading mi code to be used with wxpython phoenix and then I'll
> use python 3.6, So I was trying to set a property editor but it fails 
> TypeError: PropertyGridInterface.SetPropertyEditor(): arguments did not
> match any overloaded call:
> overload 1: argument 1 has unexpected type 'unicode'
> overload 2: argument 1 has unexpected type 'unicode'
>
> The code is the same as the documentation
>  <a href="https://wxpython.org/Phoenix/docs/html/wx.propgrid.PGMultiButton.html" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwxpython.org%2FPhoenix%2Fdocs%2Fhtml%2Fwx.propgrid.PGMultiButton.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHQ4tZqWXgGvVwMpfDieAsE2vOBkA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwxpython.org%2FPhoenix%2Fdocs%2Fhtml%2Fwx.propgrid.PGMultiButton.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHQ4tZqWXgGvVwMpfDieAsE2vOBkA&#39;;return true;">https://wxpython.org/Phoenix/docs/html/wx.propgrid.PGMultiButton.html,
> finally I used
>
> wx version 3.0.3.dev2832+e3fbb9f
> python version v2.7.13:a06454b1afa1

Can you try again with the latest snapshot?  It looks like Robin has made
some propgrid related fixes since that snapshot, and I can't reproduce
those errors with the demo.

Scott

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: wx.propgrid setting property editor failed.

sebastian lópez
I also made some interactive test by trying to Register a LargeImageEditor but I have the following

">>>" means interactive shell
  
>>> editor
<class 'easyDialog.easyDialog.LargeImageEditor'>
>>> editor.__bases__
(<class 'wx._propgrid.PGEditor'>,)
>>> type(editor)
<type 'sip.wrappertype'>
>>> wx.propgrid.PropertyGrid.RegisterEditorClass(editor)
Traceback (most recent call last):
  Debug Probe, prompt 55, line 1
TypeError: PropertyGrid.RegisterEditorClass(): argument 1 has unexpected type 'sip.wrappertype'

The code above was test with

wx version 3.0.3.dev2875+9b743cf
python version v2.7.13:a06454b1afa1
 


El lunes, 3 de abril de 2017, 7:13:49 (UTC-5), sebastian lópez escribió:
Hi, I tryed the <a href="https://github.com/wxWidgets/Phoenix/blob/master/demo/PropertyGrid.py" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FwxWidgets%2FPhoenix%2Fblob%2Fmaster%2Fdemo%2FPropertyGrid.py\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNE22QhPR9DOe5CFIS9SgoO-5-Wv5w&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FwxWidgets%2FPhoenix%2Fblob%2Fmaster%2Fdemo%2FPropertyGrid.py\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNE22QhPR9DOe5CFIS9SgoO-5-Wv5w&#39;;return true;">propertygrid example related to wx version 3.0.3.dev2875+9b743cf and I got this
 
================

*** Mon Apr 03 07:02:22 2017 ***
Traceback (most recent call last):
  File "<string>", line 189, in DoSetAttribute
wxAssertionError: C++ assertion "Assert failure" failed at ..\..\src\common\variant.cpp(837) in wxVariant::GetChar(): Could not convert to a char


*** Mon Apr 03 07:02:44 2017 ***
Traceback (most recent call last):
  File "<string>", line 189, in DoSetAttribute
wxAssertionError: C++ assertion "Assert failure" failed at ..\..\src\common\variant.cpp(837) in wxVariant::GetChar(): Could not convert to a char


*** Mon Apr 03 07:03:02 2017 ***
Traceback (most recent call last):
  File "<string>", line 189, in DoSetAttribute
wxAssertionError: C++ assertion "Assert failure" failed at ..\..\src\common\variant.cpp(837) in wxVariant::GetChar(): Could not convert to a char


*** Mon Apr 03 07:03:09 2017 ***
Traceback (most recent call last):
  File "<string>", line 183, in ValueToString
AttributeError: 'DirsProperty' object has no attribute 'm_display'
==================================================

In the other hand if I try to use my custom PGEditors the app silently crash, so I'm preparing a minimal example to be uploading.



El domingo, 2 de abril de 2017, 19:28:50 (UTC-5), Scott Talbert escribió:
On Sun, 2 Apr 2017, sebastian lópez wrote:

> Hi, I'm upgrading mi code to be used with wxpython phoenix and then I'll
> use python 3.6, So I was trying to set a property editor but it fails 
> TypeError: PropertyGridInterface.SetPropertyEditor(): arguments did not
> match any overloaded call:
> overload 1: argument 1 has unexpected type 'unicode'
> overload 2: argument 1 has unexpected type 'unicode'
>
> The code is the same as the documentation
>  <a href="https://wxpython.org/Phoenix/docs/html/wx.propgrid.PGMultiButton.html" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwxpython.org%2FPhoenix%2Fdocs%2Fhtml%2Fwx.propgrid.PGMultiButton.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHQ4tZqWXgGvVwMpfDieAsE2vOBkA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwxpython.org%2FPhoenix%2Fdocs%2Fhtml%2Fwx.propgrid.PGMultiButton.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHQ4tZqWXgGvVwMpfDieAsE2vOBkA&#39;;return true;">https://wxpython.org/Phoenix/docs/html/wx.propgrid.PGMultiButton.html,
> finally I used
>
> wx version 3.0.3.dev2832+e3fbb9f
> python version v2.7.13:a06454b1afa1

Can you try again with the latest snapshot?  It looks like Robin has made
some propgrid related fixes since that snapshot, and I can't reproduce
those errors with the demo.

Scott

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

propgridfail.py (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: wx.propgrid setting property editor failed.

Robin Dunn
On Monday, April 3, 2017 at 10:11:58 AM UTC-7, sebastian lópez wrote:
>>> type(editor)
<type 'sip.wrappertype'>
>>> wx.propgrid.PropertyGrid.RegisterEditorClass(editor)
Traceback (most recent call last):
  Debug Probe, prompt 55, line 1
TypeError: PropertyGrid.RegisterEditorClass(): argument 1 has unexpected type 'sip.wrappertype'


The method is named rather confusingly, what you need to pass there is an instance of the LargeIMageEditor class, not the class itself. Also you probably should have a wx.App object created before you try doing things like this.

Robin

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: wx.propgrid setting property editor failed.

sebastian lópez
You're rigth, now it's working

Thank's

El lunes, 3 de abril de 2017, 14:28:22 (UTC-5), Robin Dunn escribió:
On Monday, April 3, 2017 at 10:11:58 AM UTC-7, sebastian lópez wrote:
>>> type(editor)
<type 'sip.wrappertype'>
>>> wx.propgrid.PropertyGrid.RegisterEditorClass(editor)
Traceback (most recent call last):
  Debug Probe, prompt 55, line 1
TypeError: PropertyGrid.RegisterEditorClass(): argument 1 has unexpected type 'sip.wrappertype'


The method is named rather confusingly, what you need to pass there is an instance of the LargeIMageEditor class, not the class itself. Also you probably should have a wx.App object created before you try doing things like this.

Robin

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.