comparison ExperimentController.java @ 30:84d943797cf2

Require rating for each melody
author Jeremy Gow <jeremy.gow@gmail.com>
date Tue, 13 Nov 2012 11:46:10 +0000
parents c5db34797ff3
children 0e030f32a6e2
comparison
equal deleted inserted replaced
29:4574bad81227 30:84d943797cf2
104 // if (!exp.isRunning() && !exp.hasRun()) 104 // if (!exp.isRunning() && !exp.hasRun())
105 // exp.runExperiment(); 105 // exp.runExperiment();
106 // else 106 // else
107 // reportError("You have already played the melody."); 107 // reportError("You have already played the melody.");
108 } else if (source == sp.getNextButton()) { 108 } else if (source == sp.getNextButton()) {
109 if (!exp.hasRun() || exp.isRunning()) 109 if (!exp.hasRun() || exp.isRunning()) {
110 //System.out.println(!exp.hasRun());
111 //System.out.println(exp.isRunning());
112 //System.out.println(exp.getCurrentBlock().getMidiPlayer().getSequencer().isRunning());
110 reportError("You haven't finished playing the melody yet."); 113 reportError("You haven't finished playing the melody yet.");
111 else if (sp.unansweredQuestions()) 114
115 } else if (exp.getCurrentBlock().getMelodyResults().countResponses() == 0) {
116 reportError("Please select a number.");
117
118 } else if (sp.unansweredQuestions())
112 reportError("There are unanswered questions."); 119 reportError("There are unanswered questions.");
113 else { 120 else {
114 // store results (and write to file) 121 // store results (and write to file)
115 if (exp.getAskFamiliarity()) { 122 if (exp.getAskFamiliarity()) {
116 String answer1 = (String)(sp.getQ1Box().getSelectedItem()); 123 String answer1 = (String)(sp.getQ1Box().getSelectedItem());