×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    May 2006
    Posts
    95

    Problem in multiple forms

    Hi all,

    I am making program for displaying 2 forms.on clicking Sign-in menu option of first form i wanna go to 2nd form.


    when I had 1 form It was working well.but after adding next my program just doesn't open!

    I tried with multiple pages in a dialog and also with 2 dialogs with single form in each...bt program just crashes when I try to open first form!!!

    I did like:
    Container:
    void CformappContainer::DisplayFormL(
    TInt aResourceId,TInt aPageId)
    {
    CformappDialog* form = CformappDialog::NewL();
    form->SetTitlePane(iView->GetTitlePaneL());
    form->SetContainer(this);
    form->SetDlgPage(aPageId);
    form->ExecuteLD( aResourceId );
    }
    Dialog:
    void CformappDialog::DynInitMenuPaneL(
    TInt aResourceId,
    CEikMenuPane* aMenuPane )
    {
    TInt pageId = ActivePageId();
    TInt focusControlId = IdOfFocusControl();
    if (aResourceId ==R_AVKON_FORM_MENUPANE)
    {
    switch (pageId)
    {

    case Eformapppage1:
    {
    switch(focusControlId)
    {
    case EMyQuery:
    {
    aMenuPane->AddMenuItemsL(R_QUERY_MENU_PANE);
    aMenuPane->SetItemDimmed(EAknFormCmdAdd,TRUE);
    aMenuPane->SetItemDimmed(EAknFormCmdLabel,TRUE);
    aMenuPane->SetItemDimmed(EAknFormCmdDelete,TRUE);
    aMenuPane->SetItemDimmed(EAknFormCmdEdit,TRUE);
    aMenuPane->SetItemDimmed(EAknFormCmdSave,TRUE);
    }
    break;
    }
    }
    case Eformapppage2:
    {
    //Phone Menu
    switch (focusControlId)
    {

    case EformappName:
    case EformappEmail:
    case EformappDob:
    case EformappAddress:
    case EformappMobile:
    case EformappNPD:
    case Eformapplastphonemodel:
    {
    //Menu for Phone-1 and Phone-2 numbers
    aMenuPane->AddMenuItemsL(R_PHONE_MENU_PANE);
    //aMenuPane->AddMenuItemsL(R_PHONE_MENU_PANE,0,1);
    aMenuPane->SetItemDimmed(ERegistrationNPModel,TRUE);
    aMenuPane->SetItemDimmed(ERegistrationPDModel,TRUE);
    aMenuPane->SetItemDimmed(EAknFormCmdAdd,TRUE);
    aMenuPane->SetItemDimmed(EAknFormCmdLabel,TRUE);
    aMenuPane->SetItemDimmed(EAknFormCmdDelete,TRUE);
    aMenuPane->SetItemDimmed(EAknFormCmdEdit,TRUE);
    aMenuPane->SetItemDimmed(EAknFormCmdSave,TRUE);
    break;
    }


    case Eformappnewphone:

    {
    aMenuPane->AddMenuItemsL(R_PHONE_MENU_PANE);
    aMenuPane->SetItemDimmed(ERegistrationPDModel,TRUE);
    aMenuPane->SetItemDimmed(EAknFormCmdAdd,TRUE);
    aMenuPane->SetItemDimmed(EAknFormCmdLabel,TRUE);
    aMenuPane->SetItemDimmed(EAknFormCmdDelete,TRUE);
    aMenuPane->SetItemDimmed(EAknFormCmdEdit,TRUE);
    aMenuPane->SetItemDimmed(EAknFormCmdSave,TRUE);
    // aMenuPane->LaunchCascadeMenuL(R_CASCADE_LASTPHONE);
    break;
    }
    case Eformappphonedemode:
    {
    aMenuPane->AddMenuItemsL(R_PHONE_MENU_PANE);
    aMenuPane->SetItemDimmed(ERegistrationNPModel,TRUE);
    aMenuPane->SetItemDimmed(EAknFormCmdAdd,TRUE);
    aMenuPane->SetItemDimmed(EAknFormCmdLabel,TRUE);
    aMenuPane->SetItemDimmed(EAknFormCmdDelete,TRUE);
    aMenuPane->SetItemDimmed(EAknFormCmdEdit,TRUE);
    aMenuPane->SetItemDimmed(EAknFormCmdSave,TRUE);
    }
    break;
    default:
    break;
    }
    }

    }
    }
    else
    {
    CAknForm::DynInitMenuPaneL(aResourceId, aMenuPane);
    }
    }


    void CformappDialog::ProcessCommandL( TInt aCommandId )
    {

    switch (aCommandId)
    {
    ////////////////////////////////////////////////////////////////////
    case EAknSoftkeyBack:

    break;
    case ECmdsignin:
    {
    iContainer->DisplayFormL( R_FORMAPP_NAVIPANE_DIALOG,Eformapppage2);
    }
    break;
    case ERegistrationCmdAppRegister:
    {
    //TInt afocusControlId = IdOfFocusControl();
    performRegister();
    TryChangeFocusToL(EformappEmail);

    }
    break;
    case ERegistrationReset:
    {
    // TInt afocusControlId = IdOfFocusControl();

    performReset();

    } }}
    void CformappDialog::HandleCommandL( TInt aCommand )
    {
    switch ( aCommand )
    {
    case ERegistrationReset:
    performReset();
    break;

    case ERegistrationCmdAppRegister:
    performRegister();
    break;

    case ECmdsignin:
    {
    iContainer->DisplayFormL( R_FORMAPP_NAVIPANE_DIALOG,Eformapppage2);
    }
    break;

    default:
    break;
    }
    }
    Please Help!

    Regards,
    Palak

  2. #2
    Regular Contributor
    Join Date
    May 2006
    Posts
    95

    Re: Problem in multiple forms

    Hi all,

    Still I am stuck with Program Closed!!:(( and I tried with all possible ways i knew...

    If anybuddy can figure out bug in a code!

    1)I have another doubt..I havnt seen menu used with query dialog.and I am trying to use dyninitmenupane?
    2)If it is so can i put cba for querydialog form and dyninitmenu in next form...I tried that but menu was unable to get keystrokes and doing nothing...

    Plz help!


    Thanks & Regards,
    Palak
    Last edited by palak_shah_23; 2006-10-17 at 08:09.

  3. #3
    Regular Contributor
    Join Date
    Jun 2006
    Posts
    230

    Re: Problem in multiple forms

    Hi Palak...

    I sees nothing wrong with ur code!! two dialog can work in single application..n there are many relative examples given in SDK.

    I think ur query dialog menu and form dialog menu are messed up bcoz when u r trying to call if (aResourceId ==R_AVKON_FORM_MENUPANE) it gets confused with OK command of query dialog!!

    May somebody from this forum helps but meanwhile u refer the examples!!

    Regards
    Symbee

  4. #4
    Regular Contributor
    Join Date
    May 2006
    Posts
    95

    Re: Problem in multiple forms

    Thanks Symbee,

    Done with that...Problem in RSS screwed!

    Regards,
    Palak

Similar Threads

  1. s60, problem with displaying multiple controls on the screen simultaneously
    By tomasz.florczak in forum Symbian User Interface
    Replies: 0
    Last Post: 2006-08-04, 18:56
  2. About 6230 Bt Problem
    By eerkek in forum Bluetooth Technology
    Replies: 17
    Last Post: 2005-02-08, 12:33
  3. Forms Problem
    By npollard in forum Browsing and Mark-ups
    Replies: 0
    Last Post: 2004-06-18, 17:05
  4. 7210 Silent Problem
    By MarkMckim in forum Mobile Java General
    Replies: 1
    Last Post: 2003-03-18, 12:36
  5. Problem of multiple pages
    By chheang in forum Symbian
    Replies: 1
    Last Post: 2002-09-04, 07:25

Posting Permissions

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