On Thu, Jul 03, 2003 at 10:25:43AM +0200, Alfredo Braunstein wrote: > Then there's something fishy going on right now, because the current (say, > converter) code does this: > > - gets the/a BufferView from the buffer through Buffer::getUser (getUser is > conceptually wrong per se IMHO - not much different from current_view)
Indeed. > - gets the LyXView from the BufferView > - get the LyXFunc from the LyXView > - pass this LyXFunc to LaTeX > - LaTeX dispatch its messages there Well, _I_'d ignore the possibility of different LyXViews for the next few years (I have done so for a while now, and I am still alive...) So we'd have a single LyXView with a single LyXFunc, at least for a while. Then there are a couple of buffers, each could be looked at from different views. This would make a nice tree, wouldn't it? Now all requests can be fed it at the root of that tree, i.e. at the LyXView or the LyXFunc. As LyXFunc already has a dispatch, I'd choose this. So what I think we need is some mechanism to feed asynchronous events to the LyXFunc. Currently this is done by individually jumping around in the spaghetti pile until we have some LyXFunc *. Alternately, we could play a bit safer and have some global 'LyX::dispatch' which figures out which LyXFunc to use (hard if there is just one ;-}) and simply passes on request to it. Then every asynchronous event could simply be routed to the 'singleton' LyX::dispatch. Andre' -- Those who desire to give up Freedom in order to gain Security, will not have, nor do they deserve, either one. (T. Jefferson or B. Franklin or both...)