Forums > MaxMSP

folder object — confirmation of message order?

July 2, 2008 | 12:15 pm

whilst patching with the folder object, i noticed the messages it outputs come out in an unexpected order.

when folder object is sent a path, it outputs the following messages:

left output: clear, filename #1, filename #2, filename #3 (etc… until no more files)

right output: int (number of items at path location)

the strange thing is it outputs in left to right order, as opposed to the conventional right to left order. so the left output will come out first, then the number of items out the right outlet.

now i’m wondering whether this is normal behaviour, or a bug… i would assume it would be more useful to have the number of items first, then the list of files out the left???

any insights appreciated…

justin


July 3, 2008 | 10:44 am

It is normal.

Right-to-left is a *convention* in Max. It is not a law of nature. There are a handful of objects that break the convention for any number of reasons. With folder, it presumably doesn’t know how many files are in a folder until after it’s sent all the file names out the left inlet. Not being able to go backwards in time, right comes after left.

I expect the behavior could be modified, but there are now about 10,000,000,000,000 patches that rely on existing behavior.


July 3, 2008 | 11:40 am

Quote: Peter Castine wrote on Thu, 03 July 2008 11:44
—————————————————-
> It is normal.
>
> Right-to-left is a *convention* in Max. It is not a law of nature. There are a handful of objects that break the convention for any number of reasons. With folder, it presumably doesn’t know how many files are in a folder until after it’s sent all the file names out the left inlet. Not being able to go backwards in time, right comes after left.
>
> I expect the behavior could be modified, but there are now about 10,000,000,000,000 patches that rely on existing behavior.
—————————————————-

thanks peter, i just noticed this whilst going through some abstractions i have for loading files. i’m in the process of transferring some of my patches from 4 > 5… and i have been running into a few quirks.

another issue is with absolutepath which has lost its last "/" separator in max 5… (?)

see: http://www.cycling74.com/forums/index.php?t=msg&goto=146521&rid=789&S=0a2f252c94e869460cf533dcb7fc53d9#msg_146521

i know i can fix all these problems with a bit of patching, but i just wandered if it was intentional.

bw,

j


July 3, 2008 | 12:05 pm


Viewing 4 posts - 1 through 4 (of 4 total)