Well..most of such things are possible
I really dont know what exactly you are trying to achieve. If you want to just see some value for the kicks of it, Check how helloworld is displayed in helloworld Application
If you want to draw some elaborate, maybe something like textbox..labels, etc..I guess you should check the SDK docs which gives you how to do that. Also check articles on this website and Forum Nokia and Wiki there. There are number of examples and codes and articles.
If you have any much more specific need, you really need to put in some efforts to explain.
Thanks, I only want to see the value of a variable in the screen to check that it's correct. I've read the helloworld example and I've only seen how to see constant or labels (such as hello world!) but i don't know how to see in the screen "4" if the variable value is 4 (ex=4;). Anyway I'll read the sdk docs.
You can display any value, constant or variable. Use "CAknInformationNote" and put the value you want to display in the TBuf, and pass it while calling ExecuteLD on the note.
Hi again!
I've got a problem. this line works perfectly the first time it is read in a loop but when the value of the variable changes there is an error: Application closed KERN EXEC 3. how can i solve this?
This panic is raised when an unhandled exception occurs. Exceptions have many causes, but the most common are access violations caused, for example, by dereferencing NULL. Among other possible causes are: general protection faults, executing an invalid instruction, alignment checks, etc.
Obviously in a loop that is going to create problem..Paste your code here
these are the instructions that are in the loop. The first time the value is ok but the second time i've got the same value printed (it doesn't change) and then the kern exec 3 error appears.
int hr=0;
hr=HeartRate(); //this variable changes its value everytime it loops
TBuf<20> testBuf;
testBuf.Num(hr);
CEikonEnv::Static()->AlertWin(_L("HR:"),testBuf);
For logging this sort of data, I usually make use of files. Just make a file and in every loop of your function, append the value to the end of the file.
Or
On a debugger, put the breakpoint and check the value of "hr" on every iteration.
Hi! I've tried with this code to display the variable hr:
HBufC* textResource = StringLoader::LoadLC( hr );
CAknInformationNote* note = new ( ELeave ) CAknInformationNote;
note->ExecuteLD( *textResource );
CleanupStack::PopAndDestroy( textResource );
and I don't get the kern exec 3 error but the correct value is not displayed. a weird string is displayed. what do i have to change? thanks!
I think you should put a breakpoint in your function HeartRate(); and if you are caling another function from here then put break point there also. And check the value of the required variable . this is the only way that you can get a solution as I always follow this and find the solution mostly. Try to debug it .
Regards,
Isha
"To the question of your life , you are the only Answer. To the problems of your life,you are the only Solution".
I had once used CAknWaitDialog and implemented the automatic updation of the text displayed as in the progress bar. Try that. It might require more effort but, this is the solution that will suit your requirement. If this is not very important and doesn't worth much effort then better go for the breakpoint debugging solution.
Forum posts: 424
Debug on emulator and check the variables view in the debug mode
Forum posts: 14
ok, but if I want to view in the screen of a mobile phone the value of a variable? is it possible?
Forum posts: 424
Well..most of such things are possible

I really dont know what exactly you are trying to achieve. If you want to just see some value for the kicks of it, Check how helloworld is displayed in helloworld Application
If you want to draw some elaborate, maybe something like textbox..labels, etc..I guess you should check the SDK docs which gives you how to do that. Also check articles on this website and Forum Nokia and Wiki there. There are number of examples and codes and articles.
If you have any much more specific need, you really need to put in some efforts to explain.
Forum posts: 14
Thanks, I only want to see the value of a variable in the screen to check that it's correct. I've read the helloworld example and I've only seen how to see constant or labels (such as hello world!) but i don't know how to see in the screen "4" if the variable value is 4 (ex=4;). Anyway I'll read the sdk docs.
Forum posts: 57
You can display any value, constant or variable. Use "CAknInformationNote" and put the value you want to display in the TBuf, and pass it while calling ExecuteLD on the note.
Good luck.
Forum posts: 113
Hi,
For this you can simplay use alertWin or Infomsg();
eg
TInt val;
TBuf<25> testBuf;
testBuf.Num(val);
CEikonEnv::Static()->AlertWin(_L("Check Val"),testBuf);
"To the question of your life , you are the only Answer. To the problems of your life,you are the only Solution".
Forum posts: 14
Thank you very much!

Forum posts: 14
Hi again!
I've got a problem. this line works perfectly the first time it is read in a loop but when the value of the variable changes there is an error: Application closed KERN EXEC 3. how can i solve this?
Forum posts: 424
Reason for Kern Exec-3 from document:
Obviously in a loop that is going to create problem..Paste your code here
Forum posts: 14
these are the instructions that are in the loop. The first time the value is ok but the second time i've got the same value printed (it doesn't change) and then the kern exec 3 error appears.
int hr=0;
hr=HeartRate(); //this variable changes its value everytime it loops
TBuf<20> testBuf;
testBuf.Num(hr);
CEikonEnv::Static()->AlertWin(_L("HR:"),testBuf);
thanks
Forum posts: 57
For logging this sort of data, I usually make use of files. Just make a file and in every loop of your function, append the value to the end of the file.
Or
On a debugger, put the breakpoint and check the value of "hr" on every iteration.
For using files use the RFs and RFile APIs.
Forum posts: 14
Thanks SymbianReady, I already knew this solution but I have to display the value in the screen.
Forum posts: 14
Hi! I've tried with this code to display the variable hr:
HBufC* textResource = StringLoader::LoadLC( hr );
CAknInformationNote* note = new ( ELeave ) CAknInformationNote;
note->ExecuteLD( *textResource );
CleanupStack::PopAndDestroy( textResource );
and I don't get the kern exec 3 error but the correct value is not displayed. a weird string is displayed. what do i have to change? thanks!
Forum posts: 113
Hi,
I think you should put a breakpoint in your function HeartRate(); and if you are caling another function from here then put break point there also. And check the value of the required variable . this is the only way that you can get a solution as I always follow this and find the solution mostly. Try to debug it .
Regards,
Isha
"To the question of your life , you are the only Answer. To the problems of your life,you are the only Solution".
Forum posts: 57
I had once used CAknWaitDialog and implemented the automatic updation of the text displayed as in the progress bar. Try that. It might require more effort but, this is the solution that will suit your requirement. If this is not very important and doesn't worth much effort then better go for the breakpoint debugging solution.