View Single Post
  #6 (permalink)  
Old 08-29-2008, 03:42 PM
Norm's Avatar
Norm Norm is offline
Senior Member
 
Join Date: Jun 2008
Location: Heredia, Costa Rica
Posts: 2,225
Norm is on a distinguished road
Quote:
midipedalflag=false; // the flag set by midipedal
do { // and space bar

} while (!midipedalflag);
midipedalflag=false;
midipedalTest.setSelected(false);
The only thing this code seems to be doing is to setSelected(false) when the midipedalflag is set to true.
Why not get rid of this code and have the method that sets midipedalflag true do the setSelected(false) itself?


BTW
Quote:
Multipedal should do:
Code:
midipedalflag.notify();
The thread issuing the notify must have the lock on the monitor(midipedalflag):
Code:
sychronized(midipedaflag) { midipedalflag.notify(); }

Last edited by Norm : 08-29-2008 at 03:50 PM.
Reply With Quote