Category Archives - Cocoa Bindings

Custom Keyboard View with Bindings

December 31, 2016 12 Comments

The code for this is at GitHub.
If you run it you will see that you can select/unselect keys, singly or with click-drag. Undo works. Save works. The “XYZ” label does nothing currently.

This

Popover from Separate XIB File

March 20, 2016 12 Comments

I’m going to need to display the same popover from many different subviews. I don’t want to have to duplicate the custom view etc in every view XIB so I added a XIB that just

NSplitViewController and Bindings

January 9, 2016 12 Comments

(Note: 1/11/16 — This all worked until I implemented saving and loading. Then, I think the problem is that the array controller gets bound to the data after it’s already read in. So far I

Bindings, ViewControllers, and Storyboards in OSX

January 7, 2016 12 Comments

(Note: 1/11/16 — This all worked until I implemented saving and loading. Then, I think the problem is that the array controller gets bound to the data after it’s already read in. So far I

Storyboards and Document-based OSX Apps

December 29, 2015 12 Comments

Storyboards appear to be a very good way of laying out a UI. After playing around a bit with them I created a new Document-based OSX app that uses storyboards.
Everything came to a

NSCollectionView Bindings with Core Data

December 25, 2015 12 Comments

Previously I wrote a blog about using an NSCollectionView with bindings. Today I did the same thing but used Core Data for the data storage.
As before, the underlying data is a “Channel”. In

NSMatrix and NSCollectionView Bindings

December 24, 2015 12 Comments

After days of struggle I finally gave up on using bindings with an NSMatrix comprised of Checkboxes. There is no good (well, at least complete) info on how to do this on the web.

Cocoa Bindings, Custom Views, and Swift

November 28, 2015 12 Comments

Pounding my head against a wall, trying to 1) understand bindings properly and 2) get them to work in Swift properly.
Here is a custom view. It simply draws its rect as the color specified

Binding MIDI Outputs

November 21, 2015 12 Comments

This took quite awhile to figure out. At first I tried and failed to use a mutable dictionary, then gave up and went with a mutable array of OutputPort.
class OutputPort: NSObject {
let source:

NSObjectController and NSMutableDictionary

November 9, 2015 12 Comments

I’ve had nothing but trouble lately with cocoa bindings. This started out with me wanting to be able to choose from available MIDI output ports via a drop-down that used cocoa bindings. After failing miserably