root/trunk/TypePadWeblogComment.m @ 41

Revision 41, 3.7 kB (checked in by ngerakines, 3 years ago)

* Put into place the real icons that Wiley sent over
* Fixed the prefs on login
* Removed the TypePadSuper class
* General code cleanup

Line 
1//
2//  TypePadWeblogComment.m
3//  Fence
4//
5//  Created by Nicholas Gerakines on 6/19/06.
6//  Copyright 2006 __MyCompanyName__. All rights reserved.
7//
8
9#import "TypePadWeblogComment.h"
10
11
12@implementation TypePadWeblogComment
13
14// init
15- (id)init {
16    if (self = [super init]) {
17        [self setBlogid:@""];
18        [self setCommentid:@""];
19        [self setUthor_name:@""];
20        [self setUthor_url:@""];
21        [self setUthor_email:@""];
22        [self setText:@""];
23    }
24    return self;
25}
26
27- (void) encodeWithCoder: (NSCoder *)coder {
28    [coder encodeObject: [self blogid] forKey: @"WeblogBlogid"];
29    [coder encodeObject: [self commentid] forKey: @"WeblogCommentid"];
30    [coder encodeObject: [self uthor_name] forKey: @"WeblogUthor_name"];
31    [coder encodeObject: [self uthor_url] forKey: @"WeblogUthor_url"];
32    [coder encodeObject: [self uthor_email] forKey: @"WeblogUthor_email"];
33    [coder encodeObject: [self text] forKey: @"WeblogText"];
34}
35
36- (id) initWithCoder: (NSCoder *)coder {
37        [self setBlogid: [coder decodeObjectForKey: @"WeblogBlogid"]];
38        [self setCommentid: [coder decodeObjectForKey: @"WeblogCommentid"]];
39        [self setUthor_name: [coder decodeObjectForKey: @"WeblogUthor_name"]];
40        [self setUthor_url: [coder decodeObjectForKey: @"WeblogUthor_url"]];
41        [self setUthor_email: [coder decodeObjectForKey: @"WeblogUthor_email"]];
42        [self setText: [coder decodeObjectForKey: @"WeblogText"]];
43    return self;
44}
45
46/* blogid */
47- (NSString *) blogid { return blogid; }
48
49/* -setBlogid: */
50- (void) setBlogid: (NSString *) Blogid {
51    //NSLog(@"in -setBlogid:, old value of blogid: %@, changed to: %@", blogid, Blogid);
52    if (blogid != Blogid) {
53        [blogid autorelease];
54        blogid = [Blogid retain];
55    }
56}
57
58/* commentid */
59- (NSString *) commentid { return commentid; }
60
61/* -setCommentid: */
62- (void) setCommentid: (NSString *) Commentid {
63    //NSLog(@"in -setCommentid:, old value of commentid: %@, changed to: %@", commentid, Commentid);
64    if (commentid != Commentid) {
65        [commentid autorelease];
66        commentid = [Commentid retain];
67    }
68}
69
70/* uthor_name */
71- (NSString *) uthor_name { return author_name; }
72
73/* -setUthor_name: */
74- (void) setUthor_name: (NSString *) Uthor_name {
75    //NSLog(@"in -setUthor_name:, old value of author_name: %@, changed to: %@", author_name, Uthor_name);
76    if (author_name != Uthor_name) {
77        [author_name autorelease];
78        author_name = [Uthor_name retain];
79    }
80}
81
82/* uthor_url */
83- (NSString *) uthor_url { return author_url; }
84
85/* -setUthor_url: */
86- (void) setUthor_url: (NSString *) Uthor_url {
87    //NSLog(@"in -setUthor_url:, old value of author_url: %@, changed to: %@", author_url, Uthor_url);
88    if (author_url != Uthor_url) {
89        [author_url autorelease];
90        author_url = [Uthor_url retain];
91    }
92}
93
94/* uthor_email */
95- (NSString *) uthor_email { return author_email; }
96
97/* -setUthor_email: */
98- (void) setUthor_email: (NSString *) Uthor_email {
99    //NSLog(@"in -setUthor_email:, old value of author_email: %@, changed to: %@", author_email, Uthor_email);
100    if (author_email != Uthor_email) {
101        [author_email autorelease];
102        author_email = [Uthor_email retain];
103    }
104}
105
106/* text */
107- (NSString *) text { return text; }
108
109/* -setText: */
110- (void) setText: (NSString *) Text {
111    //NSLog(@"in -setText:, old value of text: %@, changed to: %@", text, Text);
112    if (text != Text) {
113        [text autorelease];
114        text = [Text retain];
115    }
116}
117
118
119/* dealloc */
120- (void) dealloc {
121    [blogid release];
122    [commentid release];
123    [author_name release];
124    [author_url release];
125    [author_email release];
126    [text release];
127       
128    blogid = nil;
129    commentid = nil;
130    author_name = nil;
131    author_url = nil;
132    author_email = nil;
133    text = nil;
134    [super dealloc];
135}
136
137
138
139@end
Note: See TracBrowser for help on using the browser.