03.01.2013 Views

Forum Nokia Tools and Technologies - Nokia Developer - 你的灵感,我 ...

Forum Nokia Tools and Technologies - Nokia Developer - 你的灵感,我 ...

Forum Nokia Tools and Technologies - Nokia Developer - 你的灵感,我 ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

LOCAL_C void doExampleL()<br />

{<br />

Typical use of Active obj.<br />

CActiveScheduler* as = new(ELeave) CActiveScheduler();<br />

CleanupStack::PushL(as);<br />

CActiveScheduler::Install(as);<br />

CMyKeyboard* kbd = new (ELeave)CMyKeyboard(); // Active object<br />

CleanupStack::PushL(kbd);<br />

kbd->ConstructL();<br />

kbd->RequestKeyPress();<br />

console->Printf(_L("Starting AS\n"));<br />

CActiveScheduler::Start(); // Never return until “CActiveScheduler::Stop()” is called<br />

CleanupStack::PopAndDestroy(2);<br />

}

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!