bug in screen function

Hello,

I've been having problems running even a basic script using Psychtoolbox 3. I have tried it on two computers with no luck. This script worked with Psychtoolbox 2. I have also updated both computers I tried it on to Matlab 7.4. The problem I am having is that the screen comes up in color, and the text is flashed in the correct location, but it only remains on-screen for a split second. The screen, in color, remains up for the set 6 seconds. Is this a problem with the DrawText function? Am I coding this incorrectly? Thank you!


window = Screen('OpenWindow',0,[200 0 120]);
Screen('TextFont',window,'Arial Bold');
Screen('TextSize',window,[30]);
Screen('DrawText',window,'Test.',100,100,[255]);
pause(6);
Screen('CloseAll');
<http://psychtoolbox.org/wikka.php?wakka=FaqBackwardsCompatible>

--- In psychtoolbox@yahoogroups.com, "Pisarcik, Jordan" <Jordan_Pisarcik@...> wrote:
>
> Hello,
>
> I've been having problems running even a basic script using Psychtoolbox 3. I have
tried it on two computers with no luck. This script worked with Psychtoolbox 2. I have
also updated both computers I tried it on to Matlab 7.4. The problem I am having is that
the screen comes up in color, and the text is flashed in the correct location, but it only
remains on-screen for a split second. The screen, in color, remains up for the set 6
seconds. Is this a problem with the DrawText function? Am I coding this incorrectly?
Thank you!
>
>
> window = Screen('OpenWindow',0,[200 0 120]);
> Screen('TextFont',window,'Arial Bold');
> Screen('TextSize',window,[30]);
> Screen('DrawText',window,'Test.',100,100,[255]);
> pause(6);
> Screen('CloseAll');
>
Jordan,

In your particular example, you'll have to add a
Screen('Flip', window) statement after your last drawing command.
This will make visible all that you've drawn. Once you get used to it, it is
actually very handy that drawing is not immediate.

Take a look at some of the demos (in PsychDemos dir) to see how to best use the OpenGL
version of the PTB.

Frans

--- In psychtoolbox@yahoogroups.com, "Pisarcik, Jordan" <Jordan_Pisarcik@...> wrote:
>
> Hello,
>
> I've been having problems running even a basic script using Psychtoolbox 3. I have
tried it on two computers with no luck. This script worked with Psychtoolbox 2. I have
also updated both computers I tried it on to Matlab 7.4. The problem I am having is that
the screen comes up in color, and the text is flashed in the correct location, but it only
remains on-screen for a split second. The screen, in color, remains up for the set 6
seconds. Is this a problem with the DrawText function? Am I coding this incorrectly?
Thank you!
>
>
> window = Screen('OpenWindow',0,[200 0 120]);
> Screen('TextFont',window,'Arial Bold');
> Screen('TextSize',window,[30]);
> Screen('DrawText',window,'Test.',100,100,[255]);
> pause(6);
> Screen('CloseAll');
>