* EOAccess/EODatabaseContext.m

-isValidQualifierTypeForAttribute:
reformat, remove useless code
-qualifierForLockingAttributes:primaryKeyAttributes:entity:snapshot:
reformat
* EOAdaptors/PostgreSQLAdaptor/PostgreSQLAdaptor.m
-isValidQualifierType:model:
remove logs, format
* Apps/EOModelEditor/Inspectors/AttributeInspector.gsmarkup
* Apps/EOModeler/EOModelExtensions.m
Rename the char into BOOL
You can use BOOL to create code that has BOOL values.
Apple seems to do this in newer code 



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@30874 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Dave Wetzel 2010-06-27 08:34:28 +00:00
parent 4ba46c20a5
commit a5a47b954d
5 changed files with 103 additions and 83 deletions

View file

@ -115,7 +115,7 @@
<popUpButtonItem tag="0" title="int" />
<popUpButtonItem tag="1" title="double" />
<popUpButtonItem tag="2" title="float" />
<popUpButtonItem tag="3" title="char" />
<popUpButtonItem tag="3" title="BOOL" />
<popUpButtonItem tag="4" title="short" />
<popUpButtonItem tag="5" title="unsigned int" />
<popUpButtonItem tag="6" title="unsigned char" />

View file

@ -214,6 +214,30 @@
- (BOOL)isScalar
{
NSString * vClassName = [self valueClassName];
if ([vClassName isEqual:@"NSNumber"] == NO) {
return NO;
} else {
NSString * vType = [self valueType];
unichar myChar;
if ([vType length] < 1) {
return NO;
}
myChar = [vType characterAtIndex:0];
switch (myChar) {
case 'c': /* this is what newer WO versions do */
return YES;
break;
case 'i':
return NO; /* we want NSNumbers */
break;
default:
break;
}
}
return NO;
}
@ -229,7 +253,7 @@
myChar = [vType characterAtIndex:0];
switch (myChar) {
case 'c': return @"char";
case 'c': return @"BOOL"; /* this is what newer WO versions do */
break;
case 'C': return @"unsigned char";
break;

View file

@ -1,3 +1,18 @@
2010-06-27 David Wetzel <dave@turbocat.de>
* EOAccess/EODatabaseContext.m
-isValidQualifierTypeForAttribute:
reformat, remove useless code
-qualifierForLockingAttributes:primaryKeyAttributes:entity:snapshot:
reformat
* EOAdaptors/PostgreSQLAdaptor/PostgreSQLAdaptor.m
-isValidQualifierType:model:
remove logs, format
* Apps/EOModelEditor/Inspectors/AttributeInspector.gsmarkup
* Apps/EOModeler/EOModelExtensions.m
Rename the char into BOOL
You can use BOOL to create code that has BOOL values.
Apple seems to do this in newer code
2010-06-26 David Wetzel <dave@turbocat.de>
* EOAccess/EOAccessFault.m
-unableToFaultObject:databaseContext:

View file

@ -4793,8 +4793,6 @@ Raises an exception is the adaptor is unable to perform the operations.
EOAdaptor *adaptor = nil;
NSString *externalType = nil;
entity = [attribute entity];
NSAssert1(entity, @"No entity for attribute %@", attribute);
@ -4806,16 +4804,6 @@ Raises an exception is the adaptor is unable to perform the operations.
isValid = [adaptor isValidQualifierType: externalType
model: model];
//TODO REMOVE
if (!isValid)
{
}
return isValid;
}

View file

@ -286,16 +286,9 @@ static NSString *typeNames[][2] = {
for (i = 0, c = sizeof(typeNames) / sizeof(typeNames[0]); i < c; i++)
{
//TODO REMOVE
NSDebugMLog(@"externalTypeNames[i]=%@", typeNames[i][0]);
if ([typeNames[i][0] isEqualToString: typeName])
return YES;
}
//TODO REMOVE
NSDebugMLog(@"typeName=%@", typeName);
return NO;
}