<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -10,6 +10,7 @@
 #import &quot;Constants.h&quot;
 #import &quot;DbHelper.h&quot;
 #import &quot;BlogProxy.h&quot;
+#import &quot;Util.h&quot;
 
 
 @implementation AudioReportView
@@ -41,6 +42,11 @@
 	[self.view addSubview:audioCell];
 }
 
+- (void)viewWillAppear:(BOOL)animated{
+	[super viewWillAppear:animated];
+	[audioCell resetFile]; //Make sure the file is empty
+}
+
 
 /*
 // Override to allow orientations other than the default portrait orientation.
@@ -72,6 +78,11 @@
 	NSString *tmpSoundPath = [audioCell.soundFileURL path];
 	NSData *fileData = [NSData dataWithContentsOfFile:tmpSoundPath];
 	
+	if (!fileData) {
+		[Util handleMsg:@&quot;Please record your audio report.&quot; withTitle:@&quot;Error&quot;];
+		[self performSelectorInBackground:@selector(stopSpin) withObject:nil];	
+		return;
+	}
 	
 	if (self.myPost==nil &amp;&amp; fileData) 
 	{</diff>
      <filename>Classes/AudioReportView.m</filename>
    </modified>
    <modified>
      <diff>@@ -70,6 +70,7 @@ extern NSString *kCellAudio_ID;
 - (IBAction) playOrStop: (id) sender;
 - (void) pausePlayback;
 - (void) resumePlayback;
+- (void) resetFile;
 
 
 @end</diff>
      <filename>Classes/AudioView.h</filename>
    </modified>
    <modified>
      <diff>@@ -73,36 +73,7 @@ NSString *kCellAudio_ID = @&quot;CellAudio_ID&quot;;
 
 - (id)initWithFrame:(CGRect)frame  {
     if (self = [super initWithFrame:frame ]) {
-		// this app uses a fixed file name at a fixed location, so it makes sense to set the name and 
-		// URL here.
-		NSArray *filePaths =	NSSearchPathForDirectoriesInDomains (
-																	 
-																	 NSDocumentDirectory, 
-																	 NSUserDomainMask,
-																	 YES
-																	 ); 
-		
-		self.recordingDirectory = [filePaths objectAtIndex: 0];
-		
-		CFStringRef fileString = (CFStringRef) [NSString stringWithFormat: @&quot;%@/Recording.caf&quot;, self.recordingDirectory];
-		
-		//Delete previous audio report
-		[[NSFileManager defaultManager] removeItemAtPath:[NSString stringWithFormat: @&quot;%@/Recording.caf&quot;, self.recordingDirectory] error:NULL];
-
-		// create the file URL that identifies the file that the recording audio queue object records into
-		CFURLRef fileURL =	CFURLCreateWithFileSystemPath (
-														   NULL,
-														   fileString,
-														   kCFURLPOSIXPathStyle,
-														   false
-														   );
-		NSLog (@&quot;Recorded file path: %@&quot;, fileURL); // shows the location of the recorded file
-		
-		// save the sound file URL as an object attribute (as an NSURL object)
-		if (fileURL) {
-			self.soundFileURL	= (NSURL *) fileURL;
-			CFRelease (fileURL);
-		}
+		[self resetFile];
 		
 		// allocate memory to hold audio level values
 		audioLevels = calloc (2, sizeof (AudioQueueLevelMeterState));
@@ -138,6 +109,41 @@ NSString *kCellAudio_ID = @&quot;CellAudio_ID&quot;;
     return self;
 }
 
+- (void) resetFile {
+	// this app uses a fixed file name at a fixed location, so it makes sense to set the name and 
+	// URL here.
+	NSArray *filePaths =	NSSearchPathForDirectoriesInDomains (
+																 
+																 NSDocumentDirectory, 
+																 NSUserDomainMask,
+																 YES
+																 ); 
+	
+	self.recordingDirectory = [filePaths objectAtIndex: 0];
+	
+	CFStringRef fileString = (CFStringRef) [NSString stringWithFormat: @&quot;%@/Recording.caf&quot;, self.recordingDirectory];
+	
+	//Delete previous audio report
+	[[NSFileManager defaultManager] removeItemAtPath:[NSString stringWithFormat: @&quot;%@/Recording.caf&quot;, self.recordingDirectory] error:NULL];
+	
+	// create the file URL that identifies the file that the recording audio queue object records into
+	CFURLRef fileURL =	CFURLCreateWithFileSystemPath (
+													   NULL,
+													   fileString,
+													   kCFURLPOSIXPathStyle,
+													   false
+													   );
+	NSLog (@&quot;Recorded file path: %@&quot;, fileURL); // shows the location of the recorded file
+	
+	// save the sound file URL as an object attribute (as an NSURL object)
+	if (fileURL) {
+		self.soundFileURL	= (NSURL *) fileURL;
+		CFRelease (fileURL);
+	}
+	[self.playButton setEnabled: NO];
+
+}
+
 - (void) addBargraphToView: (UIView *) parentView {
 	
 	// static image for showing average level</diff>
      <filename>Classes/AudioView.m</filename>
    </modified>
    <modified>
      <diff>@@ -10,6 +10,7 @@
 #import &quot;Constants.h&quot;
 #import &quot;DbHelper.h&quot;
 #import &quot;BlogProxy.h&quot;
+#import &quot;Util.h&quot;
 
 
 @implementation TextReportView
@@ -66,6 +67,11 @@
 	if (self.myPost==nil) isNew = YES; 
 	else isNew = NO;
 	
+	if ([captionTextField.text length]==0 &amp;&amp; [storyTextView.text length]==0){
+		[Util handleMsg:@&quot;Please enter either title or report body.&quot; withTitle:@&quot;Error&quot;];
+		return;
+	}
+	
 	if (self.myPost==nil &amp;&amp;
 		([captionTextField.text length] &gt; 0 || [storyTextView.text length] &gt; 0)
 		) </diff>
      <filename>Classes/TextReportView.m</filename>
    </modified>
    <modified>
      <diff>@@ -562,13 +562,13 @@
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				ARCHS = &quot;$(ARCHS_STANDARD_32_BIT)&quot;;
-				&quot;CODE_SIGN_IDENTITY[sdk=iphoneos*]&quot; = &quot;iPhone Developer: Sze Wong&quot;;
+				&quot;CODE_SIGN_IDENTITY[sdk=iphoneos*]&quot; = &quot;iPhone Distribution: Zerion Software, Inc.&quot;;
 				GCC_C_LANGUAGE_STANDARD = c99;
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
 				IPHONEOS_DEPLOYMENT_TARGET = 2.1;
 				PREBINDING = NO;
-				&quot;PROVISIONING_PROFILE[sdk=iphoneos*]&quot; = &quot;5C47A760-DF91-4D03-B0C7-81AAFE639463&quot;;
+				&quot;PROVISIONING_PROFILE[sdk=iphoneos*]&quot; = &quot;753BAAB7-DA00-4A0F-BE74-1C9F677DCCE1&quot;;
 				SDKROOT = iphoneos2.2;
 			};
 			name = Distribution;</diff>
      <filename>Inauguration Report.xcodeproj/project.pbxproj</filename>
    </modified>
    <modified>
      <diff>@@ -11,7 +11,7 @@
 	&lt;key&gt;CFBundleIconFile&lt;/key&gt;
 	&lt;string&gt;Icon.png&lt;/string&gt;
 	&lt;key&gt;CFBundleIdentifier&lt;/key&gt;
-	&lt;string&gt;com.popvox.${PRODUCT_NAME}&lt;/string&gt;
+	&lt;string&gt;com.zerion.apps.InaugReport&lt;/string&gt;
 	&lt;key&gt;CFBundleInfoDictionaryVersion&lt;/key&gt;
 	&lt;string&gt;6.0&lt;/string&gt;
 	&lt;key&gt;CFBundleName&lt;/key&gt;
@@ -19,7 +19,7 @@
 	&lt;key&gt;CFBundlePackageType&lt;/key&gt;
 	&lt;string&gt;APPL&lt;/string&gt;
 	&lt;key&gt;CFBundleSignature&lt;/key&gt;
-	&lt;string&gt;????&lt;/string&gt;
+	&lt;string&gt;ZERN&lt;/string&gt;
 	&lt;key&gt;CFBundleVersion&lt;/key&gt;
 	&lt;string&gt;1.0.0.0&lt;/string&gt;
 	&lt;key&gt;LSRequiresIPhoneOS&lt;/key&gt;</diff>
      <filename>Info.plist</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>b37468148477d4f9f0d4d057ec5983628c9070c9</id>
    </parent>
  </parents>
  <author>
    <name>Sze Wong</name>
    <email>szewong@sze-wongs-macbook-pro.local</email>
  </author>
  <url>http://github.com/davetroy/inaugreport-iphone/commit/550ad2e2ae0155a89ed1edf1630844490ad68a24</url>
  <id>550ad2e2ae0155a89ed1edf1630844490ad68a24</id>
  <committed-date>2009-01-11T16:11:21-08:00</committed-date>
  <authored-date>2009-01-11T16:11:21-08:00</authored-date>
  <message>Updated Audio and Text view to ensure content before submitting.</message>
  <tree>bb53b1c8cf0f87fe40504687734c3ca705e73ac7</tree>
  <committer>
    <name>Sze Wong</name>
    <email>szewong@sze-wongs-macbook-pro.local</email>
  </committer>
</commit>
