TInt CMainView::NumberQuery(TDes& aText,TInt& aNumber) { CAknNumberQueryDialog* Dialog = CAknNumberQueryDialog::NewL(aNumber,CAknQueryDialog::ENoTone); Dialog->PrepareLC(R_NUMBER_QUERY); Dialog->SetPromptL(aText); return Dialog->RunLD(); }
void CRecognizerViewImpl::HandleCommandL(TInt aCommand) { CALLSTACKITEM_N(_CL("CRecognizerViewImpl"), _CL("HandleCommandL")); Reporting().DebugLog(_L("CRecognizerViewImpl::HandleCommandL")); switch ( aCommand ) { case ERecognizerCaptureCode: { #ifdef __WINS__ TInt value(100); CAknNumberQueryDialog * dlg = CAknNumberQueryDialog::NewL( value, CAknQueryDialog::ENoTone ); CleanupStack::PushL(dlg); dlg->PrepareLC(R_WINS_CODE_SELECTION); CleanupStack::Pop(dlg); if ( dlg->RunLD() ) { auto_ptr<CBigInteger> i(new (ELeave) CBigInteger); i->ConstructL(32); i->Set(value); CCodeInfo* c=new CCodeInfo; if (!c) { User::Leave(KErrNoMemory); } c->code=i.release(); auto_ptr<CCodeInfo> cp(c); iCallback->CodeSelected(*c); } else { iCallback->Cancelled(); } #else CCodeInfo* code=iContainer->GetCode(); if (!code) return; iCallback->CodeSelected(*code); #endif } break; case ERecognizerCancel: { iCallback->Cancelled(); } break; default: AppUi()->HandleCommandL(aCommand); break; } if (iNextViewId) { //AppUi()->ActivateLocalViewL(iDefaultView); *iNextViewId=iPrevView; } }