Latest Articles

Use the navigation at the bottom to see older articles

How to create an Open File dialogue with NSOpenPanel

NSOpenPanel is surprisingly easy to use: create the panel, call the openPanel method, and handle the returned URL object in a block. In this example we invoke the panel from a button in the main window, then display the returned URL in a textLabel: – (IBAction)loadFile:(id)sender { // create an open documet panel NSOpenPanel *panel […]

What to do if you’ve forgotten all credentials to your WordPress site

This podcast describes how to gain access to WordPress even without username, password or working email address. It’s happened to the best of us: you forgot your Password you forgot what User you are even worse, you’ve forgotten which email you’ve used when you installed WordPress worse still, your email no longer exists Fear not, … Read more

How to pass data from the App Delegate to your Top View Controller

If the App Delegate has something that your top view controller needs then you simply pass it the required object via a property set on the top view controller. This is easy when your top view controller is also the root view controller. However, when you embed your top view controller in a Navigation Controller, […]

How to return the number of rows in a UITableView with Core Data

Likewise, here’s how we return the number of rows using a fetched results controller – as provided by the Master / Detail template: – (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { id <NSFetchedResultsSectionInfo> sectionInfo = [[self.fetchedResultsController sections]objectAtIndex:section]; return [sectionInfo numberOfObjects]; }

Binding an NSTableView to Core Data without code

I was excited to find out that it is possible to write a Mac App with Core Data completely without code! This magic is possible with something that’s not available in iOS (yet) called Cocoa Bindings. You provide the user controls you need in Xcode, then control-drag your way to extensive functionality and happiness. Before […]

How to assure your values are as intended with NSAssert

NSAssert is a macro which allows you to test for specific values if and when they occur. Rather than having to figure out where your app has passed the wrong value several stages before a problem happened, NSAssert can be used like NSLog – with the helpful difference that if all is well, there’s no […]