在我使用跷跷板创建GUI并在OSX下运行的独立应用程序中,我获得菜单栏标题“main”。这似乎是基于跷跷板的程序的默认设置。我可以在任何可用的教程示例中看到它。下面是我的样子:Clojure跷跷板应用程序:如何从“main”中更改菜单栏标题
我试图重新命名( - 主)功能。上面的图片是用(-main)改名为(-soulflyer)的,所以它没有从中选择标题。下面是代码片段:
(defn -soulflyer [& args]
(invoke-later
(let [f (make-frame)
details (select f [:#details])
image-pane (select f [:#image])
keyword-tree (select f [:#tree])
8<---snip
注意这是从REPL运行,独立版本需要有一个 - 主要功能。
这是功能(使帧)的一部分:
(frame
:title "Keyword Explorer"
:size [1400 :by 800]
:menubar
(menubar :items
[(menu :text "File" :items [])
(menu :text "Edit" :items [])])
:content
8<---snip
所以:标题值只影响在窗口的标题不是在菜单栏。
有什么办法可以改变clojure这个吗?
编辑:project.clj文件可能是有用的(代码的其余部分是在https://github.com/soulflyer/find-pics):
(defproject find-pics "0.1.0-SNAPSHOT"
:description "Search for images containing specified keywords"
:url "http://githube.com/soulflyer/find-pics"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0"]
[seesaw "1.4.5"]
[image-lib "0.1.0-SNAPSHOT"]
[com.novemberain/monger "3.0.1"]
[org.clojure/tools.cli "0.3.3"]]
:main find-pics.core
:bin {:name "find-pics"
:bin-path "~/bin"})