From 073c7cda8514db893324b289d91b3cdb0f62e89d Mon Sep 17 00:00:00 2001 From: oakes Date: Sun, 4 May 2014 18:56:32 -0400 Subject: [PATCH] Add check-box? function --- src/play_clj/ui.clj | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/play_clj/ui.clj b/src/play_clj/ui.clj index c86d435..3d830e1 100644 --- a/src/play_clj/ui.clj +++ b/src/play_clj/ui.clj @@ -187,6 +187,11 @@ based on the file at `path`. [entity k & options] `(u/call! ^Checkbox (u/get-obj ~entity :object) ~k ~@options)) +(defn check-box? + "Returns true if `entity` is a `check-box`." + [entity] + (isa? (type (u/get-obj entity :object)) Checkbox)) + ; container (defn container*