Yes with visibility setting we can access an element of an array only,
so each state can be stored, retrieved, replaced at will by accessing an
element of te array... The matter is how accessing an element, idealy it
would be a [nbx] where max value is the number of array elements, or a
that's very easy, just get the number of elements from the array's
pointer, and send it as [max $1( to the nbox (or whichever command defines
the limits, I don't have Pd open).
scalar but I don't how it's possible to fix limits to [drawnumber]
I think not from the gui. Unless you enforce it programatically: route the
"change" output from the [struct] in the template, and use it to force the
maximum number to a [set] object. Like:
[struct drawnumber...] | [route change] | [50( (assuming 50 is the current max number) | [set drawnumber...]
In a parallel part, the current pointer gets and sets the maximum number
of elements (now at 50)
Look at the current help file for [drawnumber] for more details.
De: "João Pais" jmmmpais@googlemail.com Ã: "pd-list" pd-list@iem.at, "Patrice Colet" colet.patrice@free.fr Envoyé: Jeudi 20 Juin 2013 11:09:26 Objet: Re: [PD] Data structures: no object for freeing pointers?
One approach is to assign a variable for active/unactive scalars. And then use that variable to render the scalar visible/invisible. After a work session, the user can hide the active scalars, display the inactive ones, and select + delete these. It's still far from ideal, but a compromise.
Envoyé: Mardi 11 Juin 2013 11:25:23 Objet: Re: [PD] Data structures: no object for freeing pointers?
On Die, 2013-06-11 at 11:00 +0200, Jan Baumgart wrote:
I've been building a sequencer with data structs. But now I've come to a dead end, because there seems to be no object, that let's you remove structs. The only way seems to be deleting them in the gui.
It's still possible to put only one pointer and then arrays on it, then you can add or delete at the last array item, or it's possible to put an id at each array element and then remove the element id to delete, then it's possible to have undo's.
pc
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list