The Journey  
Intro
The Game
Download
Forum
Paper
Contact
Help  


The Paper - Page 8 - Useful Tips

The Workflow of C++ Game-Development on a Series 60 Platform device

Andreas Jakl, Revision 1.0, July 2004


3.2.4 Testing the project

If you have a working installation of the Symbian OS SDK for Series 60 (see chapter 2.3) and have copied the header file for getting the network information (chapter 3.2.2), copy the Journey project folder to your Q:\dev and call its DoEverything.bat. If you have installed mmpClick , you just have to right-click on the Journey.mmp file and choose Open VC Workspace . Otherwise, the workspace which has been created can be found here:
Q:\epoc32\Build\Dev\Journey\Group\Journey\Wins
Press F5 to run the project and follow the instructions of chapter 2.3.

3.2.5 Useful tips

Menu positioning

Applications you develop will always be added at the bottom right position of the menu in the emulator, so that you have to navigate down every time to run it. You can save much time by moving the icon to the upper left corner – the setting is saved and the icon will always stay in this position. To do this, go to the icon, click the left softkey, choose Move and place it as the first icon in the top left corner.

Memory leaks

If you have a memory leak in your application, it is often difficult to find. The emulator has an important feature that displays an error when you exit your application in the emulator and not all memory has been freed. You can only see this warning when you quit your application and go back to the menu instead of just stopping the process through Visual Studio or closing the emulator window. As it will be easier finding the error right after you made it, it is always better to close the application in the emulator. Otherwise you might see the warning several hours later and have no idea where the memory leak might come from.

Extended error information

When your application crashes, you only get the message "Program Closed". However, both the device and the emulator are capable of displaying an extended error information, which might be useful in some cases. To activate this, you have to create an empty file called ErrRd in epoc32\Wins\c\system\Bootdata . On the device you can make the same empty file in C:\system\Bootdata . If you do not know how to create a file on the device, you can also install ExtendedErr.sis , which can be found at [1].

Enabling syntax highlighting for Symbian OS keywords

The Symbian OS SDK comes with many new keywords and common classes that are not known to the Visual Studio IDE by default. However, by supplying it with a list of user defined keywords, it is possible to have those commands displayed in another color. Not only does this make the code easier to read, it also helps to prevent typing errors.

EMCC Software has provided a file which contains all keywords. Put the file usertype.dat into the same directory as msdev.exe (usually: C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin ) and restart the IDE. By default, those keywords will be displayed in blue, to choose a more discrete color, go to Tools ® Options ® Format ® Colors ® User Defined Keywords and choose a color like dark purple [3].

Displaying strings in the Visual C++ debugger

Due to memory limitations, strings are handled differently in Symbian OS. Therefore, the debugger that is integrated into the Visual Studio IDE does not know the internal structure of Symbian OS descriptors. It does display some information, but the most important thing is missing – the text itself.

Luckily, the IDE can be taught what to display. Open the file called AutoExp.dat in the main directory of your Visual Studio installation (default: C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin ) and copy/paste the text from the SymbianAutoExp.dat file to the end of your AutoExp.dat. After restarting Visual Studio, you will be able to see the contents of descriptors as normal text in the debugging windows [5].


< Simplifying Common Tasks Contents Rich Text Editor Control >
 
       
© 2004 Andreas Jakl. All Rights Reserved.
Privacy Statement | Contact and Imprint
The Journey