在我使用蹺蹺板創建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"})