Did you know that the select case statement can use expressions? I sure didn't! I knew that you could use several values, like this:[rbcode] select case someInteger case 1, 2, 3, 5, 8, 11 DoSomething end select[/rbcode] But you can use a range as well:[rbcode] select case someInteger case 1 to 5 DoSomething end select[/rbcode] And you can mix the two concepts![rbcode] select case someInteger case 1 to 5, 7, 11, 15 DoSomething end select[/rbcode] Then, to make matters even cooler, you can evaluate expressions using the Is clause![rbcode] select case someInteger case is > 42 DoSomething case is DoSomethingElse
November 2005 Archives
I reformatted the laptop today. Took Windows 2003 Server off the machine and installed XP Pro SP 2. I figured a year was long enough for the testing machine. Plus, I was starting to have strange issues with the system locking up (probably due to all the strange apps I install for testing purposes). Sorry for such as short ramble, but I'm just now getting things back up and running.
One problem that I see people run into time and again has to do with keyboard shortcuts for menu items. Programmers on the Mac are spoiled by having four key modifiers for menu items: Command, Control, Option and Shift. However, on PCs, there's only three modifiers: Control, Alt and Shift. So how do you make shortcuts map? And what are the accepted standards with shortcuts? Well, here's a short, handy guide for you. On the Mac, almost every keyboard shortcut should be preceeded with a Command modifier. You use the Shift modifier when you are using an alternate form of
Whoa, it's been a long hiatus from blogging! Sorry, but when I was down in Houston, I didn't bring my laptop with and so I kept myself disconnected the entire time I was down there (quite a feat for me). Lis and I drove down to H-town on Tuesday night. Once she got off from work, she picked me up at the office and we grabbed some grub and went back to her apartment to pack. We got all packed up and on the road by about 9pm or so. It was a nice drive down from Austin (only took
I had a nice evening last night. I hung out with Lis, Jennifer and Rachel. Jennifer and I played some GTA while Lis and Rachel did some errands. Once they got back, I made some awesome salsa and we watched Medium (in "3D" or something like that). The show was alright, entertaining enough -- but the salsa and friends made the evening great. After work tonight, Lis and I are heading down to Houston for Thanksgiving. I'm in charge of making mashed spuds, and perhaps stuffing (which I don't actually eat, so I may try to trade that off on
Last year, we randomly started putting turkey hands on Mike and Jason's whiteboard.
A lot of good guesses, but this round of trivia was much more difficult! 1) Once upon a time, there was an easter egg in REALbasic. In the compiler, no less! What was the easter egg, and how did you trigger it? It was a "falling blocks" game that was triggered by a pragma. If you did #pragma Tetris and then tried to compile the application, a window would popup and you could play a tetris-clone game. We removed it because the name Tetris is a trademark and we didn't want to have any battles like that. 2) Speaking of
Since this was quite fun last time, let's try it again. 1) Once upon a time, there was an easter egg in REALbasic. In the compiler, no less! What was the easter egg, and how did you trigger it? 2) Speaking of easter eggs... there was also one in the tips window. What did it say? 3) What two REAL Software engineers had previously written compilers, and what languages did they design? 4) Who was the very first person to purchase a copy of REALbasic? 5) The "new" compiler had a codename. This name was never officially announced that I
My flight from St Cloud was late by 45 minutes due to high winds. So I got into the MSP airport with 10 minutes to run from gate A1 to gate F16. A good, long distance (the entire length of the airport). I was two minutes late, and it was the last flight to Austin. So I had to spend the next 40 minutes waiting for a supervisor to bother to show up. Then I had to argue with her so that I could get put up in a hotel for the night. "We don't make accomodations for weather related
Phew, what a whirlwind of a day (literally)! We're getting 40-50 mph winds here. But we got our first snow!!!! Yay! It started snowing and blowing yesterday about 4 or 5pm. Knocked yet another damned tree down. So dad came out and together we staked all my trees (took about an hour) and when I woke up this morning, none of them were knocked over! w00t! I went over to the neighbor's last night to drop off a key to my house, explain to them where the cat food, etc is. I'm leaving for Austin this evening for two weeks
If you're really serious about deploying your application to Windows, then you should really be checking out the Designed for Windows program. Whenever you see one of those little stickers that say "Designed for Windows XXXX", that application has gone thru the application process and been logo certified. Almost everything about REALbasic's framework is already in compliance with these requirements, and the few places which aren't will possibly be resolved in the next release. So that means there's only a few things you need to do to make sure your application is certifiable. The first thing is to make sure
So after checking my referrer logs, I ran into a link from solo:techno. So I was puttering around on the site, and I saw there's a link to figure how much your blog is "worth." Oh well, what the hell... And check this out: My blog is worth $7,903.56.How much is your blog worth? Man, I could be rich! If wishes were nickels, I'd weigh a lot.
Wow, this weekend sped by awfully fast! On Saturday, I got up relatively early (like 9am!) and went over to my parent's house to help out with yardwork. Dad and I raked the lawn and brought two trailer loads full of leaves to the compost site. I also trimmed down some of mom's bushes so they'll grow back thicker next year. It rained off and on the entire time we were doing yard work, but thankfully, we finished everything up before the downpour started. Dad and I took the Scamp back to Lynn's place after we were done with the
When dealing with the version information, if you want to know what goes where on sensible platforms like Windows, here's my little mapping for the various fields. Windows NameRB Name File VersionMajorVersion.MinorVersion.BugVersion.NonReleaseVersion DescriptionPackageInfo CopyrightLongVersion Product VersionShortVersion ReleaseStageCode Hopefully this helps clear some things up. I know I get tripped up by it often enough. For some reason, Long Version just doesn't seem to stick with me as being the Copyright....
So I went to go play Katamari last night, right? I stopped by Hollywood Video on my way to the grocery store. Not there. So I went over to Blockbuster. Nope, not there. So then I went to some strange place I've never been (another video store). Nope, not there. And when I say "not there" -- I mean they don't own it. So now I figure that this is either A) a pile of shit, or B) a cult classic. I knew it was B because I trust my friend's judgement. So off to WalMart I head. Nope, not
Ok, so here's the dealio. I've given the idea of writing an e-book some more thought, and I wanted to have a bit of a discussion with people who might be interested in purchasing such a beastie. What I'm trying to come up with right now is a chapter list (basically, a 50,000 ft overview) for such a programming book. I'm going at this from a few different angles: 1) General RB book, 2) Focus on design patterns in RB, 3) Win32 programming in RB. I'm also open to other ideas, but remember where my strengths are. ;-) Here are
Back in the day, I never ran out of games I dreamed of owning. Lately... I can't think of a single one I want. I have a PS 2, and I need help figuring out what game(s) to get for it. Here's my current collection: Games I liked: FFX Jak and Daxter: The Precursor Legacy Crash Bandicoot: The Wrath of Cortex Disgaea - Hour of Darkness Games I'm on the fence about: Castlevania: Lament of Innocence Tiger Woods PGA Tour 2003 NHL 2004 Kingdom Hearts Games I didn't like: Midway Arcade Treasures MegaMan Anniversary Collection Turok: Evolution Traditionally, I have
For those of you who used to use the SetRLimit plugin I supplied ages ago to increase the resource limit of your application on OS X -- here's it in declare form: [rbcode]Module RLimit Protected Function Get() As Double Soft Declare Function getrlimit Lib "System.Framework" ( mode as Integer, lim as Ptr ) as Integer Const RLIMIT_NOFILE = 8 dim lim as new MemoryBlock( 16 ) if getrlimit( RLIMIT_NOFILE, lim ) = 0 then // The first 8 bytes (long long) are the current // rlimit return LongLongToDouble( lim ) end if End Function Private Sub IntToLongLong(mb as MemoryBlock, i
I got back from White Water about 4pm yesterday, and boy is it nice to be back! I'll detail the trip, since I know everyone's just dying to hear about it. :-P I left St Augusta and headed into Sartell to pick up dad and the scamp (ours is the smallest one on there, and it's at least 30 yrs old) at about noon on Friday. I was all packed and ready to go, we just needed to pack the scamp and take off. I got over to mom and dad's place and we started loading the scamp up. We
I'm going to be gone from this afternoon until sometime Monday -- it's a national holiday here in MN, also known as the start of deer hunting (at least, for those of us in Zone 3a it is). So I'll be down near Rochester all weekend long with dad. If you try to get ahold of me, don't be surprised if I don't respond until Monday evening or Tuesday morning. Just to set the record straight, I haven't actually shot a gun at an animal since I was in high school. I go "hunting" now for various reasons. The two
So I ran into a bug today that I've been chasing for a long while now. I swore up and down that callbacks on Windows (you know, using the AddressOf operator) worked fine. I mean, I use them all over the place in the WFS (check out my Window Subclassing article if you don't believe me). But there have been times when I've said to myself, "there's absolutely no reason this declare should crash. None. And yet it does." This happened to me today in fact. This fine young gentleman pointed me to some declare code that demonstrated the crash
1) EditField.AppendText -- it appends text to the end of an EditField in a speedy fashion, does not destroy style information, and it retains selection and scroll information. Whoa! As an extra, added bonus.... it's not documented! Now you can feel cooler than your friends and use this API. 2) Did you know that you can add, remove and insert items in a page panel and tab panel on the fly? I can see this being awesome for page panels, but I hope I never see any of you using it with a tab panel (except if you're doing this
Yes, that's right, I said dirty thieves obtuse philanthropists. So I was poking around my electric bill today, and I noticed something that piqued my interest (in a rather not-so-good way). A line-item from the bill: Operation Roundup: $0.28 What they do is round your bill up to the nearest dollar amount. Why? Because they seem to like fleecing customers in ways that seem harmless. Good question, I ended up having to call them up to find out the answer. It turns out that they give that money to local organizations (like little league, boy scouts, food shelves, etc). Let's
So a bug report came in last night that pertains to the default button never being set properly when using tab panels. That sounded an awful lot like a bug I fixed with regards to default buttons not getting set properly when displaying a new window for the first time. So I started checking into it (about 8pm). I took the user's sample project and was able to demonstrate the bug exists with a TabPanel. Great. For giggles, I changed the super over to be a PagePanel. I had a hunch the problem was there as well since the two
So I've had random issues with Trillian before, but I've always just said, eh... who cares? For example, when using an animated gif as my buddy icon, my load times were terrible (like upwards of two minutes to start the app). Furthermore, it would use 99% of the CPU the entire time it was loading. So I got rid of the animated buddy icon and life was fine. However, I discovered an annoyance today which means bye bye for Trillian: 153 million page faults. It produces 6 page faults a second while sitting in the idle state. That translates into
So last night was the first time I got to hand out candy to trick or treaters as a home owner. Man, I had an absolute blast! It's so much fun to see everyone all dressed up and excited about the holiday. By and large, the majority of the kids who came by were dressed up really well. But there were a few younger kids who showed up without *any* costume on! Whatever happened to pride in your costume? I bet at least three or four of the kids (young enough to still be excited by Halloween) showed up without