Oatmeal & Coffee by Philip Regan
REALbasic and Objective-C with Cocoa Comparison 
Saturday, January 3, 2009, 12:12 PM - Programming & Computers
Posted by Administrator
This article is part of an occasional series.

Working on Project Euler Problem 6 required the squaring of numbers. Take a look at Apple's really crummy documentation of the C function pow.


pow
double_t pow (
double_t x,
double_t y
);

Parameters
x
y

Return Value

Availability
Available in Mac OS X version 10.0 and later.

Related Sample Code
Gamma Filter for FxPlug and AE
WhackedTV

Declared In
fp.h


Now, look at REALbasic's...


Pow Function
Returns the value specified raised to the power specified.

Syntax
result = Pow( value, power )

Parameters
value Double The value you want to raised to power.
power Double The power that value is raised to.

Return Value
Result Double Value raised to power.


Was that so hard? I used the search term "power" in both docs, and Xcode did not return anything related while REALbasic returned exactly what I needed amongst other things. Just know that walking into Objective-C and Cocoa from REALbasic, you need to know your C or at the very least have a good reference (in print or on the web) easily accessible.
add comment ( 1 view )   |  0 trackbacks   |  permalink   |   ( 0 / 0 )
REALbasic and Objective-C with Cocoa Comparison 
Friday, January 2, 2009, 05:35 PM - Programming & Computers
Posted by Administrator
This is the first article of an occasional series.

In my (very) recent post about programming for fun again, I had mentioned I would post about the differences between REALbasic and Objective-C with Cocoa. I just finished an exercise that I feel really shows off the differences between the two and also shows off just how fun these Project Euler questions are. The reason why I'm doing this is because there are several people on the forums who are curious about Cocoa, and my working on the Project Euler questions presents a good opportunity to show off each language.

Disclaimers
This (hopefully) series of articles assumes a basic knowledge of REALbasic or Objective-C with Cocoa. I will not dig into syntax or memory management in Cocoa because both topics have been discussed on other sites already.

I am only just beginnging to learn Cocoa, so I'm sure the solutions I put forth are not the most efficient. However, based on what limited knowledge I have, I was able to solve the problem with reasonable effort.

These problems can all be solved in different ways; a user can make them as simple or as complex as thay would like. I chose to make them as simply as I could to figure them out. You may, and probably will, decide to do it differently.

Finally, this is not to start a langauge religious war. While I do editorialize in the articles a bit, I have no brand loyalty in the end and I am equal opportunity criticizer. If either REALbasic or Objective-C with Cocoa does something stupid, I'll point it out and laugh. If I do something stupid, I will have learned something from it.

Euler Project Problem 2

Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be:

1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...

Find the sum of all the even-valued terms in the sequence which do not exceed four million.


I sorted out two ways to solve this problem, one with an array and one without. Let's go over the one without an array just to get familiar with the problem. In all cases, the solution runs within a function called RunProblem that returns an interger of the solution.

REALbasic

Function RunProblem() As Integer
dim theSolution as integer = 0
dim valueNminus2 as integer = 1
dim valueNminus1 as integer = 2
dim valueN as integer = valueNminus1 + valueNminus2
dim maxValue as integer = 4000000

// initialize the solution
theSolution = 2

// iterate the sequence to start things off
valueNminus2 = valueNminus1
valueNminus1 = valueN

// go through the rest of the sequence
while valueN < maxValue
// do the math
valueN = valueNminus1 + valueNminus2

// apply the number to theSolution if it qualifies
if valueN mod 2 = 0 then
theSolution = theSolution + valueN
end if

// iterate the sequence
valueNminus2 = valueNminus1
valueNminus1 = valueN
wend

return theSolution
End Function


Objective-C

- (int)RunProblem
{
int theSolution = 0;
int valueNminus2 = 1;
int valueNminus1 = 2;
int valueN = valueNminus1 + valueNminus2;
int maxValue = 4000000;

// initialize the solution
theSolution = 2;

// iterate the sequence to start things off
valueNminus2 = valueNminus1;
valueNminus1 = valueN;

// go through the rest of the sequence
while (valueN < maxValue) {
// do the math
valueN = valueNminus1 + valueNminus2;

// apply the number to theSolution if it qualifies
if (valueN % 2 == 0) {
theSolution += valueN;
}

// iterate the sequence
valueNminus2 = valueNminus1;
valueNminus1 = valueN;

}

return theSolution;
}


Nothing too fancy here. Both are easily readable, though the Objective-C is really just C in this instance and I'm reminded why I like REALbasic more: no brackets or semi-colons. I do understand why they exist, however, and live with them accordingly.

However, I figured out the array method first and then rethought the non-array method after a quick session of playing the drums. Let's take a look at the array method...

REALbasic (This is a line by line port of the Objective-C code below for comparison)

Function RunProblem() As Integer
dim theSolution as integer = 0

dim FibonacciSequence(-1) as integer

dim FibonacciValue1 as integer = 1
dim FibonacciValue2 as integer = 2

FibonacciSequence.Append(FibonacciValue1)
FibonacciSequence.Append(FibonacciValue2)

dim maxValue as integer = 4000000
dim theValue as integer = 0

while theValue < maxValue
dim lastIndex as integer = UBound(FibonacciSequence)

dim valueNminus1 as integer = FibonacciSequence(lastIndex)
dim valueNminus2 as integer = FibonacciSequence(lastIndex - 1)

theValue = valueNminus1 + valueNminus2

FibonacciSequence.Append(theValue)
wend

for each mValue as integer in FibonacciSequence
if mValue mod 2 = 0 then
theSolution = theSolution + mValue
end if
next

return theSolution
End Function


Objective-C with Cocoa

- (int)RunProblem
{

NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];

int theSolution = 0;

NSMutableArray *FibonacciSequence;
FibonacciSequence = [[NSMutableArray alloc] init];

NSNumber *FibonacciValue1;
FibonacciValue1 = [[NSNumber alloc] initWithInt:1];

NSNumber *FibonacciValue2;
FibonacciValue2 = [[NSNumber alloc] initWithInt:2];

[FibonacciSequence addObject:FibonacciValue1];
[FibonacciSequence addObject:FibonacciValue2];

int maxValue = 4000000;
int theValue = 0;

while (theValue < maxValue) {
NSNumber *lastIndex;
lastIndex = [[NSNumber alloc] initWithInt:[FibonacciSequence count]];

int valueNminus1;
valueNminus1 = [[FibonacciSequence objectAtIndex:[lastIndex intValue] - 1] intValue];

int valueNminus2;
valueNminus2 = [[FibonacciSequence objectAtIndex:([lastIndex intValue] - 2)] intValue];

theValue = valueNminus1 + valueNminus2;

if (theValue < maxValue) {

NSNumber *FibonacciValueN;
FibonacciValueN = [[NSNumber alloc] initWithInt:theValue];
[FibonacciSequence addObject:FibonacciValueN];

NSNumber *newLastIndex;
newLastIndex = [[NSNumber alloc] initWithInt:[FibonacciSequence count]];

}
}

for (NSNumber *valueToAdd in FibonacciSequence) {
if ([valueToAdd intValue] % 2 == 0) {
theSolution = theSolution + [valueToAdd intValue];
NSLog(@"%i", theSolution);
}
}

[pool drain];

return theSolution;
}


Okay, it's a little messy but the difference is apparent nonetheless.

Arrays in Cocoa, at least on the surface, are a hassle. If I want the same basic functionality in arrays that I'm used to in REALbasic, then I have to use NSMutableArray, and that brings a whole lot of complexity to the table. Initializing NSMutableArray is like any other object, but it's the appending values to it where the hassles begin. In the REALbasic code, I declared an array of Integer type and appended two declared integers to the array, shown here:


dim FibonacciSequence(-1) as integer

dim FibonacciValue1 as integer = 1
dim FibonacciValue2 as integer = 2

FibonacciSequence.Append(FibonacciValue1)
FibonacciSequence.Append(FibonacciValue2)


In Objective-C, I can't just add on a couple of int to the array because NSMutableArray only takes objects. If I create an int and send the addObject message to the array, Xcode returns "passing argument 1 of 'addObject:' makes pointer from integer without a cast". I'm cool with that because an int isn't an object and I don't know how to cast (Yet). In looking up Integer in the documentation, I get back a number of results that lead me to NSNumber.


NSMutableArray *FibonacciSequence;
FibonacciSequence = [[NSMutableArray alloc] init];

NSNumber *FibonacciValue1;
FibonacciValue1 = [[NSNumber alloc] initWithInt:1];

NSNumber *FibonacciValue2;
FibonacciValue2 = [[NSNumber alloc] initWithInt:2];

[FibonacciSequence addObject:FibonacciValue1];
[FibonacciSequence addObject:FibonacciValue2];


On a side note, I tried NSInteger, but that returned a lovely "error: 'NSInteger' is not an Objective-C class name or alias". I later learned that NSInteger isn't declared in the Cocoa or Foundation frameworks.

The other hassle came with I went to get the last item in the array. In REALbasic, this was done by the following:


dim lastIndex as integer = UBound(FibonacciSequence)

dim valueNminus1 as integer = FibonacciSequence(lastIndex)


Straightforward stuff. Ubound returns a zero-based integer that I can then use to grab that item. Objective-C, on the other hand required the following:


NSNumber *lastIndex;
lastIndex = [[NSNumber alloc] initWithInt:[FibonacciSequence count]];

int valueNminus1;
valueNminus1 = [[FibonacciSequence objectAtIndex:[lastIndex intValue] - 1] intValue];


Right, well, it seems that the count message for NSMutableArray returns, if you can believe this, an NSUInteger according to the documentation. However, if I use NSUInteger, then I get the "error: 'NSUInteger' is not an Objective-C class name or alias". It seems NSUInteger is also not declared in the Cocoa or Foundation frameworks. (So, how the hell did it make it into NSMutableArray?)

I forget how I got to using NSNumber as the datatype other than coming to the conclusion after reading the documenation that NSNumber is a sort of "catch all" datatype for numbers (and Boolean). What I feel is truly important here is notice how the count message's NSUInteger get's set to the NSNumber variable without error and without any obvious casting. I didn't realize I did that until after I clicked "Build and Go".

The other small problem that I ran across is that the count message returns a 1-based integer, but the indexes (indices?) require a 0-based integer. So, all of those folks (like me) who complain about a lack of 0- and 1-based inconsistency in REALbasic will quickly find the same thing in Objective-C.

The books I've been reading have all been saying that it's best to use the NSObject-based objects in as many cases as possible. I'm sure there is someone out there saying that the Cocoa array way of doing this is better in the long run. I have yet to see how, but I'm sure long-term compatibility comes into play here. Regardless of that, I would much rather read the REALBasic code.

More problems will be written up if they offer up interesting language features.
add comment   |  0 trackbacks   |  permalink   |   ( 0 / 0 )
Programming For Fun 
Friday, January 2, 2009, 11:23 AM - Programming & Computers
Posted by Administrator
I'm not sure if it is the same for me as it is with other programmers, but there are times when I become weary of my projects and the last thing I want to do is deal with them.

Simple Cataloger has one more change to be made that I know I could blow through if I could just wrap my head around the feature change. It's not even a crucial one at that, but isn't easy and it could generate more sales.

My MIDI editor was cruising along until I started writing the Undo engine. Writing an undo engine is hard, particularly so when you don't think about programming for it while creating the functions and features themselves. At this point I've hit a fairly large wall, and it's one of those problems where I need a solid day of work to get through it. What I'm doing now is absolutely crucial to the success of the application so the enormity of it is...well...overwhelming. Especially since I'm going to take my third stab at my current problem and if I don't get it right this time, I have to seriously consider rewriting the app with an architecture that better supports Undo.

In short, programming, even though it always has been work, has lately been not a lot of fun and more than a little frustrating. if anything, it's just become a hassle at this point. I think my conceptual honeymoon with programming is over, and now I have to actually work at my relationship with the craft. I really need to make programming fun again.

Over the past several months, I've been searching for and reading all the sites about Objective-C and Cocoa programming for Mac OS X. I grabbed a couple of books and after running through a couple chapters of each, I've had The Moment of Clarity. It's making sense now. I'm able to read more code and understand more about how Xcode, Interface Builder, the frameworks, and Objective-C all work. I've even gone so far as to create a cheat sheet for myself that shows the details of REALbasic with Objective-C, language feature by language feature. It's a work in progress and I will be constantly editing it as time goes on.

After going through the beginning projects and getting my head around the syntax< I wanted to try some stuff on my own. I could have gone through some of my older RB projects to see about porting something, but that wouldn't have been much fun, and I'm not a fan of re-inventing wheels.

Jeff Atwood over at Coding Horror had a great blog entry entitled "Programming: Love It or Leave It". The first comment linked to Project Euler (http://projecteuler.net/), which is a great set of math problems for computer programmers. What makes them especially great is that you don't need a hard core mathematical background but really just an interest in numbers in general. After reading some of the questions at varying degrees of difficulty, I decided this would be a great way to challenge myself in learning in Objective-C and Cocoa but also give me challenges as a programmer as well. It will force me to actually think in Objective-C and not just follow along with exercises.

I've done only a couple of the questions, but I'm totally hooked. I edit my cheat sheet as I go and I'm learning new Cocoa and Objective_C features doing this faster than I am through the books (though the books do go into a lot more than what Project Euler will require digging into). Besides, it's just fun to play with these numbers and see what comes out the other end. I highly recommend it to everyone who is looking for something fun to program, and who is either bored or overwhelmed and just need a fun diversion from the usual. The more important thing that I'm regaining is that sense of confidence in overcoming programming problems.

This does not mean, however, that I am walking away from REALbasic. In fact, as I delve further into the realm Apple Developers, I gain an increasing appreciation for all that is REALbasic. I honestly feel that there is no way I could dug into Apple's tools without the foundation of REALbasic to really get me going in the craft of programming. I will always have a need for a cross-platform tool at The Day Job, and I sure as hell can't do that in Xcode. Xcode is another tool in the toolbox at this point. I do have the idea, however of doing a series of blog posts showing my solutions to Project Euler questions in both REALbasic and ObjectiveC/Cocoa just to show the benefits of both (but, really, more REALbasic. The syntax is SOOOO much nicer).

I've long since learned from going from Applescript to REALbasic that learning new languages makes me a better programmer, and going from REALbasic to Objective-C just reaffirms that. Project Euler is making programming fun again, and I'm happier about that than anything at the moment. I'll get back to those larger problems I mentioned earlier, but first I want to futz with Fibonacci numbers just a little bit more. Fibonacci numbers are cool.
add comment   |  0 trackbacks   |  permalink   |   ( 0 / 0 )
Frenzic Revisited 
Saturday, November 29, 2008, 07:28 AM - General
Posted by Administrator
What can I say? I'm having fun...

Things I've sorted out so far that have helped me so far (I recently broke 2000, hit a peak of 2600, and am now averaging over 1000):
  • Read the strategy guide as many times as necessary, but add concepts into your gameplay one at a time. If you think you've got it all, read it again.
  • Use of your peripheral vision is a must. I actually hold the iPhone a little further away than normal so I don't have to mentally scan as wide an area.
  • I consider the Nuke button to be the most useful. But since a high score is the goal, the x2 button is the most beneficial. I think the distinction is important, because you can't clear nasty mistakes with the x2 button. The Slow Timer button is just gravy.
  • I'm not quick enough for Talos' x2-to-Nuke combo most times, but I find that Nuke-to-x2 is almost as good, and awesome with the Slow Timer if I can get in a couple single color pies.
  • Pick a system and stick with it. I place green for Nuke, Orange for x2, and purple for Slow Timer. It was decided upon what I thought were the most useful power-ups and the brightness of the colors. From there, I just move clock-wise around the pies, keeping the number of colors in each pie as much possible.
  • I play better in the mornings right after coffee.
  • Practice, practice, practice as the game slows down as you get better.
  • Perseverance pays off, but pace yourself. I find my performance (and the iPhone's) is better if I play three or four games and then go take a break. If I hit a particularly high score, I put it down and not play again for a couple hours. (There's no reason to obsess and quickly get burnt out.)
  • Don't discouraged by those in the Newbiw and Apprentice rank with scores of 3000+. I'm willing to bet those are Artisans or better creating new accounts to get themselves on the boards in as many places as possible. It's a cheap move.

You know you're addicted to Frenzic when...
  • ...the anti-glare film on your iPhone has six distinct smooth, and thus not so anti-glare, finger-sized spots.
  • ...you see a piece of pizza on a plate and instinctively start looking clockwise around the table to see where it will fit.
  • ...you find yourself practicing doing things with your peripheral vision.
  • ...you weigh which is worse: Pausing the really good game you started in the morning over coffee or going in late to work.
  • ...you check your Frenzic score placement as often as your RSS feeds.
  • ...you write your own strategy guide.

2 comments ( 20 views )   |  0 trackbacks   |  permalink   |   ( 3 / 47 )
Frenzic: I "get it" now. 
Saturday, November 22, 2008, 07:33 AM - Programming & Computers
Posted by Administrator
If you have and have an iPhone and haven't played Frenzic, you should. It's a really great iPhone experience. It doesn't use the fancy accelerometers or proximity sensors, because it doesn't need to. It just does one things really well, and that is the touch screen.

I played the desktop version, and wasn't too keen on it. I think it was all of the fast-paced clicking. My aim is usually off enough times to be a hazard while playing any seriously timed click-centric game.

However, Frenzic on the iPhone shows that it was meant to be a touch screen game all along. Game play improves dramatically, and is addictive. Like Tetris addictive. It makes sense now and I'm finding myself sneaking in games whenever I can.

I'm a massive fan of Iconfactory, and I've purchased all of the apps in their catalog (except Twitterific. I just don't have any interest in Twitter), but I was leery of them getting into games as I always considered their focus to be on graphics. Certainly, a game is a great venue for them to show off their graphics skills, as Frenzic clearly shows, but still, there's a reason why graphics and game play are usually two separate jobs.

Also, with the location services, posting scores both community-wide and locally (though I would like "local" quantified) adds a really great dimension with almost no fuss on my part. I have to admit that there was a satisfaction in making it to the boards the first time, even if it is only my immediate area. (OatmealAndCoffee is the account name in case you go looking)

I am a little concerned about battery power when it comes to games on such a small device, and I'm watching that closely as it would be keen to have a game this engrossing on the plane. My PSP holds up really well, but that was designed for games from the start whereas the iPhone wasn't. I'm staying away from any of the 3D stuff because I know for a fact that kills the battery, but I have Lux (computer Risk rules) and that does really well. So far, Frenzic looks to be holding up, too.

All in all, Frenzic is well worth the $4.99 in the App Store.
add comment ( 2 views )   |  0 trackbacks   |  permalink   |   ( 2.6 / 49 )
How To Build A Drum Riser 
Sunday, November 9, 2008, 09:35 AM - Percussion
Posted by Administrator
Now that Fall is here, it's been a time for a lot of home projects and not a lot of time for programming. I caught up on a couple of things that needed to get done before Winter kicked making them all but impossible to do. One of those things was building a drum riser for the kit in the basement office. Since the web is surprisingly bare of reasonable instructions on how to do this, I thought I would share my plans. The link below goes to a static page because the content is far too in depth for this blog. Enjoy...

How To Build A Drum Riser


add comment   |  0 trackbacks   |  permalink   |   ( 2.6 / 35 )
Too Many Distractions 
Wednesday, October 29, 2008, 08:57 PM - Programming & Computers
Posted by Administrator
It's been a busy, busy month here at O&C, both at home and at The Day Job.

Simple Cataloger is steadily selling still and I've gotten some great feedback from customers and trial users. A lot of their feedback has been for features I had thought about doing already, but I wanted the application to be out there for a while and wait and see what users would ask for. An upgrade will be coming before the end of the year hopefully with those requests. At the very least, I need to make sure that the app works in Mac OS 10.5. Those .x really change the rules every time.

People have been working furiously working on the new ARBP members website. I contribute as best I can, but I feel I'm more than a little out of my depth with the web work, though I'm learning more than I'm doing which is more important than anything (and one of the main reasons why I volunteered in the first place). So, it's all good.

I've noted earlier on this blog that I got an iPhone. I'm not going to write yet another review, because that's been done a gazillion times already elsewhere by people who are much at doing such things. What I am going to write about is how an iPhone app led me to a quick but fun REALbasic project.

I recently picked up the Bloom application from the App store (links to iTunes). The application is an exercise in ambient, generative music. A user can interact with the app by clicking on different areas of the screen to play simple musical notes, or the app will take over after being idle for a period of time, all while playing over a well padded drone.

It's all very Eno and a great app to show off the iPhone. Brian Eno is one of my favorite musicians, so even before I knew anything about the app, I picked it up. A risky move, I know, given all of the flotsam and jetsam in the App store already.

It proved to be a fun investment, and as I played with it sorting out how it worked, options and all, I began to think about how I could write an application like that. The application is simple in concept but leaves open a good number of variations within itself.

Over the weekend, I wrote up some pseudo-code, and coded the core of the app in REALbasic. It doesn't look or sound exactly the same because I'm tying into the same frameworks as their code, but I created a reasonable fascimile of the core of the app. I realized after writing it that it answered some of the questions I more commonly see on the Forums and the NUG. It's a fun little app that is ripe for customization and expansion.

Normally, I'm not one to release any of my code. I mean, I usually only code for the Day Job and for my own commercial stuff, and besides someone might actually look at it and actually...yikes...critique it. But I decided that the ARBP would be a good place to start getting some of my work out there. So, I uploaded REALbloom's code the code repository on the soon to come members only site.

REALbloom offers a simple structure for handling animated graphics with dynamic transparency. It also includes Joe Strout's YNotePlayer class, a currently Mac OS X-only replacement for the now de-emphasized NotePlayer.

I also uploaded the code for a little helper app that I have for IDE scripts that mimics the clippings window in BBEdit that call RBClippings. It shows not only how helpful code generation can be, but also offers an easy to maintain user preferences module. It's another app ripe for customization and expansion.

Share and enjoy! If you make any useful modifications to the code, please feel free to show me and upload to the code repository once it's up. You have to join (free, even) to get it, but I think the rest of the ARBP members site will be worth your time even if my code isn't.
add comment ( 7 views )   |  0 trackbacks   |  permalink   |   ( 2.9 / 27 )
Helping to stimulate the economy 
Friday, October 10, 2008, 11:57 PM
Posted by Administrator
Today I went from a four year old "comes free with the account" flip phone to an iPhone. The flip phone served me very well and easily had another year of life in it. I just got tired of coming across questions I just knew I could get the answers to if I only had an iPhone.

It's worth every last penny.

Sent from my iPhone
add comment ( 6 views )   |  0 trackbacks   |  permalink   |   ( 2.9 / 48 )
REALbasic: It's a floor wax and a dessert topping! 
Tuesday, October 7, 2008, 07:23 PM - Programming & Computers
Posted by Administrator
Every so often I see comments in the REALbasic mailing lists and the forums from Mac users claiming that REALbasic is a Windows-centric tool because it doesn't offer certain (or enough) Mac-specific capabilities. But, then, I also see the same sentiment echoed from the Windows users claiming that it is a Mac-centric tool for the very same reasons (I don't read through the Linux forums so I have no idea what they're saying).

The latest round of claims got me to thinking about why that must be, and I hit upon the answer in a rather roundabout way. I stumbled upon it while digging through some older emails looking for some information where an RB engineer (who shall remain nameless) basically said the reason why they weren't going to implement some control was because wasn't cross-platform. In other words, you couldn't use that control on all of the supported platforms. Huh. I never thought about it that way, but fair enough. REALbasic is a cross-platform tool so it only stands to reason why some controls are past a certain line.

So, the truth is, as I see it, in the end REALbasic is neither a Windows-centric nor Mac-centric tool. In fact, it's neither and both all at the same time. What it is, really, is the Lowest Common Denominator. But I don't mean that in a bad way, in fact, I think that quality is one of its greatest strengths by far. Even though I program primarily on the Mac, I've done the cross-platform bit. It's really cool. I've literally written one set of code, compiled for Mac and Windows, I didn't have any platform-specific issues, and blasted it out to dozens of users who have used my app daily for two years running now without a single complaint. (Good luck with that, Java.) Now knowing that, I think it not only renders the Windows- and Mac-centric arguments null and void, but also shows really just how great REALbasic is at its core. There's nothing like it.

However, I think a case could be made for more platform-specific features, particularly in the area of controls. REALbasic offers a wide variety of controls, enough to suit the vast majority of needs. I really can't complain. Controls like the Canvas and Listbox are so robust that I think one could do just about any kind of app they want with just those two alone.

But, there are times when a Mac-only control would just do the trick to polish up an application into something that looks like a Mac application through and through. You know, something that users would expect. The Round and Help buttons come to mind, as do the Segmented Cell, Segmented Control, and the Circular Slider. These are relatively simple controls, but they are so decidedly Macintosh that there have been times when one of them would have been the perfect control to put into an interface. They are, as far as I'm concerned, signature controls for the Mac; they help make the Mac the Mac. I'm sure that if I dig around VB.NET long enough I would find some controls that have that "Ooh! That's the one!" factor to them as well.

I've always had the impression that being the lowest common denominator is a really tough job mainly because it is, in this context at least, trying to be all things to all people. It's a double-edged sword. I experience that now in my Day Job to a smattering of internal "customers" (other departments), and it is really hard to keep up sometimes. But, the book publishing landscape changes (albeit slowly) and there are times when I just gotta give in and do things that more or less go against my department's paradigm up until that point. Thanks, e-books.

My naivety about how things work over at Real Software, which I feel is the same naivety that drives the complaints that are the topic of this article, wants to think that it shouldn't be too hard for them to sprinkle in a few more controls on each of the platforms. I mean, we already have Windows and Mac-specific features in the framework itself like FolderItem.MacCreator, FolderItem.MacType, and all of the Microsoft Office classes (which, BTW, were cross-platform at one point. Thanks, Microsoft). Controls are obviously much more complex than datatypes and values, but still, I think the case could be made for more platform-specific controls, and the extra work I think would be worth it.

I can, as an alternative, use declares for getting Mac-specific controls into my applications. But, man...have you seen those things? I dig all the power and all that, but that's a whole lot more typing than the rest of my code for one object, and a whole lot of "math", too. As clean as the REALbasic syntax is, declares are still a hassle. I could also use a funky combination of screenshots, masks, and a canvas to recreate these controls, and I'm about to do just that, but doing so is...well...funky. I would much rather leave that to someone else to maintain.

I can certainly understand the REALbasic engineer's point that they didn't support the given control because it couldn't be found on all platforms. However, I think that may be a bit of a hindrance to the framework, and it would be nice to see some of these deprecated objects replaced with items that speak to a renewed focus. REALbasic's inevitable move to Cocoa I'm sure will open up many doors for the framework, as will Windows 7/Vista 2/Whatever. Exciting stuff is in the works from all directions. REALbasic has given me everything I need to get my work done while having fun at the same time, and I'm hoping that I might get just a little bit more.
add comment ( 9 views )   |  0 trackbacks   |  permalink   |   ( 2.8 / 44 )
Bits and Bobs 
Monday, September 29, 2008, 09:23 PM - General
Posted by Administrator
From the recent Bank of America commercials featuring Keifer Sutherland voiceovers (money a bit tight, eh, mate?):
This is America. Do we let the sun just shine and the wind just blow? No. We put them to work.

Well, actually, Bank of America, we don't put them to work. Why does energy policy exist only in absolutes?


I abhore automotons and ATNA managers in any organization.


I find it laughable that industries which absolutely abhore government regulation and fight any intervention at every turn are usually the first ones that cry for help from the government when they are the victims of largely their own devising.


While driving up I-495 one day I came upon a gasoline tanker truck that was weaving through traffic moving faster than most cars would reasonably allow. I was appalled when at one point, the driver wove through two cars so quickly, he put his truck at a fairly jaunty angle while weaving between them to the point where I swore it was going to crash. At that point I sped up to get as much asphalt between me and him. Soon after I did that, I came across a septic disposal truck doing the exact same thing. Which immediately made me wonder that between a gasoline tanker truck and septic disposal truck crashing and potentianlly spilling its contents, which would be worse to deal with?


You can't be against globalization and still get your coffee at Starbucks.
add comment ( 3 views )   |  0 trackbacks   |  permalink   |   ( 2.9 / 38 )

| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Next> Last>>