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

Problem updating text of CEikLabel in runtime

0 replies · 2,866 views · Started 30 January 2007

Hi,

Please excuse me :frown: , i have a small problem in updating a label's text in runtime.

I have a label which has been created in Container's constructL method and has a text set by SetTextL method in that. Now I am changing the the text of that label using SetTextL and then i have called DrawNow() method of container... but my program closes immediately when comes to these lines of code.

I need to change the text from another class... here the phone class. So I made the label public in container to access from phone class... and my phone class is creating view class ( and view class then creates container class). So I am doing the changes using the following code:-


iAppView2 ->iContainer ->iLabelPhone ->SetTextL (_L("121212112"😉);//iAppView2 ->iContainer ->KPhoneNumber);
//CWindowGc::Activate()
iAppView2 ->iContainer ->SizeChanged ();
//iAppView2 ->iContainer ->iLabelPhone ->ActivateContext (
iAppView2 ->iContainer ->DrawNow();

The problem lies in the SetTextL . If I comment out those two lines ( so my purpose is gone ! ) my app runs fine without updating the label.

Could anybody give some kind idea to share ? Please help if know any information about that .

Thanks in Advance, :icon14:
Tushar