Discussions related to Visual Prolog
- Posts: 22
- Joined: 23 Nov 2014 20:41
At the end of an excellent step-by-step Fundamental Visual Prolog GUI
tutorial, there is an instruction how to make tryGetName predicate global by adding certain codes to ancestorDialog.cl. After addition, of the suggested lines the codes looks like:
Code: Select all
class ancestorDialog : ancestorDialog
open core, vpiDomains
% Code added by me copied from Fundamental Visual prolog Tutorial for family example
optionalString = none(); one(string Value).
name : optionalString := none().
tryGetName(Parent) = Name :-
name := none(),
_ = ancestorDialog::display(Parent),
one(Name) = name.
%end of the code added by me
display : (window Parent) -> ancestorDialog AncestorDialog.
new : (window Parent).
end class ancestorDialog
Unfotunatelly when I Build the code, the cursor points to "class facts" and gives following errors:
1- The section qualifier "class" is not allowed here
2-The section "facts" is not allowed here
Thomas Linder Puls
- VIP Member
- Posts: 1632
- Joined: 28 Feb 2000 0:01
It is correct that the declaration must go into ancestorDialog.cl, but the rest of the code have to go into ancestorDialog.pro.
Regards Thomas Linder Puls