# testing simple actions andler
xtAppInitialize -class Program

xmArrowButton .arrow managed
# .arrow addAction Direction

.arrow setValues -translations \
	"<Key>r: exec(arrow_direction %w arrow_right) \n\
         <Key>l: exec(\"arrow_direction %w arrow_left\")"

proc arrow_direction {arrow direction} {
  puts stdout "Changing direction to $direction"
  $arrow setValues -arrowDirection $direction
}

. realizeWidget

. mainLoop
