Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Apr 2008

    problem with fscommand2("quit");

    Hi all,
    I need to delete two files after that need to do the quit.

    var myListener:Object = new Object();
    var intervalId:Number;

    function deleteId()
    if(klError == 0)
    fscommand2("quit");//this doesn't work

    function deleteToken()
    if(klError == 0)
    loadVariables("\\Data\\Others\\id.txt", "");
    intervalId = setInterval(deleteId, 1000);

    myListener.onKeyDown = function()
    if(Key.getCode() == ExtendedKey.SOFT2) //exit key
    loadVariables(" /file?klCommand=delete&klPath=\\Data\\Others\\token.txt", "");
    intervalId = setInterval(deleteToken, 1000);

    fscommand2("quit"); in deleteId doesn't work it seems.

    Please help.


  2. #2
    Nokia Developer Champion
    Join Date
    Nov 2006
    Mumbai, India

    Re: problem with fscommand2("quit");

    You can try giving an interval of one enterFrame loop before calling the Quit command. By using loadVariables for deleting 2 text file, you are already engaging the runtime in a process. So giving a time space can help in the execution of the Quit command.

    Also you can make sure that you are calling the fscommand2 from the root timeline.

    Let us know if this helps.

    Mariam Dholkawala

    Blog - http://www.mariamdholkawala.com/mobile
    MaD UG - http://www.indimadgroup.com

  3. #3
    Registered User
    Join Date
    Apr 2008

    Re: problem with fscommand2("quit");

    token.txt gets deleted but
    klError == 0 inside of deleteId never satisfies
    and thus id.txt never get deleted and also quit is not executed.
    Do you have any suggestions?
    If I press exit(right button) once more the id.txt gets deleted though. But no amount of pressing of exit causes quit to execute?
    How I can set an interval of enterFrame loop?

  4. #4
    Regular Contributor
    Join Date
    Feb 2007

    Re: problem with fscommand2("quit");

    Hi Tanvir,

    Are you trying to use fscommand quit as a button event or frame event? If you use it as a frame event, Flash Lite will silently skip it. It only works as a button event.

    If you want to do some process before quiting the application, you can use KuneriLite close command. As far as I know, there is no other way.



    Follow me on Twitter [url]www.twitter.com/ugurkaner[/url]

    Create sexiest Symbian apps faster & easier [url]www.kunerilite.net[/url]
    Turn your Joomla! website into a mobile site instantly [url]www.mobilejoomla.com[/url]

Similar Threads

  1. Problem with eglSwapBuffers and heap corruption
    By greatape in forum Symbian Media (Closed)
    Replies: 2
    Last Post: 2007-05-24, 03:35
  2. netcards - Problem with opening adapter
    By kernj in forum Symbian Tools & SDKs
    Replies: 5
    Last Post: 2007-01-10, 08:56
  3. WAP service problem on Apache
    By bigg_o in forum Browsing and Mark-ups
    Replies: 3
    Last Post: 2005-04-17, 16:05
  4. Problem: S60 SDK for CW in PC with .NET
    By anttij in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 1
    Last Post: 2005-02-28, 11:36

Posting Permissions

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