From c253a81c9938a0244ddc9b2ef31ffae7ad14fdf9 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Sat, 31 Jan 2009 02:39:38 -0600 Subject: [PATCH] Add gesture>operation word --- basis/ui/operations/operations.factor | 3 +++ 1 file changed, 3 insertions(+) diff --git a/basis/ui/operations/operations.factor b/basis/ui/operations/operations.factor index b3dc52d227..fdb1061f15 100644 --- a/basis/ui/operations/operations.factor +++ b/basis/ui/operations/operations.factor @@ -36,6 +36,9 @@ SYMBOL: operations : object-operations ( obj -- operations ) operations get [ predicate>> call ] with filter ; +: gesture>operation ( gesture object -- operation/f ) + object-operations [ operation-gesture = ] with find nip ; + : find-operation ( obj quot -- command ) [ object-operations ] dip find-last nip ; inline