WG: [Inkscape-devel] ecma -- my last spam for the day
Scipting is great,
but this needs some kind of modeswitching in between runmode and editmode. Is it?
Adib.
________________________________
Von: inkscape-devel-admin@lists.sourceforge.net im Auftrag von Bob Jamison Gesendet: Mo 07.06.2004 21:00 An: inkscape-devel@lists.sourceforge.net Betreff: [Inkscape-devel] ecma -- my last spam for the day
Ok. I promise that this is my last post to the list today. I am finally caught up from last week, and now I can start adding the real code and not bother this list.
I added one file: /src/ecma/script01.svg ...which is the example scripted svg file from the spec: http://www.w3.org/TR/SVG11/script.html#ScriptElement
I would like to consider the current goal for scripting to be to make this file work correctly in Inkscape and/or Inkview. Does that sound reasonable?
Bob
------------------------------------------------------- This SF.Net email is sponsored by: GNOME Foundation Hackers Unite! GUADEC: The world's #1 Open Source Desktop Event. GNOME Users and Developers European Conference, 28-30th June in Norway http://2004/guadec.org _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Taraben, Adib wrote:
Scipting is great,
but this needs some kind of modeswitching in between runmode and editmode. Is it?
Adib.
Yes, exactly. During "runmode", the user actions will need to be diverted from the editor to an interactive event queue.
I would suspect that in Inkscape, "runmode" would be something that could be temporarily enabled, while that would be the default mode in Inkview.
Bob
On Tue, 2004-06-08 at 08:48, Bob Jamison wrote:
Yes, exactly. During "runmode", the user actions will need to be diverted from the editor to an interactive event queue.
I would suspect that in Inkscape, "runmode" would be something that could be temporarily enabled, while that would be the default mode in Inkview.
Most likely runmode would need to create a copy of the document and run from/display that instead of the original working copy.
Otherwise it's too inconvenient if the script (by design or accident) heavily modifies the SVG file.
(this is what's done in the Flash editor with Flash and ActionScript [which is really just an ECMAScript dialect now])
-mental
MenTaLguY wrote:
Most likely runmode would need to create a copy of the document and run from/display that instead of the original working copy.
I agree. I think we talked about this earlier. Runmode would clone the SVG internal tree (and its SPObject display), either the repr stuff or eventually your AST tree, bind a Javascript tree to it, run it, then delete. In fact, this would fit nicely into a "Preview" mode, where what we are selling is not what it is, but how it looks.
Otherwise it's too inconvenient if the script (by design or accident) heavily modifies the SVG file.
Yeah. Probably the ECMA binding should make no permanent change to the SVG tree. Save this for the scripting of the Inkscape editor itself, much like the Gimp's Script-Fu stuff.
participants (3)
-
Bob Jamison
-
MenTaLguY
-
Taraben, Adib