textwave access

Dear all,
With many trials I was not able to access a text wave within a function. It was no problem to change or read values in a /D wave within a function, or change or read strings in a text wave within a procedure, but not within a function.
Is this simple not possible or has someone a sample code for me?
Many thanks
Can you post a small example what you are trying to do?
Otherwise DisplayHelpTopic "Text Waves" is also a good read.
People seem to take while to figure out that to reference a text wave within a function, you need to use Wave/T, whether as a parameter or a global wave that isn't a parameter:

Function myfunc(tw)
    Wave/T tw  // input parameter

    WAVE/T pre_existingGlobalTextWave= root:globalTextWave

    // do something with pre_existingGlobalTextWave
    pre_existingGlobalTextWave[0] = "hello, world!"

    ...
End


--Jim Prouty
Software Engineer, WaveMetrics, Inc.
I tried it by declearing the local working wave with Wave/T, and it's working well.

Thanks a lot!
Chris