from.render() not working with legacy backend
in OpenSesame
I'm trying to show a simple form (no user input) for 2 seconds.
After constructing the form with python, I'm calling:
form.render() self.sleep(2000)
However, the form is only shown for a really short time and the sleep seems to happen before that. It works fine with other backends, such as Expyriment.
Is this a bug or am I missing something?
The reason I'm using the legacy backend is the slow performance with the other backends, as I'm using many touchable image buttons (changing their image on touch).
Comments
Hi Jaykob,
My experience with forms is very limited, but I think this is because the form.render() is not meant to show the form on screen, but simply 'build' it, which means that the form is drawn to a back buffer first. To show the form, you need to call _exec(): see http://osdoc.cogsci.nl/3.1/manual/forms/widgets/form/#function-form4695exec40focus95widgetnone41. So does it work if you do:
Hi Daniel!
I also tried out the different combinations of render() and _exec().
With your code it shows the form but then waits indefinitely for an input - which can't be provided as I don't have a text input, button or any other input...
Calling
form.render()should show the form without waiting for input, so it's similar tocanvas.show().So your approach looks correct. Could you upload the experiment so that we can see what's wrong?
Cheers,
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
OK, good to know that my approach is correct.
I just created a very minimal experiment with basically only this form and it doesn't work either. The screen stays gray for 2s until the welcome sketchpad appears.
I'm working with the newest Mac version 3.1.2.
filedropper.com/opensesameformbug
Somehow the problem disappeared and it seems to be working now
Update: I'm having this problem again in a new experiment...