I am developing code to control motor focusers for telescopes. One or two can be connected (different USB productIDs) at any one time. My code identifies how how many and instances 1 or 2 NSWindowController objects . Each NSWindowController produces a slightly different window via 2 separate XIBs using initWithWindowNibName:.
I have used IB and setFrameTopLeftPoint: to control the position of both windows.
During windowDidLoad both windows appear in the assigned positions but once the code moves on to completion the second window moves to be tiled on top of the first window. Where ever I position the fist window on completion of the code the second appears tiled on top of it.
Can anyone help ensure that the second window appears in its correct position ?
Thank you
Code extract (DCWindowController is my NSWindowController class):
firstController=[[DCWindowController alloc] initWithWindowNibName:@"DCWindow"];
[firstController showWindow:self];
secondController=[[DCWindowController alloc] initWithWindowNibName:@"DC2Window"];
[secondController showWindow:self];
You need to turn cascading off using setShouldCascadeWindows:.