if (do_name() != 'Home') : ?>
endif ?>
Posted by Tom De Smedt on Aug 03, 2007
Hi HG,
The solution is fairly simple: omit the () from "hello()":
var("hello", BUTTON)When you use hello() you are calling the hello-command (e.g. executing its contents). The var() command just wants the name of the hello-command ("hello") so it can call by itself when you press the button.
Posted by Kkosmos on Feb 12, 2008
…TypeError: 'str' object is not callable
I fiddled around a lot, but can not get rid of this error, or get the button to work. I can turn it into a slider though by changing the above code to
Help would be great. Kkosmos
Hey, I got a similar problem:
the code
def rectangles(): print "set to rectangles" var ("rectangles",BUTTON)produces a nice button labeled 'rectangles'. When I press it, there is no 'set to rectangles' message but something telling me:
…TypeError: 'str' object is not callable
I fiddled around a lot, but can not get rid of this error, or get the button to work. I can turn it into a slider though by changing the above code to
def rectangles(): print "set to rectangles" var ("rectangles",rectangles(),BUTTON)In this case, the slider, when touched, does what the button is supposed to do, but still is a slider.
Help would be great. Kkosmos
Posted by Esteban on Feb 12, 2008
include("util/comment.php"); ?>
try by putting the var declaration before the actual function declaration, like this:
var ("rectangles",BUTTON) def rectangles(): print "set to rectangles"
var button question
Posted by HG Lewes on Jul 30, 2007Quick Question:
but I just get errors when I press the button, no matter what I try. I tried a def within a class (method) also..(From Reference)
Any help would be greatly appreciated, I fear there is an obvious answer I am missing ;)
H. G.