Access control idea in the manual
Sat Jan 16 16:11:48 UTC 2010
* Access control idea in the manual
diff -rN -u old-gestalt/doc/gestalt.texinfo new-gestalt/doc/gestalt.texinfo
--- old-gestalt/doc/gestalt.texinfo 2016-02-07 08:44:03.381822075 +0000
+++ new-gestalt/doc/gestalt.texinfo 2016-02-07 08:44:03.421821840 +0000
@@ -1583,6 +1583,15 @@
@section Access control
@cindex access control
+(add-component 'button (make-instance 'button :action #'some-action)
+ :when (let ((model (model self)))
+ (df
+ (can-do-some-action model))))
+@end example
+In this case, the @emph{model} library in the @emph{df} form is free, so it is assumed to be a dataflow variable: whenever the model changes the @emph{can-do-some-action} condition is rechecked and the component is enabled or disabled accordingly.
@node Standard widgets
@section Standard widgets
@cindex widgets