text editor

Login to reply to this topic.
Fri, 2008-07-04 07:43
Joined: 2008-06-27
Forum posts: 23

hi..i m making an app with 3 containers n 3 views n 3 tabs....in first view i want a text editor..in which i an write text n store it to a file
at particular location. i have already added resource or text editor...the resorces r as

RESOURCE EDWIN r_plaintexteditor_editor
{
width = KWidth;
lines = KLines;
maxlength = KMaxLength;
flags = EEikEdwinWidthInPixels;
avkon_flags = EAknEditorFlagNoT9;
default_case = EAknEditorLowerCase;
allowed_case_modes = EAknEditorUpperCase |
EAknEditorLowerCase;
numeric_keymap = EAknEditorPlainNumberModeKeymap;
allowed_input_modes = EAknEditorTextInputMode |
EAknEditorNumericInputMode;
default_input_mode = EAknEditorTextInputMode;
special_character_table = R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG;
}

then i called contructL in container.cpp
void CMultiViewsContainer1::ConstructL(const TRect& aRect)
{
CreateWindowL();



iEditor = new (ELeave) CEikEdwin;
iEditor->SetContainerWindowL(*this);
TResourceReader reader;
iCoeEnv->CreateResourceReaderLC(reader, R_PLAINTEXTEDITOR_EDITOR);
iEditor->ConstructFromResourceL(reader);
CleanupStack::PopAndDestroy(); // reader
iEditor->SetFocus(ETrue);

SetRect(aRect);
ActivateL();
}included all headers n libs..but still getting a error
"undefined identifier R_PLAINTEXTEDITOR_EDITOR in container.cpp"
plzzz help me thanx in advance m a debutante in symbian


Fri, 2008-07-04 08:08
Joined: 2005-11-20
Forum posts: 1210
Re: text editor

You have to #include the .rsg file for the constants from the .rss to become known in your code.


René Brunner

Fri, 2008-07-04 08:22
Joined: 2008-06-27
Forum posts: 23
Re: text editor

which .rsg file i should inlude n where plzz tell me

Fri, 2008-07-04 08:32
Joined: 2008-06-27
Forum posts: 23
Re: text editor

thanx a lot rbrunner.....i have included it n it compiled successfully....but when i running it on emulator app is not opening a error code is coming
KERN-EXEC 3........plzz tell me something abt this

Fri, 2008-07-04 08:44
Joined: 2005-11-20
Forum posts: 1210
Re: text editor

Well, just debug the thing and see where the exception occurs. Without knowing that you won't get further. And if you do not yet know how to debug, then *now* is the time to learn it, because knowing how to debug with the help of the emulator is, if you ask me, an absolute must for programming on Symbian.

Don't leave home without your debugger Smiling


René Brunner

Fri, 2008-07-04 12:26
Joined: 2008-06-27
Forum posts: 23
Re: text editor

thank you Rene....or guiding me ..i debugged n found where it crashes....ur advice was valuable.. Smiling ...now my app is running successfully...

take care

  • Login to reply to this topic.