[ALLY] Getting 'elp to work on function inside object Re:
[1/4] from: johnkenyon:ibm at: 8-Sep-2000 4:38
Andrew,
So it can be done. Just needs a modified help command and documentation to
be written for vid and parse (and other dialects).
It does need looking into by Rebol as the built in documentation for all of
the globally bound words is very good. It just needs extending a little.
Any thoughts from anyone else?
cheers,
john
[2/4] from: agem::crosswinds::net at: 8-Sep-2000 13:17
suggesting 1)
a: make object! [ doc: {the docu} x:1 y: 2 ]
a/doc
then some info about how to find (this system/view/vid/vid-faces).
2) browse/only join the-doc #what-you-want of course
the doc has to be written.. hm. wheres my parser and
the /view-doc?!
[Al--Bri--xtra--co--nz] wrote on 8-Sep-2000/22:06:13+12:00
[3/4] from: al:bri:xtra at: 8-Sep-2000 22:06
I'm going Cockney about help. - Andrew Martin. ;-)
john wrote:
> In general though I think there should be a more simple way of accessing
help for words defined in dialects.
Dialect words can be defined nicely inside objects.
>> o: make object! [
[ f: func [
[ "A sample function in a dialect object."
[ arg [word!]
[ ][
[ print mold arg
[ ]
[ ]
>> help o
O is an object of value:
make object! [
f: func [
"A sample function in a dialect object."
arg [word!]
][
print mold arg
]
]
>> help o/f
o/f is a path
Note the above is not helpful! Though understandable when the source for
help is viewed.
>> z: get in o 'f
>> help z
USAGE:
Z arg
DESCRIPTION:
A sample function in a dialect object.
Z is a function value.
ARGUMENTS:
arg -- (Type: word)
Any one want to write up an alteration to 'help, so that it works with
objects and functions in that object as a novice might expect?
Andrew Martin
Mercurial Rebolutionary...
ICQ: 26227169
http://members.xoom.com/AndrewMartin/
[4/4] from: ingo:2b1 at: 20-Sep-2000 13:25
Hi Rebols,
been there, done that, ...
o: make object! [
f: func [
"A sample function in a dialect object."
arg [word!]
][
print mold arg
]
]
>> help o
object with fields:
f (function) A sample function in a dialect ...
>> help o/f
Valid subpath "o/f" is function:
USAGE:
OBJ arg
DESCRIPTION:
A sample function in a dialect object.
OBJ is a function value.
ARGUMENTS:
arg -- (Type: word)
The script can be found at:
http://www.2b1.de/Rebol/patches.r
(there are also patches to the email system,
so rebol uses real names)
To see the list of scripts there:
http://www.2b1.de/Rebol/index.html
regards,
Ingo
Once upon a time [Al--Bri--xtra--co--nz] spoketh thus:
> I'm going Cockney about help. - Andrew Martin. ;-)
> john wrote:
<<quoted lines omitted: 34>>
> Any one want to write up an alteration to 'help, so that it works with
> objects and functions in that object as a novice might expect?
See above ...
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted