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

Re: [MacPerl] Mac::Navigation glue



Quentin Smith writes Thu, 08 Apr 1999 17:30:54 -0400:

[snip]

>print &GetFiles("Select some files to open.", undef, qw[TEXT ttro]);

[snip]

>$nav = NavGetFile($default, $options, $types, sub {use
>Mac::Events;Mac::Events::DispatchEvent($_[1]->event);});

[snip]

I believe there are two bugs in Navigation.pm which are relevant:

1   Only the first element in the list of types is recognised. The error
    is in Navigation.pm which inserts spurious white spaces into the list
    handle ('NavTypeListHandle').

2   *Any* EVENTPROC in 'NavGetFile()' results in a serious memory leak at about
    240K per minute continuously while the dialog is onscreen. Leaked memory is
    not reclaimed when the window is closed, so that "Out of memory" crashes
    can occur quite frequently.

The first bug is easily fixable (see  sister-list [macperl-modules], 31
March, "Using Mac::'...'Modules"), the second is more difficult. Since
EVENTPROC has to be called before either PREVIEWPROC or FILTERPROC, neither
of these is usable without incurring the memory leak from EVENTPROC.

Mark Yanuzzi writes Thu, 08 Apr 1999 21:11:33 -0700:

>Has anyone who has tried NavServices.pl observed that the cursor becomes
>"jumpy", or turns into a MacPerl Camel with a spinning wheel?
>
>This does not happen with NavGetFile, and coupled with the cursor
>problem leads me to wonder whether a) something else needs to be added to
>the eventProc subroutine, or b) maybe there is a bug in Navigation.pm.  Any
>thoughts?

I think the cursor behaviour is associated with bug 2 -- MacPerl is busy
eating pointer space.

I would like to tinker with Navigation.xs to see if (however unlikely) I
can do anything to improve it. However my attempts to build the evisting
Navigation.xs have all failed at the 'compile' stage. I'm pretty sure I
have not got the 'typemap' right. If the 'typemap' for Navigation.xs could
be made available it would be a great help.

Alan Fry



===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org