[gme-users] single fixed model

Zoltan Molnar 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.
br, Zoli

-----Original Message-----
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
To: gme-users
Subject: [gme-users] single fixed model

Hi All!

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? 

Kind Regards, 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.isis.vanderbilt.edu/pipermail/gme-users/attachments/20060914/1151aa2c/attachment.htm

More information about the gme-users mailing list