Simplfied code. started outlet/action export code.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@21108 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2005-04-14 04:40:48 +00:00
parent 13ebd044a8
commit 3861edb3fa
7 changed files with 51 additions and 11 deletions

View file

@ -1,3 +1,16 @@
2005-04-14 00:31 Gregory John Casamento <greg_casamento@yahoo.com>
* GormCore/GormClassManager.m: More informative error message when
a class can't be found.
* GormCore/GormImage.m: Implement objectNameForInspectorTitle.
* GormCore/GormInspectorsManager.m: Remove special cases for Image
and Sound.
* GormCore/GormPalettesManager.m: Beginnings of code to get
outlets/actions for exported class.
* GormCore/GormResource.h: Added include for IBObjectAdditions.h
to GormResource.h
* GormCore/GormSound.m: Implement objectNameForInspectorTitle.
2005-04-12 20:27 Gregory John Casamento <greg_casamento@yahoo.com>
* GormCore/GormGenericEditor.m: Unsubscribe from all notifications.

View file

@ -1825,7 +1825,7 @@
}
else
{
NSLog(@"This should never happen... an instance without an associated class: %@",className);
NSLog(@"Unable to find class named (%@), check that all palettes properly export classes to Gorm.",className);
break;
}
}

View file

@ -137,6 +137,11 @@
return @"GormNotApplicableInspector";
}
- (NSString *) objectNameForInspectorTitle
{
return @"Image";
}
- (NSImage *) imageForViewer
{
return [self image];

View file

@ -424,14 +424,6 @@
[panel setTitle: [NSString stringWithFormat: @"Class Edit Inspector:%@",
[obj className]]];
}
else if ([obj isKindOfClass: [GormSound class]])
{
[panel setTitle: @"Sound Inspector"];
}
else if ([obj isKindOfClass: [GormImage class]])
{
[panel setTitle: @"Image Inspector"];
}
else
{
NSString *newTitle = [obj objectNameForInspectorTitle];

View file

@ -614,6 +614,17 @@ static NSImage *dragImage = nil;
[dragView setNeedsDisplay: YES];
}
- (NSMutableArray *) actionsForClass: (Class) cls
{
Class superclass = [cls superclass];
return nil;
}
- (NSMutableArray *) outletsForClass: (Class) cls
{
return nil;
}
- (void) importClasses: (NSArray *)classes withDictionary: (NSDictionary *)dict
{
NSEnumerator *en = [classes objectEnumerator];
@ -627,8 +638,21 @@ static NSImage *dragImage = nil;
Class cls = NSClassFromString(className);
Class supercls = [cls superclass];
NSString *superClassName = NSStringFromClass(supercls);
NSMutableArray *actions = [self actionsForClass: cls];
NSMutableArray *outlets = [self outletsForClass: cls];
[classDict setObject: superClassName forKey: @"Super"];
// set the action/outlet keys
if(actions != nil)
{
[classDict setObject: actions forKey: @"Actions"];
}
if(outlets != nil)
{
[classDict setObject: outlets forKey: @"Outlets"];
}
[masterDict setObject: classDict forKey: className];
}

View file

@ -31,6 +31,7 @@
#include <Foundation/NSObject.h>
#include <InterfaceBuilder/IBProjectFiles.h>
#include <InterfaceBuilder/IBProjects.h>
#include <InterfaceBuilder/IBObjectAdditions.h>
@class NSString;

View file

@ -58,16 +58,21 @@
return @"GormSoundInspector";
}
- (NSString*) classInspectorClassName
- (NSString *) classInspectorClassName
{
return @"GormNotApplicableInspector";
}
- (NSString*) connectInspectorClassName
- (NSString *) connectInspectorClassName
{
return @"GormNotApplicableInspector";
}
- (NSString *) objectNameForInspectorTitle
{
return @"Sound";
}
- (NSImage *) imageForViewer
{
static NSImage *image = nil;