The code works for me in CS5 on the Mac. Are you for sure running it in a persistent engine (#targetengine "whatever")?
Strange. I do have it running in a persistent engine. I am running CS5.5 on windows.
I just tested your code ok in InDesign CS5.5 (7.5.2) on Mac OS X 10.6.8. A bug in the windows version perhaps?
Provided the #targetengine statement is present, of course.
I have done further testing and I now know I can't have ANY window of type Palette. Only dialogs will show up. Also if I click my script in the script panel rapidly (which I did out of frustration) I see my palette show up for just a millisecond and then goes away. Can't quite explain that one either.
A bug in the windows version perhaps? Provided the #targetengine statement is present, of course.
Works fine for me under CS5.5 in Windows.
Perhaps bduffy323, you should reset your preferences.