Path: utzoo!utgpu!water!watmath!clyde!bellcore!rutgers!gatech!bloom-beacon!bu-cs!dartvax!eleazar.dartmouth.edu!boz
From: boz@eleazar.dartmouth.edu (John Boswell)
Newsgroups: comp.sys.mac.hypercard
Subject: Sequential Number Fields--Easy way??
Message-ID: <9843@dartvax.Dartmouth.EDU>
Date: 17 Aug 88 19:15:13 GMT
Sender: news@dartvax.Dartmouth.EDU
Reply-To: boz@eleazar.dartmouth.edu (John Boswell)
Distribution: comp.sys.mac.hypercard
Organization: Dartmouth College, Hanover, NH
Lines: 22

Hi there.
	I have a slight problem that I hope someone can help me with.  I have
created a stack which I use to keep track of the *many* references I have filed
away in my file cabinet and elsewhere (I'm a chemistry grad student).  Each 
reference has its own card, and is also assigned a unique number which I write
in the corner of the reference.  I then simply file the paper sequencially.  The
system works well, and I like it, however there *must* be an easier way to 
assign that unique reference number.
	Currently, I use a global variable (maxFileNumber) to hold the highest
used number.  When I create a new card, I automatically increment the current
maxFileNumber by one, and put that new number both into the "Reference Number"
field and back into maxFileNumber.  The problem is that all info on maxFile-
Number is lost when I close the stack/ Quit Hypercard.  To get around this,
the stack always opens and closes by going to a "Title" card first.  When the
stack opens, it gets maxFileNumber from a field on this card...When the stack 
closes, it puts maxFilenumber into that field before closing.
	This *works*, but I'd like to know if there is an easier/ more elegant
way of doing this...
	Thanks for any help....

					John Boswell
					boz@eleazar.dartmouth.edu