Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #41 from gkossakowski/master

Work-around for CPS and vpm problem
  • Loading branch information...
commit 18fbc34a7a63a0cbcfdc8f4d8d2bcd47f41413d1 2 parents b649416 + 309f133
@gkossakowski gkossakowski authored
Showing with 14 additions and 13 deletions.
  1. +14 −13 src/com/google/gwt/sample/gwtdlx/client/GwtDlx.scala
View
27 src/com/google/gwt/sample/gwtdlx/client/GwtDlx.scala
@@ -116,19 +116,20 @@ class GwtDlx extends EntryPoint {
sched {
val result = (Sudoku(board)).solve
ajax.setVisible(false)
- //TODO(grek): Changed pattern patch on Option to if due to collision
- //between Yvirtpatmat and CPS plugin. Changed back once it's fixed upstream.
- if (result.isDefined) {
- val soln = result.get
- noSolution.setVisible(false)
- for (r <- 0 until soln.length) {
- for (c <- 0 until soln(r).length) {
- getBox(r, c).setValue(soln(r)(c) + "")
- }
- }
- ajax.setVisible(false)
- } else
- noSolution.setVisible(true)
+ result match {
+ case None => noSolution.setVisible(true)
+ case Some(soln) => {
+ noSolution.setVisible(false)
+ for (r <- 0 until soln.length) {
+ for (c <- 0 until soln(r).length) {
+ getBox(r, c).setValue(soln(r)(c) + "")
+ }
+ }
+ ajax.setVisible(false)
+ }
+ }
+ //TODO(grek): Work-around for CPS-vpm interaction problem.
+ ()
}
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.