Feedback now sends along a version number with it.

CQTexperiment
vspader 2007-05-27 15:34:04 +00:00
parent 428a307c90
commit b5e85a9a3c
3 changed files with 18 additions and 4 deletions

View File

@ -65,8 +65,10 @@
//Using this so that if its a bad connection, it doesnt sit there looking stupid..or should it
feedbackSocket = [[FeedbackSocket alloc] init];
[feedbackSocket setDelegate:self];
NSString *version = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"];
[feedbackSocket sendFeedback:[fromView stringValue] subject:[subjectView stringValue] message:[messageView string]];
[feedbackSocket sendFeedback:[fromView stringValue] subject:[subjectView stringValue] message:[messageView string] version:version];
}
- (IBAction)cancel:(id)sender

View File

@ -13,15 +13,17 @@
NSString *from;
NSString *subject;
NSString *message;
NSString *version;
id delegate;
}
- (void)setDelegate:(id)d;
- (void)sendFeedback: (NSString *)f subject:(NSString *)s message:(NSString *)m;
- (void)sendFeedback: (NSString *)f subject:(NSString *)s message:(NSString *)m version:(NSString *)v;
- (void)setFrom:(NSString *)f;
- (void)setSubject:(NSString *)s;
- (void)setMessage:(NSString *)m;
- (void)setVersion:(NSString *)v;
@end

View File

@ -26,8 +26,9 @@ NSString *encodeForURL(NSString *s)
NSString *f = encodeForURL(from);
NSString *s = encodeForURL(subject);
NSString *m = encodeForURL(message);
NSString *v = encodeForURL(version);
NSString *postString = [NSString stringWithFormat:@"from=%@&subject=%@&message=%@", f, s, m];
NSString *postString = [NSString stringWithFormat:@"from=%@&subject=%@&message=%@&version=%@", f, s, m, v];
NSData *postData = [postString dataUsingEncoding:NSASCIIStringEncoding];
@ -55,7 +56,7 @@ NSString *encodeForURL(NSString *s)
[pool release];
}
- (void)sendFeedback: (NSString *)f subject:(NSString *)s message:(NSString *)m
- (void)sendFeedback: (NSString *)f subject:(NSString *)s message:(NSString *)m version:(NSString *)v
{
// DBLog(@"Detaching thread for feedback");
if ([f isEqualToString:@""])
@ -65,6 +66,7 @@ NSString *encodeForURL(NSString *s)
[self setFrom:f];
[self setSubject:s];
[self setMessage:m];
[self setVersion:v];
[NSThread detachNewThreadSelector:@selector(sendFeedbackThread:) toTarget:self withObject:nil];
}
@ -128,4 +130,12 @@ NSString *encodeForURL(NSString *s)
message = m;
}
- (void)setVersion:(NSString *)v
{
[v retain];
[version release];
version = v;
}
@end