mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-02-23 19:51:00 +00:00
Fixed some bugs and added code to updated the class inspector when the class is edited in the class editor.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@16895 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
c5e0ce6438
commit
a057b2a714
6 changed files with 31 additions and 9 deletions
7
Gorm.m
7
Gorm.m
|
@ -32,8 +32,7 @@
|
||||||
|
|
||||||
NSDate *startDate;
|
NSDate *startDate;
|
||||||
NSString *GormToggleGuidelineNotification = @"GormToggleGuidelineNotification";
|
NSString *GormToggleGuidelineNotification = @"GormToggleGuidelineNotification";
|
||||||
// NSString *GormAddedActionNotification = @"GormAddedActionNotification";
|
NSString *GormDidModifyClassNotification = @"GormDidModifyClassNotification";
|
||||||
// NSString *GormAddedOutletNotification = @"GormAddedOutletNotification";
|
|
||||||
|
|
||||||
@class InfoPanel;
|
@class InfoPanel;
|
||||||
|
|
||||||
|
@ -947,8 +946,6 @@ static NSButtonType _buttonTypeForObject( id button )
|
||||||
|
|
||||||
[self setMainMenu: mainMenu];
|
[self setMainMenu: mainMenu];
|
||||||
|
|
||||||
DESTROY(testContainer);
|
|
||||||
|
|
||||||
isTesting = NO;
|
isTesting = NO;
|
||||||
|
|
||||||
if ([selectionOwner conformsToProtocol: @protocol(IBEditors)] == YES)
|
if ([selectionOwner conformsToProtocol: @protocol(IBEditors)] == YES)
|
||||||
|
@ -1469,7 +1466,7 @@ static NSButtonType _buttonTypeForObject( id button )
|
||||||
|
|
||||||
[nc postNotificationName: IBDidBeginTestingInterfaceNotification
|
[nc postNotificationName: IBDidBeginTestingInterfaceNotification
|
||||||
object: self];
|
object: self];
|
||||||
|
|
||||||
RELEASE(d);
|
RELEASE(d);
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,4 +58,6 @@
|
||||||
- (void) removeOutlet: (id)sender;
|
- (void) removeOutlet: (id)sender;
|
||||||
- (void) select: (id)sender;
|
- (void) select: (id)sender;
|
||||||
- (NSString *) _currentClass;
|
- (NSString *) _currentClass;
|
||||||
|
- (void) _refreshView;
|
||||||
|
- (void) handleNotification: (NSNotification *)notification;
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
#include "GormPrivate.h"
|
#include "GormPrivate.h"
|
||||||
#include "GormClassManager.h"
|
#include "GormClassManager.h"
|
||||||
#include "GormDocument.h"
|
#include "GormDocument.h"
|
||||||
|
#include <InterfaceBuilder/IBApplicationAdditions.h>
|
||||||
|
|
||||||
NSNotificationCenter *nc = nil;
|
NSNotificationCenter *nc = nil;
|
||||||
|
|
||||||
|
@ -155,6 +156,12 @@ objectValueForTableColumn: (NSTableColumn *)tc
|
||||||
NSLog(@"Could not open gorm GormClassInspector");
|
NSLog(@"Could not open gorm GormClassInspector");
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[nc addObserver: self
|
||||||
|
selector: @selector(handleNotification:)
|
||||||
|
name: GormDidModifyClassNotification
|
||||||
|
object: nil];
|
||||||
|
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
@ -256,6 +263,15 @@ objectValueForTableColumn: (NSTableColumn *)tc
|
||||||
return [theobject className];
|
return [theobject className];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void) handleNotification: (NSNotification *)notification
|
||||||
|
{
|
||||||
|
if([notification object] == classManager)
|
||||||
|
{
|
||||||
|
[self _refreshView];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// table delegate/data source methods...
|
||||||
- (BOOL) tableView: (NSTableView *)tableView
|
- (BOOL) tableView: (NSTableView *)tableView
|
||||||
shouldEditTableColumn: (NSTableColumn *)aTableColumn
|
shouldEditTableColumn: (NSTableColumn *)aTableColumn
|
||||||
row: (int)rowIndex
|
row: (int)rowIndex
|
||||||
|
|
|
@ -38,6 +38,9 @@
|
||||||
- (void) _touch
|
- (void) _touch
|
||||||
{
|
{
|
||||||
id<IBDocuments> doc = [(id<IB>)NSApp activeDocument];
|
id<IBDocuments> doc = [(id<IB>)NSApp activeDocument];
|
||||||
|
[[NSNotificationCenter defaultCenter]
|
||||||
|
postNotificationName: GormDidModifyClassNotification
|
||||||
|
object: self];
|
||||||
[doc touch];
|
[doc touch];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -171,7 +174,7 @@
|
||||||
RELEASE(classInfo);
|
RELEASE(classInfo);
|
||||||
|
|
||||||
// copy all actions from the class imported to the first responder
|
// copy all actions from the class imported to the first responder
|
||||||
while(action = [e nextObject])
|
while((action = [e nextObject]))
|
||||||
{
|
{
|
||||||
[self addAction: action forClassNamed: @"FirstResponder"];
|
[self addAction: action forClassNamed: @"FirstResponder"];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1568,7 +1568,12 @@ static NSImage *classesImage = nil;
|
||||||
selector: @selector(handleNotification:)
|
selector: @selector(handleNotification:)
|
||||||
name: IBInspectorDidModifyObjectNotification
|
name: IBInspectorDidModifyObjectNotification
|
||||||
object: nil];
|
object: nil];
|
||||||
|
/*
|
||||||
|
[nc addObserver: self
|
||||||
|
selector: @selector(handleNotification:)
|
||||||
|
name: GormDidModifyClassNotification
|
||||||
|
object: nil];
|
||||||
|
*/
|
||||||
selectionView = [[NSMatrix alloc] initWithFrame: selectionRect
|
selectionView = [[NSMatrix alloc] initWithFrame: selectionRect
|
||||||
mode: NSRadioModeMatrix
|
mode: NSRadioModeMatrix
|
||||||
cellClass: [GormDisplayCell class]
|
cellClass: [GormDisplayCell class]
|
||||||
|
|
|
@ -39,8 +39,7 @@
|
||||||
|
|
||||||
extern NSString *GormLinkPboardType;
|
extern NSString *GormLinkPboardType;
|
||||||
extern NSString *GormToggleGuidelineNotification;
|
extern NSString *GormToggleGuidelineNotification;
|
||||||
// extern NSString *GormAddedActionNotification;
|
extern NSString *GormDidModifyClassNotification;
|
||||||
// extern NSString *GormAddedOutletNotification;
|
|
||||||
|
|
||||||
// templates
|
// templates
|
||||||
@interface GSNibItem (GormAdditions)
|
@interface GSNibItem (GormAdditions)
|
||||||
|
|
Loading…
Reference in a new issue