Do you guys know what's the cause?
The logic for detecting whether an .exe file is FRED or not failed. I'll look into it once I'm done with mod creation since that's more or less a requirement for launch testing.
If I haven't missed anything, I suspect it's currently lacking a bunch of elements before the web-based UI can be completed.
I usually add the required functions/methods whenever I need them. For example, I added the settings related functions when I did the settings screen and I will add more functions while working on the development tab.
It's nice that you're interested in Knossos' JS API but I'm not sure if the things you've been experimenting with are going to be useful.
The first was injecting more than one object through the QtWebChannel in web.py.
I don't think we need more than one object unless it makes sense to seperate the API methods into different namespaces. Renaming fs2mod to knossos makes sense.
Then I provided not only functions, but also object properties, through the JS API:
I'm not sure how that would be useful and I don't think it works with QtWebKit.
Now I feel like trying to wrap UI interactions into Promises, and tasks such as downloads and unpacking into ProgressEvent, then see what comes out of it
(I'm thinking about validation of the user input, error handling directly in the web UI if something fails, nicer JS code, and progress bars integrated with the rest of UI...)
The existing JS interaction is already callback based; you could use Promises by rewriting the call() function in html/js/modlist.js but that would just add more code (unless I misunderstood you).
Error handling rarely happens directly in the JS code since most errors happen in Python code and then are displayed either using a message box or once again in the web UI.
Progress bars for downloading and unpacking are already implemented and the ProgressEvent is completely unrelated to that.
EDIT: @ngld: If I understand correctly, "self.onMyPropChange.emit(self.__myProp)" houldn't be necessary, but somehow notify=onMyPropChange gets ignored. Any idea ?
I don't know since I haven't used PyQt properties before. You have two getters in your example, maybe correcting that helps?
I'm trying to keep the JS API as simple as reasonable since it reduces the chance that (hard to debug) errors related to it occur. Those errors can be especially annoying when QtWebKit is used because it tends to segfault whenever something unexpected happens.