Em dom., 27 de fev. de 2022 às 20:26, José de Abreu abreubacelar@gmail.com escreveu:
but not all objects works if the flags appear in different order,
I know, that's because they should come first! This is why I think it's confusing that sigmund~ doesn't complain and it just works...
[netreceive -u 5000] will listen to port 5000 and will use udp protocol,
but [netreceive 5000 -u] will listen to port 5000 and use tcp protocol!! -u is ignored in this case...
yup, wrong order, so it gets ignored, but a warning should be given that the order is wrong, so it's ignored!
but on the other hand, pd also has the opposite case, where flags comes in the end, they are on the text family objects, specifically the [text sequence] object
[text sequence text-help-seq2 -g], the -g goes after the creation argument with the name of the text... and -w or -t also goes in the end
I'm almost done writing the reference for all objects, there are 6 to go, and I didn't get to [text] yet, ahahahaha, so I was missing that one in my radar.
Em dom., 27 de fev. de 2022 às 20:58, Christof Ressi info@christofressi.com escreveu:
[text sequence] is really an outlier. Typically, flags come *before* positional arguments, but *after* "methods", see [text define]. Here the flags come *after* the first (and only) positional argument. To add more to the confusion, there is a problem with the flag parsing: https://github.com/pure-data/pure-data/issues/1579
I haven't looked closely but I believe the best thing to do here is to make the code allow these flags coming before the array name and document it as such! It should also work by creating them in the wrong order as in sigmund~ though.