(Simple ?) pattr/ubumenu question

Dec 26, 2006 at 8:38pm

(Simple ?) pattr/ubumenu question

Hello. Ive searched the archives, and did not see an obvious answer
to my question. In the following patch, I would very much like the
pattr bound to the ubumenu to output the index, not the symbol of the
associated selection.

Ive checked the docs, and cannot figure this out. Is it possible to
tell pattr to output a specific outlet? pvar can be used as it has an
argument for setting the number of outlets. it would be nice to use
one object rather than 2 however. Thanks!

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 41 203 32 196617 print;
#P newex 41 144 103 196617 pattr menu menutest;
#X prestore 1 0 b;
#P objectname menu;
#P user ubumenu 38 67 100 196617 0 1 1 0;
#X add a;
#X add b;
#X add c;
#X add d;
#X add e;
#X add f;
#X add g;
#X add h;
#X add i;
#X add j;
#X prefix_set 0 0 0;
#X pattrmode 1;
#P objectname menutest;
#P comment 187 151 257 196617 how do I get pattr to print/output the
ubumenus index?;
#P connect 2 0 3 0;
#P window clipboard copycount 4;

v a d e //

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

#29382
Dec 27, 2006 at 3:58am

> Ive checked the docs, and cannot figure this out. Is it possible to tell pattr
> to output a specific outlet? pvar can be used as it has an argument for
> setting the number of outlets. it would be nice to use one object rather than
> 2 however. Thanks!

I don’t really understand your question, but would “pattrmode” be useful to
you, like that:

#P toggle 38 25 15 0;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P message 38 49 71 196617 pattrmode $1;
#P newex 41 203 32 196617 print;
#P newex 41 144 103 196617 pattr menu menutest;
#X prestore 1 0 5;
#P objectname menu;
#P user ubumenu 38 67 100 196617 0 1 1 0;
#X add a;
#X add b;
#X add c;
#X add d;
#X add e;
#X add f;
#X add g;
#X add h;
#X add i;
#X add j;
#X prefix_set 0 0 0;
#P objectname menutest;
#P comment 187 151 257 196617 how do I get pattr to print/output the
ubumenus index?;
#P connect 4 0 1 0;
#P connect 5 0 4 0;
#P connect 2 0 3 0;
#P window clipboard copycount 6;

#91774
Dec 27, 2006 at 6:10am

#91775
Dec 27, 2006 at 6:13am

#91776

You must be logged in to reply to this topic.