void CMyUi::ConstructL() {
BaseConstructL();
RFs fileSession = Document()->Process()->FsSession();
CDictionaryStore* store = Application()->OpenIniFileLC(fileSession);
if (store->IsPresentL(KKey1Uid)) {
RDictionaryReadStream in;
in.OpenLC(*store, KKey1Uid);
in >> *iMyConfig;
CleanupStack: opAndDestroy();
} else {
iMyConfig->SetDefault();
RDictionaryWriteStream out;
out.AssignLC(*store, KKey1Uid);
out << *iMyConfig;
out.CommitL();
CleanupStack: opAndDestroy();
store->CommitL();
}
CleanupStack: opAndDestroy();
//...
}
BaseConstructL();
RFs fileSession = Document()->Process()->FsSession();
CDictionaryStore* store = Application()->OpenIniFileLC(fileSession);
if (store->IsPresentL(KKey1Uid)) {
RDictionaryReadStream in;
in.OpenLC(*store, KKey1Uid);
in >> *iMyConfig;
CleanupStack: opAndDestroy();
} else {
iMyConfig->SetDefault();
RDictionaryWriteStream out;
out.AssignLC(*store, KKey1Uid);
out << *iMyConfig;
out.CommitL();
CleanupStack: opAndDestroy();
store->CommitL();
}
CleanupStack: opAndDestroy();
//...
}