<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Message</TITLE>
<META content="MSHTML 6.00.2900.2963" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=272485112-14092006><FONT face=Arial color=#0000ff
size=2>Hi,</FONT></SPAN></DIV>
<DIV><SPAN class=272485112-14092006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=272485112-14092006><FONT face=Arial color=#0000ff size=2>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.. </FONT></SPAN></DIV>
<DIV><SPAN class=272485112-14092006><FONT face=Arial color=#0000ff size=2>Like
this one:</FONT></SPAN></DIV>
<DIV><SPAN class=272485112-14092006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=272485112-14092006><FONT face=Arial color=#0000ff size=2>let t1
= project.allInstancesOf( meta::MyModel)->size in t1 = 1</FONT></SPAN></DIV>
<DIV><SPAN class=272485112-14092006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=272485112-14092006><FONT face=Arial color=#0000ff size=2>This
constraint can be attached to any object in your metamodel, it will still count
the total number of MyModels in the whole project. </FONT></SPAN></DIV>
<DIV><SPAN class=272485112-14092006><FONT face=Arial color=#0000ff size=2>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.</FONT></SPAN></DIV>
<DIV><SPAN class=272485112-14092006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=272485112-14092006><FONT face=Arial color=#0000ff size=2>br,
Zoli</FONT></SPAN></DIV>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma size=2>-----Original Message-----<BR><B>From:</B>
gme-users-bounces@list.isis.vanderbilt.edu
[mailto:gme-users-bounces@list.isis.vanderbilt.edu] <B>On Behalf Of </B>Nicki
Lehmann Møller<BR><B>Sent:</B> Wednesday, September 13, 2006 3:39
AM<BR><B>To:</B> gme-users<BR><B>Subject:</B> [gme-users] single fixed
model<BR><BR></FONT></DIV>Hi All!<BR><BR>Here is a hopefully very simple
question that I however haven't found the answer for yet :(<BR>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? <BR><BR>-- <BR>Kind Regards, <BR>Nicki </BLOCKQUOTE></BODY></HTML>