Add better error check for 'window' word

db4
Slava Pestov 2009-04-10 06:20:23 -05:00
parent 370e90f57b
commit e2c858da34
1 changed files with 4 additions and 1 deletions

View File

@ -12,7 +12,10 @@ IN: ui
! Assoc mapping aliens to gadgets
SYMBOL: windows
: window ( handle -- world ) windows get-global at ;
ERROR: no-window handle ;
: window ( handle -- world )
windows get-global ?at [ no-window ] unless ;
: window-focus ( handle -- gadget ) window world-focus ;