So… I had a stressful time finding a serious bug in my Wt application.  Luckily, I was able to narrow the cause down. The crash happened whenever a new user approved the storage service for the first time. And damn it, it was caused by not deferRendering the WApplication after sending a request to Google Drive. At least, the dummy accounts I created to track down this bug didn’t go to waste.

Code Completion feature

I am slowly inching my way through the source code of xmlautocomplete, trying to understand how the code operates. I really learned a lot more about javascript by studying the codes. For one, is the double ternary operator usage. There is the functions that are enclosed in parentheses. This was used to create a private function that hide all its variables inside the scope.

For me, the code is  layered so meticulously, that I had to replicate the example and attach dozens of log inside to understand what is actually going on. Also, I’m a noob in Javascript. Even so, I find CodeMirror to be very powerful (maybe because there are many library functions that I keep discovering). It comes with a defineExtension that actually creates a method to be used in the CodeMirror API.

As my last part of work, I begin to port it over to the code editor. show-hint.js can be used directly, I would need to create my own version is ‘xml-hint.js’ though. This js file will function to process the CodeMirror token obtained and return the results as hints in the code editor.



Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.