Discussions related to Visual Prolog
Gass
Posts: 16
Joined: 17 Aug 2017 8:51

editorControl

Unread post 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
User avatar
Thomas Linder Puls
VIP Member
Posts: 1398
Joined: 28 Feb 2000 0:01

Unread post 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.
Regards Thomas Linder Puls
PDC
Gass
Posts: 16
Joined: 17 Aug 2017 8:51

EditorControl

Unread post 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
User avatar
Thomas Linder Puls
VIP Member
Posts: 1398
Joined: 28 Feb 2000 0:01

Unread post 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             }).
Regards Thomas Linder Puls
PDC
Gass
Posts: 16
Joined: 17 Aug 2017 8:51

editorControl

Unread post by Gass »

that's right , thank you very much
Post Reply