Code Comments
Programming Forum and web based access to our favorite programming groups.1) Is it possible to shut down and restart the JPL engine (in order to clear the database) without closing the application which is currently using it? I've tried without success JPL.halt()... 2) Is it possible to catch the Prolog output produced by JPL and pass it to the application (in order to create, for instance, a log window) ? Thanks in advance!
Post Follow-up to this messageOn 2005-04-16, Eddie Jobson <mirrormaze@inwind.it> wrote: > 1) Is it possible to shut down and restart the JPL engine (in order to > clear the database) without closing the application which is currently > using it? I've tried without success JPL.halt()... The C-interface defines PL_cleanup(). It is generally slow and cooperation with many (foreign) library is incomplete. For JPL it would also destroy the JPL interface :-) Why not simply use retractall/1 to delete data you no longer want? > 2) Is it possible to catch the Prolog output produced by JPL and pass > it to the application (in order to create, for instance, a log window) Not through JPL as far as I know. SWI-Prolog streams can be associated to arbitrary objects, which is used by XPCE to bind them to various objects that handle text. To get this in JPL, I guess JPL has to be extended to deal with SWI-Prolog streams. Alternatively, use the print_message/2 for printing messages (all Prolog messages are printed this way) and define message_hook/3 to redirect them to a window. Cheers --- Jan
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.