find-world can return f, handle this case, new accessors

db4
Doug Coleman 2008-09-02 12:35:50 -05:00
parent b210f43768
commit d45b7afc3c
1 changed files with 4 additions and 2 deletions

View File

@ -1,6 +1,8 @@
USING: ui.backend ui.gadgets.worlds ;
USING: accessors kernel ui.backend ui.gadgets.worlds ;
IN: ui.gadgets.lib
: find-gl-context ( gadget -- ) find-world world-handle select-gl-context ;
ERROR: no-world-found ;
: find-gl-context ( gadget -- )
find-world dup [ handle>> select-gl-context ] [ no-world-found ] if ;