StringByKey stupid syntax problem
nate_church
function cursormovedhook(info)
string info
print xcsr(stringbykey("cursor", info))
end
string info
print xcsr(stringbykey("cursor", info))
end
I get errors telling me that I'm missing a right parenthesis. I know the hook is no longer the recommended way to do things, but I was expecting that it would be a quick fix.
Nathan
string info
print xcsr($stringbykey("cursor", info))
end
compiles here fine. xcsr is expecting a real string and not a string variable.
December 21, 2012 at 04:39 am - Permalink
It's actually expecting a name, not a string. $ turns a string into a name. For example:
Display jack // jack is a name
String aString = "joe"
AppendToGraph aString // Wrong - AppendToGraph will look for a wave named aString
AppendToGraph $aString // OK - $aString returns a name taken from the contents of aString
For details:
December 21, 2012 at 05:47 am - Permalink
Nathan
December 21, 2012 at 06:24 am - Permalink