Wednesday, 27 January 2010

Hallelujah Moment Number 1

So the windowing and menuing is all working. I have a Set of editor objects, which is maintained through control of creation, deletion and amendment of editor objects. Each is responsible for providing it's title which is used as the menu item, and a custom action stores the editor to title relationship, so it can be referenced when the user selects the menu item, to allow that window to be popped to the front. Magic!

Learned a lot about menus, collections, actions getting this bit right - good stuff.

Reference to the Apple Human Interface Guide means we now have a File->Close option which closes the current editor, but leaves the app running and of course any other open editors.

Starting to think about storing the attributes of a score now. Going to use a Model View Controller paradigm, where there's a model object which holds the data associated with the score, e.g. title, page layout, lists of other decorations, list of staff lines, list of notes, list of bar seperators, time sigs, etc. All the functions for setting and getting values are contained in the model, and it tells any Views watching it when it changes, so they can redraw. Typically the changes are the result of input from a Controller.

I'll understand more, when I've implemented it!

No comments:

Post a Comment