[MacRuby-devel] $stderr in MacRuby

Stephen Horne fatste at gmail.com
Sat Jun 30 13:55:41 PDT 2012


I've added a logging window to an application, and I would like to display any errors in there too. 

So far I have done this:

class NonStderr
  def write( error_string )
    $log_view.insertText(error_string)
  end
end



Then, in applicationDidFinishLaunching(aNotif) I put this:



$stderr = NonStderr.new

$stderr.write "test test test" # appears in my log window 

cause_an_exception() # does not appear in the log window



I saw an old ticket about MacRuby not writing errors to stderr,   http://lists.macosforge.org/pipermail/macruby-tickets/2012-February/002686.html   , but this is on the old system so I'm not sure.

Does anyone know how to do this in MacRuby?

Thanks.
-- 
Stephen Horne

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20120630/64e3018d/attachment-0001.html>


More information about the MacRuby-devel mailing list