Click here to Skip to main content
15,867,453 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: This is for Sander Pin
OriginalGriff15-Feb-21 5:30
mveOriginalGriff15-Feb-21 5:30 
GeneralRe: This is for Sander Pin
Slacker00715-Feb-21 6:05
professionalSlacker00715-Feb-21 6:05 
GeneralRe: This is for Sander Pin
OriginalGriff15-Feb-21 6:07
mveOriginalGriff15-Feb-21 6:07 
GeneralRe: This is for Sander Pin
RickZeeland15-Feb-21 5:57
mveRickZeeland15-Feb-21 5:57 
GeneralRe: This is for Sander Pin
Sander Rossel15-Feb-21 8:23
professionalSander Rossel15-Feb-21 8:23 
PraiseRe: This is for Sander Pin
RickZeeland15-Feb-21 10:07
mveRickZeeland15-Feb-21 10:07 
GeneralRe: This is for Sander Pin
Marc Clifton15-Feb-21 12:52
mvaMarc Clifton15-Feb-21 12:52 
GeneralRe: This is for Sander Pin
honey the codewitch15-Feb-21 13:57
mvahoney the codewitch15-Feb-21 13:57 
I wish I didn't find myself writing it but after thinking about it I didn't know what else to do.

It's really error prone if I don't do it, because how are you suppose to know you also have to call Subscribe() before your events will get fired?

Better to just make the act of hooking the (first) event do it for you, lest you introduce bugs inadvertently.

It has other obvious disadvantages, like actually sending signals over bluetooth when you do it, plus the high possibility of throwing an exception during the subscription process. All of that would have been more of a problem if I derived from Component and thus exposed the events to the design time interface, where you run into issues with the designer instantiating your stuff and keeping state.

But I digress. I don't like automagic code but this is one of those instances where there were not many good options and reasonable people would disagree on how to handle it i think.
Real programmers use butterflies

GeneralBe a team player Pin
TimWallace15-Feb-21 5:28
TimWallace15-Feb-21 5:28 
GeneralRe: Be a team player Pin
OriginalGriff15-Feb-21 5:29
mveOriginalGriff15-Feb-21 5:29 
GeneralRe: Be a team player Pin
TimWallace15-Feb-21 6:08
TimWallace15-Feb-21 6:08 
GeneralRe: Be a team player Pin
milo-xml16-Feb-21 2:43
professionalmilo-xml16-Feb-21 2:43 
AnswerRe: Be a team player Pin
abmv15-Feb-21 6:10
professionalabmv15-Feb-21 6:10 
GeneralRe: Be a team player Pin
Gerry Schmitz15-Feb-21 6:16
mveGerry Schmitz15-Feb-21 6:16 
GeneralRe: Be a team player Pin
k505415-Feb-21 6:20
mvek505415-Feb-21 6:20 
RantRe: Be a team player Pin
Eddy Vluggen15-Feb-21 6:39
professionalEddy Vluggen15-Feb-21 6:39 
GeneralRe: Be a team player Pin
honey the codewitch15-Feb-21 6:47
mvahoney the codewitch15-Feb-21 6:47 
GeneralRe: Be a team player Pin
Nelek15-Feb-21 6:59
protectorNelek15-Feb-21 6:59 
GeneralRe: Be a team player Pin
honey the codewitch15-Feb-21 7:44
mvahoney the codewitch15-Feb-21 7:44 
GeneralRe: Be a team player Pin
Eddy Vluggen15-Feb-21 9:05
professionalEddy Vluggen15-Feb-21 9:05 
GeneralRe: Be a team player Pin
Eddy Vluggen15-Feb-21 7:47
professionalEddy Vluggen15-Feb-21 7:47 
GeneralRe: Be a team player Pin
honey the codewitch15-Feb-21 7:58
mvahoney the codewitch15-Feb-21 7:58 
GeneralRe: Be a team player Pin
Eddy Vluggen15-Feb-21 8:16
professionalEddy Vluggen15-Feb-21 8:16 
GeneralRe: Be a team player Pin
Greg Utas15-Feb-21 7:22
professionalGreg Utas15-Feb-21 7:22 
GeneralRe: Be a team player Pin
Eddy Vluggen15-Feb-21 7:56
professionalEddy Vluggen15-Feb-21 7:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.