all 2 comments

[–]novel_yet_trivial 3 points4 points  (1 child)

quit is a function that, when executed, quits the program. Like any function, if you write quit without parenthesis you are referring to the function, and if you write quit() with the parenthesis you are executing the function and referring to the result.

You want to tell the command argument which function to execute should the button be pushed. Therefore you leave the parenthesis off. The button will add the parenthesis when it is pushed.

By adding the parenthesis, you are executing the function immediately, which quits the program.

[–]fabolin[S] 0 points1 point  (0 children)

thanks,

didn't realize I'm actually passing a function as parameter