[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: fyi - Mac OS native GDL2 / GSWeb Installer package
From: |
Tim McIntosh |
Subject: |
Re: fyi - Mac OS native GDL2 / GSWeb Installer package |
Date: |
Fri, 7 Mar 2008 22:42:47 -0600 |
Hi David,
On Mar 6, 2008, at 7:54 AM, David Ayers wrote:
Tim McIntosh schrieb:
I have made a number of minor changes that I eventually intend to
either
undo or get accepted into the mainline. One difference in this
version
that may never make it into the mainline is the use of Cocoa-style
(native) KVC (as opposed to WO-4.5 style), which I wanted for use
with
the WO5 app that I'm porting.
It depends on how well we can emulate compatibility. Currently
GSWeb/GDL2 is used for Projects that are currently still deployed as
GNUstep based and WO45 based applications.
So it's very important not to break WO45 compatibility. Yet if we can
emulate it in a similar way as -base is currently trying, then I'd
take
the patches as long as they don't show issues.
Sounds good.
Do you really need to change the internal KVC? Maybe we just need to
implement a few more legacy methods in EOKeyValueCoding.m to get it
work
on OS X. (And avoid some warnings from -base while we are at it.)
I think I was being too vague with regard to KVC. I wasn't referring
to the deprecated KVC methods issue that has been discussed on the
list recently, but something much more trivial. All I was talking
about was the difference in behavior of -[NSDictionary valueForKey:]
and -[NSDictionary storedValueForKey:] with respect to "special
keys" (GDL2's @"allKeys" vs. Cocoa's @"@allKeys"), and the different
handling of NSArray aggregate functions when there is a key path
following the aggregating operator instead of a simple key.
For example: address@hidden@count
With Cocoa's -[NSArray valueForKeyPath:] behavior, this would invoke
[object valueForKeyPath: @"address@hidden"] on each object in the
display group, then return the sum of the counts.
With GDL2's behavior, this would attempt to invoke [[object
valueForKey: @"itemsArray"] decimalValue] on each object in the
display group, sum the results, and then invoke [result valueForKey:
@"@count"] on the sum--none of which would actually work as intended
in this case.
My KVC changes are really pretty simple/naive (see attached patch). I
was assuming this was an EOF vs. Cocoa behavior difference, but I'm
not really sure about that. The old EOF documentation that I looked
at didn't seem to be clear on what the behavior should be in this
case, and I didn't have a setup where I could test EOF to see what it
does, compared to GDL2. I don't have a high degree of confidence that
I'm doing "the right thing" here, but I was trying to get a specific
application working without changing any of its logic, and this seemed
to do the trick.
Thanks for your help,
Tim
EOKeyValueCoding.m.diff
Description: Binary data