FROM : Daniel Child
DATE : Wed Feb 27 22:25:21 2008
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
DATE : Wed Feb 27 22:25:21 2008
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
| Related mails | Author | Date |
|---|---|---|
| Daniel Child | Feb 27, 22:25 | |
| Ken Worley | Feb 27, 22:46 | |
| Quincey Morris | Feb 28, 00:34 | |
| Ken Thomases | Mar 1, 12:02 |






Cocoa mail archive

