Search found 285 matches

by Harrison Pratt
24 Nov 2019 20:25
Forum: Visual Prolog Tips & Samples
Topic: xyChartDemo - GDIPLUS XY graphing demonstration
Replies: 4
Views: 2710

Re: xyChartDemo - GDIPLUS XY graphing demonstration

Hi Choibakk! I'm glad you found the demo helpful. :D Lucida Sans is installed with Win10 -- I didn't think of setting up the demo for older versions of windows. I'm glad you could fix the problem. My code could be cleaned up and some day I may get around to that ... feel free to 'tune it up' and re-...
by Harrison Pratt
19 Nov 2019 22:39
Forum: Visual Prolog
Topic: Rename File
Replies: 4
Views: 1315

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

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

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

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

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

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

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

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

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

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

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

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

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