Morning Scrawlings

January 05, 2003 @ 02:01 am

0 Comments

It felt good to avoid the computer today. I got to focus on some video games, do some reading, rest, relax, and hang out with friends. For many out of my close group of Roseville friends, this was the last hurrah. It was our final chance to "geek out" (if you will) before we all returned to our respective colleges for winter quarter / spring semester. After tomorrow, only Steve and I will be around the Roseville area. I figure I too will be returning to academic stomping grounds within a week or so, which means I get to resume work on BAAS, DFG, and a mess of other things that have been on hold while I have been -1 computer. I managed to get Visual Studio running, and the Beta revisions are coming along nicely. I had to remove my Excel 10 dependencies...

The problem with Visual Basic is the way it makes it's references to other objects in the Microsoft Windows environment. The idea behind the references library is that you can add the reference, and then be able to manipulate an object of that reference type. For example, if you add a reference to Microsoft Excel, you could then use standard Excel programming commands (like you would in a macro). Obviously, for an application to run this, the computer would also need Excel since it would be hard to create an Excel worksheet if there is no Excel installed. Now, the actual problem with the code was in the Reference itself.

There are two ways Visual Basic can create external objects. One method is Early Binding, and the other is Late Binding. Early Binding is what occurs when you add a reference to the References section of the project, and create something like this:

Dim objMyExcelApp as Excel.Application
Set objMyExcelApp = new Excel.Application

This creates a new Excel Application object and sets the variable name objMyExcelApp so the running instance of Excel has a name. On compilation, Visual Basic inserts the native code needed to launch an Excel Application. However, the code it will be using is dependent on the Reference you set from earlier. Because of this, Excel.Application when the Reference is set to Excel XP is different than Excel.Application when the Reference is set to Excel 97. This process is known as early binding, because the syntax is bound to the version of excel before compilation.

The second method is known as Late Binding, which looks somewhat similar:

Dim objMyExcelApp as Object
Set objMyExcelApp = CreateObject("Excel.Application")

The biggest difference is the CreateObject method. Doing this requires no References to Microsoft Excel to be in place. At run time (when the user runs the program), it will instead ask the operating system to launch an instance of an "Excel.Application" as opposed to the program trying to launch it on its own. Even though this is much slower, it is no longer dependant on a specific version of Excel being installed. This process, known as late binding was what the project needed.

Long story short, I wrote everything using early binding when I needed late binding, and spent a good 6 hours reworking the application so it would run independent of any specific version of Excel. this meant changing all the objects, the Excel-based variables, and the constants. With that out of the way, I was ready to resume the beta. At this point, I haven't really touched this rebuild since I want to see if I can think of anything else I may be forgetting.

Switching gears to video games, I have finally toppled Metroid Prime. I made a point of getting 100% of all items, and it made the ending all worth it. Sure, it's only a slightly different ending cinema, and the congratulations screen is only slightly altered, but having the 250 missiles on hand made the final bout a lot easier. With all said and done, my favorite weapon of destruction is still the Wave Beam, the Plasma Beam a close second. The worst: Ice, because it fires so slow and it's charge attack takes on average more missiles than everything but the flamethrower. Apparently, in beating this and collecting 100% items, this unlocked an image gallery (with lots of detail on the armor and dimensions), and the process of beating it also unlocked a "hard mode". Based on this time through, I am somewhat worried as to how hard this mode really is. I mean, I was getting my ass kicked sometimes as it was, so I can only assume the beating of the ass would be only more so. My next task in that game: 100% scans. (Not going to even try that on hard yet.)

I spent the evening into the early AM at Joel's with Steve and Chris, playing Timesplitters 2, and a bit of the Super Smash Brothers Melee. Since we were playing the GameCube version, I didn't have a profile for Timesplitters, and decided to name my character "Stupidity". There was something satisfying about "Killed by Stupidity" showing up during accidental team deaths. ^^

When I awake, it shall be later this Sunday, and I will probably give the Beta testing a whirl and see how much I can get done and put into the changelog. Hopefully I will have a list of plants so that I don't have to type in 300+ names. It seems kind of silly to do that simply for testing.

In response to "Morning Scrawlings":

Leave a Reply:

Commenting is not available in this section entry.