Adding text to a TextViewbrowsing

I have a TextView in my UI called "task_textview" How do I set the text for it in my main script? I tried task_textview.text = "Foo", but I get "global name 'task_textview' is not defined". I didn't 'define' my buttons anywhere but in the UI editor and they work just fine.