FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log inLog in 


editorControl

Post new topic   Reply to topic    discuss.visual-prolog.com Forum Index -> Visual Prolog
View previous topic :: View next topic  
Author Message
Gass



Metz
Joined: 17 Aug 2017
Posts: 11

PostPosted: 29 Sep 2017 17:15    Post subject: editorControl Reply with quote

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
Back to top
View user's profile Send private message
Thomas Linder Puls



Copenhagen, Denmark
Joined: 28 Feb 2000
Posts: 3124

PostPosted: 30 Sep 2017 12:27    Post subject: Reply with quote

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

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:

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
Prolog Development Center
Back to top
View user's profile Send private message
Gass



Metz
Joined: 17 Aug 2017
Posts: 11

PostPosted: 1 Oct 2017 7:53    Post subject: EditorControl Reply with quote

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
Back to top
View user's profile Send private message
Thomas Linder Puls



Copenhagen, Denmark
Joined: 28 Feb 2000
Posts: 3124

PostPosted: 1 Oct 2017 18:16    Post subject: Reply with quote

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:

clauses
    new(...) :-
        ...
        addShowListener(
            {  :-
                % action to perform when the dialog has been shown
            }).


_________________
Regards Thomas Linder Puls
Prolog Development Center
Back to top
View user's profile Send private message
Gass



Metz
Joined: 17 Aug 2017
Posts: 11

PostPosted: 3 Oct 2017 6:56    Post subject: editorControl Reply with quote

that's right , thank you very much
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    discuss.visual-prolog.com Forum Index -> Visual Prolog All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum