Search found 110 matches

by David Snook
18 Mar 2015 4:04
Forum: Visual Prolog
Topic: Coding question
Replies: 13
Views: 3708

It never (i.e. never) makes sense to have a varM in a fact variable, because that is completely equivalent to having the value directly in the fact variable, except that it becomes more complex. Yes, I was getting carried away trying to apply these new routines. (I find it strange that you mix valu...
by David Snook
17 Mar 2015 19:59
Forum: Visual Prolog
Topic: Coding question
Replies: 13
Views: 3708

I'm probably getting carried away now but am looking at applications of the collection library in my code and another question has arisen. The following is a simplified example for the purposes of my question. The predicate "collect_data" creates a column of report data subtotalling by DEPT and endi...
by David Snook
17 Mar 2015 3:00
Forum: Visual Prolog
Topic: Coding question
Replies: 13
Views: 3708

That makes good sense.

Cheers,

David
by David Snook
14 Mar 2015 23:25
Forum: Visual Prolog
Topic: Coding question
Replies: 13
Views: 3708

Thank you Thomas. I'm starting to get a feel for collections now and followed the "keyword recognition" and "text concordance" examples. Just 1 more question regarding collections; if lists and internal databases are collections then it seems that the collections library is another method of handlin...
by David Snook
14 Mar 2015 5:33
Forum: Visual Prolog
Topic: Coding question
Replies: 13
Views: 3708

Thank you Thomas and Peter. The following is simple and clean: LNAMES = [Name || CODE in SLCODES, nameRefDB(CODE, LabelCODE), get_label(LabelCODE, Name)] Having read a little further on this now I'm starting to get a feel for using varM and collections. I have a feeling I could use collections a gre...
by David Snook
13 Mar 2015 5:19
Forum: Visual Prolog
Topic: Coding question
Replies: 13
Views: 3708

Coding question

This is a general question concerning code usage and style. Given: A list of reference numbers - SLCODES An internal database - nameRefDB A temp working internal database - labelDB Predicate to find the relation to each number - get_lable is there a difference in the following coding methods to obta...
by David Snook
29 Jan 2015 0:45
Forum: Visual Prolog
Topic: Minor issue with dialogs
Replies: 12
Views: 4111

I haven't actually been editing forms or dialogs for awhile so had a quick look just now. As you suggested I disabled the AV I'm currently using (Avast) but find it can still happen. In actuality it shouldn't happen in normal practice though. I discovered by random test that if you open a dialog, se...
by David Snook
7 Jan 2015 16:41
Forum: Visual Prolog
Topic: openfile issue
Replies: 11
Views: 3639

Ah now I get it! :idea:

I didn't read the description carefully and wasn't looking at the parameter in

Code: Select all

exception::tryGetExtraInfo
Thank you Thomas.
by David Snook
7 Jan 2015 12:20
Forum: Visual Prolog
Topic: openfile issue
Replies: 11
Views: 3639

Hi Thomas, Thank you but I'm getting quite confused. As far as I can tell the following will catch any and all reasons a file cannot be created or opened if D = exception::tryGetDescriptor(TraceId, fileSystem_api::cannotCreate) then... What I need to do is determine whether the file does not yet exi...
by David Snook
6 Jan 2015 18:38
Forum: Visual Prolog
Topic: openfile issue
Replies: 11
Views: 3639

My description of the problem was somewhat indirect here but the exception routines to get the error code in the "try...catch" routine does not return the correct error at least with the "openfile" function. I apologise if the issue is being looked at but as there was no response I thought this post...
by David Snook
31 Dec 2014 22:11
Forum: Visual Prolog
Topic: openfile issue
Replies: 11
Views: 3639

I created a small example project which demonstrates the problem.

Best wishes for the New Year!

Cheers,

David
by David Snook
31 Dec 2014 13:19
Forum: Visual Prolog
Topic: openfile issue
Replies: 11
Views: 3639

It came to mind that I could test the above by simply sending error code 2 (file not found) to the error handler in the event an exception is raised as in the following: displayPrint(WIN,PAGE) =Y:- retractFactDb(preview_update), try inStream := inputStream_file::openFile8(re_temp_file_name) catch _T...
by David Snook
31 Dec 2014 12:25
Forum: Visual Prolog
Topic: openfile issue
Replies: 11
Views: 3639

Hi Thomas, It turns out there is a change in either the "try...catch" predicate or in the "exception" predicates. In VP 7.4 the openfile routine causes an exception since the file has not yet been created. It's caught by the "try...catch" and getLastError produces error code 2 (file not found) and h...
by David Snook
31 Dec 2014 11:04
Forum: Visual Prolog
Topic: openfile issue
Replies: 11
Views: 3639

Hi Harrison, I remember when I upgraded this particular module from VP 5.2 to VP 7 there was a timing issue as you suggested although I didn't think there would be any significant performance/timing issues between VP 7.4 and VP 7.5 (and it works in 7.4). I've tried some simple timing changes and so ...
by David Snook
29 Dec 2014 21:06
Forum: Visual Prolog
Topic: openfile issue
Replies: 11
Views: 3639

openfile issue

I have another issue which seems to be related to VP 7.5 (I notice in the dump message "definiteUserError = true" and I suspect there may be something simple here). The code where the error occurs is as follows: displayPrint(WIN,PAGE) =Y:- retractFactDb(preview_update), try inStream := inputStream_f...