TResourceReader gives CONE 14
Login to reply to this topic.
Mon, 2004-12-13 22:36
Joined: 2004-09-06
Forum posts: 348
The following code gives me a CONE 14 panic ("Environment cannot find the specified resource in any resource file"). However, the resource surely exists and is as below:

Code:
   CreateWindowL();

iListBox = new(ELeave) CAknSingleStyleListBox();
iListBox->SetContainerWindowL(*this);
iListBox->SetMopParent(this);

TResourceReader reader;
CEikonEnv::Static()->CreateResourceReaderLC(reader, R_INITIAL_SELECTION_LIST);
iListBox->ConstructFromResourceL(reader);//CONE 14 HERE!!!!! WHY???????????????????????
CleanupStack::PopAndDestroy();

resource:

RESOURCE LISTBOX r_initial_selection_list
   {
   array_id = r_initial_selection_array;
   flags = EAknListBoxSelectionList;
   }

RESOURCE ARRAY r_initial_selection_array
   {
   items =
       {
       LBUF
           {
           txt = qtn_initial_option_get_address;
           },
       LBUF
           {
           txt = qtn_initial_option_get_addresses;
           },
       LBUF
           {
           txt = qtn_initial_option_get_operator;
           }
       };
   }

#define qtn_initial_option_get_address "\tHämta adress\t\t"
#define qtn_initial_option_get_addresses "\tUppdatera adressbok\t\t"
#define qtn_initial_option_get_operator "\tVälj operatör\t\t"

Tue, 2004-12-14 08:15
Joined: 2004-12-03
Forum posts: 191
if you defined resource in another rss-file, don't forget to add it by calling
iEikonEnv->AddResourceFileL(rscfile);
Tue, 2004-12-14 09:46
Joined: 2004-01-06
Forum posts: 18
Have you writed your own resource definitions after these three resources?

RESOURCE RSS_SIGNATURE { }

RESOURCE TBUF { buf=""; }

RESOURCE EIK_APP_INFO
   {
   }
Tue, 2004-12-14 09:53
Joined: 2004-09-06
Forum posts: 348
Thanks guys,

I have done all this. However, I did a "abld reallyclean" and then rebuild it and then it worked. Strange...
Tue, 2004-12-14 09:54
Joined: 2004-12-03
Forum posts: 191

copyright 2003-2009 NewLC SARL