소스 검색

More stringent refresh ban possible.

If 'helios.inspector.refreshMillis' is set to negative,
inspectors stop refreshing even after DoIt.
Herby Vojčík 4 년 전
부모
커밋
7ff4146dce
2개의 변경된 파일10개의 추가작업 그리고 5개의 파일을 삭제
  1. 7 3
      src/Helios-Inspector.js
  2. 3 2
      src/Helios-Inspector.st

+ 7 - 3
src/Helios-Inspector.js

@@ -1312,20 +1312,24 @@ selector: "onDoneIt",
 protocol: "reactions",
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "onDoneIt\x0a\x0a\x09self refresh",
+source: "onDoneIt\x0a\x09| refreshInterval |\x0a\x09refreshInterval := 'helios.inspector.refreshMillis' settingValueIfAbsent: 500.\x0a\x09refreshInterval < 0 ifFalse: [ self refresh ]",
 referencedClasses: [],
 //>>excludeEnd("ide");
 pragmas: [],
-messageSends: ["refresh"]
+messageSends: ["settingValueIfAbsent:", "ifFalse:", "<", "refresh"]
 }, function ($methodClass){ return function (){
 var self=this,$self=this;
+var refreshInterval;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
+refreshInterval="helios.inspector.refreshMillis"._settingValueIfAbsent_((500));
+if(!$core.assert($recv(refreshInterval).__lt((0)))){
 $self._refresh();
+}
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"onDoneIt",{})});
+}, function($ctx1) {$ctx1.fill(self,"onDoneIt",{refreshInterval:refreshInterval})});
 //>>excludeEnd("ctx");
 }; }),
 $globals.HLInspectorWidget);

+ 3 - 2
src/Helios-Inspector.st

@@ -336,8 +336,9 @@ onDive
 !
 
 onDoneIt
-
-	self refresh
+	| refreshInterval |
+	refreshInterval := 'helios.inspector.refreshMillis' settingValueIfAbsent: 500.
+	refreshInterval < 0 ifFalse: [ self refresh ]
 !
 
 onInspectIt