VSC Form Designer having problems with Demos

I cycled through the demos with my fresh installed Web Coe for VSC and experience problems with the form designer. Every now and then, an error message says that a property doesn't exist, like so:

Then, when clicking a couple of times on OK of the error message, the designer freaks out and presents a Sentry error report, like this:

The only way to get rid of the black error message box is by clicking on X.

In addition to that, in some cases a controls bindings to event handlers get lost. This e.g. in particular in the Upload Basic demo. After clicking away the above error messages, in the very moment you click on the file picker control, the file picker loses all event bindings (and maybe properties as well, didn't check that). In the dfm, the control then also appears "naked" (no event bindings).

Now, in this situation, adding the existing event handlers back using the object inspector is possible as normal, BUT, when double-clicking in an event for which no event handler has already previously been created, the view switches to the pas file as normal and for a fraction of a second shows the newly created event handler stub, but this stub then disappears immediately without any user interaction whatsoever, just as if something hit "compile" which makes an empty event handler disappear.

Is this just my installation?

Hope I could make myself clear...

Edit: I found out that the Upload demo is now in a state in which I cannot add additional event handlers to any control by means of double clicking on any empty event in the object inspector. At this point, further development of this app would now be impossible (at least via the designer).

Is this the demo you open from:
C:\Users\USERNAME.vscode\extensions\tmssoftware.tmswebcore-1.2.4095\resources\WebCoreDemos\Basics\Formhosting

as this is very strange that you have an issue with a property HeightPercent while the DFM for this demo does not even have any HeightPercent property persisted. Do you see the property HeightPercent for controls shown in the object inspector?

I do seem to have HeightPercent properties in the VSC demos. Pictures below from FormInheritance and FormHosting VSC demos.

But anyways, shouldn't Web Core projects be interchangeable between Delphi and VSC? I started with Delphi as you know and now after what you say wonder if I can painlessly convert my business app I'm working on under Delphi to VSC? I didn't try yet...

Hi, I can confirm that there are these kind of issues. We also have started a larger project with the Delphi Version and moved to VSC. In some cases, once we change a form with the VSC Form Designer, additional properties are stored to the dfm which haven't been there initially and haven't been touched in the form designer (kind of the form designer having different default values for some components but I haven't looked into it). Also the order of properties in which the objects are serialized to the dfm is different from the Delphi version (which is ok, but initially causes a lot of changes in a diff view in git on the commit of the first change of an existing form).
Also sometimes whitespaces are appended to the end of a forms pas file sometimes.
I also have seen resetted event handlers but think this only happened when switching between dfm and design view.
Meanwhile we're moving to an html first (template) based approach which works better with the VSC Version

Hello,
Yes, there could be some differences in the way components are streamed to a DFM because in Delphi you have Pascal wrappers, and in VSC you have the actual TMS WEB Core javascript control. We are working to minimize those differences, so thanks for the notice. Regarding HeightPercent error, if you find a series of steps that we could reproduce the issue, we will try to fix it. Opening the same demo you are opening is working fine for us, so there should be a problem somewhere else, so any additional feedback you send us would be really helpful, thanks!

Hello Jose,

steps to reproduce the HeightPercent issue is easy. I just did a first time install of TMS Web Core for VSC and loaded the demos into VSC and hit Ctrl-F12. That's all. Just as a side info: I also have Delphi 2009 and Delphi Sydney and Web Core for Sydney on the same machine. The goal was to investigate if VSC might be the better platform than Delphi with respect to development of Web Core Apps, because Delphi CodeInsight/LSP in conjunction with Web Core is basically totally broken and makes fluent development a pita...

Please also have an eye on the second problem I reported in post #1 where I am unable to add further event handlers. Quote:

[..] when double-clicking in an event for which no event handler has already previously been created, the view switches to the pas file as normal and for a fraction of a second shows the newly created event handler stub, but this stub then disappears immediately without any user interaction whatsoever, just as if something hit "compile" which makes an empty event handler disappear.
[..]
I found out that the Upload demo is now in a state in which I cannot add additional event handlers to any control by means of double clicking on any empty event in the object inspector. At this point, further development of this app would now be impossible (at least via the designer).

This currently blocks any further usage of Web Core for VSC, so we have to continue with Delphi until this is fixed.

Will try to reproduce the issue with HeightPercent.

Regarding the event problem, you should have AutoSave enabled. In Delphi and VSC, when you save a form, if an event handler is empty, it gets deleted, so that should be your issue.

Oh, I see, what an unexpected bad trap!

We use VSC also for backend programming in PHP and C for the same project on the same machine and we really like the AutoSave feature of VSC and I definitely would like to also use AutoSave when doing Web Core coding. For me, the cleanup of empty handlers should only be kicked off when launching the compiler. This would also much more reflect the usual behaviour of Delphi. To me, this autosave-kills-empty-handlers is definitely not a feature but a bug. It is simply not feasible to always switch AutoSave on and off when switching between sources of different languages within VSC.

Yes, I understand, RAD Studio works that way and our goal is to provide a familiar environment for existing developers. You can, however, disable that option for the current workspace, that is, for your TMS WEB Core project, and that won't affect your PHP or C projects. In any case, we take the suggestion and we could add an option to change the behavior of deleting empty events, like: disabled, when saving, when compiling. Regards.

To expand my previous reply, change the tab on Settings from User to Workspace, and the settings you change, will only apply to that specific workspace, not to the global settings, nor to other workspaces:
image

Thank you very much for this hint regarding AutoSave! There is still a learning curve with all that many VSC features...
And to add an option regarding empty handlers deletion is for sure a good idea. Thank you for taking this into consideration.