|
Written by William Grim
|
|
Sunday, 17 May 2009 04:33 |
|
As I've gotten more and more into iPhone development, I've begun to really enjoy the Objective-C environment. I enjoy its SmallTalk-like message-passing due to all the flexibility it has to offer; however, I'm not so impressed with the compiler front-end Apple has chosen to use with ObjC.
I'm referring mainly to the alloc-init pattern employed all over ObjC. In typical usage, you will perform something like this: NSMutableDictionary *d = [[NSMutableDictionary alloc] init];. However, Objective-C does not prevent you from simply putting NSMutableDictionary *d = [[NSDictionary alloc] init];.
The problem stems from the fact that the init routine, in typical usage, must return the id type, and the compiler assumes that id can be assigned to any ObjC type. However, as witnessed in an earlier example, this is not the case.
In my personal opinion, I think at least a few more basic compiler checks are in order, starting with the case above. Given that the language is heavily dependent on runtime symbol resolution, I don't expect it to catch every error, but it can certainly do more checks than it does now. If I ever find myself with any free time (pretty doubtful), I'll see if I can't submit a patch; hopefully someone from Apple or somewhere else will see my post and implement this idea. Hmm... speaking of that, perhaps I'll submit a bug report to Apple directly and see what results we can get. |
|
Last Updated on Sunday, 17 May 2009 04:41 |
|
|
UIViewController Subclassing: UINavigationController and UIView Lazy-Loading |
|
|
|
|
Written by William Grim
|
|
Tuesday, 24 February 2009 05:31 |
|
UPDATE: As of SDK 3.0, this problem has disappeared. However, I have left the following article for those still wishing to work in the older SDKs.
I'm a bit of a newb to iPhone development and Cocoa-based development in general. However, I've been getting my hands dirty on a project I'm working on with some friends, and I found myself wanting to subclass a UIViewController in order to push it onto a UINavigationController. Needless to say, I ran into a few snags along the way and thought I would share some tips that may save you a few hours of frustration.
|
|
Last Updated on Tuesday, 23 June 2009 18:36 |
|
Read more...
|
|
Arduino/AVR Command-Line Dev Environment |
|
|
|
|
Written by William Grim
|
|
Wednesday, 22 October 2008 12:58 |
|
This article is for those who want to develop software for the Arduino ATmega168-based microcontrollers but don't want to use the Arduino IDE. The reasons for not wanting to use the IDE can range from simply disliking the IDE to feeling the need to be able to write code that ports more easily to different kinds of Atmel-based microcontrollers. The steps introduced here should be applicable to several different AVR models, allowing you to push beyond the Arduino platform.
While this article will focus on FreeBSD as its development platform, it should be quite easy to install the avr-gcc toolchain on another platform and to follow the steps for building and uploading the sample code to an AVR from that platform. Should you find yourself on a platform other than FreeBSD, please skip the Toolchains section, except to take note of the applications you will need.
|
|
Last Updated on Thursday, 13 November 2008 02:05 |
|
Read more...
|
|
User-Space Device Driver Manager |
|
|
|
|
Written by William Grim
|
|
Thursday, 17 July 2008 15:50 |
|
During my Master of Science program at SIUE's CS Department, I developed a user-space device driver framework [pdf] [ps]. Its intention is to demonstrate a model of how device drivers can be created safer in a slightly higher-level language like C++.
The device driver manager's source code for the user-space device driver framework is available, and example drivers are included, along with unit tests of the entire framework. Along with the source code, API [pdf] [ps] documentation to the user-space device driver framework's source code is available. Send any questions or comments to my
This e-mail address is being protected from spambots. You need JavaScript enabled to view it
. |
|
Last Updated on Friday, 07 August 2009 05:39 |
|
|