The following code generates a runtime error at the iMobilNrEdwin->SetTextL( &str() ); line. Why?
void CTerminalAppContainer::ConstructL(const TRect& aRect)
{
CreateWindowL();
iMobilNrEdwin = new (ELeave) CEikEdwin;
iMobilNrEdwin->SetContainerWindowL( *this );
_LIT(str, "Add tel no here"😉;
iMobilNrEdwin->SetTextL( &str() );
iLabel = new (ELeave) CEikLabel;
iLabel->SetContainerWindowL( *this );
iLabel->SetTextL( _L("Example View"😉 );
SetRect(aRect);
ActivateL();
}
//The call to ConstructL:
void CTerminalAppAppUi::ConstructL()
{
BaseConstructL();
iAppContainer = new (ELeave) CTerminalAppContainer;
iAppContainer->SetMopParent(this);
iAppContainer->ConstructL( ClientRect() );
AddToStackL( iAppContainer );
}