<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE rss [<!ENTITY % HTMLlat1 PUBLIC "-//W3C//ENTITIES Latin 1 for XHTML//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent">]>
<rss version="2.0" xml:base="http://www.angelocomputers.com">
<channel>
 <title>Angelo Computers - realbasic gems</title>
 <link>http://www.angelocomputers.com/taxonomy/term/3/0</link>
 <description>Auto generated by aggregator2 autotaxonomy</description>
 <language>en</language>
<item>
 <title>REALLoadGlobalMethod doesn&#039;t do what you might think</title>
 <link>http://www.angelocomputers.com/realloadglobalmethod_doesnt_do_what_you_might_think.html</link>
 <description>&lt;p&gt;This topic came up recently on the forums, and so I figured it might make a bit of sense to discuss what REALLoadGlobalMethod is.  It&#039;s a plugin SDK function that is part of the dynamic access set of APIs.  However, it&#039;s also total misnomer, as it&#039;s job is not to load up global methods like you might think.&lt;/p&gt;  &lt;p&gt;The duty of this API is to load up global &lt;em&gt;framework&lt;/em&gt; methods.  That&#039;s it, and nothing more.  It does not, cannot and will not load up anything outside of the select handful of framework functions that we provide.  This is a problem because the name of the API certainly doesn&#039;t imply that... and the parameter signature of the function exacerbates the issue by providing a parameter to specify what module to load the function from!&lt;/p&gt;
</description>
 <source url="http://ramblings.aaronballman.com/index.xml">REALBasic</source>
 <category domain="http://www.angelocomputers.com/feed/realbasic_gems">realbasic gems</category>
 <pubDate>Thu, 21 Feb 2008 21:29:49 +0000</pubDate>
</item>
<item>
 <title>REALLoadGlobalMethod doesn&#039;t do what you might think</title>
 <link>http://www.angelocomputers.com/realloadglobalmethod_doesnt_do_what_you_might_think.html_0</link>
 <description>&lt;p&gt;This topic came up recently on the forums, and so I figured it might make a bit of sense to discuss what REALLoadGlobalMethod is.  It&#039;s a plugin SDK function that is part of the dynamic access set of APIs.  However, it&#039;s also total misnomer, as it&#039;s job is not to load up global methods like you might think.  The duty of this API is to load up global &lt;em&gt;framework&lt;/em&gt; methods.  That&#039;s it, and nothing more.  It does not, cannot and will not load up anything outside of the select handful of framework functions that we provide.  This is a problem because the name of the API certainly doesn&#039;t imply that...&lt;/p&gt;
</description>
 <source url="http://ramblings.aaronballman.com/index.xml">REALBasic</source>
 <category domain="http://www.angelocomputers.com/feed/realbasic_gems">realbasic gems</category>
 <pubDate>Thu, 21 Feb 2008 21:29:40 +0000</pubDate>
</item>
<item>
 <title>Little-known datatype fact</title>
 <link>http://www.angelocomputers.com/little_known_datatype_fact.html_0</link>
 <description>&lt;p&gt;REALbasic used to have some datatypes which were only legal in declares, like CString and PString -- however, in recent history (several releases back, but I forget when), these became first-class datatypes.  This means that you can use them outside of the context of declares.  However, their use is quite limited outside of declares, so I&#039;d strongly advise against using them as general purpose datatypes.  Just use String if you&#039;re not going to monkey with declares.  That being said, all of the new string datatypes are essentially a type of Ptr.  CString is a pointer to a null-terminated, ANSI C string.&lt;/p&gt;
</description>
 <source url="http://ramblings.aaronballman.com/index.xml">REALBasic</source>
 <category domain="http://www.angelocomputers.com/feed/realbasic_gems">realbasic gems</category>
 <pubDate>Wed, 20 Feb 2008 17:00:40 +0000</pubDate>
</item>
<item>
 <title>Little-known datatype fact</title>
 <link>http://www.angelocomputers.com/little_known_datatype_fact.html</link>
 <description>&lt;p&gt;REALbasic used to have some datatypes which were only legal in declares, like CString and PString -- however, in recent history (several releases back, but I forget when), these became first-class datatypes.  This means that you can use them outside of the context of declares.  However, their use is quite limited outside of declares, so I&#039;d strongly advise against using them as general purpose datatypes.  Just use String if you&#039;re not going to monkey with declares.&lt;/p&gt;  &lt;p&gt;That being said, all of the new string datatypes are essentially a type of Ptr.  CString is a pointer to a null-terminated, ANSI C string.  WString is a pointer to a null-terminate ANSI wchar_t string.  PString is a pointer to a typical Pascal string (up to 255 characters long).  CFStringRef is, crazily enough, a CFStringRef (only useful in Carbon and Cocoa), which is an opaque string pointer.  This has an interesting ramification when it comes to declares.&lt;/p&gt;
</description>
 <source url="http://ramblings.aaronballman.com/index.xml">REALBasic</source>
 <category domain="http://www.angelocomputers.com/feed/realbasic_gems">realbasic gems</category>
 <pubDate>Wed, 20 Feb 2008 17:00:18 +0000</pubDate>
</item>
<item>
 <title>2008r1 Awesome Stuff!</title>
 <link>http://www.angelocomputers.com/2008r1_awesome_stuff.html_0</link>
 <description>&lt;p&gt;Here&#039;s my list of the awesome things I love about 2008r1, in no particular order:
&lt;ul&gt;
&lt;li&gt;Introspection is rather neat.  It&#039;s not the coolest thing ever, but it certainly has some nice functionality to it.  For instance, I can now create COM interface producers with a little more ease by introspecting an object in order to do the vtable hookups.  There are some other awesome things you can do with introspection as well, such as serializing an object in an automated fashion.  However, until you&#039;re able to create an object by name, unserializing is still kind of painful.&lt;/li&gt;
&lt;li&gt;The ability to put anything into a variant, including arrays.&lt;br /&gt;
</description>
 <source url="http://ramblings.aaronballman.com/index.xml">REALBasic</source>
 <category domain="http://www.angelocomputers.com/feed/realbasic_gems">realbasic gems</category>
 <pubDate>Mon, 11 Feb 2008 17:00:40 +0000</pubDate>
</item>
<item>
 <title>2008r1 Awesome Stuff!</title>
 <link>http://www.angelocomputers.com/2008r1_awesome_stuff.html</link>
 <description>&lt;p&gt;Here&#039;s my list of the awesome things I love about 2008r1, in no particular order:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Introspection is rather neat.  It&#039;s not the coolest thing ever, but it certainly has some nice functionality to it.  For instance, I can now create COM interface producers with a little more ease by introspecting an object in order to do the vtable hookups.  There are some other awesome things you can do with introspection as well, such as serializing an object in an automated fashion.  However, until you&#039;re able to create an object by name, unserializing is still kind of painful.&lt;/li&gt;
&lt;li&gt;The ability to put anything into a variant, including arrays.  Variants used to be handy, but now they down-right rock!  This means you can store an array into a dictionary, for instance.  So I can finally polish up a really nice preferences class interface!&lt;/li&gt;
&lt;li&gt;This is a little feature, but one I still really enjoy.  I have a mouse with extra buttons on it for performing common actions like back and forward.  I use these buttons constantly while browsing the web, as well as within Windows Explorer.  The IDE used to ignore these buttons, but no longer!  I can also use some of the extended keyboard buttons for functionality like search, cut/copy/paste, etc.  Very minor, but still a really nice thing.&lt;/li&gt;
&lt;li&gt;A whole bunch of work was done to make Win32 functionality more Unicode-savvy, which is always great.  Since RB only supports Win2k and higher, it&#039;s about time to see the last vestiges of ANSI support go away and be replaced with Unicode.&lt;/li&gt;
&lt;li&gt;Deprecations and removals!  I know that may seem odd to be part of my &quot;awesome stuff&quot; list, but I strongly approve of deprecating functionality which would otherwise be ignored.  This opens up the market to 3rd party developers who want to take over and provide that functionality, if it&#039;s necessary.  It also removes cruft from the RB framework, which is always great.&lt;/li&gt;
&lt;li&gt;There&#039;s a new compiler feature that allows you to specify that a method implements a particular interface method explicitly.  This is useful if you don&#039;t care for a particular interface&#039;s nomenclature.  For instance, let&#039;s say an interface exposes a method called WriteError, but you really don&#039;t like that as it doesn&#039;t fit with your class&#039; API.  You can have the class implement a method called SpiffyError which Implements SomeInterface.WriteError instead.  This may not seem too useful now, but it has connotations for the future that are very exciting.&lt;/li&gt;
 &lt;/ul&gt;
  &lt;p&gt;What things do you really like about 2008r1?  Any particular feature you absolutely adore?  Any bug fix you were excited to see taken care of?&lt;/p&gt;
</description>
 <source url="http://ramblings.aaronballman.com/index.xml">REALBasic</source>
 <category domain="http://www.angelocomputers.com/feed/realbasic_gems">realbasic gems</category>
 <pubDate>Mon, 11 Feb 2008 17:00:15 +0000</pubDate>
</item>
<item>
 <title>Differentials make a difference!</title>
 <link>http://www.angelocomputers.com/differentials_make_a_difference.html_0</link>
 <description>&lt;p&gt;A lot of times, reducing a bug report to the simplest possible example isn&#039;t quite enough.  The thing that really makes the difference between fixing a bug quickly or not is giving information about what works and what doesn&#039;t work.  Here&#039;s a great example that I culled down from a recent bug report. &lt;/p&gt;
&lt;pre&gt;&lt;code&gt; Dim m As MemoryBlock = NewMemoryBlock( 128*4 )  Dim p As Ptr = m  Dim i As Integer = 264  p.Single(i) = p.Single(i) + 2.0  MsgBox Str( p.Single( i ) )  &lt;/code&gt;&lt;/pre&gt;&lt;p&gt; This code would display the value &quot;0&quot; instead of &quot;2&quot;, and then crash.   However, if you replace every instance of &quot;i&quot; with 264, then the crash would go away.&lt;/p&gt;
</description>
 <source url="http://ramblings.aaronballman.com/index.xml">REALBasic</source>
 <category domain="http://www.angelocomputers.com/feed/realbasic_gems">realbasic gems</category>
 <pubDate>Sun, 10 Feb 2008 03:44:40 +0000</pubDate>
</item>
<item>
 <title>Differentials make a difference!</title>
 <link>http://www.angelocomputers.com/differentials_make_a_difference.html</link>
 <description>&lt;p&gt;A lot of times, reducing a bug report to the simplest possible example isn&#039;t quite enough.  The thing that really makes the difference between fixing a bug quickly or not is giving information about what works and what doesn&#039;t work.  Here&#039;s a great example that I culled down from a recent bug report. &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;br /&gt; Dim m As MemoryBlock = NewMemoryBlock( 128*4 ) &lt;br /&gt; Dim p As Ptr = m &lt;br /&gt; Dim i As Integer = 264 &lt;br /&gt; p.Single(i) = p.Single(i) + 2.0 &lt;br /&gt; MsgBox Str( p.Single( i ) ) &lt;br /&gt; &lt;/code&gt;&lt;/pre&gt;&lt;p&gt; This code would display the value &quot;0&quot; instead of &quot;2&quot;, and then crash.   However, if you replace every instance of &quot;i&quot; with 264, then the crash would go away.  Like this: &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;br /&gt; Dim m As MemoryBlock = NewMemoryBlock( 128*4 ) &lt;br /&gt; Dim p As Ptr = m &lt;br /&gt; Dim i As Integer = 264 &lt;br /&gt; p.Single(264) = p.Single(264) + 2.0 &lt;br /&gt; MsgBox Str( p.Single( 264 ) ) &lt;br /&gt; &lt;/code&gt;&lt;/pre&gt;&lt;p&gt; &lt;em&gt;That&lt;/em&gt; is what I mean by &quot;differential.&quot;  In one case, it crashes, and in the other case it works.&lt;/p&gt;
</description>
 <source url="http://ramblings.aaronballman.com/index.xml">REALBasic</source>
 <category domain="http://www.angelocomputers.com/feed/realbasic_gems">realbasic gems</category>
 <pubDate>Sun, 10 Feb 2008 03:44:05 +0000</pubDate>
</item>
<item>
 <title>REALbasic is not C++</title>
 <link>http://www.angelocomputers.com/realbasic_is_not_c.html</link>
 <description>&lt;p&gt;This statement should strike you as obvious for many reasons, syntax being the most prominent.  However, it does bear repeating on occasion for some of the lesser-known differences between the two languages.  At their heart, most OO languages have a lot of similarities between one another.  After all, just how many different ways are there to encapsulate data and logic?&lt;/p&gt;  &lt;p&gt;One major cross-over feature of all object oriented languages is the concept of a class constructor.  The compiler inserts some magical code for you whenever you create a new instance of a class that automatically calls this special function.  This way, the programmer can be assured that there is no possible way to allocate a valid class instance without calling this special method.  It&#039;s perfect for initialization tasks that need to run before everything else.&lt;/p&gt;
</description>
 <source url="http://ramblings.aaronballman.com/index.xml">REALBasic</source>
 <category domain="http://www.angelocomputers.com/feed/realbasic_gems">realbasic gems</category>
 <pubDate>Mon, 04 Feb 2008 18:12:52 +0000</pubDate>
</item>
<item>
 <title>REALbasic is not C++</title>
 <link>http://www.angelocomputers.com/realbasic_is_not_c.html_0</link>
 <description>&lt;p&gt;This statement should strike you as obvious for many reasons, syntax being the most prominent.  However, it does bear repeating on occasion for some of the lesser-known differences between the two languages.  At their heart, most OO languages have a lot of similarities between one another.  After all, just how many different ways are there to encapsulate data and logic?  One major cross-over feature of all object oriented languages is the concept of a class constructor.  The compiler inserts some magical code for you whenever you create a new instance of a class that automatically calls this special function.&lt;/p&gt;
</description>
 <source url="http://ramblings.aaronballman.com/index.xml">REALBasic</source>
 <category domain="http://www.angelocomputers.com/feed/realbasic_gems">realbasic gems</category>
 <pubDate>Mon, 04 Feb 2008 18:12:40 +0000</pubDate>
</item>
<item>
 <title>Complex UIs can lead to &quot;strange&quot; compile errors</title>
 <link>http://www.angelocomputers.com/complex_uis_can_lead_to_strange_compile_errors.html</link>
 <description>&lt;p&gt;I noticed a bug report came in this morning about an error message that didn&#039;t make sense to the reporter.  I figured this would make an excellent blog topic, since it explains not only the why but the how to fix it.&lt;/p&gt;  &lt;p&gt;The reporter had a complex window, and when they would compile their project, they would get an error complaining about &quot;method uses 37k of stack space, but the limit is 32k&quot;. Name: NameOfWindowGoesHere&quot;  This may seem like a very confusing error message because the name being reported is a window, not a method!&lt;/p&gt;  &lt;p&gt;This goes back to a previous blog posting I made about &lt;a href=&quot;http://ramblings.aaronballman.com/2007/06/windows_a_weird_odyssey.html&quot;&gt;how windows work&lt;/a&gt; within REALbasic.  A window isn&#039;t just this magical thing that the compiler knows about.  In fact, the compiler actually has no idea what a window object is!  To the compiler, it&#039;s just another class and there&#039;s nothing special about it.  Everything special derives from the IDE rendering out your window object in a way that makes the magic happen.&lt;/p&gt;
</description>
 <source url="http://ramblings.aaronballman.com/index.xml">REALBasic</source>
 <category domain="http://www.angelocomputers.com/feed/realbasic_gems">realbasic gems</category>
 <pubDate>Fri, 01 Feb 2008 18:40:53 +0000</pubDate>
</item>
<item>
 <title>Complex UIs can lead to &quot;strange&quot; compile errors</title>
 <link>http://www.angelocomputers.com/complex_uis_can_lead_to_strange_compile_errors.html_0</link>
 <description>&lt;p&gt;I noticed a bug report came in this morning about an error message that didn&#039;t make sense to the reporter.  I figured this would make an excellent blog topic, since it explains not only the why but the how to fix it.  The reporter had a complex window, and when they would compile their project, they would get an error complaining about &quot;method uses 37k of stack space, but the limit is 32k&quot;. Name: NameOfWindowGoesHere&quot;  This may seem like a very confusing error message because the name being reported is a window, not a method!  This goes back to a previous blog posting I made about &lt;a href=&quot;http://ramblings.aaronballman.com/2007/06/windows_a_weird_odyssey.html&quot;&gt;how windows work&lt;/a&gt; within REALbasic.&lt;/p&gt;
</description>
 <source url="http://ramblings.aaronballman.com/index.xml">REALBasic</source>
 <category domain="http://www.angelocomputers.com/feed/realbasic_gems">realbasic gems</category>
 <pubDate>Fri, 01 Feb 2008 18:40:40 +0000</pubDate>
</item>
<item>
 <title>VirtualVolume Gotcha</title>
 <link>http://www.angelocomputers.com/virtualvolume_gotcha.html</link>
 <description>&lt;p&gt;So I had cause to play around with VirtualVolumes for a project today, and I ran into a gotcha that you really should watch out for.  It turns out that VirtualVolumes don&#039;t play nice with UTF-16 encodings, at least with regards to the file operations.  I was getting file paths from the command line, which on NT-based versions of Windows will usually be in UTF-16.  I was then using this information to create a folder hierarchy within a virtual volume, and couldn&#039;t figure out why my folders were never being created.  What was even more strange was that the code worked when the paths were just string constants!  Basically, this would work:&lt;br /&gt; &lt;code&gt;someVV.Child( &quot;Test&quot; ).CreateAsFolder&lt;/code&gt;&lt;br /&gt; while this would fail:&lt;br /&gt; &lt;code&gt;someVV.Child( commandLineArg ).CreateAsFolder&lt;/code&gt;&lt;br /&gt; It took quite a while to track down the fact that it was encodings related because the failure mode was to just silently not create the folder.  No LastErrorCode, nothing.  The only way I found out there was an issue was because a subsequent call to create a file was returning a nil stream back to me when it shouldn&#039;t have.  Yikes!&lt;/p&gt;
</description>
 <source url="http://ramblings.aaronballman.com/index.xml">REALBasic</source>
 <category domain="http://www.angelocomputers.com/feed/realbasic_gems">realbasic gems</category>
 <pubDate>Fri, 01 Feb 2008 02:09:52 +0000</pubDate>
</item>
<item>
 <title>VirtualVolume Gotcha</title>
 <link>http://www.angelocomputers.com/virtualvolume_gotcha.html_0</link>
 <description>&lt;p&gt;So I had cause to play around with VirtualVolumes for a project today, and I ran into a gotcha that you really should watch out for.  It turns out that VirtualVolumes don&#039;t play nice with UTF-16 encodings, at least with regards to the file operations.  I was getting file paths from the command line, which on NT-based versions of Windows will usually be in UTF-16.  I was then using this information to create a folder hierarchy within a virtual volume, and couldn&#039;t figure out why my folders were never being created.  What was even more strange was that the code worked when the paths were just string constants!  Basically, this would work: &lt;code&gt;someVV.Child( &quot;Test&quot; ).CreateAsFolder&lt;/code&gt; while this would fail: &lt;code&gt;someVV.Child( commandLineArg ).CreateAsFolder&lt;/code&gt; It took quite a while to track down the fact that it was encodings related because the failure mode was to just silently not create the folder.&lt;/p&gt;
</description>
 <source url="http://ramblings.aaronballman.com/index.xml">REALBasic</source>
 <category domain="http://www.angelocomputers.com/feed/realbasic_gems">realbasic gems</category>
 <pubDate>Fri, 01 Feb 2008 02:09:40 +0000</pubDate>
</item>
<item>
 <title>RBLibrary.com is under new ownership</title>
 <link>http://www.angelocomputers.com/rblibrary_com_is_under_new_ownership.html_0</link>
 <description>&lt;p&gt;Riverside, California (January 28, 2008) - RBLibrary.com is happy to announce the purchase of RBLibrary by Great White Software.  &quot;We are proud of providing expert articles about REALbasic to the community, and are excited that Great White Software can continue this tradition.&quot;, said RBLibrary co-founder Aaron Ballman.  &quot;Great White Software has been providing REALbasic users with excellent software and services for the past ten years and we&#039;re pleased to see them continue their commitment to the REALbasic community by acquiring RBLibrary.&quot;  &quot;We acquired this site so that REALbasic users will continue to have a well-known, trusted, and dependable source of information about REALbasic.&quot; stated Norman Palardy, principal of Great White Software.&lt;/p&gt;
</description>
 <source url="http://ramblings.aaronballman.com/index.xml">REALBasic</source>
 <category domain="http://www.angelocomputers.com/feed/realbasic_gems">realbasic gems</category>
 <pubDate>Mon, 28 Jan 2008 22:31:39 +0000</pubDate>
</item>
</channel>
</rss>
