Implement closure convention for static java methods
----------------------------------------------------
Key: JRUBY-2449
URL: http://jira.codehaus.org/browse/JRUBY-2449
Project: JRuby
Issue Type: Bug
Components: Java Integration
Affects Versions: JRuby 1.1.1
Environment: Latest JRuby 1.1.1
Reporter: Vladimir Sizikov
Currently:
{noformat}
EventQueue = java.awt.EventQueue
EventQueue.invoke_later {
puts "VVS"
}
ArgumentError: wrong # of arguments(0 for 1)
{noformat}
But it would be very useful, especially in Swing development, to be able to do
that.
Without that, the code is not pretty:
{noformat}
# I need to pop-up a Frame properly,
# to avoid deadlocks.
# And this code is UGLY. :)
EventQueue = java.awt.EventQueue
class FrameBringer
include java.lang.Runnable
def initialize(frame)
@frame = frame
end
def run
@frame.visible = true
end
end
EventQueue.invoke_later(FrameBringer.new(frame))
{noformat}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email