[Contents]
[Index]
[Help]
[Browse <]
[Browse >]
lister addstem <handle> <stem>
This command adds files to a lister via a stem variable. It is more
powerful than the lister add command and should be used in preference.
The fields of the stem variable are very similar to those returned by a
lister query entry stem command (in fact, you could pass the
result the query directly to an addstem to add an identical entry to
another lister.)
The fields that are used are :-
name - name of entry (no path)
size - file size (bytes)
type - type of entry
protstring - protection bits (ASCII string, eg "rwed")
protect - protection value (number, used if
protstring is not given)
comment - file comment
datestring - creation date and time (ASCII string)
date - number of seconds since 1/1/78 (used
if datestring is not given)
Can be set to 0 for today's date.
filetype - ascii string for file type display
selected - 0 (not selected) or 1 (selected)
version - version number
revision - revision number
verdate - version date string
userdata - user data (value, not a string)
display - custom display string
menu - custom pop-up menu
base - base ID for pop-up menu
Valid entry types are:-
0 device
1 plain directory
-1 plain file
2 directory in assign colour
-2 file in device colour
3 directory in bold (link)
-3 file in bold (link)
4 directory in assign colour and bold
-4 file in device colour and bold
Not all of these fields are required. As a bare minimum you should specify
either the name or the display field.
For example (as a sequence of commands),
+ mynewentry.COMMENT = "This is my comment"
+ mynewentry.NAME = "anewfile.test"
+ mynewentry.TYPE = -1
+ lister addstem 121132636 mynewentry.
The display string allows you to specify a completely custom string to
display for the entry. None of the other information will be displayed if
this string is supplied. The maximum length is 256 characters.
The userdata field allows you to specify your own ID value (or any other
value) to be associated with this entry. Its main usage is with the custom
pop-up menu and custom handlers .
The menu field allows you to specify a stem variable containing custom
items for the pop-up menu that appears when the user presses the right
button on this entry. Its format is the same as for AppIcon pop-up menus:
stem.COUNT - number of entries
stem.BASE - base ID
stem.0 - entry 1
stem.1 - entry 2
etc.
If count is set to 0, right-button pop-ups will be disabled for this file.
If this field is not specified, the default pop-up menu will be displayed.
If you specify "---" as an item, a separator bar will appear. When you
receive a message that the user has selected one of these menu items, the
message will contain the ID of the item. This is the value corresponding to
the item's position in the stem array (eg 0 for item 1, 1 for item 2, etc).
If the base field is specified, the value given for the base will be added
to this ID.
For example (as a sequence of commands),
+ mymenu.0 = "Edit"
+ mymenu.1 = "---"
+ mymenu.2 = "View"
+ mymenu.3 = "Play"
+ mymenu.COUNT = 4
+ mynewentry.COMMENT = "This is my comment"
+ mynewentry.NAME = "anewfile.test"
+ mynewentry.TYPE = -1
+ mynewentry.MENU = mymenu.
+ lister addstem 121132636 mynewentry.
See the Custom Handlers section for more information on the messages
sent.
See also:
lister add
lister remove
Converted on 04 Nov 1998 with RexxDoesAmigaGuide2HTML 2.2 by Michael Ranner.