Hi zoli,<br><br>Thank you for your quick reply.<br><br><div><span class="gmail_quote">On 9/14/06, <b class="gmail_sendername">Zoltan Molnar</b> <<a href="mailto:zolmol@isis.vanderbilt.edu">zolmol@isis.vanderbilt.edu</a>
> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>
<div>
<div><span><font color="#0000ff" face="Arial" size="2">Hi,</font></span></div>
<div><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div><span><font color="#0000ff" face="Arial" 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><font color="#0000ff" face="Arial" size="2">Like
this one:</font></span></div>
<div><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div><span><font color="#0000ff" face="Arial" size="2">let t1
= project.allInstancesOf( meta::MyModel)->size in t1 = 1</font></span></div>
<div><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div><span><font color="#0000ff" face="Arial" 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><font color="#0000ff" face="Arial" 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><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div><span><font color="#0000ff" face="Arial" size="2">br,
Zoli</font></span></div></div><div><span class="e" id="q_10dac688c5659621_1">
<blockquote style="border-left: 2px solid rgb(0, 0, 255); padding-left: 5px; margin-left: 5px; margin-right: 0px;">
<div></div>
<div dir="ltr" align="left" lang="en-us"><font face="Tahoma" size="2">-----Original Message-----<br><b>From:</b>
<a href="mailto:gme-users-bounces@list.isis.vanderbilt.edu" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">gme-users-bounces@list.isis.vanderbilt.edu</a>
[mailto:<a href="mailto:gme-users-bounces@list.isis.vanderbilt.edu" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">gme-users-bounces@list.isis.vanderbilt.edu</a>] <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></span></div><div></div>
</div><br>_______________________________________________<br>gme-users mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:gme-users@list.isis.vanderbilt.edu">gme-users@list.isis.vanderbilt.edu
</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users" target="_blank">http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users</a><br><br><br>
</blockquote></div><br><br clear="all"><br>-- <br>Kind Regards, <br>Nicki