Results 1 to 4 of 4
  1.    #1  
    I am trying to set up a toggle button. I have very limited knowledge of webOS like 2 weeks. I am making a app just to test things out and see how stuff works. I have a scene that has a button to push another scene. This button works fine by itself. When I try to add a toggle button the emulator goes gray. the code i have tried to enter looks like this
    Code:
    this.tattr = {
                 trueLabel: 'On'
    			 trueValue: 'On',
                 falseValue: 'Off' 
    			 falseLabel: 'Off'	
    		 }
    		 
             this.tmodel = {
                 value: ,
                 disabled: false
             };
    	
    	this.controller.setupWidget("flip",this.tattr, this.tmodel);
             
    	
    	 Mojo.Event.listen(this.controller.get("flip", Mojo.Event.propertyChange)
    but with no luck. I have the Palm webOS book and have checked everywhere I just seem stuck. Any help pointing me in the right direction would nice. I have look at the samplecodes in the SDK files but I cant seem to understand them. I just need a straight dumbed down verison of them so that I can learn.
  2. #2  
    Without even getting into what the commands do, there are lots of syntax errors in this sample code:


    In each object, the value pairs need to be separated by commas.

    Every statement needs to end with a semicolon.

    "value:" needs to be followed by some value.

    And the last line doesn't have matching parentheses.


    Btw, I recommend trying out http://jslint.com
  3.    #3  
    I can't get this fricking toggle button set up correctly. I am begging for some help anyone?
  4.    #4  
    Come on someone even a noob like me come on throw me a bone

Tags for this Thread

Posting Permissions