hi,
My app has three view. i want to know that how or from which methods i know that which view is
actived currently ???
I m working on S60 2nd Edition FP3.....
hi,
My App has CallWatcher class which listen incoming calls. I want to know which view is active in this class.... for this i try following code... plz tell me that i m right or wrong..?
ok Thanx for guide me.... one another problem occured that when i use this code and install in real device My App crashes when call is coming ..... Now how i check what exactly problem is ???
Thats lil tricky.......
1. Normally I put alerts at diff places and check on device..
2. but if you have carbide developer or professional, you can do target debugging too,,
3. Other way is to crate a debug file like C:\data\debug\mydebugfile.txt and keep on writing it from ur code.
After the crash, when you boot your phone the next time, have a look at this file, it can tell you approx location of crash..
May be there are better ways, But I normally user 1 and 3.
Br
G;p
Forum posts: 82
Have a state machine...
private :// Data
enum TCurrentView
{
EMyFirstView= 0, // First View
EMySecondView, //Second View
EMyThirdView //Third View
};
Something like that in your View source file... n keep track
Simple
Br
G;p
http://mobisyblog.blogspot.com
Forum posts: 93
hi,
My App has CallWatcher class which listen incoming calls. I want to know which view is active in this class.... for this i try following code... plz tell me that i m right or wrong..?
TInt CXXXXCallWatcher::GettingId() const
{
TVwsViewId viewId;
return CEikonEnv::Static()->EikAppUi()->GetActiveViewId(viewId );
}
and i check like this where i need in CallWatcher class
if(GettingId()==EXXXXCmdRejectAllOn){
// do something which i need...
}
Thanks & Regards,
C Singh
Forum posts: 82
Yes this is right, if you have three View Classes, and you switch between them.....
I thought that you have only one view class, and in that you have different view controls......
Forum posts: 93
ok Thanx for guide me.... one another problem occured that when i use this code and install in real device My App crashes when call is coming ..... Now how i check what exactly problem is ???
Thanks & Regards,
C Singh
Forum posts: 82
Thats lil tricky.......
1. Normally I put alerts at diff places and check on device..
2. but if you have carbide developer or professional, you can do target debugging too,,
3. Other way is to crate a debug file like C:\data\debug\mydebugfile.txt and keep on writing it from ur code.
After the crash, when you boot your phone the next time, have a look at this file, it can tell you approx location of crash..
May be there are better ways, But I normally user 1 and 3.
Br
G;p
Forum posts: 93
Thanx for reply, I try to do as u suggest and post again if i face any problem.....
Thanks & Regards,
C Singh