Subject: Help with help

From: [email-masked]
Date: Fri, 15 Oct 1993 19:33:18 -0700

Conused newbie strikes again!!!

I'm trying to build a help system.

I've read help $help several times, and maybe what I'm looking for is
there, but I can't seem to see it, so here goes.

Currently help-index yields:

Available Help Indices
----------------------
wiz-index      -- Wizard Help Topics (#25)
prog-index     -- Programmer Help Topics (#24)
builtin-index  -- Server Built-in Functions (#30)
core-index     -- Core Utility Help Topics (#23)
gen-index      -- General Help Topics (#61)

full-index     -- EVERYTHING

I'd like it to show my own help object.

Now, in trying to figure out how those strings got there, I've figured out
that each of the help objects has a property (eg. wiz-index) that evaluates
to something like {"*index*", "XXX Help Topics"}

There are now two things I don't understand [at least two things :-)].

--------------
1.
Why does ;#nnn.XXX-index yeild:
#-1:Input to EVAL, line 1:  Property not found
... called from #59:eval_cmd_string (this == #2), line 18
... called from #59:eval (this == #2), line 9

when ;properties(#nnn)[YYY] ---> XXX-index, and
     ;#nnn.(properties(#nnn)[YYY]) ----> {"*index*", "XXX Help Topics"}

In other words, the property name XXX-index does not seem well-behaved.

My own help-object behaves this way; I don't even know why or how, but it
does.  I suspect that the answer to this question will explain how and why
my help-object behaves this way.

----------------
2.
How can I get my help object to show up in the appropriate fashion when the
user types any one of:

 help index
 help
*help full-index
*help my-index

I got the latter two to work, but I'm not sure why they work and the first
two don't.
-- 
--
-- "TANSTAAFL" Rich [email-masked]

---

From: [email-masked] (Erik Ostrom)
Date: Sat, 16 Oct 1993 03:50:45 -0700

> ... called from #59:eval (this == #2), line 9

The simple `object.property' expression doesn't work if the property
name contains a hyphen.  The parser is reading this as "find the value
of the XXX property on #nnn, and then subtract index from that."  You
want

;#nnn.("XXX-index")

> How can I get my help object to show up in the appropriate fashion when the

If there's a readable property on an object in your help db list that
begins with "*index*" and is followed by a one-line description, it
should work fine.  Unless I'm wrong, in which case someone will no
doubt correct me.

>  help

When the "help" command is used with no args, the help system goes
looking for a help topic whose name is the null string.  I'm not sure
how you want your help object to show up in this, but it's just like
any other help text (see `help $help').

--Erik/JF