Search found 1323 matches

by Thomas Linder Puls
13 Mar 2023 9:03
Forum: Visual Prolog
Topic: Date time and hour
Replies: 5
Views: 152

Re: Date time and hour

Using timers like that is somewhat "old fashioned", it has the disadvantage that it "mixes" all your timers in a single handler. Using tickAction's (and delayCall for one shots) has a more direct handler approach: clauses new() :- applicationWindow::new(), generatedInitialize(), ...
by Thomas Linder Puls
16 Feb 2023 9:29
Forum: Visual Prolog
Topic: Another feature suggestion
Replies: 4
Views: 214

Re: Another feature suggestion

Unfortunately, that dream will not come through. Interfaces define the interface of objects the implementation is written in the implementation. Also recall that though you think of a class and interface together, a single interface can be used for many classes. Likewise a class defines the "in...
by Thomas Linder Puls
16 Feb 2023 9:21
Forum: Visual Prolog Tips & Samples
Topic: PropertyDepot - property code generator and repository
Replies: 6
Views: 333

Re: PropertyDepot - property code generator and repository

Regarding string: I didn't supply a value. I assumed it would work since that worked for integer, etc.
by Thomas Linder Puls
14 Feb 2023 10:53
Forum: Visual Prolog
Topic: Another feature suggestion
Replies: 4
Views: 214

Re: Another feature suggestion

Well, I have two "problems" with this suggestion. First of all it is a strict rule that implementation details are written in the implementation; interfaces only defines the interface. Secondly, the suggested auto code has exactly the same effect as implementing the property with a fact: i...
by Thomas Linder Puls
14 Feb 2023 10:44
Forum: Visual Prolog Tips & Samples
Topic: PropertyDepot - property code generator and repository
Replies: 6
Views: 333

Re: PropertyDepot - property code generator and repository

I think you should use the sciLexer instead of an edit control. So I have update a few files.
Using sciLexer
Using sciLexer
using_sciLexer.png (86.65 KiB) Viewed 146 times
I have problems with string properties.

You should also notice that auto-formatting will write the code differently.
by Thomas Linder Puls
23 Nov 2022 11:01
Forum: Visual Prolog
Topic: SciLexer tab key - line indent vs. tab insert
Replies: 16
Views: 1376

Re: SciLexer tab key - line indent vs. tab insert

In future releases the sciLexer will have these key binding predicates, where the three last ones are new: predicates assignCmdKey : (unsigned KeyDefinition, integer SciCommand). % This assigns the given key definition to a Scintilla command identified by sciCommand. % sciCommand can be any SCI_* co...
by Thomas Linder Puls
23 Nov 2022 10:21
Forum: Visual Prolog
Topic: SciLexer tab key - line indent vs. tab insert
Replies: 16
Views: 1376

Re: SciLexer tab key - line indent vs. tab insert

In the sciLexer itself you can assign sciLexer -built-in actions to keys. But to perform your own custom commands you will need to handle the keypress before it reaches the sciLexer . We have done that in a "hard coded" fashion to deal with the tab mechanism we want(ed). I think it makes s...
by Thomas Linder Puls
15 Nov 2022 12:52
Forum: Visual Prolog
Topic: SciLexer tab key - line indent vs. tab insert
Replies: 16
Views: 1376

Re: SciLexer tab key - line indent vs. tab insert

Sorry, I overlooked some details :oops: .

The second argument of assignCmdKey is a command (sciLexer_native::sci_...) not a key:

Code: Select all

        sciLexer_ctl:assignCmdKey(sciLexerBase::key_tab, sciLexer_native::sci_tab),
by Thomas Linder Puls
15 Nov 2022 12:45
Forum: Visual Prolog
Topic: Incompatible types
Replies: 1
Views: 284

Re: Incompatible types

It is a bug. Actually, this bug turns up over and over in different contexts, but I guess that it will eventually be solved for all contexts. The usual work-around also helps in this case. Redefine your domains like this: domains repDomain{T} = repDomain(arrayM{T} ArM, recoverableState State). And c...
by Thomas Linder Puls
14 Nov 2022 13:54
Forum: Visual Prolog
Topic: Reverting changes on backtracking
Replies: 16
Views: 1378

Re: Reverting changes on backtracking

Also, a few notes on your library: In many ways an interesting data structure. But ... :-) It seems to me that the "more" abstract data type you are "actually" implementing is something like this: interface chain{@Data} predicates insertBefore : (@Data Reference, @Data Data). % p...
by Thomas Linder Puls
14 Nov 2022 11:46
Forum: Visual Prolog
Topic: Reverting changes on backtracking
Replies: 16
Views: 1378

Re: Reverting changes on backtracking

Well, that was a lot. Not sure I fully get everything. Before I go into details, I can tell you the conclusion: you have not changed my view on the matter. Regarding "analysis" in the compiler. Implementing this as a hook into the runtime system instead of making this a first-class languag...
by Thomas Linder Puls
14 Nov 2022 9:30
Forum: Visual Prolog
Topic: SciLexer tab key - line indent vs. tab insert
Replies: 16
Views: 1376

Re: SciLexer tab key - line indent vs. tab insert

Our show predicate for the sciLexer makes the following settings: tabWidth := 4, tabIndents := true, backSpaceUnIndents := true, useTabs := false, If you want to change any of them, you will have to change the settings after show has run: mySciLexer_ctl:addShowListener( { :- mySciLexer_ctltabWidth :...
by Thomas Linder Puls
10 Nov 2022 9:22
Forum: Visual Prolog
Topic: List Construction
Replies: 2
Views: 378

Re: List Construction

We do not have such a syntax. But you can use a list comprehension like this:

Code: Select all

List = [ I || I = std::fromTo(1, 5) ]