Many Cards Versus One Card and a List Field

Joe Lewis Wilkins pepetoo at cox.net
Wed Jan 16 02:35:06 EST 2008


Peter,

I'm not sure this will work for you, but it worked for me with HC. I  
designed stacks that could be used for printing reports and then  
stored data in those stacks when I needed to print new data; the  
"action" stacks, used to acquire and change/revise new data would  
pick up the data from these stacks on start up, putting it into  
global variables. Then at the end of the day or at the completion of  
the "work" with these variables, they would be redeposited into the  
"reports" stacks for printing.

I realize that this is very general, but perhaps you can see the  
approach and adapt it to your specific set of circumstances.  
Admittedly, I did convert some of these "activities" to XCMDs with  
Compile-It for speed reasons, but that was because I was dealing with  
SE30 Macs at the time. When we got around to using later generation,  
much faster Macs, in several instances I reverted back to the  
original HyperTalk handlers with no noticeable decrease in speed.

With the current machines and memory capacity, this should easily  
work with Rev. Of course one of the reasons I did as I did was  
because HC auto saved stuff, so I needed to keep everything in  
globals; something that was a bit dangerous, but HC was so rock solid  
that it was very, very seldom that we lost anything due to a crash of  
some sort. With Rev that might be a concern. Originally, when we were  
using 400k floppy disks to back-up data, the 2,000+ accounts were  
split into 13 different account stacks. Eventually, once we had hard  
drives and removable cartridges for back-up, they were all assembled  
into a single stack.

Just some thoughts. HTH,

Joe Wilkins

On Jan 15, 2008, at 10:47 PM, Peter Alcibiades wrote:

> I have to admit to not having been able to make Rev work as a  
> storage and
> retrieval language and am getting close to giving up after a couple  
> of weeks
> hard trying.  Its mostly the documentation probably.  It must be  
> possible
> since people on the list are doing it, but there seems no way to  
> find out how
> from the documentation.
>
> The problem is not storage.  Nor is it retrieval.  It is reporting.
>
> Its a childishly simple problem.  There is a file with 15k  
> records.  Tab
> delimited.  Each record has five fields and is of the form:
>
> number  eg 123
> description  eg Pen, Pencil
> price eg 2.00
> category eg AA, AB...
> date eg  12/4/2008, 21/5/2008 (UK style)
>
> We then have 30 fields, which are the combination of a category and  
> a month.
> So for instance we need to look at each record, if and only if it  
> has both AA
> in item 4 and /4/ in item 5,  then add the price item 3 to field  
> AAApril.  If
> and only if it has both AA and /5/ then add it to AAMay, and so on.  6
> months, five categories = 30 fields..
>
> Its a five minute job in a spreadsheet, but its defeated me for a  
> couple of
> weeks now in Rev.
>
> There must be a way of combining switch, break and if-then to do  
> this.    The
> different ways I've tried sometimes go into loops.  Sometimes they
> accumulate, as if case is leading it to retain previous totals and  
> add new
> match totals to them.  Sometimes they put all zeros into the fields.
> Sometimes half the fields go blank when I know there are matches.   
> Sometimes
> it records half of the AAs, or a quarter.   Sometimes it works with  
> some of
> the months, or some of the categories.
>
> What is also deeply discouraging is that even can one get through  
> this, there
> will be the problem of how to make Rev print it in Linux.  This seems
> insuperable.  It doesn't see the installed printers.  Like it  
> doesn't see the
> installed fonts.  No idea why, everything else does.  Maybe going  
> out to the
> shell and using a2p will work?  Maybe a different distro than  
> debian?   But
> this could well be another black hole....
>
> Peter




More information about the use-livecode mailing list