setAutomaticTerminationSupportEnabled lazarus / 33-macOS - Mac OS X ---------------------------------------------------------------------- trev · 2020-06-11 12:29 Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i   NSProcessInfo.ProcessInfo.setAutomaticTerminationSupportEnabled(True);  // Works  NSProcessInfo.ProcessInfo.enableAutomaticTermination(NSStr('goofy reason')); // Has no effect  NSProcessInfo.ProcessInfo.setAutomaticTer minationSupportEnabled(False); // Has no effect   NSProcessInfo.ProcessInfo.disableAutomaticTermination(NSStr('goofy reason')); // Has no effect Any ideas why line 1: works, but subsequently lines 2 - 4 have no effect? Tested with: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i   if(NSProcessInfo.ProcessInfo.automaticTerminationSupportEnabled) = True then    Form1.Memo1.Lines.Add('automaticTerminationSupportEnabled Yep!')  else    Form1.Memo1.Lines.Add('automaticTerminationSupportEnabled Nope!');   Yes - AutomaticTerminationSupport was Enabled before trying to disable it. [EDIT] Yes, well, line 3 has no effect because of the documentation note stating "Currently, setting this property to No [False] has no effect". One down, two to go ... ---------------------------------------------------------------------- Jonas Maebe · 2020-06-13 13:13 From the documentation, it seems that once you call setAutomaticTerminationSupportEnabled(true), automatic termination is enabled by default. So calling enableAutomaticTermination should indeed have no effect, and just keep it enabled. If you first call disableAutomaticTermination afterwards, then it should be disabled until you call enableAutomaticTermination. ---------------------------------------------------------------------- trev · 2020-06-14 02:45 By default AutomaticTerminationSupportEnabled is False when the application starts. If I call: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i NSProcessInfo.ProcessInfo.enableAutomaticTermination(NSStr('goofy reason')); first, AutomaticTerminationSupportEnabled is still False. This call has no effect. Iif I call Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i NSProcessInfo.ProcessInfo.setAutomaticTerminationSupportEnabled(True); first, then AutomaticTerminationSupportEnabled is set to True. This call works. but a subsequent call to Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i NSProcessInfo.ProcessInfo.disableAutomaticTermination(NSStr('goofy reason')); has no effect and AutomaticTerminationSupportEnabled remains True.