December 17, 2008
New version of ShortBoard .90
I have just posted a new version of ShortBoard, the Mac OS X application for searching for OS X broadcasts and schedules. This release adds the ability to add a broadcast to iCal so you can be reminded before the broadcast begins.
You can find all of the information, as well as download the application from here.
December 17, 2008 in Cocoa, DX, ShortBoard | Permalink | Comments (0)
December 03, 2008
Resources for Learning Cocoa
Ive gotten a couple of questions lately from people asking what resources I use to learn Cocoa. I figured I would make a quick post, and list them:
Cocoa Programming for Mac(R) OS X (3rd Edition)
- Aaron Hillegass
This is probably the best single resource if you want to just jump in and get started. It covers enough of the basics of Objective-C to get your going.
Programming in Objective-C - Stephen Kochan
This is a great resource for really learning the in's and outs' of Objective-C. Even if you are reason the Hillehass book, I recommend this one as a useful reference. (I am constantly looking stuff up in it.). There is also a new version coming out soon which covers Objective-C 2.0.
Apple Cocoa Reference Docs : Single best resource for API information.
CocoaDev Provides tips and tricks and gotchas for all of the Cocoa APIs.
Cocoa Dev Central : Good tutorial site that really compliments the Hillegass book.
Apple Cocoa-Dev Mailing List High volume mailing list hosted by Apple, which is the best resource for getting clarification on Cocoa, as well as help with issues you might run into.
I have also posted my rough Cocoa notes, which you can find here. Finally, if you are considering doing any iPhone development, then make sure you learn how to manage memory when learning Cocoa. Objective-C 2.0 adds automatic garbage collection (which works well), but it doesn't work on the iPhone.December 3, 2008 in Cocoa | Permalink | Comments (1)
December 02, 2008
ShortBoard Shortwave App for Mac (v.85)
I have just upload a new Mac / Cocoa app I have been working on called ShortBoard. It is a simple app that loads shortwave broadcasts schedules from Prime Time Shortwave, and makes it easy to view, sort and filter them.
This is just a first release, and I am planning to continue to play around with it and add features (im using it to learn Cocoa).
You can find more information, as well as download the app from here.
December 2, 2008 in DX, ShortBoard | Permalink | Comments (0)
Reopening an NSWindow once it has been closed
Unlike on Windows, the convention on Mac is that when the main application Window is closed, the application does not exit (although there are exception to this). If you are working on a Document based application, the functionality to open a new window is built in (just open a new document), however for a non-Document based Cocoa application, you have to implement this functionality yourself, which is pretty simple. First, you have to tell the window (NSWindow) to only hide itself when it is closed, and not also release itself.-(void)awakeFromNib
{
[mainWindow setReleasedWhenClosed:FALSE];
}
You then need to create an IBAction that is hooked up to a menu item to reopen the window once it is closed. I use Window > Main Window (I cant find a convention for it). You can re-open the window by calling makeKeyAndOrderFront.
-(IBAction)handleNewMainWindowMenu:(NSMenuItem *)sender
{
[mainWindow makeKeyAndOrderFront:self];
}
This will un-hide or re-open the main application window.
If you want to disable the Main Window NSMenuItem when the window is open (and enable when it is not open) then you can check the windows visibility in the menu's validateMenuItem delegate method (hooked up as the delegate to the NSMenu that contains the Main Window's NSMenuItem:
#define MAIN_WINDOW_MENU_TAG 150
- (BOOL)validateMenuItem:(NSMenuItem *)item
{
//check to see if the Main Menu NSMenuItem is
//being validcated
if([item tag] == MAIN_WINDOW_MENU_TAG)
{
return ![mainWindow isVisible];
}
return TRUE;
}
Note that I set the tag for the NSMenuItem to 150.
Now, when the user closes the main application window, they can re-open it by selecting Window > Main Window.
December 2, 2008 in Cocoa, Mac | Permalink | Comments (0)


