hiding a stack whilst processing

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
jalz
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 340
Joined: Fri Sep 12, 2008 11:04 pm

hiding a stack whilst processing

Post by jalz » Wed May 04, 2016 9:57 pm

Hey Guys,

I need some advice with the code I have below which basically builds a print layout out of another layout. I would like this processing to go on in the background so that there is no 'evidence' of the print stack, I just want it to build the pages up and then stay hidden if that makes sense.

Code: Select all


command createPrintPages
   
   set the defaultStack to "Print"
   
   DeletePreviousPage
   
   put the number of cards of stack "Preview" into tTotalPages
   go to stack "print"
   
   
   put 1 into tPageNo
   repeat until tPageNo > tTotalPages
      put "Grp_Preview " & tPageNo into tGrpName
      put "Preview " & tPageNo into tPreviewCardName
      put "Print " & tPageNo into tPrintCardName
      
      if tPageNo is not 1 then
         create card tPrintCardName
      else
         set the name of card tPageNo to tPrintCardName
      end if
      
      copy group tGrpName of card tPreviewCardName of stack "Preview" to card tPrintCardName of stack "Print"
      put gFooter into field "fld_footer"
      delete graphic "margin" of card tPrintCardName of stack "Print"
      set the borderwidth of graphic "paper" to 0
      add 1 to tPageNo
   end repeat
   
end createPrintPages

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10330
Joined: Wed May 06, 2009 2:28 pm

Re: hiding a stack whilst processing

Post by dunbarx » Wed May 04, 2016 10:41 pm

HI.

Only glanced at your handler. Does locking the screen early on do the trick?

Craig Newman

jalz
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 340
Joined: Fri Sep 12, 2008 11:04 pm

Re: hiding a stack whilst processing

Post by jalz » Wed May 04, 2016 10:54 pm

Hi Craig,

I've got quite a lot happening, having lock screen early on does make some difference, i.e. it stops the screen jumping around quite a bit whilst the layouts is being generated. However when the script switches from one stack to another stack, i.e. from preview to print during processing, I see the flickering which is quite noticeable.

Post Reply