<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>> Date: Sun, 23 Mar 2008 10:43:36 +0000<br>> From: claudiusmaximus@goto10.org<br>> To: ladataxi@hotmail.de<br>> CC: pd-dev@iem.at<br>> Subject: Re: [PD-dev] allow only one instance of external object<br>> <br>> best boy wrote:<br>> > hi<br>> > is there a way to keep track of the number of opened instances of an <br>> > external?<br>> <br>> Is this an external you are writing? Then yes. Otherwise there's weird <br>> tricks you can probably do to keep track, but not control.<br>> <br>> > if so, can anyone point me to an example object?<br>> <br>> Just have a global counter variable that you initialise to 0 in <br>> foo_setup(), and in foo_new() you increment it, and in foo_free() you <br>> decrement it.<br>> <br>> > thanks<br>> > olli<br>> <br>> Claude<br>> -- <br>> http://claudiusmaximus.goto10.org<br>> <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>