IB Palette with a Window
IB Palette with a Window
- Subject: IB Palette with a Window
- From: Gérard Iglesias <email@hidden>
- Date: Fri, 16 Nov 2001 10:30:30 +0100
I am trying to build a palette wit a special window and I don't success
to get the window shown in IB, only the object appears in the ib
document window and the Connection inspector is accessible, the other
inspector are "Not applicable".
My code is :
- (void)finishInstantiate
{
unsigned int mask = NSClosableWindowMask | NSTitledWindowMask |
NSMiniaturizableWindowMask | NSResizableWindowMask;
NSView * theView = [[[OrnamentView alloc] initWithFrame:NSMakeRect(0,
0, 320, 240)] autorelease];
NSWindow * theSpecialWindow = [[OrnamentWindow alloc]
initWithContentRect:NSMakeRect(100, 200, 320, 240)
styleMask:mask
backing:NSBackingStoreBuffered
defer:NO];
[theSpecialWindow setContentView:theView];
[theSpecialWindow setTitle:@"Special Window"];
[self associateObject:theSpecialWindow ofType:IBWindowPboardType
withView:windowWidget];
}
With OrnamentView and OrnamentWindow are very simple class for now.
When I connect a menu to the window to make it order front, it work
while I test the interface.
Thank in advance.
My idea is to get a window with a Custom View editable under IB, I miss
the capability to change the content view of a window in IB.