Download MetaTrader 5

error in OBJ_EDIT example from MQL4 documentation

To add comments, please log in or register
Publish your programs in the Market. Make money with your knowledge!
ivan
505
ivan 2014.04.08 09:46 

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:
SYED NAUFAL GADDAFI
1401
SYED NAUFAL GADDAFI 2014.04.08 10:06  
http://docs.mql4.com/constants/objectconstants/enum_object/obj_edit
The example works.
ivan
505
ivan 2014.04.08 10:09  
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.
SYED NAUFAL GADDAFI
1401
SYED NAUFAL GADDAFI 2014.04.08 10:11  

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


Show us your code then.

ivan
505
ivan 2014.04.08 10:12  
deysmacro:
Show us your code then.

It has been attached to the post.
SYED NAUFAL GADDAFI
1401
SYED NAUFAL GADDAFI 2014.04.08 10:15  
When compiles, does any error message shown? Because mine, none.
ivan
505
ivan 2014.04.08 10:18  
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.
SYED NAUFAL GADDAFI
1401
SYED NAUFAL GADDAFI 2014.04.08 10:37  

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?

ivan
505
ivan 2014.04.08 10:47  
deysmacro:

It says ...

1: no error


I set ...


perhaps we have got different builds, mine is 610
SYED NAUFAL GADDAFI
1401
SYED NAUFAL GADDAFI 2014.04.08 10:49  
625 here...
ivan
505
ivan 2014.04.08 10:54  
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!
12
To add comments, please log in or register