* EOControl/EOEditingContext.m:

added @implementation EOCustomObject (AssociationsHack)
re-added registerAssociationForDeallocHack
* EOControl/*: ported to new runtime and OS X



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@30244 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
dwetzel 2010-04-26 22:05:17 +00:00
parent 9251847353
commit ae3ede9dab
28 changed files with 270 additions and 284 deletions

View file

@ -1,3 +1,4 @@
/**
EOKeyValueCoding.m <title>EOKeyValueCoding</title>
@ -60,7 +61,8 @@ RCS_ID("$Id$")
#ifndef GNUSTEP
#include <GNUstepBase/GNUstep.h>
#include <GNUstepBase/GSCategories.h>
#include <GNUstepBase/NSDebug+GNUstepBase.h>
#include <GNUstepBase/NSString+GNUstepBase.h>
#endif
#include <EOControl/EOKeyValueCoding.h>
@ -384,12 +386,14 @@ initialize(void)
INITIALIZE;
EOFLOGObjectFnStartCond(@"EOKVC");
mode = [[NSDecimalNumber defaultBehavior] roundingMode];
count = [self count];
NSDecimalFromComponents(&result, 0, 0, NO);
// does not seem to exist on snow leopad -- dw
// NSDecimalFromComponents(&result, 0, 0, NO);
result = [[NSDecimalNumber zero] decimalValue];
if (count>0)
{
unsigned int i=0;
@ -403,7 +407,7 @@ initialize(void)
};
ret = [NSDecimalNumber decimalNumberWithDecimal: result];
EOFLOGObjectFnStopCond(@"EOKVC");
return ret;
}
@ -425,7 +429,11 @@ initialize(void)
EOFLOGObjectFnStartCond(@"EOKVC");
mode = [[NSDecimalNumber defaultBehavior] roundingMode];
count = [self count];
NSDecimalFromComponents(&result, 0, 0, NO);
result = [[NSDecimalNumber zero] decimalValue];
// not available on snow leo -- dw
// NSDecimalFromComponents(&result, 0, 0, NO);
if (count>0)
{
@ -445,7 +453,10 @@ initialize(void)
}
left = result;
NSDecimalFromComponents(&right, (unsigned long long) count, 0, NO);
right = [[NSNumber numberWithUnsignedLongLong:count] decimalValue];
// NSDecimalFromComponents(&right, (unsigned long long) count, 0, NO);
NSDecimalDivide(&result, &left, &right, mode);