-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
01_hello_world.pm6 fails to work as expected #1
Comments
http://irclog.perlgeek.de/perl6/2014-05-22#i_8761466 might be relevant. I recall some work on this since but a quick search didn't show it. Have you visited #perl6? timotimo is on their often. |
Hello, indeed, the discussion raiph linked to is very closely related to this bug; After jnthn explained to me what exactly happened, I was able to fix it in MoarVM. If you used --gen-moar to build your MoarVM, you may not have a sufficiently new MoarVM; if you --gen-moar=master, it should work. MoarVM/MoarVM/c511cb7 is the commit where the problem gets fixed. MoarVM's NativeCall implementation used to treat every Code Object with the same CUID (compilation unit ID, a compile-time created identifier) as the same object. The clicked method of the Button generates two different closures (one for each button instance), but only one is ever called back from Gtk when a click happens. Since you said the bug still persists on the JVM backend, I'll leave this bug open until that is sorted. It likely needs about the same fix. |
@timo you can use the syntax " MoarVM/MoarVM@c511cb7 " to link to a commit in a separate repo :) |
Is this still an issue with the latest? |
Is this still a bug? I'll close this for now. |
When the "Hello World!" button is clicked it becomes inactive and the "Goodbye!" button becomes active. When the "Goodbye!" button is clicked. Exploring a bit deeper it appears that
$second.clicked.tap()
code is never executed, instead the$button.clicked.tap()
code is run whenever either button is clicked.With these changes, the "Goodbye!" button is active, yet when clicked I see 'first button tap' output and "Hello World!" button disabled.
I've tried with JVM/Moar backends on Rakudo Star 2014.04 and Rakudo (not Star) 2014.05 with the same results.
I assume this example worked at some point in the past. Sadly my Perl6 skills are not yet sufficient to dig much further.
The text was updated successfully, but these errors were encountered: