3 ms·
I don't understand... don't you get a "ButtonClickedEvent" when the button is clicked? Why would he think he needs a while(1) loop in the button? Am I missing
by kenjackson 16y ago
I don't understand... don't you get a "ButtonClickedEvent" when the button is clicked? Why would he think he needs a while(1) loop in the button? Am I missing something?
UPDATE: After rereading it... you guys are actually implmenting the button. Although surely you're not implementing the whole mouse stack... so I'm still confused :-)
- Untitled 16y agoHere is a very bad pseudo-code demo illustrating the problem and the proposed solution: http://pastie.org/1247590 http://pastie.org/1247590 I'm beginning to suspect that the willful incompetence on their part is maybe just a scheme of many to get others to do the work. Suspected a bit of professionalism from people who are about to graduate with master degrees.
- deleted 16y ago[deleted]
- wmil 16y agoI think the guy copied the video processing loop into the event handler. So the event handler goes into a while(1) loop instead of starting a new thread/process to do the video processing. That will lock the GUI and make the app unusable.
- kenjackson 16y agoOK, so from looking at the code, only DrawNow needs to be on the UI thread (unless DrawNow is actually not drawing to the screen). That makes sense. One thing to note though, the grad student may not be familiar with a model where UI is on a specific thread. I know some of the past systems I used had the rental model (even WPF had it early on), so maybe, giving him the benefit of the doubt... this is what he was thinking about (and assumed you had acquired all the correct locks in your code)?