Re: setStringValue problems with dynamically loaded views.
Re: setStringValue problems with dynamically loaded views.
- Subject: Re: setStringValue problems with dynamically loaded views.
- From: Kevin Brock <email@hidden>
- Date: Wed, 17 Mar 2010 15:20:24 -0700
On Mar 17, 2010, at 2:42 PM, Kyle Sluder wrote:
> -initWithNibName:bundle: doesn't actually load the nib, so at this
> point textField hasn't been hooked up to anything yet. If you set a
> breakpoint on this line you'll find that textField == nil. You will
> need to move this logic elsewhere.
>
> The documentation for NSViewController (perhaps the release notes?)
> makes oblique reference to NSWindowController's -windowDidLoad method,
> which is designed for just this kind of scenario. NSViewController
> doesn't have an analog for -windowDidLoad; instead you are expected to
> override -loadView, call super's implementation, and then perform your
> setup. That is the approach I would recommend.
Thanks. This fixed my problems!
Kevin
_______________________________________________
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