Round 1: Refactoring Potentials for Better User Experience
Monday, February 2nd, 2009I've just finished what I can call "Round 1" of the refactoring and updating of my Potentials application. Basically, it's a Poission's Equation solver that allows for several difference shaped objects - metals and non-metals, on a field with boundary conditions and varying dielectric constants. The solution is the potential at each point, and from there you can get the electric field - well, actually, I do in the output.
What I had originally written was the 'engine' of the simulator, and not really spent any significant time on the UI. Well, a few days ago, I decided that I needed to have a test case for the CorePlot work I'm going to be doing and so I decided to start fixing up this guy as I was going to need to sharpen my skills anyway, before diving into the CorePlot code.
The original UI had an NSTextView for the log messages from the simulation and an NSTextField for the filename to load up and run, along with a "Go" button and a status line label. Really, it worked, but it wasn't very clean at all.
The new UI has an MSTextView, but now it's for editing the source for the simulation and using menu selection and keyboard shortcuts for the running of the simulation. It's also got the File Open and File Save dialogs so that you interact with it as you would a 'real' application.
No question, I need to add a lot to make it "real". Most notably, preferences and the saveing and loading of same. That way, the font could be changed, the window's position saved and reloaded, and even the working file reloaded on restart. There's a lot that could be done, but I've been making really good progress so far, and I think now it's time to spend a little time on the CorePlot framework to see what it is that needs to be done there.