×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Jun 2004
    Posts
    135

    update setting list item...

    Hi,

    I have a class called CMyItemList, derived from CAknSettingItemList.
    The setting list contains a CAknEnumeratedTextPopupSettingItem item and a CAknTextSettingItem item.

    Now, when the user select an option from the popup field I want to set dynamically a value for the edit field.

    I have overloaded the EditItemL method like this:

    Code:
    void CMytemList::SetData(TMyInfo& aData)
    {
    	iCountry = aData.Country();
    	iPrice.Copy(aData.Price());
    }
    
    void CMytemList::GetData(TMyInfo& aData)
    {
    	aData.SetCountry(iCountry);
    	aData.SetPrice(iPrice);
    }
    
    void CMyItemList::EditItemL( TInt aIndex, TBool aCalledFromMenu )
    {
        CAknSettingItemList::EditItemL( aIndex, aCalledFromMenu );
        ( *SettingItemArray() )[aIndex]->UpdateListBoxTextL();
        ( *SettingItemArray() )[aIndex]->StoreL();
    
        if(aIndex == 0)
        {
    	TMyInfo iMyInfo;
    	GetData(iMyInfo);
    
            // Here I use an array of prices corresponding to another array of countries
            ....................
            iPrice.Copy((*iPriceArray)[iMyInfo.Country()]);
            ....................
            //CEikonEnv::Static()->InfoWinL(_L("Price"),iPrice);
     
            // The price is changed accordingly to the choosed country as I can check using the above InfoWinL code line
           // Now my problem is how to update the second item, the edit item containing the prices?
           // I use something like:
    
            ( *SettingItemArray() )[1]->UpdateListBoxTextL();
            ( *SettingItemArray() )[1]->StoreL();
    
          // but nothing happen
        }
    }
    thanks.

  2. #2
    Regular Contributor
    Join Date
    Oct 2004
    Location
    Tokyo,Japan
    Posts
    289

    Thumbs up Re: update setting list item...

    you need to call method StoreSettingsL() of parent class CAknSettingItemList
    then only you can reflect and make changes in the desired item of CAknSettingItemList.


    regards'
    Neo

Similar Threads

  1. Two-line setting & Multi-selection list setting items
    By azavor in forum Symbian User Interface
    Replies: 2
    Last Post: 2009-06-04, 19:39
  2. Replies: 4
    Last Post: 2009-02-17, 21:24
  3. About index number for each item in setting list
    By dantifer in forum Symbian User Interface
    Replies: 3
    Last Post: 2006-01-04, 06:50
  4. binary setting list item - urgent
    By murmur20 in forum Symbian User Interface
    Replies: 3
    Last Post: 2004-12-07, 02:17
  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
  •  
×