Questions tagged [seesaw]

Seesaw UI for Clojure

Seesaw is a Swing-based library/DSL for constructing user interfaces in the Clojure programming language.

63 questions
1
vote
1 answer

Cannot access or update atom from within a seesaw listener function

I have a seesaw ui with a text editor. The editor content is backed by a record called 'Task' which is contained somewhere in an atom called 'state'. A key-released event on the editor should change the property :desc of the Task. I use the…
nansen
  • 2,912
  • 1
  • 20
  • 33
0
votes
3 answers

how can use # in let

Here is sample code (def showscp ( let [ cf (seesaw.core/frame :title "cframe")] (do (seesaw.core/config! cf :content (seesaw.core/button :id :me :text "btn" )) (.setSize cf 300 300) (seesaw.core/show! cf) …
luminol
  • 11
  • 1
0
votes
2 answers

Clojure + Seesaw: Why doen't this GUI work?

I'm trying to create a project just like the seesaw example window-builder, I've created a project called my-gui-project, copied the code from src/window_builder/core.clj and src/window_builder/MyForm.java into my project and and changed line 31…
Vasco Ferreira
  • 2,151
  • 2
  • 15
  • 21
0
votes
1 answer

Submitting batch UI update actions

I'm writing a minesweeper clone using Seesaw. For the minefield, I'm using a simple grid-panel of buttons. I've gotten to the point where when you click on a button, it will flood fill the grid to uncover all the empty tiles surrounding where you…
Carcigenicate
  • 43,494
  • 9
  • 68
  • 117
0
votes
1 answer

Button click on Seesaw (Clojure) not getting new variable values

Having a problem with seesaw where i'm trying to let the user select the date using combo boxes and then call the function on a button click: (listen load-data-btn :action (load-data (selection year-cmb) (selection month-cmb) (selection…
broliverparker
  • 217
  • 2
  • 15
0
votes
1 answer

How to get the dialog functions work

I want to open a dialog, and work with the data after the the dialog returns ok. The problem is that :success-fn is not called after the dialog is submitted. That has something to do with the listener from the button. If the connectDialog is called…
arahfahrrad
  • 145
  • 1
  • 1
  • 8
0
votes
1 answer

Clojure / seeseaw.core/table lazy-seq retrieval failure

My "(list-projects)" method queries out a map from a SQLITE database. (doall (apply prn (pm.models.db/list-projects))) pm.core==>{:id 1, :name "MyTestProj", :owner "mbc", :date "2017-12-19 13:12:45"} {:id 2, :name "newproject1", :owner…
0
votes
1 answer

Are there any guarantees about the order of elements that select returns?

I have a nine textboxes nested inside of vertical panels that I want grab the text from and use. For convenience, I'm just using select to grab them by class, then applying them to the constructor of a record. Basically something like: (ns…
Carcigenicate
  • 43,494
  • 9
  • 68
  • 117
0
votes
1 answer

How to code the logic behind the bridge in the TumbleSeed ? Unity

I have tried to code the bridge like this .I have used RotateAround and set 2 points which is left and right point of the seesaw/bridge but when i rotate left and rotate right the x axis of the bridge ran off little by little eventually gone from…
user5894317
0
votes
1 answer

Listener seesaw.core clojure

a new to Clojure here. I would like to share a behaviour which seems strange to me, but may be it's totally ok. I followed the tutorial on github https://gist.github.com/daveray/1441520#file-seesaw-repl-tutorial-clj-L381 , and more precisely the…
dgan
  • 1,349
  • 1
  • 15
  • 28
0
votes
1 answer

How to use sliders in clojure seesaw

I'm new to clojure (and even newer to seesaw) but have a lot of Java experience and a fair amount of swing experience. I'm trying to create a window with some drop-down text boxes and a slider on it. However, I'm having trouble getting all the…
Lucas Rudd
  • 385
  • 1
  • 13
0
votes
1 answer

Passing vectors members individually

I am trying to pass a list of arguments to the polygon function: (polygon [1 2] [3 4] [5 6]) (polygon pairs) ;;Throws exception where pairs: clojure.lang.LazySeq ([2.2935636 48.8580886] [2.2933061 48.8582457] [2.2935366 48.8584053] [2.2935553…
raam86
  • 6,785
  • 2
  • 31
  • 46
0
votes
1 answer

How can i read string from text file and convert into a map in clojure?

I am trying to use Clojure - Seesaw to read from a file and convert the string into a map (variables) so that I can use them to print to a GUI. Below is my current code: (ns store.core (:gen-class) (:require [seesaw.core :as seesaw])) (defn -main …
Vjay
  • 111
  • 1
  • 8
0
votes
1 answer

Display column names in table

I have created a table "sampletable". I am trying to display the name of the columns. I tried adding the text but it still doesn't show the names. (def sampletable (seesaw/table :model [:columns [{:key :name, :text "Name"}…
abc
  • 153
  • 2
  • 12
0
votes
1 answer

how to provide size of button in clojure?

I am new to clojure and using seesaw for my gui. i wanted to know how to give the size of a button (or any widget for that matter) in seesaw. I already have tried (seesaw/button :text "Done" :size [40 :by 40] :listen…
Harsh Shah
  • 368
  • 3
  • 17