From d45b7afc3c43d01c3f7d64b740780f5a86f7ca4e Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Tue, 2 Sep 2008 12:35:50 -0500 Subject: [PATCH] find-world can return f, handle this case, new accessors --- basis/ui/gadgets/lib/lib.factor | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/basis/ui/gadgets/lib/lib.factor b/basis/ui/gadgets/lib/lib.factor index 12385f0808..866369b0af 100644 --- a/basis/ui/gadgets/lib/lib.factor +++ b/basis/ui/gadgets/lib/lib.factor @@ -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 ;