S60 应用程序 - Symbian C++ - 退出按钮不起作用

发布于 2024-07-09 12:00:58 字数 159 浏览 7 评论 0原文

在我的 Symbian S60 应用程序中,我的选项菜单按预期工作。 但退出按钮没有任何作用。

我正在使用 Carbide 进行开发,并使用 UI 设计器将项目添加到选项菜单中。

有谁知道如何启用退出按钮,或者为什么它可能不起作用?

谢谢!

In my Symbian S60 application, my Options menu works as expected. But the Exit button does nothing.

I am developing with Carbide and have used the UI Designer to add items to the options menu.

Does anyone know how to enable the exit button, or why else it might not work?

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

岁月打碎记忆 2024-07-16 12:00:58

您是否正在处理(在 appui::HandleCommandL 中)命令 ID EEikCmdExitEAknSoftkeyExit?

    if ( aCommand == EAknSoftkeyExit || aCommand == EEikCmdExit )
        {
        Exit();
        }

Are you handling (in your appui::HandleCommandL) command ids EEikCmdExit and EAknSoftkeyExit?

    if ( aCommand == EAknSoftkeyExit || aCommand == EEikCmdExit )
        {
        Exit();
        }
椵侞 2024-07-16 12:00:58

您是否查看过应用程序的 AppUi 类的 HandleCommandL( TInt aCommand ) 方法? 例如,在我使用 Carbide 创建的所有 UI 项目中,以下内容会自动出现在 HandleCommandL() 方法中:

void MyAppUi::HandleCommandL( TInt aCommand )
{
    TBool commandHandled = False;
    switch ( aCommand )
    {
        default:
            break;
    }

    if ( !commandHandled )
    {
        if ( aCommand == EAknSoftkeyExit || aCommand == EEikCmdExit )
        {
            Exit();
        }
     }
}

Have you looked inside the HandleCommandL( TInt aCommand ) method of the AppUi class of your application? For example, in all UI projects I create with Carbide, the following is automatically present inside the HandleCommandL() method:

void MyAppUi::HandleCommandL( TInt aCommand )
{
    TBool commandHandled = False;
    switch ( aCommand )
    {
        default:
            break;
    }

    if ( !commandHandled )
    {
        if ( aCommand == EAknSoftkeyExit || aCommand == EEikCmdExit )
        {
            Exit();
        }
     }
}
才能让你更想念 2024-07-16 12:00:58

您使用什么 CBA 资源(软键按钮布局)? R_AVKON_OPTIONS_EXIT? 您是否以其他方式处理退出命令? 或者您是否正在捕获 Exit() 调用? 您是否收到了 EEikCmdExit 代码? 如果您有 commandHandled 布尔值< /a>,是否设置为EFalse

What CBA resource (softkey buttons layour) are you using? R_AVKON_OPTIONS_EXIT? are you handling the the exit commands in any other way? or are you traping the Exit() call? Are you even receiving the the EEikCmdExit code? If you have the commandHandled boolean, is it set to EFalse?

所谓喜欢 2024-07-16 12:00:58

命令正在我的主视图中处理,

所以我将其更改为这样......

void CMyContainerView::HandleCommandL( TInt aCommand )
    {

    TBool commandHandled = EFalse;
    switch ( aCommand )
        {   
                // ...
        default:
            break;
        }


    if ( !commandHandled ) 
        {
            AppUi()->HandleCommandL(aCommand);
        }


    }

谢谢大家:)

Commands were being handled in my main view

So I changed it to this...

void CMyContainerView::HandleCommandL( TInt aCommand )
    {

    TBool commandHandled = EFalse;
    switch ( aCommand )
        {   
                // ...
        default:
            break;
        }


    if ( !commandHandled ) 
        {
            AppUi()->HandleCommandL(aCommand);
        }


    }

Thanks all :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文