From rwe-sse at osnanet.de Sun Sep 1 13:49:50 2019 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Sun, 1 Sep 2019 13:49:50 +0200 Subject: [Gambas-user] Suddenly no more color printing In-Reply-To: <51528025-4976-448a-d1cc-58d8d655b4a1@gmail.com> References: <51528025-4976-448a-d1cc-58d8d655b4a1@gmail.com> Message-ID: <71bfcfc1-c0ca-9357-ff52-f34f5ff28510@osnanet.de> Am 31.08.19 um 17:10 schrieb Beno?t Minisini: > Le 31/08/2019 ? 16:53, Rolf-Werner Eilert a ?crit?: >> One of my programs should be able to print PDFs with colors >> (background colors in table cells). >> >> It did so last year and it did so during winter. But when I use it >> now, it suddenly makes grayshades instead of the colors. >> >> As far as I remember, I have not changed anything in these code parts >> (printing part), and I guess it's the same Gambas version (3.12.2 on >> Ubuntu Mate 18.04.2). There are outstanding updates, and I haven't >> updated the system for couple of months, but alas... >> >> Where would you look first? I need these colored tables... >> >> Thanks for your ideas! >> >> Rolf >> >> >> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- >> > > Did you explicitly specified a coloured printing? Maybe the default > printer configuration has changed? > Ah ok, that was it. I had to define Grayscale = False. Just wonder why it ran this way until couple of months ago. Don't remember an update. Thank you very much! Rolf From g4mba5 at gmail.com Sun Sep 1 21:27:48 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Sun, 1 Sep 2019 21:27:48 +0200 Subject: [Gambas-user] Suddenly no more color printing In-Reply-To: <71bfcfc1-c0ca-9357-ff52-f34f5ff28510@osnanet.de> References: <51528025-4976-448a-d1cc-58d8d655b4a1@gmail.com> <71bfcfc1-c0ca-9357-ff52-f34f5ff28510@osnanet.de> Message-ID: <102c87e6-75f7-899d-b42e-d1292008e3a8@gmail.com> Le 01/09/2019 ? 13:49, Rolf-Werner Eilert a ?crit?: > Am 31.08.19 um 17:10 schrieb Beno?t Minisini: >> Le 31/08/2019 ? 16:53, Rolf-Werner Eilert a ?crit?: >>> One of my programs should be able to print PDFs with colors >>> (background colors in table cells). >>> >>> It did so last year and it did so during winter. But when I use it >>> now, it suddenly makes grayshades instead of the colors. >>> >>> As far as I remember, I have not changed anything in these code parts >>> (printing part), and I guess it's the same Gambas version (3.12.2 on >>> Ubuntu Mate 18.04.2). There are outstanding updates, and I haven't >>> updated the system for couple of months, but alas... >>> >>> Where would you look first? I need these colored tables... >>> >>> Thanks for your ideas! >>> >>> Rolf >>> >>> >>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- >>> >> >> Did you explicitly specified a coloured printing? Maybe the default >> printer configuration has changed? >> > > Ah ok, that was it. I had to define Grayscale = False. > > Just wonder why it ran this way until couple of months ago. Don't > remember an update. > > Thank you very much! > > Rolf > > I don't know how CUPS (the printing system?) works, but I guess you could have default global configuration, default configuration by user, and even default configuration by application. Who knows? -- Beno?t Minisini From bagonergi at gmail.com Mon Sep 2 15:22:52 2019 From: bagonergi at gmail.com (Gianluigi) Date: Mon, 2 Sep 2019 15:22:52 +0200 Subject: [Gambas-user] PostgreSQL, how to create a new database Message-ID: Hi everyone, I was creating a postgresql test database to verify the steps. Unfortunately I must have done something wrong because at the final verification I get these results, which means that, if I understand correctly, instead of having populated the new "rubinettofelice" database with tables, I directly populated the template1. This is how much is returned to me from the terminal: ======================================================================= ~$ psql -U postgres Password for user postgres: psql (11.5 (Ubuntu 11.5-0ubuntu0.19.04.1)) Type "help" for help. postgres=# \l Name | Owner | Encoding | Collate | Ctype | Access privileges -----------------+-----------+----------+-------------+-------------+----------------------- postgres | postgres | UTF8 | it_IT.UTF-8 | it_IT.UTF-8 | rubinettofelice | gianluigi | UTF8 | it_IT.UTF-8 | it_IT.UTF-8 | template0 | postgres | UTF8 | it_IT.UTF-8 | it_IT.UTF-8 | =c/postgres + | | | | | postgres=CTc/postgres template1 | postgres | UTF8 | it_IT.UTF-8 | it_IT.UTF-8 | =c/postgres + | | | | | postgres=CTc/postgres (4 rows) postgres=# \du List of roles Role name | Attributes | Member of -----------+------------------------------------------------------------+----------- gianluigi | Create role, Create DB | {} postgres | Superuser, Create role, Create DB, Replication, Bypass RLS | {} postgres=# \c rubinettofelice You are now connected to database "rubinettofelice" as user "postgres". rubinettofelice=# \d Did not find any relations. <<========================================SIGH! rubinettofelice=# \dn List of schemas Name | Owner --------+---------- public | postgres (1 row) rubinettofelice=# \c template1 You are now connected to database "template1" as user "postgres". template1=# \d List of relations <<================ ??? Schema | Name | Type | Owner --------+-------------------+----------+----------- public | fipart | table | gianluigi public | tagent | table | gianluigi public | tagent_idagen_seq | sequence | gianluigi public | tfilms | table | gianluigi public | tfilms_idfilm_seq | sequence | gianluigi public | tst_fi | table | gianluigi public | tstars | table | gianluigi public | tstars_idstar_seq | sequence | gianluigi (8 rows) ======================================================================= I created the database from the terminal with these steps. 1 - First I created the user: ======================================================================= ~$ psql -U postgres -d template1 Password for user postgres: psql sql (11.5 (Ubuntu 11.5-0ubuntu0.19.04.1)) Type "help" for help. template1=# CREATE ROLE gianluigi WITH CREATEDB CREATEROLE LOGIN ENCRYPTED PASSWORD 'miapassword'; CREATE ROLE ======================================================================= 2 - Then I created the new "rubinettofelice" database: ======================================================================= ~$ psql -U test -d template1 Password for user test: psql sql (11.5 (Ubuntu 11.5-0ubuntu0.19.04.1)) Type "help" for help. template1=> CREATE DATABASE rubinettofelice WITH OWNER=gianluigi TEMPLATE= template1 ENCODING='utf-8'; CREATE DATABASE ======================================================================= 3 - At this point he created a Gambas project with a module (MBase.module): ======================================================================= ' Gambas module file Private $hConn As New Connection Public Sub OpenDB(DBType As String, DBHost As String, DBName As String, UserName As String, UserPassword As String) $hConn.Close() $hConn.Type = Lower(DBType) $hConn.Host = DBHost '$hConn.Name = "" $hConn.Login = UserName $hConn.Password = UserPassword '$hConn.Port = "5432" $hConn.Open() If $hConn.Databases.Exist(DBName) Then MakeTable() Else Error.Raise(("Database not found.\n\nAre you sure that the database exist?")) Endif $hConn.Close() Catch Message.Error(Error.Text & "\n\n" & Error.Where) FMain.Close() End Public Sub CloseDB() $hConn.Close() End Private Sub MakeTable() Dim hTable As Table $hConn.Begin If Not $hConn.Tables.Exist("tstars") Then hTable = $hConn.Tables.Add("tstars") hTable.Fields.Add("idstar", db.Serial) hTable.Fields.Add("stname", db.String, 40) hTable.Fields.Add("stsurn", db.String, 40) hTable.Fields.Add("stheig", db.Integer) hTable.Fields.Add("stweig", db.Integer) hTable.Fields.Add("stbirt", db.Date) hTable.Fields.Add("sttele", db.String, 13) hTable.Fields.Add("idagen", db.integer) hTable.Fields.Add("stimag", db.Blob) hTable.PrimaryKey = ["idstar"] hTable.Update Endif If Not $hConn.Tables.Exist("tagent") Then hTable = $hConn.Tables.Add("tagent") hTable.Fields.Add("idagen", db.Serial) hTable.Fields.Add("agname", db.String, 40) hTable.Fields.Add("agsurn", db.String, 40) hTable.Fields.Add("agaddr", db.string, 80) hTable.Fields.Add("agcity", db.string, 40) hTable.Fields.Add("agstat", db.string, 40) hTable.Fields.Add("agcoun", db.string, 40) hTable.Fields.Add("agpost", db.string, 10) hTable.Fields.Add("agtele", db.String, 13) hTable.Fields.Add("agmail", db.String, 30) hTable.Fields.Add("agwebs", db.String, 30) hTable.PrimaryKey = ["idagen"] hTable.Update Endif If Not $hConn.Tables.Exist("tfilms") Then hTable = $hConn.Tables.Add("tfilms") hTable.Fields.Add("idfilm", db.Serial) hTable.Fields.Add("finame", db.String, 100) hTable.Fields.Add("fiyear", db.Date) hTable.Fields.Add("fiprod", db.string, 100) hTable.Fields.Add("fiboxo", db.Float) hTable.PrimaryKey = ["idfilm"] hTable.Update Endif If Not $hConn.Tables.Exist("tst_fi") Then hTable = $hConn.Tables.Add("tst_fi") hTable.Fields.Add("idstar", db.Integer) hTable.Fields.Add("idfilm", db.Integer) hTable.Fields.Add("sfpart", db.String, 20, "ND") 'hTable.Indexes.Add("x_stfi", ["idstar", "idfilm"]) hTable.Update Endif If Not $hConn.Tables.Exist("fipart") Then hTable = $hConn.Tables.Add("fipart") hTable.Fields.Add("paname", db.String, 10) hTable.Update Endif $hConn.Commit Catch $hConn.Rollback CloseDB() Debug Error.Where, Error.Text, Error.Code End ======================================================================= 4 - In FMain I open a connection window that creates something similar and starts the module code: MBase.OpenDB("postgresql", "localhost", "rubinettofelice", "gianluigi", "miapassword") Can anyone help me figure out where I made the mistakes? Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From bagonergi at gmail.com Mon Sep 2 18:31:48 2019 From: bagonergi at gmail.com (Gianluigi) Date: Mon, 2 Sep 2019 18:31:48 +0200 Subject: [Gambas-user] PostgreSQL, how to create a new database In-Reply-To: References: Message-ID: Hi guys, I solved thanks to the suggestions of Berserker79 of the Italian forum [0]. I restored template1 thanks to this guide [1] and I changed the connection string restoring the commented code. $hConn.Close() $hConn.Type = Lower(DBType) $hConn.Host = DBHost $hConn.Name = DBName $hConn.Login = UserName $hConn.Password = UserPassword $hConn.Port = "5432" and now all is OK. Regards Gianluigi [0] https://www.gambas-it.org/smf/index.php?topic=7253.msg46682#msg46682 [1] https://wiki.postgresql.org/wiki/Adventures_in_PostgreSQL,_Episode_1 Il giorno lun 2 set 2019 alle ore 15:22 Gianluigi ha scritto: > Hi everyone, > > I was creating a postgresql test database to verify the steps. > Unfortunately I must have done something wrong because at the final > verification I get these results, which means that, if I understand > correctly, instead of having populated the new "rubinettofelice" database > with tables, I directly populated the template1. > > This is how much is returned to me from the terminal: > > ======================================================================= > ~$ psql -U postgres > Password for user postgres: > psql (11.5 (Ubuntu 11.5-0ubuntu0.19.04.1)) > Type "help" for help. > > postgres=# \l > > Name | Owner | Encoding | Collate | Ctype | > Access privileges > > -----------------+-----------+----------+-------------+-------------+----------------------- > postgres | postgres | UTF8 | it_IT.UTF-8 | it_IT.UTF-8 | > rubinettofelice | gianluigi | UTF8 | it_IT.UTF-8 | it_IT.UTF-8 | > template0 | postgres | UTF8 | it_IT.UTF-8 | it_IT.UTF-8 | > =c/postgres + > | | | | | > postgres=CTc/postgres > template1 | postgres | UTF8 | it_IT.UTF-8 | it_IT.UTF-8 | > =c/postgres + > | | | | | > postgres=CTc/postgres > (4 rows) > > postgres=# \du > List of roles > Role name | Attributes | > Member of > > -----------+------------------------------------------------------------+----------- > gianluigi | Create role, Create DB | > {} > postgres | Superuser, Create role, Create DB, Replication, Bypass RLS | > {} > > postgres=# \c rubinettofelice > You are now connected to database "rubinettofelice" as user "postgres". > rubinettofelice=# \d > Did not find any relations. > <<========================================SIGH! > > rubinettofelice=# \dn > List of schemas > Name | Owner > --------+---------- > public | postgres > (1 row) > > rubinettofelice=# \c template1 > You are now connected to database "template1" as user "postgres". > template1=# \d > List of relations <<================ > ??? > Schema | Name | Type | Owner > --------+-------------------+----------+----------- > public | fipart | table | gianluigi > public | tagent | table | gianluigi > public | tagent_idagen_seq | sequence | gianluigi > public | tfilms | table | gianluigi > public | tfilms_idfilm_seq | sequence | gianluigi > public | tst_fi | table | gianluigi > public | tstars | table | gianluigi > public | tstars_idstar_seq | sequence | gianluigi > (8 rows) > ======================================================================= > > I created the database from the terminal with these steps. > > 1 - First I created the user: > > ======================================================================= > ~$ psql -U postgres -d template1 > Password for user postgres: > psql sql (11.5 (Ubuntu 11.5-0ubuntu0.19.04.1)) > Type "help" for help. > > template1=# CREATE ROLE gianluigi WITH CREATEDB CREATEROLE LOGIN ENCRYPTED > PASSWORD 'miapassword'; > CREATE ROLE > ======================================================================= > > 2 - Then I created the new "rubinettofelice" database: > > ======================================================================= > ~$ psql -U test -d template1 > Password for user test: > psql sql (11.5 (Ubuntu 11.5-0ubuntu0.19.04.1)) > Type "help" for help. > > template1=> CREATE DATABASE rubinettofelice WITH OWNER=gianluigi TEMPLATE= > template1 ENCODING='utf-8'; > CREATE DATABASE > ======================================================================= > > 3 - At this point he created a Gambas project with a module (MBase.module): > > ======================================================================= > ' Gambas module file > > > Private $hConn As New Connection > > Public Sub OpenDB(DBType As String, DBHost As String, DBName As String, > UserName As String, UserPassword As String) > > $hConn.Close() > $hConn.Type = Lower(DBType) > $hConn.Host = DBHost > '$hConn.Name = "" > $hConn.Login = UserName > $hConn.Password = UserPassword > '$hConn.Port = "5432" > > $hConn.Open() > > If $hConn.Databases.Exist(DBName) Then > MakeTable() > Else > Error.Raise(("Database not found.\n\nAre you sure that the database > exist?")) > Endif > > $hConn.Close() > Catch > Message.Error(Error.Text & "\n\n" & Error.Where) > FMain.Close() > > End > > Public Sub CloseDB() > > $hConn.Close() > > End > > Private Sub MakeTable() > > Dim hTable As Table > > $hConn.Begin > > If Not $hConn.Tables.Exist("tstars") Then > hTable = $hConn.Tables.Add("tstars") > > hTable.Fields.Add("idstar", db.Serial) > hTable.Fields.Add("stname", db.String, 40) > hTable.Fields.Add("stsurn", db.String, 40) > hTable.Fields.Add("stheig", db.Integer) > hTable.Fields.Add("stweig", db.Integer) > hTable.Fields.Add("stbirt", db.Date) > hTable.Fields.Add("sttele", db.String, 13) > hTable.Fields.Add("idagen", db.integer) > hTable.Fields.Add("stimag", db.Blob) > hTable.PrimaryKey = ["idstar"] > hTable.Update > > Endif > > If Not $hConn.Tables.Exist("tagent") Then > hTable = $hConn.Tables.Add("tagent") > > hTable.Fields.Add("idagen", db.Serial) > hTable.Fields.Add("agname", db.String, 40) > hTable.Fields.Add("agsurn", db.String, 40) > hTable.Fields.Add("agaddr", db.string, 80) > hTable.Fields.Add("agcity", db.string, 40) > hTable.Fields.Add("agstat", db.string, 40) > hTable.Fields.Add("agcoun", db.string, 40) > hTable.Fields.Add("agpost", db.string, 10) > hTable.Fields.Add("agtele", db.String, 13) > hTable.Fields.Add("agmail", db.String, 30) > hTable.Fields.Add("agwebs", db.String, 30) > hTable.PrimaryKey = ["idagen"] > hTable.Update > Endif > > If Not $hConn.Tables.Exist("tfilms") Then > hTable = $hConn.Tables.Add("tfilms") > > hTable.Fields.Add("idfilm", db.Serial) > hTable.Fields.Add("finame", db.String, 100) > hTable.Fields.Add("fiyear", db.Date) > hTable.Fields.Add("fiprod", db.string, 100) > hTable.Fields.Add("fiboxo", db.Float) > hTable.PrimaryKey = ["idfilm"] > hTable.Update > Endif > > If Not $hConn.Tables.Exist("tst_fi") Then > hTable = $hConn.Tables.Add("tst_fi") > > hTable.Fields.Add("idstar", db.Integer) > hTable.Fields.Add("idfilm", db.Integer) > hTable.Fields.Add("sfpart", db.String, 20, "ND") > 'hTable.Indexes.Add("x_stfi", ["idstar", "idfilm"]) > hTable.Update > Endif > > If Not $hConn.Tables.Exist("fipart") Then > hTable = $hConn.Tables.Add("fipart") > > hTable.Fields.Add("paname", db.String, 10) > hTable.Update > Endif > > $hConn.Commit > Catch > $hConn.Rollback > CloseDB() > Debug Error.Where, Error.Text, Error.Code > > End > ======================================================================= > > 4 - In FMain I open a connection window that creates something similar and > starts the module code: > > MBase.OpenDB("postgresql", "localhost", "rubinettofelice", "gianluigi", > "miapassword") > > Can anyone help me figure out where I made the mistakes? > > Regards > Gianluigi > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rwe-sse at osnanet.de Tue Sep 3 13:23:54 2019 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Tue, 3 Sep 2019 13:23:54 +0200 Subject: [Gambas-user] Gambas on Apple Message-ID: <08827314-15d3-a0f8-1d06-140fcfb65d78@osnanet.de> Some guy just asked me if I could make an app for his MacBook for him. Had to deny - but anyway, are there any plans? Regards Rolf From gambas.fr at gmail.com Thu Sep 5 10:24:48 2019 From: gambas.fr at gmail.com (Fabien Bodard) Date: Thu, 5 Sep 2019 10:24:48 +0200 Subject: [Gambas-user] Problem on Widget Container Definition Message-ID: Hi Benoit, If I define Voluntary a Container in a container custom widget Me._Container = ContainerPanel This container seem to lose it's hability to auto-arrange. Why ? How can I enforce this? -- Fabien Bodard -------------- next part -------------- An HTML attachment was scrubbed... URL: From gambas.fr at gmail.com Thu Sep 5 10:46:11 2019 From: gambas.fr at gmail.com (Fabien Bodard) Date: Thu, 5 Sep 2019 10:46:11 +0200 Subject: [Gambas-user] Problem on Widget Container Definition In-Reply-To: References: Message-ID: Then this is a demo with the problem. I want to understand why the setted container not arrange it's content ... The event Arrange is raised. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: DemoBugArrange-0.0.1.tar.gz Type: application/gzip Size: 11707 bytes Desc: not available URL: From gambas.fr at gmail.com Thu Sep 5 17:28:33 2019 From: gambas.fr at gmail.com (Fabien Bodard) Date: Thu, 5 Sep 2019 17:28:33 +0200 Subject: [Gambas-user] test Message-ID: Is my mail received ? -- Fabien Bodard -------------- next part -------------- An HTML attachment was scrubbed... URL: From shordi at gmail.com Thu Sep 5 17:30:12 2019 From: shordi at gmail.com (=?UTF-8?Q?Jorge_Carri=C3=B3n?=) Date: Thu, 5 Sep 2019 17:30:12 +0200 Subject: [Gambas-user] test In-Reply-To: References: Message-ID: Yes. It is. El jue., 5 sept. 2019 a las 17:29, Fabien Bodard () escribi?: > Is my mail received ? > > -- > Fabien Bodard > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bagonergi at gmail.com Thu Sep 5 17:32:28 2019 From: bagonergi at gmail.com (Gianluigi) Date: Thu, 5 Sep 2019 17:32:28 +0200 Subject: [Gambas-user] test In-Reply-To: References: Message-ID: Il giorno gio 5 set 2019 alle ore 17:29 Fabien Bodard ha scritto: > Is my mail received ? > > -- > Fabien Bodard > Yes, it is Benoit who is deaf ;-D Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From gambas.fr at gmail.com Thu Sep 5 17:36:08 2019 From: gambas.fr at gmail.com (Fabien Bodard) Date: Thu, 5 Sep 2019 17:36:08 +0200 Subject: [Gambas-user] test In-Reply-To: References: Message-ID: ouf :-) Thanks Le jeu. 5 sept. 2019 ? 17:33, Gianluigi a ?crit : > > > Il giorno gio 5 set 2019 alle ore 17:29 Fabien Bodard > ha scritto: > >> Is my mail received ? >> >> -- >> Fabien Bodard >> > > Yes, it is Benoit who is deaf ;-D > > Regards > Gianluigi > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -- Fabien Bodard -------------- next part -------------- An HTML attachment was scrubbed... URL: From d4t4full at gmail.com Thu Sep 5 17:47:04 2019 From: d4t4full at gmail.com (ML) Date: Thu, 5 Sep 2019 12:47:04 -0300 Subject: [Gambas-user] test In-Reply-To: References: Message-ID: On 5/9/19 12:28, Fabien Bodard wrote: > Is my mail received ? > -- > Fabien Bodard What would implode if someone -i.e: me- replied "no"? ;) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gambas.fr at gmail.com Thu Sep 5 18:03:17 2019 From: gambas.fr at gmail.com (Fabien Bodard) Date: Thu, 5 Sep 2019 18:03:17 +0200 Subject: [Gambas-user] test In-Reply-To: References: Message-ID: somewhere it's that IIf(False, True, True) Le jeu. 5 sept. 2019 ? 17:48, ML a ?crit : > On 5/9/19 12:28, Fabien Bodard wrote: > > Is my mail received ? > -- > Fabien Bodard > > What would implode if someone -i.e: me- replied "no"? ;) > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -- Fabien Bodard -------------- next part -------------- An HTML attachment was scrubbed... URL: From gambas.fr at gmail.com Thu Sep 5 18:15:38 2019 From: gambas.fr at gmail.com (Fabien Bodard) Date: Thu, 5 Sep 2019 18:15:38 +0200 Subject: [Gambas-user] test In-Reply-To: References: Message-ID: Well ... I'm playing but i need the container to work correctly Le jeu. 5 sept. 2019 ? 18:03, Fabien Bodard a ?crit : > somewhere it's that > > IIf(False, True, True) > > Le jeu. 5 sept. 2019 ? 17:48, ML a ?crit : > >> On 5/9/19 12:28, Fabien Bodard wrote: >> >> Is my mail received ? >> -- >> Fabien Bodard >> >> What would implode if someone -i.e: me- replied "no"? ;) >> >> >> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- >> > > > -- > Fabien Bodard > -- Fabien Bodard -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot_20190905_180828.png Type: image/png Size: 13145 bytes Desc: not available URL: From bagonergi at gmail.com Thu Sep 5 19:00:33 2019 From: bagonergi at gmail.com (Gianluigi) Date: Thu, 5 Sep 2019 19:00:33 +0200 Subject: [Gambas-user] test In-Reply-To: References: Message-ID: Il giorno gio 5 set 2019 alle ore 18:16 Fabien Bodard ha scritto: > Well ... I'm playing but i need the container to work correctly > > Fabien Bodard > Hi Benoit, Hans and myself asked Fabien about changes to the gb.chart component. But he pretends not to have received our requests. If the container is not needed for the component, do not help he :-P Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From gambas.fr at gmail.com Thu Sep 5 19:44:26 2019 From: gambas.fr at gmail.com (Fabien Bodard) Date: Thu, 5 Sep 2019 19:44:26 +0200 Subject: [Gambas-user] test In-Reply-To: References: Message-ID: I do not pretend that :-P but I've a lot to do for my own management tools ... Le jeu. 5 sept. 2019 ? 19:01, Gianluigi a ?crit : > > > Il giorno gio 5 set 2019 alle ore 18:16 Fabien Bodard > ha scritto: > >> Well ... I'm playing but i need the container to work correctly >> >> Fabien Bodard >> > > Hi Benoit, > Hans and myself asked Fabien about changes to the gb.chart component. > But he pretends not to have received our requests. > If the container is not needed for the component, do not help he :-P > > Regards > Gianluigi > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -- Fabien Bodard -------------- next part -------------- An HTML attachment was scrubbed... URL: From bagonergi at gmail.com Thu Sep 5 20:06:38 2019 From: bagonergi at gmail.com (Gianluigi) Date: Thu, 5 Sep 2019 20:06:38 +0200 Subject: [Gambas-user] test In-Reply-To: References: Message-ID: I actually hope you get an help ? ? Gianluigi Il giorno gio 5 set 2019 alle ore 19:45 Fabien Bodard ha scritto: > I do not pretend that :-P > > but I've a lot to do for my own management tools ... > > Le jeu. 5 sept. 2019 ? 19:01, Gianluigi a ?crit : > >> >> >> Il giorno gio 5 set 2019 alle ore 18:16 Fabien Bodard < >> gambas.fr at gmail.com> ha scritto: >> >>> Well ... I'm playing but i need the container to work correctly >>> >>> Fabien Bodard >>> >> >> Hi Benoit, >> Hans and myself asked Fabien about changes to the gb.chart component. >> But he pretends not to have received our requests. >> If the container is not needed for the component, do not help he :-P >> >> Regards >> Gianluigi >> >> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- >> > > > -- > Fabien Bodard > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From chrisml at deganius.de Thu Sep 5 21:02:39 2019 From: chrisml at deganius.de (Christof Thalhofer) Date: Thu, 5 Sep 2019 21:02:39 +0200 Subject: [Gambas-user] Problem on Widget Container Definition In-Reply-To: References: Message-ID: <6ba556b2-d88c-a241-b91c-601799cabdcd@deganius.de> Hello Fabien, Am 05.09.19 um 10:46 schrieb Fabien Bodard: > Then this is a demo with the problem. I want to understand why the > setted container not arrange it's content ... > > The event Arrange is raised. Maybe you have to do sth like this?: Public Sub _New() Dim hPanel As Panel Dim hMainPanel As Panel hMainPanel = New Panel(Me) > Me.Arrangement = Arrange.Fill HMainPanel.Arrangement = Arrange.Horizontal HPanel = New Panel(hMainPanel) HPanel.Expand = True HPanel.Background = Color.Green HPanel = New Panel(hMainPanel) As "Container" HPanel.Expand = True HPanel.Arrangement = Arrange.Horizontal Me._Container = HPanel End Alles Gute Christof Thalhofer -- Dies ist keine Signatur -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From gambas at cd-bahia.com Thu Sep 5 20:56:59 2019 From: gambas at cd-bahia.com (Dag Jarle Nerland Johansen - Gambas) Date: Thu, 5 Sep 2019 20:56:59 +0200 Subject: [Gambas-user] External MySQl-Connection work in IDE, not in binary Message-ID: Hi all, I have an issue concerning external MySQL connection. The MySQL-connection with the external server works when I run the IDE. In the compiled version it quits with the error "Cannot connect to MySQL-server", with no more comments. Does anybody have an idea what this could be or have a solution for it? Thanks in advance, dagjarle From gambas.fr at gmail.com Fri Sep 6 00:13:35 2019 From: gambas.fr at gmail.com (Fabien Bodard) Date: Fri, 6 Sep 2019 00:13:35 +0200 Subject: [Gambas-user] Problem on Widget Container Definition In-Reply-To: <6ba556b2-d88c-a241-b91c-601799cabdcd@deganius.de> References: <6ba556b2-d88c-a241-b91c-601799cabdcd@deganius.de> Message-ID: Yes it work... but this is a bug normally the arrange style might not be the base form one but the one given to the _Container property. Actually setting a container to _Container change the arrange property of the given Container ... BUG or Feature ? Le jeu. 5 sept. 2019 ? 21:03, Christof Thalhofer a ?crit : > Hello Fabien, > > Am 05.09.19 um 10:46 schrieb Fabien Bodard: > > > Then this is a demo with the problem. I want to understand why the > > setted container not arrange it's content ... > > > > The event Arrange is raised. > > Maybe you have to do sth like this?: > > Public Sub _New() > Dim hPanel As Panel > Dim hMainPanel As Panel > hMainPanel = New Panel(Me) > > Me.Arrangement = Arrange.Fill > HMainPanel.Arrangement = Arrange.Horizontal > > HPanel = New Panel(hMainPanel) > HPanel.Expand = True > HPanel.Background = Color.Green > > HPanel = New Panel(hMainPanel) As "Container" > HPanel.Expand = True > HPanel.Arrangement = Arrange.Horizontal > > Me._Container = HPanel > End > > > Alles Gute > > Christof Thalhofer > > -- > Dies ist keine Signatur > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -- Fabien Bodard -------------- next part -------------- An HTML attachment was scrubbed... URL: From rwe-sse at osnanet.de Fri Sep 6 08:09:19 2019 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Fri, 6 Sep 2019 08:09:19 +0200 Subject: [Gambas-user] Gambas on Apple In-Reply-To: <08827314-15d3-a0f8-1d06-140fcfb65d78@osnanet.de> References: <08827314-15d3-a0f8-1d06-140fcfb65d78@osnanet.de> Message-ID: Am 03.09.19 um 13:23 schrieb Rolf-Werner Eilert: > Some guy just asked me if I could make an app for his MacBook for him. > > Had to deny - but anyway, are there any plans? > > Regards > Rolf > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > > Did anyone read this? Or is it just that nobody knows an answer? :) Regards Rolf From rwe-sse at osnanet.de Fri Sep 6 09:19:44 2019 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Fri, 6 Sep 2019 09:19:44 +0200 Subject: [Gambas-user] OK click on Wizard Message-ID: In a Wizard with 5 steps, I want to close the dialog when the user clicks the button on the last step, i. e. step 5 when "OK" is shown. I tried Wizard_Click() and it reacts to every step Select Wizard.Index Case 1 ... Case 2 ... Case 5 Me.Close End Select But there is no reaction on step 5. Is there another event for the OK button? By the way, the documentation text for _Click is missing... Regards Rolf From gambas.fr at gmail.com Fri Sep 6 09:24:10 2019 From: gambas.fr at gmail.com (Fabien Bodard) Date: Fri, 6 Sep 2019 09:24:10 +0200 Subject: [Gambas-user] OK click on Wizard In-Reply-To: References: Message-ID: And if you try that ? : http://gambaswiki.org/wiki/comp/gb.form/wizard/.change Le ven. 6 sept. 2019 ? 09:20, Rolf-Werner Eilert a ?crit : > In a Wizard with 5 steps, I want to close the dialog when the user > clicks the button on the last step, i. e. step 5 when "OK" is shown. > > I tried Wizard_Click() and it reacts to every step > > Select Wizard.Index > Case 1 > ... > Case 2 > ... > Case 5 > Me.Close > End Select > > But there is no reaction on step 5. > > Is there another event for the OK button? > > By the way, the documentation text for _Click is missing... > > Regards > Rolf > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -- Fabien Bodard -------------- next part -------------- An HTML attachment was scrubbed... URL: From rwe-sse at osnanet.de Fri Sep 6 09:56:36 2019 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Fri, 6 Sep 2019 09:56:36 +0200 Subject: [Gambas-user] OK click on Wizard In-Reply-To: References: Message-ID: Unfortunately, no reaction to neither "5", "6" or "0"... I've tried BeforeChange as well. It seems that on the final button there is no event. Regards Rolf Am 06.09.19 um 09:24 schrieb Fabien Bodard: > And if you try that ? : > > http://gambaswiki.org/wiki/comp/gb.form/wizard/.change > > > > Le?ven. 6 sept. 2019 ??09:20, Rolf-Werner Eilert > a ?crit?: > > In a Wizard with 5 steps, I want to close the dialog when the user > clicks the button on the last step, i. e. step 5 when "OK" is shown. > > I tried Wizard_Click() and it reacts to every step > > Select Wizard.Index > Case 1 > ... > Case 2 > ... > Case 5 > ? ?Me.Close > End Select > > But there is no reaction on step 5. > > Is there another event for the OK button? > > By the way, the documentation text for _Click is missing... > > Regards > Rolf > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > > > > -- > Fabien Bodard > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > From ian.roper at iinet.net.au Fri Sep 6 10:22:38 2019 From: ian.roper at iinet.net.au (Ian Roper) Date: Fri, 6 Sep 2019 16:22:38 +0800 Subject: [Gambas-user] OK click on Wizard In-Reply-To: References: Message-ID: <2d7f1fca-c0f5-f815-1b43-24f1bd2613c9@iinet.net.au> Hi Rolf, This works to close the wizard on button click after the last 'page' as been reviewed. Public Sub Wizard_Change() ? If Wizard.Index = Wizard.Count - 1 Then Me.Close End if you want to change the text of the last button use Wizard.ActionText = "your close message" Please note; that if you code the change routine as 'Private' it will not trigger on a change event. It will only trigger if set to 'Public' as per the example. Cheers, Ian. On 6/9/19 3:24 pm, Fabien Bodard wrote: > And if you try that ? : > > http://gambaswiki.org/wiki/comp/gb.form/wizard/.change > > > > Le?ven. 6 sept. 2019 ??09:20, Rolf-Werner Eilert > a ?crit?: > > In a Wizard with 5 steps, I want to close the dialog when the user > clicks the button on the last step, i. e. step 5 when "OK" is shown. > > I tried Wizard_Click() and it reacts to every step > > Select Wizard.Index > Case 1 > ... > Case 2 > ... > Case 5 > ? ?Me.Close > End Select > > But there is no reaction on step 5. > > Is there another event for the OK button? > > By the way, the documentation text for _Click is missing... > > Regards > Rolf > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net > ]---- > > > > -- > Fabien Bodard > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: From taboege at gmail.com Fri Sep 6 11:06:40 2019 From: taboege at gmail.com (Tobias Boege) Date: Fri, 6 Sep 2019 11:06:40 +0200 Subject: [Gambas-user] Gambas on Apple In-Reply-To: References: <08827314-15d3-a0f8-1d06-140fcfb65d78@osnanet.de> Message-ID: <20190906090640.GD24877@highrise.localdomain> On Fri, 06 Sep 2019, Rolf-Werner Eilert wrote: > Am 03.09.19 um 13:23 schrieb Rolf-Werner Eilert: > > Some guy just asked me if I could make an app for his MacBook for him. > > > > Had to deny - but anyway, are there any plans? > > > > Regards > > Rolf > > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > > > > > > Did anyone read this? Or is it just that nobody knows an answer? :) > I read it. The only partial answer I knew and know is that once upon a time Fran?ois Gallo worked on porting Gambas to OS X [1]. I think he was successful and there more emails by him on this list than the one I cited, and eventually there was a screenshot [2] of the IDE running. But that screenshot does not load anymore for me and I have no idea if he shared his work somewhere. The git log does not mention his name. Regards, Tobi [1] https://lists.gambas-basic.org/pipermail/user/2011-June/034143.html [2] http://gambaswiki.org/wiki/doc/screenshot -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From rwe-sse at osnanet.de Fri Sep 6 11:39:56 2019 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Fri, 6 Sep 2019 11:39:56 +0200 Subject: [Gambas-user] OK click on Wizard In-Reply-To: <2d7f1fca-c0f5-f815-1b43-24f1bd2613c9@iinet.net.au> References: <2d7f1fca-c0f5-f815-1b43-24f1bd2613c9@iinet.net.au> Message-ID: <48cfed40-94e6-7b1e-1dcd-2277f275b13d@osnanet.de> Hi Ian, This doesn't work either. When I give ".Count -1" it is in fact closed, but one too early, i. e. after the user clicks on the last "Next" button. As soon as "OK" appears, the button doesn't react anymore. About the Wizard.ActionText, I know. But is there a special event for this last button? Regards Rolf Am 06.09.19 um 10:22 schrieb Ian Roper: > Hi Rolf, > > This works to close the wizard on button click after the last 'page' as > been reviewed. > > Public Sub Wizard_Change() > > ? If Wizard.Index = Wizard.Count - 1 Then Me.Close > > End > > if you want to change the text of the last button use Wizard.ActionText > = "your close message" > > Please note; that if you code the change routine as 'Private' it will > not trigger on a change event. > > It will only trigger if set to 'Public' as per the example. > > > Cheers, > > Ian. > > > On 6/9/19 3:24 pm, Fabien Bodard wrote: >> And if you try that ? : >> >> http://gambaswiki.org/wiki/comp/gb.form/wizard/.change >> >> >> >> Le?ven. 6 sept. 2019 ??09:20, Rolf-Werner Eilert > > a ?crit?: >> >> In a Wizard with 5 steps, I want to close the dialog when the user >> clicks the button on the last step, i. e. step 5 when "OK" is shown. >> >> I tried Wizard_Click() and it reacts to every step >> >> Select Wizard.Index >> Case 1 >> ... >> Case 2 >> ... >> Case 5 >> ? ?Me.Close >> End Select >> >> But there is no reaction on step 5. >> >> Is there another event for the OK button? >> >> By the way, the documentation text for _Click is missing... >> >> Regards >> Rolf >> >> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >> ]---- >> >> >> >> -- >> Fabien Bodard >> >> ----[ Gambas mailing-list is hosted byhttps://www.hostsharing.net ]---- > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > From rwe-sse at osnanet.de Fri Sep 6 11:47:42 2019 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Fri, 6 Sep 2019 11:47:42 +0200 Subject: [Gambas-user] Gambas on Apple In-Reply-To: <20190906090640.GD24877@highrise.localdomain> References: <08827314-15d3-a0f8-1d06-140fcfb65d78@osnanet.de> <20190906090640.GD24877@highrise.localdomain> Message-ID: <109136c0-135d-a582-f422-c6105ec38797@osnanet.de> Am 06.09.19 um 11:06 schrieb Tobias Boege: > On Fri, 06 Sep 2019, Rolf-Werner Eilert wrote: >> Am 03.09.19 um 13:23 schrieb Rolf-Werner Eilert: >>> Some guy just asked me if I could make an app for his MacBook for him. >>> >>> Had to deny - but anyway, are there any plans? >>> >>> Regards >>> Rolf >>> >>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- >>> >>> >> >> Did anyone read this? Or is it just that nobody knows an answer? :) >> > > I read it. The only partial answer I knew and know is that once upon > a time Fran?ois Gallo worked on porting Gambas to OS X [1]. > > I think he was successful and there more emails by him on this list > than the one I cited, and eventually there was a screenshot [2] of > the IDE running. But that screenshot does not load anymore for me > and I have no idea if he shared his work somewhere. The git log does > not mention his name. > > Regards, > Tobi > > [1] https://lists.gambas-basic.org/pipermail/user/2011-June/034143.html > [2] http://gambaswiki.org/wiki/doc/screenshot > Hm. When I browse the mails, I come to a point where he announces some milestone where Gambas3 seemed to compile and run on OS X except a few libraries I feel I wouldn't need. Sounds interesting, at least it should be possible to do something like that. Regards Rolf From rwe-sse at osnanet.de Fri Sep 6 11:58:39 2019 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Fri, 6 Sep 2019 11:58:39 +0200 Subject: [Gambas-user] OK click on Wizard In-Reply-To: <2d7f1fca-c0f5-f815-1b43-24f1bd2613c9@iinet.net.au> References: <2d7f1fca-c0f5-f815-1b43-24f1bd2613c9@iinet.net.au> Message-ID: <13b563d5-c45c-4f8e-ce95-83cd3fb5dfd9@osnanet.de> As a workaround I could give the wizard one more step, leaving it empty, and just start action and close the dialog after the user clicked the last-before Next button (as long as there is "Next", everything runs fine). But it wouldn't be the actual sense of having a last step with "OK" or "Start" or whatever, would it. Rolf Am 06.09.19 um 10:22 schrieb Ian Roper: > Hi Rolf, > > This works to close the wizard on button click after the last 'page' as > been reviewed. > > Public Sub Wizard_Change() > > ? If Wizard.Index = Wizard.Count - 1 Then Me.Close > > End > > if you want to change the text of the last button use Wizard.ActionText > = "your close message" > > Please note; that if you code the change routine as 'Private' it will > not trigger on a change event. > > It will only trigger if set to 'Public' as per the example. > > > Cheers, > > Ian. > > > On 6/9/19 3:24 pm, Fabien Bodard wrote: >> And if you try that ? : >> >> http://gambaswiki.org/wiki/comp/gb.form/wizard/.change >> >> >> >> Le?ven. 6 sept. 2019 ??09:20, Rolf-Werner Eilert > > a ?crit?: >> >> In a Wizard with 5 steps, I want to close the dialog when the user >> clicks the button on the last step, i. e. step 5 when "OK" is shown. >> >> I tried Wizard_Click() and it reacts to every step >> >> Select Wizard.Index >> Case 1 >> ... >> Case 2 >> ... >> Case 5 >> ? ?Me.Close >> End Select >> >> But there is no reaction on step 5. >> >> Is there another event for the OK button? >> >> By the way, the documentation text for _Click is missing... >> >> Regards >> Rolf >> >> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >> ]---- >> >> >> >> -- >> Fabien Bodard >> >> ----[ Gambas mailing-list is hosted byhttps://www.hostsharing.net ]---- > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > From ian.roper at iinet.net.au Fri Sep 6 12:25:05 2019 From: ian.roper at iinet.net.au (Ian Roper) Date: Fri, 6 Sep 2019 18:25:05 +0800 Subject: [Gambas-user] OK click on Wizard In-Reply-To: <48cfed40-94e6-7b1e-1dcd-2277f275b13d@osnanet.de> References: <2d7f1fca-c0f5-f815-1b43-24f1bd2613c9@iinet.net.au> <48cfed40-94e6-7b1e-1dcd-2277f275b13d@osnanet.de> Message-ID: <9e89eb89-0bc9-9c60-c652-e5aa151eb5bd@iinet.net.au> Hi Rolf, I started to play with this and found that there is a Wizard_Close() event This is activated when the "Ok" button appears? and is then clicked on. Public Sub Wizard_Close() ??? Me.Close End The reason why my first response to your question was flawed was because I was loading the Wizard data dynamically from a text file and the final Index I created was blank so I observed what I expected to see but was closing one index early as you discovered. Cheers, Ian. On 6/9/19 5:39 pm, Rolf-Werner Eilert wrote: > Hi Ian, > > This doesn't work either. When I give ".Count -1" it is in fact > closed, but one too early, i. e. after the user clicks on the last > "Next" button. > > As soon as "OK" appears, the button doesn't react anymore. > > About the Wizard.ActionText, I know. But is there a special event for > this last button? > > Regards > Rolf > > Am 06.09.19 um 10:22 schrieb Ian Roper: >> Hi Rolf, >> >> This works to close the wizard on button click after the last 'page' >> as been reviewed. >> >> Public Sub Wizard_Change() >> >> ?? If Wizard.Index = Wizard.Count - 1 Then Me.Close >> >> End >> >> if you want to change the text of the last button use >> Wizard.ActionText = "your close message" >> >> Please note; that if you code the change routine as 'Private' it will >> not trigger on a change event. >> >> It will only trigger if set to 'Public' as per the example. >> >> >> Cheers, >> >> Ian. >> >> >> On 6/9/19 3:24 pm, Fabien Bodard wrote: >>> And if you try that ? : >>> >>> http://gambaswiki.org/wiki/comp/gb.form/wizard/.change >>> >>> >>> >>> Le?ven. 6 sept. 2019 ??09:20, Rolf-Werner Eilert >> > a ?crit?: >>> >>> ??? In a Wizard with 5 steps, I want to close the dialog when the user >>> ??? clicks the button on the last step, i. e. step 5 when "OK" is >>> shown. >>> >>> ??? I tried Wizard_Click() and it reacts to every step >>> >>> ??? Select Wizard.Index >>> ??? Case 1 >>> ??? ... >>> ??? Case 2 >>> ??? ... >>> ??? Case 5 >>> ??? ? ?Me.Close >>> ??? End Select >>> >>> ??? But there is no reaction on step 5. >>> >>> ??? Is there another event for the OK button? >>> >>> ??? By the way, the documentation text for _Click is missing... >>> >>> ??? Regards >>> ??? Rolf >>> >>> ??? ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >>> ??? ]---- >>> >>> >>> >>> -- >>> Fabien Bodard >>> >>> ----[ Gambas mailing-list is hosted byhttps://www.hostsharing.net? >>> ]---- >> >> >> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- >> > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- From rwe-sse at osnanet.de Fri Sep 6 13:35:07 2019 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Fri, 6 Sep 2019 13:35:07 +0200 Subject: [Gambas-user] OK click on Wizard In-Reply-To: <9e89eb89-0bc9-9c60-c652-e5aa151eb5bd@iinet.net.au> References: <2d7f1fca-c0f5-f815-1b43-24f1bd2613c9@iinet.net.au> <48cfed40-94e6-7b1e-1dcd-2277f275b13d@osnanet.de> <9e89eb89-0bc9-9c60-c652-e5aa151eb5bd@iinet.net.au> Message-ID: Aaaah thank you Ian! That was it. Thanks so much! Rolf Am 06.09.19 um 12:25 schrieb Ian Roper: > Hi Rolf, > > I started to play with this and found that there is a Wizard_Close() event > > This is activated when the "Ok" button appears? and is then clicked on. > > Public Sub Wizard_Close() > ??? Me.Close > End > > The reason why my first response to your question was flawed was because > I was loading the Wizard data dynamically from a text file and the final > Index I created was blank > > so I observed what I expected to see but was closing one index early as > you discovered. > > > Cheers, > > Ian. > > > On 6/9/19 5:39 pm, Rolf-Werner Eilert wrote: >> Hi Ian, >> >> This doesn't work either. When I give ".Count -1" it is in fact >> closed, but one too early, i. e. after the user clicks on the last >> "Next" button. >> >> As soon as "OK" appears, the button doesn't react anymore. >> >> About the Wizard.ActionText, I know. But is there a special event for >> this last button? >> >> Regards >> Rolf >> >> Am 06.09.19 um 10:22 schrieb Ian Roper: >>> Hi Rolf, >>> >>> This works to close the wizard on button click after the last 'page' >>> as been reviewed. >>> >>> Public Sub Wizard_Change() >>> >>> ?? If Wizard.Index = Wizard.Count - 1 Then Me.Close >>> >>> End >>> >>> if you want to change the text of the last button use >>> Wizard.ActionText = "your close message" >>> >>> Please note; that if you code the change routine as 'Private' it will >>> not trigger on a change event. >>> >>> It will only trigger if set to 'Public' as per the example. >>> >>> >>> Cheers, >>> >>> Ian. >>> >>> >>> On 6/9/19 3:24 pm, Fabien Bodard wrote: >>>> And if you try that ? : >>>> >>>> http://gambaswiki.org/wiki/comp/gb.form/wizard/.change >>>> >>>> >>>> >>>> Le?ven. 6 sept. 2019 ??09:20, Rolf-Werner Eilert >>> > a ?crit?: >>>> >>>> ??? In a Wizard with 5 steps, I want to close the dialog when the user >>>> ??? clicks the button on the last step, i. e. step 5 when "OK" is >>>> shown. >>>> >>>> ??? I tried Wizard_Click() and it reacts to every step >>>> >>>> ??? Select Wizard.Index >>>> ??? Case 1 >>>> ??? ... >>>> ??? Case 2 >>>> ??? ... >>>> ??? Case 5 >>>> ??? ? ?Me.Close >>>> ??? End Select >>>> >>>> ??? But there is no reaction on step 5. >>>> >>>> ??? Is there another event for the OK button? >>>> >>>> ??? By the way, the documentation text for _Click is missing... >>>> >>>> ??? Regards >>>> ??? Rolf >>>> >>>> ??? ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >>>> ??? ]---- >>>> >>>> >>>> >>>> -- >>>> Fabien Bodard >>>> >>>> ----[ Gambas mailing-list is hosted byhttps://www.hostsharing.net ]---- >>> >>> >>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- >>> >> >> >> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > > From chrisml at deganius.de Fri Sep 6 15:25:01 2019 From: chrisml at deganius.de (Christof Thalhofer) Date: Fri, 6 Sep 2019 15:25:01 +0200 Subject: [Gambas-user] Problem on Widget Container Definition In-Reply-To: References: <6ba556b2-d88c-a241-b91c-601799cabdcd@deganius.de> Message-ID: <3cbfb8d4-7815-8caf-ba54-13011d25fbff@deganius.de> Am 06.09.19 um 00:13 schrieb Fabien Bodard: > Yes it work...? > > but this is a bug normally the arrange style might not be the base form > one but the one given to the _Container property. > > Actually?setting a container to _Container change the arrange property > of the given Container ... BUG or Feature ? I'm not sure. I seldom do arrangements by code and if I do it by hand I fiddle around until it works ... ;-) Alles Gute Christof Thalhofer -- [x] nail here for new monitor From adamnt42 at gmail.com Fri Sep 6 15:28:17 2019 From: adamnt42 at gmail.com (Bruce) Date: Fri, 6 Sep 2019 22:58:17 +0930 Subject: [Gambas-user] External MySQl-Connection work in IDE, not in binary In-Reply-To: References: Message-ID: <46ac4107-3771-9ca5-8500-1022a09807da@gmail.com> Need to know how you are making the connection in both instances? On 6/9/19 4:26 am, Dag Jarle Nerland Johansen - Gambas wrote: > Hi all, > I have an issue concerning external MySQL connection. > The MySQL-connection with the external server works when I run the IDE. > In the compiled version it quits with the error "Cannot connect to > MySQL-server", with no more comments. > > Does anybody have an idea what this could be or have a solution for it? > Thanks in advance, > dagjarle > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- From adamnt42 at gmail.com Sat Sep 7 12:16:34 2019 From: adamnt42 at gmail.com (Bruce) Date: Sat, 7 Sep 2019 19:46:34 +0930 Subject: [Gambas-user] Would anyone have a custom InputBox control out there that uses a combobox Message-ID: I am just trying to save time here. The value list is short, 10 or so items. I just need something like the native InputBox, with title, prompt etc properties but with a List property that I could populate and then call. Explanation: There are a limited number of winery regions here in Aus, once the user has selected a state then I'd just like to give them the opportunity to select a wine region from thar state. This project is very new and undeveloped, I could write the control but it will only be used until the entire UI is developed. So I thought that some kind soul may have already done this and is willing to share. cheers b From bagonergi at gmail.com Sat Sep 7 14:20:58 2019 From: bagonergi at gmail.com (Gianluigi) Date: Sat, 7 Sep 2019 14:20:58 +0200 Subject: [Gambas-user] Would anyone have a custom InputBox control out there that uses a combobox In-Reply-To: References: Message-ID: Il giorno sab 7 set 2019 alle ore 12:18 Bruce ha scritto: > I am just trying to save time here. > The value list is short, 10 or so items. I just need something like the > native InputBox, with title, prompt etc properties but with a List > property that I could populate and then call. > > Explanation: There are a limited number of winery regions here in Aus, > once the user has selected a state then I'd just like to give them the > opportunity to select a wine region from thar state. > > This project is very new and undeveloped, I could write the control but > it will only be used until the entire UI is developed. So I thought that > some kind soul may have already done this and is willing to share. > > cheers > b > Looking for something like this? See attached project Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: InputCombo-0.0.1.tar.gz Type: application/gzip Size: 12382 bytes Desc: not available URL: From chrisml at deganius.de Mon Sep 9 12:46:03 2019 From: chrisml at deganius.de (Christof Thalhofer) Date: Mon, 9 Sep 2019 12:46:03 +0200 Subject: [Gambas-user] "If Error" is ambiguous Message-ID: <1b1fec89-11de-40e8-0826-ec3d5b0bf495@deganius.de> Hello, I think I found a bug in Gambas, but I am not sure: Normally "If Error" is used to detect if an error happed (and afterwards the programmer usually clears the error): -------------------------------------------------------- Try blah() If Error then DoSth() Error.Clear EndIf -------------------------------------------------------- But after Error.Clear Error continues to report True although the error was cleared: -------------------------------------------------------- Public Sub Main() Dim x As Float Try x = 2 / 0 If Error Then Error.Clear Endif If Error Then Print "Error still true" Endif End -------------------------------------------------------- What do you think about that? Alles Gute Christof Thalhofer -- Dies ist keine Signatur -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From t.lee.davidson at gmail.com Mon Sep 9 16:14:41 2019 From: t.lee.davidson at gmail.com (T Lee Davidson) Date: Mon, 9 Sep 2019 10:14:41 -0400 Subject: [Gambas-user] "If Error" is ambiguous In-Reply-To: <1b1fec89-11de-40e8-0826-ec3d5b0bf495@deganius.de> References: <1b1fec89-11de-40e8-0826-ec3d5b0bf495@deganius.de> Message-ID: <8d454c18-5526-6379-645d-6721825ecfd6@gmail.com> On 9/9/19 6:46 AM, Christof Thalhofer wrote: > Hello, > > I think I found a bug in Gambas, but I am not sure: > > Normally "If Error" is used to detect if an error happed (and afterwards > the programmer usually clears the error): > > -------------------------------------------------------- > Try blah() > If Error then > DoSth() > Error.Clear > EndIf > -------------------------------------------------------- > > But after Error.Clear Error continues to report True although the error > was cleared: > > -------------------------------------------------------- > Public Sub Main() > > Dim x As Float > > Try x = 2 / 0 > > If Error Then > Error.Clear > Endif > > If Error Then > Print "Error still true" > Endif > > End > -------------------------------------------------------- > > What do you think about that? > > Alles Gute > > Christof Thalhofer > According to the Wiki [0], Error.Clear "Resets the error code to zero and the error message to NULL." And [1], "The error flag is reset to FALSE when: The RETURN instruction is executed. A TRY instruction has been executed without any error." It does seem logical that Error.Clear should also reset the error flag. [0] http://gambaswiki.org/wiki/comp/gb/error/clear [1] http://gambaswiki.org/wiki/lang/error ___ Lee From chrisml at deganius.de Mon Sep 9 17:19:11 2019 From: chrisml at deganius.de (Christof Thalhofer) Date: Mon, 9 Sep 2019 17:19:11 +0200 Subject: [Gambas-user] "If Error" is ambiguous In-Reply-To: <8d454c18-5526-6379-645d-6721825ecfd6@gmail.com> References: <1b1fec89-11de-40e8-0826-ec3d5b0bf495@deganius.de> <8d454c18-5526-6379-645d-6721825ecfd6@gmail.com> Message-ID: Am 09.09.19 um 16:14 schrieb T Lee Davidson: > It does seem logical that Error.Clear should also reset the error flag. Okay, that's what I think, too. It's not understandable that after an Error.Clear Error still shows true. But will a correction break a lot of existing code? I don't think so. Who was aware of that, checked for Error.Code. Who was not, produced potentially unreliable code which should have caused errors meanwhile. The code of Gambas itself is full of "If Error Then". Alles Gute Christof Thalhofer -- Dies ist keine Signatur -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From kicking177 at gmail.com Mon Sep 9 18:50:55 2019 From: kicking177 at gmail.com (KKing) Date: Mon, 9 Sep 2019 17:50:55 +0100 Subject: [Gambas-user] Regions and Code folding Message-ID: <5f12945b-356d-f0bf-900e-20456054ac7b@gmail.com> Is there support for regions and within the IDE code folding? If not is it on a wishlist / roadmap ? K. From g4mba5 at gmail.com Mon Sep 9 18:56:29 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Mon, 9 Sep 2019 18:56:29 +0200 Subject: [Gambas-user] Regions and Code folding In-Reply-To: <5f12945b-356d-f0bf-900e-20456054ac7b@gmail.com> References: <5f12945b-356d-f0bf-900e-20456054ac7b@gmail.com> Message-ID: Le 09/09/2019 ? 18:50, KKing a ?crit?: > Is there support for regions and within the IDE code folding? > > If not is it on a wishlist / roadmap ? > > K. > No and no. -- Beno?t Minisini From g4mba5 at gmail.com Mon Sep 9 22:32:14 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Mon, 9 Sep 2019 22:32:14 +0200 Subject: [Gambas-user] "If Error" is ambiguous In-Reply-To: References: <1b1fec89-11de-40e8-0826-ec3d5b0bf495@deganius.de> <8d454c18-5526-6379-645d-6721825ecfd6@gmail.com> Message-ID: <699ab6ae-00b0-5906-6ca5-761193be2399@gmail.com> Le 09/09/2019 ? 17:19, Christof Thalhofer a ?crit?: > Am 09.09.19 um 16:14 schrieb T Lee Davidson: > >> It does seem logical that Error.Clear should also reset the error flag. > > Okay, that's what I think, too. It's not understandable that after an > Error.Clear Error still shows true. > > But will a correction break a lot of existing code? I don't think so. > Who was aware of that, checked for Error.Code. Who was not, produced > potentially unreliable code which should have caused errors meanwhile. > > The code of Gambas itself is full of "If Error Then". > > Alles Gute > > Christof Thalhofer > The error flag is set once the TRY instruction has been executed. The error exception management code does not care with that flag, this is why Error.Clear() does not clear it. Actually nothing clears that flag, except a new TRY instruction. I don't think it's a problem if Error.Clear() would clear the flag. Anyway, the 'If Error Then...' was intended to be used just after a TRY instruction and only in that occasion. Maybe the compiler should raise a warning if we are not in that case, if possible. Regards, -- Beno?t Minisini From chrisml at deganius.de Mon Sep 9 23:01:33 2019 From: chrisml at deganius.de (Christof Thalhofer) Date: Mon, 9 Sep 2019 23:01:33 +0200 Subject: [Gambas-user] "If Error" is ambiguous In-Reply-To: <699ab6ae-00b0-5906-6ca5-761193be2399@gmail.com> References: <1b1fec89-11de-40e8-0826-ec3d5b0bf495@deganius.de> <8d454c18-5526-6379-645d-6721825ecfd6@gmail.com> <699ab6ae-00b0-5906-6ca5-761193be2399@gmail.com> Message-ID: <39658cd7-aa40-30f7-7a0e-3fc679c64a0e@deganius.de> Am 09.09.19 um 22:32 schrieb Beno?t Minisini: > The error flag is set once the TRY instruction has been executed. > > The error exception management code does not care with that flag, this > is why Error.Clear() does not clear it. Actually nothing clears that > flag, except a new TRY instruction. > > I don't think it's a problem if Error.Clear() would clear the flag. > > Anyway, the 'If Error Then...' was intended to be used just after a TRY > instruction and only in that occasion. > > Maybe the compiler should raise a warning if we are not in that case, if > possible. I am playing around with my unittests and there are occasions where the same code first does a "Try ... If Error Then ... Error.Clear" and later on the program has to detect if an error happened independently from that. Here I stumbled over the behaviour of Gambas. For me I could fix it by checking for Error.Code <> 0 but it was not intuitive. I rubbed my eyes and had to get some sleep before I understood the problem. I think it would be better to clear the flag with Error.Clear and I also think it would not break older code. Alles Gute Christof Thalhofer -- Dies ist keine Signatur -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From g4mba5 at gmail.com Mon Sep 9 23:59:31 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Mon, 9 Sep 2019 23:59:31 +0200 Subject: [Gambas-user] "If Error" is ambiguous In-Reply-To: <39658cd7-aa40-30f7-7a0e-3fc679c64a0e@deganius.de> References: <1b1fec89-11de-40e8-0826-ec3d5b0bf495@deganius.de> <8d454c18-5526-6379-645d-6721825ecfd6@gmail.com> <699ab6ae-00b0-5906-6ca5-761193be2399@gmail.com> <39658cd7-aa40-30f7-7a0e-3fc679c64a0e@deganius.de> Message-ID: <7c7379d9-b105-04de-8205-c9cf9dac5c45@gmail.com> Le 09/09/2019 ? 23:01, Christof Thalhofer a ?crit?: > > I am playing around with my unittests and there are occasions where the > same code first does a "Try ... If Error Then ... Error.Clear" and later > on the program has to detect if an error happened independently from that. > > Here I stumbled over the behaviour of Gambas. For me I could fix it by > checking for Error.Code <> 0 but it was not intuitive. I rubbed my eyes > and had to get some sleep before I understood the problem. > > I think it would be better to clear the flag with Error.Clear and I also > think it would not break older code. > > Alles Gute > > Christof Thalhofer > Done in commit https://gitlab.com/gambas/gambas/commit/d3fdd6fdda18656db4d6fc64c3872d5a1282ec2a. -- Beno?t Minisini From g4mba5 at gmail.com Tue Sep 10 00:11:51 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Tue, 10 Sep 2019 00:11:51 +0200 Subject: [Gambas-user] Problem on Widget Container Definition In-Reply-To: References: Message-ID: <8716a46c-a0d1-abf0-19c9-f5a9ae541bd5@gmail.com> Le 05/09/2019 ? 10:46, Fabien Bodard a ?crit?: > Then this is a demo with the problem. I want to understand why the > setted container not arrange it's content ... > > The event Arrange is raised. > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > As soon as you set the UserContainer._Container property to a specific container, the _Container arrangement properties are initialized with the UserContainer arrangement properties, and then all arrangement properties of the UserContainer actually applies to the _Container control. If you want to access the true Arrangement property of the UserContainer, you have to use the _Arrangement property. -- Beno?t Minisini From ujlain at gmail.com Tue Sep 10 06:58:49 2019 From: ujlain at gmail.com (Vinode Singh Ujlain) Date: Tue, 10 Sep 2019 10:28:49 +0530 Subject: [Gambas-user] Any plans ahead to extend GAMBAS to creating Android Apps ? Message-ID: <34e97abd-a1d3-9e98-02b6-7a9cf2d56b4b@gmail.com> Beno?t desired creating an environment that made web development as easy as creating a desktop application. Coming from Php background, I have very briefly tried WebForms and realized - indeed Beno?t is successful in creating what he set out to achieve. WebForm has the potential to catapult GAMBAS into RAD Web application. My *Salutes* to Beno?t Minisini & others who behind the scene are toiling to get GAMBAS to where it is today. Wondering if there are any plans ahead to *extend GAMBAS to creating Android Apps ?* Warm Regards, Vinode Singh Ujlain | ujlain at gmail.com | https://www.linkedin.com/in/ujlain/ ------------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: From chrisml at deganius.de Tue Sep 10 07:23:04 2019 From: chrisml at deganius.de (Christof Thalhofer) Date: Tue, 10 Sep 2019 07:23:04 +0200 Subject: [Gambas-user] "If Error" is ambiguous In-Reply-To: <7c7379d9-b105-04de-8205-c9cf9dac5c45@gmail.com> References: <1b1fec89-11de-40e8-0826-ec3d5b0bf495@deganius.de> <8d454c18-5526-6379-645d-6721825ecfd6@gmail.com> <699ab6ae-00b0-5906-6ca5-761193be2399@gmail.com> <39658cd7-aa40-30f7-7a0e-3fc679c64a0e@deganius.de> <7c7379d9-b105-04de-8205-c9cf9dac5c45@gmail.com> Message-ID: Am 09.09.19 um 23:59 schrieb Beno?t Minisini: > Done in commit > https://gitlab.com/gambas/gambas/commit/d3fdd6fdda18656db4d6fc64c3872d5a1282ec2a. Ok, cool, thank you! Alles Gute Christof Thalhofer -- Dies ist keine Signatur -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From g4mba5 at gmail.com Tue Sep 10 08:00:19 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Tue, 10 Sep 2019 08:00:19 +0200 Subject: [Gambas-user] Any plans ahead to extend GAMBAS to creating Android Apps ? In-Reply-To: <34e97abd-a1d3-9e98-02b6-7a9cf2d56b4b@gmail.com> References: <34e97abd-a1d3-9e98-02b6-7a9cf2d56b4b@gmail.com> Message-ID: <3049e914-a2d4-e3a2-4eee-2c95149a0e45@gmail.com> Le 10/09/2019 ? 06:58, Vinode Singh Ujlain a ?crit?: > Beno?t desired creating an environment that made web development as easy > as creating a desktop application. Coming from Php background, I have > very briefly tried WebForms and realized - indeed Beno?t is successful > in creating what he set out to achieve. WebForm has the potential to > catapult GAMBAS into RAD Web application. My *Salutes* to Beno?t > Minisini & others who behind the scene are toiling to get GAMBAS to > where it is today. > > Wondering if there are any plans ahead to *extend GAMBAS to creating > Android Apps ?* > It's not that easy: 1) Android does not use libc, which may be a problem to port the interpreter. 2) Maybe Qt allows to write a GUI program on Android using C++. But if you want to use the standard Android GUI, I guess you have to use Java code and call it from the interpreter. 3) I have no experience in Android developpement, so there is a learning curve (i.e. time). -- Beno?t Minisini From chrisml at deganius.de Tue Sep 10 14:28:43 2019 From: chrisml at deganius.de (Christof Thalhofer) Date: Tue, 10 Sep 2019 14:28:43 +0200 Subject: [Gambas-user] Merge request for gb.test Message-ID: <14fcd860-928c-1e45-132c-0df5126ad5d4@deganius.de> Hello Beno?t, I just created a merge request for the component gb.test. With this component I test all my software written in Gambas with several hundred tests before we put it into production. I also use it to do test-driven development. It has greatly stabilized the quality of all my projects and I hope you see value in it as well. I would be very happy if it could be integrated into Gambas. I tried to integrate things which were mentioned by you and other members of the Gambas community when we discussed unittests more than a year ago. gb.test produces TAP output to Stdout as described in this specification: http://testanything.org/tap-specification.html It lacks only "TODO", which can easily be implemented later. TAP can be used to display or process the results in multiple ways. gb.test also allows a project to be tested "from outside", as shown in the file "test.sh" and so allows automated testing for example in servers for continuous integration. I usually use it myself so, that during development I start Unittest.Main() with F5 and watch the console. I would be happy if tests could still be triggered quickly with one key or even from a module in future. Alles Gute Christof Thalhofer -- Dies ist keine Signatur -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From bagonergi at gmail.com Tue Sep 10 15:08:34 2019 From: bagonergi at gmail.com (Gianluigi) Date: Tue, 10 Sep 2019 15:08:34 +0200 Subject: [Gambas-user] Strange behavior of TextBox.LostFocus with message Message-ID: with qt I get an error, with gtk it blocks after the message. See attached project Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: LostFocusMessage-0.0.1.tar.gz Type: application/gzip Size: 11678 bytes Desc: not available URL: From roberto.premoli at tiscali.it Tue Sep 10 15:50:44 2019 From: roberto.premoli at tiscali.it (roberto) Date: Tue, 10 Sep 2019 15:50:44 +0200 Subject: [Gambas-user] Any plans ahead to extend GAMBAS to creating Android Apps ? In-Reply-To: <34e97abd-a1d3-9e98-02b6-7a9cf2d56b4b@gmail.com> References: <34e97abd-a1d3-9e98-02b6-7a9cf2d56b4b@gmail.com> Message-ID: On 10/09/19 06:58, Vinode Singh Ujlain wrote: > > Beno?t desired creating an environment that made web development as > easy as creating a desktop application. Coming from Php background, I > have very briefly tried WebForms and realized - indeed Beno?t is > successful in creating what he set out to achieve. WebForm has the > potential to catapult GAMBAS into RAD Web application. My *Salutes* to > Beno?t Minisini & others who behind the scene are toiling to get > GAMBAS to where it is today. > > Wondering if there are any plans ahead to *extend GAMBAS to creating > Android Apps ?* > > Warm Regards, > Vinode Singh Ujlain to write App for android using GAMBAS will be a dream to me! Hope it can be true in a near future. R. -------------- next part -------------- An HTML attachment was scrubbed... URL: From shordi at gmail.com Tue Sep 10 17:05:36 2019 From: shordi at gmail.com (=?UTF-8?Q?Jorge_Carri=C3=B3n?=) Date: Tue, 10 Sep 2019 17:05:36 +0200 Subject: [Gambas-user] Strange behavior of TextBox.LostFocus with message In-Reply-To: References: Message-ID: Works fine for me. No messages at all. [System] Gambas=3.13 OperatingSystem=Linux Kernel=4.15.0-60-generic Architecture=x86_64 Distribution=Linux Mint 19.2 Tina Desktop=CINNAMON Theme=Qt5CTProxy Language=es_ES.UTF-8 Memory=16001M [Libraries] Cairo=libcairo.so.2.11510.0 Curl=libcurl.so.4.5.0 DBus=libdbus-1.so.3.19.4 GStreamer=libgstreamer-1.0.so.0.1405.0 GTK+2=libgtk-x11-2.0.so.0.2400.32 GTK+3=libgtk-3.so.0.2200.30 OpenGL=libGL.so.1.0.0 Poppler=libpoppler.so.73.0.0 QT4=libQtCore.so.4.8.7 QT5=libQt5Core.so.5.9.5 SDL=libSDL-1.2.so.0.11.4 SQLite=libsqlite3.so.0.8.6 [Environment] CINNAMON_VERSION=4.2.4 DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus DEFAULTS_PATH=/usr/share/gconf/cinnamon.default.path DESKTOP_SESSION=cinnamon DISPLAY=:0 GB_GUI=gb.qt5 GDMSESSION=cinnamon GDM_LANG=es_ES GIO_LAUNCHED_DESKTOP_FILE=/.cinnamon/panel-launchers/cinnamon-custom-launcher-1.desktop GIO_LAUNCHED_DESKTOP_FILE_PID=2323 GJS_DEBUG_OUTPUT=stderr GJS_DEBUG_TOPICS=JS ERROR;JS LOG GNOME_DESKTOP_SESSION_ID=this-is-deprecated GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1 GTK_MODULES=gail:atk-bridge GTK_OVERLAY_SCROLLING=1 HOME= LANG=es_ES.UTF-8 LANGUAGE=es_ES.UTF-8 LC_ADDRESS=es_ES.UTF-8 LC_IDENTIFICATION=es_ES.UTF-8 LC_MEASUREMENT=es_ES.UTF-8 LC_MONETARY=es_ES.UTF-8 LC_NAME=es_ES.UTF-8 LC_NUMERIC=es_ES.UTF-8 LC_PAPER=es_ES.UTF-8 LC_TELEPHONE=es_ES.UTF-8 LC_TIME=es_ES.UTF-8 LOGNAME= MANDATORY_PATH=/usr/share/gconf/cinnamon.mandatory.path PATH=/.local/bin:/opt/GitHub Desktop:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:. PWD= QT_ACCESSIBILITY=1 QT_QPA_PLATFORMTHEME=qt5ct SESSION_MANAGER=local/:@/tmp/.ICE-unix/1284,unix/:/tmp/.ICE-unix/1284 SHELL=/bin/bash SHLVL=0 SSH_AGENT_PID=1353 SSH_AUTH_SOCK=/run/user/1000/keyring/ssh TZ=:/etc/localtime USER= XAUTHORITY=/.Xauthority XDG_CONFIG_DIRS=/etc/xdg/xdg-cinnamon:/etc/xdg XDG_CURRENT_DESKTOP=X-Cinnamon XDG_DATA_DIRS=/usr/share/cinnamon:/usr/share/gnome:/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/ XDG_RUNTIME_DIR=/run/user/1000 XDG_SEAT=seat0 XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0 XDG_SESSION_DESKTOP=cinnamon XDG_SESSION_ID=c2 XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0 XDG_SESSION_TYPE=x11 XDG_VTNR=7 Best Regards El mar., 10 sept. 2019 a las 15:09, Gianluigi () escribi?: > with qt I get an error, with gtk it blocks after the message. > See attached project > > Regards > Gianluigi > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mati86dl at gmail.com Tue Sep 10 17:09:44 2019 From: mati86dl at gmail.com (Matias De lellis) Date: Tue, 10 Sep 2019 12:09:44 -0300 Subject: [Gambas-user] gambas3 webform crud example. Message-ID: Hi all, As I comment in an previous email, the idea is make a pagekite administration page, and I assumed that Gambas webform is a good candidate. So, I started writing an example to internalize with him, and I am very happy. =) I share a complete example of CRUD handling users. * https://github.com/matiasdelellis/gambas3-crud-example * https://github.com/matiasdelellis/gambas3-crud-example/releases/download/v0.1.1/WebformCrudExample-0.1.1.tar.gz The intial class is WebformLogin -Everything starts from there-, but there is a WebFormInstall that must be called once to build the database. Based on this experience I ask some questions: 1. The type of database, name, etc, is fixed/hardcoded, but I would like it to be configurable in WebFormInstall. Do you have any suggestions? It must be written by WebformIntall and taked automatically by WebDatabase. 1.1. This is annoying, but I ask you to do a quick look at the WebDatabase.module to see if you believe it is well done, in particular if they it is transparent to interact with the rest of the classes, and if security consideration -AdminOrOwnRequired() and AdminRequired subrutines- to admin task is sufficient. 2. The values of inputs, positions, active WebForm, are all saved in Session, which is interesting, but these are accessible with the inspector, and a GET is emited with that data every time the focus changes between the inputs. This is a local security problem that would be good to improve. 3. Related, upon requesting the page again, (Pressing F5), I would expect this data to be cleaned, but I always get the previous data. I can't abandon the session, due the active WebForm is saved there too. 4. How to reuse js components?. In this example I use toastify to show a simple notification. > Webform.AddJavascriptFile("toastify.js") It add the script from 'data' folder. Shouldn't it be in public? There is no equivalent for css?. The only way I found is to add style.css file in public foloder to extend the default styles. > WebForm._AddJavascript("Toastify({text: \'" & ("Done") & "\', gravity: \'bottom\', close: true }).showToast();") This is correct to execute JS code? 5. How to publish the project? > GB_HTTPD_PORT=8080 gbx3 -H ...and an Apache reverse proxy form url to 8080 port? I have many more doubts, but I guess this is enough for a first consultation.. :sweet_smiley: Of course, thank you very much for all the development, and any response.. Ragards, Matias. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bagonergi at gmail.com Tue Sep 10 17:23:31 2019 From: bagonergi at gmail.com (Gianluigi) Date: Tue, 10 Sep 2019 17:23:31 +0200 Subject: [Gambas-user] Strange behavior of TextBox.LostFocus with message In-Reply-To: References: Message-ID: Ok, only for the master. Thank you Regards Gianluigi Il giorno mar 10 set 2019 alle ore 17:06 Jorge Carri?n ha scritto: > Works fine for me. No messages at all. > > [System] > Gambas=3.13 > OperatingSystem=Linux > Kernel=4.15.0-60-generic > Architecture=x86_64 > Distribution=Linux Mint 19.2 Tina > Desktop=CINNAMON > Theme=Qt5CTProxy > Language=es_ES.UTF-8 > Memory=16001M > > [Libraries] > Cairo=libcairo.so.2.11510.0 > Curl=libcurl.so.4.5.0 > DBus=libdbus-1.so.3.19.4 > GStreamer=libgstreamer-1.0.so.0.1405.0 > GTK+2=libgtk-x11-2.0.so.0.2400.32 > GTK+3=libgtk-3.so.0.2200.30 > OpenGL=libGL.so.1.0.0 > Poppler=libpoppler.so.73.0.0 > QT4=libQtCore.so.4.8.7 > QT5=libQt5Core.so.5.9.5 > SDL=libSDL-1.2.so.0.11.4 > SQLite=libsqlite3.so.0.8.6 > > [Environment] > CINNAMON_VERSION=4.2.4 > DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus > DEFAULTS_PATH=/usr/share/gconf/cinnamon.default.path > DESKTOP_SESSION=cinnamon > DISPLAY=:0 > GB_GUI=gb.qt5 > GDMSESSION=cinnamon > GDM_LANG=es_ES > > GIO_LAUNCHED_DESKTOP_FILE=/.cinnamon/panel-launchers/cinnamon-custom-launcher-1.desktop > GIO_LAUNCHED_DESKTOP_FILE_PID=2323 > GJS_DEBUG_OUTPUT=stderr > GJS_DEBUG_TOPICS=JS ERROR;JS LOG > GNOME_DESKTOP_SESSION_ID=this-is-deprecated > GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1 > GTK_MODULES=gail:atk-bridge > GTK_OVERLAY_SCROLLING=1 > HOME= > LANG=es_ES.UTF-8 > LANGUAGE=es_ES.UTF-8 > LC_ADDRESS=es_ES.UTF-8 > LC_IDENTIFICATION=es_ES.UTF-8 > LC_MEASUREMENT=es_ES.UTF-8 > LC_MONETARY=es_ES.UTF-8 > LC_NAME=es_ES.UTF-8 > LC_NUMERIC=es_ES.UTF-8 > LC_PAPER=es_ES.UTF-8 > LC_TELEPHONE=es_ES.UTF-8 > LC_TIME=es_ES.UTF-8 > LOGNAME= > MANDATORY_PATH=/usr/share/gconf/cinnamon.mandatory.path > PATH=/.local/bin:/opt/GitHub > Desktop:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:. > PWD= > QT_ACCESSIBILITY=1 > QT_QPA_PLATFORMTHEME=qt5ct > > SESSION_MANAGER=local/:@/tmp/.ICE-unix/1284,unix/:/tmp/.ICE-unix/1284 > SHELL=/bin/bash > SHLVL=0 > SSH_AGENT_PID=1353 > SSH_AUTH_SOCK=/run/user/1000/keyring/ssh > TZ=:/etc/localtime > USER= > XAUTHORITY=/.Xauthority > XDG_CONFIG_DIRS=/etc/xdg/xdg-cinnamon:/etc/xdg > XDG_CURRENT_DESKTOP=X-Cinnamon > > XDG_DATA_DIRS=/usr/share/cinnamon:/usr/share/gnome:/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share > XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/ > XDG_RUNTIME_DIR=/run/user/1000 > XDG_SEAT=seat0 > XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0 > XDG_SESSION_DESKTOP=cinnamon > XDG_SESSION_ID=c2 > XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0 > XDG_SESSION_TYPE=x11 > XDG_VTNR=7 > > Best Regards > > El mar., 10 sept. 2019 a las 15:09, Gianluigi () > escribi?: > >> with qt I get an error, with gtk it blocks after the message. >> See attached project >> >> Regards >> Gianluigi >> >> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- >> > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From chrisml at deganius.de Tue Sep 10 20:07:24 2019 From: chrisml at deganius.de (Christof Thalhofer) Date: Tue, 10 Sep 2019 20:07:24 +0200 Subject: [Gambas-user] Merge request for gb.test In-Reply-To: <14fcd860-928c-1e45-132c-0df5126ad5d4@deganius.de> References: <14fcd860-928c-1e45-132c-0df5126ad5d4@deganius.de> Message-ID: <1005027a-e60b-6cb8-dbb7-c41414e54ef9@deganius.de> Hello, because I was asked what the new component and tests at all are necessary for, I want to explain it a little bit: Tests are mostly necessary when projects become larger and the dependencies grow. I started testing when I wrote a library that takes on many tasks that are identical in several programs of our firm: Database access, rights management, locking resources during editing, writing logs, error handling, providing help texts, help functions in forms, sending mail, encrypting and decrypting data, templating, setting flags in bitarrays, caching data and so on and so forth. We now have about twenty different programs written in Gambas that use library functions, so they depend on the lib working. In addition, functions in the library use other functions in the library. For example, rights management uses functions such as caching (so that the same information is not fetched over and over from the DB) and bit arrays, which can store rights in a space-saving way and read them out quickly. If I now make a mistake with a deep lying method while programming or fixing bugs, it can be that I damage several programs with it under circumstances at places which become visible only after months as problem, if the programs rarely use the damaged function. So that's what tests are for. When I program, I can use tests to check whether I have inadvertently destroyed crucial functions. And I can even program "test-driven". I first write the test that tests a function and after that write the function itself, and I can be quite sure that I won't get tangled up as I continue programming: https://en.wikipedia.org/wiki/Test-driven_development Thank you, DeepL: Translated with www.DeepL.com/Translator Now I learned the word "inadvertently". ;-) Alles Gute Christof Thalhofer -- Dies ist keine Signatur -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From taboege at gmail.com Tue Sep 10 20:43:02 2019 From: taboege at gmail.com (Tobias Boege) Date: Tue, 10 Sep 2019 20:43:02 +0200 Subject: [Gambas-user] Merge request for gb.test In-Reply-To: <1005027a-e60b-6cb8-dbb7-c41414e54ef9@deganius.de> References: <14fcd860-928c-1e45-132c-0df5126ad5d4@deganius.de> <1005027a-e60b-6cb8-dbb7-c41414e54ef9@deganius.de> Message-ID: <20190910184302.GB3104@highrise.localdomain> On Tue, 10 Sep 2019, Christof Thalhofer wrote: > So that's what tests are for. When I program, I can use tests to check > whether I have inadvertently destroyed crucial functions. > > And I can even program "test-driven". I first write the test that tests > a function and after that write the function itself, and I can be quite > sure that I won't get tangled up as I continue programming: > For me a major selling point of disciplined testing is that it makes regressions impossible. If you find a bug, add a test while you fix it. If you make passing the test suite a release or commit prerequisite, you'll never ship the same bug twice. Tests also have a normative character as Christof mentions. I've long wanted the Gambas compiler and interpreter to have comprehensive test suites, but have no time to create such a thing. If you think about it, the Gambas language is woefully underspecified. The definition of Gambas as a language is "whatever gbc3/gbx3 are doing at the moment". Imagine writing your own Gambas compiler... the documentation doesn't get you very far. If all of Gambas was exercised with tests as much as possible, that would also make it much clearer where exactly work is needed when porting things to other systems, as was recently the topic with Mac OS X. This is not really relevant to gb.test which would only reach components written in Gambas (but that would not be too bad!), but it relates to testing as a practice. And I would like that practice to catch on in the Gambas world more. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: From jussi.lahtinen at gmail.com Tue Sep 10 22:54:14 2019 From: jussi.lahtinen at gmail.com (Jussi Lahtinen) Date: Tue, 10 Sep 2019 23:54:14 +0300 Subject: [Gambas-user] Any plans ahead to extend GAMBAS to creating Android Apps ? In-Reply-To: <3049e914-a2d4-e3a2-4eee-2c95149a0e45@gmail.com> References: <34e97abd-a1d3-9e98-02b6-7a9cf2d56b4b@gmail.com> <3049e914-a2d4-e3a2-4eee-2c95149a0e45@gmail.com> Message-ID: Personally I don't care about Android. For me it's ruined Linux. But some claim there is libc for Android. https://en.wikipedia.org/wiki/Bionic_(software) I don't know anything else about it. Jussi On Tue, Sep 10, 2019 at 9:01 AM Beno?t Minisini wrote: > Le 10/09/2019 ? 06:58, Vinode Singh Ujlain a ?crit : > > Beno?t desired creating an environment that made web development as easy > > as creating a desktop application. Coming from Php background, I have > > very briefly tried WebForms and realized - indeed Beno?t is successful > > in creating what he set out to achieve. WebForm has the potential to > > catapult GAMBAS into RAD Web application. My *Salutes* to Beno?t > > Minisini & others who behind the scene are toiling to get GAMBAS to > > where it is today. > > > > Wondering if there are any plans ahead to *extend GAMBAS to creating > > Android Apps ?* > > > > It's not that easy: > > 1) Android does not use libc, which may be a problem to port the > interpreter. > > 2) Maybe Qt allows to write a GUI program on Android using C++. But if > you want to use the standard Android GUI, I guess you have to use Java > code and call it from the interpreter. > > 3) I have no experience in Android developpement, so there is a learning > curve (i.e. time). > > -- > Beno?t Minisini > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bagonergi at gmail.com Wed Sep 11 00:14:42 2019 From: bagonergi at gmail.com (Gianluigi) Date: Wed, 11 Sep 2019 00:14:42 +0200 Subject: [Gambas-user] Boxed string question Message-ID: Hi all, why does this code not work and does not transform all words into String.UCaseFirst? Boxed string shouldn't be similar to the mid function? Private Function ProperCase(value As String) As String For i As Integer = 0 To Len(value) - 1 If value[i] = " " Then String.Upper(value[i + 1]) Next Return String.UCaseFirst(value) End Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From taboege at gmail.com Wed Sep 11 00:41:01 2019 From: taboege at gmail.com (Tobias Boege) Date: Wed, 11 Sep 2019 00:41:01 +0200 Subject: [Gambas-user] Boxed string question In-Reply-To: References: Message-ID: <20190910224101.GC3104@highrise.localdomain> On Wed, 11 Sep 2019, Gianluigi wrote: > Hi all, > > why does this code not work and does not transform all words into > String.UCaseFirst? > Boxed string shouldn't be similar to the mid function? > > Private Function ProperCase(value As String) As String > > For i As Integer = 0 To Len(value) - 1 > If value[i] = " " Then String.Upper(value[i + 1]) > Next > Return String.UCaseFirst(value) > > End > - Len() should not be used when working with UTF-8 strings. Len() returns the length in bytes, not in characters, which is exactly the wrong thing for UTF-8 strings. Use String.Len() instead. - String.Upper() does not modify its argument, so the return value of it under that If is just thrown away. And I have a question too: Since when can you use a string like an array? Is that documented? At least it seems like it is a read-only array, which complicates the solution to the second issue... Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From g4mba5 at gmail.com Wed Sep 11 00:49:24 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Wed, 11 Sep 2019 00:49:24 +0200 Subject: [Gambas-user] Merge request for gb.test In-Reply-To: <14fcd860-928c-1e45-132c-0df5126ad5d4@deganius.de> References: <14fcd860-928c-1e45-132c-0df5126ad5d4@deganius.de> Message-ID: Le 10/09/2019 ? 14:28, Christof Thalhofer a ?crit?: > Hello Beno?t, > > I just created a merge request for the component gb.test. > > With this component I test all my software written in Gambas with > several hundred tests before we put it into production. I also use it to > do test-driven development. It has greatly stabilized the quality of all > my projects and I hope you see value in it as well. I would be very > happy if it could be integrated into Gambas. > > I tried to integrate things which were mentioned by you and other > members of the Gambas community when we discussed unittests more than a > year ago. > > gb.test produces TAP output to Stdout as described in this > specification: http://testanything.org/tap-specification.html > > It lacks only "TODO", which can easily be implemented later. > > TAP can be used to display or process the results in multiple ways. > > gb.test also allows a project to be tested "from outside", as shown in > the file "test.sh" and so allows automated testing for example in > servers for continuous integration. > > I usually use it myself so, that during development I start > Unittest.Main() with F5 and watch the console. I would be happy if tests > could still be triggered quickly with one key or even from a module in > future. > > > Alles Gute > > Christof Thalhofer > I will start to merge it after the release of Gambas 3.14 (soon !). I just quickly look at your code, and I may suggest some changes in the public interface of the component. I saw a lot of identifiers I don't like. Did you see that 'gb.util' adds a Class.Stat() static method that allows to get some information about any project class without loading it? With that you should be able to get all classes that inherits UnitTest. There is no function that returns the list of project classes, but it is just a metter of browsing the ".gambas" directory. Regards, -- Beno?t Minisini From g4mba5 at gmail.com Wed Sep 11 00:55:01 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Wed, 11 Sep 2019 00:55:01 +0200 Subject: [Gambas-user] Boxed string question In-Reply-To: <20190910224101.GC3104@highrise.localdomain> References: <20190910224101.GC3104@highrise.localdomain> Message-ID: Le 11/09/2019 ? 00:41, Tobias Boege a ?crit?: > And I have a question too: Since when can you use a string like an array? Since 3.12. > Is that documented? At least it seems like it is a read-only array, which > complicates the solution to the second issue... It's only documented in the Mid$() and Len() wiki pages. And only reading the array is allowed. Regards, -- Beno?t Minisini From chrisml at deganius.de Wed Sep 11 08:26:08 2019 From: chrisml at deganius.de (Christof Thalhofer) Date: Wed, 11 Sep 2019 08:26:08 +0200 Subject: [Gambas-user] Any plans ahead to extend GAMBAS to creating Android Apps ? In-Reply-To: References: <34e97abd-a1d3-9e98-02b6-7a9cf2d56b4b@gmail.com> <3049e914-a2d4-e3a2-4eee-2c95149a0e45@gmail.com> Message-ID: <6a43e935-a551-cb1c-9f54-22a8f80bf430@deganius.de> Am 10.09.19 um 22:54 schrieb Jussi Lahtinen: > Personally I don't care about Android. For me it's ruined Linux. :-) Yes! But I understand the people who want a RAD programming system like Gambas in Android. I do not want to program for Android because there is no Gambas. Alles Gute Christof Thalhofer -- Dies ist keine Signatur -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From admin at allunix.ru Wed Sep 11 09:05:06 2019 From: admin at allunix.ru (Admin) Date: Wed, 11 Sep 2019 14:05:06 +0700 Subject: [Gambas-user] Any plans ahead to extend GAMBAS to creating Android Apps ? In-Reply-To: <6a43e935-a551-cb1c-9f54-22a8f80bf430@deganius.de> References: <34e97abd-a1d3-9e98-02b6-7a9cf2d56b4b@gmail.com> <3049e914-a2d4-e3a2-4eee-2c95149a0e45@gmail.com> <6a43e935-a551-cb1c-9f54-22a8f80bf430@deganius.de> Message-ID: <4bfd9e7d-ddf6-6a9d-2599-97bc44566566@allunix.ru> 11.09.2019 13:26, Christof Thalhofer ?????: > I do not want to program for Android because there is no Gambas. Totally agree. I keep checking if there already is Gambas for Android for almost a decade. I undestand everything, but there's still hope :-) Best Regards Dmitry Bachilo From bagonergi at gmail.com Wed Sep 11 09:43:03 2019 From: bagonergi at gmail.com (Gianluigi) Date: Wed, 11 Sep 2019 09:43:03 +0200 Subject: [Gambas-user] Boxed string question In-Reply-To: References: <20190910224101.GC3104@highrise.localdomain> Message-ID: Il giorno mer 11 set 2019 alle ore 00:56 Beno?t Minisini ha scritto: > Le 11/09/2019 ? 00:41, Tobias Boege a ?crit : > > And I have a question too: Since when can you use a string like an array? > > Since 3.12. > > > Is that documented? At least it seems like it is a read-only array, which > > complicates the solution to the second issue... > > It's only documented in the Mid$() and Len() wiki pages. And only > reading the array is allowed. > > Regards, > > -- > Beno?t Minisini > Tobias & Benoit, thank you very much. Damn, and to think that I translated wiki pages not long time ago. I have a particular feature, I don't even understand what I write, sigh! What do you think about these solutions (obviously the second solution is not mine :-P)? Private Function ProperCase(value As String) As String Dim ss As String[] = Split(value, " ") value = "" For Each s As String In ss value &= String.UCaseFirst(s) & " " Next Return RTrim(value) End Private Function ProperCase(value As String) As String Dim bb As Byte[] bb = Byte[].FromString(value) For i As Integer = 0 To bb.Max - 1 If bb[i + 1] \ bb[i] = 3 Then bb[i + 1] = bb[i + 1] - 32 Next Return bb.ToString(0, bb.Count) End Benoit, how about adding a new string function? Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From chrisml at deganius.de Wed Sep 11 10:33:35 2019 From: chrisml at deganius.de (Christof Thalhofer) Date: Wed, 11 Sep 2019 10:33:35 +0200 Subject: [Gambas-user] Merge request for gb.test In-Reply-To: References: <14fcd860-928c-1e45-132c-0df5126ad5d4@deganius.de> Message-ID: Am 11.09.19 um 00:49 schrieb Beno?t Minisini: > I will start to merge it after the release of Gambas 3.14 (soon !). Ok, very cool! Great! > I just quickly look at your code, and I may suggest some changes in the > public interface of the component. I saw a lot of identifiers I don't like. No problem, what I can do I will fix. If you can lead me, I can refactor the code. > Did you see that 'gb.util' adds a Class.Stat() static method that allows > to get some information about any project class without loading it? With > that you should be able to get all classes that inherits UnitTest. Ok, thank you, I will have a look at it. > There is no function that returns the list of project classes, but it is > just a metter of browsing the ".gambas" directory. This is done in the code. Please have a look at GetAllTestContainerNames(). For the future: The best would be, if there were a new type of class, a Test class. gb.test should execute every method in it whose name starts with "Setup[X]" and "Test" in appropriate order, as it is done now. To create a plan before testing ("1..X") ? this is currently impossible in the way Perl does it ? it would be necessary to count every occurrence of "Assert." in a test method. I would like to implement that but I did not find a way to do it. Alles Gute Christof Thalhofer -- Dies ist keine Signatur -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From chrisml at deganius.de Wed Sep 11 12:51:39 2019 From: chrisml at deganius.de (Christof Thalhofer) Date: Wed, 11 Sep 2019 12:51:39 +0200 Subject: [Gambas-user] Merge request for gb.test In-Reply-To: References: <14fcd860-928c-1e45-132c-0df5126ad5d4@deganius.de> Message-ID: Am 11.09.19 um 00:49 schrieb Beno?t Minisini: > Did you see that 'gb.util' adds a Class.Stat() static method that allows > to get some information about any project class without loading it? With > that you should be able to get all classes that inherits UnitTest. Yes I've tried that a year ago. If you look at the code in UnitTest:GetAllTestContainerNames here: > ' FIXME: Class.Stat(sName).Parent = "UnitTest" if included as component > ' This does not work if gb.test is included as component > ' If Class.Stat(sName).Parent = "UnitTest" Then > ' GoSub AddClass > ' Endif Alles Gute Christof Thalhofer -- Dies ist keine Signatur -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From taboege at gmail.com Wed Sep 11 14:26:31 2019 From: taboege at gmail.com (Tobias Boege) Date: Wed, 11 Sep 2019 14:26:31 +0200 Subject: [Gambas-user] Merge request for gb.test In-Reply-To: References: <14fcd860-928c-1e45-132c-0df5126ad5d4@deganius.de> Message-ID: <20190911122631.GD3104@highrise.localdomain> On Wed, 11 Sep 2019, Christof Thalhofer wrote: > To create a plan before testing ("1..X") ? this is currently impossible > in the way Perl does it ? it would be necessary to count every > occurrence of "Assert." in a test method. > Perl doesn't (can't) do that either. It is either the programmer who counts the assertions by hand and keeps the count updated in the test source code [1] or they have the TAP printer count the number of assertions as they happen, because every assertion has to call into the TAP printer, and emits the plan line at the end, which is what you do currently and what [2] uses. People tend to do the latter for any number of reasons: - if they don't believe in keeping track of the number of tests manually, - if it's really hard to compute the number of tests because it depends on environment variables (subtests would alleviate this), - or it's simply too annoying. Both result in perfectly valid TAP and in both cases the TAP parser on the other end can detect a premature exit of the program: either because not all tests in the plan line at the beginning were run, or because the plan line at the end was not printed. The only downside to not counting your tests manually is that you cannot be sure that your test logic does not omit any important tests by accident. It is a simple parity test *for your test*. Most people seem to have at least that much confidence in their programming thought and won't miss this :-) Regards, Tobi [1] https://metacpan.org/source/MOB/Forks-Super-0.97/t/05-util.t using `tests => 30` parameter to the Test::More module [2] https://metacpan.org/source/SRI/Mojolicious-8.23/t/mojo/dom.t using `done_testing` after the last assertion -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: From taboege at gmail.com Wed Sep 11 14:43:19 2019 From: taboege at gmail.com (Tobias Boege) Date: Wed, 11 Sep 2019 14:43:19 +0200 Subject: [Gambas-user] Boxed string question In-Reply-To: References: <20190910224101.GC3104@highrise.localdomain> Message-ID: <20190911124319.GE3104@highrise.localdomain> On Wed, 11 Sep 2019, Gianluigi wrote: > What do you think about these solutions (obviously the second solution is > not mine :-P)? > > Private Function ProperCase(value As String) As String > > Dim ss As String[] = Split(value, " ") > > value = "" > For Each s As String In ss > value &= String.UCaseFirst(s) & " " > Next > Return RTrim(value) > > End > > Private Function ProperCase(value As String) As String > > Dim bb As Byte[] > > bb = Byte[].FromString(value) > For i As Integer = 0 To bb.Max - 1 > If bb[i + 1] \ bb[i] = 3 Then bb[i + 1] = bb[i + 1] - 32 > Next > Return bb.ToString(0, bb.Count) > > End > I would go with the first one. Whoever wrote the second one has to pay a little more attention to detail: - it has disastrous effects on UTF-8 strings, like turning "A?" into "A" followed by garbage. Go do the math why that is :-) - it does nothing on "? ? ? ?" for the same reason, - it converts " ~" to " ^" for the same reason, - heck it even turns " !c" into " !C" but leaves " !b" unchanged for the same reason, - it does not uppercase the first character in the string for an unrelated reason. Unicode is really, really hard [1]. If you want to support it (which I've been just assuming throughout this thread because you started off using methods of the String class), then you should use methods that promise to do it for you for everything and never ever work with Bytes, even if it means you have to split a string into an array and put it back together again. Regards, Tobi [1] Just a very recent example: https://hsivonen.fi/string-length/ -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From cedron at exede.net Wed Sep 11 15:11:51 2019 From: cedron at exede.net (Cedron Dawg) Date: Wed, 11 Sep 2019 09:11:51 -0400 (EDT) Subject: [Gambas-user] Boxed string question In-Reply-To: References: <20190910224101.GC3104@highrise.localdomain> Message-ID: <616987992.66890142.1568207511879.JavaMail.zimbra@exede.net> Because of the "Syntax Sugar" string concatenation thing I would do it somewhat like this: '================================================== Private Function ProperCase(value As String) As String Dim O As Stream, Q As String O = Open String For Write Dim ss As String[] = Split(value, " ") For Each s As String In ss Print #O, String.UCaseFirst(s); " "; Next Q = Close #O Return RTrim(Q) End '================================================== I second the call for a built in "ProperCase" function. It would also be nice to have a set of calls back and forth between a ProperCase name and a DB safe name, i.e. all lower case with underscored separators. HomeAddress <===> home_address Ced ----- Original Message ----- From: "Gianluigi" .... What do you think about these solutions (obviously the second solution is not mine :-P)? Private Function ProperCase(value As String) As String Dim ss As String[] = Split(value, " ") value = "" For Each s As String In ss value &= String.UCaseFirst(s) & " " Next Return RTrim(value) End ..... Benoit, how about adding a new string function? Regards Gianluigi ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- From bagonergi at gmail.com Wed Sep 11 15:44:18 2019 From: bagonergi at gmail.com (Gianluigi) Date: Wed, 11 Sep 2019 15:44:18 +0200 Subject: [Gambas-user] Boxed string question In-Reply-To: <616987992.66890142.1568207511879.JavaMail.zimbra@exede.net> References: <20190910224101.GC3104@highrise.localdomain> <616987992.66890142.1568207511879.JavaMail.zimbra@exede.net> Message-ID: Hi Cedron, thank you very much for all the suggestions ;-) Regards Gianluigi Il giorno mer 11 set 2019 alle ore 15:32 Cedron Dawg ha scritto: > Because of the "Syntax Sugar" string concatenation thing I would do it > somewhat like this: > > '================================================== > Private Function ProperCase(value As String) As String > > Dim O As Stream, Q As String > > O = Open String For Write > > Dim ss As String[] = Split(value, " ") > > For Each s As String In ss > Print #O, String.UCaseFirst(s); " "; > Next > > Q = Close #O > > Return RTrim(Q) > > End > '================================================== > > I second the call for a built in "ProperCase" function. > > It would also be nice to have a set of calls back and forth between a > ProperCase name and a DB safe name, i.e. all lower case with underscored > separators. > > HomeAddress <===> home_address > > Ced > > > ----- Original Message ----- > From: "Gianluigi" > > .... > > What do you think about these solutions (obviously the second solution is > not mine :-P)? > > Private Function ProperCase(value As String) As String > > Dim ss As String[] = Split(value, " ") > > value = "" > For Each s As String In ss > value &= String.UCaseFirst(s) & " " > Next > Return RTrim(value) > > End > > ..... > > Benoit, how about adding a new string function? > > Regards > Gianluigi > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bagonergi at gmail.com Wed Sep 11 15:53:53 2019 From: bagonergi at gmail.com (Gianluigi) Date: Wed, 11 Sep 2019 15:53:53 +0200 Subject: [Gambas-user] Fwd: Boxed string question In-Reply-To: References: <20190910224101.GC3104@highrise.localdomain> <20190911124319.GE3104@highrise.localdomain> Message-ID: ---------- Forwarded message --------- Da: Gianluigi Date: mer 11 set 2019 alle ore 15:34 Subject: Re: [Gambas-user] Boxed string question To: Tobias Boege Il giorno mer 11 set 2019 alle ore 14:44 Tobias Boege ha scritto: > ... > I would go with the first one. > ? > [...] Unicode is really, really hard [1]. If you want to support it (which > I've been just assuming throughout this thread because you started off > using methods of the String class), then you should use methods that > promise to do it for you for everything and never ever work with Bytes, > even if it means you have to split a string into an array and put it > back together again. > > Regards, > Tobi > > [1] Just a very recent example: https://hsivonen.fi/string-length/ > Tobias, thank you, you are always a master at providing complete information. To be fair I must say that the second example was aimed at a problem only in Italy (not international), and as you know Italian is very different from German and Spanish. However I can reassure you, I have no intention of playing with bytes, unfortunately I and the bytes do not have a good relationship. :-( Proof of this is my unofficial suggestion to Benoit for the introduction of a new ProperCase function. :-D Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From g4mba5 at gmail.com Wed Sep 11 18:18:32 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Wed, 11 Sep 2019 18:18:32 +0200 Subject: [Gambas-user] Boxed string question In-Reply-To: References: <20190910224101.GC3104@highrise.localdomain> <616987992.66890142.1568207511879.JavaMail.zimbra@exede.net> Message-ID: Le 11/09/2019 ? 15:44, Gianluigi a ?crit?: > Hi Cedron, > thank you very much for all the suggestions ;-) > > Regards > Gianluigi > Why the name "ProperCase"? Anyway, it's difficult to add a function that should behave differently according to the current language (the proper case is not the same thing in French, Italian, and I don't tell about Chinese and Arabic), if that information is not available in the libc. The right name would be "String.CapitalizeWords". And String.UCaseFirst() should have been named String.Capitalize(). As for Cedric's suggestion, ('HomeAddress' <==> 'home_address'), it a good idea too. The generic name for that sort of things is "normalization". But if you normalize for database you should put the function in the database component. Which has, by the way, quoting functions that should allow to name your identifiers as you want. Regards, -- Beno?t Minisini From g4mba5 at gmail.com Wed Sep 11 18:19:19 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Wed, 11 Sep 2019 18:19:19 +0200 Subject: [Gambas-user] Boxed string question In-Reply-To: References: <20190910224101.GC3104@highrise.localdomain> <616987992.66890142.1568207511879.JavaMail.zimbra@exede.net> Message-ID: Le 11/09/2019 ? 18:18, Beno?t Minisini a ?crit?: > Le 11/09/2019 ? 15:44, Gianluigi a ?crit?: >> Hi Cedron, >> thank you very much for all the suggestions ;-) >> >> Regards >> Gianluigi >> > > Why the name "ProperCase"? > > Anyway, it's difficult to add a function that should behave differently > according to the current language (the proper case is not the same thing > in French, Italian, and I don't tell about Chinese and Arabic), if that > information is not available in the libc. > > The right name would be "String.CapitalizeWords". > > And String.UCaseFirst() should have been named String.Capitalize(). > For those who would want to write the code, this must go in the String class of gb.util. Regards, -- Beno?t Minisini From chrisml at deganius.de Wed Sep 11 18:51:52 2019 From: chrisml at deganius.de (Christof Thalhofer) Date: Wed, 11 Sep 2019 18:51:52 +0200 Subject: [Gambas-user] Merge request for gb.test In-Reply-To: <20190911122631.GD3104@highrise.localdomain> References: <14fcd860-928c-1e45-132c-0df5126ad5d4@deganius.de> <20190911122631.GD3104@highrise.localdomain> Message-ID: Am 11.09.19 um 14:26 schrieb Tobias Boege: > On Wed, 11 Sep 2019, Christof Thalhofer wrote: >> To create a plan before testing ("1..X") ? this is currently >> impossible in the way Perl does it ? it would be necessary to count >> every occurrence of "Assert." in a test method. > > Perl doesn't (can't) do that either. Ups, I didn't know that. Thanks for clarification. > It is a simple parity test *for your test*. Ok, this argument is valid! I never thought about it in that way. If the programmer forgot to increment the number of tests, the next test run will tell him that it was wrong. I think this could easily be implemented as an option with a public constant per test class. Alles Gute Christof Thalhofer -- Dies ist keine Signatur -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From bagonergi at gmail.com Wed Sep 11 19:08:49 2019 From: bagonergi at gmail.com (Gianluigi) Date: Wed, 11 Sep 2019 19:08:49 +0200 Subject: [Gambas-user] Boxed string question In-Reply-To: References: <20190910224101.GC3104@highrise.localdomain> <616987992.66890142.1568207511879.JavaMail.zimbra@exede.net> Message-ID: Il giorno mer 11 set 2019 alle ore 18:19 Beno?t Minisini ha scritto: > Le 11/09/2019 ? 15:44, Gianluigi a ?crit : > > Hi Cedron, > > thank you very much for all the suggestions ;-) > > > > Regards > > Gianluigi > > > > Why the name "ProperCase"? > > It comes from the request of a user on the Italian forum that used it in VB6. "vbProperCase 3 Converts the first letter of every word in a string to uppercase." > Anyway, it's difficult to add a function that should behave differently > according to the current language (the proper case is not the same thing > in French, Italian, and I don't tell about Chinese and Arabic), if that > information is not available in the libc. > > The right name would be "String.CapitalizeWords". > > And String.UCaseFirst() should have been named String.Capitalize(). > > As for Cedric's suggestion, ('HomeAddress' <==> 'home_address'), it a > good idea too. The generic name for that sort of things is "normalization". > > But if you normalize for database you should put the function in the > database component. Which has, by the way, quoting functions that should > allow to name your identifiers as you want. > > Regards, > > -- > Beno?t Minisini > Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From adamnt42 at gmail.com Thu Sep 12 00:44:51 2019 From: adamnt42 at gmail.com (Bruce) Date: Thu, 12 Sep 2019 08:14:51 +0930 Subject: [Gambas-user] Boxed string question In-Reply-To: References: <20190910224101.GC3104@highrise.localdomain> <616987992.66890142.1568207511879.JavaMail.zimbra@exede.net> Message-ID: <47dd210e-8d17-419d-14fb-51b7b5e070bc@gmail.com> "Difficult" more like d*** near impossible even in english. From our horse days here's a list of cases from our old "ProperName" function (not Capitalize as it was designed for names of people and horses, I would think Capitalize would be a generic lower level function to replace the LH char of a single word string). ' Copes with normal multiword names: James Brown, BLACK CAVIAR etc ' Copes with words within parentheses: James BROWN (Snr) ' Copes with hypenation, suffixes and titles: "Mrs Daisy-May Polkinghorne-Throckwhistle III" ' Copes with apostrophised names: O'BRIEN (O'Brien), d'AMICO (d'Amico) ' Copes with apostrophised abbreviations: BLACK N' TAN ' Copes with the MacDonalds and McDonalds ' Copes with handling non-scots like the Macedons ' Can handle DeNiro (in our convention this must be two words!) ' Can handle subparts VAN DER GRAF (by convention -> VanDer Graf) Normalisation is even harder. Given the model: Data Aquisition -> Data Storage -> Data Display we found a) humans are incredibly inventive when coming up with new ways to enter the same name b) partnerships and company names are very often entered into the name field when you are expecting a persons name c) "Normalization" for data storage requires the creation of your own "conventions" for e.g we found that using "Vander Graf" suited us better because due to our data population having all the "Van"'s, "Vander"'s, "Von"'s etc sorted like that made manual error detection a bit easier. d) (The big one!) When displaying the stored values it was better to "semi-denormalize" them as it was easier to spot errors. For example, once "Johannes and Maria van der Graf" had been normalised to "Vander Graf, Johannes&Maria" we de-normalised for display to "Van der Graf, Johannes and Maria". We did try at one time to design a "rule based" approach to this but it never got very far. So best of luck to those attempting to develop their own approach to handling name capitalization, normalisation and display. regards b On 12/9/19 1:48 am, Beno?t Minisini wrote: > Le 11/09/2019 ? 15:44, Gianluigi a ?crit?: >> Hi Cedron, >> thank you very much for all the suggestions ;-) >> >> Regards >> Gianluigi >> > > Why the name "ProperCase"? > > Anyway, it's difficult to add a function that should behave differently > according to the current language (the proper case is not the same thing > in French, Italian, and I don't tell about Chinese and Arabic), if that > information is not available in the libc. > > The right name would be "String.CapitalizeWords". > > And String.UCaseFirst() should have been named String.Capitalize(). > > As for Cedric's suggestion, ('HomeAddress' <==> 'home_address'), it a > good idea too. The generic name for that sort of things is "normalization". > > But if you normalize for database you should put the function in the > database component. Which has, by the way, quoting functions that should > allow to name your identifiers as you want. > > Regards, > From rwe-sse at osnanet.de Thu Sep 12 15:53:51 2019 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Thu, 12 Sep 2019 15:53:51 +0200 Subject: [Gambas-user] TextBox does not wrap the text Message-ID: I have a TextBox with WordWrap set to "True" (its default). Yet it does not wrap the text, what might be the reason? There are whitespaces in the text, so there shouldn't be a problem. And I give enough Height to show several lines. I am on an Ubuntu Mate but have included qt4 and qt4.ext (because I need some of the features there), might that be a reason? Regards Rolf From adamnt42 at gmail.com Thu Sep 12 15:57:01 2019 From: adamnt42 at gmail.com (Bruce) Date: Thu, 12 Sep 2019 23:27:01 +0930 Subject: [Gambas-user] TextBox does not wrap the text In-Reply-To: References: Message-ID: <4a2b7e64-2adb-e9a4-3c02-dbed6b02ac4a@gmail.com> I might be a bit out of date, but I didn't think a TextBox could wrap? b On 12/9/19 11:23 pm, Rolf-Werner Eilert wrote: > I have a TextBox with WordWrap set to "True" (its default). > > Yet it does not wrap the text, what might be the reason? There are > whitespaces in the text, so there shouldn't be a problem. And I give > enough Height to show several lines. > > I am on an Ubuntu Mate but have included qt4 and qt4.ext (because I need > some of the features there), might that be a reason? > > Regards > Rolf > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- From rwe-sse at osnanet.de Thu Sep 12 16:03:33 2019 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Thu, 12 Sep 2019 16:03:33 +0200 Subject: [Gambas-user] TextBox does not wrap the text In-Reply-To: <4a2b7e64-2adb-e9a4-3c02-dbed6b02ac4a@gmail.com> References: <4a2b7e64-2adb-e9a4-3c02-dbed6b02ac4a@gmail.com> Message-ID: <97fbddcf-4beb-9f77-d424-c75b4a1dd644@osnanet.de> Hm. Ok... But what does it have a WordWrap property for then? Am 12.09.19 um 15:57 schrieb Bruce: > I might be a bit out of date, but I didn't think a TextBox could wrap? > b > > On 12/9/19 11:23 pm, Rolf-Werner Eilert wrote: >> I have a TextBox with WordWrap set to "True" (its default). >> >> Yet it does not wrap the text, what might be the reason? There are >> whitespaces in the text, so there shouldn't be a problem. And I give >> enough Height to show several lines. >> >> I am on an Ubuntu Mate but have included qt4 and qt4.ext (because I >> need some of the features there), might that be a reason? >> >> Regards >> Rolf >> >> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > > From rwe-sse at osnanet.de Thu Sep 12 16:04:29 2019 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Thu, 12 Sep 2019 16:04:29 +0200 Subject: [Gambas-user] TextBox does not wrap the text In-Reply-To: <4a2b7e64-2adb-e9a4-3c02-dbed6b02ac4a@gmail.com> References: <4a2b7e64-2adb-e9a4-3c02-dbed6b02ac4a@gmail.com> Message-ID: <9493da44-c37c-8237-05a9-c45099f7d1d0@osnanet.de> Sorry, I meant TextLabel... Am 12.09.19 um 15:57 schrieb Bruce: > I might be a bit out of date, but I didn't think a TextBox could wrap? > b > > On 12/9/19 11:23 pm, Rolf-Werner Eilert wrote: >> I have a TextBox with WordWrap set to "True" (its default). >> >> Yet it does not wrap the text, what might be the reason? There are >> whitespaces in the text, so there shouldn't be a problem. And I give >> enough Height to show several lines. >> >> I am on an Ubuntu Mate but have included qt4 and qt4.ext (because I >> need some of the features there), might that be a reason? >> >> Regards >> Rolf >> >> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > > From adamnt42 at gmail.com Thu Sep 12 16:11:11 2019 From: adamnt42 at gmail.com (Bruce) Date: Thu, 12 Sep 2019 23:41:11 +0930 Subject: [Gambas-user] TextBox does not wrap the text In-Reply-To: <9493da44-c37c-8237-05a9-c45099f7d1d0@osnanet.de> References: <4a2b7e64-2adb-e9a4-3c02-dbed6b02ac4a@gmail.com> <9493da44-c37c-8237-05a9-c45099f7d1d0@osnanet.de> Message-ID: <484bcaa5-c119-98d3-4f72-dc3898e4fce3@gmail.com> Hmmm, never noticed that. Check AutoResize and Expand properties??? Check parent Arrangement??? Otherwise no idea, sorry. b On 12/9/19 11:34 pm, Rolf-Werner Eilert wrote: > Sorry, I meant TextLabel... > > > > Am 12.09.19 um 15:57 schrieb Bruce: >> I might be a bit out of date, but I didn't think a TextBox could wrap? >> b >> >> On 12/9/19 11:23 pm, Rolf-Werner Eilert wrote: >>> I have a TextBox with WordWrap set to "True" (its default). >>> >>> Yet it does not wrap the text, what might be the reason? There are >>> whitespaces in the text, so there shouldn't be a problem. And I give >>> enough Height to show several lines. >>> >>> I am on an Ubuntu Mate but have included qt4 and qt4.ext (because I >>> need some of the features there), might that be a reason? >>> >>> Regards >>> Rolf >>> >>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- >> >> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- >> >> > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- From rwe-sse at osnanet.de Thu Sep 12 16:34:49 2019 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Thu, 12 Sep 2019 16:34:49 +0200 Subject: [Gambas-user] TextBox does not wrap the text In-Reply-To: <484bcaa5-c119-98d3-4f72-dc3898e4fce3@gmail.com> References: <4a2b7e64-2adb-e9a4-3c02-dbed6b02ac4a@gmail.com> <9493da44-c37c-8237-05a9-c45099f7d1d0@osnanet.de> <484bcaa5-c119-98d3-4f72-dc3898e4fce3@gmail.com> Message-ID: <90f2e311-da9b-9a26-e684-c1fe44ca1326@osnanet.de> Ok, after trying around for some while I found that TextLabel reacts to a change in Height or Width. I wanted to adapt its measures to the text within and to the space left from the position it was to appear until the right border of the window. What I intended was a little yellow help window with a help text which should pop up at the writing position. When I fix it at the top of the window and let it be visible all the time, never changing its size, it does wrap the text. But when I use its Font.Height and Font.Width properties to compute the number of potential lines and then change its measures appropriately, the text will not be wrapped anymore. Strange, but I have found a workaround at least - just leaving it as it is and leaving it visible. Regards Rolf Am 12.09.19 um 16:11 schrieb Bruce: > Hmmm, never noticed that. Check AutoResize and Expand properties??? > Check parent Arrangement??? Otherwise no idea, sorry. > b > > On 12/9/19 11:34 pm, Rolf-Werner Eilert wrote: >> Sorry, I meant TextLabel... >> >> >> >> Am 12.09.19 um 15:57 schrieb Bruce: >>> I might be a bit out of date, but I didn't think a TextBox could wrap? >>> b >>> >>> On 12/9/19 11:23 pm, Rolf-Werner Eilert wrote: >>>> I have a TextBox with WordWrap set to "True" (its default). >>>> >>>> Yet it does not wrap the text, what might be the reason? There are >>>> whitespaces in the text, so there shouldn't be a problem. And I give >>>> enough Height to show several lines. >>>> >>>> I am on an Ubuntu Mate but have included qt4 and qt4.ext (because I >>>> need some of the features there), might that be a reason? >>>> >>>> Regards >>>> Rolf >>>> >>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >>>> ]---- >>> >>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- >>> >>> >> >> >> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > > From bagonergi at gmail.com Thu Sep 12 16:45:38 2019 From: bagonergi at gmail.com (Gianluigi) Date: Thu, 12 Sep 2019 16:45:38 +0200 Subject: [Gambas-user] TextBox does not wrap the text In-Reply-To: <90f2e311-da9b-9a26-e684-c1fe44ca1326@osnanet.de> References: <4a2b7e64-2adb-e9a4-3c02-dbed6b02ac4a@gmail.com> <9493da44-c37c-8237-05a9-c45099f7d1d0@osnanet.de> <484bcaa5-c119-98d3-4f72-dc3898e4fce3@gmail.com> <90f2e311-da9b-9a26-e684-c1fe44ca1326@osnanet.de> Message-ID: See if this feature can help you Regards Gianluigi Il giorno gio 12 set 2019 alle ore 16:35 Rolf-Werner Eilert < rwe-sse at osnanet.de> ha scritto: > Ok, after trying around for some while I found that TextLabel reacts to > a change in Height or Width. > > I wanted to adapt its measures to the text within and to the space left > from the position it was to appear until the right border of the window. > What I intended was a little yellow help window with a help text which > should pop up at the writing position. > > When I fix it at the top of the window and let it be visible all the > time, never changing its size, it does wrap the text. But when I use its > Font.Height and Font.Width properties to compute the number of potential > lines and then change its measures appropriately, the text will not be > wrapped anymore. > > Strange, but I have found a workaround at least - just leaving it as it > is and leaving it visible. > > Regards > Rolf > > > Am 12.09.19 um 16:11 schrieb Bruce: > > Hmmm, never noticed that. Check AutoResize and Expand properties??? > > Check parent Arrangement??? Otherwise no idea, sorry. > > b > > > > On 12/9/19 11:34 pm, Rolf-Werner Eilert wrote: > >> Sorry, I meant TextLabel... > >> > >> > >> > >> Am 12.09.19 um 15:57 schrieb Bruce: > >>> I might be a bit out of date, but I didn't think a TextBox could wrap? > >>> b > >>> > >>> On 12/9/19 11:23 pm, Rolf-Werner Eilert wrote: > >>>> I have a TextBox with WordWrap set to "True" (its default). > >>>> > >>>> Yet it does not wrap the text, what might be the reason? There are > >>>> whitespaces in the text, so there shouldn't be a problem. And I give > >>>> enough Height to show several lines. > >>>> > >>>> I am on an Ubuntu Mate but have included qt4 and qt4.ext (because I > >>>> need some of the features there), might that be a reason? > >>>> > >>>> Regards > >>>> Rolf > >>>> > >>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net > >>>> ]---- > >>> > >>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net > ]---- > >>> > >>> > >> > >> > >> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net > ]---- > > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > > > > > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: WrapFunction-0.0.1.tar.gz Type: application/gzip Size: 11907 bytes Desc: not available URL: From bagonergi at gmail.com Thu Sep 12 17:30:15 2019 From: bagonergi at gmail.com (Gianluigi) Date: Thu, 12 Sep 2019 17:30:15 +0200 Subject: [Gambas-user] TextBox does not wrap the text In-Reply-To: References: <4a2b7e64-2adb-e9a4-3c02-dbed6b02ac4a@gmail.com> <9493da44-c37c-8237-05a9-c45099f7d1d0@osnanet.de> <484bcaa5-c119-98d3-4f72-dc3898e4fce3@gmail.com> <90f2e311-da9b-9a26-e684-c1fe44ca1326@osnanet.de> Message-ID: Out of pity for me, can you simulate that I joked? :-( Thank you Gianluigi Il giorno gio 12 set 2019 alle ore 16:45 Gianluigi ha scritto: > See if this feature can help you > > Regards > Gianluigi > > Il giorno gio 12 set 2019 alle ore 16:35 Rolf-Werner Eilert < > rwe-sse at osnanet.de> ha scritto: > >> Ok, after trying around for some while I found that TextLabel reacts to >> a change in Height or Width. >> >> I wanted to adapt its measures to the text within and to the space left >> from the position it was to appear until the right border of the window. >> What I intended was a little yellow help window with a help text which >> should pop up at the writing position. >> >> When I fix it at the top of the window and let it be visible all the >> time, never changing its size, it does wrap the text. But when I use its >> Font.Height and Font.Width properties to compute the number of potential >> lines and then change its measures appropriately, the text will not be >> wrapped anymore. >> >> Strange, but I have found a workaround at least - just leaving it as it >> is and leaving it visible. >> >> Regards >> Rolf >> >> >> Am 12.09.19 um 16:11 schrieb Bruce: >> > Hmmm, never noticed that. Check AutoResize and Expand properties??? >> > Check parent Arrangement??? Otherwise no idea, sorry. >> > b >> > >> > On 12/9/19 11:34 pm, Rolf-Werner Eilert wrote: >> >> Sorry, I meant TextLabel... >> >> >> >> >> >> >> >> Am 12.09.19 um 15:57 schrieb Bruce: >> >>> I might be a bit out of date, but I didn't think a TextBox could wrap? >> >>> b >> >>> >> >>> On 12/9/19 11:23 pm, Rolf-Werner Eilert wrote: >> >>>> I have a TextBox with WordWrap set to "True" (its default). >> >>>> >> >>>> Yet it does not wrap the text, what might be the reason? There are >> >>>> whitespaces in the text, so there shouldn't be a problem. And I give >> >>>> enough Height to show several lines. >> >>>> >> >>>> I am on an Ubuntu Mate but have included qt4 and qt4.ext (because I >> >>>> need some of the features there), might that be a reason? >> >>>> >> >>>> Regards >> >>>> Rolf >> >>>> >> >>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >> >>>> ]---- >> >>> >> >>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >> ]---- >> >>> >> >>> >> >> >> >> >> >> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >> ]---- >> > >> > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >> ]---- >> > >> > >> >> >> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bagonergi at gmail.com Thu Sep 12 18:18:37 2019 From: bagonergi at gmail.com (Gianluigi) Date: Thu, 12 Sep 2019 18:18:37 +0200 Subject: [Gambas-user] TextBox does not wrap the text In-Reply-To: References: <4a2b7e64-2adb-e9a4-3c02-dbed6b02ac4a@gmail.com> <9493da44-c37c-8237-05a9-c45099f7d1d0@osnanet.de> <484bcaa5-c119-98d3-4f72-dc3898e4fce3@gmail.com> <90f2e311-da9b-9a26-e684-c1fe44ca1326@osnanet.de> Message-ID: As Rolf had rightly said the TextLabel has embedded wrap, if its not working I think it's a bug. Can anyone tell me why my wrap correct (!?) and attached do eat the letters of a label (camn instead of cammin)? Regards Gianluigi Il giorno gio 12 set 2019 alle ore 17:30 Gianluigi ha scritto: > Out of pity for me, can you simulate that I joked? > :-( > Thank you > Gianluigi > > Il giorno gio 12 set 2019 alle ore 16:45 Gianluigi > ha scritto: > >> See if this feature can help you >> >> Regards >> Gianluigi >> >> Il giorno gio 12 set 2019 alle ore 16:35 Rolf-Werner Eilert < >> rwe-sse at osnanet.de> ha scritto: >> >>> Ok, after trying around for some while I found that TextLabel reacts to >>> a change in Height or Width. >>> >>> I wanted to adapt its measures to the text within and to the space left >>> from the position it was to appear until the right border of the window. >>> What I intended was a little yellow help window with a help text which >>> should pop up at the writing position. >>> >>> When I fix it at the top of the window and let it be visible all the >>> time, never changing its size, it does wrap the text. But when I use its >>> Font.Height and Font.Width properties to compute the number of potential >>> lines and then change its measures appropriately, the text will not be >>> wrapped anymore. >>> >>> Strange, but I have found a workaround at least - just leaving it as it >>> is and leaving it visible. >>> >>> Regards >>> Rolf >>> >>> >>> Am 12.09.19 um 16:11 schrieb Bruce: >>> > Hmmm, never noticed that. Check AutoResize and Expand properties??? >>> > Check parent Arrangement??? Otherwise no idea, sorry. >>> > b >>> > >>> > On 12/9/19 11:34 pm, Rolf-Werner Eilert wrote: >>> >> Sorry, I meant TextLabel... >>> >> >>> >> >>> >> >>> >> Am 12.09.19 um 15:57 schrieb Bruce: >>> >>> I might be a bit out of date, but I didn't think a TextBox could >>> wrap? >>> >>> b >>> >>> >>> >>> On 12/9/19 11:23 pm, Rolf-Werner Eilert wrote: >>> >>>> I have a TextBox with WordWrap set to "True" (its default). >>> >>>> >>> >>>> Yet it does not wrap the text, what might be the reason? There are >>> >>>> whitespaces in the text, so there shouldn't be a problem. And I >>> give >>> >>>> enough Height to show several lines. >>> >>>> >>> >>>> I am on an Ubuntu Mate but have included qt4 and qt4.ext (because I >>> >>>> need some of the features there), might that be a reason? >>> >>>> >>> >>>> Regards >>> >>>> Rolf >>> >>>> >>> >>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >>> >>>> ]---- >>> >>> >>> >>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >>> ]---- >>> >>> >>> >>> >>> >> >>> >> >>> >> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >>> ]---- >>> > >>> > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >>> ]---- >>> > >>> > >>> >>> >>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: WrapFunction-0.0.2.tar.gz Type: application/gzip Size: 11902 bytes Desc: not available URL: From bagonergi at gmail.com Thu Sep 12 19:14:04 2019 From: bagonergi at gmail.com (Gianluigi) Date: Thu, 12 Sep 2019 19:14:04 +0200 Subject: [Gambas-user] TextBox does not wrap the text In-Reply-To: References: <4a2b7e64-2adb-e9a4-3c02-dbed6b02ac4a@gmail.com> <9493da44-c37c-8237-05a9-c45099f7d1d0@osnanet.de> <484bcaa5-c119-98d3-4f72-dc3898e4fce3@gmail.com> <90f2e311-da9b-9a26-e684-c1fe44ca1326@osnanet.de> Message-ID: Hi guys, happens at this time, when the "mi" is passed to the next line: ------------------------------------------- Nel mezzo del cammin di nostra vita mi ritrovai per una selva oscura ch? la diritta via era smarrita Nel mezzo del camn di nostra vita mi ritrovai per una selva oscura ch? la diritta via era smarrita ------------------------------------------ Is it a malfunction of Split() or my brain? I'm afraid the second option is the right one :-( Regards Gianluigi Il giorno gio 12 set 2019 alle ore 18:18 Gianluigi ha scritto: > As Rolf had rightly said the TextLabel has embedded wrap, if its not > working I think it's a bug. > > Can anyone tell me why my wrap correct (!?) and attached do eat the > letters of a label (camn instead of cammin)? > > Regards > Gianluigi > > Il giorno gio 12 set 2019 alle ore 17:30 Gianluigi > ha scritto: > >> Out of pity for me, can you simulate that I joked? >> :-( >> Thank you >> Gianluigi >> >> Il giorno gio 12 set 2019 alle ore 16:45 Gianluigi >> ha scritto: >> >>> See if this feature can help you >>> >>> Regards >>> Gianluigi >>> >>> Il giorno gio 12 set 2019 alle ore 16:35 Rolf-Werner Eilert < >>> rwe-sse at osnanet.de> ha scritto: >>> >>>> Ok, after trying around for some while I found that TextLabel reacts to >>>> a change in Height or Width. >>>> >>>> I wanted to adapt its measures to the text within and to the space left >>>> from the position it was to appear until the right border of the >>>> window. >>>> What I intended was a little yellow help window with a help text which >>>> should pop up at the writing position. >>>> >>>> When I fix it at the top of the window and let it be visible all the >>>> time, never changing its size, it does wrap the text. But when I use >>>> its >>>> Font.Height and Font.Width properties to compute the number of >>>> potential >>>> lines and then change its measures appropriately, the text will not be >>>> wrapped anymore. >>>> >>>> Strange, but I have found a workaround at least - just leaving it as it >>>> is and leaving it visible. >>>> >>>> Regards >>>> Rolf >>>> >>>> >>>> Am 12.09.19 um 16:11 schrieb Bruce: >>>> > Hmmm, never noticed that. Check AutoResize and Expand properties??? >>>> > Check parent Arrangement??? Otherwise no idea, sorry. >>>> > b >>>> > >>>> > On 12/9/19 11:34 pm, Rolf-Werner Eilert wrote: >>>> >> Sorry, I meant TextLabel... >>>> >> >>>> >> >>>> >> >>>> >> Am 12.09.19 um 15:57 schrieb Bruce: >>>> >>> I might be a bit out of date, but I didn't think a TextBox could >>>> wrap? >>>> >>> b >>>> >>> >>>> >>> On 12/9/19 11:23 pm, Rolf-Werner Eilert wrote: >>>> >>>> I have a TextBox with WordWrap set to "True" (its default). >>>> >>>> >>>> >>>> Yet it does not wrap the text, what might be the reason? There are >>>> >>>> whitespaces in the text, so there shouldn't be a problem. And I >>>> give >>>> >>>> enough Height to show several lines. >>>> >>>> >>>> >>>> I am on an Ubuntu Mate but have included qt4 and qt4.ext (because >>>> I >>>> >>>> need some of the features there), might that be a reason? >>>> >>>> >>>> >>>> Regards >>>> >>>> Rolf >>>> >>>> >>>> >>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >>>> >>>> ]---- >>>> >>> >>>> >>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >>>> ]---- >>>> >>> >>>> >>> >>>> >> >>>> >> >>>> >> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >>>> ]---- >>>> > >>>> > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >>>> ]---- >>>> > >>>> > >>>> >>>> >>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >>>> ]---- >>>> >>> -------------- next part -------------- An HTML attachment was scrubbed... URL: From g4mba5 at gmail.com Fri Sep 13 00:39:33 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Fri, 13 Sep 2019 00:39:33 +0200 Subject: [Gambas-user] gambas3 webform crud example. In-Reply-To: References: Message-ID: Le 10/09/2019 ? 17:09, Matias De lellis a ?crit : > Hi all, > > As I comment in an previous email, the idea is make a pagekite > administration page, and I assumed that Gambas webform is a good > candidate. So, I started writing an example to internalize with him, > and I am very happy. =) > > I share a complete example of CRUD handling users. * > https://github.com/matiasdelellis/gambas3-crud-example * > https://github.com/matiasdelellis/gambas3-crud-example/releases/download/v0.1.1/WebformCrudExample-0.1.1.tar.gz > > The intial class is WebformLogin -Everything starts from there-, but > there is a WebFormInstall that must be called once to build the > database. > > Based on this experience I ask some questions: > > 1. The type of database, name, etc, is fixed/hardcoded, but I would > like it to be configurable in WebFormInstall. Do you have any > suggestions? It must be written by WebformIntall and taked > automatically by WebDatabase. Store that in a configuration file using 'gb.settings'? > > 1.1. This is annoying, but I ask you to do a quick look at the > WebDatabase.module to see if you believe it is well done, in > particular if they it is transparent to interact with the rest of the > classes, and if security consideration -AdminOrOwnRequired() and > AdminRequired subrutines- to admin task is sufficient. > As soon as you use the substitution methods to forge your requests, you should not have any problem of SQL injection. You use exceptions (Error.Raise) to check administrator rights. It's usually not a good idea. You should use return values, and keep exceptions for... exceptional things like errors. Another detail: you don't need to end your request strings with ';'. And you should explain on the pages how many characters are required in logins and passwords. Otherwise people have to read your code to know. > 2. The values of inputs, positions, active WebForm, are all saved in > Session, which is interesting, but these are accessible with the > inspector, Inspector? What are you talking about? > and a GET is emited with that data every time the focus > changes between the inputs. This is a local security problem that > would be good to improve. What do you suggest? What is the problem with sending to the server the contents of text fields? > > 3. Related, upon requesting the page again, (Pressing F5), I would > expect this data to be cleaned, but I always get the previous data. I > can't abandon the session, due the active WebForm is saved there > too. I don't understand what you are talking about. Of course F5 does not clear the data. As everything is stored on the server, everything is refreshed on F5. What's the problem? > > 4. How to reuse js components?. In this example I use toastify to > show a simple notification. > >> Webform.AddJavascriptFile("toastify.js") > > It add the script from 'data' folder. Shouldn't it be in public? It's not needed, as the file is not directly sent to the client. All javascript files added by Webform.AddJavascriptFile() are concatenated and sent in one request to the client. The request is inserted in all HTML pages generated by 'gb.web.form' through a