fix for report 9463, additional functionality in the class inspector.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@19622 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2004-06-26 03:36:29 +00:00
parent b359ed9d5a
commit 2b6a9b80aa
9 changed files with 53 additions and 10 deletions

View file

@ -1,3 +1,15 @@
2004-06-25 01:33 Gregory John Casamento <greg_casamento@yahoo.com>
* GormDocument.m: [GormDocument(GormOutlineDataSource)
outlineView:setObjectValue:forTableColumn:byItem:] added
code to ignore the value which comes if it is nil. This
corrects a recent problem caused by a "fix" in gui's
NSTableView.
* GormClassInspector.m: Changes to allow the user to change
the class name when it's a custom class that's being edited.
* GormClassInspector.gorm: Changes to facilitate the above
modification.
2004-06-24 01:33 Gregory John Casamento <greg_casamento@yahoo.com>
* Gorm.m: [Gorm close:] the window is already released when

View file

@ -11,4 +11,12 @@
green = 0;
red = 1;
};
BuiltinPalettes = (
"0Menus.palette",
"1Windows.palette",
"2Controls.palette",
"3Containers.palette",
"4Data.palette"
);
UserPalettes = ();
}

View file

@ -67,4 +67,5 @@
- (NSString *) _currentClass;
- (void) _refreshView;
- (void) handleNotification: (NSNotification *)notification;
- (void) changeClassName: (id)sender;
@end

View file

@ -307,6 +307,7 @@ objectValueForTableColumn: (NSTableColumn *)tc
[selectClassCell setEnabled: (isCustom && !isFirstResponder)];
[parentClass setEnabled: (isCustom && !isFirstResponder)];
[searchCell setEnabled: (isCustom && !isFirstResponder)];
[classField setEditable: (isCustom && !isFirstResponder)];
// select the parent class
if(index != NSNotFound)
@ -455,6 +456,19 @@ objectValueForTableColumn: (NSTableColumn *)tc
}
}
- (void) changeClassName: (id)sender
{
NSString *name = [self _currentClass];
NSString *newName = [sender stringValue];
GormDocument *document = (GormDocument *)[(id <IB>)NSApp activeDocument];
[document collapseClass: name];
[classManager renameClassNamed: name
newName: newName];
[document reloadClasses];
[document selectClass: newName];
}
- (void) clickOnClass: (id)sender
{
NSLog(@"Click on class %@",sender);

View file

@ -568,7 +568,7 @@
}
[info setObject: allActions forKey: @"AllActions"];
}
return AUTORELEASE([allActions copy]);
return [allActions copy];
}
return nil;
}

View file

@ -3342,6 +3342,10 @@ objectValueForTableColumn: (NSTableColumn *)aTableColumn
{
GormOutlineView *gov = (GormOutlineView *)anOutlineView;
// ignore object values which come in as nil...
if(anObject == nil)
return;
if ([item isKindOfClass: [GormOutletActionHolder class]])
{
if (![anObject isEqualToString: @""])

View file

@ -253,14 +253,17 @@ static NSImage *dragImage = nil;
- (id) init
{
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
NSScrollView *scrollView;
NSArray *array;
NSRect contentRect = {{0, 0}, {272, 266}};
NSRect selectionRect = {{0, 0}, {52, 52}};
NSRect scrollRect = {{0, 192}, {272, 74}};
NSRect dragRect = {{0, 0}, {272, 192}};
unsigned int style = NSTitledWindowMask | NSClosableWindowMask | NSResizableWindowMask;
NSScrollView *scrollView;
NSArray *array;
NSRect contentRect = {{0, 0}, {272, 266}};
NSRect selectionRect = {{0, 0}, {52, 52}};
NSRect scrollRect = {{0, 192}, {272, 74}};
NSRect dragRect = {{0, 0}, {272, 192}};
unsigned int style = NSTitledWindowMask | NSClosableWindowMask | NSResizableWindowMask;
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSArray *builtinPalettes = [defaults arrayForKey: @"BuiltinPalettes"];
NSLog(@"builtin = %@",builtinPalettes);
panel = [[GormPalettePanel alloc] initWithContentRect: contentRect
styleMask: style
backing: NSBackingStoreRetained

View file

@ -156,7 +156,8 @@
"addOutlet:",
"selectClass:",
"searchForClass:",
"clickOnClass:"
"clickOnClass:",
"changeClassName:"
);
Outlets = (
classField,