• 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
programmatically placing GUIs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

programmatically placing GUIs


  • Subject: programmatically placing GUIs
  • From: Daniel Child <email@hidden>
  • Date: Wed, 27 Feb 2008 16:25:21 -0500

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 (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: programmatically placing GUIs
      • From: Ken Worley <email@hidden>
  • Prev by Date: Re: complex views in a tableview
  • Next by Date: Re: Charting API? (Chris Schmitt)
  • Previous by thread: Re: Drawing from secondary thread erases resize corner in window? [solved, for now]
  • Next by thread: Re: programmatically placing GUIs
  • Index(es):
    • Date
    • Thread