Wiki Visual Prolog Tutorial- Error message
Posted: 1 Feb 2015 17:31
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:
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
Code: Select all
class ancestorDialog : ancestorDialog
open core, vpiDomains
% Code added by me copied from Fundamental Visual prolog Tutorial for family example
domains
optionalString = none(); one(string Value).
class facts
name : optionalString := none().
clauses
tryGetName(Parent) = Name :-
name := none(),
_ = ancestorDialog::display(Parent),
one(Name) = name.
%end of the code added by me
predicates
display : (window Parent) -> ancestorDialog AncestorDialog.
constructors
new : (window Parent).
end class ancestorDialog
1- The section qualifier "class" is not allowed here
2-The section "facts" is not allowed here