Setting up SlickEdit to work with and compile MQL4/5 documents. - page 10

 
CArrayObj *CSelect::ByOrderProperty(
CArrayObj *list_source,ENUM_ORDER_PROP_INTEGER property,long value,ENUM_COMPARER_TYPE mode)
  {
   if(list_source==NULL) return NULL;
   CArrayObj *list=new CArrayObj();
   if(list==NULL) return NULL;
   list.FreeMode(false);
   ListStorage.Add(list);
   int total=list_source.Total();
   for(int i=0; i<total; i++)
     {
      COrder *obj=list_source.At(i);
      if(!obj.SupportProperty(property)) continue;
      long obj_prop=obj.GetProperty(property);
      if(CompareValues(obj_prop,value,mode)) list.Add(obj);
     }
   return list;
  }

Here is an example fromArtyom Trishkin's library, everything is good only one but: The author has a lot of wrappers not used, as he claims they will be used later, but now it's for notes, reminders.
I want to use his library, but it's not possible to do it without orienting in the code without additional editors that allow collapsing the code. By the time you flip through all the code in MetaEditor from beginning to end, you already forget what you wanted. I am tired of using all possible add-ons in the standard editor such as Ctrl+g, plus pen and paper!

Question:

list.FreeMode(false);
list_source.At(i);

When we pass a parameter to a method by pointer or create a pointer to a class otherwise it's not possible to MQL (or this ). SlickEdit refuses to define methods of classes passed by pointer, which is a strict definition of MQL.
But if we change the pointer operator (*) to reference operator (&), everything becomes visible and even works auto-defining class members. But this is not allowed in MQL!

Hence the question how and where to set the (*) operator pointer so that it is treated in SlickEdit as (&) operator.

 
BmC:

Here is an example fromArtyom Trishkin's library, everything is good only one but: The author has a lot of wrappers not used, as he claims they will be used later, but now it's for notes, reminders.
I want to use his library, but it's not possible to do it without orienting in the code without additional editors that allow collapsing the code. By the time you flip through all the code in MetaEditor from beginning to end, you already forget what you wanted. I am tired of using all possible add-ons in the standard editor such as Ctrl+g, plus pen and paper!

Question:

When we pass a parameter to a method by pointer or create a pointer to a class otherwise it's not possible to MQL (or this ). SlickEdit refuses to define methods of classes passed by pointer, which is a strict definition of MQL.
But if we change the pointer operator (*) to reference operator (&), everything becomes visible and even works auto-defining class members. But this is not allowed in MQL!

Hence the question how and where to set the (*) operator pointer so that it is treated in SlickEdit as (&) operator.

I'm afraid that (&) and (*) operators cannot be overridden (not SE's fault).

you must be working with MQL5 as with C++ in SE? don't know what to advise.... try to work as with C#.

 
Andrey Dik:

I'm afraid that (&) and (*) operators cannot be overridden (not SE's fault).

probably work with MQL5 as with C++ in SE? don't know what to advise.... try to work as with C#.

I'm working as a user language not C# and C++ as I think macros will treat operators (* and &) differently in different situations.

 
BmC:

I'm working as a custom language not C# and C++, as I think macros will treat operators (* and &) differently in different situations.

is it possible to create and work with a custom language in SE? i was not aware of that.

i meant the following:


 

It is possible to set, only in the pro version, your own language. As stated in the help when creating your own language not specified in the SlickEdit guide, you are faced with more advanced macro configuration, so I'm looking for this macro which is configured to search for nested methods in a class passed by pointer.
I figured out that C++ passed by pointer (*) object implies using operator (->) instead of (.) in MQL. Hence, if you replace or apply conditional compilation commands in a macro when defining a custom language, these operators will be substituted. It means I can't use settings of suggested C# or C++ languages in this case since I actually want to change operator access structure.

I downloaded version 25 and now I'm adjusting it. I read on forums that it has more flexible settings for connecting custom languages. I will try to create both a custom language and on template C# and C++ and see which one is better and maybe I will post the instructions on setting up version 25.

 
BmC:

It is possible to set, only in the pro version, your own language. As stated in the help when creating your own language not specified in the SlickEdit guide, you are faced with more advanced macro configuration, so I'm looking for this macro which is configured to search for nested methods in a class passed by pointer.
I figured out that C++ passed by pointer (*) object implies using operator (->) instead of (.) in MQL. Hence, if you replace or apply conditional compilation commands in a macro when defining a custom language, these operators will be substituted. It means I can't use settings of suggested C# or C++ languages in this case since I actually want to change operator access structure.

I downloaded version 25 and now I'm adjusting it. I read on forums that it has more flexible settings for connecting custom languages. I will try to create both custom language and C# and C++ template and see which one is better and maybe I will post the instructions for setting up version 25.

Yes, just wanted to say that if it is possible to create a custom language, you can try to do so: create a custom language, transfer the settings from the ready-made languages from the corresponding CPP or C# language file and then try to change the behaviour of the corresponding operators.

 
Andrey Dik:

Yes, just wanted to say that if it is possible to create a custom language, you can try to do the following: create a custom language, transfer settings from ready-made languages from the corresponding CPP or C# language file and then try to change the behaviour of the corresponding operators.

that's how I did it, the settings need to be transferred ONLY from c# (CSharp) as it is more suitable for passing objects by reference. In c++ (cpp) instead of operator (.) you have to insert operator (->) to refer to object methods.

Second problem when creating custom language, coloring is not passed via copy settings in version 25, or it's just tank SlickEdit v25.0.2.0 64-bit. (I'm sure it's developers fault with coloring, everything worked in previous version, stopped in this one).