It is currently Tue Apr 16, 2024 10:21 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 16 posts ] 
Author Message
 Post subject: unbound variable: gimp-messsage
PostPosted: Tue Oct 04, 2016 8:42 pm  (#1) 
Offline
GimpChat Member

Joined: Oct 04, 2016
Posts: 7
Hello all,

I just finished the text-box tutorial in the gimp docs so I am fresh off the boat. I'm a java programmer by day, so my thoughts went to understanding what methods were available for debugging the buggy scripts I'm bound to write. So I saw gimp-message in the procedure browser and thought I would just throw it in the script, which would also answer if the message halted script running or not. But I got

Error: ( : 1) eval: unbound variable: gimp-messsage

Then I made the following procedure and registered it

(define (script-fu-text-test)
(let*
(
(msg "The message")
)
(gimp-messsage msg)
)
)

Got the same error. I opened the script-fu console and entered
(gimp-message "Test")

and I got
(#t)

I typed
(gimp-message)

and got
Error: ( : 1) Invalid number of arguments for gimp-message (expected 1 but received 0)

So the console clearly knows of a procedure called gimp-message. As to the #t output, not sure what to make of that. But primarily, what have I done wrong in my script such that it cannot be evaluated.

Any help is appreciated!


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: unbound variable: gimp-messsage
PostPosted: Tue Oct 04, 2016 8:48 pm  (#2) 
Offline
GimpChat Member

Joined: Oct 04, 2016
Posts: 7
Fixed! Thanks to trandoductin for noticing the triple 's'

imanoob


Top
 Post subject: Re: unbound variable: gimp-messsage
PostPosted: Tue Oct 04, 2016 8:52 pm  (#3) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
yeah coming from java you have auto complete so you don't make such mistake and it highlights it if you're wrong... ;)

So excited to see another script coder joining gimpchat. :yes

_________________
TinT


Top
 Post subject: Re: unbound variable: gimp-messsage
PostPosted: Tue Oct 04, 2016 9:20 pm  (#4) 
Offline
GimpChat Member

Joined: May 12, 2015
Posts: 4694
Oh, Boy!! Does this mean more toys for Christmas?


Top
 Post subject: Re: unbound variable: gimp-messsage
PostPosted: Wed Oct 05, 2016 3:30 am  (#5) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4734
Seriously you should be using Python, not script-fu.

_________________
Image


Top
 Post subject: Re: unbound variable: gimp-messsage
PostPosted: Wed Oct 05, 2016 4:27 am  (#6) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
ofnuts wrote:
Seriously you should be using Python, not script-fu.

LOL

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: unbound variable: gimp-messsage
PostPosted: Wed Oct 05, 2016 2:14 pm  (#7) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
It's true it's true.
I could probably live without scheme script-fu but i don't know if i could live without python-fu

_________________
TinT


Top
 Post subject: Re: unbound variable: gimp-messsage
PostPosted: Wed Oct 05, 2016 7:37 pm  (#8) 
Offline
GimpChat Member

Joined: Oct 04, 2016
Posts: 7
ofnuts wrote:
Seriously you should be using Python, not script-fu.


What, in a nutshell, would you say are the advantages with Python for plugins? I've used Python years ago, but I'm not familiar with gimp's bindings, or really scheme's not quite yet.


Top
 Post subject: Re: unbound variable: gimp-messsage
PostPosted: Thu Oct 06, 2016 2:36 am  (#9) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4734
- Python is a much simpler language to learn
- Python code is usually shorter
- In Gimp, everything that can be done in Scheme can also be done with Python
- Python can do plenty of things that you can't do in Scheme
- Python code can use plenty of useful libraries that come standard, and if necessary import non-standard ones

_________________
Image


Top
 Post subject: Re: unbound variable: gimp-messsage
PostPosted: Thu Oct 06, 2016 6:10 pm  (#10) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
ofnuts wrote:
- Python is a much simpler language to learn
- Python code is usually shorter
- In Gimp, everything that can be done in Scheme can also be done with Python
- Python can do plenty of things that you can't do in Scheme
- Python code can use plenty of useful libraries that come standard, and if necessary import non-standard ones


And what i really like about about it is once you have the menu registered with parameters (after having to reload GIMP) but the trade off is if you make any changes to your code that does the actual work, you don't have to refresh anything... so you can go nuts (no pun intended) after registered successful. :hehe

EDIT: Oh yeah, and you can return things from sub-functions, I don't think scheme script fu allows you to return anything.

_________________
TinT


Top
 Post subject: Re: unbound variable: gimp-messsage
PostPosted: Thu Oct 06, 2016 10:56 pm  (#11) 
Offline
GimpChat Member

Joined: Oct 04, 2016
Posts: 7
ofnuts wrote:
- Python is a much simpler language to learn
- Python code is usually shorter
- In Gimp, everything that can be done in Scheme can also be done with Python
- Python can do plenty of things that you can't do in Scheme
- Python code can use plenty of useful libraries that come standard, and if necessary import non-standard ones


Thanks. I appreciate the feedback. Whereas scheme seemed like a nifty puzzle at first I am getting tired of the forests of parentheses. And constraining flow control options.


Top
 Post subject: Re: unbound variable: gimp-messsage
PostPosted: Thu Oct 06, 2016 11:00 pm  (#12) 
Offline
GimpChat Member

Joined: Oct 04, 2016
Posts: 7
trandoductin wrote:
ofnuts wrote:
- Python is a much simpler language to learn
- Python code is usually shorter
- In Gimp, everything that can be done in Scheme can also be done with Python
- Python can do plenty of things that you can't do in Scheme
- Python code can use plenty of useful libraries that come standard, and if necessary import non-standard ones


And what i really like about about it is once you have the menu registered with parameters (after having to reload GIMP) but the trade off is if you make any changes to your code that does the actual work, you don't have to refresh anything... so you can go nuts (no pun intended) after registered successful. :hehe

EDIT: Oh yeah, and you can return things from sub-functions, I don't think scheme script fu allows you to return anything.


I thought scheme acted like somewhat like a unix script and just the last thing declared/stated in a function was the return value. I know part of the gimp doc scripting tutorial I went through had as a last exercise making the menu bound function call return a value so it could be called from another script.


Top
 Post subject: Re: unbound variable: gimp-messsage
PostPosted: Fri Oct 07, 2016 7:02 am  (#13) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
I guess you're right, bittramp, last variable declared is returned to the caller (Saulgoode can tell it better)

edit: found something which confirms that assumption
viewtopic.php?f=8&t=11533&hilit=saturation

_________________
"Where am I ?"


Top
 Post subject: Re: unbound variable: gimp-messsage
PostPosted: Fri Oct 07, 2016 7:16 am  (#14) 
Offline
GimpChat Member

Joined: Sep 13, 2016
Posts: 137
Tiny scheme in Gimp is. Little brother of (fullgrown) Lisp as e.g. Common Lisp, which van do rather all.
Now the joke: L(ots of) I(rritating) S(ingel) P(aretheses)


Top
 Post subject: Re: unbound variable: gimp-messsage
PostPosted: Fri Oct 07, 2016 10:22 am  (#15) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
bittramp wrote:
trandoductin wrote:
ofnuts wrote:
- Python is a much simpler language to learn
- Python code is usually shorter
- In Gimp, everything that can be done in Scheme can also be done with Python
- Python can do plenty of things that you can't do in Scheme
- Python code can use plenty of useful libraries that come standard, and if necessary import non-standard ones


And what i really like about about it is once you have the menu registered with parameters (after having to reload GIMP) but the trade off is if you make any changes to your code that does the actual work, you don't have to refresh anything... so you can go nuts (no pun intended) after registered successful. :hehe

EDIT: Oh yeah, and you can return things from sub-functions, I don't think scheme script fu allows you to return anything.


I thought scheme acted like somewhat like a unix script and just the last thing declared/stated in a function was the return value. I know part of the gimp doc scripting tutorial I went through had as a last exercise making the menu bound function call return a value so it could be called from another script.


really? I guess when i tried it i was never successful at returning so i gave up. :hehe

_________________
TinT


Top
 Post subject: Re: unbound variable: gimp-messsage
PostPosted: Fri Oct 07, 2016 12:24 pm  (#16) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4734
PKHG wrote:
Tiny scheme in Gimp is. Little brother of (fullgrown) Lisp as e.g. Common Lisp, which van do rather all.
Now the joke: L(ots of) I(rritating) S(ingel) P(aretheses)


Yes, but, as you say, little brother, who can barely walk alone, and you can't use the full-grown brother instead.

_________________
Image


Top
Post new topic Reply to topic  [ 16 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Unbound variable floating-sel Help!

3

No new posts Error: eval: unbound variable: WHITE-IMAGE-FILL

4



* Login  



Powered by phpBB3 © phpBB Group