Re: what's wrong with this?

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

 



--- In script-fu@xxxxxxxxxxxxxxx, gd32@xxxx wrote:
>
> > From  michaelhoelzende
> 
> > Hi all,
> > i've got a problem in understanding script-fu.
> > Hopefully one can help.
> > What is wrong with the following? Without the second 
> > "(gimp-message dummyyy)" everything is fine.
> > With it and condition true script-fu.exe crashes.
> 
> >    (if (> getfifapo-list 0)
> >       (begin
> >          (set! countit 3)
> >          (set! dummyyy (car(number->string countit)))
> 
> Your problem is that last line. Car is used to access the first
element of a
> list. However number->string doesn't return a list.
> The correct syntax would be: (set! Dummyyy (number->string countit))
> 
> I'm surprised it crashes script-fu though. It should just return an
error.
> 
> Guillaume
>

Thanks, Guillame.
And i have to apologize because of the simplyfied example.
What i really wanted to do is get the first point of a path
and display it via a message. (gimp-path-get-points which returns
INT32, INT32, INT32, FLOATARRAY).
example in fu-console:
(gimp-path-get-points 1 "selection_to_path")
(1 1 135 #(275 98 1 281 94 2 286 95 2 293 94 1 308 92 2 337 93 2 349
87 1 348 85 2 348 84 2 346 83 1 341 80 2 323 76 2 317 75 1 317 75 2
233 61 2 233 61 1 224 60 2 208 56 2 201 61 1 191 68 2 191 80 2 191 91
1 191 107 2 182 122 2 182 138 1 182 143 2 182 148 2 184 153 1 189 170
2 207 178 2 223 184 1 260 198 2 310 202 2 345 182 1 350 179 2 358 174
2 362 169 1 371 159 2 380 140 2 369 128 1 362 121 2 344 116 2 335 113
1 335 113 2 275 98 2))

For a first test i wanted to display the first INT32 returned value in
the message. So the "car" is a relict of that test which crashes in
the same way.

Cheers

Michael





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/KIlPFB/vlQLAA/TtwFAA/e4wwlB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/script-fu/

<*> To unsubscribe from this group, send an email to:
    script-fu-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



[Index of Archives]     [Gimp Developers]     [Gimp Users]     [Yosemite News]     [Epson Inkjet Printers]     [Scanners]     [Gimp's Home]     [Steve's Art]

&hbsp; Powered by Linux