Eliminating the flicker from systemWindow
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Eliminating the flicker from systemWindow
On one of my stacks I have created a toggle button for the user to "Pin the stack to top". I used the systemWindow property to do this. I soon discovered though that if I perform an ask or answer command the dialog would be lost behind the stack. To overcome this problem, I threw in a line to toggle off the systemWindow before performing any tasks that require dialogs. The problem, is the flicker when this property is changed. Lock Screen does not help, (I assume because the change occurs to the stack and not within the stack) Is there any way to eliminate this flicker, or a way to have dialogs show above a system window so I can take out the the code that turns systemWindow to false?
Re: Eliminating the flicker from systemWindow
The reason for the flicker is due to the re-creation of the window and not just setting the system flags.. You can get it flicker free through the use of externals, otherwise you might need to rethink it..
-
- Posts: 101
- Joined: Wed Dec 22, 2010 8:17 pm
Re: Eliminating the flicker from systemWindow
Hi, why don't you leave but return to the top-most stack & do whatever needs to be done there? (So it always stays on top)
Like so... you want cd gTheShownCd of stack gTheTopStak (both globals) to stay top-most.
You lock screen.
You go elsewhere, run scripts in another stack. You need an answer dialog in a handler?
Note: the code below assumes you’ve defined the variables mentioned above, locked screen and gone to some other stack (where you're in the middle of some handler)
Just remember to go back to the top-most stack at the end of every handler.
Like so... you want cd gTheShownCd of stack gTheTopStak (both globals) to stay top-most.
You lock screen.
You go elsewhere, run scripts in another stack. You need an answer dialog in a handler?
Note: the code below assumes you’ve defined the variables mentioned above, locked screen and gone to some other stack (where you're in the middle of some handler)
Code: Select all
put the number of this cd into lCurrentCd // (could be global or local var)
put the name of this stack into lWorkStack // (again global or local var)
go cd gTheShownCd of stack gTheTopStak // this is the back drop you want the user to see
// if you have openStack or openCard handlers in the top-most stack you can set lockMessages to true before the transit & unlock (set to false) afterwards
unlock screen
answer info "Your question?" with option1 or option2 // etc
put it into lTheUsersAnswer //local var, or you might be able to leave the user's choice in 'it', depends on your code
lock screen // as before, now go back to whence you came
go cd lCurrentCd of stack lWorkStack // you might even be able to use a simple 'go back'
//handler keeps going, in a stack that's hidden by a locked screen and never shown...
Re: Eliminating the flicker from systemWindow
I think I'll give that a try.