×

Discussion Board

Results 1 to 2 of 2

Thread: SettingList

  1. #1
    Regular Contributor
    Join Date
    Jan 2008
    Posts
    70

    Question SettingList

    Hi, im workin on a program that shows a list as UI to present data to the user, but

    now i need to add a setting list to the app, my actual list work as expected, but i

    dont know how to add the function to show the other list (Settings), the code to

    create and set my actual list is as follows

    Code:
    void CContainer::ConstructL(const TRect& aRect)
    	{
    
    
    	TResourceReader rr;
    
    
    	CreateWindowL ();
    
    	iEikonEnv->CreateResourceReaderLC(rr, R_LOC_LISTBOX_RESOURCE);
    
    	iListBox = new (ELeave) CAknDoubleStyleListBox ();
    	iListBox->SetContainerWindowL ( *this);
    	iListBox->ConstructFromResourceL ( rr);
    	CleanupStack::PopAndDestroy ();
    
    	CEikScrollBarFrame* sb = iListBox->CreateScrollBarFrameL ();
    	sb->SetScrollBarVisibilityL (CEikScrollBarFrame::EOn,
    			CEikScrollBarFrame::EOn);
    
    	itemList = iListBox->Model()->ItemTextArray ();
    	iItemArray = (CDesCArray*) itemList;
    
    
    	SetRect (aRect);
    
    
    	ActivateL ();
    
    	}
    so i add the Settings item in my resource so it can be used from my command

    handler, and it shows a note indicating that "Settings" has been selected. this in

    my CAppUi

    Code:
    void CAppUi::HandleCommandL(TInt aCommand)
    	{
    	switch ( aCommand)
    		{
    
    		
    	case ESettingCmd:
    		{
    		CAknInformationNote* note = new (ELeave) CAknInformationNote;
    
    		informationNote->ExecuteLD(_L("Settings Selected"));
    		
    		iAppContainer->ShowSettings(ClientRect ())
    		break;
    		}
    	case EAknSoftkeyExit:
    		{
    		Exit ();
    		break;
    		}
    	default:
    		break;
    		}
    	}
    Now i want to change the list that is in view like screen switch so the SettingList can be shown, i intent to do this with the red line in the code above,

    what i try was to implement this method as this but what i receive is a CONE 10 panic, how can i achieve what i intent to do then? thank you

    Code:
    void CLbsReferenceContainer::ShowSettings(const TRect& aRect)
    	{
    		
    	
    	iSettingList = new (ELeave) CAknSettingItemList;
    	iSettingList->SetContainerWindowL ( *this);
    
    
    
    	SetRect (aRect);
    
    
    	ActivateL ();
    	
    
    	}
    it is necesary to extend the CAknSettingItemList in order to use it?
    Last edited by xchewy; 2008-05-28 at 18:28.

  2. #2
    Regular Contributor
    Join Date
    Dec 2007
    Location
    Banglore,India
    Posts
    64

    Re: SettingList

    you are trying to display settings listbox in the same view,when you call ActivateL() in your ShowSettings() function.It panics because it is already owning a window.you have to create this listbox in anathor view and switch the view in HandleCommand()
    using ActivateLocalView()

Similar Threads

  1. 3 radio buttons in settinglist?
    By chishti.hameed in forum Symbian User Interface
    Replies: 2
    Last Post: 2009-09-22, 09:01
  2. SettingList problem
    By asdfghjkl_asdfghjkl in forum Symbian
    Replies: 6
    Last Post: 2006-12-31, 03:50
  3. Replies: 0
    Last Post: 2002-12-05, 05:33
  4. SettingList - Enumerated text and Binary controls
    By christopherlim83 in forum Symbian User Interface
    Replies: 0
    Last Post: 2002-12-03, 00:31

Posting Permissions

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