Re: [Gimp-user] Help! Problem with gimp-curves-spline procedure

Thanks Kevin!
This would be the 2d time you're helping me :)

On Wed, May 9, 2012 at 6:56 PM, Kevin Cozens <kevin ve3syb ca> wrote:
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))


Kevin.           |"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
gimp-user-list mailing list
gimp-user-list gnome org

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