Using : https://www.mql5.com/en/articles/62 to create scripts in order to write and read objects&properties for a panel.
I had no problem for creating the write script (only a little change: FileWriteInteger from article need to replace by FileWriteLong)
However when reading the file to create the objects, I get the warning : implicit enum conversion, here is the lign:
Follows the lign:
ObjectCreate(0, obj_name, obj_type, 0, 0, 0);
I have tried to change FileReadInteger to FileReadLong or even ENUM_OBJECT to long but no success.
Any ideas or suggestions? Thx...
Maybe the author of the article could do the change/updates to his article.
Well regardless of the warning message:
implicit enum conversion && possible loss of data due to type conversion
the script is working fine... but instead of FileReadInteger replace to FileReadLong.... Answer myself, thought it might help someone else.
... I get the warning : implicit enum conversion
Well, an int, as returned by "FileReadInteger", can, in general, have more values than the enumeration type, so the compiler is warning you that the implicit conversion, as performed by the compiler, may not succeed. However, you can take the responsibility for the conversion by inserting an explicit cast!
ENUM_OBJECT obj_type = (ENUM_OBJECT)FileReadInteger(handle,4);