From 208a54e08e1839c792e55c67323ec4dda2868781 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Sat, 22 Nov 2008 03:37:46 -0600 Subject: [PATCH] Help for generic words and classes now lists methods --- basis/help/help.factor | 33 +++++++++++++++++++++++++++------ basis/help/markup/markup.factor | 5 +++++ 2 files changed, 32 insertions(+), 6 deletions(-) diff --git a/basis/help/help.factor b/basis/help/help.factor index 2ad7290517..a3e3890687 100644 --- a/basis/help/help.factor +++ b/basis/help/help.factor @@ -58,15 +58,36 @@ M: word article-title append ] if ; -M: word article-content + + +M: generic article-content word-with-methods ; + +M: class article-content word-with-methods ; + M: word article-parent "help-parent" word-prop ; M: word set-article-parent swap "help-parent" set-word-prop ; diff --git a/basis/help/markup/markup.factor b/basis/help/markup/markup.factor index 4cbb06a44e..899cad2404 100644 --- a/basis/help/markup/markup.factor +++ b/basis/help/markup/markup.factor @@ -285,11 +285,16 @@ M: f ($instance) : $see ( element -- ) first [ see ] ($see) ; +: $see-methods ( element -- ) first [ see-methods ] ($see) ; + : $synopsis ( element -- ) first [ synopsis write ] ($see) ; : $definition ( element -- ) "Definition" $heading $see ; +: $methods ( element -- ) + "Methods" $heading $see-methods ; + : $value ( object -- ) "Variable value" $heading "Current value in global namespace:" print-element