20,741
edits
m (→A simple tile map: add cleanup code to stop the timer (untested for now)) |
|||
Line 676: | Line 676: | ||
# set up default zoom level | # set up default zoom level | ||
changeZoom(0); | changeZoom(0); | ||
### | |||
# The following lines were recently added and have not yet been tested | |||
# (if in doubt, remove them) | |||
window.del = func() | |||
{ | |||
print("Cleaning up window:",title,"\n"); | |||
update_timer.stop(); | |||
# explanation for the call() technique at: http://wiki.flightgear.org/Object_oriented_programming_in_Nasal#Making_safer_base-class_calls | |||
call(canvas.Window.del, [], me); | |||
}; | |||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} |