×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Jun 2008
    Posts
    30

    CAknForm destruction and command handling

    CAknForm derived class after CAknForm::OkTryToExitL() launches the CAknForm derived destructor then KERN EXEC 3, i want to display my form, handle its done and cancle then close the form

  2. #2
    Regular Contributor
    Join Date
    Feb 2006
    Location
    India,Pune
    Posts
    311

    Re: CAknForm destruction and command handling

    Ref Nokia-Wiki sample

    http://wiki.forum.nokia.com/index.ph...in_Symbian_c++


    Regards,
    Parag Purkar

  3. #3
    Registered User
    Join Date
    Jun 2008
    Posts
    30

    Re: CAknForm destruction and command handling

    parag i tried the wiki example but everytime left cba chosen form does not dis appear, anyway here is my impl.:

    OfferKeyEventL( const TKeyEvent& aKeyEvent,
    TEventCode aType)
    {
    if (CAknForm::OfferKeyEventL(aKeyEvent, aType) == EKeyWasconsumed)
    {
    return EKeyWasConsumed;
    }
    return EKeyWasNotCOnsumed;
    }

    void CForm::ConstructL(aMenuBarId)
    {
    CAknForm::ConstructL();
    }

    CForm::ExecuteLD(TInt aFrmResId)
    {
    return CAknForm::ExecuteLD(aFrmResId);
    }



    TBool CForm::OkToExitL(TInt aButtonId)
    {
    return CAknForm::OkToExitL(aButtonId);
    }



    i'm launching it like:

    FomrCOntainer::CreateForm()
    {
    CForm* form = new (ELeave) CForm();
    form->ConstructL();
    form->ExecuteLD()
    }


    anyway everything goes fine and the form is shown on display but when i choose done, form not disappear

  4. #4
    Regular Contributor
    Join Date
    Feb 2006
    Location
    India,Pune
    Posts
    311

    Re: CAknForm destruction and command handling

    Quote Originally Posted by mahmoudhadad View Post
    parag i tried the wiki example ............
    anyway everything goes fine and the form is shown on display but when i choose done, form not disappear

    Can you paste your "Done" option code here ... debugg it properly..
    What do you mean by "I choose done...Form not disappear "

    Regards,
    Parag Purkar

  5. #5
    Registered User
    Join Date
    Jun 2008
    Posts
    30

    Re: CAknForm destruction and command handling

    Quote Originally Posted by parag_purkar View Post
    Can you paste your "Done" option code here ... debugg it properly..
    What do you mean by "I choose done...Form not disappear "

    Regards,
    Parag Purkar
    TBool CForm::OkToExitL(TInt aButtonId)
    {
    SaveFormDataL();
    return CAknForm::OkToExitL(aButtonId);
    }

    last call before KERN EXEC 3 ~CForm();, i want the form to disappear, thats all, feel free to ask...thanks

  6. #6
    Registered User
    Join Date
    Nov 2007
    Posts
    444

    Re: CAknForm destruction and command handling

    What do you mean by "last call before KERN EXEC 3 ~CForm();" ?

    Also if KERN EXEC 3 is coming in ~CForm() can you please debug your code and paste the line in which this panic comes or paste atleast your ~CForm() or any other function which causes the panic.

  7. #7
    Registered User
    Join Date
    Jun 2008
    Posts
    30

    Re: CAknForm destruction and command handling

    Quote Originally Posted by Kavit Patel View Post
    What do you mean by "last call before KERN EXEC 3 ~CForm();" ?

    Also if KERN EXEC 3 is coming in ~CForm() can you please debug your code and paste the line in which this panic comes or paste atleast your ~CForm() or any other function which causes the panic.


    end of ~CForm(), last call after Offerckeyevent and oktoexit, guys my save code is the same as the example, its just not closing after the left cba selection

Posting Permissions

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