



I am having problems using Tk::MListbox on windows vista. The module works perfectly using the same version of ActivePerl on windows XP.
The problem I have found is to do with the callbacks used to update each Tk::Listbox that Tk::MListbox uses.
Firstly Tk::MListbox does not use Tk::Listbox directly, instead it derives Tk::CListbox from Tk::Listbox and adds the functionality to call a '-updatecommand' callback whenever something happens to it. The problem arises in the functions that initiate the '-updatecommand' callback.
It uses ($w being a reference to the Tk::CListbox object)
$w -> can('SUPER::selectionSet');Under windows XP this will return a CODE reference to the Tk::Listbox selectionSet function. However, under windows vista this function will not return anything and causes the calling of this reference to throw an error:
Tk::Error: Not a CODE reference at C:/Perl/site/lib/Tk/MListbox.pm line 700.
I have checked the can function at it will work correctly for
$w -> can('selectionSet');referencing its own functions but fails with anything beginning with 'SUPER::'
Any ideas on why this is happening and a possible fix?
Something must have changed in the most recent versions of Perl, since MListbox code hasn't changed. The following should fix the problem. If you go into the MListbox code, and replace all those references of
$w->can('SUPER::
with
$w->can('Tk::Listbox::
then that should fix it.
Rob