I get "Unidentified identifier" when I try to load resources with ConstructFromResourceL. I have searched for the solution for this problem and the advice was to include the RSG file. I tried to do this, but then I get the error "can not open file". It seems like no RSG file is produced, I can't find it in the epoc32/include directory. What can I do to solve this problem? Here is the code from the cpp file:
/*
============================================================================
Name : PolarLotusVisual.rss
Author : EA
Copyright : Mobile Visuals
Description : This file contains all the resources for the PolarLotusVisual.
============================================================================
*/
// RESOURCE IDENTIFIER
NAME POLA // 4 letter ID
// INCLUDES
#include
#include
#include
#include
#include "PolarLotusVisual.hrh"
#include "PolarLotusVisual.rls"
// RESOURCE DEFINITIONS
// -----------------------------------------------------------------------------
//
// Define the resource file signature
// This resource should be empty.
//
// -----------------------------------------------------------------------------
//
RESOURCE RSS_SIGNATURE
{
}
// -----------------------------------------------------------------------------
//
// r_menu
// Menu for "Options"
//
// -----------------------------------------------------------------------------
//
RESOURCE MENU_PANE r_menu
{
items =
{
// added the new Options menu command here
You must write the resource names in small letters, not capital lettes. The resource compiler generates the rsg file and there the resource id's are in caps. Then you use those in code.
Also,
* Have you checked if the resource compilation succeeds? If not, the rsg file is not generated.
* Have you included the rsg file with < and >, not with " and "?
Thanks, that solved the problem with the compliation! Small characters in rss file and big in cpp file, I will remember that.
But I can still not run it in the emulator because it crashes before the program starts in the emulator. Do you know why this happens? Since it's caused by the iSettingItemList->ConstructFromResourceL(R_POLARLOTUSVISUAL_SETTING_ITEM_LIST);
call, maybe it's because the resource is constructed at the wrong place in the application?
Forum posts: 822
You must write the resource names in small letters, not capital lettes. The resource compiler generates the rsg file and there the resource id's are in caps. Then you use those in code.
Also,
* Have you checked if the resource compilation succeeds? If not, the rsg file is not generated.
* Have you included the rsg file with < and >, not with " and "?
Forum posts: 77
Thanks, that solved the problem with the compliation! Small characters in rss file and big in cpp file, I will remember that.
But I can still not run it in the emulator because it crashes before the program starts in the emulator. Do you know why this happens? Since it's caused by the iSettingItemList->ConstructFromResourceL(R_POLARLOTUSVISUAL_SETTING_ITEM_LIST);
call, maybe it's because the resource is constructed at the wrong place in the application?
Forum posts: 77
I managed to get this towork now....