Using PerlCtrl I've created an ActiveX Control that I'm seeing some issues 
with. When I call my control via a VBScript it functions as expected and the 
DialogBox displays fine.

However, when the 3rd party application that I wrote the control for calls the 
control, the DialogBox never appears. I've redirected stdout/err to a file and 
added the diagnostic package to my code. 

The point in my code where the error is occurring is:

   my $main = Win32::GUI::DialogBox->new(
                   -name   => "Main",
                   -text => "Config",
                   -width  => 314,
                   -height => 347,
                   -top => 200,
                   -left => 200,
            );

And the error that is being produced is:

   Use of uninitialized value in subroutine entry at /PerlApp/Win32/GUI.pm line 
505 (#1)

I took a peek at the source for GUI.pm and line 505 is:

    my $handle = Win32::GUI::Create($self, $type, @input);

So I took the liberty of adding some Data::Dumper calls to GUI.pm preceding the 
above line for $self, $type, and @input. The results were:

self:
$VAR1 = bless( {}, 'Win32::GUI::DialogBox' );

type:
$VAR1 = 1;

input:
$VAR1 = [
          '-name',
          'Main',
          '-text',
          'Config',
          '-width',
          314,
          '-height',
          347,
          '-top',
          200,
          '-left',
          200
        ];

This obviously shows that the variables in question do in fact contain data.

So before I go nuts following this deeper into GUI.pm and adding debug 
statements to the Create() function and so on, does anyone have any ideas? 
Also, please advise me if this thread would be better suited in the PDK mailing 
list.

-Dave

Reply via email to