Back

inspect-table (clj)

(source)

function

(inspect-table data)
creates a graphical (Swing) inspector on the supplied regular data, which must be a sequential data structure of data structures of equal length

Examples

clojure/core.typed
(deftest atom?-test
  (is-tc-e #(atom? "abc") [-> Boolean]
           :requires [[clojure.inspector :refer [atom?]]])
  (is-tc-err #(atom? "abc") [-> String]
             :requires [[clojure.inspector :refer [atom?]]]))

(deftest inspect-table-test
  (is-tc-e #(inspect-table [[1 2 3] [4 5 6] [7 8 9] [10 11 12]]) [-> javax.swing.JFrame]
             :requires [[clojure.inspector :refer [inspect-table]]])
  (is-tc-err #(inspect-table 1)
             :requires [[clojure.inspector :refer [inspect-table]]]))
typedclojure/typedclojure
(deftest atom?-test
  (is-tc-e #(atom? "abc") [-> Boolean]
           :requires [[clojure.inspector :refer [atom?]]])
  (is-tc-err #(atom? "abc") [-> String]
             :requires [[clojure.inspector :refer [atom?]]]))

(deftest inspect-table-test
  (is-tc-e #(inspect-table [[1 2 3] [4 5 6] [7 8 9] [10 11 12]]) [-> javax.swing.JFrame]
             :requires [[clojure.inspector :refer [inspect-table]]])
  (is-tc-err #(inspect-table 1)
             :requires [[clojure.inspector :refer [inspect-table]]]))
reborg/clojure-essential-reference
(require '[clojure.inspector :refer [inspect-table]]) ; <1>

(inspect-table events)
;; See image below