fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search

    "Spread filter" block always set 5.0 fixed pips in the code

    Bug Reports
    2
    3
    1802
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      josecortesllobat last edited by

      Hi @fxDreema

      It looks like if the "Spread filter" block is always setting 5.0 as the value for the "spread" field even though it is set a different value or a constant.

      0_1544253297987_388b077a-02ef-4066-9a73-9dfa36ac7a7a-image.png

      Might it be related to the next code part?

      0_1544253506406_7af4e1b8-140b-4d4f-a798-0a255e33a3d4-image.png

      Thanks for looking over this issue.

      1 Reply Last reply Reply Quote 0
      • J
        josecortesllobat last edited by

        Hi @fxDreema

        Forget this. The bug is mine.

        Thanks

        1 Reply Last reply Reply Quote 0
        • fxDreema
          fxDreema last edited by

          Well, you can get very confused if you are looking at the code. I am using many classes linked together. In the past each block had it's own code, but the downside was that if you let's say use the same block copied 20 times in the project, the same code is printed in the source code 20 times. Then I introduced those classes and now the main code of the block is written 1 time (for most blocks, not for all) in a class that I call "model", and 1 separate class for each block where the parameters are set.

          So, in your screenshot what we have is one class that is the model for "Spread Filter", and in this class we have a constructor. What is a constructor? Some part of the class that is called once when we make instance of the class. In short, that value 5 is the initial value and it could be changed for every unique block. The actual value for "maxSpread" is set somewhere else in the code.

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post

          Online Users

          A
          E

          11
          Online

          146.7k
          Users

          22.4k
          Topics

          122.6k
          Posts

          Powered by NodeBB Forums | Contributors