IRC Networks
Irc Logs Stats
Start date: 2007-09-27 02:48:27
Last update: 2008-10-24 20:19:38
Channels: 41
Logged Lines: 6230436
Size: 1825.68 MB
Powered by
Channel Info
Network: freenodeChannel: #csharp |
Search in www.irclog.org
Log from #csharp at freenode 2006-07-28
[23:37]<zgzzcygnv>an event is just like what... a seperate thread right?
[23:37]<gjrvcxnne>no
[23:37]<zgzzcygnv>erm i mean
[23:37]<edjg>It's like...an easy way of handling..event type things
[23:37]<gjrvcxnne>the thing where i can see how it can hold at least SOME water, is where does the catch go to catch the exception?
[23:37]<edjg>whatever that means
[23:37]<zgzzcygnv>Something.EventThing += new WhateverDelegate(); <-- that will spawn a new thread when the even fires, with the delegate as the threadstart?
[23:38]<gjrvcxnne>events are just functions being executed by the message handling function
[23:38]<gjrvcxnne>AnarkiNet: NO
[23:38]<gjrvcxnne>NO NONO
[23:38]<edjg>hehe
[23:38]<edjg>yeah
[23:38]<edjg>I mean
[23:38]<zgzzcygnv>calm the fuck down
[23:38]<edjg>yeah, they're not new threads
[23:38]<gjrvcxnne>sorry lol
[23:38]<gjrvcxnne>threading doesn't happen unless you make it happen
[23:39]<slrgscr>What can I do to make the warnings about unused variables disappear? Like the ex variable to use in a catch.
[23:39]<edjg>you don't need a variable in catch
[23:39]<edjg>If you're not using it just do catch { // stuff }\
[23:39]<edjg>er
[23:39]<edjg>minus the \
[23:39]<gjrvcxnne>Spanska: probably in the IDE options or your project options... look for compiler warnings
[23:39]<edjg>yes, you can do that too
[23:40]<gjrvcxnne>the thing that i think he was trying to make me look at is what catches the exception if it's thrown in an event... where can you put the catch?
[23:40]<gjrvcxnne>(other than in that same event)
[23:40]<edjg>hmm
[23:40]<edjg>In whatever sent the even methinks
[23:40]<edjg>tiggered rather
[23:41]<edjg>and you could catch it in whatever called that
[23:41]<edjg>and so forth
[23:41]<gjrvcxnne>well, lets use a button for an example
[23:41]<edjg>ok
[23:41]<gjrvcxnne>the button throws a new exception
[23:41]<edjg>right
[23:42]<gjrvcxnne>clicking on the button issues the event that throws the exception
[23:42]<edjg>If it were unhandled, I assume it would be passed up the stack to whatever issued the event
[23:42]<gjrvcxnne>where in that form's code can you put a catch to catch that
[23:43]<edjg>in the form's code? I doubt you can. you would want to catch it within the button code
[23:44]<edjg>hmm
[23:44]<gjrvcxnne>yeah, i don't think it can be caught outside of the button code
[23:45]<edjg>Does anyone know of a good binary diff/patch utility for .NET?
[23:45]<edjg>There are quite a few unmanaged solutions, typically EXEs...bsdiff is great, but I tried converting that to a DLL and using P/Invoke without much success. the code is an absolute mess. If an error occured when patching, I'd get massive memory leaks.
[23:45]<edjg>GoatCheez, not by the user, anyway
[23:46]<edjg>So the answer would be that it's totally fine to use exceptions in events...you just want to keep them there. Just as you wouldn't want to throw an exception in your main method
[23:49]<gjrvcxnne>so, throwing an uncaught exception in an event is bad?
[23:49]<edjg>I guess so
[23:49]<edjg>In general I would call unhandled exceptions bad...
[23:49]<edjg>considering they will usually terminate your program
[23:50]<gjrvcxnne>well, this all came about becasue our control has events (go figure), and my testsuite tests values in the events (go figure).... well, the testsuite uses exceptions when a test fails.... so when it fails in the event....
[23:50]<gjrvcxnne>and believe it or not, the exceptoins get caught
[23:51]<edjg>I don't see the problem then
[23:51]<gjrvcxnne>although reflection is being used to spawn the instance, so i have a clear catch block to catch the exceptions, and they do get caught
[23:52]<gjrvcxnne>well, reflection doesn't really matter either I guess
[23:52]<gjrvcxnne>interesting...
[23:52]<gjrvcxnne>hmmm
[23:52]<edjg>heh so what was this guy bitching about
[23:52]<edjg>It sounds like you've got it under control
[23:52]<edjg>literally
[23:52]<gjrvcxnne>he was trying to say that the way my testsuite is built is why the test fails for that condition...
[23:52]<edjg>ah
[23:52]<gjrvcxnne>(which isn't true, and there was a genuine bug)
[23:53]<edjg>you should prove him wrong in front of a bunch of people
[23:53]<gjrvcxnne>(in the control)
[23:53]<gjrvcxnne>eh, i don't need to use tactics like that
[23:53]<gjrvcxnne>even though they get used against me every day lol
[23:53]<gjrvcxnne>i don't need to sink down to that level
[23:53]<edjg>heh
[23:53]<gjrvcxnne>i let my results speak for my work
[23:53]<edjg>I don't mean shame em or anything
[23:53]<gjrvcxnne>lol
[23:54]<edjg>you keep real calm and sophisticated and have that "I'
[23:54]<edjg>that "I'm just trying to make the place more productive" attitude. then he'll probably get pissed on look bad on his own
[23:54]<edjg>or not, I don't know the hguy
[23:56]<afd>hmmm







