Hi,
there is something strange going on with help-file searching for Lua objects, but it's probably not related to Lua objects alone. Here's what happens: I have a lua class, say helloworld.lua from pdlua's "examples" directory, and a help-file next to it, helloworld-help.pd.
Now I start pd with "-lib lua -path path/to/examples/", create a [helloworld] object and try to select it's context-help. Pd then complains:
sorry, couldn't find help patch for "helloworld.pd"
although helloworld-help.pd is next to helloworld.lua. For e.g. abstractions this works as you all know. But for Lua objects I must add the "path/to/examples/" to -helppath to be able to find the help files.
This doesn't seem to be specific to Lua: pdlua doesn't do anything regarding help file searches at all, "grep help pdlua/src/*" yields no results. So Claude and I suspect it's something with the loader functionality. Can someone comment on this?
Ciao
Hi Frank, all,
Frank Barknecht wrote:
This doesn't seem to be specific to Lua: pdlua doesn't do anything regarding help file searches at all, "grep help pdlua/src/*" yields no results. So Claude and I suspect it's something with the loader functionality. Can someone comment on this?
I did some digging through Pd's source code, specifically s_loader.c, and found the trick to make things loaded by loaders find help patches:
----8<---- /* defined in m_class.c but not exported. */ void class_set_extern_dir(t_symbol *); ----8<----
Use it like this:
----8<---- fd = canvas_open(canvas, name, ".lua", dirbuf, &ptr, MAXPDSTRING, 1); if (fd >= 0) { class_set_extern_dir(gensym(dirbuf)); /* Lua-specific loader stuff goes here. */ class_set_extern_dir(&s_); } ----8<----
Seems to work here, at least it finds help patches correctly now. In pdlua SVN at revision 496.
This is with pd-0.40-3 from Miller's site on Linux, fwiw.
Thanks,
Claude