Access control idea in the manual
Sat Jan 16 08:11:48 PST 2010 marianomontone@gmail.com
* Access control idea in the manual
diff -rN -u old-gestalt/doc/gestalt.texinfo new-gestalt/doc/gestalt.texinfo
--- old-gestalt/doc/gestalt.texinfo 2014-08-01 00:51:37.000000000 -0700
+++ new-gestalt/doc/gestalt.texinfo 2014-08-01 00:51:37.000000000 -0700
@@ -1583,6 +1583,15 @@
@section Access control
@cindex access control
+@example
+(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