×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Jun 2008
    Posts
    4

    Problem using Dialogs

    Hi,

    I am doing a symbian-qt application and I need to get a text from the user. As the object QLineEdit from Qt does not support the input of letters (because the keypad is only numeric) I'm thinking to use a CAknTextQueryDialog from symbian to do the work.

    The code used is at follows:
    Code:
    TBuf<100> nom;
    CAknTextQueryDialog* queryDialog = CAknTextQueryDialog::NewL( nom );
    CleanupStack::PushL( queryDialog );
    queryDialog->SetPromptL( _L("Name") );
    CleanupStack::Pop(); // queryDialog
    queryDialog->ExecuteLD( R_PROMPT_CONTAINER_DATA_QUERY1 );
    And the resource R_PROMPT_CONTAINER_DATA_QUERY1 is as usual:
    Code:
    RESOURCE DIALOG r_prompt_container_data_query1
    {
    flags = EAknGeneralQueryFlags;
    buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
    items =
    	{
    	DLG_LINE
    		{
    		type = EAknCtQuery;
    		id = 1;
    		control = AVKON_DATA_QUERY
    			{
    			layout = EDataLayout;
    			control = EDWIN
    				{
    				maxlength = 100-1;
    				default_case = EAknEditorTextCase;
    				allowed_case_modes = EAknEditorAllCaseModes;
    				numeric_keymap = EAknEditorStandardNumberModeKeymap;
    				default_input_mode = EAknEditorTextInputMode;
    				allowed_input_modes = EAknEditorTextInputMode | EAknEditorNumericInputMode | EAknEditorSecretAlphaInputMode | EAknEditorKatakanaInputMode | EAknEditorFullWidthTextInputMode | EAknEditorFullWidthNumericInputMode | EAknEditorFullWidthKatakanaInputMode | EAknEditorHiraganaKanjiInputMode | EAknEditorHalfWidthTextInputMode;
    				special_character_table = 0;
    				};
    			};
    		}
    	};
    }
    The problem is that, after adding the necesary libraries and includes, the compilation is fine, but the program crashes in the NewL function!! (marked in red above).

    Its so strange that it crashes just in the NewL() function. Maybe because in Qt we no longer have the structure container-view or because we don't have an AppUi.

    I've been using many other symbian functions with no problem. Any suggestions to solve it?

    Thanks,
    PAU
    Last edited by Corbella; 2008-12-18 at 09:21.

  2. #2
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: Problem using Dialogs

    Hi Pau,

    First, please note that the line edit in Qt will accept text input in the next release.

    For your current problem, does the NewL() function leave? Have you tried TRAPing the leave and finding out what the error code is? It should be possible to use an Avkon dialog but that doesn't mean it works yet, the focus on this kind of Avkon integration will come in later releases (particularly the next one, but I doubt it'll be finished by then).

    Mark

  3. #3
    Nokia Developer Moderator
    Join Date
    May 2007
    Posts
    468

    Re: Problem using Dialogs

    Hi,
    if the code is tested to work in "regular" symbian app then it must be due to something not being constructed. Can you try out f.ex creating coenv yourself as in http://www.pushl.com/developers/exectrl.html

    Please let us know if iy helps!

    Cheers,
    Jack

Similar Threads

  1. frustrations in using dialogs and controls
    By leisti in forum Symbian User Interface
    Replies: 4
    Last Post: 2008-01-10, 22:26
  2. Problem with eglSwapBuffers and heap corruption
    By greatape in forum Symbian Media (Closed)
    Replies: 2
    Last Post: 2007-05-24, 03:35
  3. netcards - Problem with opening adapter
    By kernj in forum Symbian Tools & SDKs
    Replies: 5
    Last Post: 2007-01-10, 08:56
  4. Problem: S60 SDK for CW in PC with .NET
    By anttij in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 1
    Last Post: 2005-02-28, 11:36
  5. 7210 Silent Problem
    By MarkMckim in forum Mobile Java General
    Replies: 1
    Last Post: 2003-03-18, 12:36

Posting Permissions

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