My humble opinion still stands nevertheless ;-) Carlos Gonçalves
On 2010/08/12, at 22:12, Marcelo Lira wrote: > Oh, no, I'm a bad communicator! > I was supporting to allow setting dynamic Qt properties. > The "no special cases" I referred to was not treat differently > existing and dynamic Qt properties, and having to explain to the > developer to avoid using the dynamics because we don't trust him (the > developer, no the property). > > 2010/8/12 Carlos Gonçalves <[email protected]>: >> Hi, >> >> On 2010/08/12, at 21:37, Marcelo Lira wrote: >> >>> We had a short discussion on #pyside IRC channel and one point of >>> prohibiting the setting of dynamic properties using the constructor >>> would allow the programmer to make mistakes without knowing. Mistakes >>> such as >>> >>> obj = QObject(objectname='myName') >>> >>> This wouldn't set the existing 'objectName' property, instead it would >>> create the new 'objectname' one. The programmer wouldn't get any >>> feedback and everything would eventually crash at some point. >>> >>> Nevertheless, the alternative >>> >>> obj = QObject() >>> obj.setProperty('objectname', 'myName') >>> >>> would result in the same problem, since people rarely check the result >>> of setProperty. >>> In summation my opinion is that the constructors should not have >>> special cases for dynamic Qt properties. >>> >>> Any thoughts? >> >> You have said pretty much everything, so nothing else to add besides saying >> that I agree with you - setting dynamic Qt properties on constructors should >> not be allowed due to the same reason you have stated above. >> >> >> Carlos Gonçalves > > > > -- > Marcelo Lira dos Santos > INdT - Instituto Nokia de Tecnologia _______________________________________________ PySide mailing list [email protected] http://lists.openbossa.org/listinfo/pyside
