Skip to content

Instantly share code, notes, and snippets.

@buddylindsey
Created February 6, 2011 23:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save buddylindsey/813803 to your computer and use it in GitHub Desktop.
Save buddylindsey/813803 to your computer and use it in GitHub Desktop.
class MainController < NSWindowController
def awakeFromNib
end
def newWindow(sender)
someData = "Blob"
nw = MainWindowController.alloc.init
nw.data = someData
nw.window().makeKeyAndOrderFront(self)
end
end
class MainWindowController < NSWindowController
attr_accessor :data
def windowNibName
return "MainWindow"
end
def awakeFromNib
end
def push_me(sender)
puts @data
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment