» 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


~49min ago

welovemedia: Big thanks for the stream, will this stay online or be shared as a download for those who could not watch it live?

~3h ago

CeeYaa: Big THX for the daylong streaming - and amazing Project Insights https://www.twitch.tv/videos/412932722

~15h ago

u7angel: twitch livestream vvvv gamma

~2d ago

u7angel: @domj, sure

~2d ago

domj: @u7angel: nice! How about the talk later at 7?

~2d ago

u7angel: vvvv-gamma-presentation will be streamed on twitch, starts 2pm, channel name is vvvv gamma

~2d ago

joreg: vvvv heads in #hamburg #kiel: if you're bored this thursday, please come join us for a workshop and/or talk: vvvv-gamma-presentation

~3d ago

sebescudie: @teckor: maybe ui-plugin ?

~3d ago

tekcor: wasn't there a contribution for making native windows GUIs?

~4d ago

joreg: Looking for a #vvvv job in #berlin? don't miss this one: https://discourse.vvvv.org/t/looking-for-vvvv-artists-permanent-in-berlin/17448