×

Discussion Board

Results 1 to 4 of 4

Thread: Dialog query!!!

  1. #1
    Registered User
    Join Date
    Sep 2006
    Posts
    12

    Unhappy Dialog query!!!

    Hi all,

    I am developing an application in which when I open it, and select menu launch...it shows me Query dialog with edwin field. then when I enter some code and click ok then it will show me another dialog form.

    I have seen sdk help and created query dialog so that when I click main menu option launch query dialog is opened. but when I click OK. It does nothing!

    Here by I am writing some code:

    For Dispaying Dialog:

    PHP Code:
    void CXYZContainer::DisplayForm2L
        
    TInt aResourceId,
        
    TInt aPageId)
        {
        
    CXYZDialogform CXYZDialog::NewL();
        
    form->SetTitlePane(iView->GetTitlePaneL());
        
    form->SetContainer(this);
        
    form->SetDlgPage(aPageId);
        
    form->ExecuteLDaResourceId );
        }
    void CXYZContainer::DisplayForm1L
        
    TInt aResourceId)
        {
        
    CXYZDialogform CXYZDialog::NewL();
        
    form->SetTitlePane(iView->GetTitlePaneL());
        
    form->SetContainer(this);
        
    form->ExecuteLDaResourceId );
        } 
    For command handling:
    PHP Code:
    void CXYZAppView::HandleCommandLTInt aCommand )
        {
        switch ( 
    aCommand )
            {
            case 
    EXYZCmdLaunchPhOps:
                {
                               
    iContainer->DisplayForm1LR_DEMO_DATA_QUERY);
                }
                break; 
            
           
             default:
                break;
            }
        } 
    For Displaying 2nd dialog form:

    PHP Code:
    void CXYZAppUi::HandleCommandLTInt aCommand )
        {
        switch ( 
    aCommand )
            {
            case 
    EAknSoftkeyBack:
            case 
    EAknSoftkeyCancel:
            case 
    EEikCmdExit:
                {
                
    PrepareToExit();
                Exit();
                break;
                }
            case 
    EAknSoftkeyOk:
                {
                    
    iContainer->DisplayForm2LR_XYZ_NAVIPANE_DIALOG,
                    
    EXYZPageCtrlIdPagePhone1);    
                    break;
                }       
            
            default:
                break;
            }
        } 
    For Query dialog:

    RESOURCE DIALOG r_demo_data_query
    {
    flags = EGeneralQueryFlags;
    buttons = R_AVKON_SOFTKEYS_OK_BACK;
    items =
    {
    DLG_LINE
    {
    type = EAknCtQuery;
    id = EMyQuery;
    control = AVKON_DATA_QUERY
    {
    layout = EDataLayout;
    label = "Enter Code:"; // prompt text
    control = EDWIN
    {
    width = 5;
    lines = 1;
    maxlength = 15;
    };
    };
    }
    };
    }
    But when I click Ok it doesn't open second dialog form and when I click Back..Application closes!!

    Plz help me out to solve this

    Best regards,
    Trojan

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

    Re: Dialog query!!!

    Could you try if this would work better:

    TInt CXYZContainer:isplayForm2L(
    TInt aResourceId,
    TInt aPageId)
    {
    CXYZDialog* form = CXYZDialog::NewL();
    form->SetTitlePane(iView->GetTitlePaneL());
    form->SetContainer(this);
    form->SetDlgPage(aPageId);
    return form->ExecuteLD( aResourceId );
    }
    TInt CXYZContainer:isplayForm1L(
    TInt aResourceId)
    {
    CXYZDialog* form = CXYZDialog::NewL();
    form->SetTitlePane(iView->GetTitlePaneL());
    form->SetContainer(this);
    return form->ExecuteLD( aResourceId );
    }

    case EXYZCmdLaunchPhOps:
    {
    if(iContainer->DisplayForm1L( R_DEMO_DATA_QUERY))
    {
    iContainer->DisplayForm2L( R_DEMO_DATA_QUERY);
    }
    }
    break;

    yucca

  3. #3
    Registered User
    Join Date
    Sep 2006
    Posts
    12

    Re: Dialog query!!!

    Hi Yucca,

    It gives an error here:if(iContainer->DisplayForm1L( R_DEMO_DATA_QUERY)) and I want to perform some validation operation on OK command of query dialog!!

    plz help

    Trojan

  4. #4
    Registered User
    Join Date
    Sep 2006
    Posts
    12

    Re: Dialog query!!!

    And I think there is some problem with Buttons R_AVKON_OK_BACK that I have taken. Bcoz it gives application closed when I simply click Back even though I have wriiten handlecommand for it:
    case EAknSoftkeyBack:
    PrepareToExit();
    Exit();
    break;

    Plz Plz Plz Help(

    Trojan
    Last edited by Trojan; 2006-10-13 at 10:44.

Similar Threads

  1. query dialog in thread
    By dalore in forum Symbian
    Replies: 4
    Last Post: 2004-08-12, 12:42
  2. newbie, having problems with query dialog
    By sbwoodside in forum Symbian User Interface
    Replies: 1
    Last Post: 2004-04-22, 07:01
  3. Text Query Dialog Cleanup
    By koayst in forum Symbian
    Replies: 1
    Last Post: 2003-05-02, 09:06
  4. Softkeys in Global query msg dialog
    By nitinkumar in forum Symbian User Interface
    Replies: 0
    Last Post: 2003-04-16, 20:07
  5. How to extend duration limit in query dialog within popup field?
    By khanming in forum Symbian User Interface
    Replies: 0
    Last Post: 2002-10-18, 06:53

Posting Permissions

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