mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-02-23 19:51:00 +00:00
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:
parent
13ebd044a8
commit
3861edb3fa
7 changed files with 51 additions and 11 deletions
13
ChangeLog
13
ChangeLog
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -137,6 +137,11 @@
|
|||
return @"GormNotApplicableInspector";
|
||||
}
|
||||
|
||||
- (NSString *) objectNameForInspectorTitle
|
||||
{
|
||||
return @"Image";
|
||||
}
|
||||
|
||||
- (NSImage *) imageForViewer
|
||||
{
|
||||
return [self image];
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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];
|
||||
}
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include <Foundation/NSObject.h>
|
||||
#include <InterfaceBuilder/IBProjectFiles.h>
|
||||
#include <InterfaceBuilder/IBProjects.h>
|
||||
#include <InterfaceBuilder/IBObjectAdditions.h>
|
||||
|
||||
@class NSString;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue