[Gambas-user] setting title on a message box

Charles Bukowski charlesbukowski.italy at gmail.com
Mon May 2 16:20:13 CEST 2022


Hi, I am a new gambas user and I have just installed the current stable ide
release which is 3.17.2.
I am trying to show a "message box" when clicking on a button inside the
form main () using comp • gb.qt4 • message class .
this message box must show a text inside and a title.
Compilation is successful, but at runtime I get "Type mismatch : wanted
_BoxedString, got string instead" at the source code line that sets the
property "title".
I have checked documentation at
http://gambaswiki.org/wiki/comp/gb.qt4/message/title and that property
datatype is a normal string.

Here my code :
Public Sub Button1_Click()
Dim a As String
a = "teststring"
Print a
  Message.Title(a)  ------>  error Type mismatch : wanted _BoxedString, got
string instead
  Message.Info(a)  -------> printed correctly
End

I have attached my current environment configuration.
What's wrong?
Thank you
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20220502/ab01f9db/attachment.htm>
-------------- next part --------------
[System]
Gambas=3.17.2
OperatingSystem=Linux
Kernel=5.15.0-27-generic
Architecture=x86_64
Distribution=Ubuntu 22.04 LTS
Desktop=LXQT
Font=Sans,10
Scale=7
Theme=yaru
Language=en_US.UTF-8
Memory=3913M

[Libraries]
Cairo=libcairo.so.2.11600.0
Curl=libcurl.so.4.7.0
DBus=libdbus-1.so.3.19.13
GDK2=libgdk-x11-2.0.so.0.2400.33
GDK3=libgdk-3.so.0.2404.29
GStreamer=libgstreamer-1.0.so.0.2001.0
GTK+2=libgtk-x11-2.0.so.0.2400.33
GTK+3=libgtk-3.so.0.2404.29
OpenGL=libGL.so.1.7.0
Poppler=libpoppler.so.118.0.0
QT5=libQt5Core.so.5.15.3
SDL=libSDL-1.2.so.0.11.4
SQLite=libsqlite3.so.0.8.6

[Environment]
BROWSER=firefox
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
DESKTOP_SESSION=Lubuntu
DISPLAY=:0
GB_GUI=gb.gtk3
GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1
GTK_CSD=0
GTK_OVERLAY_SCROLLING=0
HOME=<home>
LANG=en_US.UTF-8
LC_ADDRESS=it_IT.UTF-8
LC_ALL=en_US.UTF-8
LC_IDENTIFICATION=it_IT.UTF-8
LC_MEASUREMENT=it_IT.UTF-8
LC_MONETARY=it_IT.UTF-8
LC_NAME=it_IT.UTF-8
LC_NUMERIC=it_IT.UTF-8
LC_PAPER=it_IT.UTF-8
LC_TELEPHONE=it_IT.UTF-8
LC_TIME=it_IT.UTF-8
LOGNAME=<user>
LXQT_SESSION_CONFIG=session
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
PWD=<home>
QT_ACCESSIBILITY=1
QT_LOGGING_RULES=*.debug=false
QT_PLATFORM_PLUGIN=lxqt
QT_QPA_PLATFORMTHEME=lxqt
SAL_USE_VCLPLUGIN=qt5
SAL_VCL_QT5_USE_CAIRO=true
SHELL=/bin/bash
SHLVL=0
SSH_AGENT_PID=969
SSH_AUTH_SOCK=/tmp/ssh-XXXXXXjBZ31Q/agent.886
TERM=qterminal
TZ=:/etc/localtime
USER=<user>
XAUTHORITY=<home>/.Xauthority
XDG_CACHE_HOME=<home>/.cache
XDG_CONFIG_DIRS=/etc/xdg/xdg-Lubuntu:/etc/xdg:/etc:/usr/share
XDG_CONFIG_HOME=<home>/.config
XDG_CURRENT_DESKTOP=LXQt
XDG_DATA_DIRS=/usr/share/Lubuntu:/usr/local/share:/usr/share:/var/lib/snapd/desktop
XDG_DATA_HOME=<home>/.local/share
XDG_MENU_PREFIX=lxqt-
XDG_RUNTIME_DIR=/run/user/1000
XDG_SEAT=seat0
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
XDG_SESSION_CLASS=user
XDG_SESSION_DESKTOP=
XDG_SESSION_ID=1
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
XDG_SESSION_TYPE=x11
XDG_VTNR=1


More information about the User mailing list