there is a nib file and i am creating different window instances with different context, all controls works normally except timer and variables triggered by timers looks shared with all windows. this is how i am create window instances.
#import <Cocoa/Cocoa.h>
#import "MYWindow.h"
@interface AppDelegate : NSObject <NSApplicationDelegate>
{
}
@property (strong) MYWindow *pickerWindow;
--
#import "AppDelegate.h"
@implementation AppDelegate
-(IBAction)newWindow:(id)sender
{
myWindow = [[MYWindow alloc] initWithWindowNibName:@"MYWindowNIB"];
[myWindow showWindow:self];
}
Also i am having problem with ARC, when i open new instance of a window previous one releases immediately even i declare it is strong in property that is why compiling AppDelegate with a flag -fno-objc-arc. otherwise as i said what ever i did windows releases immediately. XCode 4.6
edit
int i = 0;
-(void)windowDidLoad
{
timerMoveOutNavBar = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(countUP) userInfo:nil repeats:YES];
}
-(void)countUP
{
[text setStringValue:[NSString stringWithFormat:@"%d", i]];
i++;
}