Recently in REALbasic Gems Category

REALbasic 2008 Release 2 had a very important change that people are discussing with regards to the way executables are built on Windows. In previous versions of REALbasic, all of your applications were single-file executables. On Windows and this has changed. Now, if you use plugins (internal or otherwise), you get a folder that contains a bunch of DLLs. I want to discuss this change a bit to hopefully clear some points of confusion up. First and foremost, this wasn't a decision that was made lightly. Trust me when I say, if there was a reasonable alternative, we'd have taken
Here's the source code: if &hFFFFFFFF > 0 then break else break end if (Of course, you can ignore the constants -- this happens with variables as well. Imagine u as being a UInt32 whose value is 0xFFFFFFFF, and i as being an Int32 whose value is 0; you'll get the identical behavior either way.) When you run this code, you'll get results that seem a little strange at first blush. You get into the else clause -- so the compiler is generating code that says a large unsigned number is less than 0. How's that possible?? Well, what the

Pairs

| | Comments (17)
One of the new features of REALbasic 2008r2 is the concept of "Pairs", and I wanted to take a little bit of time to discuss them. The concept of a pair is something that comes up frequently in programming. As REALbasic programmers, you're undoubtedly familiar with the Dictionary class. That's just a fancy way to store pairs of information -- keys and values. However, it doesn't afford you an easy way to describe a single key/value pair as its own entity. That's what makes the new Pair class a very interesting concept. Let's start out on the simple side of

ByRef vs ByVal

| | Comments (13)
I could have sworn that I blogged on this topic before, but a peek at my backlog shows that I've not. I'll be dipped! Please accept my apologies about how this posting rambles on... I've had about eight hours of sleep in the past three days (I hate traveling), and so I'm rather incoherent. ByRef and ByVal are two modifiers used with parameter list declarations that allow you to specify the way the arguments are treated by the compiler. On the face of things, when you pass something "ByVal", you are passing it "by value", and when you pass something

New Faces

| | Comments (6)
This post showed up on the forums the other day, but I think it requires some more time in the spotlight -- I am very happy about all of the new hires we've been making recently. So I'd like to personally introduce you to the people we've hired in the past six months. Nathan Regener is our new engineering manager. He's in charge of the builds, and so that makes him in charge of all the little pieces and parts that go into the builds as well. His job consists of making sure programmers are getting stuff done on time
I've seen this question come up several times since the announcement of the compiler feature. And I've seen several valiant attempts at answering the question in a general case. Generally, these attempts fall into one of two categories: 1) If you have to ask, you probably don't need it 2) When you need it, you'll know Very deep, eh? ;-) Well, I'm going to take a stab at giving a general and specific response. But I have to admit that I also agree with #1 and #2 above. I'm simply explaining away the corollary question of: "but if I won't
One of the uses for introspection is as a way to build a serialize and unserialize library so that you can take an arbitrary object, write it out to disk (or the wire, etc) and be able to reconstruct that exact object later. In REALbasic 2008r1, you can serialize the object to disk but you cannot unserialize. There are a few key components that are missing before that becomes possible -- and that's what I'd like to discuss today. For starters, you'd have to be able to create an object instance. This sounds simple, but it happens to have some
One question that comes up with relative frequency is: why does ConsoleApplication.UnhandledException behave differently from Application.UnhandledException? Obviously, they both tell you when an exception hasn't been handled anywhere in the call chain. But they differ in that one has a return value, and the other does not. Why is that? In the case of a GUI application, the event has a boolean return value. If you return true, then the unhandled event doesn't terminate the application. Instead, control is returned to the main event loop and the application can continue to run. In the case of a console application, the
I noticed a question over on the forums about how many objects are created when working with Introspection. The poster noticed that when they called GetType on a BevelButton instance, the Runtime.ObjectCount went over 3000 objects, even after the TypeInfo object goes out of scope! That seems like an extrodinarily high number, to be sure. And it may seem disconcerting that the object count doesn't drop. However, this is not a bug. The Introspection module caches everything in sight, because otherwise there are performance implications when you try to use introspection. So let's run through BevelButton to understand these numbers

Heading to REAL World

| | Comments (1)
It's that time of year again -- REAL World 2008 is approaching quickly! I fly out to Austin today for the three-day extravaganza for REALbasic programmers around the world. I am pretty sure this year we will have someone from every continent except Africa and Antarctica, actually! This year is going to be a strange one for me. For starters, I only have two talks (instead of four). I'm going to be doing the talk on Debugging, as well as one on Accessibility. Both talks were written from scratch, and should be pretty fun. The other thing that's going to

Disclaimer

I'm currently an employee of REAL Software. My blog is mine. The opinions represented in this blog are mine as well and may not represent my employer's opinions. All original material is copyrighted and property of the author.

REALbasic® is a registered trademark of REAL Software, Inc. REAL SQL Server™ and Lingua™ are pending trademarks of REAL Software, Inc. All rights reserved.