Is this expected of seesaw ?

97 views
Skip to first unread message

Jim - FooBar();

unread,
Aug 9, 2012, 8:10:55 AM8/9/12
to clo...@googlegroups.com
Hi again,

I'm having a couple of issues with seesaw and I'd like to see the community's experience with it...

  1. First of all, my lein repl hangs each time I reload a namespace that uses seesaw.core. Not when I first load it (load-file "blah...blah"), but when I reload it after some changes...this is really a problem as I need to kill/restart leiningen after every change in the code! This completely defeats the purpose of dynamic compilation...
  2. Secondly, whenever I was designing UIs in clojure I quite liked the ability to change the frame (e.g. resizing) dynamically from the repl while changes are immediately shown on screen...That saves a lot of time when experimenting. Now, the 'frame' function of seesaw does not exactly return a JFrame but a proxied version on to which, apparently, I cannot call (.setSize f 500 500) directly...I am suspecting  there must be some easy way to get around that yes?

Just so we're clear, question #1 is the important one...

Thanks in advance,

Jim


Meikel Brandmeyer (kotarak)

unread,
Aug 9, 2012, 8:39:12 AM8/9/12
to clo...@googlegroups.com
Hi,


Am Donnerstag, 9. August 2012 14:10:55 UTC+2 schrieb Jim foo.bar:

  1. First of all, my lein repl hangs each time I reload a namespace that uses seesaw.core. Not when I first load it (load-file "blah...blah"), but when I reload it after some changes...this is really a problem as I need to kill/restart leiningen after every change in the code! This completely defeats the purpose of dynamic compilation...
Never had any problem here. At least not with seesaw. I don't know lein.
 
  1. Secondly, whenever I was designing UIs in clojure I quite liked the ability to change the frame (e.g. resizing) dynamically from the repl while changes are immediately shown on screen...That saves a lot of time when experimenting. Now, the 'frame' function of seesaw does not exactly return a JFrame but a proxied version on to which, apparently, I cannot call (.setSize f 500 500) directly...I am suspecting  there must be some easy way to get around that yes?
(config! your-frame :size [x :by y])

Seems to work for me from the repl. (Maybe with some (invoke-later ...)?)

Kind regards
Meikel

 

Jim - FooBar();

unread,
Aug 9, 2012, 8:43:57 AM8/9/12
to clo...@googlegroups.com
On 09/08/12 13:39, Meikel Brandmeyer (kotarak) wrote:
> (config! your-frame :size [x :by y])

yep! that does the trick... thanks a lot Meikel!

are you 'using' or 'requiring' seesaw.core in your projects?

the same thing happens (repl hangs) when i cose my frame and try to open
up a new one! this is weird yes?

Jim

Meikel Brandmeyer (kotarak)

unread,
Aug 9, 2012, 9:17:01 AM8/9/12
to clo...@googlegroups.com
Hi,


Am Donnerstag, 9. August 2012 14:43:57 UTC+2 schrieb Jim foo.bar:
are you 'using' or 'requiring' seesaw.core in your projects?

I usually do (require '[seesaw.core :as swing]).
 
the same thing happens (repl hangs) when i cose my frame and try to open
up a new one! this is weird yes?

Never had any problems. But you have to pay attention to the event dispatch thread. Maybe threre is some conflict there. (Just a guess. Cargo cult.)

Meikel
 
Reply all
Reply to author
Forward
0 new messages