×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Regular Contributor
    Join Date
    Aug 2009
    Posts
    331

    Displaying number input editor dialog

    Hi..

    I want to display a Number Editor Dialog, where user inputs numbers.

    I have used the following codes:

    In .rss file:

    RESOURCE DIALOG r_dialog_number
    {
    flags = EAknGeneralQueryFlags;
    buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
    items =
    {
    DLG_LINE
    {
    type = EEikCtNumberEditor;
    prompt = "Enter Number:";
    id = EEditNumber1;
    control=NUMBER_EDITOR
    {
    min=0;
    max=99999;
    };
    }
    };
    }

    In .cpp file:


    CEikNumberEditor* editor=static_cast<CEikNumberEditor*>(Control(EEditNumber1));
    editor->SetNumber(100);
    if(!editor->ExecuteLD(R_DIALOG_NUMBER))
    {
    //Cancel key pressed
    //do something...
    return EFalse;
    }
    else
    {

    //OK do something...
    return ETrue;
    }
    ......................................

    But it's not working. What additional code should I write to work this properly.

    Thanks...

  2. #2
    Super Contributor
    Join Date
    Jun 2006
    Location
    India
    Posts
    3,037

    Re: Displaying number input editor dialog

    check this for reference..

    I think you have to use CAkn class.

  3. #3
    Super Contributor
    Join Date
    Nov 2004
    Posts
    1,009

    Re: Displaying number input editor dialog

    what problem you are facing?
    1) It is not being displayed. /// in count component control this should be return
    2) It is not taking any input/// focus on editor is required

    or something else , please elaborate.

  4. #4
    Regular Contributor
    Join Date
    Aug 2009
    Posts
    331

    Re: Displaying number input editor dialog

    hey Shafali,

    I got the following errors after using the code posted earlier:


    1253012926438 * RCOMP failed - deleting output files
    1253012926469 syntax error
    1253012929844 undefined identifier 'Control'
    1253012929860 undefined identifier 'ExecuteLD'
    1253012929891 expression syntax error
    1253012929907 ';' expected
    1253012929922 declaration syntax error
    1253012929938 declaration syntax error

    Hey kkrish,

    I have followed that reference but till now no success!

    Please guide me in this regard!

  5. #5
    Super Contributor
    Join Date
    Nov 2004
    Posts
    1,009

    Re: Displaying number input editor dialog

    There must be a problem with your .rss file.

    Check the syntax of all the resources carefully, separators, colons etc.

    This error can come when you have defined a bigger Macro in your .rls file.



    Check the terminators in your .cpp file as well.
    Regards,
    Shafali

  6. #6
    Regular Contributor
    Join Date
    Aug 2009
    Posts
    331

    Re: Displaying number input editor dialog

    I have posted the same code that I used.

    Please verify my posted code and let me know if you find any problem!

  7. #7
    Super Contributor
    Join Date
    Nov 2004
    Posts
    1,009

    Re: Displaying number input editor dialog

    1253012926438 * RCOMP failed - deleting output files

    /// Did you add .hrh file wher you have defined editor Id

    1253012926469 syntax error
    1253012929844 undefined identifier 'Control' //// include headre defined this
    1253012929860 undefined identifier 'ExecuteLD' /// number editor can be exceuted like this
    1253012929891 expression syntax error
    1253012929907 ';' expected
    1253012929922 declaration syntax error
    1253012929938 declaration syntax error


    you can execute number editor using any dialog. dialog used to ahve ExecuteLD() not editors.

    You are trying to execute editor not dialog. Create any querydialog or multiline dialog for this.

    if you just want to have editor then just defined Resource NUMBER_EDITOR and then add in component control and call activateL of this in container class.

    Hope you would be clear now.
    Regards,
    Shafali

  8. #8
    Regular Contributor
    Join Date
    Aug 2009
    Posts
    331

    Smile Re: Displaying number input editor dialog

    Hey...

    I solved the problem by using the following code:

    in .rss file....

    DLG_LINE
    {
    type = EAknCtMultilineQuery;
    id = EMultilineFirstLine;
    control = AVKON_DATA_QUERY
    {
    layout = EMultiDataFirstNumEd;
    label = "Enter First Number:";
    control = AVKON_INTEGER_EDWIN
    {
    min = 0;
    max = 10;
    };
    };
    },
    DLG_LINE
    {
    type = EAknCtMultilineQuery;
    id = EMultilineSecondLine;
    control = AVKON_DATA_QUERY
    {
    layout = EMultiDataSecondNumEd;
    label = "Enter Second Number:";
    control = AVKON_INTEGER_EDWIN
    {
    min = 0;
    max = 10;
    };
    };
    }
    ......................................

    in .cpp file

    CAknMultiLineDataQueryDialog* dlg = CAknMultiLineDataQueryDialog::NewL();

    if (!dlg->ExecuteLD("Your Resource Name"))
    {
    .....
    }

    Thanks a lot...

Similar Threads

  1. Replies: 2
    Last Post: 2008-04-08, 06:25
  2. Private Number ???
    By EricDrew in forum Symbian
    Replies: 2
    Last Post: 2004-06-18, 04:41
  3. Number mode input
    By rshtykh in forum Symbian
    Replies: 0
    Last Post: 2003-10-16, 10:33
  4. SMS from change in N30 input pin
    By vhkauppi in forum Nokia M2M
    Replies: 2
    Last Post: 1970-01-01, 02:00

Posting Permissions

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