Discussion Board

Results 1 to 1 of 1
  1. #1
    Registered User
    Join Date
    Dec 2005

    obtaining value from AVKON_INTEGER_EDWIN

    I’m trying to retrieve an integer value from a DLG_LINE on a S60 device. Below is a sample from my *.rss file that defines a part of the interface.

    type = EAknCtQuery;
    	id = EGeneralAmountQuery;
    	control = AVKON_DATA_QUERY
    		layout = ENumberLayout;
    		label = "Amount (£):";
    		control = AVKON_INTEGER_EDWIN 
    			min = 1; 
    			max = 10;
    I use the following code to obtain a reference to the editor, and then call GetTextAsInteger(Tint x) to retrieve the value entered by the user.

    CAknIntegerEdwin* amountEditor = static_cast<CAknIntegerEdwin*>(ControlOrNull(EGeneralAmountQuery));
    if (amountEditor)
    	CAknNumericEdwin::TValidationStatus amountStatus = amountEditor->GetTextAsInteger(tmpAmount);
    The above code causes a runtime error. I found that this is caused by the nested control struct in the DLG_LINE. If I remove the outer control struct (and therefore also the label and layout fields of that struct) the code works fine and the values can be retrieved.

    All books and online examples seem to have an outer control struct of type AVKON_DATA_QUERY with an inner control struct of type AVKON_INTEGER_EDWIN (for example), but nowhere can I find the code to retrieve the values entered by the user.

    Summary: Does anyone have any code or can offer any help in retrieving values from an interface defined by the rss code at the top of this post.

    Many thanks.
    Last edited by wowman; 2005-12-30 at 17:14. Reason: typo

Similar Threads

  1. --obtaining maximum acceptable wml deck size--
    By piotr.jankowski in forum Browsing and Mark-ups
    Replies: 2
    Last Post: 2005-05-25, 08:42
  2. Obtaining "Call Duration" & "USSD Response"
    By junsledge in forum PC Suite API and PC Connectivity SDK
    Replies: 0
    Last Post: 2005-05-24, 04:53
  3. Obtaining additional network information
    By drazvan in forum Symbian Tools & SDKs
    Replies: 22
    Last Post: 2004-05-10, 09:38
  4. Obtaining Local Weather on 9290
    By phoebe66 in forum PersonalJava
    Replies: 0
    Last Post: 2002-08-05, 01:43
  5. Changing and Obtaining Item values of the Setting list
    By leonidf in forum Symbian User Interface
    Replies: 0
    Last Post: 2002-07-18, 04:10

Posting Permissions

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