[gme-users] single fixed model
zolmol at isis.vanderbilt.edu
Thu Sep 14 08:58:45 CDT 2006
Yes, a constraint could do it and i believe is the way to do it, because no other mechanism could check so simply and effectively..
Like this one:
let t1 = project.allInstancesOf( meta::MyModel)->size in t1 = 1
This constraint can be attached to any object in your metamodel, it will still count the total number of MyModels in the whole project.
Yet if you attach it to MyModel, and set its priority to 1, and you set the On Create or On New Child events to fire the constr. it will prevent realtime users from creating 2 instances.
From: gme-users-bounces at list.isis.vanderbilt.edu [mailto:gme-users-bounces at list.isis.vanderbilt.edu] On Behalf Of Nicki Lehmann Møller
Sent: Wednesday, September 13, 2006 3:39 AM
Subject: [gme-users] single fixed model
Here is a hopefully very simple question that I however haven't found the answer for yet :(
How should a single fixed model (singleton model object like Santa :-)) be created. I know this could be done using cardinality and constraints, but is this the correct way to do it?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gme-users