<?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>BKeeney Briefs &#187; Programming</title>
	<atom:link href="http://www.bkeeneybriefs.com/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bkeeneybriefs.com</link>
	<description>Software Development Using REAL Studio</description>
	<lastBuildDate>Sat, 04 Feb 2012 19:36:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Recordset.idxField vs Recordset.Field</title>
		<link>http://www.bkeeneybriefs.com/2012/02/recordset-idxfield-vs-recordset-field/</link>
		<comments>http://www.bkeeneybriefs.com/2012/02/recordset-idxfield-vs-recordset-field/#comments</comments>
		<pubDate>Sat, 04 Feb 2012 19:36:40 +0000</pubDate>
		<dc:creator>Bob Keeney</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[REALbasic]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[Opinion]]></category>
		<category><![CDATA[REAL Studio]]></category>
		<category><![CDATA[recordset]]></category>
		<category><![CDATA[Speed]]></category>

		<guid isPermaLink="false">http://www.bkeeneybriefs.com/?p=1037</guid>
		<description><![CDATA[Yesterday I was complaining about my OPC project and I&#8217;ve added a few more bullet points in the comments section.  This morning I added a comment about how the idiot developer used Recordset.idxField(index) rather than Recordset.Field(&#8220;FieldName&#8221;).  I hate it when developers use idxField because it makes it tough to read and I constantly have to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.bkeeneybriefs.com/2012/02/dear-idiotic-developer/" target="_blank">Yesterday</a> I was complaining about my OPC project and I&#8217;ve added a few more bullet points in the comments section.  This morning I added a comment about how the idiot developer used Recordset.idxField(index) rather than Recordset.Field(&#8220;FieldName&#8221;).  I hate it when developers use idxField because it makes it tough to read and I constantly have to go back and look at the query and count fields.  In the short term I modify the query string in the IDE and put index comments in the in string.  Something like this:</p>
<p>s = &#8220;Select field1, &#8221; _ //1</p>
<p>+ &#8220;field2, &#8221; _ //2</p>
<p>and so on but it&#8217;s still a pain.</p>
<p>Anyway, Christian S. posted a comment that got me thinking.  He said:</p>
<blockquote><p>idxField is good. It can speedup applications a lot.</p></blockquote>
<p>Is that really true?  I have never tested it so I created a little test application using an actual query from the project I&#8217;m working on.  I run the same query twice.  The first time I loop through the recordset using nothing but idxField and the second time I use nothing but field which uses the field name.  The results are interesting and confirmed my suspicions.</p>
<p>If I run my two functions just once and bring back only 1 record and do one read in the function the idx field is indeed faster by about 50%.  However my testing differences range from 6 to 300 microseconds faster and while I didn&#8217;t average out all the results, I&#8217;d say most times it was around 60 microseconds faster.  I ran this test a lot to see if I would see a wider variation but did not.  My 300 microseconds difference happened just once out of about 25 runs.</p>
<p>I changed my query so that instead of bringing back 1 record it brings back over 700 and I loop through the recordset and then do the same same test.  IdxField comes back about 15% faster.  When I loop through the same row 10,000 times there is no statistical difference which means that while Field is slower it&#8217;s a one time hit since my tests show that even doing the same pull 10,000 times the total difference between the two functions is still only about a 10-15% difference in overall speed.</p>
<p>My conclusion is that yes, idxField <em>IS</em> faster than using Field but to say it speeds up an application &#8220;a lot&#8221; is an exaggeration.  In 10 years of Real Studio consulting work I have rarely done an application that requires that much speed from the queries.  If you have any sort of graphical user interface I think it safe to say that updates to the controls on screen are significantly slower than pulling data out of the recordset.  That&#8217;s NOT to say that the query itself is fast because often times that is the most limiting factor.</p>
<p>I won&#8217;t discourage you from using idxField.  If you do, though, I really encourage you to use constants named after your fields.  So perhaps you create a constant named kField1 and the value is 1 for the first field in your recordset.  The only drawback to this approach is that you (or the developer after you) will change the SQL query and all the code using idxfield no longer works because your field order is different.</p>
<p>I much prefer the explicitness of using Field because I never have to worry if I change my field order.  It&#8217;s very readable.  It&#8217;s not perfect and there are plenty of reasons why it&#8217;s not the best (there&#8217;s a reason why we use <a href="https://www.bkeeney.com/realbasic/activerecord" target="_blank">ActiveRecord</a> in a lot of projects).  Use what&#8217;s best for you and what&#8217;s best for the five years from now.</p>
<p>What say you, RB developers?</p>
            <script type="text/javascript">  linkscolor = "000000";  highlightscolor = "888888";  backgroundcolor = "FFFFFF";  channel = "none";   </script><script type="text/javascript" src="http://www.addmarx.com/dynamicbookmark_compressed.php"></script><span><a onClick="clickDynamic1(this); return false;" href="http://www.addmarx.com"><img style="padding:0px; margin:0px" src="http://www.bkeeneybriefs.com/wp-content/plugins/addmarx/sharebookmarx.png" border="0"></a></span><span style="position:absolute; z-index:1000001; margin-top:24px; margin-left:-127px; visibility:hidden;"><iframe id="addmarx_empty" scrolling="no" frameborder="0"></iframe></span><p class="addmarx_spacer"></p><!-- Please place the above code into your site where you want to have a bookmark/share/publicize link. Please do not change any of the code aside from the link text or image, or else the code may not work properly.  -->                  ]]></content:encoded>
			<wfw:commentRss>http://www.bkeeneybriefs.com/2012/02/recordset-idxfield-vs-recordset-field/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Dear Idiotic Developer</title>
		<link>http://www.bkeeneybriefs.com/2012/02/dear-idiotic-developer/</link>
		<comments>http://www.bkeeneybriefs.com/2012/02/dear-idiotic-developer/#comments</comments>
		<pubDate>Fri, 03 Feb 2012 21:48:34 +0000</pubDate>
		<dc:creator>Bob Keeney</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Customers]]></category>
		<category><![CDATA[Opinion]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[REALbasic]]></category>
		<category><![CDATA[REAL Studio]]></category>

		<guid isPermaLink="false">http://www.bkeeneybriefs.com/?p=1031</guid>
		<description><![CDATA[Dear Idiotic Developer: OPC is our internal slang for Other Peoples Code.  I&#8217;ve talked about this before but just in case you&#8217;ve never been here before, OPC projects are always the most dangerous kind of projects to work on.  They can quickly become a rats nest and cause no end of grief mainly because you [...]]]></description>
			<content:encoded><![CDATA[<p>Dear Idiotic Developer:</p>
<p>OPC is our internal slang for Other Peoples Code.  I&#8217;ve talked about this before but just in case you&#8217;ve never been here before, OPC projects are always the most dangerous kind of projects to work on.  They can quickly become a rats nest and cause no end of grief mainly because you have to figure out what the original programmer (or programmers) was thinking.  Because it&#8217;s a Friday afternoon and I&#8217;ve been up to my elbows in digging through your OPC project all week here is my list of complaints:</p>
<ul>
<li>Poor variable names:  Variables such at &#8216;tmpd&#8217; and &#8221;bDbDl&#8221; don&#8217;t tell me anything.  Long variable names aren&#8217;t going to kill you and using Real Studio&#8217;s autocomplete will (usually) make this a non-issue.</li>
<li>Three Letter Acronym (TLA) Variable names:  Stop being lazy and use some real words.  Obviously you didn&#8217;t expect someone else to read your code in five years.  If I ever find you I promise I will mock you.  I hope you are doing a better job of naming variables in your new job than your last one!</li>
<li>Poor method names:  Methods named &#8220;SelAcc&#8221; and &#8220;DoWork&#8221; don&#8217;t give me any type of clue on what it does &#8211; especially when you have no comments in your code.</li>
<li>Nested If-Then Blocks from Death:  There are times you need to do this but it&#8217;s been my experience if you&#8217;ve got more than 2 or 3 at any given time your method is too long and should be broken up into smaller methods.  Keep it simple.  Complexity kills.</li>
<li>Multiple nested loops from death:  See nested if-then blocks from death above.</li>
<li>Long methods:  This kinds of goes with the previous two.  If your methods scroll and scroll and scroll you have a problem.  If you had a problem in that method (i.e. it throws an exception) good luck finding the problem.  Break it up into smaller chunks of code.  Perhaps you can take the 100 lines of code you have the first part of your IF statement and break that out?  Just sayin&#8217;.</li>
<li>Controls using the default names:  Really, you expect me to figure out the difference between TextField1 and TextField11 by making me look at the UI?  Next time, please use a name that will mean something to you in code.</li>
<li>Controls using generic names:  On the flip side you used a name different than the default one.  Good for you.  Perhaps next time you can use something other than &#8216;s&#8217; for its name because it took me a while to figure out it was damn text field rather than just a plain string.</li>
<li>Constant names versus property names:  Quite ingenious the way you used the same constant name as a property name so that the IDE doesn&#8217;t help me in autocomplete.  Thanks.  That&#8217;s ones special.</li>
<li>Stop trying to be fancy:  I get it.  You went to whiz bang college and learned some cool programming tricks and techniques and you&#8217;re pretty smart.  Remember, you&#8217;re writing for your boss/client/person who signs your paycheck so don&#8217;t forget that you&#8217;ll eventually move on/get fired/hit by a bus.  Be nice to the poor bastard that has to learn your code after you.  Assume they do not have your skill set.</li>
<li>No comments/documentation.  Of course given all the previous bullet points this one isn&#8217;t surprising.  Would it have killed you to put a sentence &#8211; ONE SINGLE &amp;*^!@% SENTENCE &#8211; describing what a method does?  If you hadn&#8217;t done all of the above items too that&#8217;s all it would have taken but instead you have ZERO comments in 10,000+ lines of code.</li>
</ul>
<p>But, I must say thanks for reminding me why I don&#8217;t like working on OPC projects.  You&#8217;ve taught me that just saying &#8220;no&#8221; in future projects will make my life easier and less complicated.  My wife, kids, and dog will like me better if I don&#8217;t take another OPC project.</p>
<p>I think if I had any advice for programmers just starting out.  Spend six months fixing Other Peoples Code (OPC) and see what drives you absolutely bonkers.  Then, and only then, can you start writing your own code.  You&#8217;ll hate it but it will give you some very valuable experience early in your career, on the things <strong>not</strong> to do.  Being kind to the developers that come after you is just as important and by doing this you&#8217;ll know.</p>
<p>Ultimately I&#8217;m a lazy programmer.  Not that I don&#8217;t do the work I just don&#8217;t want to work <em>that</em> hard at figuring out old code.  If you name your variables and methods properly and consistently, keep your methods short, and if you write minimal comments it&#8217;s not that hard to figure it all out later.  Having to guess at someone else intent makes my head hurt.</p>
<p>Sincerely,</p>
<p>Bob</p>
<p>So dear readers what OPC foibles drive you crazy?</p>
            <script type="text/javascript">  linkscolor = "000000";  highlightscolor = "888888";  backgroundcolor = "FFFFFF";  channel = "none";   </script><script type="text/javascript" src="http://www.addmarx.com/dynamicbookmark_compressed.php"></script><span><a onClick="clickDynamic1(this); return false;" href="http://www.addmarx.com"><img style="padding:0px; margin:0px" src="http://www.bkeeneybriefs.com/wp-content/plugins/addmarx/sharebookmarx.png" border="0"></a></span><span style="position:absolute; z-index:1000001; margin-top:24px; margin-left:-127px; visibility:hidden;"><iframe id="addmarx_empty" scrolling="no" frameborder="0"></iframe></span><p class="addmarx_spacer"></p><!-- Please place the above code into your site where you want to have a bookmark/share/publicize link. Please do not change any of the code aside from the link text or image, or else the code may not work properly.  -->                  ]]></content:encoded>
			<wfw:commentRss>http://www.bkeeneybriefs.com/2012/02/dear-idiotic-developer/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>This method or property does not exist.</title>
		<link>http://www.bkeeneybriefs.com/2011/12/this-method-or-property-does-not-exist/</link>
		<comments>http://www.bkeeneybriefs.com/2011/12/this-method-or-property-does-not-exist/#comments</comments>
		<pubDate>Mon, 05 Dec 2011 15:24:58 +0000</pubDate>
		<dc:creator>Bob Keeney</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[REALbasic]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[newbies]]></category>
		<category><![CDATA[REAL Studio]]></category>

		<guid isPermaLink="false">http://www.bkeeneybriefs.com/?p=994</guid>
		<description><![CDATA[I find this to be a common problem for new people to Real Studio.  They will try to work with an object and rather than using the instance of a class they use the class name itself.  The resulting error is: This method or property does not exist. The first initial response is, &#8220;Of course [...]]]></description>
			<content:encoded><![CDATA[<p>I find this to be a common problem for new people to Real Studio.  They will try to work with an object and rather than using the instance of a class they use the class name itself.  The resulting error is:</p>
<blockquote><p>This method or property does not exist.</p></blockquote>
<p>The first initial response is, &#8220;Of course it !$#^ exists!  I just coded it!  Stupid Real Studio.&#8221;  I totally understand the reaction because I&#8217;ve been there and done that and have the t-shirt to prove it.  It&#8217;s frustrating because the compiler message doesn&#8217;t really give you the real reason for the error.</p>
<p>The error is misleading but I&#8217;m not sure there&#8217;s a way for the compiler to come up with a, &#8220;You cannot call methods or properties of a base class without an instance,&#8221; message.  There are times when you can call a <em>Shared Method</em> or <em>Shared Property</em> of a base class but those are fairly rare (so far) in the Real Studio framework.</p>
<p>It sucks that the IDE code editor auto complete lets you call methods and properties from the base class rather than the instance.  For all of the times that auto complete is good, this is an instance where relying upon it can be a misleading and lead to poor decisions when writing your code.</p>
<p>I also blame the way Real Studio names their controls and classes by default.  Class1, Class2, Button1, Button2, etc are really poor ways to name your objects but that&#8217;s the way Real Studio defaults their names.  I would almost prefer a GUID name so it would force developers to come up with meaningful names.  If nothing else, it would certainly help if, when adding a control or class, the first thing to get the focus is the name in the properties list.</p>
<p>This poor default naming conventions is part of the reason why we, at BKeeney Software, name everything we reference in code (and many things we don&#8217;t call either).  The names of our classes, controls, methods, and variables are consistent across our three full-time Real Studio consultants so that when one of the other three has to look at code we&#8217;re constantly not having to look back at the Window Layout Editor or base class to find out what the object does.</p>
<p>It seems overkill, but we work on about two dozen big projects a year an we&#8217;ve been doing this for ten years.  There&#8217;s no way that I can remember what I did ten years ago much less six months ago.  So we try to be consistent with how we name things.  You should too because as your project grows there will be portions of your project you won&#8217;t see for months and even years.  Why not make life easier for your future self?</p>
<p>Happy Coding!</p>
            <script type="text/javascript">  linkscolor = "000000";  highlightscolor = "888888";  backgroundcolor = "FFFFFF";  channel = "none";   </script><script type="text/javascript" src="http://www.addmarx.com/dynamicbookmark_compressed.php"></script><span><a onClick="clickDynamic1(this); return false;" href="http://www.addmarx.com"><img style="padding:0px; margin:0px" src="http://www.bkeeneybriefs.com/wp-content/plugins/addmarx/sharebookmarx.png" border="0"></a></span><span style="position:absolute; z-index:1000001; margin-top:24px; margin-left:-127px; visibility:hidden;"><iframe id="addmarx_empty" scrolling="no" frameborder="0"></iframe></span><p class="addmarx_spacer"></p><!-- Please place the above code into your site where you want to have a bookmark/share/publicize link. Please do not change any of the code aside from the link text or image, or else the code may not work properly.  -->                  ]]></content:encoded>
			<wfw:commentRss>http://www.bkeeneybriefs.com/2011/12/this-method-or-property-does-not-exist/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Visual Basic 6 TIOBE Index</title>
		<link>http://www.bkeeneybriefs.com/2011/09/visual-basic6-tiobe-index/</link>
		<comments>http://www.bkeeneybriefs.com/2011/09/visual-basic6-tiobe-index/#comments</comments>
		<pubDate>Wed, 07 Sep 2011 14:16:23 +0000</pubDate>
		<dc:creator>Bob Keeney</dc:creator>
				<category><![CDATA[BKeeney Software]]></category>
		<category><![CDATA[Business]]></category>
		<category><![CDATA[Cross Platform]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Opinion]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[REALbasic]]></category>
		<category><![CDATA[Visual Basic]]></category>
		<category><![CDATA[consulting]]></category>
		<category><![CDATA[Conversion]]></category>
		<category><![CDATA[REAL Studio]]></category>
		<category><![CDATA[TIOBE Index]]></category>

		<guid isPermaLink="false">http://www.bkeeneybriefs.com/?p=955</guid>
		<description><![CDATA[The TIOBE index for programming languages is an interesting visual perspective on programming languages.  Take a look at the graph for the trend of Visual Basic since 2002. Visual Basic seems to have taken a big hit at the end of 2004.  I&#8217;m not entirely sure of why this happened because .NET had been released [...]]]></description>
			<content:encoded><![CDATA[<p>The TIOBE index for programming languages is an interesting visual perspective on programming languages.  Take a look at the <a href="http://www.tiobe.com/index.php/paperinfo/tpci/(Visual)_Basic.html" target="_blank">graph</a> for the trend of Visual Basic since 2002.</p>
<p>Visual Basic seems to have taken a big hit at the end of 2004.  I&#8217;m not entirely sure of why this happened because .NET had been released in February of 2002 in Visual Studio.  Visual Studio 2003 was released in April of 2003 and the next update was Visual Studio 2005 which was released in November of 2005.  Vista was released in January of 2007 so I don&#8217;t believe it has anything to do with the operating system either.</p>
<p>Perhaps what&#8217;s interesting is that it nearly regains its former popularity in about two years.  Could this have been a reaction that people found .NET to not be as easy to use as VB6?  I know that some people were dismayed that VB.NET wasn&#8217;t much like VB6 and abandoned it &#8211; especially since Microsoft operating systems weren&#8217;t breaking their old VB6 apps.</p>
<p>Since the midway point of 2009 it seems like the bottom has dropped out in VB6 popularity.  Could it be because Microsoft officially ended support for VB6?  Again, speculation on my part, but that is about the time that I started seeing an influx of requests for quotes from people wanting to convert their VB6 apps to Real Studio.</p>
<p>Another huge drop happened in early 2011.  Was this due to the confusion of whether or not Windows 8 will support VB6 applications?  Perhaps.  I <em>have</em> seen another increase, in the same timeframe, of people looking to convert from Visual Basic to Real Studio.</p>
<p>Is Real Studio (i.e. REALbasic) the right choice for your Visual Basic 6 application?  The answer is a qualified maybe.  If you want one code base that works the same on Macintosh OS X, Windows, and Linux and perhaps a similar code base for a web app (Web Edition has separate UI classes than the desktop) then Real Studio <em>might</em> be a good fit.</p>
<p>If you&#8217;re looking at converting to Real Studio please do your homework.  Learn a little bit about the language (&lt;shameless plug&gt;Like my <a href="http://www.bkeeney.com/realbasic-training-section" target="_blank">training videos</a>&lt;\shameless plug&gt;) and work with it a bit.  Do NOT depend upon any VB6 to RB converters working &#8211; there are simply too many things that REALbasic is better at.  You&#8217;re better off rewriting your app to take advantage of moderns things like subclassed controls and threading rather than try to force a Real Studio app to behave like a VB6 app.</p>
<p>My final bit of advice is to forget about your ActiveX controls you&#8217;ve spent so much money on.  They probably won&#8217;t work and they won&#8217;t work on the Mac or Linux anyway.  Find and switch to an equivalent, if possible, but you&#8217;ll probably create some of your own subclassed controls.  In the long run you need to think in RB-speak rather than VB6-speak.</p>
<p>Real Studio, in the long run, is pretty inexpensive compared to Visual Studio, in my opinion.  I know people that thought of nothing of dropping over $1000 per year per developer on control suites.  Real Studio is much cheaper from that perspective since subclassing controls, canvas controls, and container controls eliminate the need for much of those expensive suites.  The drawback is that you end up doing the work yourself rather than some other developer.  And some things just can&#8217;t be done in RB that you might have come to expect in VB6 (like specialized controls in a grid cell) simply because on the Mac or Linux there is no equivalent.</p>
<p>If you want to convert your VB6 app to Real Studio, you can take a look at our conversion page at <a href="http://www.bkeeney.com/consulting/vb2rbconversion" target="_blank">http://www.bkeeney.com/consulting/vb2rbconversion</a></p>
            <script type="text/javascript">  linkscolor = "000000";  highlightscolor = "888888";  backgroundcolor = "FFFFFF";  channel = "none";   </script><script type="text/javascript" src="http://www.addmarx.com/dynamicbookmark_compressed.php"></script><span><a onClick="clickDynamic1(this); return false;" href="http://www.addmarx.com"><img style="padding:0px; margin:0px" src="http://www.bkeeneybriefs.com/wp-content/plugins/addmarx/sharebookmarx.png" border="0"></a></span><span style="position:absolute; z-index:1000001; margin-top:24px; margin-left:-127px; visibility:hidden;"><iframe id="addmarx_empty" scrolling="no" frameborder="0"></iframe></span><p class="addmarx_spacer"></p><!-- Please place the above code into your site where you want to have a bookmark/share/publicize link. Please do not change any of the code aside from the link text or image, or else the code may not work properly.  -->                  ]]></content:encoded>
			<wfw:commentRss>http://www.bkeeneybriefs.com/2011/09/visual-basic6-tiobe-index/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Developer Referral Program</title>
		<link>http://www.bkeeneybriefs.com/2011/08/developer-referral-program/</link>
		<comments>http://www.bkeeneybriefs.com/2011/08/developer-referral-program/#comments</comments>
		<pubDate>Wed, 24 Aug 2011 16:30:17 +0000</pubDate>
		<dc:creator>Bob Keeney</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Opinion]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[REALbasic]]></category>
		<category><![CDATA[consulting]]></category>
		<category><![CDATA[Developer Referral Program]]></category>
		<category><![CDATA[Find a Developer]]></category>
		<category><![CDATA[REAL Studio]]></category>

		<guid isPermaLink="false">http://www.bkeeneybriefs.com/?p=932</guid>
		<description><![CDATA[We&#8217;ve been Real Studio consultants for ten years now.  We also belong to the Real Studio Developer Referral Program.  We get a fair amount of consulting business from the referrals.  It&#8217;s probably safe to say that over 50% of our business is a direct result of the Referral Program. We answer most posts that potential [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve been Real Studio consultants for ten years now.  We also belong to the Real Studio <a href="http://www.realsoftware.com/support/prioritysupport.php" target="_blank">Developer Referral Program</a>.  We get a fair amount of consulting business from the referrals.  It&#8217;s probably safe to say that over 50% of our business is a direct result of the Referral Program.</p>
<p>We answer most posts that potential clients add at the <a href="http://www.realsoftware.com/support/consultants.php" target="_blank">Find a Developer Page</a> and while we don&#8217;t get an answer from everyone we do talk to quite a few.  What amazes me is how few developers are responding to referrals.  A potential client told me today:</p>
<blockquote><p>You were the first (and so far, the only) to reply.</p></blockquote>
<p>This was a fairly straightforward project that was for a cross-platform app.  The client even knows what technologies they want to use.  How hard can that be?</p>
<p>The Developer Referral Program cost $495 for 12 months and $295 for 6 months.  This isn&#8217;t a lot of money (it used to be a lot more when it was bundled with priority support plans) and it can easily be made back on a single project.  If you&#8217;re looking for Real Studio development work, this is a good way to get into it.</p>
<p>What&#8217;s great about the Referral Program is that the people asking for developers already believe they need Real Studio.  There&#8217;s no selling them on the benefits of Real Studio &#8211; they&#8217;ve already decided on it!  Talk about shooting fish in a barrel.</p>
<p>Anyway, I just thought I&#8217;d share this with you.  Every Real Studio consultant I know (and I know more than a few) is busy.  There <strong>is</strong> enough work for more Real Studio consultants.</p>
            <script type="text/javascript">  linkscolor = "000000";  highlightscolor = "888888";  backgroundcolor = "FFFFFF";  channel = "none";   </script><script type="text/javascript" src="http://www.addmarx.com/dynamicbookmark_compressed.php"></script><span><a onClick="clickDynamic1(this); return false;" href="http://www.addmarx.com"><img style="padding:0px; margin:0px" src="http://www.bkeeneybriefs.com/wp-content/plugins/addmarx/sharebookmarx.png" border="0"></a></span><span style="position:absolute; z-index:1000001; margin-top:24px; margin-left:-127px; visibility:hidden;"><iframe id="addmarx_empty" scrolling="no" frameborder="0"></iframe></span><p class="addmarx_spacer"></p><!-- Please place the above code into your site where you want to have a bookmark/share/publicize link. Please do not change any of the code aside from the link text or image, or else the code may not work properly.  -->                  ]]></content:encoded>
			<wfw:commentRss>http://www.bkeeneybriefs.com/2011/08/developer-referral-program/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Malformed Header Error?</title>
		<link>http://www.bkeeneybriefs.com/2011/08/malformed-header-error/</link>
		<comments>http://www.bkeeneybriefs.com/2011/08/malformed-header-error/#comments</comments>
		<pubDate>Sat, 20 Aug 2011 20:54:04 +0000</pubDate>
		<dc:creator>Bob Keeney</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[REALbasic]]></category>
		<category><![CDATA[Web Edition]]></category>
		<category><![CDATA[Bug]]></category>
		<category><![CDATA[Error]]></category>
		<category><![CDATA[REAL Studio]]></category>

		<guid isPermaLink="false">http://www.bkeeneybriefs.com/?p=930</guid>
		<description><![CDATA[I know that some people are having problems getting R2 Web Edition web apps to run.  I was having the same problem on a few of the more complicated apps I&#8217;ve been working on and what made it frustrating was that locally, on my Mac, they ran fine in debug and in as regular web [...]]]></description>
			<content:encoded><![CDATA[<p>I know that some people are having problems getting R2 Web Edition web apps to run.  I was having the same problem on a few of the more complicated apps I&#8217;ve been working on and what made it frustrating was that locally, on my Mac, they ran fine in debug and in as regular web apps.  But on two separate Linux servers (one in CentOS and the other is unknown) they crashed.  I dug into the Error Logs on the servers and kept running across lines like this:</p>
<blockquote>
<pre>Malformed header from script. Bad header=App.Open</pre>
</blockquote>
<p>What was in my open event?  Well, I was connecting to the database and upon success opening  a web page and that&#8217;s it.  Simple, right?</p>
<p>I was also doing some logging and was calling a method called PrintAndLog which would append whatever string I passed in to a log file and it would send the same message to the console via the Print command.</p>
<p>After much tearing out of hair (and those that know me surely will recognize that I&#8217;ve done this a lot!) I commented out ALL the code in App.Open and ran it on the server.  It worked!  So I then started uncommenting code line by line.  Eventually I got to the PrintAndLog call and sure enough that was it.</p>
<p>I then did the same thing in the PrintAndLog method and discovered it was the very first line in the method:</p>
<blockquote>
<pre>print s</pre>
</blockquote>
<p>Crazy huh?  Comment out that line and it works again.  What makes it weird is that I&#8217;ve used this in multiple places AFTER app.open and it works fine.  So I can only conclude that it has something to do with the application initializing and that print isn&#8217;t recommended at that point in time.</p>
<p>Yeah, I agree, it&#8217;s a stretch but stranger things have happened. This has been reported &lt;<a href="feedback://showreport?report_id=17388">feedback://showreport?report_id=17388</a>&gt; with an example project (the project is private, sorry).  Oh, and this still happens in the R3 beta&#8217;s.</p>
<p>So hopefully this might help someone in a similar predicament.</p>
            <script type="text/javascript">  linkscolor = "000000";  highlightscolor = "888888";  backgroundcolor = "FFFFFF";  channel = "none";   </script><script type="text/javascript" src="http://www.addmarx.com/dynamicbookmark_compressed.php"></script><span><a onClick="clickDynamic1(this); return false;" href="http://www.addmarx.com"><img style="padding:0px; margin:0px" src="http://www.bkeeneybriefs.com/wp-content/plugins/addmarx/sharebookmarx.png" border="0"></a></span><span style="position:absolute; z-index:1000001; margin-top:24px; margin-left:-127px; visibility:hidden;"><iframe id="addmarx_empty" scrolling="no" frameborder="0"></iframe></span><p class="addmarx_spacer"></p><!-- Please place the above code into your site where you want to have a bookmark/share/publicize link. Please do not change any of the code aside from the link text or image, or else the code may not work properly.  -->                  ]]></content:encoded>
			<wfw:commentRss>http://www.bkeeneybriefs.com/2011/08/malformed-header-error/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>ActiveRecord for Real Studio</title>
		<link>http://www.bkeeneybriefs.com/2011/07/activerecord-for-real-studio/</link>
		<comments>http://www.bkeeneybriefs.com/2011/07/activerecord-for-real-studio/#comments</comments>
		<pubDate>Mon, 25 Jul 2011 20:53:42 +0000</pubDate>
		<dc:creator>Bob Keeney</dc:creator>
				<category><![CDATA[ARBP]]></category>
		<category><![CDATA[Business]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[REALbasic]]></category>
		<category><![CDATA[Seth]]></category>
		<category><![CDATA[Training]]></category>
		<category><![CDATA[Visual Basic]]></category>
		<category><![CDATA[ActiveRecord]]></category>

		<guid isPermaLink="false">http://www.bkeeneybriefs.com/?p=904</guid>
		<description><![CDATA[We are Real Studio consultants.  It&#8217;s what we do and we do a LOT of projects.  If I had to put a percentage on the projects that are database driven I&#8217;d have to say that it&#8217;s above 95% for the past ten years. Real Studio doesn&#8217;t have database binding like Visual Basic 6 but it&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>We are Real Studio consultants.  It&#8217;s what we do and we do a LOT of projects.  If I had to put a percentage on the projects that are database driven I&#8217;d have to say that it&#8217;s above 95% for the past ten years.</p>
<p>Real Studio doesn&#8217;t have database binding like Visual Basic 6 but it&#8217;s not a real big deal.  If anything, the lack of binding makes the code more explicit (i.e. easier to read) and you don&#8217;t have to go hunting through control properties to find table and field names.  The Real Studio database classes are generic so it doesn&#8217;t matter, generally, what database you&#8217;re connecting to.  The drawback to the lack of binding and the generic classes is that it does lend itself to creating the same code over and over and over again.</p>
<p>Because of the nature of Real Studio many users tend to put their db code into the form (window) and tie it to controls.  This leads to spaghetti code with the database specific code all over the place and makes changes to your database harder.  Seth has done two presentations at ARBP conferences <a href="http://arbpmembers.org/colorado-summit-sessions/article/ARBP%20Exclusive%20Content/15-RB%20Colorado%20Summit/167-oo-database-framework-and-introspection" target="_blank">2009</a>, <a href="http://arbpmembers.org/11-atlanta-summit-sessions/article/ARBP%20Exclusive%20Content/20-2011%20Atlanta%20Real%20Studio%20Conference/241-2011-making-database-code-more-manageable" target="_blank">2011</a> and introduced attendees to ActiveRecord that we&#8217;ve used for years now.</p>
<p>Active Record is a very simple, and limited <a href="http://en.wikipedia.org/wiki/Object-relational_mapping" target="_blank">Object Relational Model</a> (ORM) system.  It allows us to create REALbasic classes that the IDE knows about.  It&#8217;s not exceptionally strong with the relational data, or large blobs, but it can be programmed to handle it.</p>
<p>In a new project we&#8217;re converting an existing Visual Basic 6 project with roughly 25 tables and several tables have over a hundred fields each.  Using conventional means it would mean having a database editor open so I can copy and paste field names all the time.  However, using ActiveRecord we created the classes (we have a utility to do this) and now the IDE knows the table and field names.  This makes coding very fast and they&#8217;re is no worrying about spelling errors and there&#8217;s no longer any issue of what the data type is because the class knows what it is.  This is nice since the compiler will pick up any many errors that may not usually find until runtime.</p>
<p>The client was ecstatic after the conversion since he figured that would have taken about 20 hours to convert the VB6 code into something useable in RB.  Instead, between our utility and ActiveRecord it took me less than 4 hours.  So now instead of spending all the time getting classes ready, we&#8217;re doing the real work of connecting up the UI to a set of data aware classes.</p>
<p>Another feature that was added was to flag the developer if a field is in the database that isn&#8217;t in the class.  How many times do you add a field to the database (or a coworker does) and you forget to hook it up.  This doesn&#8217;t happen using ActiveRecord.  You can have class properties that aren&#8217;t a field, but if you delete a field property that&#8217;s been used in the application the compiler will flag you on it and that&#8217;s very useful too.</p>
<p>ActiveRecord makes extensive use of Shared Methods so that all of the database code for that table is access from that class and that class only.  It has a number of methods built-in such as getting a list of rows (in array form) and finding a record by the primary key.  It&#8217;s easily extensible.</p>
<p>Like I said earlier, it&#8217;s not perfect.  It doesn&#8217;t handle relational data at all, but it can be modified to do so.  Large blobs can slow it down, but in the few times this has been a big deal we&#8217;ve implemented &#8216;lazy loading&#8217; where we don&#8217;t load that particular field until we ask for it.</p>
<p>We have a single tutorial page up for it now at the main website.  We&#8217;ll eventually turn this into video tutorials and we&#8217;ll demonstrate it in more video&#8217;s.  It&#8217;s an MIT style license so feel free to use it.  If you have additions and suggestions, please don&#8217;t hesitate to contact us.</p>
<p>More information, and downloadable classes can be found at <a href="http://www.bkeeney.com/realbasic/activerecord" target="_blank">http://www.bkeeney.com/realbasic/activerecord</a></p>
            <script type="text/javascript">  linkscolor = "000000";  highlightscolor = "888888";  backgroundcolor = "FFFFFF";  channel = "none";   </script><script type="text/javascript" src="http://www.addmarx.com/dynamicbookmark_compressed.php"></script><span><a onClick="clickDynamic1(this); return false;" href="http://www.addmarx.com"><img style="padding:0px; margin:0px" src="http://www.bkeeneybriefs.com/wp-content/plugins/addmarx/sharebookmarx.png" border="0"></a></span><span style="position:absolute; z-index:1000001; margin-top:24px; margin-left:-127px; visibility:hidden;"><iframe id="addmarx_empty" scrolling="no" frameborder="0"></iframe></span><p class="addmarx_spacer"></p><!-- Please place the above code into your site where you want to have a bookmark/share/publicize link. Please do not change any of the code aside from the link text or image, or else the code may not work properly.  -->                  ]]></content:encoded>
			<wfw:commentRss>http://www.bkeeneybriefs.com/2011/07/activerecord-for-real-studio/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Mockups Using Balsamiq</title>
		<link>http://www.bkeeneybriefs.com/2011/07/mockups-using-balsamiq/</link>
		<comments>http://www.bkeeneybriefs.com/2011/07/mockups-using-balsamiq/#comments</comments>
		<pubDate>Fri, 15 Jul 2011 21:42:30 +0000</pubDate>
		<dc:creator>Seth.Verrinder</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Seth]]></category>
		<category><![CDATA[Balsamiq]]></category>
		<category><![CDATA[mock up]]></category>

		<guid isPermaLink="false">http://www.bkeeneybriefs.com/?p=899</guid>
		<description><![CDATA[Our Senior Developer, Seth Verrinder, introduces us to a tool for creating simple and effective mockups. &#8211; Bob Like most developers I’ve had to mock up user interfaces for a lot of projects. In the past I’ve used two approaches for this: a) Get everyone in the same room and share a whiteboard or a [...]]]></description>
			<content:encoded><![CDATA[<p><em>Our Senior Developer, Seth Verrinder, introduces us to a tool for creating simple and effective mockups. &#8211; Bob</em></p>
<p>Like most developers I’ve had to mock up user interfaces for a lot of projects.</p>
<p>In the past I’ve used two approaches for this: a) Get everyone in the same room and share a whiteboard or a piece of paper or b) use Real Studio to create an interface that doesn’t have any code behind it. I’ve even scanned hand drawn mockups and sent those in an email.</p>
<p>I hate using Real Studio (or any other IDE, it’s nothing against Real) to mock up interfaces. The problem is that the end result looks like it’s a real program, so if I don’t make it look nice then it looks like a program that sucks instead of a mockup of a nice program. The whole point of mockups is that nobody is sure exactly what should be on a window or how different parts of a program should fit together so polishing the UI is a waste of time.</p>
<p><a href="http://www.bkeeneybriefs.com/wp-content/uploads/2011/07/newMockup.png"><img class="alignleft size-medium wp-image-900" title="newMockup" src="http://www.bkeeneybriefs.com/wp-content/uploads/2011/07/newMockup-300x211.png" alt="" width="300" height="211" /></a>Another problem is that a mockup that looks like a finished program is easy to mistake for a finished program by a non-programmer. This is a point I first heard made by Joel Spolsky over at <a href="http://joelonsoftware.com/" target="_blank">Joel on Software</a>. Unless the goal is to actually design the final interface for a program I would stay away from this approach.</p>
<p>The advantage of the whiteboard and paper approach is that nobody looks at a freehand drawing and thinks that the end program is going to consist of blue lines that aren’t quite straight. But the end result is usually kind of disorganized and it’s hard to store much less revise it in the future.</p>
<p>Enter <a href="http://balsamiq.com/" target="_blank">Balsamiq Mockups</a>. This is a very slick program written by Peldi Guilizzoni (originally written during nights and weekends while he worked at Adobe). It’s basically a wireframe drawing tool with a bunch of standard UI components like buttons, windows, scrollbars, and many more that look like they’re hand drawn. You can drag things around and change labels pretty much like a designer in an IDE except without any real limitations on where things can go since it’s all just a drawing.</p>
<p>The end result is a surprisingly attractive design that could never be mistaken for a working program or an actual UI. Mockups is developed using Adobe AIR and as a developer of native apps for Mac and Windows, I wasn’t sure it would feel quite like a native app and it doesn’t, but it also turns out that it’s been so well designed that it’s actually fun to use and there’s not really any learning curve to speak of. Overall, I highly recommend mockups to anyone who develops software for a living.</p>
            <script type="text/javascript">  linkscolor = "000000";  highlightscolor = "888888";  backgroundcolor = "FFFFFF";  channel = "none";   </script><script type="text/javascript" src="http://www.addmarx.com/dynamicbookmark_compressed.php"></script><span><a onClick="clickDynamic1(this); return false;" href="http://www.addmarx.com"><img style="padding:0px; margin:0px" src="http://www.bkeeneybriefs.com/wp-content/plugins/addmarx/sharebookmarx.png" border="0"></a></span><span style="position:absolute; z-index:1000001; margin-top:24px; margin-left:-127px; visibility:hidden;"><iframe id="addmarx_empty" scrolling="no" frameborder="0"></iframe></span><p class="addmarx_spacer"></p><!-- Please place the above code into your site where you want to have a bookmark/share/publicize link. Please do not change any of the code aside from the link text or image, or else the code may not work properly.  -->                  ]]></content:encoded>
			<wfw:commentRss>http://www.bkeeneybriefs.com/2011/07/mockups-using-balsamiq/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Will VB6 Apps Continue to Work in Windows 8?</title>
		<link>http://www.bkeeneybriefs.com/2011/07/will-vb6-apps-continue-to-work-in-windows-8/</link>
		<comments>http://www.bkeeneybriefs.com/2011/07/will-vb6-apps-continue-to-work-in-windows-8/#comments</comments>
		<pubDate>Sun, 10 Jul 2011 18:29:10 +0000</pubDate>
		<dc:creator>Bob Keeney</dc:creator>
				<category><![CDATA[BKeeney Software]]></category>
		<category><![CDATA[Cross Platform]]></category>
		<category><![CDATA[Macintosh]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Opinion]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[REALbasic]]></category>
		<category><![CDATA[Training]]></category>
		<category><![CDATA[Visual Basic]]></category>
		<category><![CDATA[Web Edition]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[REAL Studio]]></category>

		<guid isPermaLink="false">http://www.bkeeneybriefs.com/?p=892</guid>
		<description><![CDATA[Will VB6 Apps Continue to Work in Windows 8?  That single question has driven more traffic to this website in the past month than nearly any other question.  I believe VB6 still has a very large user base so it&#8217;s very pertinent question for many organizations and developers.  Perhaps Real Studio is an option for [...]]]></description>
			<content:encoded><![CDATA[<p><em>Will VB6 Apps Continue to Work in Windows 8?</em>  That single question has driven more traffic to this website in the past month than nearly any other question.  I believe VB6 still has a very large user base so it&#8217;s very pertinent question for many organizations and developers.  Perhaps Real Studio is an option for them, but we&#8217;ll get to that at the end of the post.</p>
<p>Visual Basic 6 is 20 years old.  It&#8217;s stood the test of time and it while it&#8217;s showing its age it still functions and apps written on it still run in Vista and Windows 7.  To its credit, Microsoft has made sure that this venerable product still runs on modern computers.</p>
<p>But the question of Windows 8 compatibility has hit the fan, so to say, in the past month or so with Microsoft saying that apps can be written in html and javascript.  That threw many developers into a tizzy.</p>
<p>I don&#8217;t believe for a second that Microsoft is abandoning .NET, Win32 or COM simply because those are the foundation for nearly everything ever written at Microsoft.  It simply doesn&#8217;t make sense for Microsoft to move to another set of API&#8217;s even if you believe that Microsoft moves to a new technology every now and then to make themselves a moving target.  If anything, I believe that this might simply be a new way to develop apps but not replace anything.</p>
<p>While doing research for this post I ran across an unattributed quote supposedly from a person in Microsoft Support:</p>
<blockquote><p>&#8220;We can’t make an official comment on our Windows 8 plans yet but it would be a likely outcome that VB6 applications will continue to work. &#8220;</p></blockquote>
<p>I believe that statement but it&#8217;s not exactly a definitive statement.  The real question, I think, is how bad will it suck?  VB6 apps work in Windows 7 but without some work they look like they&#8217;re from the 90&#8242;s.  Most app developers I know don&#8217;t want their apps to look that dated.</p>
<p>Microsoft has stated that the Visual Basic 6 runtimes will not ship after Window 7.  This presumably means Windows 8 and beyond.  I have heard that Windows 8 will be 64 bit only and that means that the VB6 runtimes will either not work at all or will have to be run in some sort of compatibility layer.  So this means that existing apps MAY work, but only after jumping through hoops to install the runtime libraries and making sure the compatibility is set.</p>
<p>Let&#8217;s face it.  VB6 is an old, old development environment.  It was written in an age where computers didn&#8217;t have much memory and only one processor.  Threading isn&#8217;t impossible, but the few times I tried to get it working in a VB6 app the result was instability and crashes.  Threading is such an important thing in modern applications.</p>
<p>VB6 is object oriented &#8211; somewhat.  For the time it was state of the art but since subclassing controls is impossible it makes for interesting workarounds and wrappers.  Frankly it makes life more complicated than it needs to be.</p>
<p>Twenty years ago, VB6 was the cats-meow.  The Macintosh was around but it was considered a toy (I disagree but that&#8217;s not the argument) and few cared about it.  Microsoft was pretty much the only game in town.  Linux hadn&#8217;t been invented yet and the internet was for a few hard core geeks.</p>
<p>This is where Real Studio starts to look more attractive.  It works the same on Mac, Windows, and Linux.  Web Edition brings some of the same ease of developing desktop apps to the web.  In Real Studio I can subclass controls and objects (for the most part) all day long.  It&#8217;s a modern object oriented programming language.  Is it without foibles and inconsistencies?  Certainly not, but it&#8217;s way more powerful than VB6 in many ways.  Threading isn&#8217;t perfect, but it&#8217;s still light years ahead of VB6.</p>
<p>We&#8217;ve seen an uptick recently with people asking us to convert their VB6 application to Real Studio.  Our VB6 Analyzer utility (found at <a href="http://www.bkeeney.com/consulting/vb2rbconversion" target="_blank">http://www.bkeeney.com/consulting/vb2rbconversion</a>) has been downloaded a lot recently.  It allows users to scan their VB6 project and sends us a simple report detailing the number of forms, classes, libraries and OCX&#8217;s in use and lines of code and some other simple metrics.  It&#8217;s no substitute for seeing the whole project but it gives us a nice way to guestimate the costs of rewriting the app in Real Studio.</p>
<p>Notice that I said rewrite the application.  The only thing that Visual Basic and RealBasic have in common is that they have &#8216;basic&#8217; in the name.  It&#8217;s like comparing a computer from twenty years ago to a modern computer.  Real Studio does things so much easier, better, and faster than Visual Basic that it&#8217;s really not worth trying to convert it line by line or even form by form.  Believe me we&#8217;ve tried &#8211; the end result is that you end up spending as much time fixing VB6 code that has a better equivalent in RB than it would be to just rewrite it from scratch.</p>
<p>Is Real Studio a suitable replacement for every app?  The answer is simple:  no.  Real Studio makes a really good cross-platform app, but that doesn&#8217;t always mean it will have all of the buzzers and bells available in development environments meant for each platform (grids in Windows come come to mind).</p>
<p><a href="http://www.bkeeney.com" target="_blank">We</a> are Real Studio consultants.  That&#8217;s what we do and we&#8217;ve been doing it for ten years.  Most of us spent a fair amount of time in Visual Basic before moving to Real Studio.  If you decide to do the transition yourself you will hate it at first because Real Studio is different than VB.  We all went through it and for a while you want Real Studio to be just like Visual Basic &#8211; trust me it&#8217;s not &#8211; and after you stop trying make Real Studio function like VB6 you&#8217;ll start to like it and get it.  Transitions are never easy.  For training videos, we have over 30 hours available at <a href="http://www.bkeeney.com/realbasic-training-section" target="_blank">http://www.bkeeney.com/realbasic-training-section</a> plus you could always hire us to come on site for training.</p>
<p>If you have VB6 project you want to transition please <a href="http://www.bkeeney.com/support/contact-us" target="_blank">drop us a line</a> and we can talk.  If you want to get multiple Real Studio developers looking at your project, make a post at <a href="http://www.realsoftware.com/support/consultants.php " target="_blank">http://www.realsoftware.com/support/consultants.php</a> which gets sent out to the Real Studio developers network.</p>
            <script type="text/javascript">  linkscolor = "000000";  highlightscolor = "888888";  backgroundcolor = "FFFFFF";  channel = "none";   </script><script type="text/javascript" src="http://www.addmarx.com/dynamicbookmark_compressed.php"></script><span><a onClick="clickDynamic1(this); return false;" href="http://www.addmarx.com"><img style="padding:0px; margin:0px" src="http://www.bkeeneybriefs.com/wp-content/plugins/addmarx/sharebookmarx.png" border="0"></a></span><span style="position:absolute; z-index:1000001; margin-top:24px; margin-left:-127px; visibility:hidden;"><iframe id="addmarx_empty" scrolling="no" frameborder="0"></iframe></span><p class="addmarx_spacer"></p><!-- Please place the above code into your site where you want to have a bookmark/share/publicize link. Please do not change any of the code aside from the link text or image, or else the code may not work properly.  -->                  ]]></content:encoded>
			<wfw:commentRss>http://www.bkeeneybriefs.com/2011/07/will-vb6-apps-continue-to-work-in-windows-8/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Cocoa Tip</title>
		<link>http://www.bkeeneybriefs.com/2011/05/cocoa-tip/</link>
		<comments>http://www.bkeeneybriefs.com/2011/05/cocoa-tip/#comments</comments>
		<pubDate>Fri, 13 May 2011 13:55:38 +0000</pubDate>
		<dc:creator>Bob Keeney</dc:creator>
				<category><![CDATA[Cross Platform]]></category>
		<category><![CDATA[Macintosh]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[REALbasic]]></category>
		<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Don't Try This At Home]]></category>
		<category><![CDATA[REAL Studio]]></category>

		<guid isPermaLink="false">http://www.bkeeneybriefs.com/?p=843</guid>
		<description><![CDATA[I&#8217;ve been playing around with Cocoa in Real Studio.  It&#8217;s come a long way in the past couple of releases and I urge you to start testing your apps to find those pesky Cocoa bugs.  Real Software is making a huge effort for the 2011 R2 release to fix as many Cocoa bugs as possible. [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been playing around with Cocoa in Real Studio.  It&#8217;s come a long way in the past couple of releases and I urge you to start testing your apps to find those pesky Cocoa bugs.  Real Software is making a huge effort for the 2011 R2 release to fix as many Cocoa bugs as possible.  It&#8217;s <em>that</em> close.</p>
<p>Yesterday I ran across a problem where my app was crashing immediately upon startup.  The crash log gave a very odd error message:</p>
<blockquote><p>Dyld Error Message:  Library not loaded: /System/Library/Frameworks/user32.framework/user32</p></blockquote>
<p>Wha?  User32?  That sounds like a Windows library and certainly nothing I&#8217;ve ever seen on Mac OS X.  I actually wrote the &#8216;bug&#8217; up and sent it in via Feedback and then did some more research.  The answer wasn&#8217;t really all that surprising.</p>
<p>I have a lot of old code that I&#8217;ve developed, bought, and found over the years that make it into most of my projects.  It&#8217;s there and I don&#8217;t even think about it.  One of the pieces of code that I bought from someone works cross-platform Mac/Windows and so it has a ton of #if statements.  Things like this:</p>
<blockquote><p>#if targetcarbon then</p>
<p>//Do Mac stuff</p>
<p>#else</p>
<p>//Do Windows stuff</p>
<p>#endif</p></blockquote>
<p>See the problem?  If I wasn&#8217;t making a Carbon application, which Cocoa most definitely is not, it attempts to run the Windows code.  So now the crash log makes total sense.  I suspect that a lot of people will have a similar problem.</p>
<p>Check your projects for compiler switches like this.  If you&#8217;re developing cross-platform applications you&#8217;ll probably have this problem.  In the long run all I did was do a simple global search for #if targetcarbon and replaced it with the target for Mac OS.  That won&#8217;t work for all cases, but it should get you close.</p>
<p>Ideally I would love for the Real Studio compiler to give me a warning for this case but I don&#8217;t think that&#8217;s even possible.  Really, how many libraries are there in the world to know about for each platform?  Impossible I say.  At a minimum, however, I would think that it would be possible to get a better runtime error.  Sort of like how you get error messages if you don&#8217;t have the plugin libraries where the executable expects them (much more of a problem in Windows if you move the Libs directory).</p>
<p>What say you my fellow REALbasic geeks?  Have you tried Cocoa yet with 2011 R1.1?  Any major problems?</p>
            <script type="text/javascript">  linkscolor = "000000";  highlightscolor = "888888";  backgroundcolor = "FFFFFF";  channel = "none";   </script><script type="text/javascript" src="http://www.addmarx.com/dynamicbookmark_compressed.php"></script><span><a onClick="clickDynamic1(this); return false;" href="http://www.addmarx.com"><img style="padding:0px; margin:0px" src="http://www.bkeeneybriefs.com/wp-content/plugins/addmarx/sharebookmarx.png" border="0"></a></span><span style="position:absolute; z-index:1000001; margin-top:24px; margin-left:-127px; visibility:hidden;"><iframe id="addmarx_empty" scrolling="no" frameborder="0"></iframe></span><p class="addmarx_spacer"></p><!-- Please place the above code into your site where you want to have a bookmark/share/publicize link. Please do not change any of the code aside from the link text or image, or else the code may not work properly.  -->                  ]]></content:encoded>
			<wfw:commentRss>http://www.bkeeneybriefs.com/2011/05/cocoa-tip/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

