[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Problem with zoomDocProc



Howdy!

Philippe inquired:
> When I use 'zoomDocProc' as window procedure in the MacWindow command, I get
> the following error message:
> 
> # Usage: Mac::Windows::GetNewWindow(windowID, behind=(GrafPtr)-1).
> File 'Macintosh HD:MacPerl _:lib:Mac:Windows.pm'; Line 397
> 
> On my PowerBook 5300, I get error number 2.
> 
> Furthermore, stopping the following program using Command-period also causes
> an error number 2 on my PowerBook:
> 
> use Mac::Windows;
> use Mac::Events;
> 
> $bounds = 50, 50, 300, 300;

I think this needs to be (as found in the examples)
$bounds = new Rect 50, 50, 300, 300;

$bounds needs to be a Rect. As written, $bounds is 300.
> 
> $winType = zoomDocProc;
> 
> $visible = 1;
> 
> $closebox = 1;
> 
> $win =	new MacWindow $bounds, "Fen_tre", $visible, $winType, $closebox;
> 
> WaitNextEvent while $win->window;
> 
> Is this a bug?
> 
No, it is a coding error...much easier to fix :)

yours,
Michael

***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch