MetaTrader 4 Build 529 beta released with new compiler - page 51

 
Barbarian:

Have you tried other classes? Don't they work as well?

I've looked at some of it, but not all. I try it out as needed (writing a program). sometimes I put plugs in (where it doesn't work), until the time is right.

I looked at the Canvas class, and the class methods use the functions from MQL5. This is most likely the reason for the problem. For example, method?

method uses TextSetFont from MQL5, which probably has not been implemented in MQL4 yet. However, it is already present in the Help Descriptions. Perhaps, they forgot to implement it.

By the way, the developers really did a great job with syntax highlighting in the editor. It is very helpful to distinguish class methods from language functions.

I'm aware of it. Everything already worked there 5-6 builds ago, including TextSetFont() for example this code worked fine:

    Label = new CCanvas();      
    Label.CreateBitmapLabel("MyLabel",150,150,250,150,//COLOR_FORMAT_ARGB_RAW);
     COLOR_FORMAT_ARGB_NORMALIZE);
    Label.FillRectangle(5,5,220,120,ColorToARGB(BkColor,220));
    //0xffbbbb66);
    if(!Label.FontSet("Comic Sans MS",28,FW_BOLD)) Print(GetLastError());
    Label.TextOut(15,5,"Превед Label",ColorToARGB(0x004400,255));
    if(!Label.FontSet("Comic Sans MS",32,FONT_ITALIC|FONT_UNDERLINE|FW_LIGHT,-100)) Print(GetLastError());
    Label.TextOut(15,35,"Превед Label",ColorToARGB(0x004400,255));
    Label.Update();

just later disabled // hopefully temporarily :)

when it worked - it worked on spec.

 
MetaDriver:
I've looked at some of it, but not all. I try it out as needed (I'm writing a program). sometimes I put plugs in (where it doesn't work), until things are better.

I'm aware of that. everything already worked there 5-6 builds ago, including TextSetFont() e.g. this code worked fine:

it was just disabled later // hopefully temporarily :)

when it worked - it worked according to the spec.

It is very strange then. There is no sense in disabling it if it was enabled from the very beginning to extend the functionality. In general, it would be nice to get an updated build with a list of changes and fixed bugs. We will have more problems with analysis of new МТ4.

By the way, there is an error. The new operator doesn't return a pointer to allocated memory like in C++. Make it like this:

    CCanvas Label;// = new CCanvas();      
    Label.CreateBitmapLabel("MyLabel",150,150,250,150,//COLOR_FORMAT_ARGB_RAW);
     COLOR_FORMAT_ARGB_NORMALIZE);
    Label.FillRectangle(5,5,220,120,ColorToARGB(BkColor,220));
    //0xffbbbb66);
    if(!Label.FontSet("Comic Sans MS",28,FW_BOLD)) Print(GetLastError());
    Label.TextOut(15,5,"Превед Label",ColorToARGB(0x004400,255));
    if(!Label.FontSet("Comic Sans MS",32,FONT_ITALIC|FONT_UNDERLINE|FW_LIGHT,-100)) Print(GetLastError());
    Label.TextOut(15,35,"Превед Label",ColorToARGB(0x004400,255));
    Label.Update();

or like this:

    CCanvas* Label = new CCanvas();      
    Label.CreateBitmapLabel("MyLabel",150,150,250,150,//COLOR_FORMAT_ARGB_RAW);
     COLOR_FORMAT_ARGB_NORMALIZE);
    Label.FillRectangle(5,5,220,120,ColorToARGB(BkColor,220));
    //0xffbbbb66);
    if(!Label.FontSet("Comic Sans MS",28,FW_BOLD)) Print(GetLastError());
    Label.TextOut(15,5,"Превед Label",ColorToARGB(0x004400,255));
    if(!Label.FontSet("Comic Sans MS",32,FONT_ITALIC|FONT_UNDERLINE|FW_LIGHT,-100)) Print(GetLastError());
    Label.TextOut(15,35,"Превед Label",ColorToARGB(0x004400,255));
    Label.Update();
    
    delete Label;

and it will work. Read https://www.mql5.com/ru/docs/basis/types/object_pointers. I, too, stumbled at first, having forgotten C++.

 
artmedia70:


I have my nickname and password in the Community tab of my settings. I select the necessary file in Editor Navigator, then select MQL5 Storage --> Add, and the file name in Navigator is marked with blue "+". It seems to be added. Even those files that were previously added, but were changed afterwards, are marked with "!" in a red circle. There seems to be a difference. But I can't find any added files in the repository itself:

What's wrong?


Yes it (storage) works, not necessarily 100% (may not have figured out yet about saving versions), but it works.

Just click on the ellipsis ... - I have this initial folder with 2 folders in it(project and personal).

 
ALXIMIKS:


Yes it (storage) works, not 100 percent (maybe I haven't figured it out yet regarding version saving), but it works.

Just click on the ellipsis ... - I have an initial folder with 2 folders in it (project and personal).

Of course clicked. Going back to the previous level.
 
artmedia70:
Of course I did. Going back to the previous level.


Do your added files have a green circle with a tick?

you must first add via MQL Storeg ==> add, and then click on the file or folder to commit via PCM ==> commit.

 
ALXIMIKS:


do you see a green circle with a tick in the added files?

you must first add via MQL Storeg ==> add, and then click on the file or folder to commit via PCM ==> commit.

Thanks, I'll give it a try. Didn't do it that way.
 
ALXIMIKS:


do you see a green circle with a tick in the added files?

you must first add via MQL Storeg ==> add, and then click on the file or folder to commit via PCM ==> commit.

Exactly, you're right. It helped ;)
 
Barbarian:

By the way, the developers have done a great job in terms of syntax highlighting in the editor.

Yeah, I like the colour scheme very much. I want the same in the studio :-)
 
Barbarian:

It's very strange then. Why turn it off if it's been turned on from the start to extend the functionality.

It makes sense if the charts code is being radically reformed. And it probably is (since there's a lot of new functionality to run).


In general, it would be really good to get an updated build with a list of changes and fixed bugs. We will have less crawling about studying the new МТ4.

It would be. It would be in an ideal situation. Realistically, it's quite resource-intensive. To collect all the changes into one list... with different people working on different modules...

By the way, you have an error. The new operator doesn't return a pointer to allocated memory like in C++. Make it like this:

No, there's no error there, the pointer is declared above the code (I only sent a fragment). Thanks for trying to help.
 
MetaDriver:
Makes sense if the charts code is being radically reformed. And it probably is (since there's a lot of new functionality to be launched).

It is. Ideally. Realistically, it's pretty resource intensive. Putting all the changes into one list... with different people working on different modules...

No, there's no error there, the pointer is declared above the code (I only sent a fragment). Thanks for trying to help.

That the pointer is declared above the code is clear, though not quite :) anyway I ran your code with my corrections, both my variants work. By the way, I still don't understand what the developers were guided by when changing the way new operator works, unlike C++. I don't understand why a pointer to a handle is better than a pointer to an address in memory.
Reason: