Re: IB Palette with a Window
Re: IB Palette with a Window
- Subject: Re: IB Palette with a Window
- From: Vince DeMarco <email@hidden>
- Date: Fri, 16 Nov 2001 16:58:46 -0800
On Friday, November 16, 2001, at 01:30 am, Girard Iglesias wrote:
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.
We just added the ability to do this in IB, it should be available in an
upcoming release.
vince