[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: TextEditor CLineInfo and _TextEditor_State seems wrong
[Thread Prev] | [Thread Next]
- Subject: Re: TextEditor CLineInfo and _TextEditor_State seems wrong
- From: Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
- Date: Sun, 1 Nov 2026 19:11:11 +0100
- To: user@xxxxxxxxxxxxxxxxxxxxxx
Le 01/11/2026 à 11:02, Bruce Steers a écrit :
I just noticed what might be an issue... If you look at _TextEditor_State.classhttps://gitlab.com/gambas/gambas/-/blob/master/comp/src/ gb.form.editor/.src/_TextEditor_State.class?ref_type=heads <https:// gitlab.com/gambas/gambas/-/blob/master/comp/src/gb.form.editor/.src/ _TextEditor_State.class?ref_type=heads>Then check out CLineInfo.classhttps://gitlab.com/gambas/gambas/-/blob/master/comp/src/ gb.form.editor/.src/CLineInfo.class?ref_type=heads <https://gitlab.com/ gambas/gambas/-/blob/master/comp/src/gb.form.editor/.src/ CLineInfo.class?ref_type=heads>the State class looks like this... Public _State As CLineInfo '' Return the initial highlighting state value. Property Read State As Short '' Return the initial highlighting tag value. Property Read Tag As Short Private Function State_Read() As Short If _State Then Return _State.State Else Return 0 Endif End Private Function Tag_Read() As Short If _State Then Return _State.Tag End But looking at CLineInfo.class it has neither a Tag property or State It has GetState() method but no Tag property. Does it need fixing ? ;) Respects BruceS
Indeed. The _TextEditor_State is not used anymore, just by the deprecated _TextEditor_Line.InitialState property that now returns nothing.
Everything could be rewritten using the new highlighting state (an array of imbricated specific states), but the InitialState property is actually useless, so just returning 0 is State_Read() should be enough to fix.
We can't remove the properties because of backward compatibility. We just let them do nothing.
Regards, -- Benoît Minisini.
| TextEditor CLineInfo and _TextEditor_State seems wrong | Bruce Steers <bsteers4@xxxxxxxxx> |