×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Regular Contributor
    Join Date
    Jun 2004
    Location
    Helsinki, Finland
    Posts
    69

    Navigation between views and forms (using carbide.c++)

    I'm using Carbide.c++ 1.1 for developing UI application. Carbide has this useful (IMO) tool for creating Forms. I've enabled the "support view switching" checkbox. I'm also using tabs in some(!) of my views. The basic idea is to have one multitabbed "main view" and then open "modal" views on top of this main view (and naturally close them and return to the main view when done).

    This may be a silly question but what is the proper way to switch between these views? Or close a view which has been opened with "ActivateLocalViewL". Each form has a property "exit application on close". I have disabled it because I do not want to close the whole application. This yields to a horrible crash and error message "CONE 44" (Control being destroyed is still on the control stack)

    because something (that I can't figure out from stack trace) is deleting my form.

    When creating the view the (generated code) adds the form into the stack. Am I supposed to remove it myself from the stack? If I am, how and where? Triggered by what event?

    Any help is greatly appreciated.

  2. #2
    Regular Contributor
    Join Date
    Sep 2007
    Posts
    78

    Re: Navigation between views and forms (using carbide.c++)

    Sorry this late questionary.

    Did You solve this one? I have similar problem with my solution.

    Funny, forum or wiki has no examples for using forms this way.

  3. #3
    Super Contributor
    Join Date
    Jul 2006
    Location
    Oulu, Finland.
    Posts
    1,174

    Re: Navigation between views and forms (using carbide.c++)

    I guess you can use ActivateLocalViewL() which activates the new view first and then deactivates the previous one, which means that ideally it destroys previous view which destorys container which in turn deletes all its controls, also before it destorys the container in its DoDeactivate() function, If you have used AddToStackL() explicitly for adding your container to controlstack then RemoveFromViewStack() should be called before deleting the container.

  4. #4
    Regular Contributor
    Join Date
    Sep 2007
    Posts
    78

    Re: Navigation between views and forms (using carbide.c++)

    Quote Originally Posted by vasant21 View Post
    I guess you can use ActivateLocalViewL() which activates the new view first and then deactivates the previous one, which means that ideally it destroys previous view which destorys container which in turn deletes all its controls, also before it destorys the container in its DoDeactivate() function, If you have used AddToStackL() explicitly for adding your container to controlstack then RemoveFromViewStack() should be called before deleting the container.
    Hei

    I use

    AppUi()->ActivateLocalViewL( TUid::Uid( ETLkoeAnnoItemViewId ) );

    to launch the dialog.

    It panics CONE 44 at :

    TBool CTLkoeAnnoItem::OkToExitL( TInt aButtonId )
    {

    // The 'exit application on close' property automatically adds code to exit the
    // application when the right soft key is pressed. If this property is set to false,
    // and AddToStackL has been called on the Form object (e.g., it was not shown as a dialog),
    // code must be added manually to avoid a panic when exiting the application.
    return CAknForm::OkToExitL( aButtonId );


    }

    The problem is that code is totally generated with UI-designer and panics, I am not so familiar with Symbian to solve this kind of problems. In my opinion all wizard generated code should work.

    Kiitos

    Hannu

    PS
    check:
    http://www.hannusales.fi/uusiloisto/Flash/TLN95_2.htm

  5. #5
    Registered User
    Join Date
    Nov 2007
    Posts
    384

    Re: Navigation between views and forms (using carbide.c++)

    cone 44 is
    Control being destroyed is still on the control stack

    so please remove your ealier control added using Appui()->removefromstack();

  6. #6
    Regular Contributor
    Join Date
    Sep 2007
    Posts
    78

    Re: Navigation between views and forms (using carbide.c++)

    Solution:

    Make function like the one below to container:

    void CTLkoeAnnoListBox:isplayFormL(
    TInt aResourceId,TInt aPageId)
    {
    CTLkoeAnnoItem* form = CTLkoeAnnoItem::NewL(iCommandObserver);
    form->ExecuteLD( aResourceId );
    }
    Call it where needed (view):

    Code:
    	
    //  in CTLkoeAnnoListBoxView
    
    iTLkoeAnnoListBox->DisplayFormL( 
    			R_TLKOE_ANNO_ITEM_TLKOE_ANNO_ITEM,0);
    // Take rerource id from dialog: Note RESOURCE DIALOG r_tlkoe_anno_item_tlkoe_anno_item
    I should hire Sherlock Holmes to help to find answers......

    If this is in the UI-designer documents, it's very very hard to find.


    Hannu

  7. #7
    Registered User
    Join Date
    Mar 2009
    Posts
    1

    Re: about carbide.c++

    could it be possible to make an application in mobile phone using carbide.c++ that forwards the sms received to a computer application....if somebody knows,pls help..
    Or could it be possible doing it in another way around?whether an application that pulls or recognize sms received by a mobile phone connected to pc through bluetooth..

Similar Threads

  1. Multiple views with dialogs
    By djgtram in forum Symbian User Interface
    Replies: 0
    Last Post: 2005-01-01, 20:33
  2. Replies: 1
    Last Post: 2004-06-30, 05:32
  3. Problems with forms and views, help needed!
    By _fox in forum Symbian User Interface
    Replies: 0
    Last Post: 2004-06-29, 16:41
  4. How can i get a form's back button event?
    By advocatee in forum Symbian
    Replies: 1
    Last Post: 2003-07-28, 04:09

Posting Permissions

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