error in OBJ_EDIT example from MQL4 documentation

 

This script demonstrates that OBJ_EDIT example from MQL4 documentation

https://docs.mql4.com/constants/objectconstants/enum_object/obj_edit

contains an error:

the priority for mouse click can not be set or at least the compiler issues an error message of unknown object property.

We take the original script, and add just 3 rows:

#include <stdlib.mqh>

and 105 and 108 for error output.

Run the script to see "1: unknown object property" message in the Comment field.


Files:
editboxtest.mq4  13 kb
 
http://docs.mql4.com/constants/objectconstants/enum_object/obj_edit
The example works.
 
deysmacro:
The example works.

You did not get the point. The example does work but if you incorporate the script into your program you will get the error message and spend time on looking for the bugs anywhere but in the "native" mql4 scripts. But the bug is there.
 

The example is an example but I manage to make it work in my ea after minor code adjustments.


Show us your code then.

 
deysmacro:
Show us your code then.

It has been attached to the post.
 
When compiles, does any error message shown? Because mine, none.
 
It does not. But please do read my post and get the point otherwise it's a waste of time. The point is that setting priority on mouse click for edit object produces an error. Another point is that MQL4 documentation contains a script that might produce an error upon incorporation into your own programs. Cheers.
 

It says ...

1: no error


I set ...

InpZOrder=10;



That is why you need to show your code .. not the attached code. You keep saying the example have problem incorporating into your code but where is your code?

 
deysmacro:

It says ...

1: no error


I set ...


perhaps we have got different builds, mine is 610
 
625 here...
 
deysmacro:

It says ...

1: no error


I set ...



That is why you need to show your code .. not the attached code. You keep saying the example have problem incorporating into your code but where is your code?


The attached code fully demonstrates the problem. If there is no error when you run it, you are lucky to have a proper build. The one I have is 610 but it is not from Metaquotes but from a different vendor, maybe I would check the issue with the original Metaquotes one. Anyway I'd recommend to wrap the example codes from the mql4 website with GetLastError catchers before incorporating into your scripts. Have a nice day!
Reason: