Re: Gimp 2.4.1 and Script-Fu: set variable gives "unbound variable"
Jean-Louis Hamel <jlhamel-fBIn7JHAfCbUKx/[email protected]>
| Newsgroups | gmane.comp.video.gimp.windows.user |
|---|---|
| Message-ID | <[email protected]> |
andreaswaechter a écrit :
> My script starts with the following code:
>
> (define (script-fu-scale-in-steps-to-screen image drawable)
>
> ;get original size of image
> (set! actwidth (car (gimp-image-width image)))
> (set! actheight (car (gimp-image-height image)))
>
> (set! ratio 1.05)
>
> When I try to run it in Gimp 2.4.1, it gives the error
>
> Error while executing (script-fu-scale-in-steps-to-screen 1 2)
> Error: set!: unbound variable actwidth
>
With the new scheme interpreter used in Gimp 2.4, the *first time* a
variable is set, "define" must be used instead of "set!". If not, this
variable is unknown. Once a variable has been defined "set!" can be used.
Regards,
--
JLH
List archives: <http://groups.yahoo.com/group/gimpwin-users/>
To unsubscribe send a blank message from the address you're subscribed
to <mailto:gimpwin-users-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org>
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/gimpwin-users/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/gimpwin-users/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[email protected]
mailto:gimpwin-users-fullfeatured-hHKSG33TihhbjbujkaE4pw@public.gmane.org
<*> To unsubscribe from this group, send an email to:
gimpwin-users-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/