               (fn [r c s]
                 (ectx-cell-value-hook e-ctx r c s)))))
 
-(defn-typecheck set-context-keep-order ::editable-context
+(defn- set-context-keep-order
   "Sets the bound fca-context of an editable context object to ctx."
   [ectx ctx keep-order]
+  (assert (instance? editable-context ectx))
   (let [new     (make-editable-context ctx keep-order),
         widgets @(:widgets ectx)]
     (dosync

  [ctx]
  (deref (:context ctx)))

(defmethod  get-context :conexp.fca.contexts/Context
  [x] x)

(defn make-context-compatible

                       %)]
    (set (fltr (map #(names (view %)) sel)))))

(defn- get-selected-attributes
  "Returns the set of selected attributes in the context-editor-widget."
  [widget]
  (assert (instance? context-editor-widget widget))
  (let [table (get-table widget),
        view  (get-column-index-permutator table),
        sel   (seq (.getSelectedColumns (get-control table))),
