<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.newlc.com" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>NewLC - internal loop - Comments</title>
 <link>http://www.newlc.com/en/topic-15786</link>
 <description>Comments for &quot;internal loop&quot;</description>
 <language>en</language>
<item>
 <title>Re: internal loop</title>
 <link>http://www.newlc.com/en/topic-15786#comment-34220</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;thanks a lot.&lt;img src=&quot;/en/sites/all/modules/smf_filter/smf_smileys/cheesy.gif&quot; alt=&quot;Cheezy&quot; border=&quot;0&quot; /&gt;&lt;/div&gt;</description>
 <pubDate>Mon, 28 Aug 2006 11:24:54 +0200</pubDate>
 <dc:creator>guda</dc:creator>
 <guid isPermaLink="false">comment 34220 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: internal loop</title>
 <link>http://www.newlc.com/en/topic-15786#comment-34219</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;Active objects: the &amp;quot;loop&amp;quot; is actually the thread&amp;#039;s active scheduler, and the dialog just implements a RunL that does some small task (in wait dialog&amp;#039;s case, update the animation I would presume) and then re-schedules itself to run. This way, the phone remains responsive because the scheduler can choose other tasks to execute also (e.g. key events, other animations on the background, etc.).&lt;br /&gt;&lt;br /&gt;Now, if you&amp;#039;re asking how you can &amp;quot;block&amp;quot; the execution yourself so that you can implement this, it&amp;#039;s done with CActiveSchedulerWait class (can&amp;#039;t remember which header it&amp;#039;s in, sorry, try to search for it). The code goes something like this:&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;codeheader&quot;&gt;Code:&lt;/div&gt;&lt;div class=&quot;code&quot;&gt;class CSomeClass : public CBase {&lt;br /&gt;&amp;nbsp; &amp;nbsp; // This is your dialog class or whatever&lt;br /&gt;private:&lt;br /&gt;&amp;nbsp; &amp;nbsp; CActiveSchedulerWait iWait; // This is a C class so it can&amp;#039;t be on stack,&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // But it can be a member variable of another C-class.&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;// Actual code:&lt;br /&gt;&lt;br /&gt;iWait.Wait; // This instantiates another scheduler loop.&lt;br /&gt;&lt;br /&gt;// Somewhere else in the code, (e.g. in OkToExitL or ProcessCommandL):&lt;br /&gt;&lt;br /&gt;iWait.AsyncStop();&lt;br /&gt;&lt;br /&gt;// Execution continues, but once this active objects RunL finishes&lt;br /&gt;// it returns to the original loop.&lt;/div&gt;&lt;br /&gt;Ok, sorry about the uninformative example. I&amp;#039;m just typing it from memory.&lt;/div&gt;</description>
 <pubDate>Mon, 28 Aug 2006 00:21:52 +0200</pubDate>
 <dc:creator>Paradroid</dc:creator>
 <guid isPermaLink="false">comment 34219 at http://www.newlc.com</guid>
</item>
<item>
 <title>internal loop</title>
 <link>http://www.newlc.com/en/topic-15786</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&quot;http://www.newlc.com/en/topic-15786&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://www.newlc.com/en/topic-15786#comments</comments>
 <category domain="http://www.newlc.com/en/forums/nokia-series-60">Nokia S60</category>
 <pubDate>Sun, 27 Aug 2006 23:34:22 +0200</pubDate>
 <dc:creator>guda</dc:creator>
 <guid isPermaLink="false">15530 at http://www.newlc.com</guid>
</item>
</channel>
</rss>
