All pastes #812099 Raw Edit

Jemand

public javascript v1 · immutable
·published 2007-12-11 14:36 UTC
rendered paste body
set image [svgimage]$image viewportsize 240 320set sg [scalablegraphics -quality high]set canvas [lcdui.canvas -eventhandler hiddenCanvasEvents]set graphics [$canvas graphics2]$image circle 25 [list 50 0]$sg render $graphics $image# this gives errors like: http://pastebin.ca/812098proc hiddenCanvasEvents {src ev} {	global sg graphics image	$image circle 50 [list 50 100]	$sg render $graphics $image	if {eq [$ev cget -reason] 5} {		puts foo	}}# this doesn't give errorsproc hiddenCanvasEvents {src ev} {	global sg graphics image	$image circle 50 [list 50 100]	$sg render $graphics $image}set cmd_exit [lcdui.command -label Back -longlabel Back -priority 1 -type cancel]proc handleEvents {cmd_exit cmd from} {	if {eq $cmd_exit $cmd} {		global returnval		set returnval 0		tnotify returnval	}}$canvas addcommand $cmd_exit$canvas configure -commandaction [list handleEvents $cmd_exit]$canvas setcurrenttwait returnvalset returnval