<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
hi<br>yes, it's for an external i'm writing.<br>i tried the global counter variable thing you recommended and it works, except for<br>when the first instance is duplicated, or copy/pasted in a patcher. this crashes pd.<br><br>do you, or anyone else, know of a working example of the global counter variable thing?<br><br>thanks<br>olli<br><br>&gt; Date: Sun, 23 Mar 2008 10:43:36 +0000<br>&gt; From: claudiusmaximus@goto10.org<br>&gt; To: ladataxi@hotmail.de<br>&gt; CC: pd-dev@iem.at<br>&gt; Subject: Re: [PD-dev] allow only one instance of external object<br>&gt; <br>&gt; best boy wrote:<br>&gt; &gt; hi<br>&gt; &gt; is there a way to keep track of the number of opened instances of an <br>&gt; &gt; external?<br>&gt; <br>&gt; Is this an external you are writing?  Then yes.  Otherwise there's weird <br>&gt; tricks you can probably do to keep track, but not control.<br>&gt; <br>&gt; &gt; if so, can anyone point me to an example object?<br>&gt; <br>&gt; Just have a global counter variable that you initialise to 0 in <br>&gt; foo_setup(), and in foo_new() you increment it, and in foo_free() you <br>&gt; decrement it.<br>&gt; <br>&gt; &gt; thanks<br>&gt; &gt; olli<br>&gt; <br>&gt; Claude<br>&gt; -- <br>&gt; http://claudiusmaximus.goto10.org<br>&gt; <br><br /><hr />Jetzt dabei sein und Windows Live Mail testen. <a href='http://ideas.live.com/programpage.aspx?versionId=5d21c51a-b161-4314-9b0e-4911fb2b2e6d' target='_new'>Windows Live Mail.</a></body>
</html>