-> Delphi 12.1 / TMS Web Core 2.9.1.0
Hi !
I looked in the support center's forum about this "await", and do not find suitable solution :
Today, I address you and I can reproduce it fairly easy. (too easy to not have a doubt about my approach ;))
Context : this is my third "serious" try to convert a little vcl project with TMS Web core, this a very great product, and as I'm convinced that It comes mature, but I waited to get "template" feature mature to make new try, because "rich html template" is for me one of the principal arguments to use web core.
So I make a new try, and, as I want to put a second form in my project, I went to the "multiform" to see how I can do it (aside note : Is there a more easy way to open a form ? ;))
-> I reproduce that in my project, and get immediately "await only available in async procedure" error. (even if my new form was definetely include in project)
Note : All my unit is declared inside the projet, no other unit, it is a very small project for instance.
So, I closed all, and I concentrated my effort and your "multiform" demo (wich is works).
I add a new form to it, and I got the error very quickly : Here is the step to reproduce :
Reproduce :
- Close delphi.
- Copy "multiform" directory. (you get a "multiform - copy" or whatever)
- Open Delphi
- open "multiform - copy\TMSWeb_Multiform.dproj" project
- run it, all fine.
- add a TMS Web Form (inside project)
- run, (delphi ask to save unit3.pas, do it) all is fine.
- add a button in unit1 (just the button)
- save and run -> I got "await only available in async procedure"
Sometimes, it pass here, then, add "unit3" to unit1 (in implementation uses, near the existing unit2)
Save it, run, you normally got error.
Weird things is the fact that, after thoses modification, project seems broken and I can't success to go back (remove units, restart delphi and wathever) and make it work gain - pas2js seems lock on this error. When I tryed to dig in a hardore, preprocessort goes wrong with "duplicate" error.
I suspect a "cache" error or something in this kind...
Hope It give you clue.
Vincent