[SCM] Multi-format 1D/2D barcode image processing library branch, upstream, updated. 24d4480bc48cf9eabf7b2bd2f528248b0e458809

rpechayr rpechayr at 59b500cc-1b3d-0410-9834-0bbf25fbcc57
Wed Aug 4 01:31:43 UTC 2010


The following commit has been merged in the upstream branch:
commit 71d042aff6adf6a5fb8a4d0d29dfc5ca31a80920
Author: rpechayr <rpechayr at 59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Date:   Sat May 22 09:17:41 2010 +0000

    [iphone] ScanTest was not displaying results on my device
    
    git-svn-id: http://zxing.googlecode.com/svn/trunk@1386 59b500cc-1b3d-0410-9834-0bbf25fbcc57

diff --git a/iphone/ScanTest/Classes/RootViewController.h b/iphone/ScanTest/Classes/RootViewController.h
index 8f1daa3..3a26d1b 100644
--- a/iphone/ScanTest/Classes/RootViewController.h
+++ b/iphone/ScanTest/Classes/RootViewController.h
@@ -12,8 +12,10 @@
 @interface RootViewController : UIViewController <ZXingDelegate> {
 	IBOutlet UITextView *resultsView;
 	ZXingWidgetController *scanController;
+  NSString *resultsToDisplay;
 }
- at property (nonatomic, assign) IBOutlet UITextView *resultsView;
+ at property (nonatomic, retain) IBOutlet UITextView *resultsView;
+ at property (nonatomic, retain) NSString *resultsToDisplay;
 
 - (IBAction)scanPressed:(id)sender;
 @end
diff --git a/iphone/ScanTest/Classes/RootViewController.m b/iphone/ScanTest/Classes/RootViewController.m
index 4851626..a9ae9a2 100644
--- a/iphone/ScanTest/Classes/RootViewController.m
+++ b/iphone/ScanTest/Classes/RootViewController.m
@@ -11,7 +11,7 @@
 
 @implementation RootViewController
 @synthesize resultsView;
-
+ at synthesize resultsToDisplay;
 #pragma mark -
 #pragma mark View lifecycle
 
@@ -19,8 +19,8 @@
     [super viewDidLoad];
 	[self setTitle:@"ZXing"];
 	scanController = [ZXingWidgetController alloc];
-	[scanController setOneDMode:false];
-	[scanController setShowCancel:true];
+	[scanController setOneDMode:NO];
+	[scanController setShowCancel:YES];
 	scanController = [scanController initWithDelegate:self];
 	NSBundle *mainBundle = [NSBundle mainBundle];
 	[scanController setSoundToPlay:[[NSURL fileURLWithPath:[mainBundle pathForResource:@"beep-beep" ofType:@"aiff"] isDirectory:NO] retain]];
@@ -63,8 +63,18 @@
 #pragma mark Memory management
 
 - (void)scanResult:(NSString *)result {
-	[resultsView setText:result];
-	[self dismissModalViewControllerAnimated:true];
+	//[self.resultsView setText:result];
+	[self dismissModalViewControllerAnimated:NO];
+  self.resultsToDisplay = result;
+}
+
+- (void)viewWillAppear:(BOOL)animated {
+  if (resultsToDisplay)
+  {
+    [resultsView setText:resultsToDisplay];
+    [resultsView setNeedsDisplay];
+  }
+  
 }
 
 - (void)cancelled {
@@ -88,7 +98,9 @@
 
 
 - (void)dealloc {
-	[scanController dealloc];
+  [resultsView release];
+	[scanController release];
+  [resultsToDisplay release];
     [super dealloc];
 }
 

-- 
Multi-format 1D/2D barcode image processing library



More information about the Pkg-google-commits mailing list