• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Getting CustomWindow with [ NSWindowController window ]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Getting CustomWindow with [ NSWindowController window ]


  • Subject: Getting CustomWindow with [ NSWindowController window ]
  • From: Yann Bizeul <email@hidden>
  • Date: Wed, 20 Nov 2002 14:47:41 +0100

Hi there,

I saw some messages about this on the archives, but not about this
specific issue. I have to subclass NSWindow because it is Borderless,
so I override in LogWindow.m with :

- (id)initWithContentRect:(NSRect)contentRect styleMask:(unsigned
int)styleMask backing:(NSBackingStoreType)backingType defer:(BOOL)flag
{
self = [ super initWithContentRect:contentRect
styleMask:NSBorderlessWindowMask backing:backingType defer:flag ];
[ self setHasShadow: NO ];
[ self setOpaque: NO ];
[ self setBackgroundColor: [NSColor clearColor]];
return self;
}

I load this window with :
LogWindowController = [[ NSWindowController alloc ]
initWithWindowNibName: @"logWindow" ];

Great, now I have to use it !, if I do a :
[ LogWindowController showWindow ];
but nothing happen.

After this, I have to get the window object of the controller, to store
it in a NSDictionary, but I have an incompatible pointer type :
LogWindow *myLogWindow;
LogWindow = [ myLogWindowController window ];

The problem is that window: method return NSWindow, not LogWindow.

Any idea to use multiple instance of the same window in IB ?

Thanks
--
Yann Bizeul
TYNSOE.ORG - http://www.tynsoe.org/
Site technique consacri ` MacOS X
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Close button on Single Window Utilities
  • Next by Date: Re: Exclusive File Access
  • Previous by thread: Re: Solved: Focused UI element, UNSOLVED: widgets don't work properly in a bordrless window?!?
  • Next by thread: Setting the subclass for an NSTextView... in IB..
  • Index(es):
    • Date
    • Thread