You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by rw...@apache.org on 2015/09/15 20:53:45 UTC
svn commit: r1703273 -
/pivot/branches/2.0.x/tutorials/src/org/apache/pivot/tutorials/calculator/Calculator.java
Author: rwhitcomb
Date: Tue Sep 15 18:53:44 2015
New Revision: 1703273
URL: http://svn.apache.org/r1703273
Log:
PIVOT-972: Update the Calculator tutorial to work around a "javac" bug
where an interface method called on an enum constant is not found by the
compiler. Cast the enum value to the interface, and then it works.
Modified:
pivot/branches/2.0.x/tutorials/src/org/apache/pivot/tutorials/calculator/Calculator.java
Modified: pivot/branches/2.0.x/tutorials/src/org/apache/pivot/tutorials/calculator/Calculator.java
URL: http://svn.apache.org/viewvc/pivot/branches/2.0.x/tutorials/src/org/apache/pivot/tutorials/calculator/Calculator.java?rev=1703273&r1=1703272&r2=1703273&view=diff
==============================================================================
--- pivot/branches/2.0.x/tutorials/src/org/apache/pivot/tutorials/calculator/Calculator.java (original)
+++ pivot/branches/2.0.x/tutorials/src/org/apache/pivot/tutorials/calculator/Calculator.java Tue Sep 15 18:53:44 2015
@@ -84,10 +84,10 @@ public class Calculator
changeOperator(Operator.ADD);
return true;
case '%':
- ACTION.PERCENT.perform(comp);
+ ((ActionDoer)ACTION.PERCENT).perform(comp);
return true;
case '\u007F':
- ACTION.BACKSPACE.perform(comp);
+ ((ActionDoer)ACTION.BACKSPACE).perform(comp);
return true;
default:
return false;