Page 1 of 1

Wiki Visual Prolog Tutorial- Error message

Posted: 1 Feb 2015 17:31
by Frank
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 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
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

Posted: 1 Feb 2015 18:14
by Thomas Linder Puls
It is correct that the declaration must go into ancestorDialog.cl, but the rest of the code have to go into ancestorDialog.pro.