Re: Cocoa-view-pane and background-process
Hi Ralph,
Thanks for the suggestion. It's really better when using
mailbox-wait-for-event. But it not resolves the problem completely : there
are always some delays, even if they are completely unpredictable.
Sometimes, it seems to be related to the focus of the window (the delay can
be longer after changing the focus)... But it's not systematic.
I need now to test what's happening when the application is delivered.
Thanks again
Best regards
Denis
Le 13/05/11 17:58, « [NOM] » <[ADRESSE]> a écrit :
>
> On May 13, 2011, at 4:58 AM, Denis Pousseur wrote:
>
>> MacOS 10.5, LW 5.1.2
>>
>> Hello,
>>
>> I replaced several output-panes of my application with cocoa-view-panes,
>> essentially to have more sophisticated drawing tools (Bezier curves,
>> shadows, etc.). The result is good but now I encountered a problem when I
>> call a lisp background process from a cocoa event-handling callback : There
>> is is a long delay before the process start
>
> There is no delay with your example using LWM 6.0.1, 64-bit intel, under Mac
> OS X 10.6.7
>
> This may be a LWM 5 specific issue.
>
> However, I see you're using mailbox-read in a loop where I think you should be
> using mailbox-wait-for-event.
> From the docs:
>
> "mailbox-wait-for-event is the appropriate way to wait for an event in a
> mailbox in an application with a graphical user interface, because it
> interacts correctly with the windowing system."
>
> So you might try replacing mailbox-read with mailbox-wait-for-event in your
> worker loop and see if that resolves the issue.
>
> wamest regards,
>
> Ralph
>
>
>
>
>
>
> Raffael Cavallaro
> raffaelcavallaro@me.com
>
>
>
>
>
-------------------------------------------------------
Denis Pousseur
70 rue de Wansijn
1180 Bruxelles, Belgium
Tel : 32 (0)2 219 31 09
Email : denis.pousseur@gmail.com
Website : http://www.denispousseur.com
-------------------------------------------------------