Hi peoples,
I am really really new in AI as well as programming. Its seems to be very helpful forum!
I am just wondering whether any one worked on PSP (Prolog server page), very interesting tool to give prolog a graphical interface.
(http://www.benjaminj...te.prolog?t=psp)
I need help in terms of PSP configuration as well your valuable ideas to roll the ball. Perhaps some examples will help!!
On the other hand, I am trying to run an example from XPCE user manual in SWI prolog but I can not get expected result. May be I dont know how to compile and run XPCE sample in SWI prolog.
Below is the code for program I am trying to implement in XPCE
ask_employee :-
new(Dialog, dialog('Define employee')),
send_list(Dialog, append,
[ new(N1, text_item(first_name)),
new(N2, text_item(family_name)),
new(S, new(S, menu(sex))),
new(A, int_item(age, low := 18, high := 65)),
new(D, menu(department, cycle)),
button(cancel, message(Dialog, destroy)),
button(enter, and(message(@prolog,
assert_employee,
N1?selection,
N2?selection,
S?selection,
A?selection,
D?selection),
message(Dialog, destroy)))
]),
send_list(S, append, [male, female]),
send_list(D, append, [research, development, marketing]),
send(Dialog, default_button, enter),
send(Dialog, open).
assert_employee(FirstName, FamilyName, Sex, Age, Depth) :-
format('Adding ~w ~w ~w, age ~w, working at ~w~n',
[ Sex, FirstName, FamilyName, Age, Depth]).
source: User manual of XPCE
could any one please help me by writing steps needs to run this program. Please.
Any help would be greatly appreciated.
Many thanks
PSP (Prolog Server Page) & XPCE
Started by Imorsh, Aug 22 2006 07:31 PM
1 reply to this topic
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











