Errors, bugs, questions - page 1051

 
marketeer:

Not yet, but I can post it.

Apparently another question comes from the same thread. What is the principle by which products are sorted in the Market? How do I change the sorting order? For example, I have the tab "Popular". What is "popular" - views, downloads, reviews, rating? None of these seem to exist. However, I would like to sort by any of these indicators. And on the "Paid" tab, sorting by price would be desirable.

There is no sorting at the moment either. Products are sorted by some criteria of their own. It would be good to have a more powerful filter. By price range, alphabetically, etc. You could also write to Service Desk as a suggestion.
 
How do I programmatically get the colour of the line that the user has set in the properties dialogue of the turntable?
 
marketeer:
How can I programmatically get the line colour that the user has set in the properties dialog of an indicator?

I do not remember such a feature.

Why? Maybe if you change the question, there will be a solution.

You can change the whole colour scheme with one click. Well enter the colour in the parameters and let the user change it in the parameters.

 
marketeer:
How do I programmatically get the colour of the line that the user has set in the properties dialog of an indicator?

PLOT_LINE_COLOR

 

Hard to catch error

int replace( int& a, const int b ) {
        int prev = a;
        a = b;
        return ( prev );
}

class A { public:
        A() : value( 5 ) {}
        virtual int      get() const     { return ( value ); }
        virtual int      set( int _New ) {return (replace(this.value, _New));}
        virtual void     print();
        int    value;
};

void A::print() {
        Print( "value1=" + get()   );
        Print( "value2=" + set( 8 ));
}

void OnStart() {
        A a;
        a.print(); 
}

Result: value1=5, value2=8, and should be

value1=5, value2=5

If I remove this. or remove the prefix virtual from A::set(...) or remove the replace function by moving the code into A::set(...)

//убрать this.
virtual int   set( int _New ) { return ( replace( value, _New ) ); }      

//или убрать у set virtual
      int   set( int _New ) { return ( replace( this.value, _New ) ); }

//или убрать функцию replace, путем переноса кода в A::set(...)

virtual int set(int _New) {int prev=this.value; this.value=_New; return (prev);}

everything is OK

 
A100:

If remove this. or remove virtual prefix from A::set(...) or remove replace function, by moving code to A::set(...),

+ if you run it in debug, everything's fine.
in normal compilation - bug
 
Urain:

I don't recall such a feature.

Why? Maybe if you change the question, there will be a solution.

ZS I got it to change the entire colour scheme with one click. Well enter a colour in parameters, and let the user change it in parameters.

That's the way it's done now. This is nonsense, because the colours are duplicated in the parameters and in the highlighted colour tab.

The need is simple - you need to put labels on the graph that match the colours of the lines selected by the users.

As far as I understand, Lizar is wrong, because PLOT_LINE_COLOR, according to documentation, sets index of buffer with coloring numbers (when one line is drawn alternately with different colours). My question isn't solved with this constant.

 
marketeer:

...

As far as I understand, Lizar is wrong, because PLOT_LINE_COLOR, according to documentation, sets buffer index with coloring numbers (when one line is drawn in different colours alternately). My question is not solved with this constant.

Try it like this:

color line_color=PlotIndexGetInteger(0,PLOT_LINE_COLOR);
 
marketeer:

This is the way it is done now. This is nonsense, because the colours are duplicated in the parameters and in the highlighted colour tab.

The need is simple - you need to put markers on the graph that match the colours of the lines selected by the users.

As far as I understand, Lizar is wrong, because PLOT_LINE_COLOR, according to documentation, sets index of buffer with coloring numbers (when one line is drawn alternately with different colours). My question is not solved with this constant.

You can. I have coordinated colours of buffers of two indicators, which are connected via events:

   if((id==MYEVENT_PLOT_FILE+CHARTEVENT_CUSTOM) && (sparam==FName)) 
   {
      if(lparam!=0) PlotIndexSetInteger(2,PLOT_LINE_COLOR,(int)lparam);
      FileRedraw();
      ChartRedraw(0);
   } 

I call this event (from another indicator) as follows:

      EventChartCustom(ChartID(),MYEVENT_PLOT_FILE,(long) PlotIndexGetInteger(0,PLOT_LINE_COLOR),0,FName);
Everything works.
 
MetaDriver:

Not true, it does.

Thanks, I'll give it a try. But still, is there anywhere in the documentation to read about this? I mean, it should be written thatPLOT_LINE_COLOR allows to set and read the colour of a regular buffer, not a "multicolor" one.
Reason: