Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def log s
- model.log +=s
- #update_view <- this freezes swing app on a java exception
- puts s
- end
- def execute_button_action_performed
- model.code = view_state.model.code
- repaint_while {
- @run_thread = Thread.new {
- begin
- eval(model.code)
- rescue Exception, NativeException => exc
- log exc
- Thread.kill
- end
- }
- }
- update_view # this is my solution, but logging is not in realtime :/
- end
Add Comment
Please, Sign In to add comment