CSC-UW / csc-eeg-tools

Set of matlab functions for EEG io, preprocessing, analysis from the Center for Sleep and Consciousness, University of Wisconsin (csc)
19 stars 7 forks source link

Weird display in windows 10 #23

Open lillipu opened 6 years ago

lillipu commented 6 years ago

Hi Armand, We observed some weird display problems on Windows 10, Matlab 2017b. There are no buttons in the menus...Just double checking on another laptop and will let you know. Do you have any idea? Best, Conni matlab

lillipu commented 6 years ago

I have the same on another windows 10 maschine, Matlab 2018a. Again no buttons. This the error message upon opening the menus: Undefined function 'getViewport' for input arguments of type 'handle.handle'.

Error in csc_eeg_plotter>fcn_filter_settings (line 1826) jtable = jscroll.getViewport.getView;

Error using uiwait (line 81) Error while evaluating Menu Callback.

Mensen commented 6 years ago

Hmmm, this is a problem with the underlying java code in the toolbox. Basically it takes a certain amount of time for the java processes to complete, and then Matlab can use them. Buuuut Matlab doesn't know how much time and just goes ahead with its own thing. Normally this is fine because Java is quicker so Matlab is never ahead of it, but it seems in your case, Matlab was too quick.

These additions just makes things look prettier since Matlab's GUI stuff is pretty limited and ugly.

I don't have windows so its difficult to get to the bottom of this. Is it a reoccurring issue? Like if close that window and then reopen it, does the error come up again?

Let me know. It won't take too long to make a version where the java options are turned off for the tables... the won't look as nice but at least they'll work which is more important!

lillipu commented 6 years ago

Yes, everytime you open a window the error comes up again. But it does not disturb the functionality of the scoring and scrolling through the data. After I just close the window again, the rest is pretty normal...

lillipu commented 6 years ago

Hi, I could lend you my windows laptop for few days if you are keen to dig into the windows issue. Did you have a chance to make a work around? Otherwise, if you point me to the right direction, I could try to turn off the Java for the tables myself? Thank you so much! :)

Mensen commented 6 years ago

Was just checking the error line to start working on the error... and noticed that in your error its on line 1826, but that line on my current scripts is 2139... so it seems you don't have the most up-to-date version.

This is unlikely to completely fix the problem, but who knows. Let me know, and in the mean time I'll still try and create a more stable fix.

Mensen commented 6 years ago

Just provided a rough fix for java issues in case they remain... At the beginning of the scripts there is a default option (currently on line 18) where

handles.flag_java = true;

set this to false and java options will be disabled. The tables won't look as pretty with automatic vertical centering and adjusted column widths, but things should work at least.