簡體   English   中英

如何使用 emcas 中的小部件存儲用戶輸入的字符串?

[英]How to store string from user input using a widget in emcas?

我創建了一個帶有可編輯字段的小部件。

 (widget-create 'editable-field
                 :size 13
                 :format  "name: %v \n"
                 "Type in your name")

我現在如何才能只存儲用戶輸入? 我在widget-create之前嘗試過setq但它存儲了整個 widget 定義。

我能夠使用小部件創建中的通知字段存儲用戶輸入。

 (widget-create 'editable-field
                 :size 13
                 :format  "name: %v \n"
                 ;;"Type in your name"
                 :notify (lambda (widget &rest ignore)
                                  (setq *name*  (widget-value widget)))
    )

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM