Thanks, Ken!

On Feb 29, 2012, at 1:39 PM, Ken Thomases wrote:

> On Feb 29, 2012, at 1:03 PM, Howard Moon wrote:
> 
>>      I've added a Panel to a nib for an audio plug-in I'm working on, and am 
>> having trouble determining how the IB Inspector settings relate to the 
>> actual objects, such as an NSPanel.  In the Inspector, there are several 
>> Style Mask checkboxes:
>> 
>>      Utility
>>      HUD
>>      Non Activating
>>      Document Modal.
>> 
>>      What do those mean?  The tool tip for those says they relate to the 
>> member styleMask.  Yet when I look up the NSWindow member styleMask, it 
>> leads me to a link to the page "Window Style Masks", which lists the 
>> following values:
>> 
>>      NSBorderlessWindowMask
>>      NSTitledWindowMask
>>      NSClosableWindowMask
>>      NSMiniaturizableWindowMask
>>      NSResizeableWindowMask
>>      NSTexturedBackgroundWindowMask
>> 
>>      I don't see what the relation between these is.
> 
> Check the NSPanel class reference for additional style masks that only apply 
> to panels.

I swear I looked at every single thing in the NSPanel reference, but I never 
saw that! D'oh!

> 
> 
>>      I'm trying to show a panel that I've loaded previously from my nib. I 
>> don't want the panel to show until I want it, and I need to show it via code 
>> (in an NSWindowController-derived class I created).  But it either shows 
>> when it loads, or it doesn't show at all (when calling showWindow:nil), 
>> depending on whether I've checked the "Visible at Launch" checkbox in the IB 
>> Inspector.  I was hoping one of those "style mask" properties might be the 
>> culprit, but I don't know what they do.
> 
> My guess is that you forgot to set the window property of the window 
> controller.  That's why -showWindow: isn't doing anything.  Check what the 
> -window getter returns.
> 

Yeah... that was it.  I hadn't set the window property in IB.

> If the window is loaded from a standalone NIB, the window controller should 
> typically be loading the NIB; it should specify itself as the owner of the 
> NIB; in the NIB, the class of File's Owner should be set to your window 
> controller class; and you should connect the "window" outlet of File's Owner 
> to the window.
> 

Yep, that's what I'm doing now, and it's working.

Thanks!
        -Howard

> Regards,
> Ken
> 


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to