• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

iSightを使ってBooklog,MediaMarkerインポート用CSVファイルを生成するアプリ


Commit MetaInfo

Revision57ff07bb3a124cb032798e96e8301bbbc61e0e6f (tree)
Time2011-03-06 12:46:10
Authormasakih <masakih@user...>
Commitermasakih

Log Message

[Mod] 不要なインスタンス変数を削除。

Change Summary

Incremental Difference

--- a/BEAmazonLookup.h
+++ b/BEAmazonLookup.h
@@ -10,9 +10,6 @@
1010
1111 @class BEBookInformation;
1212 @interface BEAmazonLookup : NSObject
13-{
14- NSDateFormatter *timestampDateFormatter;
15-}
1613
1714 + (BEAmazonLookup *)sharedInstance;
1815
--- a/BEAmazonLookup.m
+++ b/BEAmazonLookup.m
@@ -11,16 +11,13 @@
1111
1212 #import "BEAmazonRequestGenerator.h"
1313
14-NSXMLElement *firstElementForName(NSXMLElement *parent, NSString *name);
15-
14+NSXMLElement *firstElementForName(NSXMLElement *parent, NSString *name)
15+{
16+ NSArray *children = [parent elementsForName:name];
17+ if(!children || [children count] == 0) return nil;
18+ return [children objectAtIndex:0];
19+}
1620
17-//NSString* encodeURIComponent(NSString* s) {
18-// return [((NSString*)CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault,
19-// (CFStringRef)s,
20-// NULL,
21-// (CFStringRef)@"!*'();:@&=+$,/?%#[]",
22-// kCFStringEncodingUTF8)) autorelease];
23-//}
2421 NSString* deodeURIComponent(NSString* s) {
2522 return [((NSString*)CFURLCreateStringByReplacingPercentEscapesUsingEncoding(kCFAllocatorDefault,
2623 (CFStringRef)s,
@@ -69,27 +66,14 @@ static BEAmazonLookup *sharedInstance = nil;
6966 return self;
7067 }
7168
72-- (id)init
73-{
74- if(self = [super init]) {
75- timestampDateFormatter = [[NSDateFormatter alloc] init];
76- [timestampDateFormatter setDateFormat:@"YYYY-MM-dd'T'HH':'mm':'ss'Z'"];
77- }
78- return self;
79-}
80-/* Never called.
81-- (void)dealloc
82-{
83- [timestumpDateFormatter release];
84- [super dealloc];
85-}
86-*/
69+
8770 - (void)parseError:(NSXMLElement *)items
8871 {
8972 id request = firstElementForName(items, @"Request");
9073 id errors = firstElementForName(request, @"Errors");
9174 id error = firstElementForName(errors, @"Error");
9275 if(error) {
76+ NSLog(@"%@", error);
9377 NSBeep();
9478 }
9579 }
@@ -144,12 +128,7 @@ static BEAmazonLookup *sharedInstance = nil;
144128 id publicationDate = firstElementForName(itemAttrs, @"PublicationDate");
145129 book.publicationDate = [publicationDate objectValue];
146130 }
147-NSXMLElement *firstElementForName(NSXMLElement *parent, NSString *name)
148-{
149- NSArray *children = [parent elementsForName:name];
150- if(!children || [children count] == 0) return nil;
151- return [children objectAtIndex:0];
152-}
131+
153132 - (void)lookupBooks:(NSArray *)books
154133 {
155134 for(id book in books) {