help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: editable-list widgets: how to create one child automatically


From: Michael Heerdegen
Subject: Re: editable-list widgets: how to create one child automatically
Date: Thu, 14 Mar 2024 02:58:56 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Mauro Aranda <maurooaranda@gmail.com> writes:

> (widget-create 'editable-list
>                :value (list my-first-default)
>                ;; Change according to the child type.
>                '(editable-field))
>
> Does that not do what you want?

I think I can't use this: I don't create an ad-hoc widget, I need an
`define-widget' expression to define the widget to behave accordingly
when created.

And the widget this is about is a part of a group widget definition so
there will never be an explicit `widget-create' call by me, the widget
will always be created implicitly by the parent.

And in this definition a :value spec is more or less ignored - in my
tests that child widget will always be created with a nil widget value.

I am attaching the code in question so that you don't have to guess -
you can find the relevant part by searching for the comment

  ;; Is there a better approach, Mauro?

or simply just your name.


Thanks so far,

Michael.

Attachment: find-cmd-widget.el.zip
Description: Zip archive


reply via email to

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