Potentials – Adding Initial Drawing to the App

Building Great Code

Today I got back to Potentials and wanted to add in the initial drawing context to the app - by splitting the UI from being just an editor to an editor at the bottom of the view, and a NSView subclass on the top. The bottom editor will be the complete width of the window, and the height will be fixed at a handful of lines. Then the drawing area is the stretchable area above that.

I had to re-learn a few things - like where the outlets and actions are held, and it turned out that it really was all about the nib file format, and once it was converted to an xib, I was able to find everything where I expected to see it.

Potentials Starts Drawing

There were a few AutoLayout issues that were easy enough to correct with the xib file, and then it was a few simple drawing functions, and it's working just great. I have a lot more to do, but I think the Voltage plots are going to be pretty simple... just a color range on the values, and away we go.

It's nice to be back in ObjC and macOS... such a fun platform. 🙂