Search found 296 matches

by Martin Meyer
21 Oct 2019 18:14
Forum: Visual Prolog
Topic: Progress Bar status indicator
Replies: 27
Views: 405

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: 27
Views: 405

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: 99

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: 27
Views: 405

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: 111

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: 27
Views: 405

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: 242

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: 27
Views: 405

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: 242

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, ...
by Martin Meyer
10 Oct 2019 22:34
Forum: Visual Prolog
Topic: Progress Bar status indicator
Replies: 27
Views: 405

Re: Progress Bar status indicator

...continued from previous post I add a timer listener in the task window: pic6.jpg I insert some code in the onTimer listener which will display the time in the text field of the new toolbar: pic7.jpg In the onShow listener I add a line to start a timer: pic8.jpg I run the project, voilà! pic9.jpg
by Martin Meyer
10 Oct 2019 22:29
Forum: Visual Prolog
Topic: Progress Bar status indicator
Replies: 27
Views: 405

Re: Progress Bar status indicator

"Compile", "Rebuild All", etc. are displaying infos about what is currently going on at the bottom of VIP's main window. Analogously you want to display your own progress infos in a status line at the bottom of the application window. So your question is how to get texts to there. As said I am not v...
by Martin Meyer
9 Oct 2019 13:50
Forum: Visual Prolog
Topic: Progress Bar status indicator
Replies: 27
Views: 405

Re: Progress Bar status indicator

I have no experiences with progress bars. But there is a demo for it named "progress" in the examples (which can be installed by "Help" / "Install Examples...").
by Martin Meyer
7 Oct 2019 17:52
Forum: Visual Prolog
Topic: List unification problem
Replies: 6
Views: 242

List unification problem

Hello Thomas, please have a look at this code. It outputs "not unfiable" (in build 902). class predicates test : (unsigned*, unsigned*). clauses test(As, Bs) :- if [As, [X]] = [[X], Bs] then stdIO::write("unifies") else stdIO::write("not unfiable") end if. clauses run() :- test([1], [1]). P.S. Have ...
by Martin Meyer
14 Sep 2019 18:02
Forum: Visual Prolog
Topic: unsigned64 bit operations
Replies: 1
Views: 430

unsigned64 bit operations

Hello Thomas, updating my code to the new bit operations I came upon a case with an unexpected result (in build 902): open bit class predicates getHighBitMask64_oldStyle : (unsigned64 X) -> unsigned64 Mask. clauses getHighBitMask64_oldStyle(X) = bitAnd(X_7, bitNot(bitRight(X_7, 1))) :- X_1 = bitOr(X...
by Martin Meyer
13 Sep 2019 17:00
Forum: Visual Prolog
Topic: convert unsigned 64
Replies: 5
Views: 541

Re: convert unsigned 64

The result of predicate bit::getLow32of64/1-> has type unsigned . The value of an unsigned can be represented by an integer only if the value does not exceed the limits of the integer type. That is, convert(integer, U32 ) cannot work out when the value of the unsigned U32 is greater than upperBound(...