I am trying to place and size segmented controls programmatically on a window controlled by a subclass of NSWindowController. What I'm getting, however, is simply the window as it was initially drawn in IB. I think the problem has to do with loading the window properly and more specifically, getting the segmented control variables to know which window they are being redrawn in.

I declared an outlet "window" to match the nib outlet (window), and also physically drew in dummy controls on within IB. When I try to actually ruun the program and init the window controller using initWithNibName:, I notice that "window" has no memory associated it. Since I want to size my controls programmatically, this seems to be a problem, since their "_window" variable is naturally also null as a result. The controls are initially drawn in IB but are suppose to resize during -windowWillLoad.

In addition, I see that in the debugger there is both a "window" and a "_window" variable under self (the controller). Does this mean you are not supposed to formally declare an outlet for the controller's window?

Bottom line, I am getting a window that looks like what I drew in IB, not the one modified programmatically.

I feel I am going about this the wrong way but don't see any documentation on this particular issue. If anyone could shed some light on the procedure, it would be a big help. Thanks.

Daniel
_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to