Do Window Get Window Error - Simple

I find it a bit unexpected this doesn't work...are graphs not windows?

function testgetwindow()

display/n=testwindow
getwindow testwindow

end
They are. You need a keyword after the winName to tell GetWindow what to get! Check the help.
If you want to bring the window to the front, you need DoWindow/F winName