Luis A. Florit wrote:
>     I have a script-fu that worked fine in 2.4 and it's broken in 2.6.
> It had a conditional to apply the layer's mask if it exists. This is
> what it read:
>   (cond
>       ((gimp-layer-get-mask SharpenLayer)(gimp-layer-remove-mask SharpenLayer 
> 0))
>   )

There are two things wrong with the above. First, it calls gimp-layer-get-mask 
but is missing the car to extract the returned value. Second, "cond" requires 
a boolean to be returned for the test for it to work properly.

> (unless (= (car (gimp-layer-get-mask SharpenLayer)) -1)
>    (gimp-layer-remove-mask SharpenLayer MASK-APPLY)
> )

One issue with the above is the use of "unless". This is defined by TinyScheme 
but it is not a function defined in the R5RS.

I'm also wondering why use cond or unless when a simple if statement would do.


Kevin.           |"What are we going to do today, Borg?"
Owner of Elecraft K2 #2172      |"Same thing we always do, Pinkutus:
                                 |  Try to assimilate the world!"
#include <disclaimer/favourite> |              -Pinkutus & the Borg
Gimp-developer mailing list

Reply via email to