On Tue, Nov 22, 2011 at 04:20:32PM -0500, Paul Davis wrote:
its can get quite a lot more complex than this. its
not uncommon to
find cases where you want the on-screen view/control to be updated
*without* modifying the model. the canonical case of this in ardour
involves dragging regions around on screen. forget the canvas - there
can be clocks that show the current region position. these need to
update to show the motion of the region, but its vastly,
overwhelmingly too expensive to update the model (the backend, in
libardour) with every recorded mouse motion. so a rather complex
scheme is sometimes necessary wherein UI events change the state of
the view(s)/controller(s) without changing the model, and only at the
end of a gesture of some kind does the model finally update and things
go back to the regular dependencies.
this does make for some hellish code, though.
Indeed. There are similar things in Aeolus (but probably not as
hairy as in Ardour) which is strictly MVC.
Doing 'the right thing' as pointed out by Nick requires in most
cases a round trip to the application code and back. Which can
become problematic if this involves a relatively slow OSC/network
connection for example. Things get even more hairy if you consider
automation and plugins.
Ciao,
--
FA
Vor uns liegt ein weites Tal, die Sonne scheint - ein Glitzerstrahl.