I inherited a new class to implement windowedload from NIWDO controller and then access NI defined defined window controls:
- (zero) windowedload {nsarray * controls = [[[auto window] content view] subviews]; Int i; NSRunAlertPanel (@ "windowed loadload", @ "", @ "OK", tap, null); If ((calculation of controls) == 0) NSRunAlertPanel (@ "No Has Controllles", @ "", @ "OK", tap, null); (I = 0; i & lt; [Calculation of Controls]; i ++) NSNLrintPanel (@ "control", @ "", @ "OK", tap, null); } The code execution is okay, the NIB window is shown, but the subview does not have any element. How to access the window hair control? Thanks,
NIB window is shown, but
sub-viewThere is no element.
You may have forgotten to hook the window window in your window when the outlet is not inclined, the outlet property has zero , hence the [ Auto Window] Return Zero .
Then you send a message to zero . I say "message" because it means that you send contentView message to zero so that return zero , which means that you < Code> Subvues send the message to Zero , so that he also returns the zero .
As I said, send a message to zero zero , 0 , or 0.0 ; When you send count message to control since then, control is zero as told in the previous paragraph , That message returns 0 .
Open your hand in IB and connect to your controller's window in your window to the outlet.
By the way, you should not use the index for loop on NSArrays, there is a simple, cleaner way to do this.
Comments
Post a Comment