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

file-glob problem in 2.4.0rc3

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.

3 of 3 messages available
Toggle history

Please log in to manage your subscriptions.

file-glob problem in 2.4.0rc3 Christian Anthon 18 Oct 16:28
  file-glob problem in 2.4.0rc3 saulgoode@flashingtwelve.brickfilms.com 18 Oct 16:58
   file-glob problem in 2.4.0rc3 Sven Neumann 18 Oct 17:54
Christian Anthon
2007-10-18 16:28:07 UTC (over 17 years ago)

file-glob problem in 2.4.0rc3

Hi all,

The following used to work in gimp 2.2:

running under gimp -b -i -

(car (cadr (file-glob "*.png" 1)))

returned

"222.png"

but now I get

(car (cadr (file-glob "*.png" 1)))

Error: car: argument 1 must be: pair

So obviously something changed, I just don't know enough about script-fu to know what.

Hope somebody can help.

Christian.

saulgoode@flashingtwelve.brickfilms.com
2007-10-18 16:58:11 UTC (over 17 years ago)

file-glob problem in 2.4.0rc3

'file-glob' used to return a list of strings in GIMP 2.2, now it returns a vector. You can make your code work by using the following substitution:

(car (vector->list (cadr (file-glob "*.png" 1))))

However, Script-fu should probably be amended to return lists for PDB STRINGARRAY values (if possible).

Quoting Christian Anthon :

The following used to work in gimp 2.2:

running under gimp -b -i -

(car (cadr (file-glob "*.png" 1)))

returned

"222.png"

but now I get

(car (cadr (file-glob "*.png" 1)))

Error: car: argument 1 must be: pair

So obviously something changed, I just don't know enough about script-fu to know what.

Sven Neumann
2007-10-18 17:54:36 UTC (over 17 years ago)

file-glob problem in 2.4.0rc3

Hi,

On Thu, 2007-10-18 at 10:58 -0400, saulgoode@flashingtwelve.brickfilms.com wrote:

'file-glob' used to return a list of strings in GIMP 2.2, now it returns a vector. You can make your code work by using the following substitution:

(car (vector->list (cadr (file-glob "*.png" 1))))

However, Script-fu should probably be amended to return lists for PDB STRINGARRAY values (if possible).

We are doing that change now so that 2.4.0 should be compatible with 2.2 with regards to handling of STRINGARRAY values in Script-Fu. You can check http://bugzilla.gnome.org/show_bug.cgi?id=317634 on this.

Sven