<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Clarion Edge &#187; General</title>
	<atom:link href="http://www.clarionedge.com/category/clarion/general/feed" rel="self" type="application/rss+xml" />
	<link>http://www.clarionedge.com</link>
	<description>Get an Edge with Clarion!</description>
	<lastBuildDate>Thu, 29 Jul 2010 21:13:55 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>R.I.P. faq.clarionmag.com</title>
		<link>http://www.clarionedge.com/clarion/general/r-i-p-faq-clarionmag-com.html</link>
		<comments>http://www.clarionedge.com/clarion/general/r-i-p-faq-clarionmag-com.html#comments</comments>
		<pubDate>Thu, 29 Jul 2010 21:06:28 +0000</pubDate>
		<dc:creator>brahn</dc:creator>
				<category><![CDATA[Clarion]]></category>
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.clarionedge.com/clarion/general/r-i-p-faq-clarionmag-com.html</guid>
		<description><![CDATA[I know it was a while ago now but I still feel the loss. Apparently the good folk at StackExchange decided there was not enough traffic. 
More info http://www.clarionmag.com/cmag/faq.html
]]></description>
			<content:encoded><![CDATA[<p>I know it was a while ago now but I still feel the loss. Apparently the good folk at <a href="http://stackexchange.com/">StackExchange</a> decided there was not enough traffic. </p>
<p>More info <a title="http://www.clarionmag.com/cmag/faq.html" href="http://www.clarionmag.com/cmag/faq.html">http://www.clarionmag.com/cmag/faq.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.clarionedge.com/clarion/general/r-i-p-faq-clarionmag-com.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Clarion 6 Editor Tip &#8211; Ctrl+PgUp/PgDown</title>
		<link>http://www.clarionedge.com/clarion/general/clarion-6-editor-tip-ctrlpguppgdown.html</link>
		<comments>http://www.clarionedge.com/clarion/general/clarion-6-editor-tip-ctrlpguppgdown.html#comments</comments>
		<pubDate>Fri, 07 May 2010 11:02:07 +0000</pubDate>
		<dc:creator>brahn</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.clarionedge.com/clarion/general/clarion-6-editor-tip-ctrlpguppgdown.html</guid>
		<description><![CDATA[&#160;
This is something I hadn’t noticed before today. It may be common knowledge to others   
When editing an embed, if you hold down control key then PageUp and PageDown are restricted to the [...]]]></description>
			<content:encoded><![CDATA[<p>&#160;</p>
<p>This is something I hadn’t noticed before today. It may be common knowledge to others <img src='http://www.clarionedge.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </p>
<p>When editing an embed, if you hold down control key then PageUp and PageDown are restricted to the current page instead of scrolling up/down. Kind of like Home/End for the visible area only. </p>
<p>Do you know of any other obscure keyboard tricks in the Clarion editor?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.clarionedge.com/clarion/general/clarion-6-editor-tip-ctrlpguppgdown.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>APPCRASH fun with WslDebug$NameMessage</title>
		<link>http://www.clarionedge.com/clarion/general/appcrash-fun-with-wsldebugnamemessage.html</link>
		<comments>http://www.clarionedge.com/clarion/general/appcrash-fun-with-wsldebugnamemessage.html#comments</comments>
		<pubDate>Sat, 25 Apr 2009 13:19:02 +0000</pubDate>
		<dc:creator>brahn</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.clarionedge.com/?p=228</guid>
		<description><![CDATA[At work the other day we had a report from a client that the latest version of our software was not working on new Vista machines. Ingeniously, the customer managed to discover that if they [...]]]></description>
			<content:encoded><![CDATA[<p>At work the other day we had a report from a client that the latest version of our software was not working on new Vista machines. Ingeniously, the customer managed to discover that if they initially launched the program with elevated (administrator) access then subsequent executions of  the program would work un-elevated.</p>
<p>Just yestarday I managed to duplicate these symptoms in my development environment and discovered that the problem was being triggered in the InitSetEventOffset ROUTINE of the Debuger class we are using.</p>
<p>You can download the class over at Radfusion <a href="http://www.radfusion.com/PDFgallery.htm" target="_blank">Free Downloads</a>.</p>
<p>The helpful folk over at the <a href="http://www.skype.com/go/joinpublicchat?chat&amp;skypename=msarson&amp;topic=CW-Talk+2&amp;blob=r8AnVvWRDpLksKm_V4l2uDqrht9EI8omKxWpHOiLNI9fyhx5IRDg7B8lK7EcgmFbDGj7_U_S72A6dIVQp_evDjjFvjW75-OEst5zTiRAn3vucAazmaE2rV8P0Zw6A167h6Vhn4T2T_s8cnZ6Z3WdG4apN9O6t0-R" target="_blank">clarion skype chat</a> were able to narrow this down to a problem with the length of the CSTRING used in the call to DebugerNameMessage.</p>
<p>Further analysis shows that this only manifests as an issue under very specific circumstances:</p>
<ul>
<li>The class instance is created using New().</li>
<li>The application is compiled with debug mode set to &#8220;off&#8221; (or in other words, in &#8220;release&#8221; mode).</li>
<li>The application is run &#8220;asInvoker&#8221; on a system with UAC tuned ON.</li>
<li>There is no &#8220;EventOffset&#8221; entry already in the WIN.INI file*.</li>
</ul>
<p><sub>* That last point will depend on the version of the debuger class you are using. The one we have here is &#8220;6.0.2&#8243; but there are others around that no longer use WIN.INI and they might work OK. Note though that when I say &#8220;OK&#8221; the problem hasn&#8217;t gone away and you will still see the APPCRASH error the first time your program is run but subsequent executions will be able to read the offset from the INI file and this bypasses this bug.</sub></p>
<p>Changing the variable from CSTRING(20) to CSTRING(128) fixed the problem (Thanks Larry!) but I was still curious to find out what the cause was.</p>
<p>First lets look at the prototype forDebugerNameMessage :</p>

<div class="wp_syntax"><div class="code"><pre class="clarion" style="font-family:monospace;"><span style="color: #000080;">MODULE</span>(<span style="color: #008000;">'C%V%RUN%X%')
</span>  DebugerNameMessage(*<span style="color: #000080;">CSTRING</span>, <span style="color: #000080;">UNSIGNED</span> EventNum ),<span style="color: #000080;">NAME</span>(<span style="color: #008000;">'WslDebug$NameMessage'),RAW   !Note: use   EVENT() + EVENT:FIRST else will get WM_*
</span><span style="color: #000080;">END</span></pre></div></div>

<p>And it&#8217;s usage:</p>

<div class="wp_syntax"><div class="code"><pre class="clarion" style="font-family:monospace;">Debuger.GetEventDescr             <span style="color: #000080;">PROCEDURE</span>(<span style="color: #000080;">LONG</span> ArgEvent)
LOC:Retval   <span style="color: #000080;">CSTRING</span>(20)
LOC:EventNum <span style="color: #000080;">UNSIGNED</span>
  <span style="color: #000080;">CODE</span>
  DebugerNameMessage(LOC:Retval, LOC:EventNum)</pre></div></div>

<p>(I have removed all the other code from the above method just for clarity in this example)</p>
<p>The call to DebugerNameMessage crashed just after giving this result:</p>

<div class="wp_syntax"><div class="code"><pre class="clarion" style="font-family:monospace;">LOC:Retval=WM_OTHERWINDOWCREATE, LOC:EventNum=66</pre></div></div>

<p>When the LOC:RetVal is changed to CSTRING(128) we see that the next call is this:</p>

<div class="wp_syntax"><div class="code"><pre class="clarion" style="font-family:monospace;">LOC:Retval=WM_OTHERWINDOWDESTROY, LOC:EventNum=67</pre></div></div>

<p>The reason for the crash I guess is Len(WM_OTHERWINDOWDESTROY) &gt; 20</p>
<p>There are 2 questions remaining and I think I have the answer for one:</p>
<h4>Why does it only crash when the class is instantiated with New()?</h4>
<p>I am pretty sure this simply because when using New() the &#8220;EventOffset&#8221; is different and so the InitSetEventOffset routine attempts to find the correct offset and thus triggering the problem with our too small variable.</p>
<h4>Why does it only happen when the program is compile with debugging turned OFF?</h4>
<p>I guess in debug mode the code it is not so sensitive about the buffer overrun it still seems kind of strange that it should work at all.</p>
<p>Hopefully someone reading this will be able to give a hint as to a possible reason?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.clarionedge.com/clarion/general/appcrash-fun-with-wsldebugnamemessage.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using THEN to improve IF  clarity</title>
		<link>http://www.clarionedge.com/clarion/general/using-then-to-improve-if-clarity.html</link>
		<comments>http://www.clarionedge.com/clarion/general/using-then-to-improve-if-clarity.html#comments</comments>
		<pubDate>Sun, 08 Feb 2009 16:09:48 +0000</pubDate>
		<dc:creator>brahn</dc:creator>
				<category><![CDATA[Clarion]]></category>
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.clarionedge.com/?p=165</guid>
		<description><![CDATA[Something that came up recently on CW-Talk2 which I found to be a very interesting insight.
In Clarion the help has this description for &#8220;IF&#8221;:


1
2
3
4
5
6
7
IF logical expression [ THEN ]
  statements
[ ELSIF logical expression  [ [...]]]></description>
			<content:encoded><![CDATA[<p>Something that came up recently on CW-Talk2 which I found to be a very interesting insight.</p>
<h4>In Clarion the help has this description for &#8220;IF&#8221;:</h4>
<p><span id="more-165"></span></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="clarion" style="font-family:monospace;"><span style="color: #000080;">IF</span> logical expression [ <span style="color: #000080;">THEN</span> ]
  statements
[ <span style="color: #000080;">ELSIF</span> logical expression  [ <span style="color: #000080;">THEN</span> ]
  statements ]
[ <span style="color: #000080;">ELSE</span>
  statements ]
<span style="color: #000080;">END</span></pre></td></tr></table></div>

<p>Quite often in production code I have seen examples of many, many lines of expressions after the IF, the developer using the &#8220;|&#8221; line continuator to span multiple lines.</p>
<p>The comment, I think it was Marg G, was to use THEN to make it clear where the &lt;expressions&gt; have finished and the &lt;statements&gt; have begun:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="clarion" style="font-family:monospace;"><span style="color: #000080;">IF</span> &lt;some condition&gt; <span style="color: #000080;">OR</span> |
   &lt;some other condition&gt; <span style="color: #000080;">OR</span> |
   &lt;even more conditions&gt; |
<span style="color: #000080;">THEN</span>
  <span style="color: #008000;">! Do something</span>
<span style="color: #000080;">END</span></pre></td></tr></table></div>

<p>Pretty simple and very neat!</p>
<p>It will be nice to see if C7 supports code folding for this kind of structure as well&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.clarionedge.com/clarion/general/using-then-to-improve-if-clarity.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Clarion Sucks</title>
		<link>http://www.clarionedge.com/clarion/general/clarion-sucks.html</link>
		<comments>http://www.clarionedge.com/clarion/general/clarion-sucks.html#comments</comments>
		<pubDate>Mon, 05 May 2008 17:05:13 +0000</pubDate>
		<dc:creator>brahn</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.clarionedge.com/?p=8</guid>
		<description><![CDATA[Ha!
Nah, not really, that is just blatant sensationalism to get your attention  
I found an article the other day that was a really interesting read.
From the article:
I’m trying to push for more Python adoption [...]]]></description>
			<content:encoded><![CDATA[<p>Ha!</p>
<p>Nah, not really, that is just blatant sensationalism to get your attention <img src='http://www.clarionedge.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I found an article the other day that was a really interesting read.</p>
<p>From the article:</p>
<blockquote><p>I’m trying to push for more Python adoption at the company I work at. This led me to casually google for &#8220;Python sucks&#8221; in order to anticipate any criticisms from coworkers.</p></blockquote>
<p><em>From&#8221;<a href="http://coffeeghost.net/2008/03/19/your-ignorance-does-not-make-a-programming-language-suck/" target="_blank">Your Ignorance Does Not Make a Programming Language Suck</a> &#8220;</em></p>
<p>It is an interesting idea for determining status of something. There is just mostly noise with &#8220;<a href="http://www.google.com/search?q=Clarion+sucks" target="_blank">Clarion sucks</a>&#8220;. Another option is &#8220;<a href="http://www.google.com/search?q=Softvelocity+sucks" target="_blank">Softvelocity sucks</a> &#8221; which gets a few hits. Go on, have a try of those links for a giggle.</p>
<p>Still talking about Clarion, it&#8217;s nice to see Clarion recognised in a list of this kind:</p>
<p><a href="http://www.roesler-ac.de/wolfram/hello.htm" target="_blank">The Hello World Collection</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.clarionedge.com/clarion/general/clarion-sucks.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Visible Window Resizing</title>
		<link>http://www.clarionedge.com/clarion/general/visible-window-resizing.html</link>
		<comments>http://www.clarionedge.com/clarion/general/visible-window-resizing.html#comments</comments>
		<pubDate>Fri, 02 May 2008 18:23:09 +0000</pubDate>
		<dc:creator>brahn</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.clarionedge.com/?p=25</guid>
		<description><![CDATA[We found a problem in an application the other day where using Message() in ThisWindow.Open would cause the window to display before the Resizer had actually done it&#8217;s thing and put the controls in the [...]]]></description>
			<content:encoded><![CDATA[<p><span class="info">We found a problem in an application the other day where using Message() in ThisWindow.Open would cause the window to display before the Resizer had actually done it&#8217;s thing and put the controls in the correct position. Whilst not being a critical problem it sure made things look awful.</span></p>
<h3>Here is why and a way to handle the situation:</h3>
<p>Normally the Resizer does its initial resizing of the window controls when EVENT:DoResize first occurs. If you check the ABWINDOW.CLW you can see where the WindowManager Post()’s this event for the Resizer, in the WindowManager.TakeEvent method:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="clarion" style="font-family:monospace;">WindowManager.TakeEvent <span style="color: #000080;">PROCEDURE</span>
  <span style="color: #008000;">! &lt;snip (lots of template code)&gt;</span>
    <span style="color: #000080;">CASE</span> <span style="color: #000080;">EVENT</span>()
    <span style="color: #000080;">OF</span> <span style="color: #000080;">EVENT</span>:Sized
       <span style="color: #000080;">POST</span>(<span style="color: #000080;">EVENT</span>:DoResize,0,<span style="color: #000080;">THREAD</span>())</pre></td></tr></table></div>

<p>The problem here is that when ThisWindow.Open() is called (triggered by EVENT:OpenWindow, see WindowManager.TakeWindowEvent ) the EVENT:DoResize has not yet actually even been fired let alone processed.</p>
<p><span id="more-25"></span><br />
On a window with few controls and no messages or other modal events occurring between EVENT:OpenWindow and EVENT:Sized this would not be an obvious problem. The window would redraw so fast as to make this practically invisible. I have not checked but in fact the &#8220;PROP:DeferMove&#8221; may also come into play.</p>
<p>In this case however I think we need to try and remember that if we are going to do anything &#8220;modal&#8221; like popping a message in ThisWindow.Open then we also need to ensure that we manually call the Resizer.Resize beforehand (if the window in question has one!).<br />
Oh, and a &#8220;Display()&#8221; is also needed to make the effect of the Resizer properly visible. This would be the full code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="clarion" style="font-family:monospace;">ThisWindow.<span style="color: #000080;">Open</span> <span style="color: #000080;">PROCEDURE</span>
  <span style="color: #000080;">CODE</span>
  PARENT.<span style="color: #000080;">Open</span>
  Resizer.<span style="color: #000080;">Resize</span>()
  <span style="color: #000080;">Display</span>()
  <span style="color: #008000;">! Then you can do a Message() or whatever.</span></pre></td></tr></table></div>

<p>So hopefully this has been of help or perhaps it just confirms something you already knew?</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.clarionedge.com/clarion/general/visible-window-resizing.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
