Bugs item #1573656, was opened at 2006-10-09 07:06 Message generated for change (Comment added) made by matju You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478070&aid=1573656...
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: puredata Group: v0.40.1 Status: Open Resolution: None Priority: 5 Submitted By: IOhannes m zmölnig (zmoelnig) Assigned to: Miller Puckette (millerpuckette) Summary: $arg-expansion gives error with old patches
Initial Comment: with the advent of the new and better $arg-expansion (namely: expansion of $args _within_ an argument, like bla-$2-blu), old patches (<0.40) that used dollars within symbols are somewhat broken.
example1: iemlib provides an object [parentdollarnull] with an alias [parent$0]; the latter gets expanded (e.g. to [parent1003]) and cannot be created. THIS IS NO BUG (imho) however, $0 is not only expanded on a logic level, but also on a visible level (i really see [parent1003]); this i believe IS a bug.
example2 (more important!): in the olde times, if a symbol contained dollars within, it was saved (in the .pd file) like "bla-$2-blu". in pd=0.40.0, the same symbol gets saved as "bla-$2-blu" (note the backslash). loading an old abstraction yields an error ("argument out of range"), even if enough arguments (in this case: 2) are supplied. the expansion works correctly though! imho, either the warning should be supressed or the old behaviour (no expansion) should be preserved.
(it would be good if the pd-version at the time of saving would be stored in the .pd-fileformat in order to allow such things)
this little script should replace all "$<n>" with a missing backslash at the beginning with "$<n>"
find . -name "*.pd" | while read f do sed -i -e 's|([^\])$|\1\$|g' $f done
note on the script: i haven't done excessive testing, but it seems to work; make backups before you apply it, since it will change all affected files without asking)
note: it seems like old versions (tested with pd-0.39-2) seem to be able to correctly read files saved with pd-0.40-0
----------------------------------------------------------------------
Comment By: Mathieu Bouchard (matju) Date: 2006-10-09 12:45
Message: Logged In: YES user_id=801174
PureUnity uses dollar-expansion in class names, so an exception cannot be made for class names, especially because PureUnity has no other way to implement its feature set.
I call this feature "abstraction templates" or "class templates": [f.swap], [~.swap], [#.swap] are like swap<float>, swap<signal>, swap<grid> would be in C++.
----------------------------------------------------------------------
Comment By: IOhannes m zmölnig (zmoelnig) Date: 2006-10-09 07:11
Message: Logged In: YES user_id=564396
also confirmed with 0.40.1
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478070&aid=1573656...