|
|
User login
Feeds |
RTimer kern-exec error
|
|||||
| Mon, 2005-08-15 13:03 | |
Forum posts: 135
The box said 'Windows 98 or better'. Why is it not working on Linux?
Forum posts: 3
#include "HelloWorld.h"
CDelayedHello* CDelayedHello::NewL()
{
CDelayedHello* self = new (ELeave) CDelayedHello();
CleanupStack::PushL(self);
self->ConstructL;
CleanupStack::Pop(self);
return self;
}
CDelayedHello::~CDelayedHello()
{
Cancel();
iTimer.Close();
}
void CDelayedHello::SetHello(TTimeIntervalMicroSeconds32 aDelay)
{
_LIT(KDelayedHelloPanic, "DelayedHelloPanic");
__ASSERT_ALWAYS(!IsActive(), User::Panic(KDelayedHelloPanic, 1));
iTimer.After(iStatus, aDelay);
SetActive();
}
CDelayedHello::CDelayedHello() : CActive(CActive::EPriorityStandard)
{
CActiveScheduler::Add(this);
}
void CDelayedHello::ConstructL()
{
iEnv = CEikonEnv::Static();
User::LeaveIfError(iTimer.CreateLocal());
}
void CDelayedHello::RunL()
{
iEnv->InfoMsg(R_DELAYED_HELLO_TEXT);
}
void CDelayedHello::DoCancel()
{
iTimer.Cancel();
}
TInt CDelayedHello::RunError(TInt aError)
{
return KErrNone;
}
Forum posts: 135
The box said 'Windows 98 or better'. Why is it not working on Linux?
Forum posts: 37
Can u tell me where u have called the SetHello().
In SetHello() function You are setting the timer for ur class. Until and unless u call SetHello(). nothing will work.
Try
Forum posts: 3
Thanks for your help
Toby