Join Now
Quality Rating:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)
Expertise Level:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)

This page was last modified 12:00, 12 December 2007.

A tip to debug Draw() function of a control class

From Forum Nokia Wiki

A custom contral generally overrides the CCoeControl::Draw() method to implement its own drawing stuff. However, when stepping into the code with the debugger, the result of each command is not displayed immediatly on screen because of the cache mechanism implemented by the window server.

Happily enough, you can get rid of this behaviour, and have each drawing function being rendered immediatly on screen. Add the following code in your AppUi::ConstructL():

#ifdef _DEBUG

iEikonEnv->WsSession().SetAutoFlush(ETrue);

#endif

This force each Graphic Context draw commands to show up immediately, rather than when the window server client buffer is next flushed.

This means you can step through the draw code and see the effect each line is having. However, you must ensure this line does not make it into released software as it has efficiency implications.

For more tips please visit this link Debugging Tips and Tricks

Related Discussions
Thread Thread Starter Forum Replies Last Post
Simplify Edwin kcome Symbian User Interface 2 2003-05-05 11:10
debugging key map in codewarrior tabletennistayo General Symbian C++ 6 2007-02-12 09:22
How to add text in EEikCtSecretEd when using CAknForm? arachidyl Symbian User Interface 1 2007-04-30 03:36
scrollbar in 7650 alipanwar Symbian User Interface 0 2002-10-23 06:06
Key event is not working PankajNeve General Symbian C++ 5 2006-07-07 08:54
 
Powered by MediaWiki
     
     RDF Facets:
     
     
     qfnZtypeQUqfnTypeZCommunityContentQ
     qfnZtypeQUqfnTypeZWebpageQ
     qfnZtypeQUqfnTypeZWikiContentQ
     qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX