• Welcome to Valhalla Legends Archive.
 

Posting in a shoutbox on piczo?

Started by QwertyMonster, December 20, 2005, 07:00 PM

Previous topic - Next topic

rabbit

But since it's a control, you can't go and change the code to fix the error.
Grif: Yeah, and the people in the red states are mad because the people in the blue states are mean to them and want them to pay money for roads and schools instead of cool things like NASCAR and shotguns.  Also, there's something about ketchup in there.

Adron

Quote from: rabbit on December 22, 2005, 03:18 PM
But since it's a control, you can't go and change the code to fix the error.

It is meant to be handled...

rabbit

I prefer to fix my errors, not make them easier on the eyes.
Grif: Yeah, and the people in the red states are mad because the people in the blue states are mean to them and want them to pay money for roads and schools instead of cool things like NASCAR and shotguns.  Also, there's something about ketchup in there.

Adron

Quote from: rabbit on December 23, 2005, 09:34 AM
I prefer to fix my errors, not make them easier on the eyes.

You are wrong in this case. There are many errors that can not be fixed by the programmer. You absolutely MUST handle errors in your program. How are you as a programmer going to fix the error of user not being connected to the internet? How are you as a programmer going to fix the error of user's hard drive being full? Error handling is vital.

rabbit

Yes, but in the case of a control crashing because it doesn't check its own connection state before attempting to connect (again, without disconnecting), well...that's just stupid.
Grif: Yeah, and the people in the red states are mad because the people in the blue states are mean to them and want them to pay money for roads and schools instead of cool things like NASCAR and shotguns.  Also, there's something about ketchup in there.

Adron

Quote from: rabbit on December 23, 2005, 08:17 PM
Yes, but in the case of a control crashing because it doesn't check its own connection state before attempting to connect (again, without disconnecting), well...that's just stupid.

You need error handling for the control either way. And one might consider the programmer telling the control to connect again without disconnecting.. stupid! I find it quite reasonable of a control to raise an error if you tell it to do something that you should not.

Warrior

I agree with Adron, instead of making the Programmer not have to worry about them the control should enforce the good programming habbits he should already have.
Quote from: effect on March 09, 2006, 11:52 PM
Islam is a steaming pile of fucking dog shit. Everything about it is flawed, anybody who believes in it is a terrorist, if you disagree with me, then im sorry your wrong.

Quote from: Rule on May 07, 2006, 01:30 PM
Why don't you stop being American and start acting like a decent human?

topaz

Quote from: rabbit on December 23, 2005, 08:17 PM
Yes, but in the case of a control crashing because it doesn't check its own connection state before attempting to connect (again, without disconnecting), well...that's just stupid.

It does exactly what you told it to! Just build checks and error handling into your code (Like disconnecting right before connecting), and you shouldn't have problems.
RLY...?

rabbit

Do this:
Add an INet control.
Call .OpenURL or .Execute on some page.
Call .Cancel and/or .StopExecution (I think).
Call .OpenURL or .Execute on some page, again.
Hit the "OK" button when the control tells you it's errored and watch you're program close.
Grif: Yeah, and the people in the red states are mad because the people in the blue states are mean to them and want them to pay money for roads and schools instead of cool things like NASCAR and shotguns.  Also, there's something about ketchup in there.

FrOzeN

Quote from: rabbit on December 24, 2005, 09:10 AM
Do this:
Add an INet control.
Call .OpenURL or .Execute on some page.
Call .Cancel and/or .StopExecution (I think).
Call .OpenURL or .Execute on some page, again.
Hit the "OK" button when the control tells you it's errored and watch you're program close.
That won't cause an error because each line doesn't get executed until the one above have finished.

By adding that code into a command _Click() event or something. Then clicking that object twice in a row will cause the error even if the last line is to .Cancel it's last request.
~ FrOzeN

Adron

I see no documentation saying that the Cancel method is guaranteed to finish immediately. There are several states you can get:

icDisconnecting 9 The control is disconnecting from the host computer.

icDisconnected 10 The control successfully disconnected from the host computer.

Try waiting for the control to finish cancelling the request it was working on before you give it a new request to execute.

FrOzeN

Quote from: Adron on December 24, 2005, 11:57 PM
I see no documentation saying that the Cancel method is guaranteed to finish immediately. There are several states you can get:

icDisconnecting 9 The control is disconnecting from the host computer.

icDisconnected 10 The control successfully disconnected from the host computer.

Try waiting for the control to finish cancelling the request it was working on before you give it a new request to execute.
Thus the reason why it is such a crap control. It should have these simply preventative measures built into it to stop crashing upon error, rather than getting the coder to check if it's connected or not continuously.
~ FrOzeN

topaz

Shouldn't be expecting Microsoft to do everything for you...
RLY...?

QwertyMonster

Wow went wayy off-topic here.



Thank-you for all your help. I will look into it. When i have time, having good time since its xmas at the moment.

Adron

Quote from: FrOzeN on December 25, 2005, 01:11 AM
Thus the reason why it is such a crap control. It should have these simply preventative measures built into it to stop crashing upon error, rather than getting the coder to check if it's connected or not continuously.

You are completely missing the point here. The control is *not* crashing upon error. The control is returning an error code to the application. Visual Basic has the built-in feature of crashing if the programmer fails to properly check for returned error codes. Blame Visual Basic if anything. Calling that control from C++ would not make it crash on an error.

|