Fix delegate docs
parent
00f586fc33
commit
a472b904eb
|
@ -1,4 +1,4 @@
|
||||||
USING: help.syntax help.markup ;
|
USING: help.syntax help.markup delegate.private ;
|
||||||
IN: delegate
|
IN: delegate
|
||||||
|
|
||||||
HELP: define-protocol
|
HELP: define-protocol
|
||||||
|
@ -8,7 +8,7 @@ HELP: define-protocol
|
||||||
|
|
||||||
HELP: PROTOCOL:
|
HELP: PROTOCOL:
|
||||||
{ $syntax "PROTOCOL: protocol-name words... ;" }
|
{ $syntax "PROTOCOL: protocol-name words... ;" }
|
||||||
{ $description "Defines an explicit protocol, which can be used as a basis for delegation or mimicry." } ;
|
{ $description "Defines an explicit protocol, which can be used as a basis for delegation." } ;
|
||||||
|
|
||||||
{ define-protocol POSTPONE: PROTOCOL: } related-words
|
{ define-protocol POSTPONE: PROTOCOL: } related-words
|
||||||
|
|
||||||
|
@ -22,6 +22,12 @@ HELP: CONSULT:
|
||||||
{ $values { "group" "a protocol, generic word or tuple class" } { "class" "a class" } { "getter" "code to get where the method should be forwarded" } }
|
{ $values { "group" "a protocol, generic word or tuple class" } { "class" "a class" } { "getter" "code to get where the method should be forwarded" } }
|
||||||
{ $description "Defines a class to consult, using the given code, on the generic words contained in the group. This means that, when one of the words in the group is called on an object of this class, the quotation will be called, and then the generic word called again. If the getter is empty, this will cause an infinite loop. Consultation overwrites the existing methods, but others can be defined afterwards." } ;
|
{ $description "Defines a class to consult, using the given code, on the generic words contained in the group. This means that, when one of the words in the group is called on an object of this class, the quotation will be called, and then the generic word called again. If the getter is empty, this will cause an infinite loop. Consultation overwrites the existing methods, but others can be defined afterwards." } ;
|
||||||
|
|
||||||
|
HELP: SLOT-PROTOCOL:
|
||||||
|
{ $syntax "SLOT-PROTOCOL: protocol-name slots... ;" }
|
||||||
|
{ $description "Defines a protocol consisting of reader and writer words for the listen slot names." } ;
|
||||||
|
|
||||||
|
{ define-protocol POSTPONE: PROTOCOL: } related-words
|
||||||
|
|
||||||
{ define-consult POSTPONE: CONSULT: } related-words
|
{ define-consult POSTPONE: CONSULT: } related-words
|
||||||
|
|
||||||
HELP: group-words
|
HELP: group-words
|
||||||
|
@ -40,6 +46,8 @@ $nl
|
||||||
"Defining new protocols:"
|
"Defining new protocols:"
|
||||||
{ $subsection POSTPONE: PROTOCOL: }
|
{ $subsection POSTPONE: PROTOCOL: }
|
||||||
{ $subsection define-protocol }
|
{ $subsection define-protocol }
|
||||||
|
"Defining new protocols consisting of slot accessors:"
|
||||||
|
{ $subsection POSTPONE: SLOT-PROTOCOL: }
|
||||||
"Defining consultation:"
|
"Defining consultation:"
|
||||||
{ $subsection POSTPONE: CONSULT: }
|
{ $subsection POSTPONE: CONSULT: }
|
||||||
{ $subsection define-consult }
|
{ $subsection define-consult }
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
extensions
|
Loading…
Reference in New Issue