Please add usage examples to procedure documentation
Submitted by Marc Weber
Link to original bug (#700971)
Description
I suggest adding typical usage examples to procedure documentation - so that people who don't know scheme inside-out have a chance to pick up concepts quickly.
Problems I had trying to batch process some layers:
(for-each (lambda (layer) (gimp-image-set-active-layer img layer) (let* ( (drawable (car (gimp-image-get-active-drawable img))) ) (plug-in-gauss 1 img drawable 2 2 0) )) (vector->list (car (cdr (gimp-image-get-layers img)))) )
while its easy to find that there is for-each, its also possible to find gimp-image-get-active-drawable its much harder to understand that you have to use "car" On irc I was told that all functions return lists .. Finding vector->list took also some time.
I guess these all are "typical scheme noob issues". However just adding such a simple "demo usage" would make using script-fu much more fun and reduce failure.
Another example is "file-gih-save" - why pass dimension twice? why pass a drawable at all, shouldn't an image be enough? What is a STRINGARRAY ? I finally unpacked gimp source, grepped for file-gih-save and found a sample. However as user I don't want to do this - if there is already documentation in place (procedure browser)