Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[ALLY] Getting 'elp to work on function inside object Re:

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: > > 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?
See above ...