<?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 - CPeriodic Error - Comments</title>
 <link>http://www.newlc.com/topic-6522</link>
 <description>Comments for &quot;CPeriodic Error&quot;</description>
 <language>en</language>
<item>
 <title>Re: CPeriodic Error</title>
 <link>http://www.newlc.com/topic-6522#comment-44298</link>
 <description>&lt;p&gt;&lt;a href=&quot;http://wiki.forum.nokia.com/index.php/How_to_use_CPeriodic_for_a_steady_stream_of_ticks&quot;&gt;http://wiki.forum.nokia.com/index.php/How_to_use_CPeriodic_for_a_steady_stream_of_ticks&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I try this code and it&#039;s ok.   Sorry , I can compile above code but  get  &quot;runtime error&quot;&lt;/p&gt;</description>
 <pubDate>Sat, 02 Feb 2008 18:04:42 +0100</pubDate>
 <dc:creator>pladaojuk</dc:creator>
 <guid isPermaLink="false">comment 44298 at http://www.newlc.com</guid>
</item>
<item>
 <title>CPeriodic Error</title>
 <link>http://www.newlc.com/topic-6522#comment-17165</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;Ghgh is danbgerous that when i close the application appers an Alloc error?&lt;/div&gt;</description>
 <pubDate>Thu, 31 Mar 2005 15:13:08 +0200</pubDate>
 <dc:creator>spideronz</dc:creator>
 <guid isPermaLink="false">comment 17165 at http://www.newlc.com</guid>
</item>
<item>
 <title>CPeriodic Error</title>
 <link>http://www.newlc.com/topic-6522#comment-17164</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;mmm k... so i have tu put before this line the code ActivateGc(); &lt;br /&gt; I think....&lt;/div&gt;</description>
 <pubDate>Thu, 31 Mar 2005 14:27:58 +0200</pubDate>
 <dc:creator>spideronz</dc:creator>
 <guid isPermaLink="false">comment 17164 at http://www.newlc.com</guid>
</item>
<item>
 <title>CPeriodic Error</title>
 <link>http://www.newlc.com/topic-6522#comment-17163</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;There:&lt;br /&gt;&lt;br /&gt;CWindowGc&amp;amp; gc = SystemGc(); &lt;br /&gt;&lt;br /&gt;You said it you self - the &lt;b&gt;timer&lt;/b&gt; calls this function - not the drawing system - and you try to get a device context - and one wont have been activiated yet.&lt;br /&gt;&lt;br /&gt;From a reply to one of your other posts, try this:&lt;br /&gt;&lt;br /&gt;void CprovaContainer::MenuGenerate() &lt;br /&gt;&amp;nbsp; &amp;nbsp;{ &lt;br /&gt;Window().Invalidate(); &lt;br /&gt;ActivateGc(); &lt;br /&gt;Window().BeginRedraw(); &lt;br /&gt;&lt;br /&gt;CWindowGc&amp;amp; gc = SystemGc(); &lt;br /&gt;gc.BitBlt( Rect().iTl,iBitmap ); &lt;br /&gt;gc.BitBlt(TPoint(0,0), iBitmap); &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Window().EndRedraw(); &lt;br /&gt;DeactivateGc(); &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;BTW, im not saying this is the best way to do this - but it should work.&lt;br /&gt;&lt;br /&gt;Window().EndRedraw(); &lt;br /&gt;DeactivateGc();&lt;/div&gt;</description>
 <pubDate>Thu, 31 Mar 2005 14:18:23 +0200</pubDate>
 <dc:creator>didster</dc:creator>
 <guid isPermaLink="false">comment 17163 at http://www.newlc.com</guid>
</item>
<item>
 <title>CPeriodic Error</title>
 <link>http://www.newlc.com/topic-6522#comment-17162</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;ok but is with this code that application exit... where&#039;s the error? LoL&lt;br /&gt;&lt;br /&gt;The timer calls this function...&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;codeheader&quot;&gt;Code:&lt;/div&gt;&lt;div class=&quot;code&quot;&gt;void CprovaContainer&amp;#58;&amp;#58;MenuGenerate&amp;#40;&amp;#41;&lt;br /&gt; &amp;nbsp; &amp;#123;&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;CWindowGc&amp;amp; gc = SystemGc&amp;#40;&amp;#41;;&lt;br /&gt; &amp;nbsp; &amp;nbsp; gc.BitBlt&amp;#40; Rect&amp;#40;&amp;#41;.iTl,iBitmap &amp;#41;;&lt;br /&gt; &amp;nbsp; gc.BitBlt&amp;#40;TPoint&amp;#40;0,0&amp;#41;, iBitmap&amp;#41;;&lt;br /&gt; &amp;nbsp; DrawNow&amp;#40;&amp;#41;;&lt;br /&gt; &amp;nbsp; &amp;#125;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Ant it&#039;s correct....&lt;/div&gt;</description>
 <pubDate>Thu, 31 Mar 2005 13:57:33 +0200</pubDate>
 <dc:creator>spideronz</dc:creator>
 <guid isPermaLink="false">comment 17162 at http://www.newlc.com</guid>
</item>
<item>
 <title>CPeriodic Error</title>
 <link>http://www.newlc.com/topic-6522#comment-17161</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;Yes.&lt;br /&gt;&lt;br /&gt;Remember that code I showed you earlier in the post? &amp;nbsp;Suround the drawing code in that.&lt;/div&gt;</description>
 <pubDate>Thu, 31 Mar 2005 12:49:40 +0200</pubDate>
 <dc:creator>didster</dc:creator>
 <guid isPermaLink="false">comment 17161 at http://www.newlc.com</guid>
</item>
<item>
 <title>CPeriodic Error</title>
 <link>http://www.newlc.com/topic-6522#comment-17160</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;LoL i&#039;ve lost the constructor during the scripting.&lt;br /&gt;&lt;br /&gt;But the application exit anyway but this time with this error:&lt;br /&gt;&lt;br /&gt;WSERV 9&lt;br /&gt;&lt;br /&gt;Using the debugger it exit the application but doesn&#039;t indicate me the error in the code... only exit with WSERV 9&lt;br /&gt;&lt;br /&gt;It exit when i call the &amp;nbsp; DrawNow(); function&lt;br /&gt;&lt;br /&gt;The error is &lt;br /&gt;&lt;br /&gt;Attempted to use a non-active graphics context. &lt;br /&gt;&lt;br /&gt;A drawing request was sent to a graphics context when the context was not active. &lt;br /&gt;&lt;br /&gt;On the server side, this panic is raised by CWsGc::CommandL() on all requests received when the context isnÂ’t active except EWsGcOpActivate, EWsGcOpDeactivate, EWsGcOpFree, and EWsGcOpTestInvariant.&lt;br /&gt;&lt;br /&gt;Probably it gives me error when i try to draw something from and external function like Menugenerate&lt;/div&gt;</description>
 <pubDate>Thu, 31 Mar 2005 12:12:54 +0200</pubDate>
 <dc:creator>spideronz</dc:creator>
 <guid isPermaLink="false">comment 17160 at http://www.newlc.com</guid>
</item>
<item>
 <title>CPeriodic Error</title>
 <link>http://www.newlc.com/topic-6522#comment-17159</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;Which says to me iPeridoc hasn&#039;t been constructed yet...&lt;/div&gt;</description>
 <pubDate>Thu, 31 Mar 2005 11:57:34 +0200</pubDate>
 <dc:creator>didster</dc:creator>
 <guid isPermaLink="false">comment 17159 at http://www.newlc.com</guid>
</item>
<item>
 <title>CPeriodic Error</title>
 <link>http://www.newlc.com/topic-6522#comment-17158</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;With the debugger it says that the problem is in file e32base.inl&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 CActive&lt;br /&gt;inline TBool CActive&amp;#58;&amp;#58;IsActive&amp;#40;&amp;#41; const&lt;br /&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;#123;return&amp;#40;iActive&amp;#41;;&amp;#125; &amp;nbsp; &amp;#91;b&amp;#93;&amp;lt;---This Line&amp;#91;/b&amp;#93;&lt;br /&gt;inline TBool CActive&amp;#58;&amp;#58;IsAdded&amp;#40;&amp;#41; const&lt;br /&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;#123;return&amp;#40;iLink.iNext!=NULL&amp;#41;;&amp;#125;&lt;br /&gt;inline TInt CActive&amp;#58;&amp;#58;Priority&amp;#40;&amp;#41; const&lt;br /&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;#123;return iLink.iPriority;&amp;#125;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;</description>
 <pubDate>Thu, 31 Mar 2005 11:54:01 +0200</pubDate>
 <dc:creator>spideronz</dc:creator>
 <guid isPermaLink="false">comment 17158 at http://www.newlc.com</guid>
</item>
<item>
 <title>CPeriodic Error</title>
 <link>http://www.newlc.com/topic-6522#comment-17157</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;Ok. &amp;nbsp;Probably about the worse panic you can get (in terms of finding it) but a start. &amp;nbsp;Usually caused by accessing invalid memory - just where do you allocate iPeriodic? &amp;nbsp;&lt;br /&gt;&lt;br /&gt;Place a break point in ReDraw, and run it under the debugger.&lt;/div&gt;</description>
 <pubDate>Thu, 31 Mar 2005 11:53:49 +0200</pubDate>
 <dc:creator>didster</dc:creator>
 <guid isPermaLink="false">comment 17157 at http://www.newlc.com</guid>
</item>
<item>
 <title>CPeriodic Error</title>
 <link>http://www.newlc.com/topic-6522#comment-17156</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;adding the file it&#039;s write to me:&lt;br /&gt;&lt;br /&gt;Program Closed:&lt;br /&gt;Prova&lt;br /&gt;Kern-Exec 3&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The Debuggind don&#039;t seems to work.&lt;/div&gt;</description>
 <pubDate>Thu, 31 Mar 2005 11:43:24 +0200</pubDate>
 <dc:creator>spideronz</dc:creator>
 <guid isPermaLink="false">comment 17156 at http://www.newlc.com</guid>
</item>
<item>
 <title>CPeriodic Error</title>
 <link>http://www.newlc.com/topic-6522#comment-17155</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;Create the file ErrRd (blank, no extension) in the folder C:\system\bootdata on the emulator (emulated C drive, thats \epoc32\wins(cw)\) and try again.&lt;br /&gt;&lt;br /&gt;It won&#039;t just go back to the menu (is this Series 60 BTW?) it should display something.&lt;br /&gt;&lt;br /&gt;Try debugging it.&lt;/div&gt;</description>
 <pubDate>Thu, 31 Mar 2005 11:36:07 +0200</pubDate>
 <dc:creator>didster</dc:creator>
 <guid isPermaLink="false">comment 17155 at http://www.newlc.com</guid>
</item>
<item>
 <title>CPeriodic Error</title>
 <link>http://www.newlc.com/topic-6522#comment-17154</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;He exit from di application... it backs to the menu.... without any arror&lt;/div&gt;</description>
 <pubDate>Thu, 31 Mar 2005 11:33:00 +0200</pubDate>
 <dc:creator>spideronz</dc:creator>
 <guid isPermaLink="false">comment 17154 at http://www.newlc.com</guid>
</item>
<item>
 <title>CPeriodic Error</title>
 <link>http://www.newlc.com/topic-6522#comment-17153</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;Define crash? &amp;nbsp;You need to be more specifc. &amp;nbsp;Debug it, on what line does it crash? &amp;nbsp;Whats the panic code? &amp;nbsp;It will say app closed... what comes after it, there should be a catagory (like USER) and a code (like 11)&lt;/div&gt;</description>
 <pubDate>Thu, 31 Mar 2005 11:31:25 +0200</pubDate>
 <dc:creator>didster</dc:creator>
 <guid isPermaLink="false">comment 17153 at http://www.newlc.com</guid>
</item>
<item>
 <title>CPeriodic Error</title>
 <link>http://www.newlc.com/topic-6522#comment-17152</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;If I use this ReDraw function it crashes anyway&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;codeheader&quot;&gt;Code:&lt;/div&gt;&lt;div class=&quot;code&quot;&gt;void CprovaContainer&amp;#58;&amp;#58;ReDraw&amp;#40;&amp;#41; &amp;#123;&lt;br /&gt; &amp;nbsp;if&amp;#40;this-&amp;gt;status != 5&amp;#41; &lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;#123; &lt;br /&gt; &amp;nbsp; &amp;nbsp; if&amp;#40;iPeriodic-&amp;gt;IsActive&amp;#40;&amp;#41;&amp;#41; &lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;#123; &lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;StopTimer&amp;#40;&amp;#41;; &lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;#125; &lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;#125; &lt;br /&gt; &amp;nbsp;else &lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;#123; &lt;br /&gt; &amp;nbsp; &amp;nbsp; if&amp;#40;!iPeriodic-&amp;gt;IsActive&amp;#40;&amp;#41;&amp;#41; &lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;#123; &lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;// &amp;nbsp;StartTimer&amp;#40;&amp;#41;; &lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;MenuGenerate&amp;#40;&amp;#41;; &amp;nbsp;&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;#125; &lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;#125; &lt;br /&gt; &amp;nbsp;DrawNow&amp;#40;&amp;#41;; &lt;br /&gt;&lt;br /&gt;&amp;#125;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Probably there&#039;s a problem in Menugenerate function... but i don&#039;t understand the reason&lt;/div&gt;</description>
 <pubDate>Thu, 31 Mar 2005 11:31:07 +0200</pubDate>
 <dc:creator>spideronz</dc:creator>
 <guid isPermaLink="false">comment 17152 at http://www.newlc.com</guid>
</item>
<item>
 <title>CPeriodic Error</title>
 <link>http://www.newlc.com/topic-6522</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&quot;http://www.newlc.com/topic-6522&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://www.newlc.com/topic-6522#comments</comments>
 <category domain="http://www.newlc.com/forums/symbian-c">Symbian C++</category>
 <pubDate>Wed, 30 Mar 2005 21:53:28 +0200</pubDate>
 <dc:creator>spideronz</dc:creator>
 <guid isPermaLink="false">7175 at http://www.newlc.com</guid>
</item>
</channel>
</rss>
