×

Discussion Board

Results 1 to 11 of 11

Thread: Edwin problem

  1. #1
    Regular Contributor
    Join Date
    Oct 2008
    Posts
    91

    Edwin problem

    Hello All,
    I have creted a edwin and have implemented the OfferKeyEventL() method. But my edwin is not accepting text input from the keyboard.

    Am I missing something?

    Please help me.

  2. #2
    Registered User
    Join Date
    Dec 2005
    Posts
    1,236

    Re: Edwin problem

    HI,
    Could you post your code? It would be easier.
    Regards,
    Sriky

  3. #3
    Registered User
    Join Date
    Feb 2006
    Posts
    36

    Re: Edwin problem

    I'm not an expert, but don't you have to cal edwins SetObserver() or sth. simillar ?

    Sorry, obviesly that's not what you need to do. You can check example code:
    http://wiki.forum.nokia.com/index.php/Editor_example

    maybe this :
    iEditor->SetContainerWindowL(*this);
    Last edited by sirtomash; 2008-12-15 at 11:03.

  4. #4
    Regular Contributor
    Join Date
    Oct 2008
    Posts
    91

    Re: Edwin problem

    Hi, following is my code included in ConstrucL():

    iEdwin = new (ELeave) CEikEdwin;
    iEdwin->SetContainerWindowL(*this);
    TResourceReader reader;
    iCoeEnv->CreateResourceReaderLC(reader, R_SEARCH_EDWIN);
    iEdwin->ConstructFromResourceL(reader);
    CleanupStack::PopAndDestroy(); // reader
    TInt width = aRect.Width()-20;
    TInt height= aRect.Height()-30;
    iEdwin->SetExtent( TPoint(5,height), TSize(width,20) );
    iEdwin->SetFocus(ETrue);
    iEdwin->SetObserver(this);
    SizeChanged();




    TKeyResponse CBackupContactsContainer::OfferKeyEventL( const TKeyEvent& aKeyEvent,
    TEventCode aType )
    {
    if ( aType != EEventKey )
    {
    return EKeyWasNotConsumed;
    }
    if ( iListBox )
    {
    return iListBox->OfferKeyEventL( aKeyEvent, aType );
    }
    if(iEdwin)
    {
    return iEdwin->OfferKeyEventL( aKeyEvent, aType );
    }


    return EKeyWasNotConsumed;

    }

    RESOURCE EDWIN r_search_edwin
    {

    width = 5;

    lines = 1;

    maxlength = 20;

    flags = EEikEdwinWidthInPixels;

    avkon_flags = EAknEditorFlagNoT9;

    allowed_input_modes = EAknEditorTextInputMode | EAknEditorNumericInputMode;

    }

    What may possibly be going wrong?

  5. #5
    Super Contributor
    Join Date
    Jul 2007
    Posts
    596

    Re: Edwin problem

    Quote Originally Posted by ash_leo View Post
    Hello All,
    I have creted a edwin and have implemented the OfferKeyEventL() method. But my edwin is not accepting text input from the keyboard.

    Am I missing something?

    Please help me.
    be sure to add ur edwin control to control stack . Otherwise u can not receive any key event in ur offerkeyevent method.


    Thanks

  6. #6
    Regular Contributor
    Join Date
    Oct 2008
    Posts
    91

    Re: Edwin problem

    Yes I have implemented the following methods:

    TInt CBackupContactsContainer::CountComponentControls() const
    {
    return 2;
    }

    // ---------------------------------------------------------
    // CBackupContactsContainer::ComponentControl(TInt aIndex) const
    // ---------------------------------------------------------
    //
    CCoeControl* CBackupContactsContainer::ComponentControl(TInt aIndex) const
    {
    switch ( aIndex )
    {
    case 0:
    if ( iListBox )
    {
    return iListBox;
    }
    break;
    case 1:
    if(iEdwin)
    {
    return iEdwin;
    }
    break;
    default:
    return NULL;
    }

    Is there still somrthing remaining?

  7. #7
    Super Contributor
    Join Date
    Jul 2007
    Posts
    596

    Re: Edwin problem

    But where have u added this control to control stack

    for exp: ur appui::AddToStackL(ur control).

    Thanks

  8. #8
    Regular Contributor
    Join Date
    Oct 2008
    Posts
    91

    Re: Edwin problem

    Hi,
    I had not done that. even adding to the control stack is not helping much.
    What else can be done?
    Last edited by ash_leo; 2008-12-15 at 12:04.

  9. #9
    Super Contributor
    Join Date
    Jul 2007
    Posts
    596

    Re: Edwin problem

    but i don't think u have to do any special for that. it simply like u uses other controls. (u might do some mistatkes)Any way search in wiki using keywords CEikedwin. otherwise give ur mail id i(if there is no pb) i can send u a sample code snippet.

    Thanks

  10. #10
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,689

    Re: Edwin problem

    What does your listbox do in the meantime? You may consider commenting that listbox temporarily.

  11. #11
    Regular Contributor
    Join Date
    Oct 2008
    Posts
    91

    Re: Edwin problem

    Hi,
    That's exactly the problem.The edwin is not accepting text because of the listbox.
    Commenting the listbox makes everything work well...
    so how should I handle this , keeping the ListBox in place?

    Also I have a waitnote. even after it is stopped it's text keeps getting displayed and gets mixed with the edwin. how do I clear it?

Similar Threads

  1. Replies: 3
    Last Post: 2008-03-24, 05:16
  2. netcards - Problem with opening adapter
    By kernj in forum Symbian Tools & SDKs
    Replies: 5
    Last Post: 2007-01-10, 08:56
  3. Problem: S60 SDK for CW in PC with .NET
    By anttij in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 1
    Last Post: 2005-02-28, 11:36
  4. About 6230 Bt Problem
    By eerkek in forum Bluetooth Technology
    Replies: 17
    Last Post: 2005-02-08, 12:33
  5. 7210 Silent Problem
    By MarkMckim in forum Mobile Java General
    Replies: 1
    Last Post: 2003-03-18, 12:36

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×