mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-02-23 19:51:00 +00:00
Corrected a few minor problems... GJC
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@14146 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
06c961ce51
commit
755353cf9a
5 changed files with 38 additions and 11 deletions
|
@ -1,3 +1,9 @@
|
|||
2002-07-13 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Gorm.m: Corrected typo in method name. Added check to prevent
|
||||
addition of blank action, outlet or class name.
|
||||
* GormClassManager.m: started on modifications for custom classes.
|
||||
|
||||
2002-07-12 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Gorm.m: [-removeAttributeFromClass] added method to be
|
||||
|
|
2
Gorm.m
2
Gorm.m
|
@ -420,7 +420,7 @@ NSString *GormLinkPboardType = @"GormLinkPboardType";
|
|||
|
||||
- (id) removeAttributeFromClass: (id)sender
|
||||
{
|
||||
return [(id)[self activeDocument] revoveAttributeFromClass: sender];
|
||||
return [(id)[self activeDocument] removeAttributeFromClass: sender];
|
||||
}
|
||||
|
||||
- (id) editClass: (id)sender
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
@interface GormClassManager : NSObject
|
||||
{
|
||||
NSMutableDictionary *classInformation;
|
||||
NSMutableArray *customClasses;
|
||||
}
|
||||
- (void) addAction: (NSString*)anAction forObject: (NSObject*)anObject;
|
||||
- (void) addOutlet: (NSString*)anOutlet forObject: (NSObject*)anObject;
|
||||
|
|
|
@ -88,6 +88,7 @@ NSString *IBClassNameChangedNotification = @"IBClassNameChangedNotification";
|
|||
}
|
||||
[classInformation setObject: classInfo forKey: newClassName];
|
||||
RELEASE(classInfo);
|
||||
|
||||
return newClassName;
|
||||
}
|
||||
return @"";
|
||||
|
@ -715,7 +716,7 @@ NSString *IBClassNameChangedNotification = @"IBClassNameChangedNotification";
|
|||
|
||||
|
||||
dict = [NSDictionary dictionaryWithContentsOfFile: path];
|
||||
|
||||
customClasses = [NSMutableArray arrayWithCapacity: 1];
|
||||
if (dict == nil)
|
||||
{
|
||||
NSLog(@"Could not load classes dictionary");
|
||||
|
|
|
@ -2195,6 +2195,16 @@ objectValueForTableColumn: (NSTableColumn *)aTableColumn
|
|||
{
|
||||
}
|
||||
|
||||
- (NSString *)_formatAction: (NSString *)action
|
||||
{
|
||||
return action;
|
||||
}
|
||||
|
||||
- (NSString *)_formatOutlet: (NSString *)outlet
|
||||
{
|
||||
return outlet;
|
||||
}
|
||||
|
||||
- (void) outlineView: (NSOutlineView *)anOutlineView
|
||||
setObjectValue: (id)anObject
|
||||
forTableColumn: (NSTableColumn *)aTableColumn
|
||||
|
@ -2202,20 +2212,29 @@ objectValueForTableColumn: (NSTableColumn *)aTableColumn
|
|||
{
|
||||
if([item isKindOfClass: [GormOutletActionHolder class]])
|
||||
{
|
||||
if([anOutlineView editType] == Actions)
|
||||
if(![anObject isEqualToString: @""])
|
||||
{
|
||||
[classManager replaceAction: [item getName] withAction: anObject forClassNamed: [anOutlineView itemBeingEdited]];
|
||||
NSString *name = [item getName];
|
||||
if([anOutlineView editType] == Actions)
|
||||
{
|
||||
NSString *formattedAction = [self _formatAction: anObject];
|
||||
[classManager replaceAction: name withAction: formattedAction forClassNamed: [anOutlineView itemBeingEdited]];
|
||||
}
|
||||
else if([anOutlineView editType] == Outlets)
|
||||
{
|
||||
NSString *formattedOutlet = [self _formatOutlet: anObject];
|
||||
[classManager replaceOutlet: name withOutlet: formattedOutlet forClassNamed: [anOutlineView itemBeingEdited]];
|
||||
}
|
||||
[item setName: anObject];
|
||||
}
|
||||
else if([anOutlineView editType] == Outlets)
|
||||
{
|
||||
[classManager replaceOutlet: [item getName] withOutlet: anObject forClassNamed: [anOutlineView itemBeingEdited]];
|
||||
}
|
||||
[item setName: anObject];
|
||||
}
|
||||
else
|
||||
{
|
||||
[classManager renameClassNamed: item newName: anObject];
|
||||
[anOutlineView reloadData];
|
||||
if(![anObject isEqualToString: @""])
|
||||
{
|
||||
[classManager renameClassNamed: item newName: anObject];
|
||||
[anOutlineView reloadData];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue