【问题标题】:GUI Using SeesawGUI 使用跷跷板
【发布时间】:2014-11-25 01:59:10
【问题描述】:

我正在尝试使用 Seesaw for Clojure 制作一个小窗口。我使用 Leiningen 创建了一个项目“示例”。

lein new app sample

我已经在项目文件中添加了依赖。

(defproject sample "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url "http://example.com/FIXME"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.6.0"] [seesaw "1.4.4"]]
  :main ^:skip-aot sample.core
  :target-path "target/%s"
  :profiles {:uberjar {:aot :all}})

我的源文件如下:

(ns sample.core
  (:gen-class)
  (:require [seesaw.core :as seesaw]
            [seesaw.dev :as dev]))

(def window (seesaw/frame
             :title "First Example"
             :content "hello world"))

(dev/show-options window)

但是当我运行它时,我不断收到错误:clojure.lang.Compiler$CompilerException: java.lang.RuntimeException: No such namespace: dev, compiling:(C:\Users\A\sample\src\sample\core.clj:10:1)

【问题讨论】:

  • 你是如何运行它的?我猜你已经以gist.github.com/daveray/1441520 的身份访问了一些教程
  • 您是否有理由进行 AOT 编译代码?我没有看到任何需要 AOT 的东西。没有 AOT 也可以吗?

标签: clojure seesaw


【解决方案1】:

我按照您的指示进行操作,只要我保留了 -main 定义,它对我来说效果很好。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-03-18
    • 1970-01-01
    • 2016-05-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-03-06
    • 1970-01-01
    相关资源
    最近更新 更多