<?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 - see variable value in the emulator - Comments</title>
 <link>http://www.newlc.com/forum/see-variable-value-emulator</link>
 <description>Comments for &quot;see variable value in the emulator&quot;</description>
 <language>en</language>
<item>
 <title>Re: see variable value in the emulator</title>
 <link>http://www.newlc.com/forum/see-variable-value-emulator#comment-45630</link>
 <description>&lt;p&gt;Hey Mobi,  I think you can do this in the normal Draw() function of your view. Why don&#039;t you just redraw your view and refresh the value to be displayed. If this variable&#039;s value is the only thing to be displayed.&lt;/p&gt;

&lt;p&gt;Caution: This won&#039;t be a recommended solution in case you have to draw quite a few things in your view.&lt;/p&gt;</description>
 <pubDate>Tue, 08 Apr 2008 11:57:14 +0200</pubDate>
 <dc:creator>SymbianReady</dc:creator>
 <guid isPermaLink="false">comment 45630 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: see variable value in the emulator</title>
 <link>http://www.newlc.com/forum/see-variable-value-emulator#comment-45600</link>
 <description>&lt;p&gt;...&lt;/p&gt;

&lt;p&gt;Try to understand what you write and don&#039;t just copy-paste code.&lt;/p&gt;

&lt;p&gt;That will only lead to lots of headache, and really weird bugs, or if you&#039;re lucky like this time, it will just not compile.&lt;/p&gt;

&lt;p&gt;The problem seems to be that I accidently re-used the name &quot;scrdev&quot; in my example code.&lt;br /&gt;
Call it something else.&lt;/p&gt;

&lt;p&gt;(No, I will NOT post the exact same code again with some new names of the variables... )&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;</description>
 <pubDate>Mon, 07 Apr 2008 13:47:58 +0200</pubDate>
 <dc:creator>alh</dc:creator>
 <guid isPermaLink="false">comment 45600 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: see variable value in the emulator</title>
 <link>http://www.newlc.com/forum/see-variable-value-emulator#comment-45591</link>
 <description>&lt;p&gt;Sorry, but i&#039;m not able to make this code run. Now I have another error because scrdev is now a CWsScreenDevice variable so I can&#039;t call gc-&gt;Activate(scrdev);. I have never used all of this and it&#039;s driving me crazy. &lt;img src=&quot;/sites/all/modules/smileys/packs/example/sad.png&quot; title=&quot;Sad&quot; alt=&quot;Sad&quot; /&gt;&lt;/p&gt;</description>
 <pubDate>Mon, 07 Apr 2008 11:06:43 +0200</pubDate>
 <dc:creator>miriwiri</dc:creator>
 <guid isPermaLink="false">comment 45591 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: see variable value in the emulator</title>
 <link>http://www.newlc.com/forum/see-variable-value-emulator#comment-45587</link>
 <description>&lt;p&gt;no you don&#039;t... &lt;br /&gt;
That would be a bit silly if you needed a window for this.&lt;/p&gt;

&lt;p&gt;It was just one example of how to get the displaymode to use.&lt;br /&gt;
That code would work for example inside a CCoeControl, I assumed you might have a few of those in your app already.&lt;br /&gt;
The function Window() gets the window of the CCoeControl.&lt;/p&gt;

&lt;p&gt;As I wrote in the post, (even though I didn&#039;t post the exact code) another way to query for the displaymode to use is to ask a CWsScreenDevice about it:&lt;/p&gt;

&lt;p&gt;&lt;pre class=&quot;bb-code-block&quot;&gt;
CWsScreenDevice* scrdev = CCoeEnv::Static()-&amp;gt;ScreenDevice(); //gets the current screen device of the application framework
TDisplayMode currentdisplaymode = scrdev-&amp;gt;DisplayMode();
&lt;/pre&gt;&lt;br /&gt;
&lt;/p&gt;</description>
 <pubDate>Mon, 07 Apr 2008 10:47:05 +0200</pubDate>
 <dc:creator>alh</dc:creator>
 <guid isPermaLink="false">comment 45587 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: see variable value in the emulator</title>
 <link>http://www.newlc.com/forum/see-variable-value-emulator#comment-45582</link>
 <description>&lt;p&gt;CFbsScreenDevice* scrdev = CFbsScreenDevice::NewL(0, Window().DisplayMode());&lt;/p&gt;

&lt;p&gt;Do I have to create a Rwindow variable called Window to call the previous line? It&#039;s because I have this error: undefined identifier Window. but if i create RWindow Window I have also an error: call of non-function. thanks&lt;/p&gt;</description>
 <pubDate>Mon, 07 Apr 2008 10:03:53 +0200</pubDate>
 <dc:creator>miriwiri</dc:creator>
 <guid isPermaLink="false">comment 45582 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: see variable value in the emulator</title>
 <link>http://www.newlc.com/forum/see-variable-value-emulator#comment-45488</link>
 <description>&lt;p&gt;You need to include  bitdev.h for CFbsScreenDevice and bitstd.h for CFbsBitGc. (possibly you need only one of them for both)&lt;br /&gt;
The library is bitgdi.lib&lt;/p&gt;

&lt;p&gt;Also, you need to specify the displaymode...  Just wrote that code from the top of my head.&lt;/p&gt;

&lt;p&gt;ask a window for its displaymode (RWindow::DisplayMode()), or ask the CWsScreeenDevice for the current display mode. (you get the CWsScreenDevice from CCoeEnv::Static()-&gt;ScreenDevice())&lt;/p&gt;

&lt;p&gt;&lt;pre class=&quot;bb-code-block&quot;&gt;
CFbsScreenDevice* scrdev = CFbsScreenDevice::NewL(0, Window().DisplayMode());
&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;Also remembered one more thing you might have to do: call Update(TRegion) on the CFbsScreenDevice, to get the content to the LCD. &lt;br /&gt;
Must be the one with a region, the region-less version will think there is no updates and do nothing.&lt;/p&gt;

&lt;p&gt;use it like this to update a rectangle on the screen&lt;br /&gt;
&lt;pre class=&quot;bb-code-block&quot;&gt;
TRegionFix&amp;lt;1&amp;gt; region(TRect(0,0,20,100)); 
scrdev-&amp;gt;Update(region);
&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;above is an example that updates the area drawn in my previous example, you can ofcourse change the rect, or add more rects to the same region.&lt;br /&gt;
TRegionFix&lt;T&gt; is a simple-to-use region with a fixed number of rectangles for the region.&lt;br /&gt;
Since it is all on the stack, it doesn&#039;t have to be closed, so nice and easy to use...&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;</description>
 <pubDate>Tue, 01 Apr 2008 14:02:01 +0200</pubDate>
 <dc:creator>alh</dc:creator>
 <guid isPermaLink="false">comment 45488 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: see variable value in the emulator</title>
 <link>http://www.newlc.com/forum/see-variable-value-emulator#comment-45484</link>
 <description>&lt;p&gt;thanks alh.&lt;br /&gt;
I&#039;ve tried your code and I have an error in the first line: function call &#039;[MyProgram].NewL(int)&#039; does not match. Sorry for this question but I&#039;ve never used this class and i don&#039;t know how to use it properly. thanks&lt;/p&gt;</description>
 <pubDate>Tue, 01 Apr 2008 11:21:51 +0200</pubDate>
 <dc:creator>miriwiri</dc:creator>
 <guid isPermaLink="false">comment 45484 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: see variable value in the emulator</title>
 <link>http://www.newlc.com/forum/see-variable-value-emulator#comment-45466</link>
 <description>&lt;p&gt;Nice Thought, and this can also be used to represent it in the final application (if required). Will reduce your efforts too.&lt;/p&gt;</description>
 <pubDate>Tue, 01 Apr 2008 05:15:12 +0200</pubDate>
 <dc:creator>SymbianReady</dc:creator>
 <guid isPermaLink="false">comment 45466 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: see variable value in the emulator</title>
 <link>http://www.newlc.com/forum/see-variable-value-emulator#comment-45452</link>
 <description>&lt;p&gt;If you just want to display the number for debug purposes, and you don&#039;t care if you mess up the screen a tiny bit in the process, you could just draw it to the screen directly.&lt;/p&gt;

&lt;p&gt;something like this:&lt;/p&gt;

&lt;p&gt;&lt;pre class=&quot;bb-code-block&quot;&gt;
//construction
CFbsScreenDevice* scrdev = CFbsScreenDevice::NewL(0); //0 for main screen
CFbsBitGc* gc = CFbsBitGc::NewL();
gc-&amp;gt;Activate(scrdev);
gc-&amp;gt;UseFont(coeEnv-&amp;gt;NormalFont());
gc-&amp;gt;SetBrushColor(TRgb(0,0,0));
gc-&amp;gt;SetPenColor(TRgb(255,255,255));

//do it
gc-&amp;gt;DrawRect(TRect(0,0,20,100)); // black background rect
gc-&amp;gt;DrawText(_L(&quot;Hello&quot;),TPoint(0,0)); //white text.

//destruction
gc-&amp;gt;DiscardFont();
delete gc;
delete scrdev;
&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;And you don&#039;t have to recreate gc, scrdev, and set it up every time ofcourse...  just drawrect and drawtext.&lt;br /&gt;
Should work fine for numbers that update a lot. (if anything else draws on the area where the number is shown, it will be overdrawn)&lt;br /&gt;
&lt;/p&gt;</description>
 <pubDate>Mon, 31 Mar 2008 16:03:07 +0200</pubDate>
 <dc:creator>alh</dc:creator>
 <guid isPermaLink="false">comment 45452 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: see variable value in the emulator</title>
 <link>http://www.newlc.com/forum/see-variable-value-emulator#comment-45448</link>
 <description>&lt;p&gt;Thanks a lot!!!&lt;/p&gt;</description>
 <pubDate>Mon, 31 Mar 2008 13:20:21 +0200</pubDate>
 <dc:creator>miriwiri</dc:creator>
 <guid isPermaLink="false">comment 45448 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: see variable value in the emulator</title>
 <link>http://www.newlc.com/forum/see-variable-value-emulator#comment-45447</link>
 <description>&lt;p&gt;Then I would suggest that you should check for the CAknWaitDialog and the callback mechanism to set the values of the dialog dynamically. But be cautious, this might distract you from what you are currently doing. Try going this way only if this is very much required, you are very curious to do this or, if you have enough time to put the extra effort.&lt;/p&gt;

&lt;p&gt;This is the best I can think, if I get a better solution, will let you know.&lt;/p&gt;

&lt;p&gt;Cheers!!!&lt;/p&gt;</description>
 <pubDate>Mon, 31 Mar 2008 13:13:20 +0200</pubDate>
 <dc:creator>SymbianReady</dc:creator>
 <guid isPermaLink="false">comment 45447 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: see variable value in the emulator</title>
 <link>http://www.newlc.com/forum/see-variable-value-emulator#comment-45446</link>
 <description>&lt;p&gt;that&#039;s it, symbian ready!! That&#039;s the point. I have to display the value of the heart rate without breaks and of course it has to change in every loop. So the breakpoint solution is not a good solution for me and the  CAknInformationNote is not either because it has an error and i doesn&#039;t actualize the value. I&#039;ve been searching but i haven&#039;t found any other solution. Anybody has any other? thanks!&lt;/p&gt;</description>
 <pubDate>Mon, 31 Mar 2008 13:03:18 +0200</pubDate>
 <dc:creator>miriwiri</dc:creator>
 <guid isPermaLink="false">comment 45446 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: see variable value in the emulator</title>
 <link>http://www.newlc.com/forum/see-variable-value-emulator#comment-45445</link>
 <description>&lt;p&gt;Can you please elaborate a bit, what exactly do you want to do....&lt;/p&gt;</description>
 <pubDate>Mon, 31 Mar 2008 13:01:39 +0200</pubDate>
 <dc:creator>SymbianReady</dc:creator>
 <guid isPermaLink="false">comment 45445 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: see variable value in the emulator</title>
 <link>http://www.newlc.com/forum/see-variable-value-emulator#comment-45443</link>
 <description>&lt;p&gt;i would like also to do this. please help&lt;/p&gt;</description>
 <pubDate>Mon, 31 Mar 2008 12:44:04 +0200</pubDate>
 <dc:creator>nabil</dc:creator>
 <guid isPermaLink="false">comment 45443 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: see variable value in the emulator</title>
 <link>http://www.newlc.com/forum/see-variable-value-emulator#comment-45434</link>
 <description>&lt;p&gt;Ya to check the value in the emulator using breakpoint is the best for debugging and finding the error(s) if there are any, but is this the real question?, from the explanations and code sent by moby, I think, she want to display the changing value of the HeartRate() on the screen without any break. In that case breakpoints will just ruin the scene. So it is upto you moby, to decide and clarify what exactly do you require.&lt;/p&gt;</description>
 <pubDate>Mon, 31 Mar 2008 05:17:51 +0200</pubDate>
 <dc:creator>SymbianReady</dc:creator>
 <guid isPermaLink="false">comment 45434 at http://www.newlc.com</guid>
</item>
<item>
 <title>see variable value in the emulator</title>
 <link>http://www.newlc.com/forum/see-variable-value-emulator</link>
 <description>&lt;p&gt;Hello&lt;br /&gt;
How can I see the value of a variable in the emulator? I&#039;m using Symbian c++ s60 3rd FP1. thanks&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.newlc.com/forum/see-variable-value-emulator&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://www.newlc.com/forum/see-variable-value-emulator#comments</comments>
 <category domain="http://www.newlc.com/forums/symbian-c">Symbian C++</category>
 <pubDate>Wed, 26 Mar 2008 16:30:03 +0100</pubDate>
 <dc:creator>miriwiri</dc:creator>
 <guid isPermaLink="false">20572 at http://www.newlc.com</guid>
</item>
</channel>
</rss>
