mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-02-24 03:51:22 +00:00
Some minor bug fixes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@18312 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
4b25020198
commit
b2cd08261b
4 changed files with 31 additions and 11 deletions
13
ChangeLog
13
ChangeLog
|
@ -1,3 +1,16 @@
|
|||
2004-01-04 22:39 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* GormDocument.m: Made -[GormDocument _identifierString:],
|
||||
-[GormDocument _formatAction:], and
|
||||
-[GormDocument _formatAction:] into
|
||||
+[GormDocument identifierString:],
|
||||
+[GormDocument formatAction:], and
|
||||
+[GormDocument formatAction:] so that they can be used
|
||||
in other classes which need to format actions/outlets.
|
||||
* GormDocument.h: Added declarations for the new class methods.
|
||||
* GormInspectorsManager.m: Use the new methods to prevent
|
||||
user from entering a bad name for an outlet or action.
|
||||
|
||||
2004-01-04 20:32 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* GormInspectorsManager.m: Added back some code to make the display
|
||||
|
|
|
@ -77,10 +77,11 @@ objectValueForTableColumn: (NSTableColumn *)tc
|
|||
{
|
||||
NSArray *list = [[(Gorm *)NSApp classManager] allOutletsForClassNamed: [inspector _currentClass]];
|
||||
NSString *name = [list objectAtIndex: rowIndex];
|
||||
NSString *formattedOutlet = [GormDocument formatOutlet: anObject];
|
||||
|
||||
RETAIN(anObject);
|
||||
// RETAIN(anObject);
|
||||
[[(Gorm *)NSApp classManager] replaceOutlet: name
|
||||
withOutlet: anObject
|
||||
withOutlet: formattedOutlet
|
||||
forClassNamed: [inspector _currentClass]];
|
||||
}
|
||||
|
||||
|
@ -113,10 +114,11 @@ objectValueForTableColumn: (NSTableColumn *)tc
|
|||
{
|
||||
NSArray *list = [[(Gorm *)NSApp classManager] allActionsForClassNamed: [inspector _currentClass]];
|
||||
NSString *name = [list objectAtIndex: rowIndex];
|
||||
NSString *formattedAction = [GormDocument formatAction: anObject];
|
||||
|
||||
RETAIN(anObject);
|
||||
// RETAIN(anObject);
|
||||
[[(Gorm *)NSApp classManager] replaceAction: name
|
||||
withAction: anObject
|
||||
withAction: formattedAction
|
||||
forClassNamed: [inspector _currentClass]];
|
||||
}
|
||||
|
||||
|
|
|
@ -166,6 +166,11 @@
|
|||
- (NSMenu *) servicesMenu;
|
||||
- (void) setWindowsMenu: (NSMenu *)menu;
|
||||
- (NSMenu *) windowsMenu;
|
||||
|
||||
// utility methods...
|
||||
+ (NSString*) identifierString: (NSString*)str;
|
||||
+ (NSString *)formatAction: (NSString *)action;
|
||||
+ (NSString *)formatOutlet: (NSString *)outlet;
|
||||
@end
|
||||
|
||||
@interface GormDocument (MenuValidation)
|
||||
|
|
|
@ -3037,7 +3037,7 @@ static NSImage *classesImage = nil;
|
|||
}
|
||||
|
||||
// convenience methods for formatting outlets/actions
|
||||
- (NSString*) _identifierString: (NSString*)str
|
||||
+ (NSString*) identifierString: (NSString*)str
|
||||
{
|
||||
NSCharacterSet *illegal = [[NSCharacterSet characterSetWithCharactersInString:
|
||||
@"_0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"]
|
||||
|
@ -3071,17 +3071,17 @@ static NSImage *classesImage = nil;
|
|||
return str;
|
||||
}
|
||||
|
||||
- (NSString *)_formatAction: (NSString *)action
|
||||
+ (NSString *)formatAction: (NSString *)action
|
||||
{
|
||||
NSString *identifier;
|
||||
|
||||
identifier = [[self _identifierString: action] stringByAppendingString: @":"];
|
||||
identifier = [[self identifierString: action] stringByAppendingString: @":"];
|
||||
return identifier;
|
||||
}
|
||||
|
||||
- (NSString *)_formatOutlet: (NSString *)outlet
|
||||
+ (NSString *)formatOutlet: (NSString *)outlet
|
||||
{
|
||||
NSString *identifier = [self _identifierString: outlet];
|
||||
NSString *identifier = [self identifierString: outlet];
|
||||
return identifier;
|
||||
}
|
||||
|
||||
|
@ -3278,7 +3278,7 @@ objectValueForTableColumn: (NSTableColumn *)aTableColumn
|
|||
RETAIN(name);
|
||||
if ([gov editType] == Actions)
|
||||
{
|
||||
NSString *formattedAction = [self _formatAction: anObject];
|
||||
NSString *formattedAction = [GormDocument formatAction: anObject];
|
||||
if (![classManager isAction: formattedAction
|
||||
ofClass: [gov itemBeingEdited]])
|
||||
{
|
||||
|
@ -3309,7 +3309,7 @@ objectValueForTableColumn: (NSTableColumn *)aTableColumn
|
|||
}
|
||||
else if ([gov editType] == Outlets)
|
||||
{
|
||||
NSString *formattedOutlet = [self _formatOutlet: anObject];
|
||||
NSString *formattedOutlet = [GormDocument formatOutlet: anObject];
|
||||
|
||||
if (![classManager isOutlet: formattedOutlet
|
||||
ofClass: [gov itemBeingEdited]])
|
||||
|
|
Loading…
Reference in a new issue