BaseConstructL();//在此行处出现问题,运行到这的时候模拟器自动关闭USER23

necomer_C 2007-08-08 10:33:26
BaseConstructL();//在此行处出现问题,运行到这的时候模拟器自动关闭USER23

void CPlayGameAppUi::ConstructL(void) {
// Load the application resources defined in the PlayGame.rss, e.g.
// application menus, dialogs etc.
BaseConstructL();//在此行处出现问题,运行到这的时候模拟器自动关闭USER23

iAppContainer = new (ELeave) CPlayGameContainer;
iAppContainer->SetMopParent( this );
iAppContainer->ConstructL( ClientRect() );
AddToStackL( iAppContainer );

//iPlayerName = NULL;
}

我觉得是在资源文件中出现问题,
.rss中部分代码

RESOURCE DIALOG r_simpledlg_player_name_dialog {
flags = EEikDialogFlagNoDrag | EEikDialogFlagCbaButtons | EEikDialogFlagWait;
buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
items =
{
DLG_LINE
{
id = EConfirmationNoteDlgCIdPlayerName;
type = EEikCtLabel;
control = LABEL
{
};
},

DLG_LINE
{
id = EConfirmationNoteDlgCIdPlayerNameEditor;
type = EEikCtEdwin;
control = EDWIN
{
maxlength = 12 ;
};
}
};
}

是不是maxlength所设的长度有问题,但是TBuf16<16> str;这个的长度大于12阿,怎么还会出现问题呢?
void CPlayGameAppUi::HandleCommandL(TInt aCommand) {

switch (aCommand)
{
case ESimpleDlgNewGame:
{
TBuf16<16> str;
if (CSimpleDlgPlayerNameDialog::RunDlgLD(str))
{
StartNewGameL();
}
break;
}

case EAknSoftkeyBack:
case EEikCmdExit:
{
Exit();
break;
}
default:
break;
}
}

究竟是什么原因引起的错误阿??
...全文
175 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
wzyi524 2007-08-08
  • 打赏
  • 举报
回复
This panic is raised when any operation that moves or copies data to an 8 bit variant descriptor, causes the length of that descriptor to exceed its maximum length.
Juncof 2007-08-08
  • 打赏
  • 举报
回复
是不是maxlength所设的长度有问题,但是TBuf16<16> str;这个的长度大于12阿,怎么还会出现问题呢?

3,119

社区成员

发帖
与我相关
我的任务
社区描述
塞班系统(Symbian系统)是塞班公司为手机而设计的操作系统,它的前身是英国宝意昂公司的 EP ( Electronic Piece of cheese)操作系统。
社区管理员
  • Symbian社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧