Page 1 of 1
IDE capitalizes inside EnableJS
Posted: Thu Jul 25, 2024 11:27 am
by plouf
dont know if easy but
if copy from OUTSIDE a javascript code and paste it inside a EnableJS/DisableJS block
IDE capitalizes some keywords like "while" "if"
this makes faulty JS code (js sucks) and sometimes difficult to track
Re: IDE capitalizes inside EnableJS
Posted: Fri Sep 06, 2024 3:07 pm
by Fred
You should always use '!' in front on JS line, I added a note to the doc.
Re: IDE capitalizes inside EnableJS
Posted: Fri Sep 06, 2024 3:11 pm
by plouf
Always?
Isnt EnableJS/DisableJS block
For this exact reason ?
At least after correction they work!
Re: IDE capitalizes inside EnableJS
Posted: Fri Sep 06, 2024 3:22 pm
by Peter
EnableJS/DisableJS is useful if you want to integrate a large JavaScript block as an include ((X)IncludeFile()) in the SB source. However, the prerequisite is that this include should no longer be edited with the SB IDE.
Re: IDE capitalizes inside EnableJS
Posted: Fri Sep 06, 2024 3:23 pm
by Fred
Yes, it's needed as the IDE can't disable autocasing/coloring for these blocks only. It wasn't an issue for ASM code as there is no basic keywords in it but it is an issue with JS and C, so better always put '!' before. As Peter said, using XIncludeFile works if you don't edit the JS file in the IDE.
Re: IDE capitalizes inside EnableJS
Posted: Thu Sep 12, 2024 3:16 pm
by Fred
After a few unsuccessful tries, I finally managed to do something about this limitation, it's available in the 3.01 beta 2, so feel free to test it !
