Thank you Craig Smith:
“OK, now go back to Interface Builder, and be absolutely certain that the Name in the Name: box at the top of the Inspector window is exactly the same as those in your handler.”
Thank you PCheese:
on should close theObject
if name of theObject is "main" then
set visible of window "main" to false
return false
end if
end should close
on choose menu item theObject
if name of theObject is "nwind" then
set visible of window "mywindow" to true
show window "main" -- bring it to the front
end if
end choose menu item
and a special Thank You to Kevin Bradley:
“I distrust morning people, largely because I suspect them of getting together early one day while the rest of us were asleep and setting up the rules of civilization.”