[macruby-changes] [4752] DietRB/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Fri Oct 8 04:09:46 PDT 2010
Revision: 4752
http://trac.macosforge.org/projects/ruby/changeset/4752
Author: eloy.de.enige at gmail.com
Date: 2010-10-08 04:09:45 -0700 (Fri, 08 Oct 2010)
Log Message:
-----------
Get rid of MacRuby Cocoa dev hack
From: Eloy Duran <eloy.de.enige at gmail.com>
Modified Paths:
--------------
DietRB/trunk/README.rdoc
DietRB/trunk/lib/irb.rb
Removed Paths:
-------------
DietRB/trunk/lib/irb/ext/macruby.rb
Modified: DietRB/trunk/README.rdoc
===================================================================
--- DietRB/trunk/README.rdoc 2010-10-08 11:09:36 UTC (rev 4751)
+++ DietRB/trunk/README.rdoc 2010-10-08 11:09:45 UTC (rev 4752)
@@ -49,16 +49,8 @@
* Kernel#clear_history! will clear the history and the history file.
-* irb/ext/macruby.rb, adds support for Cocoa development by starting an
- NSRunloop. Loaded by default on MacRuby.
-
== Differences
-* This IRB version specifically targets MacRuby, for now, and allows Cocoa
- development to be done from the command-line. Dietrb will automatically
- override the normal runloop to be ran in a thread and start a NSRunLoop on
- the main thread.
-
* Dietrb will try to warn about syntax errors as soon as a line is entered and
only reset the buffer to the previous line. This means that you don't need to
loose any previous work:
@@ -112,29 +104,3 @@
irb(#<#<Class:…>::A:…>):002:0> quit
=> nil
irb(main):007:0> quit
-
-Or on MacRuby, try:
-
- irb(main):001:0> win = NSWindow.alloc.initWithContentRect([200, 300, 250, 100],
- irb(main):002:0> styleMask: NSTitledWindowMask|NSResizableWindowMask,
- irb(main):003:0> backing: NSBackingStoreBuffered,
- irb(main):004:0> defer: false)
- => #<NSWindow:0x20023eb00>
- irb(main):005:0> win.orderFrontRegardless
- => #<NSWindow:0x20023eb00>
- irb(main):006:0> win.title = 'Hello World'
- => "Hello World"
- irb(main):007:0> bye = NSButton.alloc.initWithFrame([10, 10, 80, 80])
- => #<NSButton:0x20027f820>
- irb(main):008:0> win.contentView.addSubview(bye)
- => #<NSView:0x200210320>
- irb(main):009:0> bye.bezelStyle = NSThickerSquareBezelStyle
- => 4
- irb(main):010:0> bye.title = 'Goodbye!'
- => "Goodbye!"
- irb(main):011:0> bye.target = NSApp
- => #<NSApplication:0x200257fe0>
- irb(main):012:0> bye.action = 'terminate:'
- => "terminate:"
- irb(main):013:0> bye.sound = NSSound.soundNamed('Basso')
- => #<NSSound:0x200248b20>
\ No newline at end of file
Deleted: DietRB/trunk/lib/irb/ext/macruby.rb
===================================================================
--- DietRB/trunk/lib/irb/ext/macruby.rb 2010-10-08 11:09:36 UTC (rev 4751)
+++ DietRB/trunk/lib/irb/ext/macruby.rb 2010-10-08 11:09:45 UTC (rev 4752)
@@ -1,25 +0,0 @@
-# MacRuby implementation of IRB.
-#
-# This file is covered by the Ruby license. See COPYING for more details.
-#
-# Copyright (C) 2009-2010, Eloy Duran <eloy.de.enige at gmail.com>
-
-framework 'AppKit'
-
-module IRB
- class Context
- alias_method :_run, :run
-
- def run
- if NSApplication.sharedApplication.running?
- _run
- else
- Thread.new do
- _run
- NSApplication.sharedApplication.terminate(self)
- end
- NSApplication.sharedApplication.run
- end
- end
- end
-end
\ No newline at end of file
Modified: DietRB/trunk/lib/irb.rb
===================================================================
--- DietRB/trunk/lib/irb.rb 2010-10-08 11:09:36 UTC (rev 4751)
+++ DietRB/trunk/lib/irb.rb 2010-10-08 11:09:45 UTC (rev 4752)
@@ -10,10 +10,6 @@
require 'irb/deprecated'
-# if !ENV['SPECCING'] && defined?(RUBY_ENGINE) && RUBY_ENGINE == "macruby"
-# require 'irb/ext/macruby'
-# end
-
module IRB
class << self
# This is just here for so the ruby 1.9 IRB will seemingly work, but actually
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20101008/1f471e4e/attachment.html>
More information about the macruby-changes
mailing list