I have these two situations:
classmyFieldView extends WatchUi.DataField
{
var myvar=10;
function initialize()
{
DataField.initialize();
}
and
classmyFieldView extends WatchUi.DataField
{
var myvar;
function initialize()
{
DataField.initialize();
myvar = 10;
}
Are them equivalent, i. e., can I safely initialize the variable myvar at the moment of its declaration outside the initialize() method? The variable value can be change during the Data Field execution. If I initialize it inside the initialize() method, must be the assignation after the DataField.initialize(), am I right?