I got it to work. The key is to explicitly load the Nib in the
constructor of my NSViewController subclass

- (id)init
{
    [NSBundle loadNibNamed:kNibName owner:self];

    self = [super initWithNibName:kNibName bundle:nil];
    ...
}

Checking the result of commitEditing when the user clicks my Add
button works fine. The caveat is that I have to check to see if my
target NSString's value is nil before I programmatically close my
modal sheet.

The target string can be nil if the user chose to discard changes in
the error panel that pops up on validation.

--------------------------------------------------------------------------
for hire: mac osx device driver ninja. kernel, usb and coreaudio drivers
---------------------+------------+---------------------------------------
http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont
---------------------+------------+---------------------------------------
_______________________________________________

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

This email sent to arch...@mail-archive.com

Reply via email to