Results 1 to 4 of 4
  1.    #1  
    Hey there,

    I've got a listSelector and a textField the result of the following code should displayed in the textField.

    GrammaturAssistant.prototype.grammaturBerechnung = function (event) {	
    	// * parseFloat(this.gramm.value) * parseFloat(this.stueck.value));
    	ergebnis = Math.ceil(parseFloat(this.format.value) * parseInt(this.gramm.value) * parseInt(this.stueck.value) *100)/100;
    	this.grammatur.value = ergebnis;
    But it doesn't work 'cause it's always saying in the log:

    "Uncaught TypeError: Can not call method 'setValue' of undefined" and then it says the line of "ergebnis ="

    Whats the problem there? It's only this mistake before my app goes to palm
  2. #2  
    when is this method called in your scene's flow? setup, activate, some other time?

    It is possible you have not yet set up the widget with the DIV ID "grammatur_gewicht"
  3.    #3  
    The Method is called after the Setup and in the Setup there is the TextField widget with the right ID.
  4. #4  
    are you sure that your widget is getting setup without any warnings or errors?

    one safety measure, though I don't think it's needed is to evaluate the variable then convert it to a string before running setValue()

    an additional thing I do when I am feeling like scope might be a problem is to get the divs directly from the Mojo.Controller
    Finally, do you have a div called grammatur_gewicht anywhere else in the app, like another scene in the stack?

Posting Permissions