From 0773ca30290d3a43c17fb7ba5b7ca9e7fa278a96 Mon Sep 17 00:00:00 2001 From: Stephan Wald Date: Fri, 19 Apr 2019 13:05:04 +0200 Subject: [PATCH] add debug function to copy JSON data to clipboard (GUI only) after double-clicking at least four times on the same row --- BBjGridExWidget.bbj | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/BBjGridExWidget.bbj b/BBjGridExWidget.bbj index 89f16a3b..745385b3 100644 --- a/BBjGridExWidget.bbj +++ b/BBjGridExWidget.bbj @@ -357,6 +357,7 @@ class public BBjGridExWidget extends BBjWidget field private BBjString DataFingerprint$ field private BBjNumber newW! field private BBjNumber newH! + field private BBjString DoubleClickRowsHistory$ rem /** rem * disabled default constructor rem */ @@ -1718,6 +1719,22 @@ class public BBjGridExWidget extends BBjWidget if type$ = "single" then #fireEvent(#ON_GRID_SELECT_ROW(),event!) else + rem double-click four times on the same row will copy the JSON result set data to the clipboard, in GUI + if info(3,6)<>"5" and #RS!<> null() then + r$ = str(#getSelectedRows()) + if #DoubleClickRowsHistory$="" or #DoubleClickRowsHistory$=r$ or #DoubleClickRowsHistory$=r$+r$ then + #DoubleClickRowsHistory$=#DoubleClickRowsHistory$+r$ + else + if #DoubleClickRowsHistory$=r$+r$+r$ then + clipfromstr 1,#RS!.toJson() + a=msgbox("JSON-Data has been copied to the Clipboard",0,"Grid Data") + #DoubleClickRowsHistory$="" + else + #DoubleClickRowsHistory$="" + fi + fi + fi + #fireEvent(#ON_GRID_DOUBLE_CLICK(), event!) FI methodend