[bug?] pcontrol 'load' and patcherargs

mexx's icon

Hi there,

I've encountered some inconsistency when using the 'load' message to 'pcontrol' to load a patcher which contains a 'patcherargs' object:

If I try to pass arguments with the 'load' message (like 'load argtest foo bar'), all the #1, #2 etc. strings are correctly replaced as stated in the docs, however the 'patcherargs' object does not seem to see them. Is this expected?

Here's two simple patchers to demonstrate the issue. Save the first patcher in your max search path as 'argtest.maxpat', then click on the message box in the second patcher. You will notice that the 'print pos' in the loaded patcher does not print anything.

Max Patch
Copy patch and select New From Clipboard in Max.

argtest.maxpat:

Max Patch
Copy patch and select New From Clipboard in Max.

loader.maxpat:

mexx's icon

(sorry, replying to self)

In case it matters: I've seen this with Max5 46462 and 41767, on MacOS 10.5 and 10.6.

Simon Dawes's icon

Found your post whilst looking to solve the same issue myself.

In case you never resolved it, or if anyone else needs help and finds this thread:

Don't bother with [patcherargs] in the child patch, try this instead:

[loadbang]
|
(#1, #2)
|
[route foo bar]

In the parent patch, I'm running (load mypatch.maxpat foo bar) into [pcontrol].

The [loadbang] in mypatch.maxpat fires the ($1, $2) message every time I open the patch, but the [route] object stops them from getting past if I open the patch through the File Menu or some other means.

When I open it with those exact (foo bar) arguments, [route] lets them pass.

Hope it helps someone.

–Dawes