Changes between Version 45 and Version 46 of mvc


Ignore:
Timestamp:
02/19/24 17:11:54 (9 months ago)
Author:
wouter
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • mvc

    v45 v46  
    142142MVC2 is not thread safe. If different editors try to modify different components simultaneously, conflicts may arise. Thread safety was not considered in the design because normally GUIs are not multithreaded.
    143143However, some issues related to this can still arise. For instance a custom table cell editor may open, and it may stay open until you press enter, if you go editing something else and then later press enter, odd things may happen.
     144
     145
     146
     147== model and immutable object
     148Usually the base objects are immutable, while the model that edits the objects is by definition mutable.
     149One approach would be to create an adapter that takes the base model and maps an adapter around it. But for more complex base objects, the adapter tends to become unreadable very quick.
     150Instead we recommend to make a XModel for every base object X. The XModel then contains a set of YModels for all Y that are in X. Also the XModel attaches listeners to these YModels so that it can notify its listeners about changes in submodels. This way, XModel can deliver the proper YModel for contained objects without extra adapter code. XModel can also contain a getX() that returns a base object X from the current settings in the XModel.