Published 2015-05-20 00:00:00

As I wrote last week. I had added full syntax checking to the editor. So it runs a full compile check as you type.
Here's a nice video of it working...

After the initial joy of adding this to code, I soon realized it had a fatal flaw, read on to find out more..


Unfortunately the vala compiler had never really been tested compiling code multiple times. So when I tried it i discovered that it leaked memory on every compile. From my breif email with Florian it apparently related to circular references that are not freed, even applying the tricks from this bug report https://bugzilla.gnome.org/show_bug.cgi?id=712694 did not help.

So for the parsing I had no other option than to spawn of another process to do the parsing and report back the results. Rather than creating another binary to handle the parsing. I decided to incorporate the parsing process into the main builder.

In this way the builder spawns itself with a few command line arguments, indicating which project/target and files to compile.

When the builder is run in this "compile mode" it outputs the results as a json string. Indicating success or failure, along with all the lines that caused errors, warnings or deprecated notices.

The code for spawning a process is based on the code originally in gitlive, which in turn is very similar to the original JavaScript code I wrote in seed. As this vala code was one of my early masterpieces, I thought I would apply some of the knowledge I had gained writing the builder.

The first change was to get rid of the spawn config class. That was a throwback to universal constructors in JavaScript, which do not really suit vala code style. When I sketched out the revised api I initially intended to use signal handlers to handle the complete/finish signal to indicate the spawn process has completed. However using a delegate as the argument for the run method seemed cleaner. This later turned I to be a source of pain.

It appears that vala and glib have a few issues passing delegates around. In the hash that had grown to be the syntax checker. There are c about three layers of methods that are called between the key up signal and the spawn process. This means that the c delegate callback was was de-referenced and segfaulted. I eventually went back to my original design of having signal handlers which was far safer.

From there I could run compiles continually while typing or changing properties. The next step was to work out how to incorporate this new feature into the UI design.

My initial concept was to have a Popover on the footer menu, that popped up and showed you a tree of the different compiler notices (Errors/Warnings and Depreciated warnings). From there you could expand it out and see the file, and work out what to change. As I tried using this, it became clear that the workflow was not really usable. I could not keep the popover up, and find the error location and sort out the fix very easily. So that UI idea got thrown out the window.

My next idea was to make the Gtk Preview Frame into a notebook, where one tab is the Gtk preview and the other is the generated source. This is what the video shows, when you double click on the file or error message in the popup, the popup disappears, the editor loads the UI component, and you can see the Generated source code in the right hand panel. From there clicking on the line (or nearby) it will work out which Tree element that that part of the code corresponds with, highlight that node. (then in turn it grey's out the source code not related to that Node). 

Most of the errors that I fix in the video are depreciated warning relating to Gtk.HBox/VBox, you can see from the video that the property editor on the left, now has knowledge of Enums, and allows you to pick values for the orientation.

There are still some issues with this part of the editor, like the code generator keeps a map of line numbers now, however it sometimes get's the numbers a little off. But the general effect is that it's fast and simple to fix code errors, warning and all other parts of the code.

This improvement has made me consider the next steps for development
  • Editing 'non-UI' files (with the code checker) - I need to work out how to manage these files in the UI, I quite like the ideas that Geany uses, with tabs for File navigation/ open files etc... This combined with the project file list database may be quite intuitive.
  • Code completion, Since the editing component of the signal handlers and 'extra' methods in the wrapped elements have a good knowledge of basic scope (this , _this and this.el etc.) it should be feasible to do quite intelligent auto-completion without a full parser. This also applies to the Roo Web version where it should be able to find out the hints for JavaScript values.
  • Running the build - doing an actual build direct from the system should be quite trivial, as it already does most of the work. - I need to however work out how to handle availabilty of different versions of the same library (eg. libvala-0.24 and libvala-0.26 on the same server, it should only use the latest version..)
  • In line help - this is also something that I original thought of but it's probably the last on the list...

Comments

Great Information
The hilarious moments are very few because life is the name of seriousness. The comical or funny people try their best to make the moments so bright. This work is not easy because you have to utilize your all senses.
#0 - professional writing services ( Link) on 2017-11-10 13:45:30 Delete Comment
wonderful post
When we put a lot of effects in the work, then Every thing is going in perfect way. I respect you effects and now a day I am using best essay writings for personal blog.
#1 - Antony ( Link) on 2017-12-18 14:51:28 Delete Comment
wonderful post
When we put a lot of effects in the work, then Every thing is going in perfect way. I respect you effects and now a day I am using best essay writings for personal blog.
#2 - Francis ( Link) on 2017-12-18 14:59:45 Delete Comment
Great information
I have also found that types of the problem when we are working, This is your article is very helpful to us, I have lots of knowledge from your this post so thanks very much for this helpful information.
#3 - Jhon Smith ( Link) on 2017-12-19 13:51:12 Delete Comment
Thanks for another wonderful
I adore the way you compose and share your corner! Extremely intriguing and distinctive! Keep it coming.
#4 - Voyance par téléphone ( Link) on 2017-12-27 19:47:24 Delete Comment
Assignment Hub
There's nothing more that can be said without seeing the code that is producing the mistake. In case you're getting it from a site page you're seeing that implies they broke it. In the event that you composed the page then you have to backpedal over your code.
#5 - cheap assignments ( Link) on 2018-01-10 15:58:04 Delete Comment
Valentines Day
Other World Holidays in 2018: Valentine's Day 2018 · Father's Day 2018 · Mother's Day 2018 · World Chocolate Day 2018.
#6 - Valentines Day ( Link) on 2018-01-17 12:53:03 Delete Comment
Online Engineering Homework Help
Those who come to read your article will find lots of helpful and informative tips
#7 - kennethmgideon ( Link) on 2018-01-18 18:34:50 Delete Comment
Online Engineering Homework Help
Those who come to read your article will find lots of helpful and informative tips
#8 - kennethmgideon ( Link) on 2018-01-18 18:37:07 Delete Comment
assignment writing help
Such a nice post, keep up the fantastic work
#9 - assignment writing help ( Link) on 2018-01-20 15:25:03 Delete Comment
aadhar card download
Thanks for the great information. Download eaadhar card online.
#10 - aadhar card download ( Link) on 2018-01-24 14:07:32 Delete Comment
Valentines Day 2018 Images
Post very nicely written, and it contains useful facts. I am happy to find your distinguished way of writing the post.
Valentines Day 2018 Images
Post very nicely written, and it contains useful facts. I am happy to find your distinguished way of writing the post.
Happy Valentines Day Images
I like this website so much it's really awesome.I have also gone through your other posts too and they are also very much appreciate able and I'm just waiting for your next update to come as I like all your posts.
#13 - R.K. Saini ( Link) on 2018-01-31 23:50:58 Delete Comment
commandpromptwindows10
nice atical
#14 - brock ( Link) on 2018-02-01 20:01:34 Delete Comment
IPL 2018 Prediction
IPL 2018 Schedules, Time table, Match list IPL 2018 Schedules date time not yet discharged. If you don't mind check following 3 days.
#15 - IPL 2018 Prediction ( Link) on 2018-02-04 22:00:40 Delete Comment
aomaillogin
American Online, shortly AOL is now a division of American Telecom biggie Verizon, but it was equally valued company two decades back. This article is all about the web-based email services provided by AOL, AOL Mail Login. The mail services offered here is often referred as AIM Mail, in which AIM stands for AOL Instant Messenger.
#16 - aomail ( Link) on 2018-03-01 18:52:35 Delete Comment
IPL 2018 Schedule
The two-day mega VIVO IPL 2018 Player Auction finished up in Bengaluru with 169 players topping off the 182 accessible openings
#17 - IPL 2018 Schedule ( Link) on 2018-03-02 17:38:59 Delete Comment
writing services
corporate Article ... made with a very nice, capable of great benefit, easy to understand and know how to penyampean her, tenks.https://essay-reviewer.com/edubirdie-com-review/
#18 - Georgette Harris ( Link) on 2018-03-06 05:52:40 Delete Comment
Sarkari Naukri Exams

Rojgar Results - SarkariExam.com is a job Portal provides details of all Sarkari Naukri , Govt Jobs.
#19 - Sarkari Naukri Exams ( Link) on 2018-03-08 22:35:42 Delete Comment
Answer
https://www.google.com will help you for sure)
#20 - MonaM ( Link) on 2018-04-04 20:04:35 Delete Comment
pan card download soft copy
This is in like way the case if the Skillet card has been lost/stolen/lost. Once the confident has presented the Dish card application, he/she can track its status through the Skillet number.
#22 - pancardstatus1 ( Link) on 2018-04-09 20:27:44 Delete Comment
Bayesian Bootstrap Assignment Help
Thanx for sharing such useful post keep it up :)
Bayesian Bootstrap Assignment Help
Thanx for sharing such useful post keep it up :)
Bayesian Bootstrap Assignment Help
Thanx for sharing such useful post keep it up :)
teeth whitening kit
Therefore, one might be afraid and skeptic if home teeth whitening kits can of a use to them and help in getting their teeth white. We shall take you through the best home teeth whitening kits now and give you choices to select one among of these which best suits your purpose.
#26 - ligexona ( Link) on 2018-04-13 05:35:33 Delete Comment
pan card status
The main role of the Container is to convey a widespread ID to every single money related exchange and to avoid tax avoidance by monitoring fiscal exchanges, particularly those of high-total assets people who can affect the economy
#27 - pan card status ( Link) on 2018-04-17 13:17:39 Delete Comment
pan card download
The card number is normally unmistakably emblazoned on the front of an installment card, and is encoded on the attractive stripe and chip
#28 - pan card download soft copy ( Link) on 2018-04-18 15:05:06 Delete Comment
TSPSC results

Discover Tspsc Results Latest News, Videos and Pictures
on Tspsc Results and see most recent updates, news, data from NDTV.COM.
Investigate more on Tspsc Results.
#29 - TSPSC results ( Link) on 2018-04-18 17:19:21 Delete Comment
pan card download
Skillet is moreover reliably transforming into a mandatory record for opening another money related adjust, another landline telephone affiliation/a phone affiliation, purchase of outside money, bank stores above ₹50,000, purchase and offer of passionate properties, vehicles etc. http://pancardstatus1.page.tl/
#30 - pan card download ( Link) on 2018-04-19 15:34:38 Delete Comment
idm crack torrent download
Useful information.
#31 - idm crack torrent download ( Link) on 2018-04-30 22:50:37 Delete Comment
pan card download soft copy
Thanks for the blog post. It really impressed for the new comers. Keep going.
#32 - pan card download soft copy ( Link) on 2018-05-05 14:30:28 Delete Comment
pan card download soft copy
Thanks for the blog post. It really impressed for the new comers. Keep going.
#33 - pan card download soft copy ( Link) on 2018-05-05 14:34:34 Delete Comment
Great post!
Thank you so much it was really a great sharing. https://insidermac.com/
#34 - insidermac ( Link) on 2018-05-05 17:50:11 Delete Comment
fl studio mac crack 2018
This is a very well written post, my compliments. I’m glad to find your post. Keep sharing this type of stuff.
#35 - fl studio mac crack 2018 ( Link) on 2018-05-18 02:03:52 Delete Comment
Best Stubble Trimmer
Thanks on your marvellous posting! I certainly enjoyed reading it. I will remember to bookmark your blog and will eventually come back from now on. I want to encourage that you continue your great writing, have a nice day!
#36 - Best Stubble Trimmer ( Link) on 2018-05-21 15:21:27 Delete Comment
PPJoystick
The link given For download the PPJoystick driver.
#37 - Ray Vick ( Link) on 2018-05-21 17:07:57 Delete Comment
pan card status
Great dude thanks for sharing the wonderful article. Keep post another important information.
#38 - pan card status ( Link) on 2018-05-25 02:05:16 Delete Comment
Assignment help online
Website is the premier method to introduce your business to the market. I find it good to see that you have done well in maintaining your site. Students not being able to write their academic coursework could opt for our online assignment help and can get comprehensive homework written from us.
#39 - Assignment help ( Link) on 2018-05-25 18:35:10 Delete Comment
cartoon hd,
A Spanish dialect sound track for select projects is available by means of second sound programing.
#40 - cartoon hd ( Link) on 2018-06-12 16:18:47 Delete Comment
asda
Hi buddy, your blog' s design is simple and clean and i like it. Your blog posts about Online Dissertation Help are superb. Please keep them coming. Greets!!
#41 - iqoption ( Link) on 2018-06-17 01:44:08 Delete Comment

Add Your Comment