Wave reference from "stringfromlist"

I'm very simply trying to create a wave reference from a string found via stringfromlist. However, it will not work...

The program simply finds the traces in the active graph window, chooses the first one. It prints the list and the chosen wave, just for debugging.

                wl = TraceNameList("",";",1)
        wn = StringFromList(0,wl)
        print wl, wn
        Wave wnWave = $wn
        Display/N=FALSE $wn
        numPoints = numpnts(wnWave)
        print numPoints


wl and wn both print out the wave name I'm looking for. However, the display fails, even if I change $wn to wnWave. Therefore the numPoints also fails.

Is it because the string contained in wn is surrounded by quotes? Is it surrounded by quotes, or is that just how it's displayed?

EDIT: This program is part of a larger program, hence why need to convert the string into a wave reference.
Trace names are not necessarily the same as wave names. For details execute:
DisplayHelpTopic "Trace Names"


Use TraceNameToWaveRef to get a wave reference for a named trace.
Interesting. I never realized the difference between a "trace name" and a wave name. I understand why there has to be a difference, but it seems overcomplicated.

I tried the TraceNametoWaveRef command, but it didn't work, so I just ended up using "Wavelist("*",";","WIN:"), which returned wavenames, instead of tracenames. Don't know why I didn't do that to begin with.