Forums > MaxMSP

right to left order in the folder object ?


VG
October 11, 2006 | 2:33 pm

I just noticed after banging my head quite a while on the initialisation
procedure of a fairly complex patch, that the "folder" object outputs
first the append messages on the left outlet, ****** then *****
the number of items in the folder, on the right outlet.

Which appears kind of a crime in the right-to-left-ruled max world.
but ok, maybe the hidden law in max is not to take anything for granted,
hehe

Is it just a bug, or is on purpose?
I didn’t find any mention to this in the reference manual.


October 11, 2006 | 3:04 pm

> Is it just a bug, or is on purpose?
> I didn’t find any mention to this in the reference manual.

this is on purpose (there’s been a thread on this before, i think). this
exception to the right->left rule is based on the following usage theory:

1) you tell [folder] which folder to search (via a message).

2) [folder] puts out its series of a ‘clear’ message followed by ‘append’
messages to a [umenu].

THEN

3) [folder] tells you how many items it found via an int out the right
outlet, which you can then use to synchronously start something else (e.g.
a process iterating through the items in the [umenu]).

the principle here is that it’s not very useful to know how many items are
in a folder before you can access what they actually are. if this were
the case you would start stuff going based on the item count only to find
out that, due to that _other_ max rule of depth-first stack execution,
you’re querying things in the [umenu] that haven’t arrived yet because the
left outlet of [folder] hasn’t output the filenames.

if we were to remake the [folder] object again from scratch we’d probably
switch the outlets so that it would have this behavior _and_ follow the
right->left rule. but we can’t, though you could easily make an
abstraction containing a [folder] with this outlets crossed if you feel
this is upsetting the tao of max…

as for documentation, we’ll make a note to put something about it in the
reference page for the [folder] object. thanks for pointing that out.

all the best.

/luke

On Wed, 11 Oct 2006, Vincent Goudard wrote:

> I just noticed after banging my head quite a while on the initialisation
> procedure of a fairly complex patch, that the "folder" object outputs
> first the append messages on the left outlet, ****** then *****
> the number of items in the folder, on the right outlet.
>
> Which appears kind of a crime in the right-to-left-ruled max world.
> but ok, maybe the hidden law in max is not to take anything for granted,
> hehe
>
>
>
>

————————–
R. Luke DuBois
Computer Music Center, Columbia University
e-mail: luke@music.columbia.edu
www: http://www.lukedubois.com
www: http://www.FreightElevatorQuartet.com
phone: (212)-854-9266 fax: (212)-854-9267
————————–


October 11, 2006 | 4:49 pm



VG
October 11, 2006 | 5:20 pm


October 11, 2006 | 5:38 pm

you cna use strippath, or check the info for ubu, it doesnt have to
output the whole path :)

Id love ubu with a submenu.

v a d e //

http://www.vade.info
abstrakt.vade.info

On Oct 11, 2006, at 1:20 PM, Vincent Goudard wrote:

>
>
>
> … about the ubumenu solution, i thought it doesn’t work for my
> patch because it output the whole path when one click on an item.
> And i just want to use the name of the file to recall a buffer (or
> a texture) name which I make the same as the filename.
>
> This is the occasion to ask to the C74 team if there is a chance to
> have ubumenu with submenu, like one find in the usual menubar.
> Would be OK to fill them the same way one does with the menubar
> object…
>


October 11, 2006 | 9:07 pm


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