Thanks for this code, but maybe do you know why I receive errors associate with function TCallBack(..):
ERROR: no matching function for call to 'TCallBack::TCallBack (TInt (CClientBTAppUi:(TAny *), CCLientBTAppUi *)'
ERROR: candidates are: TCallBack::TCallBack(const TCallBack &) e32std.h
Forum posts: 51
Hi,
I can catch your mind.
if you want to call a view::HandleCommandL, you can pass a pointor to this view into time object, then call the procedure via the pointor
Hope this answer is for your satisfaction.
Forum posts: 1197
And for timer, the quickest is probably to use CPeriodic, along these lines;
//construct iTimer = CPeriodic::NewL(CActive::EPriorityStandard); [...] //a callback for timer event LOCAL_C TInt Callback(TAny* aArg) { CMyView* view = (CMyView*)aArg; view->HandleCommandL(...); return 0; } [...] //to start it from a function within the view: iTimer->Start(KDelayToStart, KInterval, TCallBack(Callback,this)); //to stop: iTimer->Cancel();Forum posts: 11
Thanks for this code, but maybe do you know why I receive errors associate with function TCallBack(..):
ERROR: no matching function for call to 'TCallBack::TCallBack (TInt (CClientBTAppUi:
ERROR: candidates are: TCallBack::TCallBack(const TCallBack &) e32std.h
Forum posts: 11
LOCAL_C TInt Callback(TAny* aArg)it must be
TInt NAME_CLASS::Callback(TAny* aArg)And everything will be all right:)