×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Feb 2008
    Posts
    20

    undefined identifier TKeyResponse

    Hi,

    I´m new to Symbian c++ programming and that´s my first post. I´m trying to display and switch between tabs in the navigation pane. The problem is with TKeyResponse, i´m trying to use HandleKeyEventL but the compiler says: undefined identifier 'TKeyResponse'.

    My SDK is 3RD FP2. The header coecntrl.h is included and my class extends CCoeControl. Is there any lib i have to link?

    thanks

  2. #2
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: undefined identifier TKeyResponse

    you should be including coedef.h

  3. #3
    Registered User
    Join Date
    Feb 2008
    Posts
    20

    Re: undefined identifier TKeyResponse

    Quote Originally Posted by skumar_rao View Post
    you should be including coedef.h
    It´s already included, but still get the same error. Do u have any more suggestions?? thanks

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,738

    Re: undefined identifier TKeyResponse

    Show your code around the problematic line.

  5. #5
    Registered User
    Join Date
    Feb 2008
    Posts
    20

    Re: undefined identifier TKeyResponse

    Getting undefined indentifier on line (TKeyResponse....):

    Code:
    // INCLUDES
    #include <aknappui.h>
    #include <coedef.h>
    // FORWARD DECLARATIONS
    class CHellWorldUiAppView;
    
    class CHellWorldUiAppUi : public CAknAppUi
    	{
    public:
    	// Constructors and destructor
    
    	/**
    	 * ConstructL.
    	 * 2nd phase constructor.
    	 */
    	void ConstructL();
    	TKeyResponse HandleKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);

  6. #6
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,738

    Re: undefined identifier TKeyResponse

    That is strange indeed.
    In fact #include-ing aknappui.h should be enough since
    Quote Originally Posted by aknappui.h
    #include <eikappui.h>
    Quote Originally Posted by eikappui.h
    #include <coeaui.h>
    Quote Originally Posted by coeaui.h
    #include <coedef.h>
    and
    Quote Originally Posted by coedef.h
    enum TKeyResponse
    {
    /** The key event was not handled. */
    EKeyWasNotConsumed,
    /** The key event was handled. */
    EKeyWasConsumed
    };
    Unfortunately I can not check it with an FP2 SDK, the quotes are from MR.
    Can you show the beginning of your AppUi.cpp (where you #include the header declaring CHellWorldUiAppUi)?

    In fact there should be 'stock' examples using TKeyResponse, can you check if the Chat example (I guess it is also present in S60 3rd FP2) builds correctly?

  7. #7
    Registered User
    Join Date
    Feb 2008
    Posts
    20

    Re: undefined identifier TKeyResponse

    There was something wrog with my project. Chat example builds correctly, so i started a new project to use TKeyResponse and its working. thanks

Similar Threads

  1. i cant build helloworld project
    By akhin in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 2
    Last Post: 2008-12-22, 12:38
  2. carbidec++ helloworld project problem
    By akhin in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 0
    Last Post: 2007-03-11, 12:40
  3. Replies: 3
    Last Post: 2007-01-18, 11:27
  4. carbide build problem help please
    By berkcekisbas in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 1
    Last Post: 2006-09-26, 19:41
  5. Whats missing?
    By imrank in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2006-08-28, 07:22

Posting Permissions

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