Search found 290 matches

by Martin Meyer
5 Dec 2019 19:30
Forum: Visual Prolog
Topic: Default for a boolean component
Replies: 0
Views: 26

Default for a boolean component

Hello Thomas, please check this (in build 902) when building next VIP version: domains rec = rec(integer Number, boolean Flag = false). %error c520 : Impossible to determine the type of the term %rec = rec(integer Number, unsigned Flag = 0). clauses run() :- Rec = rec(1), stdIO::write(Rec). With the...
by Martin Meyer
31 Oct 2019 0:21
Forum: Visual Prolog
Topic: Progress Bar status indicator
Replies: 37
Views: 2246

Re: Progress Bar status indicator

The easiest way to solve the synchronization problem is probably to wrap the calls to the dealerForm controls in postAction calls: dealerForm:postAction({ :- dealerForm:state_ctl:setText(StateStr) }), dealerForm:postAction({ :- dealerForm:deck_ctl:setText(DeckStr) }), dealerForm:postAction({ :- deal...
by Martin Meyer
28 Oct 2019 23:47
Forum: Visual Prolog
Topic: Progress Bar status indicator
Replies: 37
Views: 2246

Re: Progress Bar status indicator

I took the critical section out and played a bit. Starting a bunch of dealers, closing a lot, and again starting some... That game did not take long until I got an exception: ===== 2019-10-28 23:22:45 ======================= ---------------------------------------- System exception error code = 1 Ex...
by Martin Meyer
26 Oct 2019 17:45
Forum: Visual Prolog
Topic: Compiling error
Replies: 8
Views: 678

Re: Compiling error

In addition to what Harrison said a look into the Language Reference can help you. It says: ..., all clauses for one predicate/fact (the same name and arity) must be grouped together in one clauses section and without intervening clauses of other predicates/facts. That means, allowed is: class predi...
by Martin Meyer
25 Oct 2019 18:42
Forum: Visual Prolog
Topic: Progress Bar status indicator
Replies: 37
Views: 2246

Re: Progress Bar status indicator

Yes. I have changed the example to use the application windows status line as a load indicator. Now the example displays only a text on the status bar, but that is for what Loffy has asked for. I have tried to use terminate/1 and close/0 to cancel the thread when the formWindow s close button is cli...
by Martin Meyer
23 Oct 2019 22:22
Forum: Visual Prolog
Topic: Progress Bar status indicator
Replies: 37
Views: 2246

Re: Progress Bar status indicator

aah :idea:, thank you again, Thomas! I have modified the example to directly update the progress display. The example has only one kind of formWindow . But a real application could have many kinds of formWindow s and each kind needs to display different controls on the status bar. Thus (as always) i...
by Martin Meyer
21 Oct 2019 18:14
Forum: Visual Prolog
Topic: Progress Bar status indicator
Replies: 37
Views: 2246

Re: Progress Bar status indicator

Thank you Thomas! Now the progressBarControl works on the statusBar in the example. Updating the progress directly from the lengthy operations is of course much better than polling for progress updates. But I do not see how to do it. Simply calling Windows GUI predicates from the lengthy operations ...
by Martin Meyer
20 Oct 2019 19:38
Forum: Visual Prolog
Topic: Progress Bar status indicator
Replies: 37
Views: 2246

Re: Progress Bar status indicator

I have tried to set up an example which follows all of Thomas' advice.

In the example the progressBarControl is working fine in formWindows, but there is a problem with it in the status bar.

Please have a look, Thomas. What is wrong about the example?
by Martin Meyer
18 Oct 2019 8:50
Forum: Visual Prolog
Topic: Using "anyflow" works in "pro" file but seems to need all declared iterations in the "cl" file.
Replies: 2
Views: 694

Re: Using "anyflow" works in "pro" file but seems to need all declared iterations in the "cl" file.

The Language Reference says: The special flow pattern anyflow can be stated only in declarations of local predicates (i.e. in predicate declarations inside the implementation of a class). It means that the exact flow pattern(s) will be evaluated during the compilation. In accordance with the 1st sen...
by Martin Meyer
14 Oct 2019 16:34
Forum: Visual Prolog
Topic: Progress Bar status indicator
Replies: 37
Views: 2246

Re: Progress Bar status indicator

Hit the Post Reply Button as you did before, if necessary login,
and have a look above the message editor box. :D :D :D
by Martin Meyer
13 Oct 2019 21:23
Forum: Visual Prolog
Topic: Compiling error
Replies: 2
Views: 656

Re: Compiling error

The reason of error several classes interfaces and/or namespaces have the same name "main" is that 'empty' projects already contain a class main and you have created a second class having the same name. Class names must be unique however (in each namespace). I think there are two issues about the ex...
by Martin Meyer
13 Oct 2019 16:19
Forum: Visual Prolog
Topic: Progress Bar status indicator
Replies: 37
Views: 2246

Re: Progress Bar status indicator

To put a code grab into the post, click the "Code display" button pic.jpg which will insert a BBCode tag pair template into the text. Then place your code via copy/paste between the tags. When you create a new project, VIP makes a copy of a default project template to start with. For GUI style proje...
by Martin Meyer
12 Oct 2019 23:15
Forum: Visual Prolog
Topic: List unification problem
Replies: 6
Views: 932

Re: List unification problem

An example, which is obscure too, but cannot be de-obscured in same way as you have done above, is: open core class predicates test : (unsigned X). clauses test(X) :- tuple(A, X) = tuple(B, B), % throws errors: Variables "A", "B" are not completely bound stdIO::write(A, ", ", B). clauses run() :- te...
by Martin Meyer
12 Oct 2019 1:50
Forum: Visual Prolog
Topic: Progress Bar status indicator
Replies: 37
Views: 2246

Re: Progress Bar status indicator

I have found an easier solution. In a newly created GUI style project do as follows: Add the declaration for a predicate displayStatus/1 in projectToolbar.cl: class projectToolbar predicates create : (vpiDomains::windowHandle Parent). predicates displayStatus : (string Text). end class projectToolba...
by Martin Meyer
11 Oct 2019 23:02
Forum: Visual Prolog
Topic: List unification problem
Replies: 6
Views: 932

Re: List unification problem

I have tried variations of my prior post , thereby I discovered it. I have even copied the wrong spelling 'unfiable' from there. :oops: Another example of notorious code, where unification has a problem (in build 902), is: open core clauses run() :- A = 1, tuple(tuple(A, A), tuple(B, B)) = tuple(B, ...