|
|
User login
Feeds |
problem with popupField.... (my problem remaining...)
|
|||||
| Fri, 2004-11-19 17:13 | |
|
I have a popUpFiled,
CTestFormCountry* dlg = CTestFormCountry::NewLC(); CleanupStack::Pop(); if(dlg->ExecuteLD(aResourceId) == KErrNone) { //... } with executing this code, I will see a Dialog which has a popUpField in it (my dialog contains only a popupField) and too softKeys: Back (to return to my container) Option (for editing or saving) I want to have the selected index of popupField when I press Back softkey In real I want my label in my Container show me this index, But this value should be pass through my dialog to container,... To do this,I wrote some code in OkToExitL method of my dialog, I mean I initialize a member variable (TInt nTest) with the selected Index of popupField in this method, and return this value in a public method of this Dialog (GetSelectedIndex) /// TInt GetSelectedIndex() { return nTest; //nTest evaluated in OkToExitL method } /// But when I call the GetSelectedIndex method in my container, it doesn't return the true value, I think the reason is that this method is called earlear than BACK pressing in dialog... CTestFormCountry* dlg = CTestFormCountry::NewLC(); CleanupStack::Pop(); if(dlg->ExecuteLD(aResourceId) == KErrNone) { TInt aIndex = dlg -> GetSelectedIndex(); } But I don't know what should I do, ![]() |
|
Forum posts: 39
I think you need to pass "nTest" as argument for CTestFormCountry::NewLC.
Forum posts: 169
Draw method in my Container is working with this nTest value and update the appearence of container UI based on the value of nTest,
and I know whenever I save my popupfield dialog and press back softkey, my dialog hide and so the Draw method of my container will be called by system(automatically),
Then I want my nTest be updated when the back is pressed,(I think in OkToExit method of my Dialog)
nTest is a member variable of my Container,
So I think I should pass it by reference to my Dialog, but NewLC method of my dialog cannot accept it as an argument,
What should I do? and how can pass it to my Dialog class?
Thank you
Forum posts: 169
by using CEikonEnv Static() method of CEikonEnv,,
Thanks God...