Hello all, this is yet another question regarding classes and instances. I am still not happy how the user library and classes are handled and I intend to achieve the following behavior:
After creating a model, i have an option to convert it to a class, save it to a file and then add an instance to the user library. Now i can build models using the classes (instances) from the user library and when changing the base class, all instances will change as well (no matter if they are opened or not). Furthermore, instances must be able to override attributes of the contained elements (e.g. mapping information), but elements from the instances should be removed whenever they are removed from the base class. Problems now occur when editing the base class after instances have been created in other models: - First, after changing the base class, changes are not propagated to all instances (as they don't defer to an actual entity but rather to the file on disk). Thus, every entity with a "source" attribute should look up in the actual file every time it is accessed. Or, this is easier, all open models should be "reloaded" after changing a base class. - Second, when an element is removed from the class definition, it should not occur even if it has overridden some parameters before. Thus, when loading an instances, Ptolemy should check whether the entity/component is still present in the base class and delete it from the instance if necessary. Maybe you can give me some suggestions, Hans ---------------------------------------------------------------------------- Posted to the ptolemy-hackers mailing list. Please send administrative mail for this list to: [EMAIL PROTECTED]