Chris Crawford wrote:Is there a standard way to prevent Listeners from activating during initialization? I had experienced a similar problem with another program some years ago and solved it by setting up a global boolean that blocked action by Listeners during initialization.
That's a pleasureChris Crawford wrote:Thanks again . . .
Paul Clapham wrote:The global-boolean idea is fine
But you could try not adding the Listeners until the component is ready to listen properly, I suppose.
...but we would still like to see fo ourselves what the code looks like that is going wrong.
Stephan van Hulst wrote:
Paul Clapham wrote:The global-boolean idea is fine
I strongly disagree. Global variables are never fine.
I remember many people I trusted that definitely considered you on the short list for "Great Atari Programmers", at least in terms of results.
Some people, when well-known sources tell them that fire will burn them, don't put their hands in the fire.
Some people, being skeptical, will put their hands in the fire, get burned, and learn not to put their hands in the fire.
And some people, believing that they know better than well-known sources, will claim it's a lie, put their hands in the fire, and continue to scream it's a lie even as their hands burn down to charred stumps.
Some people, when well-known sources tell them that fire will burn them, don't put their hands in the fire.
Some people, being skeptical, will put their hands in the fire, get burned, and learn not to put their hands in the fire.
And some people, believing that they know better than well-known sources, will claim it's a lie, put their hands in the fire, and continue to scream it's a lie even as their hands burn down to charred stumps.
That means forever.Tim Holloway wrote:. . . handing out information - unpaid - for the forseeable future.
If you settle for what they are giving you, you deserve what you get. Fight for this tiny ad!
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
|