What does this error mean ?

Login to reply to this topic.
Sat, 2005-06-04 16:32
Joined: 2005-03-12
Forum posts: 14
Hi,

I am looking to make a text box in helloworldbasic example.For this I have added the following code in helloworldappview.cpp
Code:
CreateWindowL();
TResourceReader reader;
    iCoeEnv->CreateResourceReaderLC(reader, R_HELLOWORLDBASIC_EDWIN);
    iEdwinName = new (ELeave) CEikEdwin;
    iEdwinName->SetContainerWindowL(*this);
    iEdwinName->ConstructFromResourceL(reader);
    CleanupStack::PopAndDestroy();
SizeChanged(aRect);
iEdwinName->SetFocus(ETrue,EDrawNow);//set focus on first editor
SetRect(aRect);
ActivateL();
and here is the resource defination code
Code:
Here's the resource definition in rss

RESOURCE EDWIN r_helloworldbasic_edwin
{
    flags = EAknEditorFlagDefault;
    width = 8;
    lines = 1;
    maxlength = 30;
    allowed_input_modes = EAknEditorAllInputModes;
    default_input_mode = EAknEditorTextInputMode;
    default_case = EAknEditorTextCase;
}

Other than these I ahve also made these two functions
Code:
CCoeControl* CCameraEditorContainer::ComponentControl(TInt aIndex) const
    {
    switch (aIndex)
    {
        case EEdwinName:
            return iEdwinName;
         default:
            return NULL;
        }
    }

And

Code:
TInt CCameraEditorContainer::CountComponentControls() const
    {
    return 1;      //Number of editors
    }

Now whenI compile this on codewarrior I am getting errors in the line "TResourceReader reader;" saying that "ilegal use of Incomplete struct/union/class 'TresourceReader'"

WHAT DOES THIS MEAN ? after this error the cimpiler is giving errors in allmost all the lines of the code that I have added

Regards

Sat, 2005-06-04 16:42
Joined: 2004-02-05
Forum posts: 176
Re: What does this error mean ?
It's more than likely that you have not added the appropriate header file to your source file.  TResourceReader is defined in barsread.h...so you will want to make sure that you include that header file in your source file.

#include <barsread.h>

You will also want to make sure that you add the library to your mmp file or you will have problems again when you link.

library bafl.lib


Sat, 2005-06-04 18:47
Joined: 2005-03-12
Forum posts: 14
Re: What does this error mean ?
Thanks but now it is not giving error in that line but it is still giving errors in the next lines.The immediate error now is in line

iEdwinName = new (ELeave) CEikEdwin;

saying that "Undefined Identifier iEdwinName"
Sun, 2005-06-05 02:25
Joined: 2004-08-26
Forum posts: 34
Re: What does this error mean ?
Have you declared iEdwinName in the header file?

For quality Symbian idling, join #symbian at irc.freenode.net

Thu, 2005-11-24 02:38
Joined: 2005-11-16
Forum posts: 34
Re: What does this error mean ?
Put this line on your header file (e.g. MyAppContainer.h):

Code:
private:
   CEikEdwin* iEdwinName;

That should do the trick.
  • Login to reply to this topic.