|
From: Geisschaes <gei...@us...> - 2005-03-14 19:31:38
|
Update of /cvsroot/macattrick/macattrick In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17484 Modified Files: HattrickOrg.m Properties.h Properties.m World.h World.m main.m Log Message: comma in currencyrate replaced with dot, login file now xml format and seperated from logout file Index: Properties.m =================================================================== RCS file: /cvsroot/macattrick/macattrick/Properties.m,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Properties.m 18 Jan 2005 21:05:47 -0000 1.13 --- Properties.m 14 Mar 2005 19:30:52 -0000 1.14 *************** *** 70,73 **** --- 70,77 ---- return [path stringByAppendingString:@"/login.xml"]; } + +(NSString*) logoutFile { + NSString *path = [self libraryPath]; + return [path stringByAppendingString:@"/logout.xml"]; + } +(NSString*) worldDetailsFile { NSString *path = [self libraryPath]; Index: World.h =================================================================== RCS file: /cvsroot/macattrick/macattrick/World.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** World.h 10 Jan 2005 21:43:45 -0000 1.1 --- World.h 14 Mar 2005 19:30:52 -0000 1.2 *************** *** 35,39 **** // XML Stuff ! NSString *currentStringValue; Country *currentCountry; } --- 35,39 ---- // XML Stuff ! NSMutableString *currentStringValue; Country *currentCountry; } Index: main.m =================================================================== RCS file: /cvsroot/macattrick/macattrick/main.m,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** main.m 27 Feb 2005 15:14:44 -0000 1.15 --- main.m 14 Mar 2005 19:30:52 -0000 1.16 *************** *** 34,38 **** // comment out for main build ! //#import "Test/AllTests.h" // --- 34,38 ---- // comment out for main build ! #import "Test/AllTests.h" // *************** *** 47,51 **** [Properties initializeUserDefaults]; ! /*/ comment out for main build NSArray *args = [[NSProcessInfo processInfo] arguments]; if ([args count] >= 2 && [[args objectAtIndex:1] isEqualToString: @"test"]) { --- 47,51 ---- [Properties initializeUserDefaults]; ! // comment out for main build NSArray *args = [[NSProcessInfo processInfo] arguments]; if ([args count] >= 2 && [[args objectAtIndex:1] isEqualToString: @"test"]) { *************** *** 53,57 **** return 0; } ! /*/ return NSApplicationMain(argc, argv); --- 53,57 ---- return 0; } ! // return NSApplicationMain(argc, argv); Index: HattrickOrg.m =================================================================== RCS file: /cvsroot/macattrick/macattrick/HattrickOrg.m,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** HattrickOrg.m 27 Feb 2005 15:14:44 -0000 1.19 --- HattrickOrg.m 14 Mar 2005 19:30:51 -0000 1.20 *************** *** 95,99 **** - (void) login { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; ! NSString *urlString = [NSString stringWithFormat:@"http://%s/Common/default.asp?actionType=login&loginType=CHPP&Loginname=%s&readonlypassword=%s", [serverName cString], [loginName cString], [password cString]]; NSError *error; --- 95,99 ---- - (void) login { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; ! NSString *urlString = [NSString stringWithFormat:@"http://%s/Common/default.asp?outputType=XML&actionType=login&loginType=CHPP&Loginname=%s&readonlypassword=%s", [serverName cString], [loginName cString], [password cString]]; NSError *error; *************** *** 108,118 **** - (void) logout { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; ! NSString *urlString = [NSString stringWithFormat:@"http://%s/Common/default.asp?actionType=logout", [serverName cString]]; NSError *error; NSURLResponse *response; NSData *data = [NSURLConnection sendSynchronousRequest:[self buildRequest:urlString]returningResponse:&response error:&error]; ! [[NSFileManager defaultManager] removeFileAtPath:[Properties loginFile] handler:nil]; ! [data writeToFile:[Properties loginFile] atomically:YES]; [pool release]; } --- 108,118 ---- - (void) logout { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; ! NSString *urlString = [NSString stringWithFormat:@"http://%s/Common/default.asp?outputType=XML&actionType=logout", [serverName cString]]; NSError *error; NSURLResponse *response; NSData *data = [NSURLConnection sendSynchronousRequest:[self buildRequest:urlString]returningResponse:&response error:&error]; ! [[NSFileManager defaultManager] removeFileAtPath:[Properties logoutFile] handler:nil]; ! [data writeToFile:[Properties logoutFile] atomically:YES]; [pool release]; } Index: Properties.h =================================================================== RCS file: /cvsroot/macattrick/macattrick/Properties.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Properties.h 3 Oct 2004 19:26:55 -0000 1.7 --- Properties.h 14 Mar 2005 19:30:51 -0000 1.8 *************** *** 98,104 **** @method loginFile @abstract local address of the loginFile ! @discussion the login file contains information received during the login procedure and is hardly used anymore */ +(NSString*) loginFile; /*! --- 98,110 ---- @method loginFile @abstract local address of the loginFile ! @discussion the login file contains information received during the login procedure */ +(NSString*) loginFile; + /*! + @method logoutFile + @abstract local address of the logoutFile + @discussion the logout file contains information received during the logout procedure + */ + +(NSString*) logoutFile; /*! Index: World.m =================================================================== RCS file: /cvsroot/macattrick/macattrick/World.m,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** World.m 10 Jan 2005 21:43:45 -0000 1.1 --- World.m 14 Mar 2005 19:30:52 -0000 1.2 *************** *** 96,99 **** --- 96,102 ---- } else if(currentCountry) { + if([elementName isEqualToString:@"CurrencyRate"]) { + [currentStringValue replaceOccurrencesOfString:@"," withString:@"." options:NSLiteralSearch range: NSMakeRange(0, [currentStringValue length])]; + } [currentCountry setValue: currentStringValue forKey:elementName]; } |