pattr, textedit, and whitespace

Mar 12, 2008 at 7:38am

pattr, textedit, and whitespace

I am binding a pattr to a textedit. I need to know when the textedit is empty, but when it’s empty pattr refuses to output anything even though I can see the value change to nothing in the pattrstorage window.

It seems that empty strings will not be passed from one object to another (try hooking up an empty message box to a print object).

Here’s the best workaround I have right now, but I think it’s pretty nasty. Anyone have a better option?

#P button 331 115 15 0;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 290 143 50 196617 print bar;
#P newex 331 84 51 196617 pattr bar;
#P objectname bar;
#P user textedit 351 135 451 185 32900 3 9;
#P objectname textedit[1];
#P newex 222 117 20 196617 t b;
#P message 155 112 61 196617 set ” ” , set;
#P newex 92 224 46 196617 select 1;
#P newex 92 200 34 196617 zl len;
#P button 72 120 15 0;
#P newex 28 149 49 196617 print foo;
#P newex 66 42 67 196617 pattrstorage;
#X client_rect 20 74 660 314;
#X storage_rect 0 0 640 240;
#P objectname u094000074;
#P newex 72 89 50 196617 pattr foo;
#P objectname foo;
#P user textedit 92 140 192 190 32900 3 9;
#P objectname textedit;
#P connect 1 0 3 0;
#P connect 1 0 4 0;
#P connect 10 0 11 0;
#P connect 10 0 12 0;
#P fasten 7 0 0 0 160 134 97 134;
#P connect 1 1 0 0;
#P connect 0 0 5 0;
#P connect 5 0 6 0;
#P fasten 6 0 7 0 97 245 252 245 252 105 160 105;
#P fasten 8 0 0 0 227 134 97 134;
#P fasten 0 1 8 0 142 196 245 196 245 112 227 112;
#P connect 10 1 9 0;
#P window clipboard copycount 13;

#36311
Mar 16, 2008 at 8:28am

Adam Murray schrieb:
> Here’s the best workaround I have right now, but I think it’s pretty
> nasty. Anyone have a better option?

For the solution of that problem its a patch of beauty…

Thanks for sharing…

Stefan


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com

#124523

You must be logged in to reply to this topic.