From: Rafael B. <be...@hs...> - 2016-02-19 15:44:34
|
First of all, I appreciate your continued interest in helping me with the problem. I am using jython2.7.0. I’ve tried the program on two versions of the Mac OS, El Capitan and an older version on another computer (I don’t recall the number off hand). I’ve been swamped with work the last couple of days, so I haven’t had a chance to try your suggestions, but I will soon. I will post my result on the mailing list. Meanwhile, I continue to welcome any new insights on the problem. Cordially, Rafael > On Feb 18, 2016, at 6:03 PM, Stefan Richthofer <Ste...@gm...> wrote: > > Rafael, sorry, I had read your email too quickly and had misconcepted the issue in the sense > that the window would not display at all. (That's why I suggested to call frame.show > and try the JOptionPane-based test program.) > Given that the window actually *does* display makes my suggestions rather irrelevant I suppose. > > However, I can also not reproduce the *actual* issue on my system - here the button causes > the console to print "Clicked!" as expected (using Jython 2.7.1 beta 3 and Java 7). > Maybe you can first check that it's not a console issue: Let the click change the button- > or frame capture instead. Does ordinary console printing work? > What Jython- and Java version are you using? > > -Stefan > > > >> Gesendet: Donnerstag, 18. Februar 2016 um 17:27 Uhr >> Von: "Bejarano, Rafael P." <be...@hs...> >> An: "Stefan Richthofer" <Ste...@gm...> >> Cc: "jyt...@li..." <jyt...@li...> >> Betreff: RE: [Jython-users] Help with broken code >> >> Thank you for your prompt reply. I'll give your suggestions a try. >> >> Rafael >> ________________________________________ >> From: Stefan Richthofer [Ste...@gm...] >> Sent: Wednesday, February 17, 2016 2:52 PM >> To: Bejarano, Rafael P. >> Cc: jyt...@li... >> Subject: Re: [Jython-users] Help with broken code >> >> Hello Rafael, >> >> trying your program on linux, it works like expected. >> However, did you try to call frame.show()? >> (maybe instead of frame.visible = True) >> >> If this also fails, can you confirm that the equivalent Java-program would work? >> Given that it works on my setup, it is possible that on your system >> something with Java is broken rather than with Jython. >> >> In case you don't speak Java, try the trivial swing program: >> >> from javax.swing import JOptionPane >> JOptionPane.showInputDialog("Hello Jython"); >> >> in Java: >> >> public static class TestSwing { >> public static void main(String[] args) { >> javax.swing.JOptionPane.showInputDialog("Hello Jython"); >> } >> } >> >> If this works in Java, but not in Jython, I'd suggest to file an issue on bugs.jython.org. >> Also helpful: Did you apply some specific change that broke the program? Some update of >> Java or Jython, or some System update? Every information about what caused the breakage >> is helpful. >> >> Best >> >> Stefan >> >> >>> Gesendet: Mittwoch, 17. Februar 2016 um 19:07 Uhr >>> Von: "Rafael Bejarano" <be...@hs...> >>> An: jyt...@li... >>> Betreff: [Jython-users] Help with broken code >>> >>> Hello, >>> >>> The demo program below used to work, but now, when the button is clicked, nothing happens, although the window displaying the button does open just fine. I run it in the Macintosh Unix terminal. Any assistance with this problem would be greatly appreciated. >>> >>> Rafael Bejarano >>> >>> from javax.swing import JButton, JFrame >>> frame = JFrame('Hello, Jython!', defaultCloseOperation = JFrame.EXIT_ON_CLOSE, size = (300,300)) >>> def change_text(event): >>> print "Clicked!" >>> >>> button = JButton('Click Me!', actionPerformed=change_text) >>> frame.add(button) >>> frame.visible = True >>> ------------------------------------------------------------------------------ >>> Site24x7 APM Insight: Get Deep Visibility into Application Performance >>> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month >>> Monitor end-to-end web transactions and take corrective actions now >>> Troubleshoot faster and improve end-user experience. Signup Now! >>> http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140 >>> _______________________________________________ >>> Jython-users mailing list >>> Jyt...@li... >>> https://lists.sourceforge.net/lists/listinfo/jython-users >>> |