Index: openacs-4/packages/xotcl-core/xotcl-core.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/xotcl-core.info,v
diff -u -r1.106.2.20 -r1.106.2.21
--- openacs-4/packages/xotcl-core/xotcl-core.info 14 Jul 2020 19:43:09 -0000 1.106.2.20
+++ openacs-4/packages/xotcl-core/xotcl-core.info 16 Jul 2020 16:56:44 -0000 1.106.2.21
@@ -10,7 +10,7 @@
t
xotcl
-
+
Gustaf Neumann
XOTcl library functionality (e.g. thread handling, online documentation, Generic Form and List Classes)
2017-08-06
@@ -42,7 +42,7 @@
BSD-Style
2
-
+
Index: openacs-4/packages/xotcl-core/tcl/05-db-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/05-db-procs.tcl,v
diff -u -r1.148.2.22 -r1.148.2.23
--- openacs-4/packages/xotcl-core/tcl/05-db-procs.tcl 14 Jul 2020 19:43:09 -0000 1.148.2.22
+++ openacs-4/packages/xotcl-core/tcl/05-db-procs.tcl 16 Jul 2020 16:56:44 -0000 1.148.2.23
@@ -2272,6 +2272,7 @@
{-named_objects:boolean false}
{-object_named_after ""}
{-destroy_on_cleanup:boolean true}
+ {-keep_existing_objects:boolean false}
{-ignore_missing_package_ids:boolean false}
{-initialize true}
} {
@@ -2324,10 +2325,13 @@
set object_name ::[ns_set get $selection $object_named_after]
if {[nsf::is object $object_name]} {
set o $object_name
+ set new 0
} else {
set o [$object_class create $object_name]
+ set new 1
}
} else {
+ set new 0
set o [$object_class new]
}
if {$as_ordered_composite} {
@@ -2338,7 +2342,11 @@
}
lappend __result $o
}
- #foreach {att val} [ns_set array $selection] {$o set $att $val}
+
+ if {!$new && $keep_existing_objects} {
+ #ns_log notice "+++ instantiate_objects keep existing object $o"
+ continue
+ }
$o mset [ns_set array $selection]
if {[$o exists object_type]} {