A button in Lynx can only have one procedure in it. Even if you need just one primitive to be called from a button (like cg), you need to create a procedure first. 


If you want your button to call a procedure taking an input you need to create a superprocedure that assigns some value to that input.

 

Example:

imagine, you have a procedure 

to go :step

forever [fd :step]

end


You can't put this procedure into a button as it is because it requires an input (:step).


You need to create a superprocedure that puts something in the above's procedure variable:

to Go_Button

go slider1 ;slider is here just for example

end

The Go_Button procedure can be assigned to a button.


It may feel like a limitation for former MicroWorlds Ex users but this design decision was made on purpose. In Lynx, we focus on coding. For clearer structure and easier debugging we wanted all the code to be kept in the same place (Procedures Pane), not distributed among different objects -- turtles and buttons.