Re: Script-Fu Command Priority

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

 



Samuel wrote:
> the GIMP Script-Fu engine doesn't make a difference between registered
> definitions and local ones.
[snip]
> It would be nice if GIMP could prefer local definitions to global ones
> or if just registered definitions would go global.

A define placed inside another define can only be used locally by code in the 
enclosing define.

What you are probably referring to is how a define that is global to code in 
one file can conflict with a define in another file if the names are the same. 
  This is due to all script files are read in to a single block of memory used 
by the interpreter.

To avoid the problem, nest defines when you don't need something to be 
accessible from in another define in a given file. If a define (ie. function) 
needs to be global so it can be access in multiple define blocks in a file, 
avoid using generic names that someone else might have used in another file. 
One way to avoid name collision is the prepending of your initials to your own 
defines.

-- 
Cheers!

Kevin.

http://www.ve3syb.ca/           |"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
Gimp-developer@xxxxxxxxxxxxxxxxxxxxxx
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

[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