×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Super Contributor
    Join Date
    Mar 2003
    Posts
    2,426

    How to change cba buttons dynamically

    Hi all,

    I have to do an application which needs to change cba buttons dynamically.
    That is, at the beginning the app starts with only one button available in the cba ('Start' for instance); when this button is pressed, some things are showed in the view and some more buttons have to be showed in the cba implementing the operation to be performed on that view.
    In general what I would like to know is how it is possible to update dynamically the cba buttons from a CCoeControl according to what is showed in the application area.

    Do you have any idea of how to do it?

    Any suggestion would be really appreciated. Thanks in advance.

    Posted by Michele Boccaccio, soluzioni@comunicandospa.com
    on January 29, 2002 at 11:51

  2. #2
    Super Contributor
    Join Date
    Mar 2003
    Posts
    2,426

    RE: How to change cba buttons dynamically

    Posted by Andy Taylor, andyt@endtoend.co.uk
    on January 29, 2002 at 12:01



    Hi Michele

    Get a pointer to the Cba container then use SetCommandL() as follows:-

    CEikButtonGroupContainer * pCbaGroup = CEikButtonGroupContainer::Current();

    pCbaGroup->SetCommandL(0, EJobStatus0,_L("Accept"));

    If you use this in Your HandleComandL() then you can change the Label when
    the button is pressed.

    Hope this helps

    Andy T

  3. #3
    Registered User
    Join Date
    Jan 2004
    Posts
    23
    I try to test your method, however, I met some trouble when using the class CEikButtonGroupContainer

    I just use the code in HandleCommandL(), but I cannot build my app successfully,
    the VC6 compiler told me:
    ****************************************************
    Generating Code...
    Doing first-stage link by name
    link.exe @C:\TEMP\nma00092.
    Creating library \Symbian\6.0\NokiaCPP\EPOC32\BUILD\SYMBIAN\6.0\NOKIACPP\EPOC32EX\CRYSTALUI\MYAPPTEST\MYAPPTEST\WINS\UDEB\MYAPPTEST.lib and object \Symbian\6.0\NokiaCPP\EPOC32\BUILD\SYMBIAN\6.0\NOKIACPP\EPOC32EX\CRYSTALUI\MYAPPTEST\MYAPPTEST\WINS
    \UDEB\MYAPPTEST.exp
    MYAPPTESTAPPUI.obj : error LNK2001: unresolved external symbol "public: static class CEikButtonGroupContainer * __cdecl CEikButtonGroupContainer::Current(void)" (?Current@CEikButtonGroupContainer@@SAPAV1@XZ)
    \Symbian\6.0\NokiaCPP\EPOC32\BUILD\SYMBIAN\6.0\NOKIACPP\EPOC32EX\CRYSTALUI\MYAPPTEST\MYAPPTEST\WINS\UDEB\MYAPPTEST.APP : fatal error LNK1120: 1 unresolved externals
    NMAKE : fatal error U1077: 'link.exe' : return code '0x460'
    Stop.
    if exist "\Symbian\6.0\NokiaCPP\EPOC32\BUILD\SYMBIAN\6.0\NOKIACPP\EPOC32EX\CRYSTALUI\MYAPPTEST\MYAPPTEST\WINS\UDEB\MYAPPTEST.exp" del "\Symbian\6.0\NokiaCPP\EPOC32\BUILD\SYMBIAN\6.0\NOKIACPP\EPOC32EX\CRYSTALUI\MYAPPTEST\MYAPPTEST\WINS\UDEB\MYAPPTES
    T.exp"
    Stopped the build by removing the export object,
    if present, because the pre-link stage failed
    Linking...
    LINK : fatal error LNK1104: cannot open file "\Symbian\6.0\NokiaCPP\EPOC32\BUILD\SYMBIAN\6.0\NOKIACPP\EPOC32EX\CRYSTALUI\MYAPPTEST\MYAPPTEST\WINS\UDEB\MYAPPTEST.exp"
    Error executing link.exe.

    MYAPPTEST.APP - 4 error(s), 0 warning(s)
    ****************************************************

    I just don't know why??

  4. #4
    Nokia Developer Expert
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,142
    in case you would have used the search box provided in this forum, you propably would have find the answer already, but for one more time:

    the "unresolved external "error means that you have used a class (or function ) in your applications that can be found from the header files included, but the physical implementation of it can not be found.

    To fix it, find the library where the class/function is implemented and add it to your mmp file, and Re-build the Work Space.

    yucca

  5. #5
    Registered User
    Join Date
    Jan 2004
    Posts
    23
    Thanks yucca,

    I fixed the problem...

Posting Permissions

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