CAknGlobalListQuery Uses notification framework to show a global listquery.
Usage: Create an active object, start it and pass its TRequestStatus as a parameter to ShowListQueryL. After the user selects one item from the listquery, the request status will hold the number of the selected item. If the user selected Cancel, the request status will hold -1.
Example 1. Show the global list query: CDesCArray* textArray = iCoeEnv->ReadDesCArrayResourceL( R_GLOBAL_LIST_ARRAY ); CleanupStack::PushL(textArray); TInt result = -555; if ( iListObserver ) { iListObserver->Cancel(); delete iListObserver; } iListObserver = new(ELeave) CGlobalListObserver(iEikonEnv); iListObserver->Start(); iGlobalListQuery->ShowListQueryL(textArray, iListObserver->iStatus, 4); CleanupStack::PopAndDestroy(); // textArray
Example 2. Get and handle the result in active object. void CMyActiveObject::RunL() { TBuf<120> msg = _L("Received: "); msg.AppendNum( iStatus.Int() ); iEnv->InfoMsg(msg); Cancel(); }