You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tcl.apache.org by mx...@apache.org on 2020/09/27 21:59:35 UTC
[tcl-rivet] 01/02: add add method form_exists to check for
registration of a form
This is an automated email from the ASF dual-hosted git repository.
mxmanghi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tcl-rivet.git
commit 8f9ec41a7601ffdaa831045cbaf392082f200595
Author: Massimo Manghi <mx...@apache.org>
AuthorDate: Sun Sep 27 23:41:18 2020 +0200
add add method form_exists to check for registration of a form
---
rivet/packages/formbroker/formbroker.tcl | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/rivet/packages/formbroker/formbroker.tcl b/rivet/packages/formbroker/formbroker.tcl
index 37ff92a..3edca9b 100644
--- a/rivet/packages/formbroker/formbroker.tcl
+++ b/rivet/packages/formbroker/formbroker.tcl
@@ -788,6 +788,12 @@ namespace eval FormBroker {
return [namespace current]::$form_name
}
+ proc form_exists {form_cmd} {
+ variable form_definitions
+
+ return [dict exists $form_definitions [namespace tail $form_cmd]]
+ }
+
proc creategc {varname args} {
set formv [uplevel [list set $varname [::FormBroker::create {*}$args]]]
uplevel [list trace add variable $varname unset \
@@ -800,4 +806,4 @@ namespace eval FormBroker {
namespace ensemble create
}
-package provide formbroker 1.0
+package provide formbroker 1.0.1
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tcl.apache.org
For additional commands, e-mail: commits-help@tcl.apache.org