Read-only archive of the All About Symbian forum (2001–2013) · About this archive

Symbian dialog label control crash

0 replies · 1,875 views · Started 10 April 2006

Hello all.
I want to create simple dialog with label and edit control.
rss file contains following code
RESOURCE FORM r_pisafe_query_form
{
flags = EEikFormUseDoubleSpacedFormat;
items =
{
DLG_LINE
{
type = EEikCtLabel;
id = EQRQueryDlgLabelID;
control = LABEL
{
};
},
DLG_LINE
{
type = EEikCtEdwin;
prompt = qtn_sms_prompt_message;
id = EQRQueryDlgTextID;
control = EDWIN
{
maxlength = EQRMaxUIDLength;
default_input_mode = EAknEditorTextInputMode;
};
}
};
}

implementation of Dialog is very simple.
class CModAknQueryDialog : public CEikDialog
{
public: // Constructors and destructor
CModAknQueryDialog();

void PreLayoutDynInitL();

TBool OkToExitL( TInt aButtonId );
};

CModAknQueryDialog::CModAknQueryDialog()
{
}

void CModAknQueryDialog::PreLayoutDynInitL()
{
SetEditableL( ETrue );
}

TBool CModAknQueryDialog::OkToExitL( TInt /*aButtonId*/ )
{
return ETrue;
}

I try to use this class in simple way.
CModAknQueryDialog* dialog = new (ELeave) CModAknQueryDialog();

dialog->ExecuteLD(R_PISAFE_QUERY); I got exception in this code.
But when i delete Label control from rss file it is Ok.
Where am i wrong? Please help