filepath object and (lack of) recursiveness - bug fix or workaround?

Jeff Mann's icon

hi all -

there seems to be a bug with the filepath object, in that search paths
added by it are not searched recursively, until max is quit and started
again. is there some way to make max rebuild its search path to include
the sub-paths immediately?

i need this especially for using with max runtime, since i can't save
the file preferences and reopen (since there is no "file preferences"
menu item). i assumed i could use filepath to add search paths on the
fly in max runtime and have it work as max does normally (search paths
are searched recursively), but that isn't the case.

what happens is when i add a path, eg. send "set newpath" to a "filepath
search 8" object, i can see that the path is added in the file
preferences window. "newpath" is searched, but eg. "newpath/otherfolder"
is not searched. however, when i quit and restart max, then
newpath/otherfolder will be searched. not possible in runtime though,
and not possible to get recursive searching with eg. filepath 0.

am i missing some other way to add proper search paths in max runtime?
recursive temporary search paths in max? anyone have another workaround?

thanks...

pdelges's icon

Indeed, it's not recursive.
As a workaround you can use [filepath] with the [js folderiter ]
script, which is in the example/javascript/file/ folder. The process
can be slow, but it works.

_____________________________
Patrick Delges

Centre de Recherches et de Formation Musicales de Wallonie asbl
http://users.skynet.be/crfmw/max