Register Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
Damaya

Junior Member
Registered:
Posts: 6
Reply with quote  #1 
Hi there,

I was debugging some runtime v1 code for a new task and found some weird behavior from the showcursor function.

In our testing we tried creating text objects with the mgladdtext command to show at the end of a trial but a call to turn off the joystick cursor using "showcursor('off')" would hide both the joystick cursor and the text object we just created.

For reference we are using build 118 on our computer  
0
Jaewon

Administrator
Registered:
Posts: 648
Reply with quote  #2 
Show your code please. The text might be deactivated somewhere in your code. "showcursor(off)" just tags the cursor as deactivated. You have to update the screen, to make it actually disappear.
0
Damaya

Junior Member
Registered:
Posts: 6
Reply with quote  #3 
Sent you an email with a copy of the timing file.
0
Jaewon

Administrator
Registered:
Posts: 648
Reply with quote  #4 
First of all, it is this line that turns off the text.

mglactivategraphic([str1], 0);

I didn't run your script, but I guess you can track when the command is executed.

Second, MGL objects are not MATLAB variables. You should destroy them before another object is assigned to the same variable or the script finishes. To change the string of the existing text object, use mglsetproperty with 'text'.

http://forums.monkeylogic.org/post/show_single_post?pid=1303030360&postcount=4&forum=454793

mglsetproperty(str1, 'text', 'new string');
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.