Click here to Skip to main content
15,860,943 members

The Weird and The Wonderful

   

The Weird and The Wonderful forum is a place to post Coding Horrors, Worst Practices, and the occasional flash of brilliance.

We all come across code that simply boggles the mind. Lazy kludges, embarrassing mistakes, horrid workarounds and developers just not quite getting it. And then somedays we come across - or write - the truly sublime.

Post your Best, your worst, and your most interesting. But please - no programming questions . This forum is purely for amusement and discussions on code snippets. All actual programming questions will be removed.

 
GeneralRe: Let's "switch" to Something Else Pin
Martin081510-Apr-13 1:41
professionalMartin081510-Apr-13 1:41 
GeneralThings that make you go WTF... Pin
Gary Wheeler1-Apr-13 1:32
Gary Wheeler1-Apr-13 1:32 
GeneralRe: Things that make you go WTF... Pin
Matt T Heffron1-Apr-13 8:53
professionalMatt T Heffron1-Apr-13 8:53 
GeneralRe: Things that make you go WTF... Pin
Gary Wheeler1-Apr-13 8:59
Gary Wheeler1-Apr-13 8:59 
GeneralRe: Things that make you go WTF... Pin
Brisingr Aerowing1-Apr-13 9:48
professionalBrisingr Aerowing1-Apr-13 9:48 
GeneralRe: Things that make you go WTF... Pin
Pete O'Hanlon2-Apr-13 7:17
subeditorPete O'Hanlon2-Apr-13 7:17 
GeneralRe: Things that make you go WTF... Pin
Gary Wheeler2-Apr-13 7:25
Gary Wheeler2-Apr-13 7:25 
GeneralRe: Things that make you go WTF... Pin
patbob2-Apr-13 5:49
patbob2-Apr-13 5:49 
Given you said it was replicated in multiple places, I can see only one possible perceived value -- to block this function from returning until after the dispatcher thread is finished executing something else. Such behavior isn't guaranteed, but it would work just often enough that I can easily see someone clueless thinking it does. Before totally writing it off, I'd look carefully at what's done with the dispatcher prior to executing this code.

As pointed out, this only makes sense if its run with an Invoke, instead of the BeginInvoke that's being used. Nevermind Frown | :(
We can program with only 1's, but if all you've got are zeros, you've got nothing.


modified 2-Apr-13 14:09pm.

GeneralRe: Things that make you go WTF... Pin
Gary Wheeler2-Apr-13 6:38
Gary Wheeler2-Apr-13 6:38 
GeneralRe: Things that make you go WTF... Pin
patbob2-Apr-13 8:03
patbob2-Apr-13 8:03 
JokeRe: Things that make you go WTF... Pin
RafagaX2-Apr-13 6:50
professionalRafagaX2-Apr-13 6:50 
GeneralRe: Things that make you go WTF... Pin
AspDotNetDev2-Apr-13 8:11
protectorAspDotNetDev2-Apr-13 8:11 
GeneralRe: Things that make you go WTF... Pin
Gary Wheeler2-Apr-13 8:24
Gary Wheeler2-Apr-13 8:24 
GeneralRe: Things that make you go WTF... Pin
BobJanova3-Apr-13 23:29
BobJanova3-Apr-13 23:29 
GeneralRe: Things that make you go WTF... Pin
Gary Wheeler4-Apr-13 0:44
Gary Wheeler4-Apr-13 0:44 
GeneralThat was weird... Pin
Brisingr Aerowing28-Mar-13 7:57
professionalBrisingr Aerowing28-Mar-13 7:57 
GeneralRe: That was weird... Pin
Julien Villers8-Apr-13 5:10
professionalJulien Villers8-Apr-13 5:10 
GeneralRe: That was weird... Pin
Brisingr Aerowing8-Apr-13 14:06
professionalBrisingr Aerowing8-Apr-13 14:06 
GeneralExternal System's Table's View's Table's View ('s Tables?) Pin
AspDotNetDev26-Mar-13 12:38
protectorAspDotNetDev26-Mar-13 12:38 
GeneralRe: External System's Table's View's Table's View ('s Tables?) Pin
Brisingr Aerowing5-Apr-13 5:16
professionalBrisingr Aerowing5-Apr-13 5:16 
GeneralFound this a few minutes ago Pin
SomeGuyThatIsMe26-Mar-13 10:51
SomeGuyThatIsMe26-Mar-13 10:51 
GeneralRe: Found this a few minutes ago Pin
Jan Steyn28-Mar-13 0:56
Jan Steyn28-Mar-13 0:56 
GeneralRe: Found this a few minutes ago Pin
SomeGuyThatIsMe28-Mar-13 3:34
SomeGuyThatIsMe28-Mar-13 3:34 
GeneralRe: Found this a few minutes ago Pin
agolddog29-Mar-13 3:39
agolddog29-Mar-13 3:39 
GeneralRe: Found this a few minutes ago Pin
Leng Vang29-Mar-13 6:35
Leng Vang29-Mar-13 6:35 

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.