I hope these code fragments help you.
The following code is within the
implementation of the class.
The handling of *.frm dialog is usually in the *.pro file.
The facts storing the user input are
global, in other word class facts.
I handle the user's selection from a list box this way.
Code: Select all
class facts - draw_options
compose:(purpose, style).
predicates
getSetting:() ->style determ.
clauses
getSetting()=Setting :-
Width=width_int:getInteger(),
[Type]=type_lbt:getSelectedItems(),
[Rule]=rule_lbt:getSelectedItems(),
Setting=s(Width,Type,Rule).
predicates
onOkClick : button::clickResponder.
clauses
onOkClick(_Source) = button::noAction:-
Setting=getSetting(),
retractall(compose(apply_for,_)),
assertz(compose(apply_for,Setting)).
I have more instances the form which can be distinguished by the fact variable.