Unable to "Consult" assert(ed) 'time' data type - Exception r306 Unsupported interface 'time'
Posted: 8 Jul 2017 16:48
Hello,
I don't get it. The "time" data type "consult" works normally if I execute the "consult" before terminating the program instance that executes the assert and save to create my disk file.
However, if I restart the program and immediately execute "consult", to retrieve the disk file data, the exception below is thrown:
Exception in module: OneClass.exe
c:\program files (x86)\visual prolog 7.5\pfc\event\event4.pro(42) : error r306: Invalid object conversion from '<unknown>': unsupported interface 'time'
Everything in these scenarios (assert,save,consult) work as expected (including restarting the program and immediately executing a "consult") unless I am using the data type "time".
Note:
I am experimenting with using multiple classes in case that comes into play. Everything above happens in one class ("data") that gets instantiated before any of the failing code executes. Also all of the declarations are in the data class.
** Code snippets **
facts - availableFactDB
testTime : (time).
clauses
assert(testTime(time::new(2017,12,25,9,0,0)))
file::save ("availableFactsDB.dba",availableFactDB)
file::consult("availableFactsDB.dba",availableFactDB)
Any ideas?
Larry
I don't get it. The "time" data type "consult" works normally if I execute the "consult" before terminating the program instance that executes the assert and save to create my disk file.
However, if I restart the program and immediately execute "consult", to retrieve the disk file data, the exception below is thrown:
Exception in module: OneClass.exe
c:\program files (x86)\visual prolog 7.5\pfc\event\event4.pro(42) : error r306: Invalid object conversion from '<unknown>': unsupported interface 'time'
Everything in these scenarios (assert,save,consult) work as expected (including restarting the program and immediately executing a "consult") unless I am using the data type "time".
Note:
I am experimenting with using multiple classes in case that comes into play. Everything above happens in one class ("data") that gets instantiated before any of the failing code executes. Also all of the declarations are in the data class.
** Code snippets **
facts - availableFactDB
testTime : (time).
clauses
assert(testTime(time::new(2017,12,25,9,0,0)))
file::save ("availableFactsDB.dba",availableFactDB)
file::consult("availableFactsDB.dba",availableFactDB)
Any ideas?
Larry