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.
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.
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.)
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,