Search found 287 matches

by Harrison Pratt
19 Jun 2018 13:38
Forum: Visual Prolog
Topic: VIP 7.5 Exception on closing projects
Replies: 4
Views: 4948

Re: VIP 7.5 Exception on closing projects

I tried disabling a variety of programs that monitor directories (CCleaner, GoogleDriveSync, One-Drive, SyncBack) and that didn't help. Since I'm only using 7.5 for maintenance and migration to 8.02 it's not a significant issue. Version 8.x is much more refined and automatic code formatting is a rea...
by Harrison Pratt
15 Jun 2018 13:06
Forum: Visual Prolog
Topic: VIP 7.5 Exception on closing projects
Replies: 4
Views: 4948

VIP 7.5 Exception on closing projects

This has suddenly started happening: when closing a VIP 7.5 project I get two exception dialogs appearing over the VIP IDE project selection dialog. One dialog overlies the other and both have the same information: This indicates that a notify change request has been completed due to closing the han...
by Harrison Pratt
22 May 2018 19:37
Forum: Visual Prolog
Topic: openFileBOM/1 and extra empty strings on readLine()
Replies: 6
Views: 6545

Re: openFileBOM/1 and extra empty strings on readLine()

I understand -- and prefer option #2 rather than tweaking PFC code. Question: what would happen if setCRLFconversion(true) was called in the 2nd clause of checkBOM/0 which is executed when there is no BOM? checkBom() :- setPosition(0), setMode(stream::ansi(threadAnsi)), setCRLFconversion(true). % <=...
by Harrison Pratt
22 May 2018 10:51
Forum: Visual Prolog
Topic: openFileBOM/1 and extra empty strings on readLine()
Replies: 6
Views: 6545

Re: openFileBOM/1 and extra empty strings on readLine()

The test file I used is attached.

I am using VP 802.
by Harrison Pratt
21 May 2018 20:48
Forum: Visual Prolog
Topic: openFileBOM/1 and extra empty strings on readLine()
Replies: 6
Views: 6545

openFileBOM/1 and extra empty strings on readLine()

From the documentation, I expect openFileBOM/1 should behave the same as openFile8/1. However, when reading a simple text file with no byte-order marks successive readLine() statements return text and an empty string when the file is opened with openFileBOM/1. Is this how openFileBOM/1 should behave...
by Harrison Pratt
21 May 2018 15:10
Forum: Visual Prolog
Topic: VIP 8 PE Context-sensitive help (F1) missing
Replies: 12
Views: 8177

Re: VIP 8 PE Context-sensitive help (F1) missing

This problem recurred after I updated to VIP 8.02. As Thomas explained above, changing the properties for HelpTopic.db and HelpTopic64.db files to Read-only restores access to context-sensitive help from the IDE. In my system, these files are here: C:\Program Files (x86)\Visual Prolog 8\appData\ Is ...
by Harrison Pratt
7 May 2018 13:17
Forum: Visual Prolog
Topic: Get Menu check status
Replies: 7
Views: 8502

Re: Get Menu check status

See attached files, cleaned up and better documented.
Apparently one can check/uncheck menu items even if "Checked" is not set in the IDE menu editor.
You should be able to read the Checked status from anywhere in your application, not just the menu event handlers.
by Harrison Pratt
6 May 2018 19:04
Forum: Visual Prolog
Topic: Get Menu check status
Replies: 7
Views: 8502

Re: Get Menu check status

Here's an approach. I haven't fully fleshed it out, but it will get you started. Of course, there is room for improvement and I'm probably missing some built-in predicates that would make it simpler. In a class declaration (.cl) file: predicates getMenuItem : (vpiDomains::menu MenuItemList, vpiDomai...
by Harrison Pratt
6 May 2018 13:41
Forum: Visual Prolog
Topic: Get Menu check status
Replies: 7
Views: 8502

Re: Get Menu check status

Dave, This is how to expose what's going on in the menu structure: predicates onTestChecktest : window::menuItemListener. clauses onTestChecktest(Source, MenuTag) :- M = vpi::menuGet(Source:getVpiWindow()), stdio::write("\n", M), vpi::menuCheck(Source:getVpiWindow(), "CheckTest", b_false), % set/uns...
by Harrison Pratt
22 Apr 2018 12:30
Forum: Visual Prolog
Topic: Remove project files
Replies: 4
Views: 6004

Re: Remove project files

When you Build or Rebuild the project they will disappear from the project tree.
by Harrison Pratt
22 Apr 2018 5:29
Forum: Visual Prolog
Topic: Remove project files
Replies: 4
Views: 6004

Re: Remove project files

If you want to delete some files in a package, but not the entire package, you can open the package directory (Ctrl-E) and delete, rename or move those files. Sometimes when I am making many revisions of a project I will make a temporary package (e.g., itemsToDelete_PACK) and Move the class, interfa...
by Harrison Pratt
20 Apr 2018 22:03
Forum: Visual Prolog
Topic: Change variable value employing expression of same variable
Replies: 5
Views: 6138

Re: Change variable value employing expression of same variable

The essence of prolog and some other functional languages is that variables are immutable, so strictly speaking the answer is "no, you can't do that." However, there are ways to use fact variables or mutable variable classes/objects to achieve the same result. You can find mutable objects here in pf...
by Harrison Pratt
8 Apr 2018 23:08
Forum: Visual Prolog
Topic: compound domains as return values?
Replies: 2
Views: 5169

Re: compound domains as return values?

VIP 7 & 8 forbid naming domains and facts with the same name, unlike VIP 5x. This seems like an annoyance when you are upgrading your code and thinking from 5x, but it will save you debugging time in the future. This sort of approach works: class dateStore : dateStore open core end class dateStore i...