Re: [PD] data structures and library abstraction question
Hallo, Rich E hat gesagt: // Rich E wrote: > I just had a look at Frank's data structure tutorial, in which he suggests > making a library abstraction for all structure templates. This seems like > something I have to do for some patches I'm working on, but it would also be > nice to just be able to check if the library is open, and if not, to open > it. > > So the question is, is there a way to check if a certain abstraction is > already open? You could use a so called singleton. I'm using a crudbe, but working one in sssad which you could just grab. It's a wrapper abstraction which you call with the name of another abstraction as argument. It will make sure, that the passed abstraction is created only the first time, the singleton is used. Ciao -- Frank Barknecht _ __footils.org_ __goto10.org__ ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Re: [PD] data structures and library abstraction question
On Tue, 2007-01-30 at 15:07 -0800, Rich E wrote: > Hi all, > > I just had a look at Frank's data structure tutorial, in which he > suggests making a library abstraction for all structure templates. > This seems like something I have to do for some patches I'm working > on, but it would also be nice to just be able to check if the library > is open, and if not, to open it. > > So the question is, is there a way to check if a certain abstraction > is already open? > if i understand right, what you want to do, implementing such a test mechanism is very easy. put this somewhere into your abstraction: [r isitthere] | [s yesitsthere] then you can easily check, if the library abs is open by sending a bang to [s isitthere]. when you receive a bang on [r yesitisthere], your abstraction is obviously open :-) roman ___ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
[PD] data structures and library abstraction question
Hi all, I just had a look at Frank's data structure tutorial, in which he suggests making a library abstraction for all structure templates. This seems like something I have to do for some patches I'm working on, but it would also be nice to just be able to check if the library is open, and if not, to open it. So the question is, is there a way to check if a certain abstraction is already open? Regards, Rich ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list