Wish Protect Sender from Sleep-walking killer

Sandman

Expert
Licensed User
Longtime User
In events we have Sender to inform us of the origin of the event. A magical companion that never is present in sub signatures, but always available once you learn about its mysterious ways. Or so I thought at least. Seems Sleep can kill it. (I haven't verified this, but it seems likely to also be vulnerable to the violent ways of Wait For.)

This wish originates from this thread

My wish is something like this...

1. Make Sender available even after Sleep (and Wait For etc)

or

2. Make the IDE linter detect usage of Sender after Sleep and say something like "Warning: Sender is Null after Sleep and Wait For"

or

3. At the very least put the information in the hover-documentation for Sender and also in the forum when one searches for Sender:

 

Sandman

Expert
Licensed User
Longtime User
Yeah, that's pretty much exactly how I envisioned the difficulty. Doesn't hurt to ask though, and just getting it out of the darkness and into the bright light of documentation solves it Good Enough(tm).

Let's be honest, I kind of feel like I stumbled in an edge-case here. Not too many will experience it.

By the way, I put that Sleep in there because I copied it from one of your code examples, on how to stop the loading of a clicked link.
 

Cableguy

Expert
Licensed User
Longtime User
I may be wrong, I usually am, but my work around for this, assuming the sender is of known type, recast it to a sub local view...
 

Sandman

Expert
Licensed User
Longtime User
my work around for this, assuming the sender is of known type, recast it to a sub local view
Yep, as linked in #1:
 

Cableguy

Expert
Licensed User
Longtime User
Why not use the tag prop as an identifier ?
 

Cableguy

Expert
Licensed User
Longtime User
If you really want to discuss this, move it into Chit Chat so we don't get this wish thread off the rails.
No need... I understand the wish, and what caused it.. I was just pointing how I would workaround it
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…