[OGo-Developer] Modifications for EOControl
Stéphane Corthésy
developer@opengroupware.org
Sun, 4 Feb 2007 14:22:28 +0100
Hi,
RuleModeler, a Cocoa application maintained by ProjectWonder, uses
now SOPE's EOControl classes, as of version 1.3, to replace Apple's
deprecated EOControl framework.
We use only a subset of EOControl: EOQualifier and EOKeyValueArchiver
classes.
I fixed several bugs, and made some modifications valid for
RuleModeler only, to be as compatible as possible with Apple's
EOControl and WebObjects 5, notably the (un)archiving process. I
added code specific to WO5-compatibility, #ifdef'd with
WO_JAVA_COMPATIBILITY.
I also wrote several test cases (using SenTestingKit) to test the
parsing and the (un)archiving of qualifiers. You might find them
useful too.
Source code for RuleModeler's EOControl is available either in
ProjectWonder's repository <http://sourceforge.net/projects/wonder>,
or here: <http://www.sente.ch/pub/beta/RuleModelerEOControl.tgz>
Cheers,
Stéphane
EOAndQualifier.m:
'AND' becomes 'and' for WO_JAVA_COMPATIBILITY. Replaced calloc by
objc_calloc and free by objc_free, for consistency. Fixed some calloc
counts.
EOKeyValueArchiver.m:
Added some NSAssert* calls. Fixed (un)archiving of dictionaries:
their content was not (un)archived correctly. Added use of
EOCustomClasserWrapper when a (java) class is not found in the
runtime. Fixed bugs in -classForName:. Added EOKeyValueArchiving
implementation for NSNumber, NSCalendarDate, NSDecimalNumber, NSNull.
EOKeyValueQualifier.m:
Fixed bug in isEqualToQualifier: when values are nil. Added
WO_JAVA_COMPATIBILITY compatibility code.
EONotQualifier.m:
'NOT' becomes 'not' for WO_JAVA_COMPATIBILITY.
EOOrQualifier.m:
'OR' becomes 'or' for WO_JAVA_COMPATIBILITY. Replaced calloc by
objc_calloc and free by objc_free, for consistency. Fixed some calloc
counts.
EOQualifier.m:
In +initialize, use NSNonOwnedPointerMapValueCallBacks instead of
NSIntMapValueCallBacks, to store SELectors. '<>' becomes '!=' for
WO_JAVA_COMPATIBILITY. Added -qualifierDescription. Added
WO_JAVA_COMPATIBILITY compatibility code.
EOQualifierParser.m:
Replaced all cStrings by UTF8Strings. Now raises exception on parsing
error, instead of returning nil. qDebug initialized by +[EOQualifier
isEvaluationDebuggingEnabled]. Now can parse float values. Added use
of EOCustomClasserWrapper when value is an unknown class in runtime.
NSObject+QualDesc.m:
Now escapes single quotes in -[NSString qualifierDescription]. Added -
[NSObject qualifierDescription], [NSNumber qualifierDescription].
Added WO_JAVA_COMPATIBILITY compatibility code.
EOCustomClassWrapper.*:
New class used only with WO_JAVA_COMPATIBILITY. Allows to (un)archive
classes which are not known to the runtime.