Copying many cds to a stack causes standalone to hang

Jim Ault JimAultWins at yahoo.com
Mon Nov 27 17:42:23 EST 2006


On 11/27/06 1:58 PM, "Steve Denney" <steve.denney at bigpond.com> wrote:

> Hi PL,
> The app is a catalogue where users can view pics of the products & click on
> them to order (amongst other things).
> Currently each product page (card) is kept in a single cd stack file and all
> the pages are copied into one stack at start up. I've now realized it'll be
> better to have collections of product pages (by brand) in fewer stacks with
> many cards.
> I also thought cross brand searching and movement between cds would be made
> easier by having all the cards present in the one open stack. Now I'm
> considering keeping each brand collection in its own stack (i.e. no copying
> of cds - not that I'm not immensely grateful for the effort everyone's put
> in and finding out the true nature of the 'start using' command :) And
> opening and searching each 'brand' stack only as required.
> My feeling is the latter will work just as well (without waiting for
> "Loading catalogues..." on openStack), or (as you point out) having to deal
> with a huge unwieldy stack, especially if I don't bother to encrypt the
> catalogue pages.
> All comments and suggestion most welcome.
>

You should consider some other way of doing the brand differences, view pic,
and searching.  Looks like a lot for Rev to do, but Rev is extremely fast at
this.

For example, 
1 card per brand
using 1 group that behaves like a background that is on all brand cards
name each card with the brand name, then
on preopencard

set the label of btn "brandLogo" to the short name of this card
set icon of btn "brandLogo" to 23009
-- importing a png or jpg  into the stack will result in
--   Rev assigning an ID
set the rect of btn "brandLogo" to <rect>
set the script of btn "brandLogo" to <snippet>
set the text of btn "modelDropDown" to <list of models>
set the label of btn "modelDropDown" to line 1 of <list of models>

put line 1 of fld "hiddenData1" into fld "vizModelNumber"
put line 2 of fld "hiddenData1" into fld "vizPrice"
put line 3 of fld "hiddenData1" into fld "vizInStock"
put line 4 of fld "hiddenData1" into fld "vizShippingCost"
put line 5 of fld "hiddenData1" into fld "vizTaxNotice"
put line 6 to -1 of fld "hiddenData1" into fld "vizDescription"
get  line 1 to 5 of fld "hiddenData1"
replace cr with tab in it
put it into line 1 of fld "vizTableColumn
get  line 1 to 5 of fld "hiddenData2"
replace cr with tab in it
put it into line 2 of fld "vizTableColumn
get  line 1 to 5 of fld "hiddenData3"
replace cr with tab in it
put it into line 3 of fld "vizTableColumn

How many items are you displaying?
If you are doing a catalog, espcially if it needs frequent updating, then
consider using a database such as SQL
How many scripts are you using?
Where are they located?

Jim Ault
Las Vegas





More information about the use-livecode mailing list