weird repetition

Login to reply to this topic.
Wed, 2005-08-10 14:08
Joined: 2005-08-08
Forum posts: 88
Hello again.

  I have a problem withthe method below. When i press EStdKeyRightArrow it behaves like being pressed twice ( goes trough the EStdKeyRigthArrow case body, returns EKeyWasConsumed and goes again trough the method taking the same case ). The weird thing is that the EStdkeyLeft works fine, goes trough it only once.
Please help me!!!! Please!!



TKeyResponse CBrowse::OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType)
{
   TInt errCode = KErrNone;
   TKeyResponse returnValue = EKeyWasConsumed;
   // handles key events
   switch(aKeyEvent.iScanCode)
      {
      // left arrow means back into the file tree
      case EStdKeyLeftArrow:
         {
         errCode = HandleFileListBackL();

         break;
         }
      // right arrow means forward into the file tree   
      case EStdKeyRightArrow:
         {
         errCode = HandleFileListExpandL();
         break;
         }
      // ok key selects the desired file
      case EStdKeyDevice3:
         {
         HandleFileListSelectL();
         break;
         }
      default:
         {
         returnValue = ComponentControl(0)->OfferKeyEventL(aKeyEvent,aType);
         break;
         }
      }
   
   
   // handling errors
   switch (errCode)
      {
      case KErrNone:
         {
         break;
         }
      case KErrPathNotFound:
         {
         // displays info note
         TBufC<13> notFoundTxt(_L("Impossible to access path!"));
         CAknInformationNote* informationNote;
         informationNote = new ( ELeave ) CAknInformationNote;

         // Show the information Note with
         // textResource
         informationNote->ExecuteLD(notFoundTxt);
         break;
         }
      case KErrNoMemory:
         {   
         // displays info note
         TBufC<13> noMemoryTxt(_L("Memory Full!"));
         CAknInformationNote* informationNote;
         informationNote = new ( ELeave ) CAknInformationNote;

         // Show the information Note with
         // textResource
         informationNote->ExecuteLD(noMemoryTxt);

         // TODO:de scos!!!! si de tratat selectie
         }
         break;
      default:
         {
         break;
         }
      }
   
   return returnValue;
   
}

Wed, 2005-08-10 14:44
Joined: 2004-12-03
Forum posts: 192
Re: weird repetition
hint: aType parameter
Wed, 2005-08-10 16:25
Joined: 2005-08-08
Forum posts: 88
Re: weird repetition
Oh God!
This really helped.
Thx!!
Thu, 2005-08-11 07:38
Joined: 2004-12-03
Forum posts: 192
Re: weird repetition
Smiley
  • Login to reply to this topic.