Carbide.c++ is Nokia's IDE for developing application on various platforms, like Symbian C++, Open C/C++, Qt for S60, etc. Symbian C++ development has really become easy (to good extent) after the invent of the IDEs. Carbide.c++ comes with a unique tool called as UI designer, allowing faster prototyping and deployment. This tutorial mainly deals with UI designer and it can be followed on all editions of Carbide.C++.
The tutorial is basically a hello world example. It will be demonstrated all the steps necessary to develop a helloword GUI based Symbian C++ application and how to use UI designer. The example code is also available here.
This tutorial assumes that S60 SDK and Carbide.c++ is already installed and setup. Check here for more information.
1) Start with a new Symbian C++ project using file menu of carbide c++. 2) Next select GUI application with UI designer as an option on next screen as shown in screenshot.
This step enables the GUI editor for the project.
Next enter the desired name of project. As a basic user, select the default location.
Once you get some expertise you can select any other workspace. Basically carbide.c++ manages the projects using workspaces. Workspace is a collection of projects. One can group relevant projects in one workspace. In carbide it is possible to switch between multiple workspaces. One can set the default location and can explore more there.
In the next step, the wizard asks to select the build configurations to be added for the project. Usually, by default, all the configurations are selected.
For this project and for most of the projects, Emulator debug (WINSCW) and one Phone release configuration is required.
Once this is confirmed click on next.
In the next step, you will be prompted to enter few application properties.
Enter the application name here as Helloworld. You can keep rest of the things as default.
In the next step, the wizard prompts to select a view type for the application.
For our application select an empty container as we will not have any control in it.
The next step involves naming the container class and the type of the class, as shown in figure.
One more important thing that is selected in this step is the support for view switching ability.
In the next step, we will need to input some more information like UID .
If you are not aware of these concepts you can leave the defaults and go to next step.
Accept default suggestion for directories in the next step. Finish the wizard by clicking the finish button.
Now we will have the UI designer window which showcases the application window in it.
Double click the title of the application window and change it to Helloworld or anything else that you wish.
Now following these steps, you can run your first Helloworld application.
1) Go to Project Explorer window right click your own project name. 2) From the popup menu select the Build Project option.
If everything goes well you will have no errors in bottom output window.
Once the build is successful, run the application with the help of pop up menu. To get the popup, right click on the project as show in the figure.
One this is done, Carbide launches the emulator and the application is started in the emulator.
The application usually starts in the emulator (S60 3rd FP2 onwards), once run option is selected. If not then it can be started manually from installation menu in the emulator. When you start to run the application it asks for the process to run make sure that it is name of the process is the one which we want to run.
The output can be observed in the emulator.
Now we have the basic Symbian C++ helloworld application running, doing nothing great.
1) Further, click on options menu in the bottom window. It will bring up the menu in the main application window.
2) Next, in the menu type down the name as shown in figure.
This will add a new menu option to the "Option" menu.
3) Next, right click on the menu option itself and a pop will appear. 4) From this pop up select the option called "Handle Selected Event".
This should bring up the code window, where you can edit the code for the event. This is basically a method which will get called when the menu will be selected.
5) In the event handler function/method type down the code from the screenshot.
6) Now, save the file and run the application the way described above.
This should give the output as below.
This way, a basic helloworld application can be developed using Carbide c++. Few steps are unnecessary in the wizard but sometimes they turn to be useful. Following the same steps one can develop his own application. This tutorial can be followed by any person with minimal knowledge of Symbian. But for further things a good tutorial on Symbian C++ is necessary.
File:Carbid tut1 Helloworld.zip
No related wiki articles found