Re: [PyQt] TypeError: type 'str' is not supported as a pyqtSignal() type argument type

2010-07-31 Thread Phil Thompson
On Fri, 30 Jul 2010 15:29:33 -0700 (PDT), Demetrius Cassidy
dcassid...@mass.rr.com wrote:
 I believe the single quotes would return a python str object. Now that I
 think about it you are correct that string itself is not a type. But you
 should be able pass a string instead of another object to get the same
 results. At least that always worked for me prior to this release.
 
 These fail:
 pyqtSignal('str')
 Traceback (most recent call last):
   File stdin, line 1, in module
 TypeError: type 'str' is not supported as a pyqtSignal() type argument
type
 pyqtSignal('list')
 Traceback (most recent call last):
   File stdin, line 1, in module
 TypeError: type 'str' is not supported as a pyqtSignal() type argument
type
 
 But these work:
 pyqtSignal(str)
 unbound signal 
 pyqtSignal(list)
 unbound signal 

 
 I am not sure if the above was working due to a bug that was fixed, or
if
 this change was intentional?

Either way, the current behaviour is correct.

Phil
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


[PyQt] TypeError: type 'str' is not supported as a pyqtSignal() type argument type

2010-07-30 Thread Demetrius Cassidy

I am not sure why 'string' is no longer allowed in pyqtSignal. I tried using
the latest 4.7.5 snapshot, but this line below throws a type error:

pyqtSignal('string', 'string')


This was working fine as of 4.7.2 - any ideas?
-- 
View this message in context: 
http://old.nabble.com/TypeError%3A-type-%27str%27-is-not-supported-as-a-pyqtSignal%28%29-type-argument-type-tp29309835p29309835.html
Sent from the PyQt mailing list archive at Nabble.com.

___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] TypeError: type 'str' is not supported as a pyqtSignal() type argument type

2010-07-30 Thread Phil Thompson
On Fri, 30 Jul 2010 13:54:06 -0700 (PDT), Demetrius Cassidy
dcassid...@mass.rr.com wrote:
 I am not sure why 'string' is no longer allowed in pyqtSignal. I tried
 using
 the latest 4.7.5 snapshot, but this line below throws a type error:
 
 pyqtSignal('string', 'string')
 
 
 This was working fine as of 4.7.2 - any ideas?

I don't see how that could ever have worked as 'string' is not the name of
a type.

Phil
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] TypeError: type 'str' is not supported as a pyqtSignal() type argument type

2010-07-30 Thread Demetrius Cassidy

I believe the single quotes would return a python str object. Now that I
think about it you are correct that string itself is not a type. But you
should be able pass a string instead of another object to get the same
results. At least that always worked for me prior to this release.

These fail:
 pyqtSignal('str')
Traceback (most recent call last):
  File stdin, line 1, in module
TypeError: type 'str' is not supported as a pyqtSignal() type argument type
 pyqtSignal('list')
Traceback (most recent call last):
  File stdin, line 1, in module
TypeError: type 'str' is not supported as a pyqtSignal() type argument type

But these work:
 pyqtSignal(str)
unbound signal 
 pyqtSignal(list)
unbound signal 


I am not sure if the above was working due to a bug that was fixed, or if
this change was intentional?


Phil Thompson-5 wrote:
 
 On Fri, 30 Jul 2010 13:54:06 -0700 (PDT), Demetrius Cassidy
 dcassid...@mass.rr.com wrote:
 I am not sure why 'string' is no longer allowed in pyqtSignal. I tried
 using
 the latest 4.7.5 snapshot, but this line below throws a type error:
 
 pyqtSignal('string', 'string')
 
 
 This was working fine as of 4.7.2 - any ideas?
 
 I don't see how that could ever have worked as 'string' is not the name of
 a type.
 
 Phil
 ___
 PyQt mailing listPyQt@riverbankcomputing.com
 http://www.riverbankcomputing.com/mailman/listinfo/pyqt
 
 

-- 
View this message in context: 
http://old.nabble.com/TypeError%3A-type-%27str%27-is-not-supported-as-a-pyqtSignal%28%29-type-argument-type-tp29309835p29310401.html
Sent from the PyQt mailing list archive at Nabble.com.

___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] TypeError: type 'str' is not supported as a pyqtSignal() type argument type

2010-07-30 Thread Leo Spalteholz
 I believe the single quotes would return a python str object. 

Not according to the docs: 
http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/pyqt4ref.html#defining-new-signals-with-qtcore-pyqtsignal

Qt types should be in strings, not python types.

___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt