[prev in list] [next in list] [prev in thread] [next in thread] 

List:       quanta
Subject:    Re: [Quanta] Questions and suggestions from a novice user about
From:       Eric Laffoon <sequitur () kde ! org>
Date:       2006-07-12 6:03:04
Message-ID: 200607112303.05193.sequitur () kde ! org
[Download RAW message or body]

On Tuesday 11 July 2006 2:10 am, weseman@interstroom.nl wrote:
> Hi Eric,
>
> First of all, thanks for taking the time to respond to my last mail. I see
> you've really taken the time to answer me in the best possible manner. I
> appreciate that!

It's my only mode.
>
> > First of all... we don't care what some HTML only Windows tool did, only
> > what you want to do. Look in the template help and at the template
> > folders.
>
> Hmm, have I hit a sensitive spot here? (giggle) ;-) 

I never copy, I create based on need and available resources. Many people 
become intransigent and turn from looking forward to backward... They build 
HTML only tools and in a short time they see they are no longer part of the 
solution of advancing to an XML based world...

> I've also found an 
> example in the Linux realms: KDevelop. It contains a feature called 'code
> snippets', in which it is possible to insert a variable $VAR$ in the
> template. Once you insert that snippet you get a dialog box per variable
> found in the snippet. It's a very powerful feature!

Yeah... Except if it's rigidly designed and you have 10 variables and 15 
pages. Then you're probably drunk before you finish. Anyway this is not hard 
to create with tools we provide.

> I've also found out that KTextEditor contains an API interface called
> templateInterface, that allows someone to insert variables in templates.
> See
> http://www.kate-editor.org/article/insertion_templates
> Isn't Quanta built on Kate, which is built on KTextEditor? If that
> interface would have been exposed to DCOP I would have built it myself.
> Unfortunately it isn't...

Look at the Action menu. Quanta can do this in the editor as well as with 
template filters and with Kommander. You haven't actually looked at it yet 
have you?
>
> > > /Where do the script actions come from?
> >
> > This is odd. I don't see a heading for this in the docs. Scripts are like
> > templates inasmuch as they reside in project directories, $KDEHOME and
> > $KDEDIR. So typically ~./kde/share/apps/quanta is where your user info
> > is.
>
> Thanks for the hint. I found out that Quanta shows all actions of the
> 'script' type. So to add new scripts to this combobox, one would go to
> Settings->Configure Actions and add a new Action of the type 'script'.
>
> > There is also a script in the Global Scripts section called TemplateMagic
> > that does this. Unfortunately there hasn't been a lot of interest in
> > working with improvements, but it was done with the old Kommander and
> > could easily be redone now. Anyway it does this and can also be extended
> > to use lists, files and other extended widgets. One of the abilities of
> > Quanta with templates is to run a script or filter on insert.
>
> I've tried to use this script, but I don't seem to be able to.
>
> These were the issues I encountered:
> - filtering actions can only be applied to 'Local templates' and 'Project
> templates', but NOT for 'Global templates' for some reason. The
> combobox 'filtering actions' is grayed out for global templates.

I'm not sure why this is. Possibly because at least in theory this is root 
user space, but it seems it should still work.

> - TemplateMagic can't be selected in the filtering actions combobox. I had
> to manually add TemplateMagic to that list by adding an action as
> described
> above ('where do the script actions come from')
> - Once I had a local template created and reloaded quanta as it didn't
> detect the new template being there, I could select TemplateMagic as the
> filtering action
> - Now when I insert a template with TemplateMagic as the filtering action
> Quanta complains that TemplateMagic isn't executable. So I set chmod ugo+x
> for /usr/share/apps/quanta/scripts/TemplateMagic.pl
> - Now Quanta doesn't want to execute this. It says: "Wrong extension. This
> file does not have a .kmdr extension. As a security precaution Kommander
> will only run Kommander scripts with a clear identity"

I told you it was old. Right click on it in the script tree and you can edit 
it. I haven't done much perl in some time but previously we used to allow non 
kmdr extentions and you can see on line 53 it is very non standard.
>
> I'm probably missing an easy way to enable TemplateMagic for my templates.
> Would you be so kind to explain how to do this?

Look at Kommander. Kommander executes it. Essentially it's an XML file 
visually generated by the editor (kmdr-editor) which is then run by the 
executor (kmdr-executor). In this case Robert wrote a perl script to create 
the XML on the fly, write it to a temp file and execute it as a template 
filter action. Feel free to pitch in.
>
> > > /Global event triggers/
> > > - these events would work on files opened outside of a project also
> >
> > You mean in Quanta?
>
> Yes
>
> > I see... I'll ponder on this. It's an interesting idea, but it also could
> > cause accidental disasters on a massive scale. We went with projects
> > because it was the only way to have a clear definition of enough factors.
>
> Interestingly, I noticed (after writing my last e-mail) that it already
> works like that. If you've opened a project in Quanta and have set an
> event
> on 'open document' for your project, this event will also trigger when you
> open a local document, thus making this event 'global'. Of course this is
> highly unexpected behavior and could cause accidental disaster on a massive
> scale ;-) It would probably be better if this is separated a bit more.

Again I would have to confer with Andras on what we were thinking as we 
discussed this at length. As with other things, if you think you have found a 
bug report it. It will get lost on the mailing list.

> I've discovered that this is also the case when I create a new (local) file
> using 'save file as' when I have a project opened. Quanta will ask me if I
> want to add that file to the project, which is kind of strange as the file
> is stored in a directory completely outside of the project directory.

Good point, then again you put it there. ;-) I think if you say yes it will 
move it. How's that for trying to figure out what people really wanted to do?
>
> > > /Bug when logging project events/
> > > Secondly, I can't it get it to work ;-) I'm trying to log which files
> >
> > Is this a relative or absolute address? It's looking for an absolute
> > address and if it doesn't find it you should have an error logged, but it
> > might not have.
>
> It's an absolute adress on my local harddisk. I've run Quanta from the
> console, hoping to see an error, but I don't see one. I've also checked my
> logs under /var/log, but see nothing special. I think it's broken. I wonder
> if anyone has got this working. I haven't, both on a clean install and
> within a vmware virtual machine with a clean install.
>
> > Create an action. You can also submit scripts to our KStuff repository.
>
> When you say KStuff repository, do you mean http://www.kde-apps.org ?
>
> Yuri
Note when you look at the DTD menu or a template or script context menu it 
says upload file? Note where menus offer downloads? This is KNewStuff and we 
have finally got the server part ready. This enables global user resource 
sharing.
-- 
Eric Laffoon - Quanta+ Team Leader 
http://quanta.kdewebdev.org
_______________________________________________
Quanta mailing list
Quanta@mail.kde.org
https://mail.kde.org/mailman/listinfo/quanta
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic