I am currently working on an old iOS app. I don't have much idea about cordova.
I am stuck at one place, where code uses window.requestFileSytem . There is some code in success callback of this function.
When I debug, I found that success callback is not triggered. I am not able to find any thing about this function in latest cordova document however there is some thing in older document.
So I am worrying about is window. requestFilesystem method is deprecated. If so then how can I achieve same thing in latest cordova.
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, onReqFileSystemSuccess, null);
Any help would be appreciated.
Reviewing #iammilinds answer I have to correct my initial statement:
The window.requestFileSystem method is non-standard and should not be used. See the linked MDN docs.
Yet there are code examples containing the window.requestFileSystem method in the documentation for the cordova file plugin here or here (searching for window.requestFileSystem might help as the dcos are pretty large).
So regarding your initial problem: I'm afraid you'll have to debug it. Maybe checking the browser's console might give you a hint what's wrong. Or try to add an error handler to window.requestFileSystem as the last parameter like so:
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, onReqFileSystemSuccess, onErrorLoadFs);
Yes, it's deprecated.
It's implemented only by Chrome as of today.
This is what Mozilla page for Window.requestFileSystem() for this API says:
Non-standard
This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.
Above notice can be seen for several other "Files & Directories" APIs. However, below notice is significant and is read only for this particular API.
Even compared to the rest of the File and Directory Entries API, requestFileSystem() is especially non-standard; only Chrome implements it, and all other browser makers have decided that they will not implement it. It has even been removed from the proposed specification. Do not use this method!
The correct usage is as discussed in this post: How to use window.requestFileSystem of FileSystem API?
window.requestFileSystem = window.requestFileSystem || // Chrome
window.webkitRequestFileSystem; // Others
Related
I set up the live example of the Revit Design Check on my Autodesk Hub.
Link Here: https://revitdesigncheck.herokuapp.com/
After uploading the example model, it never created an issue.
does the live example still work? Or has the older api used in the live example been deprecated? Thanks.
That was indeed a problem, wrong Activity name (probably from old deploy), thanks for bringing this up. It's now fixed, and it created the issue as expected (see image)
I have a working Electron app which I wrote about two years ago. I'm not an employee of a company, but just some guy that wrote an app that a few people use to make the world a better place. Anyway, I need to make some changes to the app but my computer crashed a while back so I downloaded my old code from Github onto my new computer and started to get to work. But immediately I found the app wouldn't work in the new 17.0.0 version of electron because the REMOTE module in Electron was deprecated and then removed in previous versions. I tried to follow the instructions here... https://www.npmjs.com/package/#electron/remote?activeTab=readme to replace REMOTE with the new #electron/remote module. I've had several problems, my most recent is:
JavaScript Error: Uncaught Exception: TypeError BrowserWindow is not a constuctor at app.createWindows (C:...\main.js:89:17).
I use the remote functionality (properties?) over 50 times in my app, including .dialogue, .getGlobal, .getCurrentWindow, and .BrowserWindow.getAllWindows
I'm not including my code here because I'm not really looking for a a coding solution (unless that's the easy/best/only thing I should do and you can give me a solution from the information I've written) but more general advice on what direction I should go to solve this problem. I'm a good programmer in a language that is not Electron, or JavaScript, or NodeJS! So, with the right instruction I can get by, but please be easy on me. (For example I get lost in the instructions for #electron/remote around the API Reference section.) Thanks for any help you can provide.
Mike
Some big changes have been made to Electron over the past couple of years, especially with the use of remote. I would hate to say it but it looks like you are in for a bit of work to get it operational again.
You will want to look at ipcMain, ipcRender and contextBridge.
The inclusion of webPreferences: {preload: ""} in your new BrowserWindow() method plus the use of the above Electron methods will place you in a good starting position for safe, quick, thread seperated code.
See Context Isolation and Inter-Process Communication for more info.
PS: If you need a quick bit of code to get you going / give you an idea then let me know.
I'm trying to migrate a project from HybridAuth 2.xx to 3.00, and I'm facing an issue with the following call to "Hybrid_Endpoint":
require_once( "Hybrid/Auth.php" );
require_once( "Hybrid/Endpoint.php" );
Hybrid_Endpoint::process();
I haven't seen that too much in the 2.xx documentation, but it appears quite a lot in many examples on the web, as well as in the code I try to migrate.
Apparently, in my code, there's either a login or process (the first calls authenticate(...) and the second process(...)
Should I just comment that part ? Not clear from the migration guide!
Thanks for any help !
I managed to find the answer by trial and error. The short answer, it's not needed anymore - the "process" method is now integrated in the authenticate() method (which now serves two purposes: redirect and process), as described in the examples: https://github.com/hybridauth/hybridauth/tree/master/examples
I am trying to use Swagger UI to document our node.js API, so I went to http://swagger.io/docs/, down to Swagger UI Documentation -> Usage, to find this
Now, this is not the only place that provides these instructions, there are dozens of blogs & tutorials saying the same thing, so that's exactly what I did.
Cloned the repo, went into /dist/ and ran the /dist/index.html and all I get is an empty page with an error:
I'm slowly going crazy now as I can't find anything about it and literally every place I looked just has the same, copied, instructions with nothing else provided (like what could go wrong? you just open a file...)
Any help or explanations are much appreciated!
P.S. for some reason opening the /public/index.html works (mentioned nowhere on the www)
I think this is bug in new version of swagger-UI. This is fresh release and they are still modifying and fixing bugs.
Look here: Swagger-ui cannot access JS scripts. This seems to be similar problem, maybe it will help you.
For some time we are able to declare behaviour callback using -callback attribute instead of behaviour_info/1 (which in my opinion is more convenient). But, the edoc application seems to be unable to discover such attribute. Still, release notes suggested, that this issue was already fixed in version 0.7.10 (http://www.erlang.org/doc/apps/edoc/notes.html). Did anyone encounter similar problem and was able to overcome it?
I think the open issue 3211 is talking about a similar issue.
There is a comment mentioning that commit 715bb80 enables edocs to identify callbacks, but I am also seeing this functionality in the brod project -- hexdocs.