[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Gambas script capabilities
[Thread Prev] | [Thread Next]
- Subject: Re: Gambas script capabilities
- From: Bruce Steers <bsteers4@xxxxxxxxx>
- Date: Sat, 10 Oct 2026 15:48:23 +0100
- Cc: Gambas Mailing List <user@xxxxxxxxxxxxxxxxxxxxxx>
On Sat, 10 Oct 2026 at 14:34, olivier.cruilles <olivier.cruilles@xxxxxxxx> wrote: > Hi, > I found the problem. > 1. I load the orignal script (script .gbs generated by gbs3 > --convert-project <path to gambas projet>) (size 822 Bytes) in a TextEditor > 2. I enable the TextEditor1.Highlight = "gambas" and that change the > structure of the original text in the TextEditor. It's clearly mentioned in > the documentation of Gambas ( > https://gambaswiki.org/wiki/comp/gb.form.editor/texteditor/highlight) > 3. I save the Text of the TextEditor using File.Save() or TextEdit1.Save() > but the highlighted text is saved (size 849 Bytes), and that break the > script. > > If I do the same procedure without enabling the TextEditor.Highlight, the > script saved is the same as the original. > > The question now is, how get the raw text from the TextEditor and not the > Highlighted text (modified text), and it is possible ? > > Thank you all with your help > > Olivier > > Olivier Cruilles > it does save the raw text without highlight. The likely problem is the TextEditor.Rewrite property is changing some code that it thinks is invalid. It's probably not aware of some script related structures because it's designed for gambas class files. You could set TextEditor.Rewrite = False , but then it does not correct anything either. Post a copy of a working script that breaks when loading into TextEditor so we can examine the problem ourselves. I've been writing gbs scripts in an editor using TextEditor and gambas highlight for a long time and never had it make a script invalid. Respects BruceS
| Gambas script capabilities | Olivier Cruilles <olivier.cruilles@xxxxxxxx> |
| Re: Gambas script capabilities | Brian G <brian@xxxxxxxxxxxxxxxx> |
| Re: Gambas script capabilities | "olivier.cruilles" <olivier.cruilles@xxxxxxxx> |
| Re: Gambas script capabilities | Bruce Steers <bsteers4@xxxxxxxxx> |
| Re: Gambas script capabilities | "olivier.cruilles" <olivier.cruilles@xxxxxxxx> |