+ draw
+}
+
+proc acquire_showerror {} {
+ global acqerr
+ tk_messageBox -type ok \
+ -title "where-vessels: clipboard parsing error" \
+ -message $acqerr
+}
+
+proc acquire {} {
+ global clipboard acqdeffont acqerr
+ set old $clipboard
+ if {[catch {
+ set clipboard [clipboard get]
+ parse-clipboard
+ .ctrl.acquire.resframe.res configure \
+ -background blue -disabledforeground black -font $acqdeffont \
+ -state disabled -command {} \
+ -text " acquired ok "
+ } emsg]} {
+ set acqerr "clipboard parsing failed: $emsg"
+ puts stderr $acqerr
+ regsub -all {.{18}} "error: [string trim $emsg]" "&\n" ewrap
+ .ctrl.acquire.resframe.res configure \
+ -background red -foreground white -font fixed \
+ -state normal -command acquire_showerror \
+ -text $ewrap
+ set clipboard $old
+ parse-clipboard
+ }