Errors, bugs, questions - page 1370

 

A100:

...

As if in the example https://www.mql5.com/ru/docs/files/filefindfirst

and the OK\ folder contained more subfolders.
Reproduced it in mine. As a temporary solution, the folder is identified by the "\" at the end of its name.
 
Compilation error
class A {
        void f( int a, long b ) {}
        void f(        long b ) {}
        void g() const;
};
void A::g() const
{
        int a;
        long b;
           f( a, b ); //(1)//error 'f' - no one of the overloads can be applied to the function call 
	A::f( a, b ); //(2)//нет сообщения об ошибке
}

Either the error is there or it is not. There is no significant difference between (1) and (2)

 

Here is the code

#property strict
#include <Canvas/Canvas.mqh> CCanvas canvas;
void OnTick()
  {
   string ObjName="test";
   ObjectDelete(0,ObjName);
   if(ObjectFind(0,ObjName)==-1)
     {
      canvas.CreateBitmapLabel(ObjName,100,100,150,150,COLOR_FORMAT_ARGB_NORMALIZE);
      canvas.Erase(ColorToARGB(clrNONE,0));
      canvas.FontSet("Verdana",22);
      canvas.TextOut(10,10,"EURUSD",ColorToARGB(clrBlue,255));
     }
   uchar z=255;

   while(z>0)
     {
      canvas.TransparentLevelSet(z);
      canvas.Update(true);
      z-=5;
      Sleep(50);
     }
  }

I want to make translucent text, but the code stubbornly draws text and a square, there's a smooth colour change in the code...

Square with canvas.Erase(ColorToARGB(clrNONE,0)); white with canvas.Erase(0); black....

What am I doing wrong or how to make translucent text without squares....

 
Vladimir Pastushak:

Here's the code

I want to make translucent text, but the code stubbornly draws text and a square, there's a smooth colour change in the code...

Square at canvas.Erase(ColorToARGB(clrNONE,0)); white at canvas.Erase(0); black....

What am I doing wrong or how to make translucent text without squares....

Why do you keep changing the transparency?

#property strict #include <Canvas/Canvas.mqh> CCanvas canvas; void OnTick()   {    string ObjName="test";    ObjectDelete(0,ObjName);    if(ObjectFind(0,ObjName)==-1)      {       canvas.CreateBitmapLabel(ObjName,100,100,150,150,COLOR_FORMAT_ARGB_NORMALIZE);       canvas.Erase(ColorToARGB(clrNONE,0));       canvas.FontSet("Verdana",22,FW_BOLD);       canvas.TextOut(10,10,"EURUSD",ColorToARGB(clrBlue,160));

canvas.Update();      }    /*uchar z=255;    while(z>0)      {       canvas.TransparentLevelSet(z);       canvas.Update(true);       z-=5;       Sleep(50);      }*/   }

 
Alexey Navoykov:
I'd like to know about the prospect of introducing property (as a class member). I asked this question recently, but there were no comments from the developers. Is it planned, or should I do a poll on the forum as to whether this feature is needed?
A poll should be done, I'm for it. But properties should be as modern in C#, but not in early forms (they made normal ones after version 2, didn't they?).
 
Alexey Volchanskiy:
It is necessary to make a poll, I'm for it. But it should be like modern C# properties, but not in early forms (they made normal ones after version 2, didn't they?).

I don't think this needs to be introduced in this language, as it will only increase the number of bugs that will take years to eradicate.

It would be better to implement a normal extended authorization mechanism for Linux, because if the server uses extended authorization mechanism, it is impossible to connect to the server under Wine.

 

Why can't a static method access a static variable:

class CLog
{
private:
   static int a;
public:
   static void A()
   {
      a = 3;
   }
};

Compiler message:

unresolved static variable 'CLog::a'    Logs.mqh        22      7
 
Vasiliy Sokolov:

Why you can't access a static variable from a static method:

Try placing a static variable:

class CLog
{
private:
   static int a;
public:
   static void A()
   {
      a = 3;
   }
};
int CLog::a;
 
Artem Temnikov:

Try placing a static variable:

It worked! Thank you.
 

Dear developers!

Linux Mint 17.1 OS, terminal was installed under Wine 1.7.35 (MetaEditor 1154). Can't open help by F1, also can't open help through menu -> help. What should I do in Wine to open help by F1?

Reason: