RSS/Atom feed Twitter
Site is read-only, email is disabled

debugging script-fu with list->string

This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

5 of 5 messages available
Toggle history

Please log in to manage your subscriptions.

debugging script-fu with list->string ugajin@talktalk.net 14 Mar 13:56
  debugging script-fu with list->string Kevin Cozens 20 Mar 02:55
   debugging script-fu with list->string ugajin@talktalk.net 20 Mar 11:17
    debugging script-fu with list->string Kevin Cozens 20 Mar 15:40
     debugging script-fu with list->string ugajin@talktalk.net 20 Mar 16:22
ugajin@talktalk.net
2016-03-14 13:56:07 UTC (over 8 years ago)

debugging script-fu with list->string

I believe Script-fu supports list->string but I may be mistaken. I am unable to get it to work. E.g. (gimp-message (list->string '(0 0 0) )) returns Error: ( : 2) string-set!: argument 3 must be: character

Both string-append and number->string work OK.

Please can someone provide example syntax.

Thanks

-u

Kevin Cozens
2016-03-20 02:55:09 UTC (over 8 years ago)

debugging script-fu with list->string

On 16-03-14 09:56 AM, ugajin@talktalk.net wrote:

I believe Script-fu supports list->string but I may be mistaken. I am unable to get it to work. E.g. (gimp-message (list->string '(0 0 0) )) returns Error: ( : 2) string-set!: argument 3 must be: character

list->string is defined in the script-fu.init file. It takes a list of characters and returns a newly allocated string from formed form the characters in the list.

This is in accordance with the R5RS document (see page 30).

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  |             --Chris Hardwick
ugajin@talktalk.net
2016-03-20 11:17:24 UTC (over 8 years ago)

debugging script-fu with list->string

That is what I thought. Clearly something is wrong, but I am unable to identify the error. How, do I pass in a list of characters? GIMP complains when I try to pass in a list object. I have tried everything, I can think of.

Thanks.

----Original Message----
From: kevin@ve3syb.ca
Date: 20/03/2016 02:55
To:
Subj: Re: [Gimp-user] debugging script-fu with list->string

On 16-03-14 09:56 AM, ugajin@talktalk.net wrote:

I believe Script-fu supports list->string but I may be mistaken. I

am

unable to get it to work. E.g. (gimp-message (list->string '(0 0 0)

))

returns Error: ( : 2) string-set!: argument 3 must be: character

list->string is defined in the script-fu.init file. It takes a list

of

characters and returns a newly allocated string from formed form the characters in the list.

This is in accordance with the R5RS document (see page 30).

-- 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 | --Chris Hardwick _______________________________________________ gimp-user-list mailing list
List address: gimp-user-list@gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list

List archives: https://mail.gnome.org/archives/gimp-user-list

Kevin Cozens
2016-03-20 15:40:10 UTC (over 8 years ago)

debugging script-fu with list->string

Oops... I meant to send this to the list.

On 16-03-20 07:17 AM, ugajin@talktalk.net wrote:

How, do I pass in a list of characters? GIMP complains when I try to pass in a list object. I have tried everything, I can think of.

You provided a list but it was a list of numbers, not characters. To create a list of characters you would use
(gimp-message (list->string '(#\H #\e #\l #\l #\o #\!)))

Characters are written as #\ followed by a the character you want, or by #\ and the name of a character (ie. space, or newline).

For some additional information you can look in the R5RS under section 6.3.4 on page 28.

There is a minor error in the printing of characters that I need to fix. It shows them as "#\x" instead of just "#\". I also just had a thought that this information should be put in to some document about Script-Fu basics.

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  |             --Chris Hardwick
ugajin@talktalk.net
2016-03-20 16:22:29 UTC (over 8 years ago)

debugging script-fu with list->string

Ah!

Screwed that completely, didn't I? I had (wrongly) thought that list-

string, would return any old data list values to the error console,

and more easily than how I am currently doing it. Fool that I am!

Thanks, again!

-u

----Original Message----
From: kevin@ve3syb.ca
Date: 20/03/2016 15:40
To: "gimp-user"
Subj: Re: [Gimp-user] debugging script-fu with list->string

Oops... I meant to send this to the list.

On 16-03-20 07:17 AM, ugajin@talktalk.net wrote:

How, do I pass in a list of characters? GIMP complains when I try to

pass

in a list object. I have tried everything, I can think of.

You provided a list but it was a list of numbers, not characters. To

create

a list of characters you would use (gimp-message (list->string '(#\H #\e #\l #\l #\o #\!)))

Characters are written as #\ followed by a the character you want, or

by #\

and the name of a character (ie. space, or newline).

For some additional information you can look in the R5RS under section

6.3.4

on page 28.

There is a minor error in the printing of characters that I need to

fix. It

shows them as "#\x" instead of just "#\". I also just had a thought

that

this information should be put in to some document about Script-Fu

basics.

--
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 | --Chris Hardwick _______________________________________________ gimp-user-list mailing list
List address: gimp-user-list@gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list

List archives: https://mail.gnome.org/archives/gimp-user-list