The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

cleanman2 (2) [Avatar] Offline
When I run the code at this point I get this message:

(node:12694) DeprecationWarning: Calling an asynchronous function without callback is deprecated.

The problem seems to be with app.js because if I comment out (window) the error goes away but of course the program does not give the expected result.

Also could you explain this line: userInterface.loadDirectory(folderPath)(window);

I understand loadDirectory() is being called but I don't remember ever seeing anything like
(folderPath)(window) before.

Thanks, Jim
paulbjensen (39) [Avatar] Offline
Hi Jim,

The reason I did it this way was because of a case where functions trying to inspect and manipulate the DOM were executing before the document object was accessible. I think this was done specifically for NW.js. It might not be necessary in Electron. I wanted to guarantee that document was set and accessible before calling any the of the actions inside of the loadDirectory function.

As for the warning that you are currently seeing, is that NW.js? and if so, which version? Thanks.