chilly-tiger-37884
05/27/2022, 6:28 AMbright-gpu-74537
05/27/2022, 6:29 AMbest-agent-85158
05/27/2022, 6:41 AMchilly-tiger-37884
05/27/2022, 6:42 AMbright-gpu-74537
05/27/2022, 6:42 AMbright-gpu-74537
05/27/2022, 6:42 AMbright-gpu-74537
05/27/2022, 6:43 AMbest-agent-85158
05/27/2022, 6:43 AMchilly-tiger-37884
05/27/2022, 6:43 AMbest-agent-85158
05/27/2022, 6:44 AMbright-gpu-74537
05/27/2022, 6:44 AMchilly-tiger-37884
05/27/2022, 6:45 AMbright-gpu-74537
05/27/2022, 6:45 AMbright-gpu-74537
05/27/2022, 6:46 AMbright-gpu-74537
05/27/2022, 6:46 AMchilly-tiger-37884
05/27/2022, 6:47 AMbest-agent-85158
05/27/2022, 6:47 AMchilly-tiger-37884
05/27/2022, 6:47 AMbest-agent-85158
05/27/2022, 6:47 AMbright-gpu-74537
05/27/2022, 6:48 AMchilly-tiger-37884
05/27/2022, 6:48 AMbright-gpu-74537
05/27/2022, 6:48 AMhaxe
static function __init__() {
#if !usesys
hl.Api.setErrorHandler(function(e) reportError(e)); // initialization error
sentinel = new hl.UI.Sentinel(30, function() throw "Program timeout (infinite loop?)");
#end
#if ( target.threaded && (haxe_ver >= 4.2) )
mainThread = sys.thread.Thread.current();
#end
}bright-gpu-74537
05/27/2022, 6:49 AMbright-gpu-74537
05/27/2022, 6:49 AMchilly-tiger-37884
05/27/2022, 6:49 AMpowerful-morning-89
05/27/2022, 7:33 AMhxd.System.allowTimeout = true to disable the timeout check.
Alternatively call hxd.System.timeoutTick() regularly.bright-gpu-74537
05/27/2022, 7:36 AMpowerful-morning-89
05/27/2022, 7:44 AMhx
var old = hxd.System.allowTimeout;
hxd.System.allowTimeout = false;
var path = hl.UI.loadFile({
fileName : options.defaultPath,
filters : options.fileTypes == null ? null : [for( e in options.fileTypes ) { name : e.name, exts : e.extensions }],
title : options.title,
});
hxd.System.allowTimeout = old;
if( path == null ) return;
if( options.relativePath ) {
var cwd = Sys.getCwd();
if( StringTools.startsWith(path, cwd) )
path = path.substr(cwd.length);
}
var b : BrowseSelect = {
fileName : path,
load : function(onReady) {
var data = sys.io.File.getBytes(path);
haxe.Timer.delay(function() onReady(data),0);
},
};
onSelect(b);
(And it looks like it's hxd.System.allowTimeout = false to disable the timeout check?)bright-gpu-74537
05/27/2022, 7:45 AM