Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    12.1p+ SpinnerItem Fluent setter and type inaccuracies/problems

    Hi Isomorphic,

    please see the SpinnerItem docs (12.1p (2023-04-07)):

    There are min/max setters accepting Double and Integer. Only the double ones are fluent.
    Then setStep() is only available as primitive double. This seems strange.
    setDefaultValue() is available as Double or Integer, but again not fluent.


    Click image for larger version

Name:	SpinnerItem.PNG
Views:	119
Size:	7.4 KB
ID:	269979

    In general I'd think that those setters/getters should be primitive type, if there is no good reason for objects?

    Best regards
    Blama

    #2
    We made some changes so that the setMin/Max() and setStep() methods return the instance instead of void and different signatures of these methods have been added so that all of them match with the type of parameters they receive.

    All these changes will be available as of tomorrow's builds Apr 18.

    Regards
    Isomorphic Software

    Comment


      #3
      Hi Isomorphic,

      I can see the changes in the 12.1p (2023-04-18)-docs.
      Some (minor) things are still strange, though:
      • setStep/Min/Max have primitive double and object Double setters.
      • setNextValueHandler / setPreviousValueHandler are not fluent.
      • setDefaultValue (Integer/Double) is not fluent.
      Having a look at the parent class TextItem this also applies to
      • setSelectionRange
      • setPastedValueTransformer
      Having a look at ComboBoxItem this affect ~20% of the setters.

      I assume this will affect many Canvas. Do you have the possibility to automatically check for this somehow? All this is very minor, but it seems this should be consistent.

      Best regards
      Blama

      Comment


        #4
        We have already made all automatically-generated setters fluent, but there are a number that have to be hand-written, generally for stupid Java reasons.

        Right now, we do not have a project planned to go through and make them all fluent. It would be a valid Feature Sponsorship if it happens to matter a lot for you.

        Comment


          #5
          Hi Isomorphic,

          as I said, this is very minor. I happened to notice it with SpinnerItem and started to wonder.

          Best regards
          Blama

          Comment

          Working...
          X