Hi,
I want to navigate from a view to another view and want to show a text in latter view which is gained from a query to a database in first view. I think I can not use writable static variables and global variables which can be use globally in my program; Can anyone tell me how can I resolve this? Can I use CleanupStack and push the record in it in first view and pop it in second view?
In my own programs, I keep such data in the AppUI and provide methods to deposit and get it from there. The AppUI is visible from everywhere at any time with the help of CEikonEnv::Static().
I think the trick with the cleanup stack could work, in theory, but would be a bad idea because things could get mixed up pretty badly if a Leave occured somewhere...
No, that has nothing to do with a writable static variable, as far as I know, it's just a globally accessible function that in some "magic" way provides a pointer to the EikonEnv.
Try using this void ActivateViewL(const TVwsViewId& aViewId,TUid aCustomMessageId,const TDesC8& aCustomMessage); Generally it is used to activate external app's view with some data passed as params. This message can be handled in views's ViewActivatedL function.
I am not completely sure whether it works or not. I dont even see any reason why it shouldnt work. So just try and let us know the result.
Forum posts: 1144
In my own programs, I keep such data in the AppUI and provide methods to deposit and get it from there. The AppUI is visible from everywhere at any time with the help of CEikonEnv::Static().
I think the trick with the cleanup stack could work, in theory, but would be a bad idea because things could get mixed up pretty badly if a Leave occured somewhere...
René Brunner
Forum posts: 40
Thanks René,
does CEikonEnv::Static() create a writable static variable? I will try to use it.
Forum posts: 1144
No, that has nothing to do with a writable static variable, as far as I know, it's just a globally accessible function that in some "magic" way provides a pointer to the EikonEnv.
René Brunner
Forum posts: 285
Try using this void ActivateViewL(const TVwsViewId& aViewId,TUid aCustomMessageId,const TDesC8& aCustomMessage); Generally it is used to activate external app's view with some data passed as params. This message can be handled in views's ViewActivatedL function.
I am not completely sure whether it works or not. I dont even see any reason why it shouldnt work. So just try and let us know the result.
Cheers,
Sri