Class: FieldStep

mathex. FieldStep

new FieldStep(input_id, result, end_message, options) → {Object}

Exercises - One already rendered text input field activation

Parameters:
Name Type Argument Description
input_id String The input identifier
result Mixed The correct result
end_message String <optional>
A message to be displayed at the end of the step
options Object The step options
Properties
Name Type Description
type Boolean The result type cast
Source:
Returns:
FieldStep instance
Type
Object
Example
 // if a previous defined (in a mathex.TextFieldStep object) input field exists, with id=2
 var step = new mathex.FieldStep(2, 16, null, {type: 'int'});

Extends

Methods

addInputEvents()

Executes the step

Activates the input
Source:
Returns:
void

checkFieldResult(field, result, fieldobj)

Checks the result of a text field

Parameters:
Name Type Description
field Object The mootools input field object
result Mixed The right result
fieldobj Object The input object
Inherited From:
Source:

deactivate()

Deactivates all inputs

Source:
Returns:
void

removeInputEvents()

Removes events from the text input

Source:
Returns:
void

run(router)

Executes the step

Activates the text input
Parameters:
Name Type Description
router Object a mathex.Router instance
Source:
Returns:
void