×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Mar 2003
    Location
    California, USA
    Posts
    7

    Settings Lists - Allows User Defined Entry

    I have reviewed the many excellent posts on settings lists and have reviewed the SettingsList SDK example. However I am left with the following questions:

    1. The SettingsList example includes an Enum Text settings list which allows the user to define an "other" option (see resource snippets below).

    a) Is it possible to set the default input mode to *numeric* for the user defined option in the resource file?
    b) Is it possible to specify AVKON_INTEGER_EDWIN for the user defined option editor?
    c) If (a) or (b) not possible, is it possible to set the input mode dynamically?

    // snippets from aknexsettinglist.rss

    RESOURCE AVKON_SETTING_PAGE r_aknexsettinglist_enumtext_setting_page
    {
    number= 1;
    label= qtn_aknexsettinglist_enumtext_title;
    type = EAknCtPopupSettingList;
    editor_resource_id = r_aknexsettinglist_popup_setting_list_new_entry;
    }

    RESOURCE POPUP_SETTING_LIST r_aknexsettinglist_popup_setting_list_new_entry
    {
    flags = EAknPopupSettingListFlagAllowsUserDefinedEntry;
    }

    2. Is there documentation in the SDK on the "RESOURCE" statement where I can find, for example, a listing of valid members for "POPUP_SETTING_LIST".

    Thanks for the help.
    Lee

  2. #2
    Registered User
    Join Date
    Nov 2004
    Location
    India
    Posts
    7

    You can use that..

    use can use this way for Numeric mode


    RESOURCE AVKON_SETTING_PAGE r_aknexsettinglist_enumtext_setting_page
    {
    number= 1;
    label= qtn_aknexsettinglist_enumtext_title;
    type = EAknCtPopupSettingList;
    editor_resource_id = r_numericeditor;
    }


    RESOURCE AVKON_INTEGER_EDWIN r_numericeditor
    {
    maxlength = 25;
    }


    and also you can use

    DATE_EDITOR // for date entries
    EDWIN // for text input

  3. #3
    Super Contributor
    Join Date
    Mar 2004
    Location
    Czech Republic
    Posts
    2,037
    Hi,

    yes inserting INTEGER is easy as leethomso said - is his example will not work write here and i will send you complete code for it. But I have also problems with setting lists, please if you have any idea how this could be sovled answer me:

    a) when user edit text he must type at least one character, oterwise the 'OK' button disappear, I want allow also no text entry....

    b) I need only ASCII chars to be edited, not any national characters.....

    Thanx for your answers
    Bye
    STeN

  4. #4
    Super Contributor
    Join Date
    Mar 2004
    Location
    Czech Republic
    Posts
    2,037
    BTW - I found that forms are much more better than setting lists...
    Last edited by stenlik; 2004-11-23 at 09:39.

  5. #5
    Registered User
    Join Date
    Mar 2003
    Location
    California, USA
    Posts
    7

    Doesn't work for user defined option

    Thanks baranidm, but the suggestion does not work for settings lists that allow user defined entries...

    "BAFL 15" panic is generated (raised by TResourceReader).

    I can use "AVKON_INTEGER_EDWIN r_numericeditor" as you suggest in settings lists that *do not* allow user defined entries, but not for settings lists that *do* allow user defined entries.

    Can you think of another way to set the default input mode to numeric in the resource file? Or dynamically?

    Finally, in regards to my original question #2 - where are the specs for resource files, RESOURCE statement, resource names and their valid members, etc?

    Thanks again for the help.
    Lee

  6. #6
    Super Contributor
    Join Date
    Mar 2004
    Location
    Czech Republic
    Posts
    2,037
    Hi,

    I dont fully understand what you need
    ----------------------------------------------------------------------
    1) if you need to input number:

    RESOURCE AVKON_SETTING_ITEM_LIST r_setting_list_infopage
    {
    flags = 0;
    title = "";

    items =
    {
    // age selection
    AVKON_SETTING_ITEM
    {
    identifier = ENumberEditorAge;
    setting_page_resource = r_number_editor_age_page;
    name = qtn_spicychat_string_Age;
    },
    };
    }

    RESOURCE AVKON_SETTING_PAGE r_number_editor_age_page
    {
    type = EAknCtIntegerEdwin;
    editor_resource_id = r_number_editor_age_editor;
    }

    RESOURCE AVKON_INTEGER_EDWIN r_number_editor_age_editor
    {
    maxlength = 2;
    min = 0;
    max = 99;
    }

    ----------------------------------------------------------------------
    2) if you need enumeration

    // age selection - enumerated text
    AVKON_SETTING_ITEM
    {
    identifier = EEnumeratedTextAge;
    setting_page_resource = r_enumerated_text_age_page;
    associated_resource = r_enumerated_text_age_associated;
    name = qtn_spicychat_string_Age;
    },

    RESOURCE AVKON_SETTING_PAGE r_enumerated_text_age_page
    {
    label = "";
    number = 2;
    type = EAknCtPopupSettingList;
    editor_resource_id = r_enumerated_text_age_editor;
    }

    RESOURCE POPUP_SETTING_LIST r_enumerated_text_age_editor {}

    RESOURCE AVKON_POPUP_SETTING_TEXTS r_enumerated_text_age_associated
    {
    setting_texts_resource = r_enumerated_text_age_inplace;
    popped_up_texts_resource = r_enumerated_text_age_popup;
    }

    RESOURCE ARRAY r_enumerated_text_age_inplace
    {
    items =
    {
    AVKON_ENUMERATED_TEXT { value = 0; text = " <10"; },
    AVKON_ENUMERATED_TEXT { value = 1; text = "10 - 15"; },
    AVKON_ENUMERATED_TEXT { value = 2; text = "15 - 18"; },
    AVKON_ENUMERATED_TEXT { value = 3; text = "18 - 21"; },
    AVKON_ENUMERATED_TEXT { value = 4; text = "21 - 25"; },
    AVKON_ENUMERATED_TEXT { value = 5; text = "25 - 30"; },
    AVKON_ENUMERATED_TEXT { value = 6; text = "30 - 40"; },
    AVKON_ENUMERATED_TEXT { value = 7; text = "40> "; },
    AVKON_ENUMERATED_TEXT { value = 8; text = qtn_spicychat_string_Any; }
    };
    }

    RESOURCE ARRAY r_enumerated_text_age_popup
    {
    items =
    {
    LBUF { txt = " <10"; },
    LBUF { txt = "10 - 15"; },
    LBUF { txt = "15 - 18"; },
    LBUF { txt = "18 - 21"; },
    LBUF { txt = "21 - 25"; },
    LBUF { txt = "25 - 30"; },
    LBUF { txt = "30 - 40"; },
    LBUF { txt = "40> "; },
    LBUF { txt = qtn_spicychat_string_Any; }
    };
    }


    Bye
    STeN

  7. #7
    Registered User
    Join Date
    Mar 2003
    Location
    California, USA
    Posts
    7
    Thanks, STeN. I appreciate the info.

    I am trying to understand a specific type of Settings List: Enumerated Text which *allows a user defined entry*. It appears the responses and code examples received do not address this type of Settings List.

    I am going to start a new thread which outlines my problem more clearly. Thanks again for your responses.

    -Lee

Posting Permissions

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