i am having trouble with saving the value from a cookie into a variable so that i could calculate from what is in the text field to what replaces it
can anyone help ? the following code is without the changes i made -that were not working





var attributes = {
hintText: 'value',
textFieldName: 'name',
modelProperty: 'original',
multiline: false,
disabledProperty: 'disabled',
focus: true,
modifierState: Mojo.Widget.capsLock,
//autoResize: automatically grow or shrink the textbox horizontally,
//autoResizeMax: how large horizontally it can get
//enterSubmits: when used in conjunction with multline, if this is set, then enter will submit rather than newline
limitResize: false,
holdToEnable: false,
focusMode: Mojo.Widget.focusSelectMode,
changeOnKeyPress: true,
textReplacement: false,
maxLength: 30,
requiresEnterKey: false

};

this.model = {
'original' : 'initial value',
disabled: false
};
//Get preferences cookie, or create it
this.cookie = new Mojo.Model.Cookie("original");
var initial = this.cookie.get();
if (initial) {
if (initial.original) { this.model.original = initial.original; }
}

this.controller.setupWidget('textField', attributes, this.model);