
Trouble using dfref's that are stored in a dfref wave

I made a dfref wave in the root directory ( cd root; make/DF/N=1 refWave = { root:NameOFMyFolder } ; )
I try to use ( SetDataFolder root:refWave[0] ) and get "expected ';' or <cr>" with the left square bracket now highlighted in the command window.
I try inserting a point to the refWave [after the 0th index] in case for some random reason waves with one entry are not to be indexed.
So it seems that SetDataFolder sees root:refWave and says "ok, I need to find the folder root:refWave ... but this command is not ended with carriage return or ; ... so let's send an error"
I also cannot seem to print the 10-digit number which corresponds to the dfref ( print root:refWave[0] )
Any help on this issue is much appreciated.
I'm pretty sure you can not use datafolder reference waves on the command line.
In a function like
I get
•dostuff() root: root:myfolder:
which looks right.
August 3, 2022 at 10:23 am - Permalink
You wrote that the DF wave item is "root:NameOFMyFolder" and then tried SetDataFolder root:refWave[0] , which to my mind, expands to "root:root:NameOFMyFolder." This is surely going to raise and error.
August 3, 2022 at 01:47 pm - Permalink
Thank you all. Indeed, I do not see a way to use DF waves in command line or to pass a dfref between functions using DF waves in root: folder in a very direct way, but the workaround works fine.
In addition to the workaround posted above, I use something like:
August 4, 2022 at 12:05 pm - Permalink
> or to pass a dfref between functions using DF waves in root: folder in a very direct way
That is possible with something like
August 10, 2022 at 11:03 am - Permalink