Re: [Gimp-user] Help! Problem with gimp-curves-spline procedure
- From: Kevin Cozens <kevin ve3syb ca>
- To: gimp-user-list gnome org
- Subject: Re: [Gimp-user] Help! Problem with gimp-curves-spline procedure
- Date: Wed, 09 May 2012 11:56:44 -0400
On 12-05-09 06:44 AM, Adir Kol wrote:
*(define spoint 15)*
*(gimp-curves-spline drawable 0 6 #(0 0 0 spoint 255 255))*
I get an error: *Error: Item 4 in vector is not a number (argument 4 for
function gimp-curves-spline) #( 0 0 0 spoint 255 255 )*
Putting a variable name in a list (or vector in this case) and expecting the
value held by the variable to become part of the list (or vector) is an
often made error when writing Scheme scripts. The syntax #( objects ) is a
vector containing the listed objects. It is *not* an expression that
evaluates to a list. To put it another way, it will not use the value or
contents of "spoint" in the vector. The "spoint" reference was treated as a
symbol.
It is easy to solve the problem by using the "list" procedure, but in your
case you want a vector so you need one additional procedure call.
Use the following:
(list->vector (list 0 0 0 spoint 255 255))
--
Cheers!
Kevin.
http://www.ve3syb.ca/ |"Nerds make the shiny things that distract
Owner of Elecraft K2 #2172 | the mouth-breathers, and that's why we're
| powerful!"
#include <disclaimer/favourite> | --Chris Hardwick
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]