Re: Scripting update

Anders Lund <[email protected]>
Newsgroups gmane.comp.kde.devel.kate
Organization Saguaro
Message-ID <[email protected]>
On Friday 19 July 2002 17:42, ian reinhart geiser wrote:
> On Saturday 20 July 2002 11:16 am, Anders Lund wrote:

> [...]

>
> > * add interfaces/dcop interfaces enough to make scripting merely worth it
>
> I think you have the cart before the horse, I think we need to make more
> script engines and get better documentation for what we have.  I dont think
> we will reall have a clue of what users want until they try it.

Well, I try to write some scripts, doing stuff I am missing, to get some kind 
of feeling, and recognize what is needed. So far I have "selection to 
lowercase", "selection to upper case", "characters to XML".

> > * release KDE 4, so that we can get to clean up those;)
>
> Ummm... thats 2 years...

sure:) just a bit of frustration...

> > * add dcop interfaces for (some) Kate interfaces
>
> I think we really need stuff for things like file new, open file, close
> file, just basic document management

Well, some can be added using the available actions, if it isn't buggy. Others 
are easy to add.

> > examples of missing stuff:
> >   - there is no way to get to know where a selection starts/ends
>
> The selection and block selection interfaces dont provide this?
> I have dcop interfaces for BlockSelection, but I have not commited them
> since they are not in the feature plan.

I have a local SelectionInterfaceExt that provides them working now, will 
commit later. And - as jowenn suggested - go ahead:)

> >   - we should provide acces to editStart()/editEnd() for easy un/redoing
>
> yes this is needed
>
> > Some notes:
> > Since scripting Kate this way often will mean digging out the relevant of
> > *many* interfaces, it is not very easy or logic at this point. Maybe
> > using DCOPRef can enhance things a bit. The worst part is KTextEditor
> > ***Extension classes, adding badly to the confusion. If we put viewcursor
> > and selection interfaces in the views, and keeps them in the documents
> > for backwards compability, things gets even more blurry.
>
> Remember "Machines look at this interface NOT humans".  If we document the
> interface its acutally quite easy to use.  Note anyone who has worked with
> COM, AppleScript or any scripting enbviroment knows how ugly it is under
> the hood.  Our implementation is actually quite clean.

Good:) And I see from the tread that you and cullmann has been discussing 
additional idears for making it nice to use as well. I guess I would prefer 
having everything in the view/document classses in kate.

> > And where for "normal" purposes, you can use kdcop to copy the
> > interface/method names and signatures, for kate with it's MDI that does
> > not work directly, because you need to know the # of the document you
> > wish to work with.
>
> Again see the above point.  There is no way currently to record and play
> back actions. (Although this is possible in the future).  We can only
> simplify the interface enough to make it useless, so lets work with what we
> have.   I think we like to get confused when we use tools like kdcop or
> dcop in general.  Remember dcop is just an API... you adhere to the rules
> and its very easy to write.

Well, I just have a bad need for debating those things, as I think it leads to 
better implementations:)

-anders
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.