[sword-svn] r77 - in trunk/app: . src/org/crosswire/flashcards

Apache apache at crosswire.org
Sun Oct 31 00:44:39 MST 2004


Author: 
Date: 2004-10-31 00:44:39 -0700 (Sun, 31 Oct 2004)
New Revision: 77

Modified:
   trunk/app/Flash.jpx.local
   trunk/app/src/org/crosswire/flashcards/QuizPane.java
Log:
Fix for same front cards


Modified: trunk/app/Flash.jpx.local
===================================================================
--- trunk/app/Flash.jpx.local	2004-10-31 07:20:54 UTC (rev 76)
+++ trunk/app/Flash.jpx.local	2004-10-31 07:44:39 UTC (rev 77)
@@ -14,7 +14,7 @@
 debug.Watches.1[0]=1  110 lessonPath10 expression1  02  501  01  01  01  1 -1
 debug.Watches.2[0]=1  111 description10 expression1  02  501  01  01  01  1 -1
 debug.Watches.3[0]=1  19  entryName10 expression1  02  501  01  01  01  1 -1
-history.files.active[0]=src/org/crosswire/flashcards/QuizPane.java,F;196,7367
+history.files.active[0]=src/org/crosswire/flashcards/QuizPane.java,F;194,7311
 history.files.open.1[0]=src/org/crosswire/flashcards/EditPane.java,F;128,6541
 history.files.open.10[0]=src/org/crosswire/flashcards/SetupPane.java,F;71,2273
 history.files.open.2[0]=src/org/crosswire/flashcards/FlashCardPane.java,F;41,1342
@@ -23,7 +23,7 @@
 history.files.open.5[0]=src/org/crosswire/flashcards/LessonSet.java,F;63,2365
 history.files.open.6[0]=src/org/crosswire/flashcards/LessonSetPane.java,F;127,3692
 history.files.open.7[0]=src/org/crosswire/flashcards/MainFrame.java,F;1,0
-history.files.open.8[0]=src/org/crosswire/flashcards/QuizPane.java,F;196,7367
+history.files.open.8[0]=src/org/crosswire/flashcards/QuizPane.java,F;194,7311
 history.files.open.9[0]=src/org/crosswire/common/swing/RowTable.java,F;227,6666
 import.optimize.legacyPropertiesRead[0]=1
 java.classdefaults.1[0]=java.util.Enumeration
@@ -101,7 +101,7 @@
 sys.ReopenHistory.8[0]=[/space/opt/JBuilder2005/jdk1.4/src.zip]/java/util/TreeSet.java
 sys.ReopenHistory.9[0]=[/space/opt/JBuilder2005/jdk1.4/src.zip]/java/lang/StringBuffer.java
 team.ActiveVCS[0]=Subversion
-team.lastScanned[0]=1099207059759
+team.lastScanned[0]=1099208434579
 wizard.package.package_history.1[0]=flash
 wizards.classes.class_type_history.1[0]=boolean
 wizards.classes.class_type_history.10[0]=java.lang.String

Modified: trunk/app/src/org/crosswire/flashcards/QuizPane.java
===================================================================
--- trunk/app/src/org/crosswire/flashcards/QuizPane.java	2004-10-31 07:20:54 UTC (rev 76)
+++ trunk/app/src/org/crosswire/flashcards/QuizPane.java	2004-10-31 07:44:39 UTC (rev 77)
@@ -73,8 +73,15 @@
      GridBagLayout gridBagLayout1 = new GridBagLayout();
 
      static class WordEntry {
+
+          public String back;
+          private FlashCard flashCard;
+          public int attempts;
+
+
           public WordEntry(FlashCard flashCard) {
                this.flashCard = flashCard;
+               back = flashCard.getBack();
           }
 
 
@@ -89,17 +96,13 @@
 
 
           public String getSide(boolean front) {
-               return flashCard.getSide(front);
+               return (front) ? flashCard.getFront() : back;
           }
 
 
           public String toString() {
                return flashCard.getFront();
           }
-
-
-          private FlashCard flashCard;
-          private int attempts;
      }
 
 
@@ -204,9 +207,9 @@
           for (int i = 0; i < words.size() - 1; i++) {
                WordEntry w = (WordEntry) words.get(i);
                for (int j = i + 1; j < words.size(); j++) {
-                    WordEntry x = (WordEntry) words.get(j);
-                    if (w.flashCard.getFront().equals(x.flashCard.getFront())) {
-                         w.flashCard.setBack(w.flashCard.getBack() + " or " + x.flashCard.getBack());
+                    WordEntry xx = (WordEntry) words.get(j);
+                    if (w.flashCard.getFront().equals(xx.flashCard.getFront())) {
+                         w.back += " or " + xx.back;
                          words.remove(j);
                          j--;
                     }



More information about the sword-cvs mailing list