ok, i've got one more issue with a patch. i use a DS array to build up a kind of toggle strip, which works fine so far, but when i close the patch i get the following erreor messages multiple times (6):
plot: pd-1006_arraystruct: no canvas for this template
can someone tell me, why this happens? especially when quitting the patch?
hre's the patch:
toggle_array.pd
thanks in advance!
-
plot error when closing data structure patch
-
@toxonic The reason for this error is the relatively stubborn way Pd renders its graphics. Pd uses Tcl/Tk for its GUI. Every frame, it renders all objects. So when you close a patch, it will one by one destroy every object. In between it will still try to render all remaining objects. The order in which objects are destroyed is dependent on the order they where created. So when the subpatch where the ds data is stored is destroyed before the [plot], this error occurs.
The solution is to change the order of creation by using cut and paste. Remember to clear the subpatch before messing with the [struct] object, or Pd will hang.
Anyhow, here i just used cut & paste on some subpatches and the error disapeared: toggle_array.pd
-
amazing - again, you made my day! i didn't even think of that fact... thanks anyway!