Actually what I have doesn’t affect the local vars.
I have a Component with two inputs:
1 - a 1x1 dat containing a path
2 - a nx2 dat containing a list of variables and their values
the component’s goal is to basically define the variables where the path points.
I’ve done this to make variable definition for variables that are used down the line more transparent - a sort of “settings” table if you will.
so the goal is also to optimize the definition to only those vars that are needed to be processed.
because of that I have 4 separate outcomes in the component:
1 - new variables to add
2 - old variables to delete (not in “Current” but in the locked “Old” - they are no longer on input)
3 - variables which have had their content changed.
4 - a monitor for path changes (unsets all from old path - sets them to new)
I really didn’t want to mess with /local - I’ve been burned enough times to know better than assume that the internal workings of Derivative’s components will stay the same (as it shouldn’t - that’s what encapsulation is for)
my problem is mainly related to the initialization, because these variable definition components are inside master components which - when I run a “Make” script, get created by the handful in deeply nested hierarchies. And since the input table may itself be relying on other variables that may or may not be defined at the moment of evaluation, I end up having to go through some big hoops - too big as after a day of going crazy on it my “OnVarChanged” script is now executing by looking at a chop that tells it if there are more than 1 row of vars to process: the on DAT changed somehow failed to trigger (I would know because OnVarChanged then basically resets the table its looking at at the end of the script).
That’s because the entire tree is created in one frame, and I believe things like “On DAT changed” get triggered on a frame by frame basis, while “OnCreate” … well… it gets triggered once, but often somewhere in the middle of the tree cooking after its creation, so often the vars are not quite valid, they get processed by the OnCreate, but then they change and since the On Dat changed doesn’t run at creation frame, I’m left with unprocessed triggers.
I don’t think the whole Touch cooking system is intellectually simple and predictable as it should be (although to make it that simple may take years of complicated solutions ).
I mean it’s predictable how things cook, but it doesn’t really apply to the realities of how they need to cook.
For example I have /JOBS/TEST/ZZ/ACTORS which mantains a list of children, and sets a variable under /JOB/TEST/ called $ACTORS, which may be used by /JOBS/TEST/RENDERS - which I believe will cook - when all is created in one frame - before ACTORS. and if RENDERS has a variable definition table in which you have:
RENDER_OBJS $ACTORS
then you can immediately see my problem. OnCreate will define a $RENDER_OBJS which is empty, and the OnDatChanged will not be triggered when the tree is done creating (because again the whole tree is created by the same script).
If you got to this point I apologies… I wrote this mainly to clear my head… hoping that some sort of smart RFE would emerge from it… more like an RFS (Request For Solution)
in any case I just would need a compare DAT to make the 4 trees faster and cleaner - it would cut my operators in those components by 90% I’m sure.
good night…d