i have another Problem with Prolog where i cant find a clue how to solve it.
here is my code
list(Q):-
new(D,dialog('Sehenswuerdigkeiten')),
send_list(D,append,
[
new(Von,menu(von,cycle)),
new(Zu,menu(zu,cycle)),
new(@button,button('Los',message(@prolog,packing,Von?selection,Zu?selection,Q)))
]),
findall(X,sehenwuerdigkeit(X),Y),
send_list(Von, append,Y),
send_list(Zu, append,Y),
send(D,open).
packing(X,Y,Q):-Q=[X,Y].
:-consult('sw.pl'),list(Q).
I need both selections of the cycles to start another function. But prolog cant open the packing operation.
The problem is solved if the dialog gives me Q=[first selection,second selection] back.
Hope you can help me. Im very frustrated about this ...
You should read this page http://www.swi-prolog.org/packages/xpce/UserGuide/modal.html