MATLAB Object-Oriented Programming

(Joyce) #1

  • Enumeration block removed — Enumeration members are taken out of use.

  • Superclass definition changed — Changes applied to all subclasses in the hierarchy of
    that superclass.

  • Superclass added or removed — Change of superclass applied to all existing objects.


Actions That Do Not Trigger Updates


These actions do not update existing objects:



  • Calling the class function on an out-of-date object

  • Assigning an out-of-date object to a variable

  • Calling a method that does not access class data

  • Changing property validation in the class definition (“Validate Property Values” on
    page 8-24)


Objects do not update until referenced in a way that exposes the change, such as invoking
the object display or assigning to a property.


Multiple Updates to Class Definitions


Updates do not occur incrementally. Updates conform to the latest version of the class.


Object Validity with Deleted Class File


Deleting a class definition file does not make instances of that class invalid. However, you
cannot call methods on existing objects of that class.


When Updates Are Not Possible


Some class updates result in an invalid class definition. In these cases, objects do not
update until the error is resolved:



  • Adding a superclass can result in a property or method being defined twice.

  • Changing a superclass to be Sealed when objects of one of its subclasses exists
    results in an invalid subclass definition.


Automatic Updates for Modified Classes
Free download pdf