Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Darkroom

Guest
Original poster
Dec 15, 2006
2,445
0
Montréal, Canada
i was able to subclass an NSPanel (with HUD) only after writing files for it in xCode and than launching IB. originally, i had dragged a HUD out but whenever i would try to subclass it, i would loose the HUD visuals - it would turn into a basic looking panel... is that a bug in xCode? or was i doing something wrong?
 
xCode 3.0 Bug Subclassing NSPanel (HUD)

You can subclass NSPanel and keep the HUD display. The problem is that the style masks can only be used in certain combinations. Here is an example of a panel subclass that has some proper combination of style masks:
Code:
[[MyPanel alloc] initWithContentRect:windowRect									 
styleMask:NSHUDWindowMask | NSTitledWindowMask | NSUtilityWindowMask						
backing:NSBackingStoreBuffered 
defer:YES										
screen:[[NSApp mainWindow] screen]];

I can't remember where I found the combinations. I think they were buried somewhere in the release notes for app kit. Hope that helps. Good luck.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.