[comp.sys.mac.programmer] Where is documentation on TMPLs?

rad@genco.uucp (Bob Daniel) (05/25/90)

I am also very interested in TMPL resource info.

jwwalker@usceast.UUCP (Jim Walker) (05/25/90)

A friend pointed out to me that ResEdit itself contains a bunch of TMPL
resources.  From these I was able to guess what most of the 4-letter codes
mean.
-- 

   Jim Walker  jwwalker@usceast.cs.scarolina.edu  76367.2271@compuserve.com

bernard@boulder.Colorado.EDU (Bernie Bernstein) (05/26/90)

Resedit V1.2, Item # M0015LLB from APDA includes a manual.  This
contains a descripton of all of those 4 letter codes and how to write
code to implement your own editors.  I just received mine a few days
ago after the some net people recommended getting it.  Thanks for all
your help.

Bernie


      o,  ,,   ,      | Bernie Bernstein                      | ,    ,,
      L>O/  \,/ \    ,| University of Colorado at boulder     |/ \,,/  \
     O./  '  / . `, / | office: (303) 492-8136                |     / ` \  ,.
    ,/   /  ,      '  | email: bernard@boulder.colorado.edu   | /        ''  \

stoms@castor.ncgia.ucsb.edu (David Stoms) (05/26/90)

In article <6@genco.uucp> rad@genco. (Bob Daniel) writes:
>I am also very interested in TMPL resource info.

I wish Apple would upload the entire ResEdit docs to apple.com but
since they haven't, here's what I could figure out--

DBYT, DWRD, DLNG - decimal byte, word, long
HBYT, HWRD, HLNG - hex b, w, l
HEXD - hex dump of remaining bytes
PSTR - Pascal string (normal 8-bits)
LSTR - long Pascal string (32-bits)
WSTR - 16-bit length Pascal string
ESTR, OSTR - Pascal string padded to even or odd length
CSTR - C string
ECST, OCST - even or odd padded C string
BOOL - boolean (not 1 bit)
BBIT - boolean bit
TNAM - type name (4 char)
CHAR - a single char
RECT - guess
Hnnn - nnn is a hex number < $900; displays nnn bytes in hex

LSTZ
...
LSTE - List Zero - List End. (like MENU's)

ZCNT
LSTC
...
LSTE - Zero Count/List Count - List End (like DITL's)

OCNT
LSTC
...
LSTE - One Count/List Count - List End (like STR#'s)

LSTB
...
LSTE - no examples exist

Josh.

olson@bootsie.UUCP (Eric Olson) (05/27/90)

In article <5507@hub.ucsb.edu> stoms@castor.ncgia.ucsb.edu () writes:
(list of TMPL codes deleted)

I've a bit more info on some of these types.  It is from playing
with TMPLs and some old, old documentation.

(the documentation I have is from the 12/85 Software Supplement!):

FBYT,FWRD
 	Filler byte or word, not settable or viewable when editing the
	resource (see the example in TMPL "MENU").  FLNG apparently
	doesn't exist in ResEdit.

AWRD	I have no idea what this does.  It's in the TMPL "CTY#", the
	map cdev's format for a list of city data.  Anybody know
	what an AWRD is supposed to be?  And if there's an ABYT or ALNG?

OSTR, ESTR
	These types are Pascal Strings, padded to odd or even length
	(including the length byte), not C strings as previously
	described in this group and in the documentation.  The padding
	(a zero) appears at the end of the string if needed, and the
	length byte is not updated to include the padding.

LSTB/LSTE
	An example of this kind of list is the TMPL for TMPL's.  These
	list's lengths are inferred from the length of the resource.

BOOL
	This is a two-byte value, with the lowest bit in the high
	byte set if TRUE (like a Pascal BOOLEAN pushed on the stack).

LSTC, LSTZ
	These are two-byte values.

Hope this helps someone!

-Eric

---

Please note!  olson@bootsie.uucp will not work!  Use an address below:

Eric K. Olson                 Internet:   olson@endor.harvard.edu
Lexington Software Design     Usenet:     harvard!endor!olson
72A Lowell St.                Applelink:  olson@endor.harvard.edu@dasnet#
Lexington, MA  02173          Compuserve: >INTERNET:olson@endor.harvard.edu
(617) 863-9624                Bitnet:     OLSON@HARVARD

jwwalker@usceast.UUCP (Jim Walker) (05/27/90)

In article <20@bootsie.UUCP> olson@bootsie.UUCP (Eric Olson) writes:
>I've a bit more info on some of these types.  It is from playing
>with TMPLs and some old, old documentation.
...
>...FLNG apparently doesn't exist in ResEdit.
Yes, it does.  It's a longword filler, just like you expect.

>AWRD	I have no idea what this does.  It's in the TMPL "CTY#", the
>	map cdev's format for a list of city data.  Anybody know
>	what an AWRD is supposed to be?  And if there's an ABYT or ALNG?
AWRD means "align the next thing on a word boundary".  Seems to, anyway.
There is an ALNG, but ABYT would serve no purpose.

>LSTC, LSTZ
>	These are two-byte values.
More precisely, LSTC is the beginning of a list, which should be preceded
by a (two-byte) ZCNT or OCNT count.  LSTZ starts a list that is terminated
by a zero byte.

These are all guess-and-check deductions, I still don't have any documentation.
-- 

   Jim Walker  jwwalker@usceast.cs.scarolina.edu  76367.2271@compuserve.com