src/main/java/com/tajnyprojekt/tpanimation/TpAnimatedVariable.java
@SuppressWarnings("rawtypes")
    private void findFieldInSketch(String variableName) {
        try {
            field = parent.getClass().getField(variableName);
            fieldType = field.getType();
            if (!(isInt() || isFloat() || isDouble())) {
                ignore = true;
                TpAnimation.log("Wrong type: " + fieldType.toString()
                        + " for variable name: " + variableName
                        + ". \nVariable to be animated must be of type int, float or double.", true);
            }
        }
        catch (Exception e) {
            ignore = true;
            TpAnimation.log("An error occured during looking for variable: " + variableName
                    + ". \nMake sure that the variable is marked as 'public', "
                    + "and located in the main scope of the sketch (above setup()), \ne.g. public float "
                    + variableName + ";", true);
            e.printStackTrace();
            parent.exit();
        }
    }
/**
     * Finds field with given name in the sketch and checks it's type
     *
     * @param variableName the name of the sketch's field to find
     */
Finds field with given name in the sketch and checks it's type
@param variableName the name of the sketch's field to find
Finds field with given name in the sketch and checks it ' s type @param variableName the name of the sketch ' s field to find
@SuppressWarnings("rawtypes")
    private void findFieldInSketch(String variableName) {
        try {
            field = parent.getClass().getField(variableName);
            fieldType = field.getType();
            if (!(isInt() || isFloat() || isDouble())) {
                ignore = true;
                TpAnimation.log("Wrong type: " + fieldType.toString()
                        + " for variable name: " + variableName
                        + ". \nVariable to be animated must be of type int, float or double.", true);
            }
        }
        catch (Exception e) {
            ignore = true;
            TpAnimation.log("An error occured during looking for variable: " + variableName
                    + ". \nMake sure that the variable is marked as 'public', "
                    + "and located in the main scope of the sketch (above setup()), \ne.g. public float "
                    + variableName + ";", true);
            e.printStackTrace();
            parent.exit();
        }
    }
@ SuppressWarnings ( "rawtypes" ) private void findFieldInSketch ( String variableName ) { try { field = parent . getClass ( ) . getField ( variableName ) ; fieldType = field . getType ( ) ; if ( ! ( isInt ( ) || isFloat ( ) || isDouble ( ) ) ) { ignore = true ; TpAnimation . log ( "Wrong type: " + fieldType . toString ( ) + " for variable name: " + variableName + ". \nVariable to be animated must be of type int, float or double." , true ) ; } } catch ( Exception e ) { ignore = true ; TpAnimation . log ( "An error occured during looking for variable: " + variableName + ". \nMake sure that the variable is marked as 'public', " + "and located in the main scope of the sketch (above setup()), \ne.g. public float " + variableName + ";" , true ) ; e . printStackTrace ( ) ; parent . exit ( ) ; } }
Finds field with given name in the sketch and checks it's type
 @param variableName the name of the sketch's field to find
Finds field with given name in the sketch and checks it ' s type @param variableName the name of the sketch ' s field to find