×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Sep 2004
    Location
    china
    Posts
    11

    beginner's question

    Hi,
    I'm new to the Symbian C++ development.I have installed Series 60 SDK 2.1 for Symbian OS Supporting Microsoft C++.NET, i know litte about symbian os, now i am reading the helloworldbasic example. in the helloworldbasic.rss, there's a paragraph as follows:
    RESOURCE MENU_PANE r_helloworldbasic_menu
    {
    items =
    {
    MENU_ITEM
    {
    command = EHelloWorldBasicCommand1;
    txt = "Hello";
    },
    MENU_ITEM
    {
    command = EAknSoftkeyExit;
    txt = "Exit";
    }
    };
    }
    1. what's the meaning of r_helloworldbasic_menu? is it the name of resource? where is it defined?
    2.what's the meaning of EHelloWorldBasicCommand1 or EAknSoftkeyExit ?where are they defined?
    3.where and how to use this resource?
    4. as a beginner,how to learn symbian os?
    THANK U VERY MUCH!!

  2. #2
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,359
    "1. what's the meaning of r_helloworldbasic_menu? is it the name of resource? where is it defined?"

    r_helloworldbasic_menu is a resource of type MENU_PANE. The MENU_PANE resource structure is defined in %EPOCROOT%\Epoc32\include\<uikon.rh>

    "2.what's the meaning of EHelloWorldBasicCommand1 or EAknSoftkeyExit ?where are they defined?"

    These two are enum values that you should intercept and handle in C<APPNAME>AppUi::HandleCommandL(TInt aCommandId).
    When you select "Hello" in your app's menu HandleCommandL(HelloWorldBasicCommand1) is called.

    HelloWorldBasicCommand1 is a developer defined value. You will find it in <APPNAME>.hrh in your project's files.

    EAknSoftkeyExit is a system value defined in .... just search for it in %EPOCROOT%\Epoc32\include\


    "3.where and how to use this resource?"

    You don't really need to do anything with it in the begining ... aventualy add some commands to it. In time you will learn to work with multiple such resources and do all kind of magic things :-)


    "4. as a beginner,how to learn symbian os?"

    The usual way: make many mistakes and learn from them :-)
    A book would help, but there are plenty documents and examples here on Forum Nokia.
    Last edited by ltomuta; 2006-10-14 at 19:26.

  3. #3
    Registered User
    Join Date
    Sep 2004
    Location
    china
    Posts
    11
    Thank you!


    shanglinhu
    Last edited by shanglinhu; 2004-11-14 at 13:09.

  4. #4
    Registered User
    Join Date
    Jan 2006
    Location
    Zurich, Switzerland
    Posts
    28

    Re: beginner's question

    Hi Itomuta


    Can you help me? I would like to find out how I can add my own command to a menu...
    Cheers,
    Gloria

  5. #5
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,345

    Smile Re: beginner's question

    Hello Gloria,

    You can learn by reading some docs in the SDK installation path. And you can search the same on Forum Nokia itself.

    Anyways following are few steps and you would find your own command in Options:
    Assuming that your project name is: test
    1) Open your .hrh file.
    2)
    Code:
    enum TtestCommandIds
        {
        EtestCmdAppTest = 1, // Assume that this is default by application
        EtestCmdAppOwn = 2 //Add this line to add yr own command and so on...
        };
    3) Open yr .LOC file.
    Add string for yr own commnad:
    Like: #define qtn_appl_own "MyOwnCommand"
    4) Open yr .rss file.
    Code:
    RESOURCE MENU_PANE r_test_menu
        {
        items =
            {
            MENU_ITEM { command = EtestCmdAppTest; txt = qtn_appl_test; },
            MENU_ITEM { command = EtestCmdAppOwn; txt = qtn_appl_own; }, //add this line for your own command
            MENU_ITEM { command = EAknCmdExit; txt = qtn_appl_exit; }
            };
        }
    5) By doing above steps, you can see your own command. And to handle the command, it's a different story.

    Regards.
    Kiran.
    Last edited by kiran10182; 2006-10-14 at 17:55.

Posting Permissions

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