CEikEdwin and FEP
| Thu, 2003-09-18 16:21 | |
|
Hi, I'm trying to use CEikEdwin from inside a view class derived from CCoeControl and MCoeControlObserver. At the moment, I can't input text - it only shows numbers. Having searched around online it looks as though the FEP isn't being initialized, and the 'Editor' example in the SDK supposedly does it by involving other classes and suchlike. However, before completely restructuring my whole program (it's quite big), I want to understand (a) why the FEP isn't working at the moment, and (b) if it can be made to work properly the way things stand at the moment, without having to move large sections of code around. If the worst comes to the worst and there isn't a cheap fix, which bits need to move and which need to stay? Any advice or insight would be much appreciated - I've been messing around with these example applications and trawling the web trying to find a straightforward fix for this for two days now. :/ Code: void CMyAppView::ConstructL(const TRect& aRect) { CreateWindowL(); SetRect(aRect); TResourceReader reader; iCoeEnv->CreateResourceReaderLC(reader, R_MYPROG_EDWIN); iInput = new(ELeave) CEikEdwin; iInput->SetContainerWindowL(*this); iInput->ConstructFromResourceL(reader); CleanupStack::PopAndDestroy(); // Resource reader //... } void CMyAppView::GetInput() { iInput->SetExtent(TPoint(64, 88), iInput->MinimumSize()); iInput->SetFocus(ETrue); //... } TKeyResponse CBalleramaAppView::OfferKeyEventL( const TKeyEvent& aKeyEvent,TEventCode aType) { return iInput->OfferKeyEventL(aKeyEvent, aType); //... } Gareth Poulton |
|






Forum posts: 67
Are you sure you are not using a nummeric editor? Coz if you are using one then, it will only take nummeric data as input.
Regards,
Ashish Bhatia
Forum posts: 15
Gareth Poulton
Forum posts: 67
Regards,
Ashish Bhatia
Forum posts: 15
{
// flags = EAknEditorFlagDefault;
width = 3;
lines = 1;
maxlength = 3; // 10 in original
default_case = EAknEditorUpperCase;
default_input_mode = EAknEditorTextInputMode;
}
Gareth Poulton
if your problem still exist,
try typing Alt+F (ie alt key and F key) on your Desktop keyboard which will switch On/Off the FEP.
Try this out and the behaviour will toggle between Numeric and Alpha Numeric.
Forum posts: 15
Gareth Poulton
Forum posts: 1
In your case it appears to be that It has strted in numeric mode. In that case you have to press the mode chage button on the device to change the input mode.
Hope it will solve your problem.
Cheers
Amit.
Sr. Software Engineer,
Infozech Software Ltd.
New Delhi.
Have you find any way to get around this problem, without making your view an CAknView?
Forum posts: 2
Did you ever get a resolution for this? I have the identical problem -- in my case, though, I have to derive from a CCoeControl and not involve any of the forms code. What are the steps to manually load and enable the FEP? I tried the straightfoward thing of just doing this on my CCoeEnv:
_LIT(KFrontEndProcessor, "z:system\\fep\\t9fep.fep");
...
// Load the FEP
iEikonEnv->InstallFepL(KFrontEndProcessor)
// Check if it's loaded
CCoeFep* fep = iEikonEnv->Fep();
TUid fepUid = iEikonEnv->FepUid();
...
but that doesn't seem to do the trick. I'm assuming that InstallFepL, if it works, also puts the CCoeControl owned by the FEP (for grabbing and converting input) onto the stack. That's just my guess, though.
Any help would be greatly appreciated -- I'll add the solution to this posting if I come up with it, but I'm hoping someone else out there has already figured it out.
Forum posts: 2
Forum posts: 2
we use a CEikEdwin as a member of our CCoeControl-derived class. After 2 weeks looking for why the FEP is not active with our CEikEdwin, I finally find the problem: the CCoeControl-derived object has to be added to the AppUi control stack and be focused to be able to use the FEP.
I hope this will help every body having problems with this.
Forum posts: 13
i saw the topic at forum of NewLC.com, in the topic "CEikEdwin and FEP",
you said "the CCoeControl-derived object has to be added to the AppUi
control stack and be focused to be able to use the FEP. ".
but i can not understand which code to write.
i has the same problem when write a control liked CEikEdwin: when i
press # key, but the FEP is not can be switch, so i can input number only.
//
...
m_iEdit = new (ELeave) CEikEdwin;
m_iEdit->SetContainerWindowL(*Owner());
m_iEdit->ConstructL( 0, 15, 15, 1 );
m_iEdit->SetExtent(Rect().iTl, m_iEdit->MinimumSize());
m_iEdit->SetEdwinObserver( this );
m_iEdit->SetFocus(ETrue);
...
thanks!