From 707071c6b1e6ffb05f3f6cf73dfdfc12a384e15d Mon Sep 17 00:00:00 2001 From: Stephan Wald Date: Sat, 3 Jul 2021 09:35:05 +0200 Subject: [PATCH] fix: GUI was only working when client was same machine as server. Apply same logic for all architectures now. --- BBjDocViewer.bbj | 58 ++++++++++++++++++++++-------------------------- 1 file changed, 27 insertions(+), 31 deletions(-) diff --git a/BBjDocViewer.bbj b/BBjDocViewer.bbj index 5804c58..8d4f7bb 100644 --- a/BBjDocViewer.bbj +++ b/BBjDocViewer.bbj @@ -149,37 +149,33 @@ class public BBjDocViewer extends BBjWidget fi fi - if INFO(3,6)<>"5" then - #HTMLView!.setUrl("file://"+file$) - else - switch ext$ - case "TXT" - case "CSV" - case "HTML" - case "HTM" - ch = unt - open (ch)file$ - f$= fin(ch) - l=dec(f$(1,4)) - read record (ch,siz=l)text$ - close (ch) - #HTMLView!.setText(text$) - break - case "PDF" - path$=::BBUtils.bbj::BBUtils.copyFileToWebServer(file$, "deliver", clean$, 0, 1) - #HTMLView!.setUrl(path$) - break - case default - ch = unt - open (ch)file$ - f$= fin(ch) - l=dec(f$(1,4)) - read record (ch,siz=l)text$ - close (ch) - #HTMLView!.setText(text$) - break - swend - fi + switch ext$ + case "TXT" + case "CSV" + case "HTML" + case "HTM" + ch = unt + open (ch)file$ + f$= fin(ch) + l=dec(f$(1,4)) + read record (ch,siz=l)text$ + close (ch) + #HTMLView!.setText(text$) + break + case "PDF" + path$=::BBUtils.bbj::BBUtils.copyFileToWebServer(file$, "deliver", clean$, 0, 1) + #HTMLView!.setUrl(path$) + break + case default + ch = unt + open (ch)file$ + f$= fin(ch) + l=dec(f$(1,4)) + read record (ch,siz=l)text$ + close (ch) + #HTMLView!.setText(text$) + break + swend methodend