×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Apr 2004
    Location
    Moscow
    Posts
    16

    EEikCtTelephoneNumberEditor

    What is right resource definition for EEikCtTelephoneNumberEditor editor ?

    i use following form:

    RESOURCE DIALOG r_blacklistdb_contactform_dialog
    {
    flags = EEikDialogFlagNoDrag | EEikDialogFlagFillAppClientRect |
    EEikDialogFlagNoTitleBar | EEikDialogFlagNoBorder;
    buttons = R_AVKON_SOFTKEYS_DONE_BACK;
    form = r_blacklistdb_contactform_form;
    }

    RESOURCE FORM r_blacklistdb_contactform_form
    {
    flags = EEikFormUseDoubleSpacedFormat | EEikFormEditModeOnly;
    items =
    {
    DLG_LINE
    {
    type = EEikCtEdwin;
    id = EBlacklistdbContactformCtrlId0001;
    prompt = "description:";
    itemflags= EEikDlgItemOfferAllHotKeys;
    control = EDWIN
    {
    flags= EEikEdwinNoHorizScrolling | EEikEdwinResizable;
    maxlength = 20;
    lines = 2;
    width = 1;
    max_view_height_in_lines = 5;
    base_line_delta = 21;
    };
    },

    DLG_LINE
    {
    type = EEikCtTelephoneNumberEditor;
    id = EBlacklistdbContactformCtrlId0002;
    prompt = "number:";
    itemflags= EEikDlgItemOfferAllHotKeys;
    control = EDWIN
    {
    flags= EEikEdwinNoHorizScrolling | EEikEdwinResizable;
    maxlength = 20;
    lines = 2;
    width = 1;
    max_view_height_in_lines = 5;
    base_line_delta = 21;
    };
    }
    };
    }

    but it craches on form->ExecuteLD(R_BLACKLISTDB_CONTACTFORM_DIALOG)

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,169
    if this is series 60, there is no phonenumber editor available.

    The reson for it is propably that phonenumber editor is not FEP aware and is bit hard to handle with series 60 keyboard.

    So what you can do is to use normal edwin and define right number layout for it, just the way it's done by Series 60 native applications.

    yucca

  3. #3
    Registered User
    Join Date
    Apr 2004
    Location
    Moscow
    Posts
    16
    ok, edwin with number layout is solution, but what about "+" and fact that phone number may have 12 digits long ?

    for Series 60 if i don't use form i can use following dialog to enter phone number:

    RESOURCE DIALOG r_dialog_phonenumber_query
    {
    flags = EGeneralQueryFlags;
    buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
    items =
    {
    DLG_LINE
    {
    type = EAknCtQuery;
    id = EGeneralQuery;
    control = AVKON_DATA_QUERY
    {
    layout = EPhoneLayout;
    label = "Enter number";
    control = EDWIN
    {
    flags= EEikEdwinNoHorizScrolling | EEikEdwinResizable;
    maxlength = 20;
    lines = 1;
    };
    };
    }
    };
    }

    It works perfect, but it does not work in form. Right? Are there any way to use EAknCtQuery in forms?

  4. #4
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,169
    for forms see uikon.rh, for series 60 the STRUCT EDWIN is extended with AKN_EDITOR_EXTENSIONS.

    There you could set flag for numeric_keymap. Then see the documentation for editor example and figure out which number layout will suit your case the best.

    The layout will assign the * and # keys, but for length you would need to use maxlength. But are you sure it's global that numbers can only be 12 characters long ?

    yucca

  5. #5
    Registered User
    Join Date
    Apr 2004
    Location
    Moscow
    Posts
    16
    Ohh, thanks a lot for suggetion. I got solved my problem.

    about MSISDN as i know MSISDN = CC + NDC + SN.

    CC up to 3 digit, NDC up to 3 digit, SN up to 10 digits. So maximum overall length of MSISDN is 16 digits.

    It's more than maximim value of Int. Taking into consideration that user can add additional digits to the tail of MSISDN (for instance, extension number) we can see that Int is not suitable storage for phone number -))

Posting Permissions

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