Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

[open] QSpinBox.setValue expects int, but is given unicode

edited March 2013 in OpenSesame

Hi Sebastiaan,

When a SOA is set in a loop item (as an integer value) and it is attempted to use this in an advanced_delay item (by means of adjusting the script, e.g. to 'set duration "[soa]"'), an error occurs. As far as I gather from the error message, it boils down to the fact that the QSpinBox.setValue function expects an integer, but is given a unicode type argument instead. This isn't limited to 0.27: same error occurs with 0.26 and 0.25 interprets [soa] as a string.

Is it possible to implement support for the use of variables in the advanced_delay?

Cheers!

Comments

  • edited 10:06PM

    Hi Edwin,

    Thanks, yes this is indeed a bug (issue). It's a general problem that occurs in all plug-ins that use a QSpinBox by way of qtplugin.add_spinbox_control().

    It's easily fixed, but the question is what the desired behavior would be, since a QSpinBox can obviously not deal with anything but numeric values. Perhaps it would be best to gray out the affected QSpinBox and present a message that you have to edit the script to change this control. What do you think?

    Cheers,

    Sebastiaan

  • edited 10:06PM

    Thanks! I think the graying out is a good solution, as long as the presented message is informative enough even for a new user.

Sign In or Register to comment.