Results 1 to 2 of 2
  1.    #1  
    I have a scene with some textfields. As I'm not sure if I can prevent the user from entering in invalid values, is there a way to prevent a scene from deactivating -- being poped off the stack?

    If the user 'swips back' to go to the previous scene and there is an error on the current, I would like to show an error-message and prevent the current scene from going away.

    Any ideas?
  2. #2  
    Add the following code to your scene:

    Code:
    // "YourAssistant" is the name of your scene assistant
    YourAssistant.prototype.handleCommand = function(event) {
         if (event.type == Mojo.Event.back) {
              event.stop();
              
              // Do validity checks here.  If they pass, call popScene.
              // If they fail, display your error message.
         }
    };
    Quick Post: The quick way to post messages and photos to Twitter & Facebook (video link)
    Music Player (Remix): The next generation music listening experience on webOS (video link)
    GeoStrings: Set location-based reminders and never forget another task (video link)

    Twitter: @Hedami

Posting Permissions