I'm still working on creating
my first Script-Fu script. I
created one years ago but it
has been so long now that I've
forgotten how to do it.
OK. I just found a Script-Fu
script that I wrote in October
of 2004. Looks like I can take
this script and modify it.
First thing I'll do is see if this
script works as is. I'll copy it
to this directory:
~/.gimp-2.4/scripts
Let's see how it goes.
OK. I'm back. It seems that I've run
into this error on this old script:
Error: set!: unbound variable: image_list
I find that this error is in fact the most
common error of all when migrating old
Script-Fu to new Script-Fu. The error
comes up because my script is now running
under something called the TinyScheme
interpreter. The problem is described
here:
Script-Fu in Gimp 2.4
Indeed my version of Gimp is Gimp 2.4.
Let's see if I can fix the problem. The
recommended solution seems to be to use
a let* and use local variables rather
than global variables.
OK. I'll leave off here. Apparently this
is a difference between the old interpreter
(SIOD) and the new interpreter (TinyScheme).
The old interpreter lets you set variables
without declaring them but the new interpreter
does not.
I'm learning as I go here. However, this seems
to be the case.
The let * got me beyond the above error.
Seems that let * is the answer to this
problem.
The lesson? Things change. When a change comes
up, you have to adjust.
Ed Abbott
No comments:
Post a Comment