Re: a possibly vague question
Try to create a simple app that just demonstrate the issue. Then send the sample to the mailing list. Most likely you won't have to send because you will discover the problem in the process. Josh On 14 Nov 2013 23:08, Jim - FooBar(); jimpil1...@gmail.com wrote: Hi people, I 'll have to apologise in advance for the potential vagueness of my question but I am utterly baffled by the behaviour I am seeing and I'd like to share ask. I have a (seesaw) GUI with a swingx.busy-label which I want activated when certain tasks are performed. The code that i've written so fat works perfectly at the repl but for some bizarre reason it won't work when attached as a handler to a button. I mean literally the same code works perfectly at the REPL while the GUI is up but from the GUI itself the effect does not happen, even though the actual work is being done (i.e. loading a big pdf file)! my question is what could possibly cause such a different behaviour? What is so different between the REPL and attaching a handler to a button? If anything, the REPL involves a compilation step whereas the handler has been sitting there all along... any ideas? I don't even know where to start looking since the code runs fine at the repl... This has never happened to me before! many thanks in advance, Jim ps: even though I have posted at the seesaw list, I am starting to doubt this is a seesaw-related issue simply because it works at the repl -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: a possibly vague question
oops! I am not receiving regular updates from the seesaw mailing list so I did not see that..sincere apologies. I will try what you suggest immediately :) thanks again Jim On 14/11/13 20:26, Dave Ray wrote: As noted over on the Seesaw list, your pdf loading code is blocking the UI thread. When you call it from the REPL, it's a separate thread so the button has a chance to update itself. You'll need to put the pdf loading on a separate thread if you want to the UI to update and stay responsive. Cheers, Dave On Thu, Nov 14, 2013 at 12:19 PM, Josh Kamau joshnet2...@gmail.com mailto:joshnet2...@gmail.com wrote: Try to create a simple app that just demonstrate the issue. Then send the sample to the mailing list. Most likely you won't have to send because you will discover the problem in the process. Josh On 14 Nov 2013 23:08, Jim - FooBar(); jimpil1...@gmail.com mailto:jimpil1...@gmail.com wrote: Hi people, I 'll have to apologise in advance for the potential vagueness of my question but I am utterly baffled by the behaviour I am seeing and I'd like to share ask. I have a (seesaw) GUI with a swingx.busy-label which I want activated when certain tasks are performed. The code that i've written so fat works perfectly at the repl but for some bizarre reason it won't work when attached as a handler to a button. I mean literally the same code works perfectly at the REPL while the GUI is up but from the GUI itself the effect does not happen, even though the actual work is being done (i.e. loading a big pdf file)! my question is what could possibly cause such a different behaviour? What is so different between the REPL and attaching a handler to a button? If anything, the REPL involves a compilation step whereas the handler has been sitting there all along... any ideas? I don't even know where to start looking since the code runs fine at the repl... This has never happened to me before! many thanks in advance, Jim ps: even though I have posted at the seesaw list, I am starting to doubt this is a seesaw-related issue simply because it works at the repl -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com mailto:clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com mailto:clojure%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com mailto:clojure%2bunsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com mailto:clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com mailto:clojure%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com mailto:clojure%2bunsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post
Re: a possibly vague question
On Thu, 14 Nov 2013, Jim - FooBar(); wrote: I have a (seesaw) GUI with a swingx.busy-label which I want activated when certain tasks are performed. The code that i've written so fat works perfectly at the repl but for some bizarre reason it won't work when attached as a handler to a button. I mean literally the same code works perfectly at the REPL while the GUI is up but from the GUI itself the effect does not happen, even though the actual work is being done (i.e. loading a big pdf file)! my question is what could possibly cause such a different behaviour? What is so different between the REPL and attaching a handler to a button? If anything, the REPL involves a compilation step whereas the handler has been sitting there all along... any ideas? I don't even know where to start looking since the code runs fine at the repl... This has never happened to me before! Are you sure the handler is being called? How are you attaching it to the button? For some of the logic in the Seesaw GUI of my current project, I define the actions separately for naming purposes and attach them later. E.g.: (let [freeze-button (ss/button :text freeze) freeze-action (ss/action :handler (fn freeze-handler [evt] (ss/config! freeze-button :text unfreeze)))] (ss/config! freeze-button :action freeze-action)) Try sticking some other side-effect (like a println) into your handler, so you can determine whether it's set up correctly. You can call the action's handler manually, as well: ((ss/config freeze-action :handler) ignored dummy event) If you determine that it is firing, can you provide a minimal example where you're seeing this behavior? Cheers, Paul Snyder -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: a possibly vague question
putting the entire macro call 'with-busy' in a future solved the issue...I have been bitten by this sort of thing before...I'll have tos top being so forgetful. Thanks for reminding me Dave and also a massive RESPECT for seesaw :) Jim On 14/11/13 20:26, Dave Ray wrote: As noted over on the Seesaw list, your pdf loading code is blocking the UI thread. When you call it from the REPL, it's a separate thread so the button has a chance to update itself. You'll need to put the pdf loading on a separate thread if you want to the UI to update and stay responsive. Cheers, Dave On Thu, Nov 14, 2013 at 12:19 PM, Josh Kamau joshnet2...@gmail.com mailto:joshnet2...@gmail.com wrote: Try to create a simple app that just demonstrate the issue. Then send the sample to the mailing list. Most likely you won't have to send because you will discover the problem in the process. Josh On 14 Nov 2013 23:08, Jim - FooBar(); jimpil1...@gmail.com mailto:jimpil1...@gmail.com wrote: Hi people, I 'll have to apologise in advance for the potential vagueness of my question but I am utterly baffled by the behaviour I am seeing and I'd like to share ask. I have a (seesaw) GUI with a swingx.busy-label which I want activated when certain tasks are performed. The code that i've written so fat works perfectly at the repl but for some bizarre reason it won't work when attached as a handler to a button. I mean literally the same code works perfectly at the REPL while the GUI is up but from the GUI itself the effect does not happen, even though the actual work is being done (i.e. loading a big pdf file)! my question is what could possibly cause such a different behaviour? What is so different between the REPL and attaching a handler to a button? If anything, the REPL involves a compilation step whereas the handler has been sitting there all along... any ideas? I don't even know where to start looking since the code runs fine at the repl... This has never happened to me before! many thanks in advance, Jim ps: even though I have posted at the seesaw list, I am starting to doubt this is a seesaw-related issue simply because it works at the repl -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com mailto:clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com mailto:clojure%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com mailto:clojure%2bunsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com mailto:clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com mailto:clojure%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com mailto:clojure%2bunsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because
Re: a possibly vague question
As noted over on the Seesaw list, your pdf loading code is blocking the UI thread. When you call it from the REPL, it's a separate thread so the button has a chance to update itself. You'll need to put the pdf loading on a separate thread if you want to the UI to update and stay responsive. Cheers, Dave On Thu, Nov 14, 2013 at 12:19 PM, Josh Kamau joshnet2...@gmail.com wrote: Try to create a simple app that just demonstrate the issue. Then send the sample to the mailing list. Most likely you won't have to send because you will discover the problem in the process. Josh On 14 Nov 2013 23:08, Jim - FooBar(); jimpil1...@gmail.com wrote: Hi people, I 'll have to apologise in advance for the potential vagueness of my question but I am utterly baffled by the behaviour I am seeing and I'd like to share ask. I have a (seesaw) GUI with a swingx.busy-label which I want activated when certain tasks are performed. The code that i've written so fat works perfectly at the repl but for some bizarre reason it won't work when attached as a handler to a button. I mean literally the same code works perfectly at the REPL while the GUI is up but from the GUI itself the effect does not happen, even though the actual work is being done (i.e. loading a big pdf file)! my question is what could possibly cause such a different behaviour? What is so different between the REPL and attaching a handler to a button? If anything, the REPL involves a compilation step whereas the handler has been sitting there all along... any ideas? I don't even know where to start looking since the code runs fine at the repl... This has never happened to me before! many thanks in advance, Jim ps: even though I have posted at the seesaw list, I am starting to doubt this is a seesaw-related issue simply because it works at the repl -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.