Help "duplicating\spawning" a window
Help "duplicating\spawning" a window
- Subject: Help "duplicating\spawning" a window
- From: Graham Wihlidal <email@hidden>
- Date: Wed, 14 Nov 2001 02:04:56 -0700
Hey list
I have a window (NSWindow *gSessionWin) which is declared inside the
header of a class and this variable is automatically linked to a
particular window (an outlet) in IB. It is a window that must be
spawned frequently (not one instance, but can create new documents of
the same window, etc...)
I have two "test" variables to try and "spawn" new windows based off
this original one. I've tried many things and I can't get it to copy it
into the new variables (all I've been able to do is link the same
address so these two variables control the same window )
If I have:
NSWindow *gSessionWin;
NSWindow *testWin1;
NSWindow *testWin2;
how can I get testWin1 and testWin2 to have gSessionWin copied into
themselves so that by calling:
[testWin1 makeKeyAndOrderFront:testWin1];
[testWin1 makeKeyAndOrderFront:testWin2];
I have two copies of this window pop up? I would be extremely grateful
if someone could lend me a hand. Thanks a lot
~Graham