Results 1 to 10 of 10
  1.    #1  
    as the title says
  2. #2  
    IIANM, something like:


    Code:
    MainAssistant.prototype.handleCommand = function(event) {
    if (event.type == Mojo.Event.back) {
    this.controller.get('webView1').mojo.goBack();
    }
    }
    Check out my My Medical webOS Apps
    Featured free apps: DrugView | Eponyms | eMed | Dosecalcfree | Beeb News
  3.    #3  
    This goes in main assistant?

    Thanks


    -- Sent from my Palm Pre using Forums
  4. #4  
    any assistant - just replace the Main part
    code can be placed at the bottom of the assistant page
  5.    #5  
    Thanks!

    Will try this out!

    -- Sent from my Palm Pre using Forums
  6.    #6  
    ok, this sorta worked... it now allows a swipe back, but the card still pushes back out into card view and goes back a page.

    is there a way to prevent the card from popping back?
  7. #7  
    Quote Originally Posted by sketch42 View Post
    ok, this sorta worked... it now allows a swipe back, but the card still pushes back out into card view and goes back a page.

    is there a way to prevent the card from popping back?
    Add "event.stop();" on a new line after the goBack() call:

    Code:
    YourAssistant.prototype.handleCommand = function(event) {
         if (event.type === Mojo.Event.back) {
              this.controller.get('webView1').mojo.goBack();
              event.stop();
         }
    }
    Arthur Thornton

    Former webOS DevRel Engineer at Palm, HP, and LG
    Former webOS app developer (built Voice Memos, Sparrow, and several homebrew apps and patches)
    Former blogger for webOS Nation and webOS Roundup
  8.    #8  
    Sweet!!!,,thanks that worked like a charm!



    -- Sent from my Palm Pre using Forums
  9. #9  
    Nevermind Arthurthornton beat me to it....

    Quote Originally Posted by sketch42 View Post
    ok, this sorta worked... it now allows a swipe back, but the card still pushes back out into card view and goes back a page.

    is there a way to prevent the card from popping back?
    Code:
    MyAssistant.prototype.handleCommand = function(event) {
       //test for Mojo.Event.back, not Mojo.Event.command..
        if(event.type == Mojo.Event.back) {
          event.preventDefault();
          event.stopPropagation();      
       
        }
    };
    Forums webOS • View topic - How do I trap the back event to prevent a scene from closing
    APP & Patch Makers Get on the:webOS Developers Map
    My Apps: Presentation Controller (for PowerPoint and Open Office Impress), PC Display Master ,Handheld X-Ray H.E. (Halloween Edition), Text Morpher ⓦⓘⓣⓗ ⓑⓤⓑⓑⓛⓔ ⓣⓔⓧⓣ plus Ŧεẍṫ ℉яεαḱεя
  10.    #10  
    Thanks palmdoc, arthur and Manny!!!

    I have a couple more questions but I'm going to try to answer one myself first.. The other is alot more complicated

    -- Sent from my Palm Pre using Forums

Posting Permissions