[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Dynamically expanding target layer
All of the data structures in pdp++ are dynamic, so it should not be
difficult. For example, to create new units in a layer, in css script
code:
.layers.Target.units.New(1); // create 1 new unit in "Target" layer
Connecting them is also not difficult (connecting 1st unit in each
layer):
.layers.Target.units[0].ConnectFrom(.layers.Hidden.units[0],
.layers.projections.Fm_Hidden);
you just need to create the projection in advance. use a
"CustomPrjnSpec" as the projection spec.
note that you can only refer to layers, etc by name in css -- if you
want to do this in hard code, you'll need to either Find things by
name or know the appropriate indexes.
- Randy