hi when reading from a *.plist file in tcl, if the value asked is an array, I get a string:
if {![catch {exec defaults read org.puredata $akey} arr]} { puts $arr }
// this string is printed ( "foo", "bar" )
is there any elegant way to get this array as a tcl list directly ?
cheers, _y
On Thu, 2011-03-24 at 19:43 +0100, yvan volochine wrote:
hi when reading from a *.plist file in tcl, if the value asked is an array, I get a string:
if {![catch {exec defaults read org.puredata $akey} arr]} { puts $arr }
// this string is printed ( "foo", "bar" )
is there any elegant way to get this array as a tcl list directly ?
Some Tcl regsub tricks seem to work pretty well, see attachment.
.hc
On 03/25/2011 05:35 PM, Hans-Christoph Steiner wrote:
On Thu, 2011-03-24 at 19:43 +0100, yvan volochine wrote:
hi when reading from a *.plist file in tcl, if the value asked is an array, I get a string:
if {![catch {exec defaults read org.puredata $akey} arr]} { puts $arr }
// this string is printed ( "foo", "bar" )
is there any elegant way to get this array as a tcl list directly ?
Some Tcl regsub tricks seem to work pretty well, see attachment.
hey thanks it might be a bit slower than [string map] but it handles better special chars in filenames
cheers, _y
On Mar 25, 2011, at 2:56 PM, yvan volochine wrote:
On 03/25/2011 05:35 PM, Hans-Christoph Steiner wrote:
On Thu, 2011-03-24 at 19:43 +0100, yvan volochine wrote:
hi when reading from a *.plist file in tcl, if the value asked is an array, I get a string:
if {![catch {exec defaults read org.puredata $akey} arr]} { puts $arr }
// this string is printed ( "foo", "bar" )
is there any elegant way to get this array as a tcl list directly ?
Some Tcl regsub tricks seem to work pretty well, see attachment.
hey thanks it might be a bit slower than [string map] but it handles better special chars in filenames
I should have been working on something else, but I couldn't stop. Hope this helps:
.hc
----------------------------------------------------------------------------
"Making boring techno music is really easy with modern tools, but with live coding, boring techno is much harder." - Chris McCormick
On 03/25/2011 09:48 PM, Hans-Christoph Steiner wrote:
is there any elegant way to get this array as a tcl list directly ?
Some Tcl regsub tricks seem to work pretty well, see attachment.
hey thanks it might be a bit slower than [string map] but it handles better special chars in filenames
I should have been working on something else, but I couldn't stop. Hope this helps:
=) thanx, I'll have a look I'd really like to find the time to provide another recentDocs patch this w-end
cheers, _y