apps-gorm/GormSetNameController.m
Gregory John Casamento f00f63fac7 Fixes to correct bugs found while savannah was down. Corrections to the
addition and deletion of outlets/actions.   Made the test application use a .gorm
file instead of a hardcoded interface.   Corrected a problem with the "set name" functionality
and removed the "establishConnection" call in the GormInspectorsManager since this
was causing issues when the user added a delegate or a next key view.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@18266 72102866-910b-0410-8b05-ffd578937521
2003-12-24 02:50:34 +00:00

47 lines
957 B
Objective-C

// Author: Andrew E. Ruder
// Copyright (C) 2003 by Free Software Foundation, Inc
#include "GormSetNameController.h"
#include <AppKit/NSApplication.h>
#include <AppKit/NSButton.h>
#include <AppKit/NSTextField.h>
#include <AppKit/NSPanel.h>
#include <AppKit/NSNibLoading.h>
#include <AppKit/NSPanel.h>
@implementation GormSetNameController : NSObject
- (int)runAsModal
{
int result;
if (!window)
{
if (![NSBundle loadNibNamed: @"GormSetName" owner: self])
{
return NSAlertAlternateReturn;
}
}
[window makeKeyAndOrderFront: nil];
[window makeFirstResponder: textField];
result = [NSApp runModalForWindow: window];
return result;
}
- (NSTextField *) textField
{
return textField;
}
- (void) cancelHit: (id)sender
{
[window close];
[NSApp stopModalWithCode: NSAlertAlternateReturn];
}
- (void) okHit: (id)sender
{
[window close];
[NSApp stopModalWithCode: NSAlertDefaultReturn];
}
@end