From: Mike Gran <spk121@yahoo.com>
To: Luis Felipe <luis.felipe.la@protonmail.com>
Cc: "guile-user@gnu.org" <guile-user@gnu.org>
Subject: Re: Guile-GI: <GSimpleAction>: Setting parameter type to None or NULL
Date: Sun, 25 Apr 2021 13:44:59 -0700 [thread overview]
Message-ID: <20210425204459.GA2644511@spikycactus.com> (raw)
In-Reply-To: <ySxuTkiBL72WT4KC7lZuVdFoHGihHS1ceTunvPRZIsihIv8BbXuU6-AGMjZNvsJyotnSu1_u0ci85aEO7Z_0oVx-rFM6d9QeXUpOQ3rmNAM=@protonmail.com>
On Sun, Apr 25, 2021 at 07:36:04PM +0000, Luis Felipe wrote:
> Hello again,
>
> I want to add actions to an application but I can't seem to find the correct value to indicate that no parameter should be passed to a handler.
>
> In Python, for example, I do this:
>
> action = Gio.SimpleAction.new("about", None)
The guile-gi equivalent would be
(set! action (simple-action:new "about"))
or
(set! action (simple-action:new "about" #f))
>
> In Guile, I'm doing it like this for now:
>
> (let [(action (make ??GSimpleAction?? #:name "about"))
> ...]
>
> ...)
>
> But what I need to indicate is:
>
> (make ??GSimpleAction?? #:name "about" #:parameter-type None)
>
> So what's the equivalent to None in Guile?
In this form, you'd do the following. Leaving out the #:parameter-type
from the constructor sets it to to its default of what Python would
call None.
(make <GSimpleAction> #:name "about")
Regards,
Mike
>
>
> Any help is very welcome,
>
>
> ---
> Luis Felipe L??pez Acevedo
> https://luis-felipe.gitlab.io/
>
next prev parent reply other threads:[~2021-04-25 20:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-25 19:36 Guile-GI: <GSimpleAction>: Setting parameter type to None or NULL Luis Felipe
2021-04-25 20:44 ` Mike Gran [this message]
2021-04-25 21:47 ` Luis Felipe
2021-04-26 0:16 ` Mike Gran
2021-04-26 1:40 ` Luis Felipe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210425204459.GA2644511@spikycactus.com \
--to=spk121@yahoo.com \
--cc=guile-user@gnu.org \
--cc=luis.felipe.la@protonmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).