chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] setting a callback in xlib


From: felix winkelmann
Subject: Re: [Chicken-users] setting a callback in xlib
Date: Sat, 7 Mar 2009 23:38:36 +0100

On Sat, Mar 7, 2009 at 11:24 PM, Eduardo Cavazos <address@hidden> wrote:
>
> In this particular case, like this:
>
>    (XSetErrorHandler xerrorhandler)

If you say

(XSetErrorHandler (location xerrorhandler))

does it work, then?

>
> But ideally, the API should work such that you can do flexible stuff like:
>
>    (XSetErrorHandler (lambda (dpy ev) ...))
>
> I.e. pass arbitrary callbacks at runtime.
>

Sorry, currently not possible, as the callback wouldn't have a continuation
to return to (invoking C code leaves the CPS context. The continuation
is stored, but not externally accessible).


cheers,
felix




reply via email to

[Prev in Thread] Current Thread [Next in Thread]