Official Everybody Edits Forums

Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?

You are not logged in.

#51 2015-06-04 22:03:46, last edited by BuzzerBee (2015-06-04 22:04:49)

BuzzerBee
Forum Admin
From: Texas, U.S.A.
Joined: 2015-02-15
Posts: 4,575

Re: [C# Tip] Illegal Cross-Thread Operations

Tomahawk wrote:
BuzzerBee wrote:

It's not something arguable... The Boolean for illegal cross-thread calls was only kept in later versions of .NET Framework for backwards compatibility...

The only thing you are arguing is your right to take dangerous shortcuts, which is a right you do possess. So keep doing you and let me know when your app crashes

I'll let you know then when it never crashes. Dangerous shortcut my ****.

Lol I don't know why you're trying to prove me wrong it's not really a debate. It is a dangerous shortcut, that is a fact.

Like I said, the only thing you should be arguing whether someone should use it as an alternative if they're too lazy to invoke


TdQRyz3.png
https://wiki.everybodyedits.com/images/5/5d/135_bee

Offline

#52 2015-06-04 22:05:45

BuzzerBee
Forum Admin
From: Texas, U.S.A.
Joined: 2015-02-15
Posts: 4,575

Re: [C# Tip] Illegal Cross-Thread Operations

You're right, it may never crash. But it's a bad habit regardless.
Talk to me when you have some valuable input


TdQRyz3.png
https://wiki.everybodyedits.com/images/5/5d/135_bee

Offline

#53 2015-06-04 22:17:53

ewoke
Member
Joined: 2015-02-20
Posts: 412

Re: [C# Tip] Illegal Cross-Thread Operations

is this debate/discussion neccesary? if people are too lazy to use invoke methods or whatever let them, i dont see a point in trying to force them to use invokes.
being lazy is a bad habit aswell and im totally fine with that


if you can read this....good for you

Offline

#54 2015-06-05 02:51:14

BuzzerBee
Forum Admin
From: Texas, U.S.A.
Joined: 2015-02-15
Posts: 4,575

Re: [C# Tip] Illegal Cross-Thread Operations

ewoke wrote:

is this debate/discussion neccesary? if people are too lazy to use invoke methods or whatever let them, i dont see a point in trying to force them to use invokes.
being lazy is a bad habit aswell and im totally fine with that

Nope it's not necessary lol that's why I keep trying to end it with snarky remarks //forums.everybodyedits.com/img/smilies/tongue


TdQRyz3.png
https://wiki.everybodyedits.com/images/5/5d/135_bee

Offline

Wooted by:

#55 2015-06-05 12:29:57

Tomahawk
Forum Mod
From: UK
Joined: 2015-02-18
Posts: 2,847

Re: [C# Tip] Illegal Cross-Thread Operations

Alternatively, don't use threads.


One bot to rule them all, one bot to find them. One bot to bring them all... and with this cliché blind them.

Offline

Wooted by: (2)

#56 2015-06-08 22:21:50

sot
Member
Joined: 2015-06-08
Posts: 1

Re: [C# Tip] Illegal Cross-Thread Operations

I, too, must inject my own opinions, beliefs, and whatnot.

Also seen on SO: http:// (S O ) .com/questions/13345091/c-sharp-checkforillegalcrossthreadcalls
"Or only on a particular user's machine, you'll blame the user instead of your code."
"trouble that causes is extremely hard to diagnose."

I like lrussell's string to int conversion. Very useful. I plan to implement soon.

I also like how marco felt compelled to hold the "9" key down instead of simply writing one of those fancy infinite loops
but hey who's counting
Oh, and you know how to code good? well for you! (anyone at all see what I did there)

I figure programming IS supposed to be easy. I mean, there's tons of things out there about code re-use and class inheritance... and... stuff... different ideas that make programming more than simply copy/pasting lines of code. We have loops, you don't have to type out each command in a sequence... we have functions so... something else good happens!
But in this case, "easy" is an illusion. You might think you're getting off scot-free. But, in reality, you're opening your program up for bugs. You pretend they aren't there.

Imagine working in Word or something. You have a research paper due. (Shockingly, you're cramming!) You're almost done and ready to save. As you click that one multi-thread button (no idea which one)... all of your work is lost! Oh well. Should've invoked.
(Obviously you folks will never go to work developing Word or some other high-profile program. But there's a chance you do make something where users count on your dependability and it's your job to repay that with reliable bug-free results.)

"don't use threads"
haha good one
pretty sure the onmessage is already on a different thread.
out of luck there I guess.

k well have fun

Offline

Wooted by: (3)

#57 2015-06-08 22:42:48

realmaster42
Formerly marcoantonimsantos
From: ̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍
Joined: 2015-02-20
Posts: 1,380
Website

Re: [C# Tip] Illegal Cross-Thread Operations

sot wrote:

(Obviously you folks will never go to work developing Word or some other high-profile program. But there's a chance you do make something where users count on your dependability and it's your job to repay that with reliable bug-free results.)

(Obviously you folks will never lose Form1.cs and Form1.Designer.cs due not using invoking)

sot wrote:

I also like how marco felt compelled to hold the "9" key down instead of simply writing one of those fancy infinite loops

What's the problem? I don't want to make an infinite loop.

sot wrote:

I like lrussell's string to int conversion. Very useful. I plan to implement soon.

It's not his, it's alkzam's.


http://i.imgur.com/bjvgH5L.png?1

Offline

#58 2015-06-09 00:07:25

den3107
Member
From: Netherlands
Joined: 2015-04-24
Posts: 1,025

Re: [C# Tip] Illegal Cross-Thread Operations

Can't we just stop this discussion..? We've stated the facts, we've stated the opinions. Leave it upto the developers to choose.
I would recommend to sticky this topic or make some sore of topic that holds all kinds of tips and tricks (this one included).

Offline

#59 2015-06-09 08:06:14

realmaster42
Formerly marcoantonimsantos
From: ̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍
Joined: 2015-02-20
Posts: 1,380
Website

Re: [C# Tip] Illegal Cross-Thread Operations

den3107 wrote:

Can't we just stop this discussion..? We've stated the facts, we've stated the opinions. Leave it upto the developers to choose.


http://i.imgur.com/bjvgH5L.png?1

Offline

#60 2015-06-09 18:15:21

BuzzerBee
Forum Admin
From: Texas, U.S.A.
Joined: 2015-02-15
Posts: 4,575

Re: [C# Tip] Illegal Cross-Thread Operations

The discussion ended a while ago.


TdQRyz3.png
https://wiki.everybodyedits.com/images/5/5d/135_bee

Offline

BuzzerBee1433870121510952

Board footer

Powered by FluxBB

[ Started around 1732470290.1962 - Generated in 0.058 seconds, 14 queries executed - Memory usage: 1.52 MiB (Peak: 1.68 MiB) ]