Skip to content

Commit

Permalink
Workaround for membrane.component namespace issues under sci.
Browse files Browse the repository at this point in the history
  • Loading branch information
phronmophobic committed Nov 22, 2024
1 parent e782c69 commit 5df3ead
Showing 1 changed file with 32 additions and 32 deletions.
64 changes: 32 additions & 32 deletions examples/app/app.clj
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
(dispatch! :set $last-updated (java.util.Date.))
(dispatch! :set $file nil))))

(defui button [{:keys [text on-click]}]
(defui app-button [{:keys [text on-click]}]
(ui/on
:mouse-down
(fn [_]
Expand Down Expand Up @@ -192,24 +192,24 @@
(let [buttons
(ui/horizontal-layout
(ui/spacer 30 0)
(button {:text "<"
:on-click (fn []
[[:set $file nil]])})
(button {:text "eval"
:on-click
(fn []
[[::eval-buf {:buf buf}]])})
(button {:text "save"
:on-click
(fn []
[[::save-file {:file file
:buf buf}]])})
(button {:text "delete"
:on-click
(fn []
[[::delete-file {:file file
:$file $file
:$last-updated $last-updated}]])}))
(app-button {:text "<"
:on-click (fn []
[[:set $file nil]])})
(app-button {:text "eval"
:on-click
(fn []
[[::eval-buf {:buf buf}]])})
(app-button {:text "save"
:on-click
(fn []
[[::save-file {:file file
:buf buf}]])})
(app-button {:text "delete"
:on-click
(fn []
[[::delete-file {:file file
:$file $file
:$last-updated $last-updated}]])}))
scrollview-width (- main-width scroll-button-size)
scrollview-height (- main-height
(ui/height buttons))]
Expand Down Expand Up @@ -245,10 +245,10 @@
(ui/vertical-layout
(if nrepl-server
(ui/horizontal-layout
(button {:text "stop nrepl"
:on-click
(fn []
[[::stop-nrepl-server]])})
(app-button {:text "stop nrepl"
:on-click
(fn []
[[::stop-nrepl-server]])})
(ui/label (str (-> nrepl-server
:socket
.getInetAddress
Expand All @@ -257,15 +257,15 @@
(-> nrepl-server
:socket
.getLocalPort))))
(button {:text "start nrepl"
:on-click
(fn []
[[::start-nrepl-server]])}))
(button {:text "new"
:on-click
(fn []
[[::create-file {:dir dir
:$last-update $last-update}]])})
(app-button {:text "start nrepl"
:on-click
(fn []
[[::start-nrepl-server]])}))
(app-button {:text "new"
:on-click
(fn []
[[::create-file {:dir dir
:$last-update $last-update}]])})
(let [relative-path (str/join
" / "
(cons
Expand Down

0 comments on commit 5df3ead

Please sign in to comment.