Search found 284 matches

by Harrison Pratt
19 Nov 2019 22:39
Forum: Visual Prolog
Topic: Rename File
Replies: 4
Views: 1102

Re: Rename File

setName/2 only changes a string containing a fully qualified file name. It doesn't do anything to a file.

It belongs to the same family of functions as setPath/2and setExtension/2.
by Harrison Pratt
12 Nov 2019 12:54
Forum: Visual Prolog
Topic: Variables display in the debugger - drops leading string character
Replies: 3
Views: 207

Re: Variables display in the debugger - drops leading string character

Good to know.
Has the "Go to usage" hot key (Shift-Ctrl-Alt-F) been fixed in Vip 9 as well?
by Harrison Pratt
11 Nov 2019 18:02
Forum: Visual Prolog
Topic: Variables display in the debugger - drops leading string character
Replies: 3
Views: 207

Variables display in the debugger - drops leading string character

In VIP 8.02 when debugging a console application: Put the code below into main.pro. Note what happens to the display of string S1 in the Variables window when running the application in the debugger. String is handled OK but displayed is ablated in some circumstances. run() :- S1 = "A1", % Variables...
by Harrison Pratt
5 Nov 2019 23:38
Forum: Visual Prolog
Topic: ListViewControl Right Click quirk
Replies: 4
Views: 349

Re: ListViewControl Right Click quirk

That's better! I assume that the updates will be in the next update of VP 9.x and I should patch VP 8.02 myself or shadow the predicate. "... hitTest will also fail for points that are to right of the right most column" is expected behavior, and it looks like hitTest/3 also will fail if the point is...
by Harrison Pratt
5 Nov 2019 13:54
Forum: Visual Prolog
Topic: ListViewControl Right Click quirk
Replies: 4
Views: 349

Re: ListViewControl Right Click quirk

Thanks for the deeper-dive into this quirk.
It took a while for me to sort out this unexpected behavior.
Using a code equivalent of my tryGetTextClickRt/2 for both left and right-click text retrieval should work well.
by Harrison Pratt
3 Nov 2019 13:20
Forum: Visual Prolog
Topic: ListViewControl Right Click quirk
Replies: 4
Views: 349

ListViewControl Right Click quirk

I ran across this quirk when trying to implement a right-click function in a ListviewControl -- unlike Left-clicking, Right-clicking on a column label is responded to as though the first data Item row were clicked. It is possible to work around that behavior by testing to see if the PNT clicked is i...
by Harrison Pratt
26 Oct 2019 18:04
Forum: Visual Prolog
Topic: Compiling error
Replies: 8
Views: 501

Re: Compiling error

Besides the wiki, a good way to search for built-in VIP predicates is using the the IDE project tree explorer. In your project explorer expand the $(ProDir) directory and then expand the pfc directory. You will find many support classes there. Expand any of those that seem relevant (e.g., the string...
by Harrison Pratt
26 Oct 2019 15:58
Forum: Visual Prolog
Topic: Compiling error
Replies: 8
Views: 501

Re: Compiling error

(1) Try double-clicking on onMessagesGetstring to highlight it and then scroll up and down in the file to see if you have some other predicate's clauses between the onMessagesGetstring clauses. Perhaps you have another attempt at writing onMessagesGetstring that you forgot to delete or comment out. ...
by Harrison Pratt
23 Oct 2019 11:25
Forum: Visual Prolog
Topic: Reading hexadecimal from utf8 files
Replies: 9
Views: 522

Re: Reading hexadecimal from utf8 files

Do you need to actually process the initial bytes in your application or just know what is the file format? Have you looked at inputStream_file::openFileBom/2 ( or openFileBom/1 ) openFileBom : ( string Filename, fileSystem_api::accessPermit Access). Opens a file and sets its mode based on the prese...
by Harrison Pratt
18 Oct 2019 11:33
Forum: Visual Prolog
Topic: Progress Bar status indicator
Replies: 37
Views: 1643

Re: Progress Bar status indicator

Calling vpiProcessEvents/0 frequently in a long operation does slow down the operation significantly, but it may be worth it to display messages quickly enough to be useful. I have used a counter and called vpiProcessEvents/0 every "Nth" time to minimize unnecessary overhead. Would invalidating the ...
by Harrison Pratt
8 Oct 2019 11:16
Forum: Visual Prolog
Topic: List unification problem
Replies: 6
Views: 744

Re: List unification problem

This behaves similarly in VP 8.02
by Harrison Pratt
26 Aug 2019 11:56
Forum: Visual Prolog
Topic: Convert integer to hexadecimal
Replies: 4
Views: 1062

Re: Convert integer to hexadecimal

string::format

Code: Select all

% Try this:         R = 12,         S = string::format("%1x", R),         stdio::write("\n", R, "\t", S), % S = "C"                
by Harrison Pratt
21 Aug 2019 12:25
Forum: Visual Prolog
Topic: Rename File
Replies: 4
Views: 1102

Re: Rename File

See file:: move/2 and file::move/3 move : ( string Filename, string Destination). Moves file to another location. Description The predicate moves(renames) a file specified by Filename to the location, specified by Destination path. If Destination is a new file name, then the file will be moved to a ...
by Harrison Pratt
16 Aug 2019 12:27
Forum: Visual Prolog
Topic: Undeclared Identifier
Replies: 3
Views: 1161

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...