×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Jul 2003
    Location
    Australia
    Posts
    38

    SetAknEditorSpecialCharacterTable Panics with BAFL 4

    Hi,
    I want my URL edit field to use a special url character table, so i defined a character table resource like so

    #include "avkonsct.loc" // for qtn_sct_special_characters_upper

    RESOURCE SPECIAL_CHAR_TABLE r_url_char_table
    {
    contents =
    SCT_CHAR_SET
    {
    id = 0;
    chars = qtn_sct_special_characters_upper;
    };
    }

    and tried to set the table for my edwin -

    iEdwin->SetAknEditorSpecialCharacterTable(R_URL_CHAR_TABLE);

    This Panics with "BAFL 4" when i try to open the "Select symbol:" dialog.

    nb. i tried it with other character tables & i got the same panic.

    Could anyone tell me what i am doing wrong?

    Cheers.
    Pete

  2. #2
    Regular Contributor
    Join Date
    Mar 2003
    Location
    Tampere
    Posts
    475
    This panic is raised by the Read...() member functions and the Advance() member function of TResourceReader, when the current position in the resource buffer is moved beyond the end of the buffer.

    It means there is some problem with the resouce. In fact, SetAknEditorSpecialCharacterTable() is expecting a Dialog resource. It is not well documented in the SDK, therefore here is a working example and some note about the usage.

    Special character table dialog is inherited from Eikon dialog. It consists of heading pane and character map control. If there are more special characters than what can fit in the one page, scroll indicators are shown.

    Special character table supports two character sets: Upper case and lower case character sets. Character sets are read from a resource file. Avkon resource file contains default character sets. An application that is using Edwin editor can set editor specific character set by setting own special character dialog resource to Edwin's special_character_table resource.

    iEdwin->SetAknEditorSpecialCharacterTable(R_MY_SPECIAL_CHARACTER_TABLE_DIALOG);

    // Resource File:
    RESOURCE DIALOG r_my_special_character_table_dialog
    {
    flags = EGeneralQueryFlags | EEikDialogFlagNoBorder | EEikDialogFlagNoShadow;
    buttons = R_AVKON_SOFTKEYS_SELECT_CANCEL;
    items=
    {
    DLG_LINE
    {
    type = EAknCtPopupHeadingPane;
    id = EAknSCTQueryHeadingId;
    control = AVKON_HEADING
    {
    label = "Select symbol:";
    headinglayout = R_AVKON_SCT_LIST_HEADING_PANE;
    };
    },
    DLG_LINE
    {
    type = EAknCtSpecialCharacterMap;
    id = EAknSCTQueryContentId;
    control = SPECIAL_CHAR_TABLE
    {
    contents =
    {
    SCT_CHAR_SET
    {
    id = EAknSCTLowerCase;
    chars = qtn_sct_url_special_characters_lower;
    },

    SCT_CHAR_SET
    {
    id = EAknSCTUpperCase;
    chars = qtn_sct_special_characters_upper;
    }


    };
    };
    }
    };
    }

    Both upper and lower case's Symbol dialog will show the '@' sign, even though at different places.

    Best Regards,
    (V) - Forum Nokia Developer Support

Posting Permissions

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