prolog xpce dynamic list

205 Views Asked by At

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, findall(X,city(X),Y)),
send_list(Zu, append, findall(X,city(X),Y)),
send(D,open).

city(berlin).
city(london).
city(paris).
city(rom).

My problem is, that he can use the findall term.

ERROR: findall: Unknown class

But the findall goes well if u use it solo.

1

There are 1 best solutions below

0
On

Prolog is not a functional language.

findall(X,city(X),Y),
send_list(Von, append, Y),

should work