standalone loading script-only stacks

Matt Maier blueback09 at gmail.com
Thu Feb 18 23:58:50 EST 2016


I'm trying to put most of the logic into script-only stacks, so I've got
the first handler in the mainstack. It's supposed to load all those stacks
in the list. The following handlers are the chain it should follow to start
logging.

The log works just fine in the IDE, but it doesn't start in the
standalone...at least not right away. If I start poking at the controls the
log might spontaneously start working for some reason.

The real problem here is that the rest of this startup process is supposed
to create a bunch of graph objects, but they're not appearing in the
standalone. The log just seems to be an easy way to confirm that the
problem must have something to do with the preopenstack and start using
part.

on preOpenStack
   -- load script-only libraries into memory
   set the defaultStack to "HowstrBeta"
   set the itemDelimiter to "/"
   get the effective fileName of this stack
   set the defaultFolder to item 1 to -2 of it
   start using stack "software/quickiator.livecode"
   start using stack "software/grapherrific.livecode"
   start using stack "software/filephile.livecode"
   start using stack "software/mathamagics.livecode"
   start using stack "software/displayerang.livecode"
   start using stack "software/easyJSON.livecode"
   start using stack "software/lazydogpile.livecode"
   setupAsOf3FEB2016 -- lazydogpile
end preOpenStack

on setupAsOf3FEB2016
   -- setup the window
   set the decorations of stack "howstrBeta" to "title"
   --   set the decorations of this stack to empty
   --   set the windowShape of this stack to 2868
   set the windowshape of stack "howstrBeta" to 0
   -- shouldn't be necessary forever, but a good hack for now
   set the foregroundColor of card 1 of stack "Ask Dialog" to "0,220,220"
   set the opaque  of button "Ok" of card 1 of stack "Ask Dialog" to false
   set the opaque  of button "Cancel" of card 1 of stack "Ask Dialog" to
false
   set the foregroundColor of card 1 of stack "Answer Dialog" to "0,220,220"
   set the opaque  of button "Ok" of card 1 of stack "Answer Dialog" to
false
   put empty into sMain
   put empty into sNowDoc
   put empty into sNowItem
   put empty into sPointerTags
   -- initiate development logging
   put "initiate" into xX["write"];    devLog xX
   quickModeSetup sMain,sNowDoc,sNowItem,sPointerTags -- quickiator

on quickModeSetup @pMain, at pNowDoc, at pNowItem, at pPointerTags
      put "on quickModeSetup" into xX["write"];    devLog xX

on devLog pPhase
   -- ! commented out 15DEC2015 cuz logging slows things down a lot
   -- pPhase[write]=append to development log file
   put pPhase["write"] into tWrite
   set the itemDelimiter to "/"
   get the effective fileName of this stack
   set the defaultFolder to item 1 to -2 of it
   put the defaultFolder into tFolder
   --   replace "software" with "logs" in tFolder
   -- ! apparently "this stack" is returning the main stack, not the folder
filephile is in
   put URL ("file:" & tFolder & "/logs/development.txt") into tLog
   if tWrite is "initiate" then
      --      put empty into tLog
      put the long time into tLog
   else
      put tWrite into line (the number of lines of tLog)+1 of tLog
   end if
   put tLog into URL ("file:" & tFolder & "/logs/development.txt")
end devLog



More information about the use-livecode mailing list