hi list. im trying to figure out how to store/change values in unique tables/arrays and tabread them. 4 graph on parents: #N canvas 367 241 666 500 10; #X obj 85 78 readme; #X obj 368 77 readme; #X obj 84 257 readme; #X obj 367 257 readme; ....and readmees: #N canvas 163 363 649 501 10; #X obj 420 147 table $0-readme; #X obj 71 180 tabread $0-readme; #X floatatom 71 78 5 1 4 2 1-4 - -; #X floatatom 71 215 5 0 0 0 - - -; #X obj 71 266 outlet; #X obj 255 236 pack 0 0 0 0; #X floatatom 189 54 5 0 0 2 value1 - -; #X msg 215 215 bang; #X floatatom 340 50 5 0 0 2 value2 - -; #X floatatom 191 152 5 0 0 2 value3 - -; #X floatatom 341 156 5 0 0 2 value4 - -; #X msg 255 265 ; $0-readme 1 $1 $2 $3 $4 ;; #X connect 1 0 3 0; #X connect 2 0 1 0; #X connect 3 0 4 0; #X connect 5 0 11 0; #X connect 6 0 5 0; #X connect 7 0 5 0; #X connect 8 0 7 0; #X connect 8 0 5 1; #X connect 9 0 7 0; #X connect 9 0 5 2; #X connect 10 0 7 0; #X connect 10 0 5 3; #X coords 0 0 1 1 200 140 1; if someone has a hint please link me. thanx in advance daniel
Hallo, daniel hat gesagt: // daniel wrote:
im trying to figure out how to store/change values in unique tables/arrays and tabread them.
In you patch, you use $0 inside a bessage box, which is like using 0 in a message box. All $-variables work different when used in messages and when used as object arguments. Read the html-documentation for the details.
The solution in your case actually is very simple: Use a sender object to write to the table: [s $0-readme]. Or [tabwrite $0-readme]. Or (more complicated, but also more flexible):
[symbol $0-readme]
|
[makefilename pd-%s]
|
[pack 0 0 0 s] | [; $4 $1 $2 $3(
You also should trigger your floats "value1-4" correctly by using a [t b f] after each of them (but the first). Otherwise it's totally undefined if you first send the "bang" or the float value to the pack construct.
Frank Barknecht _ ______footils.org__
_ __latest track: "scans" _ http://footils.org/cms/show/41
Hallo, Frank Barknecht hat gesagt: // Frank Barknecht wrote:
The solution in your case actually is very simple: Use a sender object to write to the table: [s $0-readme]. Or [tabwrite $0-readme]. Or (more complicated, but also more flexible):
[symbol $0-readme] | [makefilename pd-%s]
Ah, sorry, this might be a bit confusing: You don't need the makefilename stuff for sending to a table as in your example. But the [makefilename pd-%s] is a common idiom for doing dynamic scripting where you want to use a [pd $0-subpatch] as target and need a sender like "[s pd-$0-subpatch]" which cannot be done with the normal [s] object.
Frank Barknecht _ ______footils.org__
_ __latest track: "scans" _ http://footils.org/cms/show/41