Results 1 to 4 of 4
  1.    #1  
    So I'm creating an activity button (button with a spinner on it to let you know it's working). For some reason I just can't get it to work (not displaying at all). Can anyone tell me what I'd doing wrong??? Here is my code...

    In my view file...
    Code:
    <div id="updateLocation" x-mojo-element="Button"></div>
    In the setup function of my assistant...
    Code:
    // BUTTON: UPDATE LOCATION
    
    	var updateLocationButtonAttributes =
    	{
    		 type: Mojo.Widget.activityButton
    	};
    
    	var updateLocationButtonModel =
    	{
    		buttonLabel: 'Update Location',
    		buttonClass: 'affirmative',
    		   disabled: false
    	};
    
    	this.controller.setupWidget('updateLocation', updateLocationButtonAttributes, updateLocationButtonModel);
    
    	this.updateLocationHandler = this.updateLocation.bind(this);
    	Mojo.Event.listen(this.controller.get('updateLocation'), Mojo.Event.tap, this.updateLocationHandler);
    My function that handles button presses...
    Code:
    	HomeAssistant.prototype.updateLocationHandler = function()
    	{
    		if (!this.spinning)
    		{
    			this.spinning = true;
    		}
    	}
    Thanks!
    MoBill - Use your Authorize.net account to bill your customers with your webOS device!!
    MoJack - Track your lost or stolen webOS device from anywhere!
    Time to get VIRAL
  2.    #2  
    Anyone?
    MoBill - Use your Authorize.net account to bill your customers with your webOS device!!
    MoJack - Track your lost or stolen webOS device from anywhere!
    Time to get VIRAL
  3.    #3  
    OK, I finally solved it...
    I was binding incorrectly.
    Last edited by Laxidasical; 10/14/2009 at 08:08 PM.
    MoBill - Use your Authorize.net account to bill your customers with your webOS device!!
    MoJack - Track your lost or stolen webOS device from anywhere!
    Time to get VIRAL
  4. #4  
    how did you fix this?

    i was reading the reference guide on the dev site and it just says methods activate, deactivate. you're not using either here...

Posting Permissions