Fix some headers, remove unused variables, and use EOMApp

instead of NSApp



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@36332 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
buzzdee 2013-03-10 17:29:05 +00:00
parent 9fc682f52a
commit 977d89aabd
9 changed files with 25 additions and 35 deletions

View file

@ -75,7 +75,7 @@
// avoid the AdvancedAttributeInspector on Stored Procedures.
if (weCan) {
id outlineSel = [[NSApp activeDocument] outlineSelection];
id outlineSel = [[EOMApp activeDocument] outlineSelection];
if ((outlineSel) && ([outlineSel class] == [EOEntity class])) {
return YES;
}

View file

@ -23,6 +23,7 @@
#include "AdvancedEntityInspector.h"
#include <EOModeler/EOMInspector.h>
#include "EOModeler/EOModelerApp.h"
#import <EOAccess/EOAccess.h>
#include <AppKit/AppKit.h>
@ -33,6 +34,7 @@
#import "../TableViewController.h"
EOModelerApp *EOMApp;
@implementation AdvancedEntityInspector
@ -54,7 +56,7 @@
- (void) buildAllEntities
{
NSMutableArray * entArray = [NSMutableArray array];
NSEnumerator * enumer = [[[[NSApp activeDocument] eomodel] entities] objectEnumerator];
NSEnumerator * enumer = [[[[EOMApp activeDocument] eomodel] entities] objectEnumerator];
EOEntity * entity;
while ((entity = [enumer nextObject])) {
@ -189,7 +191,6 @@
- (void) refresh
{
NSString * tmpStr;
EOModel *activeModel = [[NSApp activeDocument] eomodel];
ASSIGN(_currentEntity, (EOEntity *) [self selectedObject]);

View file

@ -61,12 +61,14 @@
{
NSInteger row;
return nil;
NSLog(@"selectedEntity not implemented");
#warning selectedEntity is not implemented
// NSInteger row = [destinationEntityBrowser selectedRow];
if (row == -1)
return nil;
return [[[[NSApp activeDocument] eomodel] entities] objectAtIndex:row];
return [[[[EOMApp activeDocument] eomodel] entities] objectAtIndex:row];
}
@ -88,9 +90,6 @@
- (void) refresh
{
EOModel *activeModel = [[NSApp activeDocument] eomodel];
ASSIGN(_currentRelation, (EORelationship *) [self selectedObject]);
[batchSizeField setIntValue:[_currentRelation numberOfToManyFaultsToBatchFetch]];

View file

@ -68,7 +68,7 @@ NSLog(@"EntityInspector selectedEntity not implemented");
if (row == -1)
return nil;
return [[[[NSApp activeDocument] eomodel] entities] objectAtIndex:row];
return [[[[EOMApp activeDocument] eomodel] entities] objectAtIndex:row];
}
@ -91,7 +91,6 @@ NSLog(@"EntityInspector selectedEntity not implemented");
- (void) refresh
{
NSString * stringValue = nil;
EOModel * activeModel = [[NSApp activeDocument] eomodel];
ASSIGN(_currentEntity, (EOEntity *) [self selectedObject]);

View file

@ -77,7 +77,6 @@
- (void) refresh
{
EOModel *activeModel = [[NSApp activeDocument] eomodel];
NSString *tmpStr;
ASSIGN(_currentEntity, (EOEntity *) [self selectedObject]);

View file

@ -70,7 +70,7 @@
// if ((row == -1))
// return nil;
//
// return [[[[NSApp activeDocument] eomodel] entities] objectAtIndex:row];
// return [[[[EOMApp activeDocument] eomodel] entities] objectAtIndex:row];
//}
//
@ -97,12 +97,11 @@
- (void) refresh
{
EOModel *activeModel = [[NSApp activeDocument] eomodel];
EOModel *activeModel = [[EOMApp activeDocument] eomodel];
// EORelationship * relation = (EORelationship *) [self selectedObject];
EOEntity *destEntity;
EOAttribute *srcAttrib, *destAttrib;
NSArray *joins;
NSInteger row = 0;
if (_attributes) {
DESTROY(_attributes);
@ -153,7 +152,7 @@
if ([sender state] == NSOnState)
{
EOModel *activeModel = [[NSApp activeDocument] eomodel];
EOModel *activeModel = [[EOMApp activeDocument] eomodel];
NSString *dstName = [[destBrowser selectedCell] title];
NSString *dstEntityName = [[destinationEntityBrowser selectedCell] title];
EOAttribute *srcAttrib = [[_currentRelation entity] attributeNamed:srcName];
@ -219,11 +218,10 @@
- (NSInteger)browser:(NSBrowser *)sender numberOfRowsInColumn:(NSInteger)column
{
NSInteger intVal = 0;
EOModel *activeModel = nil;
if (sender == destinationEntityBrowser) {
activeModel = [[NSApp activeDocument] eomodel];
activeModel = [[EOMApp activeDocument] eomodel];
return [[activeModel entityNames] count];
}
@ -245,7 +243,7 @@
if (!name) {
return 0;
}
activeModel = [[NSApp activeDocument] eomodel];
activeModel = [[EOMApp activeDocument] eomodel];
destinationEntity = [activeModel entityNamed:name];
}
@ -266,7 +264,7 @@
EOEntity * destinationEntity = nil;
if (sender == destinationEntityBrowser) {
activeModel = [[NSApp activeDocument] eomodel];
activeModel = [[EOMApp activeDocument] eomodel];
[cell setLeaf:YES];
//entityNames is better
@ -301,7 +299,7 @@
if (!destinationEntity) {
NSString * name = [[destinationEntityBrowser selectedCell] title];
activeModel = [[NSApp activeDocument] eomodel];
activeModel = [[EOMApp activeDocument] eomodel];
destinationEntity = [activeModel entityNamed:name];
}

View file

@ -70,7 +70,6 @@
- (void) refresh
{
EOModel *activeModel = [[NSApp activeDocument] eomodel];
NSString *tmpStr;
ASSIGN(_currentProcedure, (EOStoredProcedure *) [self selectedObject]);

View file

@ -14,6 +14,16 @@
include missing header
* EOAdaptors/PostgreSQLAdaptor/PostgreSQLEOAdaptorInfo.plist
renamed from Info.plist, and fix NSExecutable in it
* Apps/EOModelEditor/Inspectors/AdvancedAttributeInspector.m
* Apps/EOModelEditor/Inspectors/AdvancedEntityInspector.m
* Apps/EOModelEditor/Inspectors/AdvancedRelationshipInspector.m
* Apps/EOModelEditor/Inspectors/EntityInspector.m
* Apps/EOModelEditor/Inspectors/EntityStoredProcedureInspector.m
* Apps/EOModelEditor/Inspectors/RelationshipInspector.m
* Apps/EOModelEditor/Inspectors/StoredProcedureInspector.m
* EOAccess/EOAdaptor.m
Fix some headers, remove unused variables, and use EOMApp
instead of NSApp
2013-03-08: Sebastian Reitenbach <sebastia@l00-bugdead-prods.de>
* Apps/EOModelEditor/EOMEDocument.h

View file

@ -49,22 +49,7 @@ RCS_ID("$Id$")
#endif /* !__WIN32__ */
#endif
#ifdef GNUSTEP
#include <Foundation/NSArray.h>
#include <Foundation/NSString.h>
#include <Foundation/NSPathUtilities.h>
#include <Foundation/NSBundle.h>
#include <Foundation/NSObjCRuntime.h>
#include <Foundation/NSValue.h>
#include <Foundation/NSProcessInfo.h>
#include <Foundation/NSException.h>
#include <Foundation/NSFileManager.h>
#include <Foundation/NSData.h>
#include <Foundation/NSSet.h>
#include <Foundation/NSDebug.h>
#else
#include <Foundation/Foundation.h>
#endif
#ifndef GNUSTEP
#include <GNUstepBase/GNUstep.h>