Search found 299 matches

by Harrison Pratt
16 Aug 2019 12:27
Forum: Visual Prolog
Topic: Undeclared Identifier
Replies: 3
Views: 51

Re: Undeclared Identifier

"My question is why did the error yesterday refer to the setRect line as setRect/5 when the code today only has 4 arguments?." Sometimes the dialog editor gets out of synch with the .pro file's automatically generated code after deleting some controls. If you get stuck in that error cycle just comme...
by Harrison Pratt
29 Jul 2019 15:52
Forum: Visual Prolog
Topic: DPC_WATCHDOG_VIOLATION [Solved]
Replies: 0
Views: 141

DPC_WATCHDOG_VIOLATION [Solved]

This is a too-long FYI tale of a one-time problem that is solved, but not understood. (VIP 8 Build 802, 32 bit application on Win10/64) PROBLEM: My PC began freezing when compiling a particular application and I had to power-off/on to regain control. It turns out that power cycling may been a mistak...
by Harrison Pratt
25 Jul 2019 20:12
Forum: Visual Prolog
Topic: Compiled clauses
Replies: 10
Views: 393

Re: Compiled clauses

Nothing in VP prevents you from storing your facts in an encrypted form (e.g., as binary structures, scrambled strings, etc.) in an internal database which can be saved and consulted. This thread could have been much shorter had you told us in your original post that your concern was intellectual pr...
by Harrison Pratt
22 Jul 2019 15:01
Forum: Visual Prolog
Topic: Compiled clauses
Replies: 10
Views: 393

Re: Compiled clauses

I have the same experience with 20,000+ facts in a consultable database. Speed optimization of database access via consult/2 should be deferred until it becomes an actual problem to be solved.
by Harrison Pratt
20 Jul 2019 14:43
Forum: Visual Prolog
Topic: Compiled clauses
Replies: 10
Views: 393

Re: Compiled clauses

Rangarajan, In most cases you should not need to resort to binary manipulations to read/write facts from/to disk storage. The consult/2 and save/2 predicates are remarkably fast. And, yes, you can save, for example, one set of database facts in one file, another set in another file and then consult ...
by Harrison Pratt
17 Jul 2019 13:15
Forum: Visual Prolog
Topic: display lines with numbers same length
Replies: 1
Views: 174

Re: display lines with numbers same length

See format in the string class.
by Harrison Pratt
10 May 2019 10:59
Forum: Visual Prolog
Topic: API reference
Replies: 3
Views: 536

Re: API reference

I wonder if this is pertinent to your issue: viewtopic.php?f=2&t=15729#p46710
by Harrison Pratt
1 May 2019 11:56
Forum: Visual Prolog
Topic: onKeyDown and window::defaultKeyDownHandling
Replies: 6
Views: 796

Re: onKeyDown and window::defaultKeyDownHandling

Another approach is to use an edit control and set the Visible property to False. That control will accumulate the keys pressed, so you can either use that "history" or clear the edit control after each key press.
by Harrison Pratt
30 Apr 2019 20:47
Forum: Visual Prolog
Topic: onKeyDown and window::defaultKeyDownHandling
Replies: 6
Views: 796

Re: onKeyDown and window::defaultKeyDownHandling

Controls capture the key actions before the form can act on them. If you delete all controls on the form which might capture a key press (including OK and Cancel buttons) then you can see that the form itself can capture the keystrokes. I haven't worked out how to handle having certain key actions b...
by Harrison Pratt
9 Apr 2019 13:54
Forum: Visual Prolog
Topic: onPaint/3 vs onMouseUp/4 event handling
Replies: 9
Views: 926

Re: onPaint/3 vs onMouseUp/4 event handling

Thomas, thank you very much for looking into this.

I guess at this point it is sufficient to label this behavior "unfathomable" so that I can stop doubting my sanity. :D

Does this misbehavior also occur with VIP-9 ?
by Harrison Pratt
28 Mar 2019 15:22
Forum: Visual Prolog
Topic: onPaint/3 vs onMouseUp/4 event handling
Replies: 9
Views: 926

Re: onPaint/3 vs onMouseUp/4 event handling

Here is a scenario that will raise the above exception with seeming healthy code: Build a 32 bit application with 64 bit IDE: the application executes OK. When I try to run with debugger I get a message asking to switch to 32 bit IDE. I accept the switch to 32 bit IDE. Run application without debugg...
by Harrison Pratt
26 Mar 2019 13:43
Forum: Visual Prolog
Topic: onPaint/3 vs onMouseUp/4 event handling
Replies: 9
Views: 926

Re: onPaint/3 vs onMouseUp/4 event handling

I wonder if there is an inconsistency in building the application because the code below will either always work on one build or always raise an exception in another build. I force recompilation by just inserting a few spaces to the source .PRO file. It seems to occur randomly in 32 & 64 bit compila...
by Harrison Pratt
19 Mar 2019 13:39
Forum: Visual Prolog
Topic: onPaint/3 vs onMouseUp/4 event handling
Replies: 9
Views: 926

Re: onPaint/3 vs onMouseUp/4 event handling

I didn't understand that about onPaint. For testing purposes, the only predicate call in onPaint was processEvents(). My thought was that it would be the last predicate call in onPaint if I were to use in practice. When initially testing using the debugger (VP8, Win32) I noticed that the Source wind...
by Harrison Pratt
18 Mar 2019 20:14
Forum: Visual Prolog
Topic: onPaint/3 vs onMouseUp/4 event handling
Replies: 9
Views: 926

Re: onPaint/3 vs onMouseUp/4 event handling

Hmmm ... there are many things happening in GUI event processing that I don't fully understand yet. :o If I call vpi::processEvents() at the end of the onPaint/3 call and put it after the clientWin_putClipboardBMP(Source) call in onMouseUp/4 like below, the code works OK. ... gfxImageIO::clientWin_p...
by Harrison Pratt
18 Mar 2019 15:29
Forum: Visual Prolog
Topic: onPaint/3 vs onMouseUp/4 event handling
Replies: 9
Views: 926

onPaint/3 vs onMouseUp/4 event handling

I am trying to copy an image of a form's client window to the Windows clipboard. What is the difference in how these two event handlers receive the window handle? (Of course, I wouldn't normally try to get a snapshot of the client window -- that is just there for debugging.) In both predicates Sourc...