Skip to content

Instantly share code, notes, and snippets.

@ntalbott
Created May 4, 2011 13:56
Show Gist options
  • Save ntalbott/955260 to your computer and use it in GitHub Desktop.
Save ntalbott/955260 to your computer and use it in GitHub Desktop.
MacRuby "can't convert Class into String (TypeError)"
class AppDelegate
attr_accessor :window
def applicationDidFinishLaunching(a_notification)
NSRunLoop.currentRunLoop.performSelector :test, target: self, argument: nil, order: 1, modes: NSDefaultRunLoopMode
end
def test
puts "Hi!"
end
end
[Switching to process 9729 thread 0x0]
2011-05-04 09:54:03.473 RunLoopTest[9729:903] /Users/ntalbott/Library/Developer/Xcode/DerivedData/RunLoopTest-ayyowskmzgurwrgfozbvtkoedhhx/Build/Products/Debug/RunLoopTest.app/Contents/Resources/AppDelegate.rb:12:in `applicationDidFinishLaunching:': can't convert Class into String (TypeError)
from /Users/ntalbott/Library/Developer/Xcode/DerivedData/RunLoopTest-ayyowskmzgurwrgfozbvtkoedhhx/Build/Products/Debug/RunLoopTest.app/Contents/Resources/rb_main.rb:23:in `<main>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment