Re: [*correction*][writing to files] Error: set-output-port: needs 1 argument(s)

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

 



The script can be made to work in Gimp by adding one line:

...
(define (script-fu-exp-medit inFileName inPas)
    (define (subscript tour p)
        (set-output-port p)  ;;; THIS IS THE ADDED LINE
        (cond
            ((= tour 0)
...

I came up with this by looking at the tinyscheme source code.
In the code, if you call

            (write x port)

or

            (write-char #\space port)

as you do, and if "port" is not the current output port, then
scheme saves the value of the current port, sets the output
port to "port", performs the write, and then resets the output
port back to the old value.  Your code never sets the output
port, so this set-reset sequence happens for every write and
write-char command.  Furthermore, the "old value" is undefined.

I don't know enough about scheme to say whether this is a bug
in your code or in tinyscheme.

  -- Bill
_______________________________________________
Gimp-developer mailing list
Gimp-developer@xxxxxxxxxxxxxxxxxxxxxx
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux