[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-dev] EmacsDocument vs. ScelDocument vs. EmacsBuffer



Hiho,

On Saturday 26 December 2009 23:57:56 Justin Glenn Smith wrote:
> I am making a diagram in inkscape of the interactions between the sclang
>  and emacs parts of scel, and I am wondering about the relationship between
>  EmacsDocument and ScelDocument. Is EmacsDocument just there for legacy
>  purposes?

ScelDocument is a direct subclass of Document and should implement all the 
Document methods, and translates between what Document needs, and what 
EmacsDocument can do. Each ScelDocument holds a variable pointing to the 
EmacsDocument it corresponds to.

EmacsDocument is handling the actual interface to emacs/scel, so that is more 
or less the lowlevel interface that implements it (together with the emacs 
lisp functions), and calls the lisp functions. EmacsDocument then updates the 
things in ScelDocument, once the lisp functions have been updated.

So the two are closely linked together, but are not inheriting from each 
other.

This seemed to me the least intrusive way to make the Document abstractions, 
when we started on this, with the least risk of breaking stuff along the way.

>  EmacsBuffer clearly exists specifically for usage by the emacs
>  class browser.

EmacsBuffer is there mainly for Emacs GUI elements, to use the Emacs user 
interface widgets. This stuff was implemented some years ago by Mario Lang, 
who left it hardly documented, and he doesn't seem to be an active SC user 
anymore; the EmacsGUI helpfile I wrote much later, just by trying stuff out.
I think it should be seen separately from the *Document classes, though of 
course later on we could see how to integrate this stuff more with the 
document stuff.

> These three classes seem to have a significant amount of redundancy between
>  them (they all have their own method of providing SC with an interface to
>  an SC buffer). It was recommended that I work on ScelDocument, and I am
>  thinking that the other two would benefit from having their code
>  integrated with ScelDocument and becoming subclasses.
> 
> In the bigger picture I am thinking of trying to implement as many of the
>  functions mentioned in the help file for Document as I am able.

yes, that would be great!

Maybe we should add you to the dev-team on sourceforge?
What is your sourceforge name?

Or we could make a branch of the editors/scel folder somewhere else and work 
from there, while we are changing all this stuff.

I'd be very happy to help out on the SC side, and for testing...
 
> I have included my partial diagram (should be viewable in firefox or opera,
>  but inkscape displays it better, and allows you to zoom in more (it is
>  vector graphics, so it will zoom indefinitely without pixelating, and the
>  text is a very wide range of sizes).

yes, this is very readable in Inkscape :)

sincerely,
Marije

_______________________________________________
sc-dev mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-dev/
search: https://listarc.bham.ac.uk/lists/sc-dev/search/