var windowArray : NSMutableArray = []
@IBAction func function001(sender: AnyObject) {
if (windowArray.count == 0 ) {
let nib : NSNib = NSNib(nibNamed: "NewWindow", bundle: NSBundle.mainBundle() )!
var topLevelArray = NSMutableArray()
let outputValue = AutoreleasingUnsafeMutablePointer<NSArray?>(&topLevelArray)
if let result : Bool = nib.instantiateWithOwner(self, topLevelObjects: outputValue) where result {
for name in topLevelArray {
if ((name as! NSObject).className == NSWindow.className() ){
NSLog("%@",name.description)
NSLog("%@",(name as! NSWindow).title)
let theWindow : NSWindow = (name as! NSWindow)
windowArray.addObject(theWindow)
(name as! NSWindow).makeKeyAndOrderFront(self)
(name as! NSWindow).orderFront(self)
}
}
}
outputValue.memory = nil
}
}