rthornton128 / goncurses

NCurses Library for Go
Other
383 stars 51 forks source link

how can I use stdscr.Print() from a function other than "main" #39

Closed milton59 closed 7 years ago

milton59 commented 7 years ago

go build gives error stdscr not defined if I use it in a func

rthornton128 commented 7 years ago

goncurses was specifically written so that stdscr is not globally defined as it would be C. You will either need to declare it as a global yourself or pass it into your function.

milton59 commented 7 years ago

Thanks, new at both GO and ncurses.