From: Simone.Rapisarda@p10.f800.n33.z2.fidonet.org (Simone Rapisarda)
Newsgroups: comp.sys.hp48
Subject: Finally an enhanced custom menu!
Date: 28 Sep 92 17:07:31 GMT
Organization: FidoNet node 2:33/800.10 - Italy UUCP Gate, Italy

First of all I really would like to know if this message has arrived
somewhere. I will be grateful to any kind person that will let me know.
Thanks.

Now let's talk about serious things. ;)

Some days ago I've sent the latest version of SmartKeys (1.46) to Chris,
so I hope you will find it soon on comp.sources.hp48.

If you don't know about it, SmartKeys is a library whose commands regards
(very generally) the customization of the HP48.

This new release of SmartKeys has many improvements over the latest one
(available only on Goodies Disk #7). I will let you discover about them
by reading the new doc, however I would like to say something about the
latest powerful command that I added to SmartKeys.

Before starting I would like to thank Joe Horn that was the first one
that believed in the SmartKeys project and encouraged me in going on.

NOTE: The following article is not included in the current SmartKeys doc.
      However it could be included in the next release.


Talking about customization, one of the things that I hate more in the HP48
is the fact that an HP48 user cannot create tree-structured menus, s/he is
compelled to use flat menus.

With the advent of the sys-RPL era many utility have been written, first of
all the buggy but useful TDIR by Rick Grevelle.

This kind of programs worked out only a part of the problem. A big part of
the problem was that the tree-structured menus (expecially the big ones)
created by them cannot be (easely) edited and modified.
These are the reasons:

 - Not editable instructions (the misterious 'Externals') are involved.

 - The built-in editor is very slow, expecially for big objects.

 - It's not easy to keep tracks of every '{' and '}' to know exactly where
   you are.

To solve all these problems I've developed the CRCSTM command.

I will not describe here the way CRCSTM works internally and the tricks it
uses, you can unthread it if you want and, if you don't understand something,
please feel free to Email me.

CRCSTM works in a very simple way, maybe that in a first moment you'll not
agree, but, believe me, any difficulty that may arise is to be attributed to
my buggy english and not to the command itself.

CRCSTM stores a 'special' List in the home variable named CST. From now on
you must store your custom menus in the variable named CSTM and no more in
CST, however the custom menu is always accessed by the [CST] key.

The menu list stored in CSTM is handled as a normal menu list except that
all the string used as menu-entries are displayed with a bar over them (the
so called 'dir bar') and treated as if they were pointers to sub-menus.

I'll try to be more clear with an example.

- If you store  { "ABC" "CIAO" }  in CSTM (just put the list on the stack and
  execute CRCSTM) and press CST you will see a menu containing the two
  dir-label [ABC] and [CIAO].

- If you press [ABC] you will see an empty menu, unless in the path exist
  a Global variable named 'ABC' that contains a menu list.

- In the case that the Global 'ABC' doesn't already exist you can store the
  following list in it: { { "CCCP" "CCCP" } "CU" }

- Now, by pressing [CST] and subsequently [ABC] you will see a menu with two
  labels: [CCCP] and [CU]. The first is a normal menu label that echoes the
  string CCCP in the command line. The second is another 'special' label
  that points to another sub-menu.

- This process may never end and your tree-structured menus may grow for
  kilobytes and kilobytes without loosing in readability and editability:
  When you want to edit a sub-sub-...-menu you only need to edit the content
  of the corresponding Global variable.

It's all clear now? I hope so.

Oh, I was about to forget it, another feature of CRCSTM is that it supports
the menus of libraries in a very similar way: Instead of a string you need
to use a Real, the library ID.
But now I've written too much, the SmartKeys doc is waiting for you...

I hope you'll have not to wait much to put your hands on CRCSTM.

If you have questions, comments or suggestions, don't hesitate to Email me.
Probably I won't read the replies on comp.sys.hp48. This not because I'm
not interested in, but because the gateway I'm using loose about 90% of the
messages. :-((

A last thing, as you have surelly noticed my english is really ugly. Please
excuse me and be patient about this fact: I've learned english by reading
this newsgroup. ;)

Ciao

                                                            RAP
--  
 WolfNet BBS Pisa (Italy) Tel. +39-50-589050 300-14.4K Baud Matrix 2:332/602.0
 Simone Rapisarda - via FidoNet node 2:33/800
 UUCP: ...!gear!wolf!800.10!Simone.Rapisarda
 ARPA: Simone.Rapisarda@p10.f800.n33.z2.fidonet.org