×

Discussion Board

Results 1 to 6 of 6

Hybrid View

  1. #1
    Regular Contributor
    Join Date
    Jul 2009
    Posts
    150

    Single View-container-Panic

    I m creating a listbox control and has a container class for it.
    Then i have the corresponding view class for it.
    There is only one view in the application that is for the listbox.
    In the AppUI class in InitializeContainersL() i m doing this:

    iListBoxView = CBoxView::NewL();
    AddViewL( iListBoxView );
    SetDefaultViewL( *iListBoxView );

    But when i am exiting the application by selecting the softkey exit,
    first time selecting it the control again comes to the UI displaying the lisbox data
    then again when i am selecting exit it gives a KERN-EXEC 3 panic after the closing brace of the view class destructor:

    CListBoxView::~CListBoxView()
    {
    // [[[ begin generated region: do not modify [Generated Contents]
    if(iListBox)
    {
    AppUi()->RemoveFromViewStack( *this, iListBox );
    }
    delete iListBox;
    iListBox = NULL;
    // ]]] end generated region [Generated Contents]

    }//Panic raised after here

    I am not able to figure out whats the problem?
    plz help me.

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: Single View-container-Panic

    Gotta admit that I hardly ever use views nowadays, anyway, do check this one: http://wiki.forum.nokia.com/index.ph...with_UI_Design

    At least the example is made in a way that I remember it being made, i.e. you would not remove the views from any stack, nor would you delete it, I would suppose the View management of the appui already does that.

  3. #3
    Regular Contributor
    Join Date
    Jul 2009
    Posts
    150

    Unhappy Re: Single View-container-Panic

    Hi,I am continuing the discussion as i still not got a solution to it.

    what My application does is:
    It connects to the internet downloads some data like
    A-Primary text
    b ,c,-secondary text
    A
    b,c
    ...
    ..
    parses it(XML parsing)and creates a CAknDoublestyle listbox
    and and its each item has the data in the form
    A
    b ,c
    .so the whole app works well.
    but when i am exiting the application it has two problems
    when i click on exit in the listbox view it again displays
    the listbox view.That is when i debug it the view class
    HandleCommandL() handles the unhandled command by forwarding it to
    the AppUI and the AppUI calls exit().
    but after the execution of this line the listbox is displayed again
    and again i click on exit from the menu it gives a KERN-EXEC 3 Panic.
    It gives this panic after the closing brace of the view destructor that
    from where i destroy the container.
    It will be very helpful if you guys can tell me what could the problem be in both
    the cases for having to click exit twice and second for the panic.

    Thank you.

  4. #4
    Registered User
    Join Date
    Jun 2007
    Location
    Mumbai, India
    Posts
    1,998

    Re: Single View-container-Panic

    Quote Originally Posted by abhinay.krs View Post
    Hi,I am continuing the discussion as i still not got a solution to it.

    what My application does is:
    It connects to the internet downloads some data like
    A-Primary text
    b ,c,-secondary text
    A
    b,c
    ...
    ..
    parses it(XML parsing)and creates a CAknDoublestyle listbox
    and and its each item has the data in the form
    A
    b ,c
    .so the whole app works well.
    but when i am exiting the application it has two problems
    when i click on exit in the listbox view it again displays
    the listbox view.That is when i debug it the view class
    HandleCommandL() handles the unhandled command by forwarding it to
    the AppUI and the AppUI calls exit().
    but after the execution of this line the listbox is displayed again
    and again i click on exit from the menu it gives a KERN-EXEC 3 Panic.
    It gives this panic after the closing brace of the view destructor that
    from where i destroy the container.
    It will be very helpful if you guys can tell me what could the problem be in both
    the cases for having to click exit twice and second for the panic.

    Thank you.
    How have you handled your HandleCommandL() function.

  5. #5
    Regular Contributor
    Join Date
    Jul 2009
    Posts
    150

    Re: Single View-container-Panic

    Handling HandleCommandL() means?
    If it means has it been implemented in the UI and the view class then yes i have.
    In the view class's HandlecommandL() i am forwarding the unhandled command to the AppUI
    so i am not handling the exit command there,so when i am selecting the exit command from views menu its forwarded to the UI's HandleCommandL() which handles by checking again for the unhandled command and then if its a softkey exit then call the exit().While debugging it comes here and after that(first click on exit)it againg pops up the same listbox view instead of going to the AppUI destructor where a delete on view is called.It goes there when i am clicking on the exit second time.

  6. #6
    Registered User
    Join Date
    Jun 2007
    Location
    Mumbai, India
    Posts
    1,998

    Re: Single View-container-Panic

    Quote Originally Posted by abhinay.krs View Post
    Handling HandleCommandL() means?
    If it means has it been implemented in the UI and the view class then yes i have.
    In the view class's HandlecommandL() i am forwarding the unhandled command to the AppUI
    so i am not handling the exit command there,so when i am selecting the exit command from views menu its forwarded to the UI's HandleCommandL() which handles by checking again for the unhandled command and then if its a softkey exit then call the exit().While debugging it comes here and after that(first click on exit)it againg pops up the same listbox view instead of going to the AppUI destructor where a delete on view is called.It goes there when i am clicking on the exit second time.
    The application should have exited when you click exit the first time only. How are you able to click on exit a second time.

Similar Threads

  1. Replies: 14
    Last Post: 2009-06-16, 08:25
  2. Container Class + View Class?
    By FrankTheFox in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 3
    Last Post: 2009-01-26, 13:58
  3. Kern-Exec 3 error in view & container files
    By ash_21 in forum Symbian User Interface
    Replies: 9
    Last Post: 2007-09-27, 05:52
  4. Updating View from Container
    By chishti.hameed in forum Symbian User Interface
    Replies: 1
    Last Post: 2005-06-01, 12:09
  5. Container, View, AppUi...
    By sbleriot in forum Symbian
    Replies: 0
    Last Post: 2003-11-12, 13:34

Posting Permissions

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