Re: gtk_main?
ephrem boudonnet <[email protected]> Tue, 11 Apr 2006 18:28:01 +0200
| Newsgroups | gmane.lisp.clg.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Espen,
How can we run the main loop waiting the return value for a dialog for
example.
I've tried the function (main) to wait the return value of the OK button
of a file chooser
for example, but it doesn't seem to work.
Isn't it possible to make something like that:
(defun my-choose-file-dialog ()
(let* ((dialog (make-instance 'file-chooser-dialog ))
(return-value nil))
(dialog-add-button dialog "gtk-cancel" #'widget-destroy :object t)
(dialog-add-button dialog "gtk-ok"
#'(lambda ()
(if (slot-boundp dialog 'filename)
(setq return-value (file-chooser-filename dialog))
(widget-destroy dialog))))
(widget-show-all dialog)
(main) ;;?????
return-value))
to use it like : (setf my-chosen-file (my-choose-file-dialog))
Have I made something wrong?
Thanx
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642