I’m getting this error message when I close a WIN32::GUI program with the X in the window frame.

I found some old posts from 2011 on this problem, but no solution was offered, other than to insinuate that the bug was reported.

Does anyone know of a solution to this issue?

The code is just a skeleton of the GUI I want for my current project. The logic so far is just moving between and closing windows. The code to close everything with the X on the top menu is:

Code

sub TheTopMenu_Terminate { print "Top Menu X Hit\n"; return -1; }

The other menus work with either the button or the X. The top menu displays the “Top Menu X Hit” trace line and then the “Can't call method "STORE" on an undefined value during global destruction.” Error message.

Again, this is just a rough rough first step at designing the GUI.

Here is the all of the code I’m running that gets the error message when you hit the X on the top menu: