March 2005 Archives

One thing I have seen some users complaining about is that they want to buy one license for REALbasic and be able to use it on Mac, Windows and Linux all for the same price. Aside from my obvious thoughts on that being a very stupid business idea, there's the technical standpoint which I'd like to discuss. They claim that remote debugging just doesn't cut it. Here's why they're wrong. Anyone claiming that remote debugging is sub-par to debugging locally is missing the point to remote debugging. Remote debugging is unfortunately touted as a way for you to debug your

How Depressing

| | Comments (4)
I tried upgrading to WordPress 1.5 yesterday after hearing just how much better everything was. I heard that the spam filtering was outstanding and it's prettier, works better, blah blah blah. I took the site down for about an hour to do the upgrades. I figured... well, 250 comment spams a day is enough motivation for me to get something that really blocks the spam without my having to get an email every 10 seconds letting me know about a new (fake) comment. While upgrading, my email was blessedly silent from comment spam. Immediately upon putting up the proper PHP
One thing I've seen people stumble on every once in a while is the proper way to group radio buttons in REALbasic. If you're not familiar with the problem, here's a little example. Let's say that you have two "sections" of radio buttons that you want to display on the same window. The first section has three options: red, green and blue. The second section has five options: square, circle, triangle, line and point. Obviously, these radio buttons sections need to operate independently of one another. You want to be able to have two of the radio buttons selected at

My Easter/Birthday Break

| | Comments (5)
I finally got around to getting some of my pictures online today. Here are the pictures I took while I was in Houston for Easter and my birthday. The user conference ended Friday night, and I got out of the convention center around 6:30pm or so. Joe, Cortis, William and I all walked down to Huts (on 6th) for burgers. We sat around and BSed for an hour or so, and then my weekend really began. I got back to the apartment, packed a few things together, made sure the cat was going to be OK for the weekend, and

Planning Meetings

| | Comments (5)
Ah the joys of planning meetings! We're currently trying to figure out what features should make it into the next release of RB 2005. This morning we covered a ton of ground on small features that we'd like to see added, as well as projecting some large features that would be a few releases out. I think the next release is going to go a long ways towards fixing issues we've run into with r1. Because we're going to release in short bursts now (which I happen to think is an awesome idea), we have to focus on the small

Not Too Much Time

| | Comments (2)
I don't have too much time to post tonight since I just got back from Houston with Lis. I had a wonderful time, which I will talk all about. I plan on posting updates this week talking about REAL World 2005, my weekend, etc. But I just wanted to give a quick update on something cool. I had an article posted over on O'Reilly's on how to develop applications for Windows. You can find the article here. Talk later, eat now. Unga. :-P
REAL World 2005 is today and tomorrow (and yesterday), so I probably won't be updating as I normally would. Then I'm heading down to Houston with Lis to hang out there for Easter. I'll try to get some pictures this year and post them when I get the chance though. I have to give all three of my talks back-to-back-to-back today. Bleh! At least that should leave me open tomorrow to relax a bit! Anywho, I'll start posting like a normal rambler again after this weekend. Have a nice vacation from me. :-P

Using Extends

| | Comments (3)
There are times when you may want to add a little functionality to an existing REALbasic class, but making a subclass simply doesn't make sense. One question that comes up over and over again are how to get REALbasic to return a new instance of a subclass from one of its intrinsic methods. For example, how do I get GetFolderItem to return MySpiffyFolderItemClass instead of FolderItem, or how do I get FolderItem.OpenAsBinaryFile to return a MySpiffyBinaryStream? The way I like to extend internal classes when I run into these situations is by using the extends keyword. This keyword was added

Until the Cows Come Home

| | Comments (6)
Everyone has probably heard this phrase at some point in their life. So where did it come from, and what does it mean? Well, the meaning is quite simple: it's a time reference meaning "for a long time". So you'll party until the cows come home, for example. The phrase itself is a farming phrase. You put cows out to pasture in the morning after they've been milked, and they come "back home" to the barn in the late evening to be milked again. So "until the cows come home" really just means "all day".

House Plans

| | Comments (10)
So I got my price sheet for the house plans on Friday. Yeesh! It came in quite a bit higher than I was anticipating. I was expecting to see it around 180k-190k, and it was estimated at 240k! LoL, a wee bit off. ;-) I spent part of my weekend working on revising my house plan, and I think I've got it at a manageable state, so it's going to head back to the draftsman on Monday and then off to the estimators again. Here's the rundown: Screw the FHA mortgage. It's stopping me from doing my own general contracting.

Frustrations

| | Comments (6)
So lately I've been getting more and more annoyed with comments from some people about RB 2005. What comments might those be? "This is a Windows product! The sky is falling!" Christ people, chill out. First off, we're really a Mac company. Out of the entire place, William and I are the only two who champion platforms other than the Mac. I tend to be a lot more vocal than he does, which is fine. But we're really a Mac company. And no, that's not me bragging. We all know that my loyalties lie elsewhere in the OS war (with

Ramblings Challenge

| | Comments (4)
Well faithful readers.... Sometimes I post a blurb about some new thing that I've learned during the day. But today I'm doing something a little different. I'm issuing a challenge to you all! Matt, Dave and I were discussing something the other day and the topic of Watts lines came up. Being the youngin that I am, I've only heard of Watts lines in passing... so I wanted to know more about them. Namely, why are they called Watts lines? So I turned to Google... but I could not find the information I was looking for! So! I want you
I was browsing one of my favorite web comics (User Friendly), and I saw a great joke that I should have added under the compiler writers post a while back. "Women are like compilers. They take simple statements and make them into big productions." HA! Geek humor is funny to me.

To The Exciting Part

| | Comments (3)
I got home from work last night in a somewhat foul mood (long hours for weeks at a time tend to do that to me) and didn't want to deal with people. So I curled up with one of my favorite past times (no....not torturing Pixel....) -- video games! I've been playing Final Fantasy III since I got done with FF2 a few weeks ago. When I last put the game down (late last week) I was just about to fight the Atma Weapon on the floating island. There's only two parts to this game (aside from the final boss)
Building a house (duh, you knew this would be on here) Fishing with dad Joining bowling league with Scott Rooming with Louie -- it's only been, what, 6, 8 years that we've been talking about this? lol Resurrecting Kart night. Thinking Mario Kart for N64 and adding Double Dash for Game Cube. Perhaps some Worms. Think of it as a more general geek evening Seeing relatives more than once a year Golfing with dad when the weather is nice Going back to school -- either for my Master's or PhD Skiing, snowmobiling, ice fishing and other winter sports Seeing
So I needed the ability to make a cell editable in an RB listbox, but make it a password field. So after consulting Dave and Jon, we came up with a great solution. First, in the open event, make the proper column editable (in my case it's column 2) like this: [rbcode] me.ColumnType( 2 ) = ListBox.TypeEditable [/rbcode] Then in the Listbox.CellGotFocus event, you put the following: [rbcode] if column = 2 then me.ActiveCell.Password = true else me.ActiveCell.Password = false end [/rbcode] This causes the editable cell to show up as a password editfield. The only problem left to solve

File Types

| | Comments (1)
So I learned a new one today while working in REALbasic. I was working with file types so that I could enable the user to drag and drop files onto a listbox from Windows Explorer so that it would add the files and folders to the listbox. I had everything working great on the Mac, and so I was pulling the project over to Windows so that I could make sure the UI looked right and everything works. Lo and behold, but I can no longer drag and drop files onto the listbox! So I start debugging and get more
So while working on RB 6 I found myself working with the new MenuItem APIs, and I was getting frustrated over not knowing how to share most of a menu bar amongst windows while still keeping them slightly different. Here's the scenario: For console application, I want the mostly same menu bar as for GUI applications. The difference is, for the console window I want things like "Add Window" to be gone since they don't make sense. But I want to make sure things like the open recents menu are the same between each window. So how do you do
One thing that I see tripping people up (myself included some days!) is what the difference is between Me and Self when writing REALbasic code. At first glance, they seem to be the same thing -- but they're really not the same all the time. Don't fall into this trap! Let's start off with an example of where Me and Self can be different. If you've got a button named PushButton1 and it lives on a window named Window1, and the button has been clicked on... Then when the button's Action event is called, there's an implicit parameter passed into
I've heard a lot of people ask why you would use the 'Is' operator in REALbasic instead of the '=' operator, and the answer is quite simple. Comparison operators have been around since the dawn of the language, and they simply compare one object to another. For first class citizens such as Integers or Strings, the comparison operators actually compare the value of the operands. For objects such as Dates or FolderItems, the comparison operators compare the object references themselves. So basically, comparision operators (like '=') will compare the storage for the operand instead of the variable. Then came along

Arg! Encodings!

| | Comments (1)
So I ran into a very hard to track down bug yesterday that ended up being an encodings issue. Let me start by saying, the bug was caused by something happening in the framework that shouldn't have been happening (which I promptly fixed), but it can happen easily in your own code with no framework bugs needed. The problem boiled down a UTF-16 string and a string of unknown encodings being added together to cause utter garbage to appear. In REALbasic, when two strings are added together, the resulting string has an encoding that is common to both strings. For

Why MsgBox is Bad

| | Comments (0)
MsgBox displays a modal message dialog to the user. Some people like to use them to display debug information because it stops the current method from executing and displays some string that you put there. For example, let's say you have a TCPSocket on a window. Its events look something like this: [rbcode] Sub TCPSocket1.Connected() MsgBox "Connected" End Sub Sub TCPSocket1.DataAvailable() MsgBox me.ReadAll End Sub Sub TCPSocket1.Error() MsgBox "Error: " + Str( me.LastErrorCode ) End Sub [/rbcode] This looks safe enough, right? Wrong! You really should be using System.DebugLog for debug messages. Here's why: Modal windows (including MsgBox) block the
I see this issue come up at least once a month, and I feel that someone needs to explain things to Mac people (silly Mac people ;-)). A PopupMenu is just a dumbed-down combo box on Windows. A PopupMenu is just a souped-up ContextualMenu on the Mac. It serves a slightly different function on both platforms, and so you should use caution when deciding whether it's the right UI for you. For example, on Windows, a PopupMenu (and ComboBox) has no concept of a seperator. There's simply no way (short of making your own control and drawing it yourself, which
Simple -- it monkeys with the natural order of things. When you call App.DoEvents, a handful of big, scary things happen. First, a single pass of the event loop is called. This can cause drastically odd things to happen with your GUI application. You're sitting in an event somewhere (because all code is an event with GUI applications) and you call DoEvents. Another pass of the event loop happens, and suddenly you may very well have re-entered the exact event you're already in! Or worse yet, you enter *another* event and access things you expected to be already set up,
So while working on RB 6 today, I noticed a slightly odd behavior with the Screen function. I was working on my Windows box (running Windows XP), which has a screen resolution of 1024x768, and I was noticing that the initial size and position of the main IDE window was too large. What's odd is that I was using the Screen.AvailableHeight property, and that should mean that my window wasn't going to be going under the taskbar (which is placed at the bottom of my screen). And yet the running application would make the window too tall. So I started
I learn new things about REALbasic just about every day. Some of them make sense at first glace and are pleasant surprises. Otherwise violate the principle of least surprise and annoy me at first (until I figure out the reasoning behind them). I ran into one of these today. I had code that looked like this: [rbcode] Class Foobar Function Operator_Convert() As Dictionary return new Dictionary End Function End Class [/rbcode] Of course, it had more code in the function, but that's immaterial since the focus is on the overloaded operator itself. The above code is also 100% correct --

Block-level Dim Gotcha

| | Comments (8)
I spent quite some time the other night trying to debug a problem I ran across while updating the Windows Functionality Suite. I've been using REALbasic 2005 (formerly known as RB 6), and so that means I've also been taking advantage of many of its new features. One of these features I am making use of is the ability to do block level dims. If you're not familiar with what a block level dim is, here's a quick lesson. In previous versions of REALbasic, you could only declare variables in the method scope. This means that they could not be
People often wonder how we handle cross-platform concepts, and here's one where we did the wrong thing to start off with (IMHO) but ended up correcting it for RB 2005. Keyboard layouts are different depending on the platform you're working with, both physically and conceptually. Mac keyboards have four modifier keys: Shift, Control, Option and Command. Command is used to fire menu commands. You use the Shift key to modify the menu command for slightly different results. For example, Cmd+S does Save while Cmd+Shift+S does Save All. The Option and Control keys are also used to modify menus in various

New Category Added

| | Comments (4)
I decided to add a new category to my blog -- REALbasic Gems. I will put all topics pertaining to REALbasic as a product and language into this category from now on so that people have an easy way to get to information specific to REALbasic. I am hoping to retrofit the flag to old posts as well. So basically, me rambling about programming in general, or other languages will go into Programming. But when I talk about REALbasic concepts, I will put them in the Gems category. Enjoy!
Our documentation (and statements on the lists) claim a few things that I don't quite agree with. It says that you should be using the MessageDialog class instead of MsgBox, GetOpenFolderItem, GetSaveFolderItem and SelectFolder APIs. I am going to set the record straight on where I stand on the topic. The MessageDialog class is great for a few cases. When you are developing for the Mac in the case of the FolderItem dialogs, or the dialog you are using has no standard UI to it for the platform you are running on in the case of MsgBox. That's it. Here's

Wonderful Day!

| | Comments (1)
I had a great day today, despite all my frustrations over work (which I may post about in the future, once I've let a coworker or two read my rant to make sure I'm not over-stepping any boundaries). Lis came over last night and we watched some Law and Order SVU together. We drank margaritas too! Mmm, those were tasty! She crashed over here, and we got up around 9am this morning. We went out to breakfast at a diner called Jim's not too far from my apartment. The food was really good, and reasonably priced too. I had an
So I answer questions on mailing lists, personal emails, realgurus, etc about REALbasic (and programming in general). I really don't mind doing this -- it's fun to interact with the people who use the product I help make. But there's one thing I've noticed quite a bit lately, and that's the fact that many people don't get the free updates. Quite often I hear someone saying "I'm trying to do X, but it's not working for me", and the first two questions out of my mouth are "what version of REALbasic are you using, and what platform does this happen

House Update

| | Comments (4)
My house plans came from the drafting dept yesterday afternoon. It's looking pretty good! There's a few quirks that they need to fix (like taking out a patio door since there's no possible use for it there), change swing on a few doors so they open left-handed instead of right-handed and there needs to be a few more windows. But it's shaping up nicely! Now it heads over to the estimator for price guessing. They'll end up using all the "defaults" for options on the house, like vinyl siding, standard carpet, etc and figure out how much that house plan

Yay for Target!

| | Comments (6)
So I got home from work and ate the last vestiges of what might be considered food in my apartment last night. It was time to venture out! :: gasps :: So I grabbed the movies Lis and I rented so I could return them, and went on an adventure. First I stopped off at Target. I figured I'd go in there and get some small stuff, no big whup. But while I was there, I found 35 gallon totes for like 7 or 8 bucks (complete with snap-on handles, oooOoOOoh) -- so I picked up three of them for

My IDE Wish-List

| | Comments (7)
I want a place to put globally-accssible declares. It'd be another project item (like FileTypes for example) that lets me declare which library I am pulling from and the declaration. Yes, I realize I can do this by making a module and putting the functions in there. But that incurs an extra method call overhead (since you're calling into the module, and then into the declare) and isn't as elegant as just giving me a place to put global function imports. An easy way to mark entire classes, modules, methods, etc as being safe for a target. So I

What...the...hell?

| | Comments (4)
No, seriously... Baby Got Book

Busy, but not.

| | Comments (3)
I spent this weekend doing a lot of little things, which really adds up to me feeling like I was busy when I really wasn't. Friday night I got together with Lis. We spent days searching for movies at the store. We finally settled on watching Shine. It was a really good movie, we both liked it. Now if only it didn't take an hour for us to find it. ;-) I also picked up Shaun of the Dead -- awesome movie! We got Pizza Slut and had a pretty cool evening. I made some salsa, but it didn't turn

Crazy New Things

| | Comments (14)
So what crazy new things have I been working on? Well, at work, not much of anything too crazy. Been doing a lot of bug fixes and still plugging away on registration stuff. Yaw hee. :-P However, at home I've been working on some awesome new geekery for the Windows Functionality Suite. The next release (hoping to get it out soon after releasing RB 2005) is going to knock people's socks off. Aside from the fact that I've spent the last 5 months converting the entire suite to be unicode-savvy (a project only possible due to soft declares!), which is
Fried chicken at Grandma's house Burning leaves Pumpkin bread baking Apple pie while it's still in the oven Wet, decaying leaves in the Fall Fried fish on a humid summer night The smell of a lake in the morning A girl's hair after she's showered Gasoline. Mmm.... :-P Sawdust Pine trees -- like when I lived in Redmond, or when I'm picking out a Christmas tree The smell just before a big rainstorm hits Freshly cut grass What are your favorite smells?
So I was trying to figure out whether it was legal to have an import table entry that only used ordinals and not a name. The PE32 spec seems to say that it's fine to import by ordinal, and I've seen VB source code that does it. But I wanted to find a real live example of an application that did it so I could see it working. Then I realized, well hell, just write a VB application that does it. You already know that it can declare by import! So I whipped up a real quick VB program using

My Compiler Wish-List

| | Comments (5)
In no particular order, here's the list of things I'd like to see come from the compiler end of things in REALbasic. More data types. I want UInt32, UInt64, UInt16, UInt8, SInt32, SInt64, SInt16 and SInt8. I don't want to monkey around with confusing names like Integer, I want them to be specific so I know what I am working with. Native link formats for PE32 and ELF files. We have PEF and Mach-O natively, so all the Mac zealots are appeased ;-). But there's no reason for us not to have native link formats for Windows and Linux. To
Let's say you're in a situation where you write code for others to use. You design APIs and code the underlying frameworks, and your goals have been to provide powerful tools that are easy for people to understand and use. Much like what I do for a living. :-P Now let's say you're able to take a concept that's really hard and expose an easy, intuitive and powerful API for it. Normally, this would be a very good thing. You're making something accessible to the masses which they probably wouldn't have been able to use before. Here's where the ethical

Blogroll

Friends
REALbasic Related
Win32 Programming

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.