Re: standalone loading script-only stacks
The handlers are incomplete because I only pasted in the parts that led to each other. The rest of the handlers would be long and irrelevant. It looks like the problem is caused by the ask and/or answer dialog. The first few lines where properties of those stacks are set cause the setup handler to error out. Other functions that depend on ask/answer aren't working correctly either. So I got 90% of the app to run by commenting out the lines setting popup properties in the setup. I got the answer popup to appear in the stand-alone by switching a button in the stand-alone application settings. The ask popup is still missing in action. Any ideas how to get those into the stand-alone? On Feb 18, 2016 10:02 PM, "J. Landman Gay"wrote: > On 2/18/2016 10:58 PM, Matt Maier wrote: > >> 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 quickModeSetup handler has no "end" statement so it may not be > compiling correctly. I'm guessing that poking other controls may call > devLog (which does have the right structure) so that's why it works later. > I'm not sure why it would work in the IDE though, I'd have thought it > wouldn't. > > The setupAsOf3FEB2016 handler also has no "end" statement. > > >> 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 preOpenStack handler is using the path to the mainstack as the basis > for determining where the other stacks are located: > > >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 >> > > Replace these four lines with: > >set the defaultfolder to specialFolderPath("resources") > > Depending on the OS, standalone resources are copied to different > locations outside the mainstack folder, and the original handler won't find > them. You can always get their location with specialFolderPath("resources") > which will always point to the right place. In the IDE, > specialFolderPath("resources") points to the folder that contains the > mainstack, which makes things easy; store the stacks in the same folder > with the mainstack as you do now, and use specialFolderPath to find the > stacks during both development and in a standalone. > > -- > Jacqueline Landman Gay | jac...@hyperactivesw.com > HyperActive Software | http://www.hyperactivesw.com > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: standalone loading script-only stacks
On 2/18/2016 10:58 PM, Matt Maier wrote: 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 quickModeSetup handler has no "end" statement so it may not be compiling correctly. I'm guessing that poking other controls may call devLog (which does have the right structure) so that's why it works later. I'm not sure why it would work in the IDE though, I'd have thought it wouldn't. The setupAsOf3FEB2016 handler also has no "end" statement. 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 preOpenStack handler is using the path to the mainstack as the basis for determining where the other stacks are located: 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 Replace these four lines with: set the defaultfolder to specialFolderPath("resources") Depending on the OS, standalone resources are copied to different locations outside the mainstack folder, and the original handler won't find them. You can always get their location with specialFolderPath("resources") which will always point to the right place. In the IDE, specialFolderPath("resources") points to the folder that contains the mainstack, which makes things easy; store the stacks in the same folder with the mainstack as you do now, and use specialFolderPath to find the stacks during both development and in a standalone. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
standalone loading script-only stacks
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,@pNowDoc,@pNowItem,@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 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode