Aug 24 2007

Watch and learn

I’ve seen a couple of good videos from the Google Tech Talks series that I thought I’d pass along. The first one is a presentation on DTrace by Bryan Cantrill. It’s a very good introduction to DTrace and, I’ve got to say, his presentation style is great. I like that there basically is no pre-set presentation. He just runs DTrace and goes to it. Anyway, see for yourself: DTrace Review.

The second one was posted by Nathan and is a really interesting talk on API design. Check it out: How To Design A Good API And Why It Matters.

There seem to be quite a few good videos coming out of the Google Tech Talk series. I just wish they were a bit higger resolution


Aug 14 2007

The re-read

Categories: Books

I’ve found myself re-reading a lot of books lately. I’m not quite sure what it is, there are a lot of books I want to read sitting on my shelf but instead I’ve been going back to my older books.

Maybe this is a secret bid to force Stacy to not put them in the closet.

I’m currently re-reading Cryptonomicon. I just recently finished a re-read of The Fionavar Tapestry. This was preceded with a re-read of The Song of Ice and Fire series. Although that one was predicated by wanting to read the new book and not knowing what the hell was going on.

Once Cryptonomicon is done I’m planning on re-reading the His Dark Materials series in preparation for the movie.

So, this seems to be mostly a summer of re-readings. I did fit in time for the new Harry Potter book but that was just a 12 hour diversion.

Anyone else got some books that they seem to come back to now and again? (This is only a portion of my regular re-read list, just the ones from the past few months.)


Aug 13 2007

Wall, meet head.

Categories: Programming
Tags:

I’ve been playing with some Cocoa programming again and just spent about the last hour beating my head against a wall. I finally sorted it out. Figured I’d write it down for any other poor soul that hits the same problem.

So, here’s the setup. I’ve got a NIB file with an NSTableView that’s using CoreData to display it’s contents. I’ve also got an NSTextView that is suppost to display the value from the NSTableViews selection.

I created a single Entity with a single attribute, name.

So, I created an NSArrayController and bound it to the desired Entity. I then bound the NSTableView’s content binding to the array controllers arrangedObjects. Then the NSTableColumn had its value bound to the name selector of the arrays arrangedObjects.

The table displayed as expected at this point.

I then bound the NSTextViews value to the array controllers selection with a selector of name. This is where the problem appeared. When the app was first loaded the text field would, correctly, display the first item. Any subsequent selected items wouldn’t change what the text was displaying. (After some fiddling I figured out it wasn’t changing the array controllers selection when I double clicked.)

So, the fix, remove the content binding from the NSTableView. That’s it. Once I’d removed that binding everything worked as I expected it too.

I managed to figure that out by creating a new window,


« Previous Page