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

  • doc & API consistency question

    I'm having trouble intuitively using set/get methods versus accessing the fields directly.

    In some cases, get/set aren't there, in some cases writing directly to a field is unsafe, but I haven't yet determined a pattern as to when to use which.

    Is there a pattern I should be aware of, or is it just a matter of get/set haven't been implemented yet and they are coming soon (for example ViewPane.setLoadingMessage("...."))?

    If no change is planned, a suggestion: please mirror inherited methods and fields of ancestors in the docs rather than requiring a drill up to find them.


  • #2
    Hi JT,

    We recommend using setProperties for dynamic property setting. It automatically looks up setters. As of recently, the flags documentation links to setProperties() to make this more discoverable.

    Also recent, all properties that have a getter or setter automatically link to them in docs.

    About cascading properties from superclasses in the doc viewer: we've considered this, but it doesn't work well when the base class (Canvas) has 254 properties and methods. It's possible we'll add this as an option for end users in the documentation viewer. For the time being, we are selectively aliasing superclass documentation into subclasses in situations where it's likely the functionality would be used in the subclass.