This is wonderful!
Now it's a part of my user.r!

>> help system
OBJECT: system

WORDS:
     build      -- (Type: date)
     components -- (Type: block)
     license    -- (Type: string)
     product    -- (Type: word)
     stats      -- (Type: native)
     version    -- (Type: tuple)

SUB-OBJECTS:
     console
     error
     locale
     network
     options
     ports
     schemes
     script
     standard
     user
     view
     words

FUNCTIONS:
    (none)
>> help system/product
PRODUCT is a word of value: View
>> help system/build
BUILD is a date of value: 3-Oct-2000/8:17:56-7:00
>> help system/version
VERSION is a tuple of value: 0.10.38.3.1
>> help system/words
OBJECT: words
** Script Error: != has no value.
** Where: switch/default mold type? get in


At 06:44 PM 10/8/00 +0200, you wrote:
>Hi! 
>
>I've done a little, but usefull IMHO, patch for the 'help command.
>Have you ever try to see the description of a function defined in an object
>using the standart help ? When using objects a lot, you couldn't use the
>auto-doc feature of 'help, because, it wasn't able to go inside an object!
>Until now...;)
>So, i write this patch to 'help to allow object introspection. 'Help on an
>object will return its words, sub-objects and functions. Now, you can do
>things like :
>
>a: make object! [
>    c: func ["print a message"][ print "I'm c in a!" ]
>    b: make object! [
>        d: func ["read a web page" link [url!]][ print read link ]
>        e: 5
>    ]
>]
>       
>help a
>help a/c
>help a/b
>help a/b/d
>help a/b/e
>
>You can even browse the system object with : help system :)
>Try it on your own objects !
>
>The RIP archive is in the attached file. Just save it on your rebol dir
>and type : do %help-arc.rip on the command line. It will decompress the
>archive and create 2 files :
>
>help.r : the patch! (add do %help.r in your user.r!)
>diff-help.html : a 2-colored source code of the patched 'help showing where
>code was added (if someone want to improve the code, it would be easier...;))
>
>Enjoy it!
>
>DocKimbel.
>Attachment Converted: "D:\PROGRAM FILES\EUDORA\NewAttach\help-arc.rip"
>

Reply via email to