» creating and deleting pins at runtime
This site relies heavily on Javascript. You should enable it if you want the full experience. Learn more.

creating and deleting pins at runtime

there're situations were one needs to create pins at runtime depending on the value of some config pin. for example consider the Expr (Value) node. it creates input pins for each given variable name.

with beta28 coming up this kind of task got considerably easier to do with a new interface called IIOFactory.
it basically provides a method to create so called IO containers, containing the actual "view" on the pin data (such as ISpread) and controlling the lifetime of it.

say we want to create an ISpread<ISpread<T>> during runtime, we do something like this:

IIOFactory FIOFactory;
var inputAttribute = new InputAttribute("Input Foo");
var inputFooContainer = FIOFactory.CreateIOContainer<ISpread<ISpread<T>>>(inputAttribute);
var inputFooSpread = inputFooContainer.IOObject;

in case we decide to get rid of those two pins which are used by inputFooSpread we simply call Dispose on the associated IO container:


for details and as a starting point have a look at the new dynamic plugin template contained in beta28, which creates inputs and outputs on the fly, when changing the associated config pins.

Elias, Tuesday, Aug 7th 2012 Digg | Tweet | Delicious 0 comments  
  • 1

anonymous user login


~5d ago

joreg: @micha_nismus instead of discord, we're using matrix, see: chat

~5d ago

micha_nismus: searching for a public discord server for vvvv

~12d ago

joreg: Join us for the 20th #vvvv meetup on January 19th: https://thenodeinstitute.org/event/20-worldwide-vvvv-meetup/

~12d ago

joreg: @schlonzo re "SDSL support" did you see the Shader wizard? or do you mean something different?

~13d ago

joreg: @LCA not aware, but the HIKVision sdk comes with a c# demo. need help for a commercial project? get in touch via devvvvs@vvvv.org

~14d ago

LCA: Has anyone ever made a HIKVision GigE work with vvvv?

~18d ago

schlonzo: What's the shortcut Anton used? =)

~18d ago

schlonzo: The extension manager for C# projects is an awesome addition! Could you pretty please add SDSL support?

~2mth ago

joreg: For latest #vvvv news, please follow us on #Mastodon https://mastodon.xyz/@vvvv

~3mth ago

manuel: very cool to generate matcap / cubemap for reflections https://cables.gl/p/pDCOCw