exporl / apex

APEX 4: software platform for auditory behavioural and psychophysical experiments. This repository follows the major releases of APEX.
http://kuleuven.be/exporl/apex/
Other
10 stars 1 forks source link

An immediately enabled html-screen is not notified correctly #278

Open linusdm opened 5 years ago

linusdm commented 5 years ago

An html-screen that is immediately enabled (with 'input_during_stimulus' option set to true for example) does not get notified through the "enabled()" function. Although an attempt is made by delaying and waiting to call enabled untill javascript has finished loading, this does not work correctly (tested with webengine, on Ubuntu).

The workaround now is to use the html-screen as an element of the screen used in the first trial. In this situation, the webview is only enabled after pressing "start", after javascript has finished loading. Coincidentally, this is the case in both examples using the html-screen. Or just don't use 'input_during_stimulus'.

Here is a minimal example that breaks: broken-html-screen-enabled.zip

https://github.com/exporl/apex/blob/f8b27582a10f9fe1278925d067a6dce96c10f007/src/lib/apexmain/screen/htmlrundelegate.cpp#L85