freenode/#lisp - IRC Chatlog
Search
12:08:06
Xach
decent-username: i am too terse. i meant a quicklisp dist release, not a quicklisp non-beta release.
13:09:39
jmercouris
what I would like to do is pass the callback function from web-view-execute to be executed in js-execution-complete
13:11:02
jmercouris
I don't know how to do that though since js-execution-complete is a cffi callback
13:21:23
shka_
jmercouris: (cffi:foreign-funcall-pointer (cffi:get-callback 'callback-no-arguments) ())
13:23:35
jmercouris
I have webkit-web-view-run-javascript which runs some javascript in C land, and calls js-execution-complete with the result of that javascript
13:24:59
jmercouris
so my original way of doing this was having some global state like (defparamater callback-fn (lambda (x) (print x))) and then I'd funcall (callback-fn..) within js-execution-complete
13:25:12
shka_
ok, so i suggest to define callback with defcallback, pass it as pointer whetever it is needed, and then foreign-funcall-pointer it when it is needed
13:27:00
jmercouris
which will be automatically invoked by webkit-web-view-run-javascript WHEN the javascript has completed evaluation
13:29:04
shka_
https://lazka.github.io/pgi-docs/WebKit2-4.0/classes/WebView.html#WebKit2.WebView.run_javascript
13:29:50
Nilby
You'd have to name it an pass the name as a string or something, because the callback is in lisp isn't in C memory, so you can't just put it in a void*
13:31:55
shka_
ok, so i am saying that I recommend to rewrite your lisp function callback to cffi callback, pass pointer to it as user data and call it as C function
13:34:52
jmercouris
or maybe I extend wekit-webview-run-javascript so that it is not obvious that is what is happening :-P
13:35:13
shka_
yeah, i really don't know, i never quite figure out what is the best way to pass lisp objects to C
13:41:08
decent-username
Is there a variable you can set to disable "Sort slots alphabetically" inside the *slime-inspector*?
13:41:27
decent-username
Or rather: I know that such a variable exists. How do I figure out it's name?
13:52:42
jmercouris
there is oftentimes documentation within the source about things which are not in the manual