On Thu, Sep 28, 2006 at 09:30:17AM +0200, Abdelrazak Younes wrote:
> >I guess in the long run this is not ideal...
> 
> /me neither. I prefer simple class that do simple thing good. Cursor 
> should not be a gateway to everything in the LyX memory structure.

It was a fairly uniform improvement over the previous situation a while
ago.

> >And yes, I know who's to blame...
> >
> >>In the case of MenuBackend, you remove the explicit view argument and
> >>use (hidden) indirection via lyxApp instead. It might not be the
> >>wisest thing to do after all.
> >
> >Indeed. This is no advantage. Better pass stuff down as arguments 
> >instead of relying on globals.
> 
> Wait, there is a misunderstanding here. I am not using the theApp to 
> look for the current view, only to get access to the LyXFunc. It is my 
> understanding that there shall be one unique LyXFunc and that 
> theApp->lyxFunc() is the official way to access it.

If there are really two singletons why should one 'belong' to the other?

I'd even consider a global stand-alone dispatch() instead of pulling in
frontend stuff.

> The origin of the misunderstanding is that LyXFunc still depends on one 
> (unique) LyXView. I will get rid of that assumption when FuncRequest 
> contains a pointer to the relevant LyXView a.k.a the LyXView ID given by 
> the Gui class.
> 
> >theApp->xxx is indeed current_view in disguise.
> 
> Only temporary.

So keep it in mind...

Andre'

Reply via email to