Form.Htmlview problems - please help test if bug or not

Post

Posted
Rating:
#1 (In Topic #1509)
Avatar
Administrator
gbWilly is in the usergroup ‘unknown’
gbWilly leads the usergroup ‘GambOS Contributor’
gbWilly is in the usergroup ‘Blogger’
In this thread (https://forum.gambas.one/viewtopic.php?t=2113) I suggested some other methods as alternative to gb.gui.webview, one of them being gb.form.htmlview when it comes to viewing web content.

I made a quick and dirty example, but that gave an error (see screenshot). As I'm running Gambas 3.18.4 I posted the code anyway, because it might be a bug in 3.18.4. Turns out on a Debian 12 with Gambas 3.20.4 (installed from OSB) it still doesn't work (as tested by rj71 in previous mentioned thread).
Attachment
So, now I'm wondering if it is a situational Debian 12 thingy or if it happens on other distro's as well. I'm beginning to think it is a bug that needs to be reported, but I first needs some feedback of others if it works or not for them.

Attached the source archive. Please download, extract and run in IDE and let me know what it does (screenshots preferred), on what system and with what gambas version you have tested it. I'll gather the info here and make a bug report if needed.

Thanks..

gbWilly
- Gambas Dutch translator
- Gambas wiki content contributor
- Gambas debian/ubuntu package recipe contributor
- GambOS, a distro for learning Gambas and more…
- Gambas3 Debian/Ubuntu repositories


… there is always a Catch if things go wrong!
Online now: No Back to the top

Post

Posted
Rating:
#2
Avatar
Administrator
sholzy is in the usergroup ‘unknown’
Debian 12
Gambas 3.18.0
QT5
KDE Plasma 5.27.5


Image

(Click to enlarge)


Code

[System]
Gambas=3.18
OperatingSystem=Linux
Kernel=6.1.0-31-amd64
Architecture=x86_64
Distribution=debian trixie/sid
Desktop=KDE
Font=Noto Sans,10
Scale=7
Theme=proxy
Language=en_US.UTF-8
Memory=15934M

[Programs]
gcc=gcc (Debian 12.3.0-3) 12.3.0
git=git version 2.40.1

[Libraries]
Cairo=libcairo.so.2.11600.0
Curl=libcurl.so.4.8.0
DBus=libdbus-1.so.3.32.4
GDK2=libgdk-x11-2.0.so.0.2400.33
GDK3=libgdk-3.so.0.2406.32
GStreamer=libgstreamer-1.0.so.0.2203.0
GTK+2=libgtk-x11-2.0.so.0.2400.33
GTK+3=libgtk-3.so.0.2406.32
OpenGL=libGL.so.1.7.0
Poppler=libpoppler.so.126.0.0
Poppler=libpoppler.so.82.0.0
QT5=libQt5Core.so.5.15.8
RSvg=librsvg-2.so.2.48.0
SDL=libSDL-1.2.so.0.11.4
SQLite=libsqlite3.so.0.8.6

[Environment]
CLUTTER_IM_MODULE=ibus
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
DESKTOP_SESSION=plasma
DISPLAY=:0
GB_GUI=gb.qt5
GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1
GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:<home>/.gtkrc-2.0:<home>/.config/gtkrc-2.0
GTK_IM_MODULE=ibus
GTK_MODULES=gail:atk-bridge
GTK_RC_FILES=/etc/gtk/gtkrc:<home>/.gtkrc:<home>/.config/gtkrc
HOME=<home>
IM_CONFIG_PHASE=1
INVOCATION_ID=3bcadfdac7a2493a9e6319d42e6ec957
JOURNAL_STREAM=8:25977
KDE_APPLICATIONS_AS_SCOPE=1
KDE_FULL_SESSION=true
KDE_SESSION_UID=1000
KDE_SESSION_VERSION=5
LANG=en_US.UTF-8
LANGUAGE=en_US.UTF-8
LC_ALL=en_US.UTF-8
LOGNAME=<user>
MANAGERPID=1924
PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/snap/bin
PWD=<home>
QTWEBENGINE_DICTIONARIES_PATH=/usr/share/hunspell-bdic/
QT_AUTO_SCREEN_SCALE_FACTOR=0
QT_IM_MODULE=ibus
QT_LOGGING_RULES=*.debug=false
QT_SCREEN_SCALE_FACTORS=DVI-I-0=1;VGA-0=1;DVI-I-1=1;HDMI-0=1;
SESSION_MANAGER=local/<hostname>:@/tmp/.ICE-unix/2274,unix/<hostname>:/tmp/.ICE-unix/2274
SHELL=/bin/bash
SHLVL=0
SSH_AGENT_PID=2110
SSH_AUTH_SOCK=/tmp/ssh-nxblc9NB7jio/agent.2007
SYSTEMD_EXEC_PID=2298
TZ=:/etc/localtime
USER=<user>
XAUTHORITY=<home>/.Xauthority
XCURSOR_SIZE=36
XCURSOR_THEME=Mocu-White-Right
XDG_CONFIG_DIRS=<home>/.config/kdedefaults:/etc/xdg:/usr/share/desktop-base/kf5-settings
XDG_CURRENT_DESKTOP=KDE
XDG_DATA_DIRS=<home>/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share:/var/lib/snapd/desktop
XDG_RUNTIME_DIR=/run/user/1000
XDG_SEAT=seat0
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
XDG_SESSION_CLASS=user
XDG_SESSION_DESKTOP=KDE
XDG_SESSION_ID=1
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
XDG_SESSION_TYPE=x11
XDG_VTNR=7
XMODIFIERS=@im=ibus
_=/usr/bin/dbus-update-activation-environment
force_s3tc_enable=true

sholzy
Gambas One Site Director

To report bugs in the Gambas IDE:
Official Gambas Bug Tracker
Online now: No Back to the top

Post

Posted
Rating:
#3
Banned
same here.  blank

Code

[System]
Gambas=3.20.99 9e7194740 (bruces-patched)
OperatingSystem=Linux
Distribution=Linux Mint 22.1 (Xia)
Kernel=6.8.0-59-generic
Architecture=x86_64
Cores=4
Memory=7855M
Language=en_GB.UTF-8
Platform=x11
Desktop=MATE
DesktopResolution=96
DesktopScale=7
WidgetTheme=adwaita
Font=Ubuntu,9
DarkTheme=False
[Libraries]
Cairo=libcairo.so.2.11800.0
Curl=libcurl.so.4.8.0
DBus=libdbus-1.so.3.32.4
GDK2=libgdk-x11-2.0.so.0.2400.33
GDK3=libgdk-3.so.0.2409.32
GStreamer=libgstreamer-1.0.so.0.2402.0
GTK+2=libgtk-x11-2.0.so.0.2400.33
GTK+3=libgtk-3.so.0.2409.32
OpenGL=libGL.so.1.7.0
Poppler=libpoppler.so.134.0.0
QT5=libQt5Core.so.5.15.13
QT6=libQt6Core.so.6.4.2
RSvg=librsvg-2.so.2.50.0
SDL=libSDL2-2.0.so.0.3000.0
SQLite3=libsqlite3.so.0.8.6
Online now: No Back to the top

Post

Posted
Rating:
#4
Regular
rj71 is in the usergroup ‘Regular’
Ubuntu 24 vm
Gambas 3.19.0

Code (gambas)

  1. Gambas=3.19
  2. OperatingSystem=Linux
  3. Distribution=Ubuntu 24.04.2 LTS
  4. Kernel=6.11.0-26-generic
  5. Architecture=x86_64
  6. Cores=4
  7. Memory=3867M
  8. Language=en_US.UTF-8
  9. Desktop=UNKNOWN
  10. DesktopResolution=96
  11. DesktopScale=7
  12. WidgetTheme=yaru
  13. Font=Sans,10
  14.  

Image

(Click to enlarge)

Online now: No Back to the top

Post

Posted
Rating:
#5
Banned
Check it out this way…

Code (gambas)

  1.  
  2. Dim sHtml As String = HttpClient.Download("https://forum.gambas.one/viewtopic.php?t=2113")
  3. HtmlView1.Html = sHtml
  4.  
  5.  

is HtmlView even a fully compliant browser view like webview? (Ie. Javascript and stuff)  mine looks like a TextLabel :-\

Image

(Click to enlarge)

Online now: No Back to the top

Post

Posted
Rating:
#6
Banned

BruceSteers said


is HtmlView even a fully compliant browser view like webview? (Ie. Javascript and stuff)  mine looks like a TextLabel :-\

Hmm, i'm not so sure it is
https://github.com/litehtml/litehtml
Online now: No Back to the top

Post

Posted
Rating:
#7
Avatar
Administrator
gbWilly is in the usergroup ‘unknown’
gbWilly leads the usergroup ‘GambOS Contributor’
gbWilly is in the usergroup ‘Blogger’

BruceSteers said

is HtmlView even a fully compliant browser view like webview? (Ie. Javascript and stuff)  mine looks like a TextLabel :-\

wiki said

This class provides a lightweight HTML/CSS viewer.
It supports most Of the HTML5 / CSS3 syntax.
So, no it isn't, but that was never suggested. I've even never used it before and the source above is my first ever htmlview application  :lol: .
I just suggested it (and qt webkit) as alternatives for the systems were webview won't work (the old Apples -> see other thread).

I did use webkit in the past and find webview rather meager compared to what webkit could do, or maybe I just need to think differently. I haven't played with it too much yet, just as far as the stuff I need.

gbWilly
- Gambas Dutch translator
- Gambas wiki content contributor
- Gambas debian/ubuntu package recipe contributor
- GambOS, a distro for learning Gambas and more…
- Gambas3 Debian/Ubuntu repositories


… there is always a Catch if things go wrong!
Online now: No Back to the top

Post

Posted
Rating:
#8
Avatar
Administrator
gbWilly is in the usergroup ‘unknown’
gbWilly leads the usergroup ‘GambOS Contributor’
gbWilly is in the usergroup ‘Blogger’

BruceSteers said

Check it out this way…

Code (gambas)

  1.  
  2. Dim sHtml As String = HttpClient.Download("https://forum.gambas.one/viewtopic.php?t=2113")
  3. HtmlView1.Html = sHtml
  4.  
  5.  
Interesting, but then again is Htmlview.url bugged out or what is happening there? How do you understand what is written in the wiki?
Image

(Click to enlarge)


And I figured out that the error I get in my 3.18.4 is a dependency problem in an old recipe from where this install comes from, so that mystery is solved. When running 3.20.4 in VM I get the blank screen as well.

gbWilly
- Gambas Dutch translator
- Gambas wiki content contributor
- Gambas debian/ubuntu package recipe contributor
- GambOS, a distro for learning Gambas and more…
- Gambas3 Debian/Ubuntu repositories


… there is always a Catch if things go wrong!
Online now: No Back to the top

Post

Posted
Rating:
#9
Banned
 Yeah i don't think it does internet at all (gb.net did not auto-add itself)

.Url is misleading i think if so.  
.Path would make more sense.
Online now: No Back to the top

Post

Posted
Rating:
#10
Regular
rj71 is in the usergroup ‘Regular’
Appears to be a local html file only…?
Image

(Click to enlarge)

Online now: No Back to the top

Post

Posted
Rating:
#11
Regular
rj71 is in the usergroup ‘Regular’
 I just tested some simple javascript but it didn't appear to work.
Online now: No Back to the top

Post

Posted
Rating:
#12
Regular
rj71 is in the usergroup ‘Regular’
Simple css and html works. Javascript does not but I guess it wasn't really expected to.
Image

(Click to enlarge)

Online now: No Back to the top

Post

Posted
Rating:
#13
Regular
rj71 is in the usergroup ‘Regular’
a href links do not work as well. It seems to be just a very simple local html file viewer.
Online now: No Back to the top

Post

Posted
Rating:
#14
Avatar
Administrator
gbWilly is in the usergroup ‘unknown’
gbWilly leads the usergroup ‘GambOS Contributor’
gbWilly is in the usergroup ‘Blogger’
Benoit's reaction to Bruce's question on above discussed url property:
It is based on the litehmtl library, so you have to read its documentation to know what the limits are (CSS is only partially supported).

So, in short

Code

Understanding htmlview.url = reading c library documentation
 :lol:

rj71 said

a href links do not work as well. It seems to be just a very simple local html file viewer.

It seems you are right. And just adding the words used above a very simple local html file viewer. to the wiki would make a world of difference.

gbWilly
- Gambas Dutch translator
- Gambas wiki content contributor
- Gambas debian/ubuntu package recipe contributor
- GambOS, a distro for learning Gambas and more…
- Gambas3 Debian/Ubuntu repositories


… there is always a Catch if things go wrong!
Online now: No Back to the top

Post

Posted
Rating:
#15
Regular
rj71 is in the usergroup ‘Regular’

gbWilly said

Benoit's reaction to Bruce's question on above discussed url property:
It is based on the litehmtl library, so you have to read its documentation to know what the limits are (CSS is only partially supported).

So, in short

Code

Understanding htmlview.url = reading c library documentation
 :lol:

rj71 said

a href links do not work as well. It seems to be just a very simple local html file viewer.

It seems you are right. And just adding the words used above a very simple local html file viewer. to the wiki would make a world of difference.
Yay! I finally was able to help and contribute to the gambas forum!
Online now: No Back to the top

Post

Posted
Rating:
#16
Banned
I've already updated the wiki :)

wiki said

HtmlView is a simple HTML code viewer only.

It's intention is to provide a simple way to display HTML with much less overhead than the WebView alternative.

It inherently has no internet capabilities at all, Ie. using http Urls will not work.
Online now: No Back to the top

Post

Posted
Rating:
#17
Avatar
Administrator
gbWilly is in the usergroup ‘unknown’
gbWilly leads the usergroup ‘GambOS Contributor’
gbWilly is in the usergroup ‘Blogger’

BruceSteers said

I've already updated the wiki :)
Nice, I was waiting for it  ;)

gbWilly
- Gambas Dutch translator
- Gambas wiki content contributor
- Gambas debian/ubuntu package recipe contributor
- GambOS, a distro for learning Gambas and more…
- Gambas3 Debian/Ubuntu repositories


… there is always a Catch if things go wrong!
Online now: No Back to the top
1 guest and 0 members have just viewed this.