Results 1 to 2 of 2
  1.    #1  
    Other than some apps that other folks wrote, I can't for the life of me get any buttons to work. I just want a button that will launch a new scene. I've tried the standard button with a pushscene function over and over again. I've read everything I can find but I'm at my wits end. Here is some sample code. I don't know what I could possibally be missing, I've checked it tons. I've started a few different apps and everytime I try to make my own buttons I get this problem.

    The HTML Part:
    Code:
    	<div x-mojo-element="Button" id="ButtonPhilip"></div>
    I've placed the button in several different parts of and HTML file thinking that may have something to do with it and I'm still lost.

    Now the .jsjsjs $assistant$ $part$:
    Code:
    function FirstAssistant() {	
    }
    
    FirstAssistant.prototype.setup = function() {
    
    	this.controller.setupWidget("ButtonPhilip", {}, {buttonLabel: 'Philippians'});
    	this.controller.listen('ButtonPhilip',Mojo.Event.tap, this.handleButtonPhilipPress.bind(this));
    }
    
    FirstAssistant.handleButtonPhilipPress = function (event) {
    	Mojo.Controller.stageController.pushScene('philippians');
    }
    I just don't get it, Please help!
  2.    #2  
    Okay I'm going to answer my own question here for future refrence in case someone else has this problem.

    In the end I had two things I changed before I repackaged and reinstalled.

    1st is I had to fix the scene I was trying to push. I hadn't tested it by using it as a 1st scene and when I did I found alot of problems with it. Now that it was fixed, I had one other change in my code. I had to add the word 'prototype' to this line:

    Code:
    FirstAssistant.prototype.handleButtonPhilipPress = function (event) {
    Thank you and goodnight!

Posting Permissions