×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Sep 2010
    Posts
    2

    Closing an application

    Hi

    I'd like to add an Exit button somewhere on a scene. The javascript code needed is said to be just "window.close()". But it won't work in my example. Nothing occurs, and no error is raised.
    The code of the included snippet is below :

    Code:
    ovi.provide("MyNS.snippet.navig");
    MyNS.snippet.navig = new ovi.Class({
       Extends: ovi.ui.Snippet,
       template: '<span  data-bind-event="click:click">navig</span> ',
       click: function() {
                    window.close();
       }
    });
    Thanks.

  2. #2
    Registered User
    Join Date
    Sep 2008
    Location
    Manaus, Brazil
    Posts
    109

    Re: Closing an application

    Hi Cyr,

    You can try it:

    Code:
     
    ovi.provide("MyNS.snippet.navig");
    MyNS.snippet.navig = new ovi.Class({
       Extends: ovi.ui.Snippet,
       template: '<span  data-bind-event="click:click">navig</span> ',
       click: function() {
               setTimeout(function() {
                    window.close();
              }, 6000);
       }
    });
    If it isn't work, I think the click callback is not fire.
    Javier Zambrano Ferreira

  3. #3
    Registered User
    Join Date
    Sep 2010
    Posts
    2

    Re: Closing an application

    Still won't work. No error.
    Quote Originally Posted by jzferreira View Post
    If it isn't work, I think the click callback is not fire.
    It is fired, since a little window.alert just after the window.close triggers...

  4. #4
    Registered User
    Join Date
    Sep 2008
    Location
    Manaus, Brazil
    Posts
    109

    Re: Closing an application

    Quote Originally Posted by Cyr View Post
    Still won't work. No error.It is fired, since a little window.alert just after the window.close triggers...
    Did you fixed?
    Javier Zambrano Ferreira

  5. #5
    Regular Contributor
    Join Date
    Jun 2010
    Posts
    161

    Re: Closing an application

    Have you tried it on the device?
    I just spottet that in the Aptana emulator window.close() won't work. But on my 5800 it works.

Similar Threads

  1. Is there anyway to stop an application closing
    By Bezzey in forum Series 40 & S60 Platform Feedback Archive
    Replies: 3
    Last Post: 2009-08-16, 12:52
  2. Autouninstall after closing application?
    By kayem in forum Symbian
    Replies: 10
    Last Post: 2008-04-22, 10:26
  3. Application closing..!!!
    By techietintu in forum Symbian
    Replies: 4
    Last Post: 2007-01-23, 08:55
  4. closing of application
    By niwre in forum General Development Questions
    Replies: 0
    Last Post: 2005-04-04, 09:06
  5. SecurityException on closing the application
    By SnorreDev in forum Mobile Java General
    Replies: 0
    Last Post: 2004-06-20, 20:02

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×