MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / onOpenFileCallback

Method onOpenFileCallback

tools/mcsim/main.js:381–398  ·  view source on GitHub ↗
(application)

Source from the content-addressed store, hash-verified

379 }
380 }
381 onOpenFileCallback(application) {
382 if (!application.first) return;
383
384 const paths = this.onOpenFileList ?? [];
385 delete this.onOpenFileList;
386 if (!paths.length) return;
387 this.quitScreen();
388 this.screenOnce = true;
389 for (let path of paths) {
390 let info = system.getFileInfo(path);
391 if (info?.directory)
392 this.doLocateSimulatorsCallback(application, path);
393 else if (info)
394 this.doOpenFileCallback(application, path);
395 }
396 delete this.screenOnce;
397 this.launchScreen();
398 }
399 onPlayingTouches(application, it) {
400 this.TOUCHES.string = it ? "Playing Touches" : "";
401 }

Callers

nothing calls this directly

Calls 4

quitScreenMethod · 0.95
doOpenFileCallbackMethod · 0.95
launchScreenMethod · 0.95

Tested by

no test coverage detected