Think I might have sussed this one, though I'll need to do more
investigating.

I create the main window, then load the window co-ordinates from a file.
(The window position is saved so that the window appears in the same
position, the next time the script runs). I invoke the Change method to set
the window co-ordinates. The Change method must generate a window-resize
event. In the Resize event handler, I refer to a control which has not yet
been created. The reason I did it this way, was so that controls could be
sized relative to the their window. Looks like I'll have to think about just
putting the controls on the window then calling the Change method last.

Ian.

----- Original Message -----
From: "Ian Taite" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 24, 2000 7:33 PM
Subject: [perl-win32-gui] Resize Exception Message on Script Launch


> I've attached a Perl script I'm developing. I get an error message when
the
> script runs:
>
> Can't call method "Resize" on an undefined value at PUM.pl line 225
>
> This problem started when I implemented code to get the controls on screen
> to resize when the window corner was dragged.
>
> When you click OK (to dismiss this error message), the main window
appears,
> then dragging the window corner causes the controls in the window to be
> resized properly.
>
> I've tried selectively commenting out lines in the Main_Resize subroutine
> but nothing springs to mind. Perhaps I'm doing something in the wrong
order.
>
> Regards,
> Ian.
>
>


Reply via email to