MetaCase Homepage
Forum Home Forum Home > > MetaEdit+
  New Posts New Posts RSS Feed - How to change type of an instance?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to change type of an instance?

 Post Reply Post Reply
Author
Message
alev View Drop Down
Contributor
Contributor
Avatar

Joined: 08.Oct.2010
Location: Arnhem, NL
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote alev Quote  Post ReplyReply Direct Link To This Post Topic: How to change type of an instance?
    Posted: 23.Oct.2010 at 20:52
Hi,

In this forum I read that one way of implementing a library of reusable "fixed" elements (say of type X) is to make an Object type from these elements (e.g. type Z). Both types are basically the same except that Z is read-only and values of its attributes are not default, but user predefined.

A possible scenario is that end-user would like to change type of an instance from Z to X, e.g. to be able to change it. Is it possible to change type "inplace", similar to the "replace" function of MetaEdit+ that works on instances of the same type?

Thanks!
Back to Top
stevek View Drop Down
MetaCase
MetaCase
Avatar

Joined: 11.Mar.2008
Points: 643
Post Options Post Options   Thanks (0) Thanks(0)   Quote stevek Quote  Post ReplyReply Direct Link To This Post Posted: 26.Oct.2010 at 15:42
Changing the type of an object on the fly would risk breaking rather a lot of constraints, particularly if the object is reused elsewhere.
 
Better is to apply convention over configuration: if you don't enter anything for a property, some default value is assumed in the generator. That lets the modeler create models quickly, and easily override the defaults where necessary. It also lets the metamodeler improve the default values later without having to change existing instances.
 
I'm not sure I understand your first two sentences: Do you mean using Fixed List properties with just one value in the list? Or promoting a reusable element to be a type? Using a type instead of a reusable element is described in section 5.4 of our DSM Workshop paper, listed as the first of Monday's sessions here: http://www.dsmforum.org/events/DSM10/.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.05
Copyright ©2001-2022 Web Wiz Ltd.

This page was generated in 0.039 seconds.