It looks like you're new here. If you want to get involved, click one of these buttons!
I'd like to talk about an aspect of blocks that took me an embarrassingly long time to get my head around: that a block's 'in' port values are mutable and that this is not a bug but a necessary part of doing anything with blocks.
An example I was working on:
An example from a built-in block preset - this is pulled by the daisy chained 'in' port which is modified by this block.
I kept getting confused by this and feeling like I was breaking the rules by doing this, since I've been trained to look at a graph and if I see a port with its icon on the left of the node it's an 'in' port, and that value can't be modified by the node. Given that these ports are really 'io' ports, I think I partially understand why this is like this. it's because inside the block, the "out" side of an 'io' port wouldn't make sense, so all ports are 'in' ports as far as the UI goes and 'io' ports as far as the compiler goes. Is that roughly correct?
This may seem like a silly thing to complain about but it's really making a mess of my mental model of the graph. Perhaps a better way would be- allow users to create both 'io' and 'in' ports on blocks. 'in' ports would be immutable inside the block as usual, and 'io' ports would be mutable but would not have the "out" side exposed inside the block. On the outside of the graph, these ports would be shown with the port name in the center of the node.
Anyway, my handle on all this is still tenuous so please set me straight if I have any of this wrong.
©Copyright 2017 Fabric Software Inc. All rights reserved. | Privacy