How to check if an order is selected - page 8

 
Ant_TL:

Excuse me? What does this have to do with who I passed the EA to? Do you think that the state of the "pointer" is affected by any actions of other EAs and the terminal?

It is influenced by operations with orders, whoever is doing them.

 
Mislaid:
Operations with orders are affected. A classic example on the forum is deleting pending orders. Incorrect order of search (index ascending) leads to an unexpected result. This is exactly where the situation arises - the order has been selected, but it is no longer the same.

Not just orders, but also objects. Andglobal variables... Yes, the errors are similar. This is exactly the kind of error we will get if we don't control the order selection state in auxiliary functions before these functions are called.

It is more natural to control using a template I gave in the first message of the topic.

And using this template will cause an error 4105 if the order has not been selected.

 
Ant_TL:

Not just orders, but also objects. And global variables probably... Yes, the errors are similar. This is exactly the kind of error that will happen if we don't control the order selection state in auxiliary functions before these functions are called.

And it is the only way to control it most naturally, using the template I gave in the first post of the topic.

And using this template will generate error 4105 if the order has not been selected.


And the best way is to do the logic of the operation normally. More precisely - do not make logical errors
 
Vinin:

And the best thing to do is to make the logic work properly. To be more precise - don't make logical errors.

Is it a logical error, according to you, to call another function in one function that works with orders, which also selects orders? Or is it something else?

 
Ant_TL:

Is it a logical error, according to you, to call another function in one function that works with orders, which also selects orders? Or is it something else?


Give an example of a program (working)
 
Ant_TL:

Not just orders, but also objects. And global variables probably... Yes, the errors are similar. This is exactly the kind of error that will occur if you don't control the order selection state in the auxiliary functions before calling those functions.

The order selection state may change. The order may be selected, but not anymore.
 
Mislaid:
The selection state can change. The order can be selected, but not any more.

It cannot unless you change this state yourself in the programme.

 

Make a fool pray to God

(C) Folk proverb

 
Vinin:

Give me an example of a (working) programme

Dear Vinin, we haven't switched to a "first name" with you, so I probably won't answer you after all.

 
Ant_TL:

Dear Vinin, we didn't speak on a first name basis, so I probably won't answer you.


I was not addressing anyone in particular.

But you were probably right to take it personally.

I can't call you a fool, but you are deaf, that's for sure.

You do not hear others. I am not talking about my remarks, but about the advice you were given.

Reason: