Re: [Gimp-developer] Re: Bug 132698 - Script-Fu constants vs DB Browser

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

 



At 09:01 AM 01/30/2004, Marc Lehmann wrote:
Just FYI, perl uses the enums.pl from the gimp core which lists all the
enums. It does, however, do this:

      $const =~ s/^GIMP_//;

i.e.., strip the GIMP_-prefix, so the contants are the names with "_"
(easier to type in perl than "-"), but withouth the prefixes. Looks like
a third set to me.

A third set? I was afraid that might be the case.

(Also, perl isn't updated automatically, you have to run a script, so it
might be sightly out of sync).

I will take a look at the way gimp-perl does things. The script should be invoked during a build process as it is for the core part of GIMP.


Sven isn't sold on the idea of deprecating some of the constants yet. We already have deprecated constants as you can see in the comments in the siod-wrapper.c file.

Another way to look at this is from he point of view of help/documentation. Someone has to create information somewhere that documents the constants used for plug-ins (whether they be C-based, Script-Fu, or Perl). If we have one set of constants for use in all plug-in languages the constants only need be documented once for C. For other languages you would need a one liner explaining whether they are the same as for C or whether you need to change _ to - and you are done. Otherwise, you need to have two or three lists all of which need to be updated if/when the API changes.


Cheers!

Kevin.  (http://www.interlog.com/~kcozens/)

Owner of Elecraft K2 #2172        |"What are we going to do today, Borg?"
E-mail:kcozens at interlog dot com|"Same thing we always do, Pinkutus:
Packet:ve3syb@ve3yra.#con.on.ca.na|  Try to assimilate the world!"
#include <disclaimer/favourite>   |              -Pinkutus & the Borg


[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux