Skip to content

Instantly share code, notes, and snippets.

@jeedee
Created June 25, 2011 21:50
Show Gist options
  • Save jeedee/1046939 to your computer and use it in GitHub Desktop.
Save jeedee/1046939 to your computer and use it in GitHub Desktop.
# Elsewhere...
newWindow = ChatWindowController.alloc.init(xmppStream, user)
newWindow.showWindow(self)
# My code
class ChatWindowController < NSWindowController
attr_accessor :user, :stream
def init(stream, user)
initWithWindowNibName 'Chatwindow'
@stream = stream
@user = user
self
end
def awakeFromNib
p self.window # << THIS WILL MAKE IT CRASH
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment