Page 1 of 1
editorControl
Posted: 29 Sep 2017 17:15
by Gass
Hi,
Why did you delete editorControl (replaced by SciLexer) ?? How do I replace:editor_ctl:pasteStr(X) and idem for editor_ctl:getSelection (X,Y) in Project LSF by E Costa for Tyros, please
Thank you for your kindness
Regards
JeanPaul Gass
Posted: 30 Sep 2017 12:27
by Thomas Linder Puls
We have removed the
editorControl because we thought it was too difficult/expensive to maintain and extend with the features we wanted.
My knowledge/memory about the
editorControl is far from complete. But it sounds like this is the replacement for
pasteStr
Code: Select all
predicates
addText : (string Text).
% @short
% Inserts the #Text before the insertion point.
% The current position is set at the end of the inserted text, but it is not scrolled into view.
% @end
The selection goes from the
currentPos to the
anchor, but the properties
selectionStart and
selectionEnd are more likely closer to the predicate you mention:
Code: Select all
properties
currentPos : integer.
% @short
% Gets the current position or sets the current position and creates a selection between the anchor and the current position.
% The caret is not scrolled into view.
% @end
properties
anchor : integer.
% @short
% Gets the current anchor position or sets the anchor position and creates a selection between the anchor position and the current position.
% The caret is not scrolled into view.
% @end
properties
selectionStart : integer.
selectionEnd : integer.
% @short
% The start/end of the selection.
% selectionStart is the smaller of the anchor point and the current position.
% selectionEnd is the larger.
EditorControl
Posted: 1 Oct 2017 7:53
by Gass
Hi,
I have linking my simple project Lsf eduardo Costa with SciLexer but, apparently,I can not use Scilexer symply as remplacement for editorcontrol. I have no new examples with a simple editor to past or add text in it.
In execute an internal error has occured:
Single fact has no value
error code = 329
ExtraInfo = Single fact 'native' from internal database 'sciLexer::sciLexer@objectDB' has no value
singleFactHasNoValue (runtime_exception) in runtime_exception::runtimeExceptionRaiser
Regards
Jean Paul Gass
Posted: 1 Oct 2017 18:16
by Thomas Linder Puls
That error typically arise when a control is used before it is shown. You can delay operations from the construction to the show-time using a show-listener:
Code: Select all
clauses
new(...) :-
...
addShowListener(
{ :-
% action to perform when the dialog has been shown
}).
editorControl
Posted: 3 Oct 2017 6:56
by Gass
that's right , thank you very much