MATRIXx

cancel
Showing results for 
Search instead for 
Did you mean: 

getline produces an illegal output and causes an error

Hello

 

i have some problems with getline under Matrixx 7.17 - windows xp

Calling getline und typing something into the line produces an output like:

plot2d_cb "on_click_border", "MainWin",3;

plot2d_cb "on_click_border", "MainWin",3;

 

The input of the user is ignored.

This problem only occures when getline is  used in a function together with plot2d.

Is this problem known? What can i do to fix this bug?

 

Ralph

 

DaimlerChrysler R&D



0 Kudos
Message 1 of 4
(9,178 Views)

i just build an example to document the problem:

Execute getlinetest.ms

File getlinetest.ms

================

erase {logarea}
display("This Script will show the problems with getline and plot2d")
display("plot2d seems to send his output to getline....")
pause ""
out=getlinetest_in_function(2)

File getlinetest_in_function.msf

==========================

function out=getlinetest_in_function(def_zahl)


plot_win_ampsec1=33
plot_win_ampsec2=34
time_vek=[0:0.01:10]'
y1=[sin(time_vek),cos(time_vek)]
y2=[cos(time_vek),1+cos(time_vek)]
y3=[cos(time_vek),sin(time_vek)]
y4=[-sin(time_vek),-cos(time_vek)]
y5=[-sin(time_vek),cos(time_vek)]
y6=[sin(time_vek),-cos(time_vek)]
plot2d(1,2,{win=plot_win_ampsec1})
plot2d({win=plot_win_ampsec1,destroy=1})
plot2d(1,2,{win=plot_win_ampsec2})
plot2d({win=plot_win_ampsec2,destroy=1})

counter=1
counter_max=20
idx_choice=[]
while out(1)<>0 & counter<counter_max
 display("######### Next Trial ##########")
  # first window
  plot2d(time_vek,[y1],{keep=0,title="az vr", grid,xlab="t[s]",ylab="y1",nr=3,nc=2,r=1,c=1, win=plot_win_ampsec1})
   plot2d(time_vek,[y2],{keep=1,title="az vl", grid,xlab="t[s]",ylab="y2",r=1,c=2,win=plot_win_ampsec1})
   plot2d(time_vek,[y3],{keep=1,title="az hr", grid,xlab="t[s]",ylab="y3",r=2,c=1, win=plot_win_ampsec1})
   plot2d(time_vek,[y4],{keep=1,title="az hl", grid,xlab="t[s]^2",ylab="y4",r=2,c=2, win=plot_win_ampsec1})
   plot2d(time_vek,[y5],{keep=1,title="w_2dot",grid,xlab="t[s]",ylab="y5",r=3,c=1, win=plot_win_ampsec1})
   plot2d(time_vek,[y6],{keep=1,title="n_2dot",grid,xlab="t[s]",ylab="y6",r=3,c=2, win=plot_win_ampsec1})

   # second window
  plot2d(time_vek,[y1],{keep=0,title="az1 vr", grid,xlab="t[s]",ylab="y1",nr=3,nc=2,r=1,c=1, win=plot_win_ampsec2})
   plot2d(time_vek,[y2],{keep=1,title="az1 vl", grid,xlab="t[s]",ylab="y2",r=1,c=2,win=plot_win_ampsec2})
   plot2d(time_vek,[y3],{keep=1,title="az1 hr", grid,xlab="t[s]",ylab="y3",r=2,c=1, win=plot_win_ampsec2})
   plot2d(time_vek,[y4],{keep=1,title="az1 hl", grid,xlab="t[s]",ylab="y4",r=2,c=2, win=plot_win_ampsec2})
   plot2d(time_vek,[y5],{keep=1,title="w1_2dot",grid,xlab="t[s]",ylab="y5",r=3,c=1, win=plot_win_ampsec2})
   plot2d(time_vek,[y6],{keep=1,title="n1_2dot",grid,xlab="t[s]",ylab="y6",r=3,c=2, win=plot_win_ampsec2})

   
  # idx_choice=getchoice("Select something or not",["Topic1","Topic2","Topic3","Topic4","Topic5"],{multiple,default=[idx_choice]})
 
 
 display("Now Click into both plot2d-Windows")
 out=getline("Click into both plot2d-Windows. Exit with 0!")
 display("Output of getline:")
 display(out)
 display("End of Output of getline:")
 errorflag=index(out(1),"plot2d_cb")
 if errorflag<>-1 & errorflag<>[]
   beep
   pause "look to the output of getline"
   pause "This problem occures not only when you click on a window"
   pause "Somtimes moving of a plot2d-Window will produce also the error"
 endif
 out=makematrix(out)
 counter=counter+1
endwhile
if counter>=counter_max
 display("We finish")
endif
endfunction

 

DaimlerChrysler R&D



0 Kudos
Message 2 of 4
(9,160 Views)
Hi Ralph,


We have duplicated your problem in 7.1.8. It does work in 8.0 though.

We might be able to fix it in a later 7.1.x release but I cannot commit to a date on that yet.


Dirk De Mol
MATRIXx R&D
0 Kudos
Message 3 of 4
(9,064 Views)

Hi Dirk

 

thank you for your answer.

Can you give me a hint to get an alternativ to getline?

An upgrade to 8.0 is not possible at this time, because i would have to check more than 600 programs and i dont have the time for this now.

If there would be a workarround for getline this would solve  my problems for the moment.,

Ralph

DaimlerChrysler R&D



0 Kudos
Message 4 of 4
(9,055 Views)