in reply to Re^2: Strange Perl/Tk error
in thread Strange Perl/Tk error

The Tk Bug Tracker on SourceForge provided a very detailed post which allowed me to create a workaround for the ancient copy of Perk/Tk I have to use. Basically, X.Org added a new event, which pushed protocol constant LASTEvent from 35 to 36, and assumptions were made as to that value always being 35.

The changes I made were as follows (colored red)to the named source files in the Tk800.024 source distro.

./pTk/mTk/xlib/X11/X.h
#define MappingNotify 34
#define GenericEvent 35
#define LASTEvent 36 /* must be bigger than any event # */

./pTk/tkBind.c
./pTk/mTk/generic/tkBind.c
static int flagArrayTK_LASTEVENT = {
...
/* MappingNotify */ 0,
/*CN Not used */ 0,
...
};

./pTk/tkEvent.c
./pTk/mTk/generic/tkEvent.c
static unsigned long eventMasksTK_LASTEVENT = {
...
0, /* Mapping Notify */
0, /*CN X.Org added 'GenericEvent' */
...
};