Просмотр исходного кода

修复恢复编辑时多次重复恢复。

Pen Li 9 лет назад
Родитель
Сommit
74554655df

BIN
RedAnt ERP Mobile/RedAnt ERP Mobile.xcworkspace/xcuserdata/macmini1.xcuserdatad/UserInterfaceState.xcuserstate


+ 28 - 0
RedAnt ERP Mobile/RedAnt ERP Mobile.xcworkspace/xcuserdata/macmini1.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -2,4 +2,32 @@
 <Bucket
    type = "0"
    version = "2.0">
+   <Breakpoints>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            scope = "0"
+            stopOnStyle = "0">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/CommonEditor/CommonEditorViewController.m"
+            timestampString = "498723883.511512"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "3686"
+            endingLineNumber = "3686"
+            landmarkName = "-tableView:cellForRowAtIndexPath:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+   </Breakpoints>
 </Bucket>

+ 2 - 1
RedAnt ERP Mobile/common/Functions/order/CreateOrderViewController.m

@@ -213,7 +213,8 @@
     // Dispose of any resources that can be recreated.
 }
 - (IBAction)onSaveClick:(id)sender {
-
+    id foo = nil;
+    [[NSMutableArray array] addObject:foo];
     // add params check here.
     [self.lastedit endEditing:true];
     [self.lasttextview endEditing:true];

+ 8 - 4
RedAnt ERP Mobile/iSales-NPD/AppDelegate.m

@@ -548,20 +548,24 @@ void UncaughtExceptionHandler(NSException *exception) {
 //    NSLog(@"urgencyDic: %@",self.urgencyDic);
     if (self.urgencyDic.allKeys.count > 2) {
         
+        NSDictionary *tmp_urgencyDic = [self.urgencyDic copy];// 避免恢复后再次写入
+        [self.urgencyDic removeAllObjects];
+        [self.urgencyDic setObject:[NSNumber numberWithInt:0] forKey:@"count"];
+        
         MainViewController *mainVC = [self.window.rootViewController.childViewControllers lastObject];
         UIStoryboard *mainStoryBoard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
         
-        NSString *user = [self.urgencyDic objectForKey:@"user"];
+        NSString *user = [tmp_urgencyDic objectForKey:@"user"];
         if (![user isEqualToString:self.user]) {
             return;
         }
         
-        BOOL offline_mode = [[self.urgencyDic objectForKey:@"offline_mode"] boolValue];
+        BOOL offline_mode = [[tmp_urgencyDic objectForKey:@"offline_mode"] boolValue];
         if (!((self.offline_mode && offline_mode) || (!self.offline_mode && !offline_mode))) {
             return;
         }
         
-        id count = [self.urgencyDic objectForKey:@"count"];
+        id count = [tmp_urgencyDic objectForKey:@"count"];
         int level_count = count ? [count integerValue] : 0;
         
         if (!level_count) {
@@ -572,7 +576,7 @@ void UncaughtExceptionHandler(NSException *exception) {
             
             NSString *level_key = [NSString stringWithFormat:@"level_%d",i];
             
-            NSDictionary *urgencyDic = [self.urgencyDic objectForKey:level_key];
+            NSDictionary *urgencyDic = [tmp_urgencyDic objectForKey:level_key];
             
             NSString *className = [urgencyDic objectForKey:@"class_name"];