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
What I'm trying to say is that the root of my Nib is a Window since I
use it with NSPanel to display a modal sheet.
The window does have a view which has a text field and a button.
Do I need to have a subclass of NSWindowController just to load the
Nib -and- a NSViewController to manage the text
NSWindowController does not implement commitEditing, though.
NSViewController does but I have to use NSWindowController since my
dialog is a modal window (sheet).
Can I have my cake and eat it too?
On Mon, Jan 7, 2013 at 9:40 PM, jonat...@mugginsoft.com
wrote:
>
> On 2 Jan 2013, at 21:03, Joel
On 2 Jan 2013, at 21:03, Joel Reymont wrote:
> I have a dialog (sheet) with a single text field and a button.
>
> I'm using Cocoa Bindings to validate the value in the text field and
> set a string field in the File's Owner.
>
> This works fine but I would like to trigger the same sequence of
I have a dialog (sheet) with a single text field and a button.
I'm using Cocoa Bindings to validate the value in the text field and
set a string field in the File's Owner.
This works fine but I would like to trigger the same sequence of
events when pressing the button. How do I do this?
Than