I would like to create a new window programmatically. I have the following code and it builds, but my window does not appear. The only way to make this visible is to add it as a child window to the default window. How can I make win independent?
@IBOutlet var window: NSWindow func applicationDidFinishLaunching(aNotification: NSNotification?) { var win = NSWindow(contentRect: NSMakeRect(100, 100, 600, 200), styleMask: NSResizableWindowMask, backing: NSBackingStoreType.Buffered, defer: true) window.addChildWindow(win, ordered:NSWindowOrderingMode.Above) }
Geuis source share