[SCM] Multi-format 1D/2D barcode image processing library branch, upstream, updated. 24d4480bc48cf9eabf7b2bd2f528248b0e458809
dkavanagh
dkavanagh at 59b500cc-1b3d-0410-9834-0bbf25fbcc57
Wed Aug 4 01:31:33 UTC 2010
The following commit has been merged in the upstream branch:
commit 89260cba5ddbb877db74ff501ea01e9417dca8fa
Author: dkavanagh <dkavanagh at 59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Date: Thu May 13 16:05:02 2010 +0000
call widget delegate after 1 sec delay. this gives ui time to show points and user time to view them.
git-svn-id: http://zxing.googlecode.com/svn/trunk@1360 59b500cc-1b3d-0410-9834-0bbf25fbcc57
diff --git a/iphone/ZXingWidget/ZXingWidgetController.m b/iphone/ZXingWidget/ZXingWidgetController.m
index 754c6e7..d3560af 100755
--- a/iphone/ZXingWidget/ZXingWidgetController.m
+++ b/iphone/ZXingWidget/ZXingWidgetController.m
@@ -54,6 +54,12 @@ CGImageRef UIGetScreenImage();
return self;
}
+- (void)dealloc {
+ AudioServicesDisposeSystemSoundID(beepSound);
+ [overlayView dealloc];
+ [super dealloc];
+}
+
- (void)cancelled {
NSLog(@"cancelled called in ZXingWidgetController");
wasCancelled = true;
@@ -79,6 +85,15 @@ CGImageRef UIGetScreenImage();
return false;
}
+- (void)viewDidLoad {
+ [super viewDidLoad];
+ NSBundle *mainBundle = [NSBundle mainBundle];
+ OSStatus error = AudioServicesCreateSystemSoundID((CFURLRef)[NSURL fileURLWithPath:[mainBundle pathForResource:@"beep-beep" ofType:@"caf"] isDirectory:NO], &beepSound);
+ if (error != kAudioServicesNoError) {
+ NSLog(@"Problem loading nearSound.caf");
+ }
+}
+
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
[overlayView setPoints:nil];
@@ -119,7 +134,6 @@ CGImageRef UIGetScreenImage();
NSLog(@"in presentResultForString()");
self.result = [ResultParser parsedResultForString:resultString];
AudioServicesPlaySystemSound(beepSound);
- // self.actions = self.result.actions;
#ifdef DEBUG
NSLog(@"result string = %@", resultString);
NSLog(@"result has %d actions", actions ? 0 : actions.count);
@@ -140,7 +154,7 @@ CGImageRef UIGetScreenImage();
NSLog(@"decoded image!!");
[self presentResultPoints:[twoDResult points] forImage:image usingSubset:subset];
// now, in a selector, call the delegate to give this overlay time to show the points
- [self performSelectorOnMainThread:@selector(alertDelegate:) withObject:[[twoDResult text] copy] waitUntilDone:false];
+ [self performSelector:@selector(alertDelegate:) withObject:[[twoDResult text] copy] afterDelay:1.0];
decoder.delegate = nil;
[decoder release];
}
--
Multi-format 1D/2D barcode image processing library
More information about the Pkg-google-commits
mailing list