Mac Dev (Europe) 2009 - European Conference for Mac Developers

You may have noticed a bit of a lull between my last few posts to this site; I apologise in advance for the shameless plug but this is because I have been working with Steve Scott (aka Scotty) of the Mac Developer Network and Late Night Cocoa etc podcasts to bring you a Macintosh Developer Conference taking place here in Europe next April 2009.

For two days you can gather together in Hatfield, UK with fellow Mac Developers from all around the world to attend a series of intermediate to advanced Cocoa talks and workshops. We’ve put together a fantastic speaker schedule including talks from Marcus Zarra on Spotlight and Quicklook integration with Core Data, Bill Dudney on Core Animation, Philippe Mougin on F-Script, Andre Pang on the inner workings of Objective-C, Graham Lee on application security, Drew McCormack on application performance, Fraser Speirs on integration with Apple’s photography API, and a whole lot more. Visit the Sessions page for up-to-date information about what’s on offer.

And, can you believe it, all this is currently available for our early-booking delegate rate of just:

£399 plus VAT, which INCLUDES ACCOMMODATION AND FOOD

(Please excuse the use of the ChockLock there…)

You’ll receive breakfast, a 2-course lunch, a sumptuous evening banquet for round-the-table geek-talk, and be able to retire afterwards to your en-suite bedroom only a few steps away from all the conference action. The conference facilities are all located within the one site so if receiving so much food with minimal twixt-lecture exercise is cause for alarm, fear not for you will also have access to the on-site sports centre which includes a 100-station fitness suite, swimming pool and even a climbing wall to burn off all those conference-banquet calories!

More information on pricing and what’s included is available at Conference Pricing. Further information about the venue is available here.

Workshops at £185

We’re also running a series of one-day workshops, taking place the day before the main conference starts, including one from Marcus Zarra on Core Data, one from Mike Lee on Application User Interface Design, and one from Bill Dudney on writing iPhone apps. Again, this price includes accommodation and food. You’d be mad not to book one now! (Ok, I’ll stop with the third-rate pseudo-market-seller speak, sorry…)

Christmas Special Offer!

If you register before the 24th December 2008, you’ll also receive copies of two Mac OS X development applications worth over £40 — Code Collector Pro and Changes.

And, of course, the VAT rate on the conference is now at the lower UK rate of 15%.

Places are limited and will be offered on a first-come, first-served basis. If you don’t want to pay the full amount now, you can reserve your place by paying a deposit of just £99 + VAT.

Register for and tell all your friends about http://www.macdeveurope.com. And, when it comes to next April, please come and say “Hello!” — I look forward to seeing you there!

Share/Save/Bookmark

A Bindable Custom NSView Subclass

In this post I’ll walk through writing a custom subclass of NSView that can bind to an NSArrayController to display information either from some generic array connected to the array controller, or from a Core Data object model.

The view we’ll be creating is a custom view to display a pie-chart; in the sample app the pie-chart will be drawn from data entered in an NSTableView. The finished application looks like the following:
The finished sample application showing the custom NSView subclass bound to a Core Data entity
Continue reading ‘A Bindable Custom NSView Subclass’ »

Share/Save/Bookmark

On Cocoa Bindings – “Let Us Break Their Bonds Asunder”

Chances are, if you’ve developed any kind of Cocoa application, you’ve probably made use of Cocoa Bindings in one way or another, particularly when it comes to Core Data. The technology is ‘key’ to so many of the underlying frameworks but it is a technology that tends to be often-used but frequently not fully understood.

If you are someone who happily binds Array Controllers and View objects together using Interface Builder but have always wondered discretely exactly how the magic behind the scenes happens, or if you just don’t quite comprehend the difference between ‘KVC’ and ‘KVO’ (or perhaps can never quite remember what they stand for…), this article might help you out. In it, I’ll attempt to demonstrate a ‘faux-bindings’ methodology that connects a value from one object with a value from another object, but without using the actual Apple Cocoa Bindings technology. The bare-bones of how the ‘faux binding’ works will be there for all to see; while the internal workings of Cocoa Bindings are a little different, this will hopefully at least show you what, how and why certain things are required for the real Cocoa Bindings to work successfully.

Continue reading ‘On Cocoa Bindings – “Let Us Break Their Bonds Asunder”’ »

Share/Save/Bookmark

Core Data Migration and Versioning

By default, a Core Data application will refuse to load data created using an older data model. So, if you’ve been using one version of your model for ages and have loads of data, it’s a bit of a pain that should you wish to add an entity, attribute or relationship or make other changes to your model, you won’t be able to open the old data in a new version of your application.

Prior to OS X 10.5 if you wanted to convert data from one model version to another, you had to handle the conversion code entirely yourself. With Leopard, however, Apple built in versioning and migration capabilities to make dealing with data migration a great deal easier.

This article looks at how you can support data migration in your Core Data applications. It shows how to handle changes entirely using Data Model versions and Mapping Models, before looking at customizing the process by using custom migration classes.
Continue reading ‘Core Data Migration and Versioning’ »

Share/Save/Bookmark

Core Data and Sync Services

Apple’s Sync Services framework allows applications and devices to keep in sync with each other’s data. If you subscribe to the MobileMe service, for example, it is Sync Services that handles synchronization between the server, your computers and any connected devices such as an iPhone. This article discusses adding synchronization capabilities to Core Data applications. We’ll start by looking at the information you must provide to allow synchronization to take place and then build two sample applications that will keep in sync with each other.

Continue reading ‘Core Data and Sync Services’ »

Share/Save/Bookmark

Sample project code now available for all posts

It is now possible to download example finished projects for each of the walk-thru articles so far:

Continue reading ‘Sample project code now available for all posts’ »

Share/Save/Bookmark

Drag and Drop Rearranging in Table Views with Core Data

One thing I frequently need to support in my applications is the display of data in a table view with a specific order (not necessarily alphabetical/numerical order) along with the ability to rearrange that order by dragging and dropping items in the table.

In this article I’ll look at how I accomplish this task using these steps:

  1. Setup order in Core Data by maintaining a ‘viewPosition’ for each object.
  2. Write code to support rearrangement of the order (ie moving an object(s) above/below another object in the user interface).
  3. Setup Drag and Drop on the NSTableView to call the rearrangement code.

Continue reading ‘Drag and Drop Rearranging in Table Views with Core Data’ »

Share/Save/Bookmark

Custom Table Cells, Bindings and Core Data

In this post we’ll walk through one way to use a custom cell to display multiple managed object values in a single table view cell using bindings. The obvious question here is how to bind the Value of the table column in Interface Builder to more than one Model Key Path from Core Data. You can’t, for example, type in a string of attributes like ‘firstName, lastName’ or anything like that to specify that multiple values be taken.

Continue reading ‘Custom Table Cells, Bindings and Core Data’ »

Share/Save/Bookmark

Double Clicks in Table Views

Previously we’ve covered multiple windows and managed object contexts in Core Data applications. In this fairly brief article we’ll cover how to open a display/editing window for an object when that object is double-clicked in a table view.

Continue reading ‘Double Clicks in Table Views’ »

Share/Save/Bookmark

Multiple Managed Object Contexts with Core Data

In the last article, I walked through a simple multi-window Core Data document application. The pretext of this article is to show how I use multiple Managed Object Contexts in my Cocoa Core Data apps. We’ll be building on the application created in the last article by adding in two new windows; an ‘Add New Department’ window and an ‘Add New Employee’ window.

The application we created previously lets you insert new departments and people by clicking on the ‘+’ buttons before editing the values in the relevant table view. When you click the ‘+’ button, the new managed object that is created has blank string attributes that show up in the table view as an apparently invisible line. One way to change this behaviour would be to subclass NSManagedObject for our Department and Person entities and give a newly created object some default values. In this article, however, we’ll change the ‘Add’ behaviour to open yet another new window in which you can type the initial values before the new object is inserted into the list.

Continue reading ‘Multiple Managed Object Contexts with Core Data’ »

Share/Save/Bookmark