XPCE is SWI-Prolog's native GUI library
Questions tagged [xpce]
45 questions
0
votes
1 answer
Prolog console crashing the moment I run my script
I have being using prolog and have run different programs on the SWI console multiple times but this week I encountered a program where the moment I would run it on the console on my mac as ['Users/......./desktop/tiles']. The console outputs 5…

niconico
- 9
- 2
0
votes
0 answers
Prolog: Unhandled exception: pce(object) `@prolog_warnings/emacs_hit_list' does not exist
I wrote some days ago about a problem with imported_procedures and I was thinking turning off autoloading of libraries.
So I used the command :- set_prolog_flag(autoload, false). and now I receive this error:
Unhandled exception: pce(object)…

Emanuele Papa
- 1
- 3
0
votes
1 answer
Prolog XPCE display predicate
Hi I have program ("expert program") in which user choose few button options and this program search in predicates cars with this checked options. After this I wish to display this one or more predicates in window. This is few line of program.…

didi
- 21
- 3
0
votes
1 answer
How to print function result after pressing a button in XPCE
I am trying to print a function result via pressing a button in XPCE. Here is my code:
/* 11) Max square */
max_square(M, A) :-
findall(P, country(A, P, _, _), L),
write('Max square in thousands km^2: '),
aggregate(max(E), member(E, L),…

coldembrace
- 549
- 8
- 19
0
votes
1 answer
Howto read from a prolog predicate in XPCE
I have the following simple prolog predicate:
tst(In, Out) :- Out = In.
The idea is clear, simply return the same in "Out" as was received in "In". Ok, now I want to include this prolog predicate in a XPCE program. I have created a window and added…

Matthias
- 9,817
- 14
- 66
- 125
0
votes
0 answers
How do you implement a drop down list in prolog?
I am currently implementing a criminal expert system. This system will determine whether someone is a criminal or not.
Is there anyway to implement a drop down list in swi prolog using xpce??

lostForAWHile
- 290
- 3
- 15
0
votes
0 answers
Graphics in SWI-Prolog: sending a location from board to (X,Y)
I'm trying to figure out how to use the "send" graphics predicates,
I'm stuck about how to scan a click from a window, and learn the location on (X,Y) and use it to put an image inside.
I just need to know which parameters are made for it in this…
0
votes
1 answer
XPCE Prolog command causing error in VS2008 C++
Upon loading into a C++ program a Prolog program that contains the command 'send' (xpce graphics), I get error messages of type:
Syntax Error: Operator Expected.
Here is an example command that causes the errors:
send( Dialog, append,…
user285372
0
votes
0 answers
Two different behaviors of the same Prolog code with and without debugging
I am using the latets stable version 6.6.6 64 bit of SWI-Prolog for windows.
The code is following:
start :-
new(Frame, frame('Test')),
send(Frame, open),
send(Frame, append, new(Pic, picture)),
send(Pic, height, 600),
send(Pic,…

Fibo Kowalsky
- 1,198
- 12
- 23
0
votes
1 answer
xpce prolog consult program
in this url http://www.commonkads.uva.nl/frameset-commonkads.html
on tools tab there is an example program in prolog
i download it and consult main_xpce but no window appear to show program
this is a xpce prolog program and must have a window
i have…

dehmovlaei
- 13
- 2
0
votes
2 answers
Prolog XPCE how to get multiple values from text item?
I have a dialog which contains multiple text item elements and a button. How can i
retrieve the values and use them?
new(D, dialog('Add a recipe')),
send(D, append(new(NameItem, text_item('Name')))),
send(D, append(new(InstItem, …

Dizeme
- 59
- 9
0
votes
0 answers
Prolog findall function XPCE
:-consult('external data base.pl').
listaw:-
new(SS, dialog('Rekordy w bazie wiedzy')),
send(SS, display, new(W3,text('some text'))),
new(M,menu(von,cycle)),
findall(B,failure(B,_,_),Y),
send_list(M, append, Y),
…

Przemek
- 71
- 1
- 1
- 4
0
votes
1 answer
Depicting a list of objects in XPCE
I want to make an animation in XPCE, consisting of an arbitrary number of moving circles.
The circles are given in a Prolog list, containing for each circle its coordinates, radius, and colour. Hence, the list looks like this:…

MirrorMan
- 13
- 3
0
votes
1 answer
Prolog XPCE dialog return a list of selections
i have another Problem with Prolog where i cant find a clue how to solve it.
here is my…

Thomas Döring
- 78
- 7
0
votes
1 answer
prolog xpce dynamic list
I have a problem with Prolog and the XPCE cycle menu.
Here is my code:
list:-
new(D,dialog('List')),
send_list(D,append,
[
new(Von,menu(von,cycle)),
new(Zu,menu(zu,cycle)),
new(Ok,button('OK'))
]),
send_list(Von, append,…

Thomas Döring
- 78
- 7