Re: [Hessianobjc-user] NSDate leo issue and svn url
Status: Alpha
Brought to you by:
cocoa_dood
|
From: Byron W. <by...@bl...> - 2007-12-09 01:34:08
|
Hi Tore, thanks for pointing this out. I've updated the website, applied your patch and have run successfully run the unit tests on Leopard. I've also adjusted the unit tests to use the Caucho test end point "http://hessian.caucho.com/test/test " now that it's up and running again, unit tests should be passing without running a local hessian service. Ideally the unit tests shouldn't rely on a running service (especially an external end point), something I need to address. I was originally relying on the classString property because any of the class that use class cluster don't have true inheritance therefore [NSCalendarDate class] != [NSDate class] (as you've already demonstrated with your fix) even though according to the documentation NSCalendarDate inherits from NSDate (as this is the nature of class clusters). I'll re-address this to come up with a better equality test for class clusters. Cheers, Byron On Dec 8, 2007, at 3:21 PM, Tore Halset wrote: > Hello. > > The svn url mentioned on top of http://www.bluebearstudio.com/hessianobjc/ > does not seem to work anymore. I think the new one is > svn co https://hessianobjc.svn.sourceforge.net/svnroot/hessianobjc/ > trunk hessianobjc > > I just tried my project with Leopard and got an issue encoding NSDate. > Looks like the classString now is "__NSCFDate" instead of "NSCFDate". > I therefore suggest the following patch and recomend to not rely on > class names. > > Index: BBSHessianEncoder.m > =================================================================== > --- BBSHessianEncoder.m (revision 90) > +++ BBSHessianEncoder.m (working copy) > @@ -221,7 +221,7 @@ > else if([classString isEqualToString:@"NSCFDictionary"]) { > [self encodeDictionary:anyObject]; > } > - else if([classString isEqualToString:@"NSCFDate"] || > + else if([anyObject isKindOfClass:[NSDate class]] || > [anyObject isKindOfClass:[NSCalendarDate class]]) { > [self encodeDate:anyObject]; > } > > Regards, > - Tore. > > ------------------------------------------------------------------------- > SF.Net email is sponsored by: > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > Hessianobjc-user mailing list > Hes...@li... > https://lists.sourceforge.net/lists/listinfo/hessianobjc-user |