From t.lee.davidson at gmail.com Fri Feb 1 00:11:32 2019 From: t.lee.davidson at gmail.com (T Lee Davidson) Date: Thu, 31 Jan 2019 18:11:32 -0500 Subject: [Gambas-user] GridView.ClientWidth yields incorrect size on Form_Open Message-ID: <316affeb-b1ce-2fee-709a-aad37c2c01ee@gmail.com> I am trying to resize a column other than the last column to take up the remaining available client space. But, I don't get a correct value for GridView.ClientWidth until the Form_Show event. Per the subject line, is this expected behavior or a bug? To reproduce, put a GridView on a new form. Then set FMain.class to: ' Gambas class file Public Sub Form_Open() Dim Headers As String[] = ["0123456789", "0123456789", "0123456789", "0123456789"] With GridView1 .AutoResize = False .Header = GridView.Horizontal End With GridView1.Columns.Count = Headers.Count For i As Integer = 0 To Headers.Max GridView1.Columns[i].Title = Headers[i] Next Debug GridView1.ClientWidth End Public Sub Form_Resize() Debug GridView1.ClientWidth End Public Sub Form_Show() Debug GridView1.ClientWidth End ___ Lee From t.lee.davidson at gmail.com Fri Feb 1 00:13:32 2019 From: t.lee.davidson at gmail.com (T Lee Davidson) Date: Thu, 31 Jan 2019 18:13:32 -0500 Subject: [Gambas-user] HtmlDocument confused by two doctype's in same document In-Reply-To: References: Message-ID: <28553a05-7312-c827-9bbd-fd3ed58af479@gmail.com> Should I report the following issue as a bug? ___ Lee On 1/26/19 5:28 AM, T Lee Davidson wrote: > Two days ago, I tried to send a [CRASH REPORT] that did not make it to the list, because an included HTML file was too large. I > think I have determined the cause of the issue and a way to reproduce it without sending such a large archive. > > For some reason, a search on Google yields a page which source contains two DOCTYPE tags. The one at the page top is in > lowercase letters. Another one, in uppercase letters, is embedded within a Javascript element further down in the page. > HtmlDocument seems to prefer the uppercase'd DocType tag and therefore truncates the top of the document. > > Project attached. > > > ___ > Lee > > > [System] > Gambas=3.12.90 402d1acbc (master) > OperatingSystem=Linux > Kernel=4.4.165-81-default > Architecture=x86_64 > Distribution=openSUSE Leap 42.3 > Desktop=KDE5 > Theme=QtCurve > Language=en_US.UTF-8 > Memory=3951M > > [Libraries] > Cairo=/usr/lib64/libcairo.so.2.11502.0 > Curl=/usr/lib64/libcurl.so.4.3.0 > DBus=/lib64/libdbus-1.so.3.8.14 > GStreamer=/usr/lib64/libgstreamer-0.10.so.0.30.0 > GStreamer=/usr/lib64/libgstreamer-1.0.so.0.803.0 > GTK+2=/usr/lib64/libgtk-x11-2.0.so.0.2400.31 > GTK+3=/usr/lib64/libgtk-3.so.0.2000.10 > OpenGL=/usr/lib64/libGL.so.1.2.0 > Poppler=/usr/lib64/libpoppler.so.60.0.0 > QT4=/usr/lib64/libQtCore.so.4.8.7 > QT5=/usr/lib64/libQt5Core.so.5.6.2 > SDL=/usr/lib64/libSDL-1.2.so.0.11.4 > SQLite=/usr/lib64/libsqlite3.so.0.8.6 > > [Environment] > [[snip]] From g4mba5 at gmail.com Fri Feb 1 00:17:29 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Fri, 1 Feb 2019 00:17:29 +0100 Subject: [Gambas-user] GridView.ClientWidth yields incorrect size on Form_Open In-Reply-To: <316affeb-b1ce-2fee-709a-aad37c2c01ee@gmail.com> References: <316affeb-b1ce-2fee-709a-aad37c2c01ee@gmail.com> Message-ID: <389e5091-c4af-44e9-9bfc-287708473b94@gmail.com> Le 01/02/2019 ? 00:11, T Lee Davidson a ?crit?: > I am trying to resize a column other than the last column to take up the > remaining available client space. But, I don't get a correct value for > GridView.ClientWidth until the Form_Show event. Per the subject line, is > this expected behavior or a bug? > It's expected, as the form and its contents is often arranged after the Open event has been emitted. I suggest using use the Arrange (or rarely the BeforeArrange) event of some container including your gridview to do what you want to do. Regards, -- Beno?t Minisini From g4mba5 at gmail.com Fri Feb 1 00:19:36 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Fri, 1 Feb 2019 00:19:36 +0100 Subject: [Gambas-user] HtmlDocument confused by two doctype's in same document In-Reply-To: <28553a05-7312-c827-9bbd-fd3ed58af479@gmail.com> References: <28553a05-7312-c827-9bbd-fd3ed58af479@gmail.com> Message-ID: <7e4c45d7-c40f-8da8-fb6f-3d99c52cb30e@gmail.com> Le 01/02/2019 ? 00:13, T Lee Davidson a ?crit?: > Should I report the following issue as a bug? > > > ___ > Lee > It's a good idea. -- Beno?t Minisini From rwe-sse at osnanet.de Fri Feb 1 09:51:12 2019 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Fri, 1 Feb 2019 09:51:12 +0100 Subject: [Gambas-user] GridView.ClientWidth yields incorrect size on Form_Open In-Reply-To: <389e5091-c4af-44e9-9bfc-287708473b94@gmail.com> References: <316affeb-b1ce-2fee-709a-aad37c2c01ee@gmail.com> <389e5091-c4af-44e9-9bfc-287708473b94@gmail.com> Message-ID: Am 01.02.19 um 00:17 schrieb Beno?t Minisini: > Le 01/02/2019 ? 00:11, T Lee Davidson a ?crit?: >> I am trying to resize a column other than the last column to take up >> the remaining available client space. But, I don't get a correct value >> for GridView.ClientWidth until the Form_Show event. Per the subject >> line, is this expected behavior or a bug? >> > > It's expected, as the form and its contents is often arranged after the > Open event has been emitted. > > I suggest using use the Arrange (or rarely the BeforeArrange) event of > some container including your gridview to do what you want to do. > > Regards, > Same problem here in the last months in two different projects. Something must call a Refresh of the GridView before all values are finally returned correctly. It is not only Width, it is also column X values etc. Example 1: In a calendar project there is sometimes a little dialog which appears over the main form with the GridView, and the GridView stays uncomplete first. When the user clicks off the dialog, the GridView will be refreshed and appears ok from then on. But when the dialog does not appear, the GridView will only complete when some refresh is forced, e. g. when the user chooses another week and then comes back. Example 2: In a school schedule program, there is a Baines line. On start, it always receives a column X value of 0, so the line will always start on Monday. Up to now I found a workaround by introducing a Timer which starts Enabled, e. g. every second. In its event I call either GridView.Refresh or the function which cares for the GridView and its contents, and after ticking once or twice, the GridView reacts normally and the Timer can be disabled. Now that I read your hint to use Arrange, of course I tried it, but it has no effect. Regards Rolf From t.lee.davidson at gmail.com Fri Feb 1 15:53:13 2019 From: t.lee.davidson at gmail.com (T Lee Davidson) Date: Fri, 1 Feb 2019 09:53:13 -0500 Subject: [Gambas-user] GridView.ClientWidth yields incorrect size on Form_Open In-Reply-To: References: <316affeb-b1ce-2fee-709a-aad37c2c01ee@gmail.com> <389e5091-c4af-44e9-9bfc-287708473b94@gmail.com> Message-ID: On 2/1/19 3:51 AM, Rolf-Werner Eilert wrote: > Now that I read your hint to use Arrange, of course I tried it, but it has?no?effect. > > Regards > Rolf In my project, I am resizing the first column to give it all extra available width; like AutoResize, but for the first column verses the last. Using the Arrange event works perfectly. (Thank you for that guidance, Beno?t.) ___ Lee From g4mba5 at gmail.com Fri Feb 1 16:30:31 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Fri, 1 Feb 2019 16:30:31 +0100 Subject: [Gambas-user] GridView.ClientWidth yields incorrect size on Form_Open In-Reply-To: References: <316affeb-b1ce-2fee-709a-aad37c2c01ee@gmail.com> <389e5091-c4af-44e9-9bfc-287708473b94@gmail.com> Message-ID: Le 01/02/2019 ? 15:53, T Lee Davidson a ?crit?: > On 2/1/19 3:51 AM, Rolf-Werner Eilert wrote: >> Now that I read your hint to use Arrange, of course I tried it, but it >> has?no?effect. >> >> Regards >> Rolf > > In my project, I am resizing the first column to give it all extra > available width; like AutoResize, but for the first column verses the > last. Using the Arrange event works perfectly. (Thank you for that > guidance, Beno?t.) > > > ___ > Lee > Another way is setting the column width to "-1" or setting the column Expand property to TRUE. Regards, -- Beno?t Minisini From t.lee.davidson at gmail.com Fri Feb 1 18:04:59 2019 From: t.lee.davidson at gmail.com (T Lee Davidson) Date: Fri, 1 Feb 2019 12:04:59 -0500 Subject: [Gambas-user] GridView.ClientWidth yields incorrect size on Form_Open In-Reply-To: References: <316affeb-b1ce-2fee-709a-aad37c2c01ee@gmail.com> <389e5091-c4af-44e9-9bfc-287708473b94@gmail.com> Message-ID: <9de9587f-5b6d-2305-8c2c-61b2f62b5b23@gmail.com> On 2/1/19 10:30 AM, Beno?t Minisini wrote: > Another way is setting the column width to "-1" or setting the column Expand?property?to?TRUE. I totally missed that a GridView_Column has an Expand property. But, it does not seem to work. Am I using it incorrectly? Public Sub Form_Open() Dim Headers As String[] = ["0123456789", "0123456789", "0123456789", "0123456789"] With GridView1 .AutoResize = False .Header = GridView.Horizontal End With GridView1.Rows.Count = 1 GridView1.Columns.Count = Headers.Count GridView1.Columns[0].Expand = True For i As Integer = 0 To Headers.Max GridView1.Columns[i].Title = Headers[i] GridView1[0, i].Text = String(30, "*") Next End Also, while we are talking about column widths, the GridView_ColumnResize and GridView_ColumnSize events appear to be identical. Is there a difference in behavior and use cases? ___ Lee From jussi.lahtinen at gmail.com Sat Feb 2 03:41:46 2019 From: jussi.lahtinen at gmail.com (Jussi Lahtinen) Date: Sat, 2 Feb 2019 04:41:46 +0200 Subject: [Gambas-user] I broke math, sorry guys Message-ID: Maybe I got brain cancer, but I really don't understand what is happening!? Even Wolfram Alpha shows similar (in my opinion wrong) answers. In addition to that Gambas gives "division by zero". See the attachment. So confusing... Jussi -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: MathBroken-0.0.1.tar.gz Type: application/gzip Size: 11843 bytes Desc: not available URL: From denisc at exemail.com.au Sat Feb 2 04:07:35 2019 From: denisc at exemail.com.au (Denis Crowther) Date: Sat, 2 Feb 2019 14:07:35 +1100 Subject: [Gambas-user] GridView.ClientWidth yields incorrect size on Form_Open In-Reply-To: References: <316affeb-b1ce-2fee-709a-aad37c2c01ee@gmail.com> <389e5091-c4af-44e9-9bfc-287708473b94@gmail.com> Message-ID: <9e9411a6-91ea-3874-f58c-9f3a3e461553@exemail.com.au> I set the width to -1 which had no effect. Using expand, with or without the width = -1, worked. ps: Sorry Beno?t, I didn't realise I had sent it to you personally. Regards Denis On 2/2/19 2:30 am, Beno?t Minisini wrote: > Le 01/02/2019 ? 15:53, T Lee Davidson a ?crit?: >> On 2/1/19 3:51 AM, Rolf-Werner Eilert wrote: >>> Now that I read your hint to use Arrange, of course I tried it, but >>> it has?no?effect. >>> >>> Regards >>> Rolf >> >> In my project, I am resizing the first column to give it all extra >> available width; like AutoResize, but for the first column verses the >> last. Using the Arrange event works perfectly. (Thank you for that >> guidance, Beno?t.) >> >> >> ___ >> Lee >> > > Another way is setting the column width to "-1" or setting the column > Expand property to TRUE. > > Regards, > From bagonergi at gmail.com Sat Feb 2 08:22:42 2019 From: bagonergi at gmail.com (Gianluigi) Date: Sat, 2 Feb 2019 08:22:42 +0100 Subject: [Gambas-user] GridView.ClientWidth yields incorrect size on Form_Open In-Reply-To: <9e9411a6-91ea-3874-f58c-9f3a3e461553@exemail.com.au> References: <316affeb-b1ce-2fee-709a-aad37c2c01ee@gmail.com> <389e5091-c4af-44e9-9bfc-287708473b94@gmail.com> <9e9411a6-91ea-3874-f58c-9f3a3e461553@exemail.com.au> Message-ID: You can try this code: '-------------------------------------------------------------- Public Sub Form_Open() Dim Headers As String[] = ["0123456789", "0123456789", "0123456789", "0123456789"] With GridView1 .AutoResize = False .Header = GridView.Horizontal End With GridView1.Rows.Count = 1 GridView1.Columns.Count = Headers.Count GridView1.Columns[0].Expand = True For i As Integer = 0 To Headers.Max GridView1.Columns[i].Title = Headers[i] GridView1[0, i].Text = String(30, "*") Next End Public Sub Form_Arrange() '' Try also with the de-commented code 'GridView1.Columns.Width = -1 End '----------------------------------------------------------------- Regards Gianluigi Il giorno sab 2 feb 2019 alle ore 04:09 Denis Crowther < denisc at exemail.com.au> ha scritto: > I set the width to -1 which had no effect. > Using expand, with or without the width = -1, worked. > > > > > ps: Sorry Beno?t, I didn't realise I had sent it to you personally. > > Regards > Denis > > On 2/2/19 2:30 am, Beno?t Minisini wrote: > > Le 01/02/2019 ? 15:53, T Lee Davidson a ?crit : > >> On 2/1/19 3:51 AM, Rolf-Werner Eilert wrote: > >>> Now that I read your hint to use Arrange, of course I tried it, but > >>> it has no effect. > >>> > >>> Regards > >>> Rolf > >> > >> In my project, I am resizing the first column to give it all extra > >> available width; like AutoResize, but for the first column verses the > >> last. Using the Arrange event works perfectly. (Thank you for that > >> guidance, Beno?t.) > >> > >> > >> ___ > >> Lee > >> > > > > Another way is setting the column width to "-1" or setting the column > > Expand property to TRUE. > > > > Regards, > > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From g4mba5 at gmail.com Sat Feb 2 10:29:06 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Sat, 2 Feb 2019 10:29:06 +0100 Subject: [Gambas-user] I broke math, sorry guys In-Reply-To: References: Message-ID: Le 02/02/2019 ? 03:41, Jussi Lahtinen a ?crit?: > Maybe I got brain cancer, but I really don't understand what is happening!? > Even Wolfram Alpha shows similar (in my opinion wrong) answers. In > addition to that Gambas gives "division by zero". > > See the attachment. So confusing... > > > Jussi > No, but maybe you should buy new glasses and look at your brackets again. :-) -- Beno?t Minisini From gambas.fr at gmail.com Sat Feb 2 17:53:43 2019 From: gambas.fr at gmail.com (Fabien Bodard) Date: Sat, 2 Feb 2019 17:53:43 +0100 Subject: [Gambas-user] Last revision of Benoit Message-ID: For compile it I've need to Remove manually gambas/main/tools dir then ./reconf-all ./Configure -C make -j4 sudo make install because gbh3 want to compile -- Fabien Bodard From jussi.lahtinen at gmail.com Sat Feb 2 20:15:15 2019 From: jussi.lahtinen at gmail.com (Jussi Lahtinen) Date: Sat, 2 Feb 2019 21:15:15 +0200 Subject: [Gambas-user] I broke math, sorry guys In-Reply-To: References: Message-ID: My eyes are fine (or that what the optician said to me [not so sure anymore]), must be the brain cancer! It's amazing how I missed that. I even TRIPLE checked the brackets. Oh well, I'm glad it had this simple fix! Thanks! Jussi On Sat, Feb 2, 2019 at 11:30 AM Beno?t Minisini wrote: > Le 02/02/2019 ? 03:41, Jussi Lahtinen a ?crit : > > Maybe I got brain cancer, but I really don't understand what is > happening!? > > Even Wolfram Alpha shows similar (in my opinion wrong) answers. In > > addition to that Gambas gives "division by zero". > > > > See the attachment. So confusing... > > > > > > Jussi > > > > No, but maybe you should buy new glasses and look at your brackets > again. :-) > > > -- > Beno?t Minisini > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.lee.davidson at gmail.com Sat Feb 2 20:53:08 2019 From: t.lee.davidson at gmail.com (T Lee Davidson) Date: Sat, 2 Feb 2019 14:53:08 -0500 Subject: [Gambas-user] GridView.ClientWidth yields incorrect size on Form_Open In-Reply-To: <9e9411a6-91ea-3874-f58c-9f3a3e461553@exemail.com.au> References: <316affeb-b1ce-2fee-709a-aad37c2c01ee@gmail.com> <389e5091-c4af-44e9-9bfc-287708473b94@gmail.com> <9e9411a6-91ea-3874-f58c-9f3a3e461553@exemail.com.au> Message-ID: On 2/1/19 10:07 PM, Denis Crowther wrote: > I?set?the?width?to?-1?which?had?no?effect. > Using?expand,?with?or?without?the?width?=?-1,?worked. Denis, the Expand property doesn't work for me. Could you provide a little code that shows how you made it work for you? I am testing it thus (with AutoResize set to False): [code] Dim Headers As String[] = ["0123456789", "0123456789", "0123456789", "0123456789"] GridView1.Rows.Count = 1 GridView1.Columns.Count = Headers.Count GridView1.Columns[0].Expand = True For i As Integer = 0 To Headers.Max GridView1.Columns[i].Title = Headers[i] GridView1[0, i].Text = String(30, "*") Next [/code] I've tried setting Expand = True after the Column Titles are defined, but it makes no difference. Charlie, thank you for that code. Setting the column width to -1 does automatically resize the column to fit the data. However, I am trying to achieve the behavior that the Expand property is supposed to give: "Return or set if a GridView column automatically expands to fit the GridView width." Meaning, as I understand it, similar to AutoResize but for a column other than the last column. I have actually accomplished this by capturing the sum of the column widths within the For loop and then resizing the first column mathematically within the Arrange event. It would seem, though, that using the Expand property would be much simpler and more sensible. ___ Lee From matthew.charles.collins.75 at gmail.com Sat Feb 2 22:08:58 2019 From: matthew.charles.collins.75 at gmail.com (Matthew Collins) Date: Sat, 2 Feb 2019 21:08:58 +0000 Subject: [Gambas-user] The Gambas Playground In-Reply-To: References: <23265eb68874791cad1d80dde0193459@smartsonsite.com> <499c077e-f2d7-b95c-92db-aff76074da9d@gmail.com> <49480932-5a89-e29c-0247-71bc9aca04ab@cogier.com> Message-ID: <7D692D2A-F8B0-4DB9-958D-4B091A20D3CA@gmail.com> Hi Fabien, Please try out the new "Mobile" playground alternative... without syntax highlighting which is most likely the cause of the issues. "Ultra" has also been upgraded (still a work in progress) to use "CodeMirror" for syntax highlighting instead of "Ace"... please everyone let us know your feedback on your preferred alternative web frontend... Big Thank You to Charlie Ogier from the https://Gambas.One UK help forum for supporting the new backend Gambas server. Thanks Matt > On 31 Jan 2019, at 13:54, Fabien Bodard wrote: > > To see the playground version run: > > Shell "gbs3 --version" > True ... thank you There is a bug on the editor (on firefox) the refreshing is not good when I select examples gist. So only two lines are shown at a time. ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- From bagonergi at gmail.com Sat Feb 2 23:05:59 2019 From: bagonergi at gmail.com (Gianluigi) Date: Sat, 2 Feb 2019 23:05:59 +0100 Subject: [Gambas-user] GridView.ClientWidth yields incorrect size on Form_Open In-Reply-To: References: <316affeb-b1ce-2fee-709a-aad37c2c01ee@gmail.com> <389e5091-c4af-44e9-9bfc-287708473b94@gmail.com> <9e9411a6-91ea-3874-f58c-9f3a3e461553@exemail.com.au> Message-ID: Il giorno sab 2 feb 2019 alle ore 20:54 T Lee Davidson < t.lee.davidson at gmail.com> ha scritto: > ... > Charlie, thank you for that code. Setting the column width to -1 does > automatically resize the column to fit the data. However, > I am trying to achieve the behavior that the Expand property is supposed > to give: "Return or set if a GridView column > automatically expands to fit the GridView width." Meaning, as I understand > it, similar to AutoResize but for a column other than > the last column. > > I have actually accomplished this by capturing the sum of the column > widths within the For loop and then resizing the first > column mathematically within the Arrange event. It would seem, though, > that using the Expand property would be much simpler and > more sensible. > > > ___ > Lee > If with "Charlie" you're referring to me, also me can not get Expand to work. But I think you can easily replace it with Width = -1: '------------------------------- Public Sub Form_Open() Dim Headers As String[] = ["0123456789", "0123456789", "0123456789", "0123456789"] With GridView1 .AutoResize = False .Header = GridView.Horizontal End With GridView1.Rows.Count = 1 GridView1.Columns.Count = Headers.Count For i As Integer = 0 To Headers.Max GridView1.Columns[i].Title = Headers[i] GridView1[0, i].Text = String(30, "*") Next GridView1.Columns[0].Width = -1 End '------------------------------- But also I would be curious to know how to set Expand ;-) Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.lee.davidson at gmail.com Sun Feb 3 00:24:12 2019 From: t.lee.davidson at gmail.com (T Lee Davidson) Date: Sat, 2 Feb 2019 18:24:12 -0500 Subject: [Gambas-user] GridView.ClientWidth yields incorrect size on Form_Open In-Reply-To: References: <316affeb-b1ce-2fee-709a-aad37c2c01ee@gmail.com> <389e5091-c4af-44e9-9bfc-287708473b94@gmail.com> <9e9411a6-91ea-3874-f58c-9f3a3e461553@exemail.com.au> Message-ID: <03252676-0cb7-5f27-4bc7-cd9a7378cdb4@gmail.com> On 2/2/19 5:05 PM, Gianluigi wrote: > If with "Charlie" you're referring to me, also me can not get Expand to work. > But I think you can easily replace it with Width = -1 Actually, no Gianluigi, I was not referring to you. I thought the code you first presented was directed toward someone else. As far as I understand the two, GridView_Column.Expand cannot be easily replaced with .Width = -1. The latter causes the width of the column to be resized according to the optimum width for the _data_ in the column. Whereas, .Expand works in relation to the combined width of the other columns and the .ClientWidth. I can achieve what I am wanting with: [code] Private iFixedColumnsWidth As Integer = 0 Public Sub Form_Open() Dim Headers As String[] = ["0123456789", "0123456789", "0123456789", "0123456789"] With GridView1 .AutoResize = False .Header = GridView.Horizontal End With GridView1.Rows.Count = 1 GridView1.Columns.Count = Headers.Count For i As Integer = 0 To Headers.Max GridView1.Columns[i].Title = Headers[i] iFixedColumnsWidth += GridView1.Columns[i].Width Next iFixedColumnsWidth -= GridView1.Columns[0].Width End Public Sub GridView1_Arrange() GridView1.Columns[0].Width = (GridView1.ClientWidth - iFixedColumnsWidth) End [/code] But not with the Expand property. ___ Lee From denisc at exemail.com.au Sun Feb 3 00:39:19 2019 From: denisc at exemail.com.au (Denis Crowther) Date: Sun, 3 Feb 2019 10:39:19 +1100 Subject: [Gambas-user] GridView.ClientWidth yields incorrect size on Form_Open In-Reply-To: References: <316affeb-b1ce-2fee-709a-aad37c2c01ee@gmail.com> <389e5091-c4af-44e9-9bfc-287708473b94@gmail.com> <9e9411a6-91ea-3874-f58c-9f3a3e461553@exemail.com.au> Message-ID: <6e1502ef-b33f-890d-a388-32626a2fd0ec@exemail.com.au> Sure Lee, Copied straight from a working program. I 'think' the trick is to use the Arrange event. Using -1 didn't work for me in the arrange event, I haven't tested it anywhere else yet. Public Sub tblTest_Arrange() With tblTest .Columns[0].Width = 0 '.Columns[1].Width = 150 .Columns[1].Expand = True .Columns[2].Width = 50 End With End Regards Denis On 3/2/19 6:53 am, T Lee Davidson wrote: > On 2/1/19 10:07 PM, Denis Crowther wrote: >> I?set?the?width?to?-1?which?had?no?effect. >> Using?expand,?with?or?without?the?width?=?-1,?worked. > > Denis, the Expand property doesn't work for me. Could you provide a > little code that shows how you made it work for you? > > I am testing it thus (with AutoResize set to False): > [code] > ? Dim Headers As String[] = ["0123456789", "0123456789", "0123456789", > "0123456789"] > > ? GridView1.Rows.Count = 1 > ? GridView1.Columns.Count = Headers.Count > ? GridView1.Columns[0].Expand = True > ? For i As Integer = 0 To Headers.Max > ??? GridView1.Columns[i].Title = Headers[i] > ??? GridView1[0, i].Text = String(30, "*") > ? Next > [/code] > > I've tried setting Expand = True after the Column Titles are defined, > but it makes no difference. > > > Charlie, thank you for that code. Setting the column width to -1 does > automatically resize the column to fit the data. However, I am trying to > achieve the behavior that the Expand property is supposed to give: > "Return or set if a GridView column automatically expands to fit the > GridView width." Meaning, as I understand it, similar to AutoResize but > for a column other than the last column. > > I have actually accomplished this by capturing the sum of the column > widths within the For loop and then resizing the first column > mathematically within the Arrange event. It would seem, though, that > using the Expand property would be much simpler and more sensible. > > > ___ > Lee > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- From t.lee.davidson at gmail.com Sun Feb 3 01:03:10 2019 From: t.lee.davidson at gmail.com (T Lee Davidson) Date: Sat, 2 Feb 2019 19:03:10 -0500 Subject: [Gambas-user] GridView.ClientWidth yields incorrect size on Form_Open In-Reply-To: <6e1502ef-b33f-890d-a388-32626a2fd0ec@exemail.com.au> References: <316affeb-b1ce-2fee-709a-aad37c2c01ee@gmail.com> <389e5091-c4af-44e9-9bfc-287708473b94@gmail.com> <9e9411a6-91ea-3874-f58c-9f3a3e461553@exemail.com.au> <6e1502ef-b33f-890d-a388-32626a2fd0ec@exemail.com.au> Message-ID: Thank you for that, Denis. But, even that didn't work for me. I can accomplish what I need by mathematically resizing the variable-width column in relation to the combined widths of my fixed-width columns. ___ Lee On 2/2/19 6:39 PM, Denis Crowther wrote: > Sure?Lee, > > Copied?straight?from?a?working?program. > > I?'think'?the?trick?is?to?use?the?Arrange?event. > Using?-1?didn't?work?for?me?in?the?arrange?event, > I?haven't?tested?it?anywhere?else?yet. > > > Public?Sub?tblTest_Arrange() > > ??With?tblTest > ????.Columns[0].Width?=?0 > ????'.Columns[1].Width?=?150 > ????.Columns[1].Expand?=?True > ????.Columns[2].Width?=?50 > ??End?With > > End > > Regards > Denis From bagonergi at gmail.com Sun Feb 3 10:48:21 2019 From: bagonergi at gmail.com (Gianluigi) Date: Sun, 3 Feb 2019 10:48:21 +0100 Subject: [Gambas-user] GridView.ClientWidth yields incorrect size on Form_Open In-Reply-To: <03252676-0cb7-5f27-4bc7-cd9a7378cdb4@gmail.com> References: <316affeb-b1ce-2fee-709a-aad37c2c01ee@gmail.com> <389e5091-c4af-44e9-9bfc-287708473b94@gmail.com> <9e9411a6-91ea-3874-f58c-9f3a3e461553@exemail.com.au> <03252676-0cb7-5f27-4bc7-cd9a7378cdb4@gmail.com> Message-ID: Il giorno dom 3 feb 2019 alle ore 00:25 T Lee Davidson < t.lee.davidson at gmail.com> ha scritto: > On 2/2/19 5:05 PM, Gianluigi wrote: > > If with "Charlie" you're referring to me, also me can not get Expand to > work. > > But I think you can easily replace it with Width = -1 > > Actually, no Gianluigi, I was not referring to you. I thought the code you > first presented was directed toward someone else. > yes, I was talking to Denis. But I see no answers from Charlie in this discussion. > As far as I understand the two, GridView_Column.Expand cannot be easily > replaced with .Width = -1. The latter causes the width > of the column to be resized according to the optimum width for the _data_ > in the column. Whereas, .Expand works in relation to > the combined width of the other columns and the .ClientWidth. > > I can achieve what I am wanting with: > > [code] > Private iFixedColumnsWidth As Integer = 0 > > Public Sub Form_Open() > > Dim Headers As String[] = ["0123456789", "0123456789", "0123456789", > "0123456789"] > > With GridView1 > .AutoResize = False > .Header = GridView.Horizontal > End With > > GridView1.Rows.Count = 1 > GridView1.Columns.Count = Headers.Count > For i As Integer = 0 To Headers.Max > GridView1.Columns[i].Title = Headers[i] > iFixedColumnsWidth += GridView1.Columns[i].Width > Next > iFixedColumnsWidth -= GridView1.Columns[0].Width > > End > > Public Sub GridView1_Arrange() > > GridView1.Columns[0].Width = (GridView1.ClientWidth - > iFixedColumnsWidth) > > End > [/code] > > But not with the Expand property. > > > ___ > Lee > Now I understand what you mean and this should work: Public Sub Form_Open() Dim Headers As String[] = ["0123456789", "0123456789", "0123456789", "0123456789"] With GridView1 .AutoResize = True .Header = GridView.Horizontal End With GridView1.Rows.Count = 1 GridView1.Columns.Count = Headers.Count For i As Integer = 0 To Headers.Max GridView1.Columns[i].Title = Headers[i] GridView1[0, i].Text = String(30, "*") Next GridView1.Columns[0].Expand = True GridView1.Columns[1].Expand = True GridView1.Columns[2].Expand = True GridView1.Columns[3].Expand = True 'GridView1.Columns[0].Width = -1 End Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From denisc at exemail.com.au Sun Feb 3 12:30:10 2019 From: denisc at exemail.com.au (Denis Crowther) Date: Sun, 3 Feb 2019 22:30:10 +1100 Subject: [Gambas-user] GridView.ClientWidth yields incorrect size on Form_Open In-Reply-To: References: <316affeb-b1ce-2fee-709a-aad37c2c01ee@gmail.com> <389e5091-c4af-44e9-9bfc-287708473b94@gmail.com> <9e9411a6-91ea-3874-f58c-9f3a3e461553@exemail.com.au> <6e1502ef-b33f-890d-a388-32626a2fd0ec@exemail.com.au> Message-ID: Hmmm, so that made me curious.. :-) So I threw a new GridView on a form and found that expand in either of these works as it should. I did notice that all the columns need to be sized at the same time. '--------------------------------------------- Public Sub Form_Open() Dim iWide As Integer = 65 With GridView1 .Columns.Count = 3 .Header = GridView.Horizontal ' .Columns[0].Width = iWide ' '-1 here makes the col really small ' '.Columns[1].Width = -1 ' .Columns[1].Expand = True ' .Columns[2].Width = iWide End With For x As Integer = 1 To 10 GridView1.Rows.Count += 1 GridView1[x - 1, 0].Text = "test: " & x GridView1[x - 1, 1].Text = "rwrggrg rgrgreg reg erg reg last" GridView1[x - 1, 2].Text = Str(x) Next End '--------------------------------------------- Public Sub GridView1_Arrange() Dim iWide As Integer = 65 With GridView1 .Columns[0].Width = iWide .Columns[1].Expand = True '-1 here resized the col to suit the data as expected '.Columns[1].Width = -1 .Columns[2].Width = iWide End With End '--------------------------------------------- Regards Denis On 3/2/19 11:03 am, T Lee Davidson wrote: > Thank you for that, Denis. But, even that didn't work for me. > > I can accomplish what I need by mathematically resizing the > variable-width column in relation to the combined widths of my > fixed-width columns. > > > ___ > Lee > > > On 2/2/19 6:39 PM, Denis Crowther wrote: >> Sure?Lee, >> >> Copied?straight?from?a?working?program. >> >> I?'think'?the?trick?is?to?use?the?Arrange?event. >> Using?-1?didn't?work?for?me?in?the?arrange?event, >> I?haven't?tested?it?anywhere?else?yet. >> >> >> Public?Sub?tblTest_Arrange() >> >> ???With?tblTest >> ?????.Columns[0].Width?=?0 >> ?????'.Columns[1].Width?=?150 >> ?????.Columns[1].Expand?=?True >> ?????.Columns[2].Width?=?50 >> ???End?With >> >> End >> >> Regards >> Denis > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- From bagonergi at gmail.com Sun Feb 3 13:40:55 2019 From: bagonergi at gmail.com (Gianluigi) Date: Sun, 3 Feb 2019 13:40:55 +0100 Subject: [Gambas-user] GridView.ClientWidth yields incorrect size on Form_Open In-Reply-To: References: <316affeb-b1ce-2fee-709a-aad37c2c01ee@gmail.com> <389e5091-c4af-44e9-9bfc-287708473b94@gmail.com> <9e9411a6-91ea-3874-f58c-9f3a3e461553@exemail.com.au> <6e1502ef-b33f-890d-a388-32626a2fd0ec@exemail.com.au> Message-ID: To be clearer: It all depends on how AutoResize is set, for Expand to work fine, it must be set to true. Try this which it seems simpler: '------------------------------ Public Sub Form_Open() Dim Headers As String[] = ["0123456789", "0123456789", "0123456789", "0123456789"] With GridView1 .AutoResize = True ' <---------------!!! .Header = GridView.Horizontal End With GridView1.Rows.Count = 1 GridView1.Columns.Count = Headers.Count For i As Integer = 0 To Headers.Max GridView1.Columns[i].Title = Headers[i] GridView1[0, i].Text = String(30, "*") Next GridView1.Columns[0].Expand = True End '------------------------------------------- Regards Gianluigi Il giorno dom 3 feb 2019 alle ore 12:32 Denis Crowther < denisc at exemail.com.au> ha scritto: > Hmmm, so that made me curious.. :-) > > So I threw a new GridView on a form and found that expand in either of > these works as it should. > > I did notice that all the columns need to be sized at the same time. > > '--------------------------------------------- > Public Sub Form_Open() > > Dim iWide As Integer = 65 > > With GridView1 > .Columns.Count = 3 > .Header = GridView.Horizontal > > ' .Columns[0].Width = iWide > ' '-1 here makes the col really small > ' '.Columns[1].Width = -1 > ' .Columns[1].Expand = True > ' .Columns[2].Width = iWide > End With > > > For x As Integer = 1 To 10 > GridView1.Rows.Count += 1 > GridView1[x - 1, 0].Text = "test: " & x > GridView1[x - 1, 1].Text = "rwrggrg rgrgreg reg erg reg last" > GridView1[x - 1, 2].Text = Str(x) > Next > > End > '--------------------------------------------- > Public Sub GridView1_Arrange() > > Dim iWide As Integer = 65 > With GridView1 > .Columns[0].Width = iWide > .Columns[1].Expand = True > '-1 here resized the col to suit the data as expected > '.Columns[1].Width = -1 > .Columns[2].Width = iWide > End With > End > '--------------------------------------------- > > Regards > Denis > > On 3/2/19 11:03 am, T Lee Davidson wrote: > > Thank you for that, Denis. But, even that didn't work for me. > > > > I can accomplish what I need by mathematically resizing the > > variable-width column in relation to the combined widths of my > > fixed-width columns. > > > > > > ___ > > Lee > > > > > > On 2/2/19 6:39 PM, Denis Crowther wrote: > >> Sure Lee, > >> > >> Copied straight from a working program. > >> > >> I 'think' the trick is to use the Arrange event. > >> Using -1 didn't work for me in the arrange event, > >> I haven't tested it anywhere else yet. > >> > >> > >> Public Sub tblTest_Arrange() > >> > >> With tblTest > >> .Columns[0].Width = 0 > >> '.Columns[1].Width = 150 > >> .Columns[1].Expand = True > >> .Columns[2].Width = 50 > >> End With > >> > >> End > >> > >> Regards > >> Denis > > > > ----[ 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 Sun Feb 3 15:14:45 2019 From: bagonergi at gmail.com (Gianluigi) Date: Sun, 3 Feb 2019 15:14:45 +0100 Subject: [Gambas-user] GridView.ClientWidth yields incorrect size on Form_Open In-Reply-To: References: <316affeb-b1ce-2fee-709a-aad37c2c01ee@gmail.com> <389e5091-c4af-44e9-9bfc-287708473b94@gmail.com> <9e9411a6-91ea-3874-f58c-9f3a3e461553@exemail.com.au> <6e1502ef-b33f-890d-a388-32626a2fd0ec@exemail.com.au> Message-ID: I forgot to specify that: GridView1.Columns[1].Width = -1 it expands what is present in the column at the moment, therefore it must be given after filling. Regards Gianluigi Il giorno dom 3 feb 2019 alle ore 13:40 Gianluigi ha scritto: > To be clearer: > It all depends on how AutoResize is set, for Expand to work fine, it must > be set to true. > Try this which it seems simpler: > > '------------------------------ > Public Sub Form_Open() > > Dim Headers As String[] = ["0123456789", "0123456789", "0123456789", > "0123456789"] > > With GridView1 > .AutoResize = True ' <---------------!!! > .Header = GridView.Horizontal > End With > GridView1.Rows.Count = 1 > GridView1.Columns.Count = Headers.Count > For i As Integer = 0 To Headers.Max > GridView1.Columns[i].Title = Headers[i] > GridView1[0, i].Text = String(30, "*") > Next > GridView1.Columns[0].Expand = True > > End > '------------------------------------------- > > Regards > Gianluigi > > Il giorno dom 3 feb 2019 alle ore 12:32 Denis Crowther < > denisc at exemail.com.au> ha scritto: > >> Hmmm, so that made me curious.. :-) >> >> So I threw a new GridView on a form and found that expand in either of >> these works as it should. >> >> I did notice that all the columns need to be sized at the same time. >> >> '--------------------------------------------- >> Public Sub Form_Open() >> >> Dim iWide As Integer = 65 >> >> With GridView1 >> .Columns.Count = 3 >> .Header = GridView.Horizontal >> >> ' .Columns[0].Width = iWide >> ' '-1 here makes the col really small >> ' '.Columns[1].Width = -1 >> ' .Columns[1].Expand = True >> ' .Columns[2].Width = iWide >> End With >> >> >> For x As Integer = 1 To 10 >> GridView1.Rows.Count += 1 >> GridView1[x - 1, 0].Text = "test: " & x >> GridView1[x - 1, 1].Text = "rwrggrg rgrgreg reg erg reg last" >> GridView1[x - 1, 2].Text = Str(x) >> Next >> >> End >> '--------------------------------------------- >> Public Sub GridView1_Arrange() >> >> Dim iWide As Integer = 65 >> With GridView1 >> .Columns[0].Width = iWide >> .Columns[1].Expand = True >> '-1 here resized the col to suit the data as expected >> '.Columns[1].Width = -1 >> .Columns[2].Width = iWide >> End With >> End >> '--------------------------------------------- >> >> Regards >> Denis >> >> On 3/2/19 11:03 am, T Lee Davidson wrote: >> > Thank you for that, Denis. But, even that didn't work for me. >> > >> > I can accomplish what I need by mathematically resizing the >> > variable-width column in relation to the combined widths of my >> > fixed-width columns. >> > >> > >> > ___ >> > Lee >> > >> > >> > On 2/2/19 6:39 PM, Denis Crowther wrote: >> >> Sure Lee, >> >> >> >> Copied straight from a working program. >> >> >> >> I 'think' the trick is to use the Arrange event. >> >> Using -1 didn't work for me in the arrange event, >> >> I haven't tested it anywhere else yet. >> >> >> >> >> >> Public Sub tblTest_Arrange() >> >> >> >> With tblTest >> >> .Columns[0].Width = 0 >> >> '.Columns[1].Width = 150 >> >> .Columns[1].Expand = True >> >> .Columns[2].Width = 50 >> >> End With >> >> >> >> End >> >> >> >> Regards >> >> Denis >> > >> > ----[ 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 charlie at cogier.com Sun Feb 3 16:17:51 2019 From: charlie at cogier.com (Charlie Ogier) Date: Sun, 3 Feb 2019 15:17:51 +0000 Subject: [Gambas-user] Fwd: Re: GridView.ClientWidth yields incorrect size on Form_Open In-Reply-To: <12252cab-3aeb-282e-46bd-ae8bd09f10fe@cogier.com> References: <12252cab-3aeb-282e-46bd-ae8bd09f10fe@cogier.com> Message-ID: <2c50839f-eb6d-432c-6cd3-e27a27f51a46@cogier.com> (Sorry sent to T Lee instead of the mailing list) Hi T Lee, Try this code: - /' Gambas class file// // //Public Sub Form_Open()// // //? Dim Headers As String[] = ["012345", "0123456789012546", "01234567890123456789", "01"]// // //? With Me// //??? .Arrangement = Arrange.Vertical// //??? .Padding = 5// //? End With// // //? With GridView1// //??? .Expand = True// //??? .Header = GridView.Both// //??? .Columns.Count = Headers.Max// //??? .Rows.Count = 1// //? End With// // //? GridView1.Columns.Count = Headers.Count// //? For i As Integer = 0 To Headers.Max// //??? GridView1.Columns[i].Title = Headers[i]// //??? GridView1[0, i].Text = Headers[i]// //? Next// // //? GridView1.Columns.width = -1// // //? Debug GridView1.ClientWidth// // //End// // //Public Sub Form_Resize()// // //? Debug GridView1.ClientWidth// // //End// // //Public Sub Form_Show()// // //? Debug GridView1.ClientWidth// // //End/* * Charlie On 31/01/2019 23:11, T Lee Davidson wrote: > I am trying to resize a column other than the last column to take up > the remaining available client space. But, I don't get a correct value > for GridView.ClientWidth until the Form_Show event. Per the subject > line, is this expected behavior or a bug? > > > To reproduce, put a GridView on a new form. Then set FMain.class to: > > ' Gambas class file > > Public Sub Form_Open() > > ? Dim Headers As String[] = ["0123456789", "0123456789", "0123456789", > "0123456789"] > > ? With GridView1 > ??? .AutoResize = False > ??? .Header = GridView.Horizontal > ? End With > > ? GridView1.Columns.Count = Headers.Count > ? For i As Integer = 0 To Headers.Max > ??? GridView1.Columns[i].Title = Headers[i] > ? Next > ? Debug GridView1.ClientWidth > > End > > > Public Sub Form_Resize() > > ? Debug GridView1.ClientWidth > > End > > Public Sub Form_Show() > > ? Debug GridView1.ClientWidth > > End > > > ___ > Lee > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.lee.davidson at gmail.com Sun Feb 3 18:20:59 2019 From: t.lee.davidson at gmail.com (T Lee Davidson) Date: Sun, 3 Feb 2019 12:20:59 -0500 Subject: [Gambas-user] GridView.ClientWidth yields incorrect size on Form_Open In-Reply-To: References: <316affeb-b1ce-2fee-709a-aad37c2c01ee@gmail.com> <389e5091-c4af-44e9-9bfc-287708473b94@gmail.com> <9e9411a6-91ea-3874-f58c-9f3a3e461553@exemail.com.au> <6e1502ef-b33f-890d-a388-32626a2fd0ec@exemail.com.au> Message-ID: That's it, Gianluigi. You solved it! Thank you. Having AutoResize = True seemed incompatible with making a *different* column expand. Now the question is, is this expected behavior or a bug? I'll start a new thread to ask that. And, thank you also to Charlie, Denis, and Beno?t for your input. And, Rolf, does this solve your issues as well? ___ Lee On 2/3/19 7:40 AM, Gianluigi wrote: > To be clearer: > It all depends on how AutoResize is set,? for Expand to work fine, it must be set to true. > Try this which it seems simpler: > > '------------------------------ > Public Sub Form_Open() > > ? Dim Headers As String[] = ["0123456789", "0123456789", "0123456789", "0123456789"] > > ? With GridView1 > ??? .AutoResize = True?? ' <---------------!!! > ??? .Header = GridView.Horizontal > ? End With > ? GridView1.Rows.Count = 1 > ? GridView1.Columns.Count = Headers.Count > ? For i As Integer = 0 To Headers.Max > ??? GridView1.Columns[i].Title = Headers[i] > ??? GridView1[0, i].Text = String(30, "*") > ? Next > ?? GridView1.Columns[0].Expand = True > > End > '------------------------------------------- > > Regards > Gianluigi From t.lee.davidson at gmail.com Sun Feb 3 18:26:24 2019 From: t.lee.davidson at gmail.com (T Lee Davidson) Date: Sun, 3 Feb 2019 12:26:24 -0500 Subject: [Gambas-user] GridView_Column.Expand = True also needs AutoResize = True to work; expected behavior? Message-ID: Gianluigi discovered that for GridView_Column.Expand = True to actually have an effect, AutoResize also needs to be set = True. [https://lists.gambas-basic.org/pipermail/user/2019-February/066369.html] Is this expected behavior, or a bug? ___ Lee From rwe-sse at osnanet.de Mon Feb 4 08:28:54 2019 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Mon, 4 Feb 2019 08:28:54 +0100 Subject: [Gambas-user] GridView.ClientWidth yields incorrect size on Form_Open In-Reply-To: References: <316affeb-b1ce-2fee-709a-aad37c2c01ee@gmail.com> <389e5091-c4af-44e9-9bfc-287708473b94@gmail.com> <9e9411a6-91ea-3874-f58c-9f3a3e461553@exemail.com.au> <6e1502ef-b33f-890d-a388-32626a2fd0ec@exemail.com.au> Message-ID: Am 03.02.19 um 18:20 schrieb T Lee Davidson: > That's it, Gianluigi. You solved it! > > Thank you. > > Having AutoResize = True seemed incompatible with making a *different* > column expand. Now the question is, is this expected behavior or a bug? > I'll start a new thread to ask that. > > And, thank you also to Charlie, Denis, and Beno?t for your input. > > And, Rolf, does this solve your issues as well? > No, it is a different thing. It's about the values that the properties deliver such as column X and Width etc. They come only correctly after everything has been refreshed at least once. And in the two projects I mentioned, I do not use any of the functions you have discussed here. Hm... At least I think so, I'll look it up again later. Regards Rolf From bagonergi at gmail.com Mon Feb 4 09:26:31 2019 From: bagonergi at gmail.com (Gianluigi) Date: Mon, 4 Feb 2019 09:26:31 +0100 Subject: [Gambas-user] GridView.ClientWidth yields incorrect size on Form_Open In-Reply-To: References: <316affeb-b1ce-2fee-709a-aad37c2c01ee@gmail.com> <389e5091-c4af-44e9-9bfc-287708473b94@gmail.com> <9e9411a6-91ea-3874-f58c-9f3a3e461553@exemail.com.au> <6e1502ef-b33f-890d-a388-32626a2fd0ec@exemail.com.au> Message-ID: Il giorno lun 4 feb 2019 alle ore 08:29 Rolf-Werner Eilert < rwe-sse at osnanet.de> ha scritto: > Am 03.02.19 um 18:20 schrieb T Lee Davidson: > > That's it, Gianluigi. You solved it! > > > > Thank you. > > > > Having AutoResize = True seemed incompatible with making a *different* > > column expand. Now the question is, is this expected behavior or a bug? > > I'll start a new thread to ask that. > > > > And, thank you also to Charlie, Denis, and Beno?t for your input. > > > > And, Rolf, does this solve your issues as well? > > > > No, it is a different thing. It's about the values that the properties > deliver such as column X and Width etc. They come only correctly after > everything has been refreshed at least once. > > And in the two projects I mentioned, I do not use any of the functions > you have discussed here. > > Hm... At least I think so, I'll look it up again later. > > Regards > Rolf > It is possible (try to) help only if you attach a project that summarizes the malfunction. Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From gambas.fr at gmail.com Mon Feb 4 11:02:31 2019 From: gambas.fr at gmail.com (Fabien Bodard) Date: Mon, 4 Feb 2019 11:02:31 +0100 Subject: [Gambas-user] Problem on events Message-ID: Is someone can explain me why the attached parent of MyMenu is a mymenu and not FMain ? (result of (Object.Parent)) I hate circular reference is it a way to help me to know wich variable are in circular reference ? and not freed -- Fabien Bodard -------------- next part -------------- A non-text attachment was scrubbed... Name: Aquisition-0.0.1.tar.gz Type: application/gzip Size: 32851 bytes Desc: not available URL: From gambas.fr at gmail.com Mon Feb 4 15:24:35 2019 From: gambas.fr at gmail.com (Fabien Bodard) Date: Mon, 4 Feb 2019 15:24:35 +0100 Subject: [Gambas-user] GridView_Column.Expand = True also needs AutoResize = True to work; expected behavior? In-Reply-To: References: Message-ID: Le dim. 3 f?vr. 2019 ? 18:27, T Lee Davidson a ?crit : > > Gianluigi discovered that for GridView_Column.Expand = True to actually have an effect, AutoResize also needs to be set = True. > [https://lists.gambas-basic.org/pipermail/user/2019-February/066369.html] > > Is this expected behavior, or a bug? > I my fill I will vote for a bug. Because normally expand do not take care about the content size. Then Autoresize give a size corresponding to the content plus the padding and border. If expand is selected with autoresize at true i think the correct behavior will be to have a column than have a minimum size and just complete the free space if it have. am I wrong ? From gambas.fr at gmail.com Mon Feb 4 15:37:02 2019 From: gambas.fr at gmail.com (Fabien Bodard) Date: Mon, 4 Feb 2019 15:37:02 +0100 Subject: [Gambas-user] Problem on events In-Reply-To: References: Message-ID: Well I've not well tested as I test on Last that return the Item parent... it's the menu. But if i Do Object.parent(ME) in the mymenu class it return nothing despite the fact I have given an event handler and the class have an event. So... what ? Le lun. 4 f?vr. 2019 ? 11:02, Fabien Bodard a ?crit : > > Is someone can explain me why the attached parent of MyMenu is a > mymenu and not FMain ? > > (result of (Object.Parent)) > > I hate circular reference is it a way to help me to know wich variable > are in circular reference ? > and not freed > > > -- > Fabien Bodard -- Fabien Bodard From gambas.fr at gmail.com Mon Feb 4 15:54:37 2019 From: gambas.fr at gmail.com (Fabien Bodard) Date: Mon, 4 Feb 2019 15:54:37 +0100 Subject: [Gambas-user] Problem on events In-Reply-To: References: Message-ID: ok Found it... the problem was in fact in the form declaration When I've created the DrawingArea for a menu element then I did it like : hdaItem = New DrawingArea(HPanel) as "Item" The proplem was it link it to the menu class from wich is called the popup() function. so in my case the basis one who have not Handle : Private $hMenuMode As New MyMenu So I've correct it in the popup function by doing : hdaItem = New DrawingArea(HPanel) Object.Attach(hdaItem, hMenu, "Item") where hMenu is the children element created on the fly. So now it Work :) For Each hMenu In $aChildren If hMenu.Picture Then H = Max(hForm.Font.Height, hMenu.Picture.Height) + 2 * iPadding W = Max(hForm.Font.TextWidth(hMenu.Text) + hMenu.Picture.w + 2 * iPadding, W) Else H = hForm.Font.Height + 2 * iPadding W = Max(hForm.Font.TextWidth(hMenu.Text) + 2 * iPadding, W) Endif FH += H hdaItem = New DrawingArea(HPanel) Object.Attach(hdaItem, hMenu, "Item") hdaItem.Height = H hdaItem.Tag = hMenu Next Le lun. 4 f?vr. 2019 ? 15:37, Fabien Bodard a ?crit : > > Well I've not well tested as I test on Last that return the Item > parent... it's the menu. > > But if i Do > Object.parent(ME) in the mymenu class it return nothing despite the > fact I have given an event handler and the class have an event. > > So... what ? > > Le lun. 4 f?vr. 2019 ? 11:02, Fabien Bodard a ?crit : > > > > Is someone can explain me why the attached parent of MyMenu is a > > mymenu and not FMain ? > > > > (result of (Object.Parent)) > > > > I hate circular reference is it a way to help me to know wich variable > > are in circular reference ? > > and not freed > > > > > > -- > > Fabien Bodard > > > > -- > Fabien Bodard -- Fabien Bodard From dickson.tim at googlemail.com Mon Feb 4 16:03:52 2019 From: dickson.tim at googlemail.com (Tim Dickson) Date: Mon, 4 Feb 2019 15:03:52 +0000 Subject: [Gambas-user] gambas slackware package creation Message-ID: <1bd38e23-770a-e996-9cd5-64b6e154f5dc@googlemail.com> appologies if this is double posted, I sent it first using the wrong email address. I've created a patch which adds the doinst.sh script to the package created by gambas, and modifies the requires file to be gambas3 which is what gambas is packaged as on slackware, but I haven't been able to work out where in the code it is creating 4 other packages which don't contain anything useful as far as slackware is concerned. ?for test project "try" I get -rw-r--r-- 1 root root 9221 Feb? 4 15:10 try-0.0.6-noarch-1.tgz -rw-r--r-- 1 root root? 586 Feb? 4 15:10 try-gtk-0.0.6-noarch-1.tgz -rw-r--r-- 1 root root? 588 Feb? 4 15:10 try-gtk3-0.0.6-noarch-1.tgz -rw-r--r-- 1 root root? 588 Feb? 4 15:10 try-qt4-0.0.6-noarch-1.tgz -rw-r--r-- 1 root root? 587 Feb? 4 15:10 try-qt5-0.0.6-noarch-1.tgz only try-0.0.6-noarch-1.tgz contains the project with all relevant files. The other package files are not needed (slackware does not do dependency resolution, does not split packages into development and runtime , and every full install of slackware has qt4, thus any version of gambas installed has qt4 support). It should only create the one package file, the others are not needed, but I can't work out where they are being created. any pointers would be appreciated then I can submit a diff which allows the ide to produce expected packages. regards, Tim From t.lee.davidson at gmail.com Mon Feb 4 19:12:42 2019 From: t.lee.davidson at gmail.com (T Lee Davidson) Date: Mon, 4 Feb 2019 13:12:42 -0500 Subject: [Gambas-user] GridView_Column.Expand = True also needs AutoResize = True to work; expected behavior? In-Reply-To: References: Message-ID: On 2/4/19 9:24 AM, Fabien Bodard wrote: > Le dim. 3 f?vr. 2019 ? 18:27, T Lee Davidson > a ?crit : >> >> Gianluigi discovered that for GridView_Column.Expand = True to actually have an effect, AutoResize also needs to be set = True. >> [https://lists.gambas-basic.org/pipermail/user/2019-February/066369.html] >> >> Is this expected behavior, or a bug? >> > > I my fill I will vote for a bug. Because normally expand do not take > care about the content size. Then Autoresize give a size corresponding > to the content plus the padding and border. > If expand is selected with autoresize at true i think the correct > behavior will be to have a column than have a minimum size and just > complete the free space if it have. > > am I wrong ? > I'm not sure, Fabien. I don't think GridView.AutoResize takes content width into account. I was thinking that AutoResize was just a shortcut for GridView.Columns[GridView1.Columns.Max].Expand = True. But, that does not appear to be the case. If the first and last columns are set Expand = True, they both expand equally. That is, unless AutoResize is set to False, then no columns expand. If Beno?t doesn't weight in on this soon, I'll probably just file a bug report and let him reject it if it is expected behavior. Then I can update the Wiki if needed. ___ Lee From g4mba5 at gmail.com Mon Feb 4 20:58:58 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Mon, 4 Feb 2019 20:58:58 +0100 Subject: [Gambas-user] GridView_Column.Expand = True also needs AutoResize = True to work; expected behavior? In-Reply-To: References: Message-ID: Le 04/02/2019 ? 19:12, T Lee Davidson a ?crit?: > On 2/4/19 9:24 AM, Fabien Bodard wrote: >> Le dim. 3 f?vr. 2019 ? 18:27, T Lee Davidson >> a ?crit : >>> >>> Gianluigi discovered that for GridView_Column.Expand = True to >>> actually have an effect, AutoResize also needs to be set = True. >>> [https://lists.gambas-basic.org/pipermail/user/2019-February/066369.html] >>> >>> >>> Is this expected behavior, or a bug? >>> >> >> I my fill I will vote for a bug. Because normally expand do not take >> care about the content size. Then Autoresize give a size corresponding >> to the content plus the padding and border. >> If expand is selected? with? autoresize at true i think the correct >> behavior will be to have a column than have a minimum size and just >> complete the free space if it have. >> >> am I wrong ? >> > > I'm not sure, Fabien. I don't think GridView.AutoResize takes content > width into account. > > I was thinking that AutoResize was just a shortcut for > GridView.Columns[GridView1.Columns.Max].Expand = True. But, that does > not appear to be the case. If the first and last columns are set Expand > = True, they both expand equally. That is, unless AutoResize is set to > False, then no columns expand. > > If Beno?t doesn't weight in on this soon, I'll probably just file a bug > report and let him reject it if it is expected behavior. Then I can > update the Wiki if needed. > > > ___ > Lee > Why don't you read the source code? It's the _GridView_Columns._Layout() method. If The AutoResize property is not set, then the Expand has no effect, as no automatic resize occurs. Only explicit resize. If AutoResize is set, then : - If no visible column has the Expand property set, then the last column is expanded as if it has the Expand property set. - Otherwise, the difference between the visible width and the width of static columns (with Expand not set) is shared between the expanded columns. - If a column with Expand set has an explicit width, this explicit width becomes its minimum width and is taken into account during the previous share of remaining space. Is the algorithm clear now? -- Beno?t Minisini From t.lee.davidson at gmail.com Mon Feb 4 21:31:11 2019 From: t.lee.davidson at gmail.com (T Lee Davidson) Date: Mon, 4 Feb 2019 15:31:11 -0500 Subject: [Gambas-user] GridView_Column.Expand = True also needs AutoResize = True to work; expected behavior? In-Reply-To: References: Message-ID: On 2/4/19 2:58 PM, Beno?t Minisini wrote: > Why don't you read the source code? It's the _GridView_Columns._Layout() method. > > If The AutoResize property is not set, then the Expand has no effect, as no?automatic?resize?occurs.?Only?explicit?resize. > > If?AutoResize?is?set,?then?: > > - If no visible column has the Expand property set, then the last column is?expanded?as?if?it?has?the?Expand?property?set. > > - Otherwise, the difference between the visible width and the width of > static?columns?(with?Expand?not?set)?is?shared?between?the?expanded?columns. > > - If a column with Expand set has an explicit width, this explicit width becomes its minimum width and is taken into account > during the previous share?of?remaining?space. > > Is?the?algorithm?clear?now? > > -- > Beno?t?Minisini I tried reading the source code, Beno?t. I had difficulty even finding the GridView class since it is not in either gb.qt4 or gb.qt5 as one might expect given where the GridView documentation is located on the Wiki. I had to look through 100+ of 234 search results for "gridview" before I found that it was in gb.gui.base in the "comp" directory along with the other "enhanced" components. And, then, I could not find where the AutoResize and Expand properties were actually used. I apologize for being so ignorant. Yes, it's clear now. Thanks. ___ Lee From g4mba5 at gmail.com Mon Feb 4 21:34:00 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Mon, 4 Feb 2019 21:34:00 +0100 Subject: [Gambas-user] GridView_Column.Expand = True also needs AutoResize = True to work; expected behavior? In-Reply-To: References: Message-ID: Le 04/02/2019 ? 21:31, T Lee Davidson a ?crit?: > On 2/4/19 2:58 PM, Beno?t Minisini wrote: >> Why don't you read the source code? It's the >> _GridView_Columns._Layout() method. >> >> If The AutoResize property is not set, then the Expand has no effect, >> as no?automatic?resize?occurs.?Only?explicit?resize. >> >> If?AutoResize?is?set,?then?: >> >> - If no visible column has the Expand property set, then the last >> column is?expanded?as?if?it?has?the?Expand?property?set. >> >> - Otherwise, the difference between the visible width and the width of >> static?columns?(with?Expand?not?set)?is?shared?between?the?expanded?columns. >> >> >> - If a column with Expand set has an explicit width, this explicit >> width becomes its minimum width and is taken into account during the >> previous share?of?remaining?space. >> >> Is?the?algorithm?clear?now? >> >> -- >> Beno?t?Minisini > > I tried reading the source code, Beno?t. I had difficulty even finding > the GridView class since it is not in either gb.qt4 or gb.qt5 as one > might expect given where the GridView documentation is located on the > Wiki. I had to look through 100+ of 234 search results for "gridview" > before I found that it was in gb.gui.base in the "comp" directory along > with the other "enhanced" components. Why didn't you ask "where is the source code of GridView"? I would have told you. -- Beno?t Minisini From gambas.fr at gmail.com Mon Feb 4 21:36:58 2019 From: gambas.fr at gmail.com (Fabien Bodard) Date: Mon, 4 Feb 2019 21:36:58 +0100 Subject: [Gambas-user] GridView_Column.Expand = True also needs AutoResize = True to work; expected behavior? In-Reply-To: References: Message-ID: ""Is the algorithm clear now?"" Yes sir ... I've not readed the code source... i think I'd have too next time :-( But I'm quite surprised by the relationship between Autoresize and Expand. From g4mba5 at gmail.com Mon Feb 4 21:43:43 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Mon, 4 Feb 2019 21:43:43 +0100 Subject: [Gambas-user] GridView_Column.Expand = True also needs AutoResize = True to work; expected behavior? In-Reply-To: References: Message-ID: Le 04/02/2019 ? 21:36, Fabien Bodard a ?crit?: > ""Is the algorithm clear now?"" > > Yes sir ... > > I've not readed the code source... i think I'd have too next time :-( > > But I'm quite surprised by the relationship between Autoresize and Expand. > Nevertheless I find it logical: AutoResize = automatic resize, so if it is set to FALSE, nothing automatic occurs. -- Beno?t Minisini From g4mba5 at gmail.com Mon Feb 4 21:54:25 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Mon, 4 Feb 2019 21:54:25 +0100 Subject: [Gambas-user] gambas slackware package creation In-Reply-To: <1bd38e23-770a-e996-9cd5-64b6e154f5dc@googlemail.com> References: <1bd38e23-770a-e996-9cd5-64b6e154f5dc@googlemail.com> Message-ID: <989d9d7d-3df0-ffce-1b22-ce53e7c82cdb@gmail.com> Le 04/02/2019 ? 16:03, Tim Dickson via User a ?crit?: > appologies if this is double posted, I sent it first using the wrong > email address. > I've created a patch which adds the doinst.sh script to the package > created by gambas, and modifies the requires file to be gambas3 which is > what gambas is packaged as on slackware, but I haven't been able to work > out where in the code it is creating 4 other packages which don't > contain anything useful as far as slackware is concerned. > > ?for test project "try" I get > -rw-r--r-- 1 root root 9221 Feb? 4 15:10 try-0.0.6-noarch-1.tgz > -rw-r--r-- 1 root root? 586 Feb? 4 15:10 try-gtk-0.0.6-noarch-1.tgz > -rw-r--r-- 1 root root? 588 Feb? 4 15:10 try-gtk3-0.0.6-noarch-1.tgz > -rw-r--r-- 1 root root? 588 Feb? 4 15:10 try-qt4-0.0.6-noarch-1.tgz > -rw-r--r-- 1 root root? 587 Feb? 4 15:10 try-qt5-0.0.6-noarch-1.tgz > > only try-0.0.6-noarch-1.tgz contains the project with all relevant > files. The other package files are not needed (slackware does not do > dependency resolution, does not split packages into development and > runtime , and every full install of slackware has qt4, thus any version > of gambas installed has qt4 support). It should only create the one > package file, the others are not needed, but I can't work out where they > are being created. any pointers would be appreciated then I can submit a > diff which allows the ide to produce expected packages. > regards, Tim > You should start looking at the Package.MakePakcage() routine. It calls "MakeTgzPackage()" to make the main package. Then it calls "MakeSupportPackage()", that function calling "MakeTgzSupportPackage()" to make all the GUI packages. So, according to what you say, it should just be a matter of doing nothing in that function. And are you sure that there is absolutely no way to tell that a package depends on another package with Slackware? It would be useful anyway. -- Beno?t Minisini From gambas.fr at gmail.com Mon Feb 4 22:33:32 2019 From: gambas.fr at gmail.com (Fabien Bodard) Date: Mon, 4 Feb 2019 22:33:32 +0100 Subject: [Gambas-user] GridView_Column.Expand = True also needs AutoResize = True to work; expected behavior? In-Reply-To: References: Message-ID: Well it can be a way to think. For me autoresize talk more about to fit the content that why I was thinked there must not have relation with expand. So if I understand Well Normal >> AutoResize >> Expand Le lun. 4 f?vr. 2019 ? 21:44, Beno?t Minisini a ?crit : > > Le 04/02/2019 ? 21:36, Fabien Bodard a ?crit : > > ""Is the algorithm clear now?"" > > > > Yes sir ... > > > > I've not readed the code source... i think I'd have too next time :-( > > > > But I'm quite surprised by the relationship between Autoresize and Expand. > > > > Nevertheless I find it logical: AutoResize = automatic resize, so if it > is set to FALSE, nothing automatic occurs. > > -- > Beno?t Minisini > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- -- Fabien Bodard From t.lee.davidson at gmail.com Tue Feb 5 00:26:09 2019 From: t.lee.davidson at gmail.com (T Lee Davidson) Date: Mon, 4 Feb 2019 18:26:09 -0500 Subject: [Gambas-user] ComboBox source code? Message-ID: Does anyone know where the source code for the ComboBox control is? All I can find is MyComboBox.class which does not appear to be the full code for that control. ___ Lee From g4mba5 at gmail.com Tue Feb 5 01:57:28 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Tue, 5 Feb 2019 01:57:28 +0100 Subject: [Gambas-user] ComboBox source code? In-Reply-To: References: Message-ID: <5d4511ed-2f07-5a2a-5b13-18f328d6c118@gmail.com> Le 05/02/2019 ? 00:26, T Lee Davidson a ?crit?: > Does anyone know where the source code for the ComboBox control is? All > I can find is MyComboBox.class which does not appear to be the full code > for that control. > > > ___ > Lee > ComboBox is a native control. The source code is in the toolkit library (Qt or GTK+) and in the component source code. Regards, -- Beno?t Minisini From t.lee.davidson at gmail.com Tue Feb 5 20:51:56 2019 From: t.lee.davidson at gmail.com (T Lee Davidson) Date: Tue, 5 Feb 2019 14:51:56 -0500 Subject: [Gambas-user] ComboBox source code? In-Reply-To: <5d4511ed-2f07-5a2a-5b13-18f328d6c118@gmail.com> References: <5d4511ed-2f07-5a2a-5b13-18f328d6c118@gmail.com> Message-ID: <12e6d3cd-abb3-f931-692a-b06c29cb1e17@gmail.com> On 2/4/19 7:57 PM, Beno?t Minisini wrote: > Le 05/02/2019 ? 00:26, T Lee Davidson a ?crit?: >> Does anyone know where the source code for the ComboBox control is? All I can find is MyComboBox.class which does not appear >> to be the full code for that control. >> >> >> ___ >> Lee >> > > ComboBox is a native control. The source code is in the toolkit library (Qt or GTK+) and in the component source code. > > Regards, > I found no ComboBox file in gambas/tree/master/gb.qt4/src nor in /gambas/tree/master/comp/src/gb.gui.base. After searching through 251 of 367 blobs for "combobox", I discovered that ComboBox is defined, at least in part, in CTextBox.cpp. Unfortunately for me, that's not something I would have intuitively known. I still did not find any code for ComboBox in /gambas/tree/master/comp, nor even for TextBox, after going through all 367 blobs. I did, however, find confirmation of my suspicion in comp/src/gb.report/.src/Preview/FOptions.class. I can now correct the Wiki with the confidence that I won't be misleading people with false information. Thanks. My question has been answered. ___ Lee From taboege at gmail.com Tue Feb 5 21:12:37 2019 From: taboege at gmail.com (Tobias Boege) Date: Tue, 5 Feb 2019 21:12:37 +0100 Subject: [Gambas-user] ComboBox source code? In-Reply-To: <12e6d3cd-abb3-f931-692a-b06c29cb1e17@gmail.com> References: <5d4511ed-2f07-5a2a-5b13-18f328d6c118@gmail.com> <12e6d3cd-abb3-f931-692a-b06c29cb1e17@gmail.com> Message-ID: <20190205201237.GM14634@highrise.localdomain> On Tue, 05 Feb 2019, T Lee Davidson wrote: > On 2/4/19 7:57 PM, Beno?t Minisini wrote: > > Le 05/02/2019 ? 00:26, T Lee Davidson a ?crit?: > > > Does anyone know where the source code for the ComboBox control is? > > > All I can find is MyComboBox.class which does not appear to be the > > > full code for that control. > > > > > > > > > ___ > > > Lee > > > > > > > ComboBox is a native control. The source code is in the toolkit library (Qt or GTK+) and in the component source code. > > > > Regards, > > > > I found no ComboBox file in gambas/tree/master/gb.qt4/src nor in /gambas/tree/master/comp/src/gb.gui.base. > > After searching through 251 of 367 blobs for "combobox", I discovered that > ComboBox is defined, at least in part, in CTextBox.cpp. Unfortunately for > me, that's not something I would have intuitively known. > > I still did not find any code for ComboBox in /gambas/tree/master/comp, nor even for TextBox, after going through all 367 blobs. > > I did, however, find confirmation of my suspicion in > comp/src/gb.report/.src/Preview/FOptions.class. I can now correct the Wiki > with the confidence that I won't be misleading people with false > information. > > Thanks. My question has been answered. > Regardless of that, what you want to do when searching for a native class is grepping for its declaration in the C/C++ "macro language" that Gambas uses to define classes: [~/src/gambas/gb.qt4/src] $ grep "GB_DECLARE.*ComboBox" -nR * CTextBox.cpp:903: GB_DECLARE(".ComboBox.Item", 0), GB_VIRTUAL_CLASS(), CTextBox.cpp:913: GB_DECLARE("ComboBox", sizeof(CCOMBOBOX)), GB_INHERITS("Control"), Once you've located the structure that contains the relevant GB_DECLARE, you will see all its symbols (except the inherited ones) listed below the class name declaration, together with the functions which implement them. Of course, knowledge of the internals is required to proceed. Needless to say, nobody would expect you to know that, so I'm relaying the information here. There really isn't good up-to-date information about hacking the native parts of Gambas, anyway. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From g4mba5 at gmail.com Tue Feb 5 21:10:02 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Tue, 5 Feb 2019 21:10:02 +0100 Subject: [Gambas-user] ComboBox source code? In-Reply-To: <12e6d3cd-abb3-f931-692a-b06c29cb1e17@gmail.com> References: <5d4511ed-2f07-5a2a-5b13-18f328d6c118@gmail.com> <12e6d3cd-abb3-f931-692a-b06c29cb1e17@gmail.com> Message-ID: <13c90505-c09d-9559-1895-3debe0d3266a@gmail.com> Le 05/02/2019 ? 20:51, T Lee Davidson a ?crit?: > On 2/4/19 7:57 PM, Beno?t Minisini wrote: >> Le 05/02/2019 ? 00:26, T Lee Davidson a ?crit?: >>> Does anyone know where the source code for the ComboBox control is? >>> All I can find is MyComboBox.class which does not appear to be the >>> full code for that control. >>> >>> >>> ___ >>> Lee >>> >> >> ComboBox is a native control. The source code is in the toolkit >> library (Qt or GTK+) and in the component source code. >> >> Regards, >> > > I found no ComboBox file in gambas/tree/master/gb.qt4/src nor in > /gambas/tree/master/comp/src/gb.gui.base. > > After searching through 251 of 367 blobs for "combobox", I discovered > that ComboBox is defined, at least in part, in CTextBox.cpp. > Unfortunately for me, that's not something I would have intuitively known. > > I still did not find any code for ComboBox in /gambas/tree/master/comp, > nor even for TextBox, after going through all 367 blobs. > > I did, however, find confirmation of my suspicion in > comp/src/gb.report/.src/Preview/FOptions.class. I can now correct the > Wiki with the confidence that I won't be misleading people with false > information. > > Thanks. My question has been answered. > > > ___ > Lee > I don't understand what you are talking about your "suspicions". As you didn't explain what you were searching exactly, I couldn't give you more details. The source code of the ComboBox control is in the QT toolkit source code. What you find in the gb.qt4 source code is just the wrapper. And as ComboBox is sometimes a TextBox, its wrapper source code in the same source code file as the TextBox wrapper. Regards, -- Beno?t Minisini From t.lee.davidson at gmail.com Tue Feb 5 22:17:32 2019 From: t.lee.davidson at gmail.com (T Lee Davidson) Date: Tue, 5 Feb 2019 16:17:32 -0500 Subject: [Gambas-user] ComboBox source code? In-Reply-To: <20190205201237.GM14634@highrise.localdomain> References: <5d4511ed-2f07-5a2a-5b13-18f328d6c118@gmail.com> <12e6d3cd-abb3-f931-692a-b06c29cb1e17@gmail.com> <20190205201237.GM14634@highrise.localdomain> Message-ID: On 2/5/19 3:12 PM, Tobias Boege wrote: > Regardless of that, what you want to do when searching for a native class > is grepping for its declaration in the C/C++ "macro language" that Gambas > uses to define classes: > > [~/src/gambas/gb.qt4/src] $ grep "GB_DECLARE.*ComboBox" -nR * > CTextBox.cpp:903: GB_DECLARE(".ComboBox.Item", 0), GB_VIRTUAL_CLASS(), > CTextBox.cpp:913: GB_DECLARE("ComboBox", sizeof(CCOMBOBOX)), GB_INHERITS("Control"), > > Once you've located the structure that contains the relevant GB_DECLARE, > you will see all its symbols (except the inherited ones) listed below the > class name declaration, together with the functions which implement them. > Of course, knowledge of the internals is required to proceed. Very handy information, Tobi. I balk at maintaining a local clone of the source, because my hard drive is like a closet. No matter how much free space I might start out with, items seem to somehow magically expand to fill all the available space. It does appear, though, that instead of relying on the limited search capabilities of the Gitlab web interface, having a local copy would save a lot of time. ___ Lee From richard.h.terry at gmail.com Wed Feb 6 00:56:00 2019 From: richard.h.terry at gmail.com (Richard Terry) Date: Wed, 6 Feb 2019 10:56:00 +1100 Subject: [Gambas-user] Loop variable question - lines of code in project Message-ID: mm.... quite a bit of work to fix my loops, not to to mention the ones in our libraries. Richard -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: hgiigccghogipdhp.png Type: image/png Size: 9400 bytes Desc: not available URL: From jussi.lahtinen at gmail.com Wed Feb 6 01:21:43 2019 From: jussi.lahtinen at gmail.com (Jussi Lahtinen) Date: Wed, 6 Feb 2019 02:21:43 +0200 Subject: [Gambas-user] Loop variable question - lines of code in project In-Reply-To: References: Message-ID: How often you use global variables in "for next" loops? I can't figure out even one instance when it is needed or good idea. Jussi On Wed, Feb 6, 2019 at 1:57 AM Richard Terry wrote: > > mm.... quite a bit of work to fix my loops, not to to mention the ones in > our libraries. > > Richard > > ----[ 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: hgiigccghogipdhp.png Type: image/png Size: 9400 bytes Desc: not available URL: From g4mba5 at gmail.com Wed Feb 6 01:29:39 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Wed, 6 Feb 2019 01:29:39 +0100 Subject: [Gambas-user] Loop variable question - lines of code in project In-Reply-To: References: Message-ID: <028c61f5-5dd4-1c0d-0b33-dcf75fb74757@gmail.com> Le 06/02/2019 ? 00:56, Richard Terry a ?crit?: > > mm.... quite a bit of work to fix my loops, not to to mention the ones > in our libraries. > > Richard > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > It should be possible to automate the process: 1) The compiler gives you the name of the file and the line where the global variable is used as a loop variable. 2) Then you extract the name of the global variable from the line, that should look like: "FOR EACH IN ..." 3) You find the line where the global variable is declared: "PRIVATE (or PUBLIC) AS " 4) You extract the type of the global variable, and you rewrite the loop line that way: "FOR EACH AS IN ..." 5) You remove the global variable declaration. That process won't work when the global variable is used for something else that loop variables, or if your code relies on side effects (for example if a method B uses the value of the loop global variable modified by the function A). Anyway, it's a very bad programming pratice to use global variables as loop variables! Regards, -- Beno?t Minisini From gambas.fr at gmail.com Wed Feb 6 07:24:34 2019 From: gambas.fr at gmail.com (Fabien Bodard) Date: Wed, 6 Feb 2019 07:24:34 +0100 Subject: [Gambas-user] ComboBox source code? In-Reply-To: References: <5d4511ed-2f07-5a2a-5b13-18f328d6c118@gmail.com> <12e6d3cd-abb3-f931-692a-b06c29cb1e17@gmail.com> <20190205201237.GM14634@highrise.localdomain> Message-ID: If you need info about gb.report.. query me. For info gb.report is deprecared use gb.report2 insteed Le mar. 5 f?vr. 2019 22:18, T Lee Davidson a ?crit : > On 2/5/19 3:12 PM, Tobias Boege wrote: > > Regardless of that, what you want to do when searching for a native class > > is grepping for its declaration in the C/C++ "macro language" that Gambas > > uses to define classes: > > > > [~/src/gambas/gb.qt4/src] $ grep "GB_DECLARE.*ComboBox" -nR * > > CTextBox.cpp:903: GB_DECLARE(".ComboBox.Item", 0), > GB_VIRTUAL_CLASS(), > > CTextBox.cpp:913: GB_DECLARE("ComboBox", sizeof(CCOMBOBOX)), > GB_INHERITS("Control"), > > > > Once you've located the structure that contains the relevant GB_DECLARE, > > you will see all its symbols (except the inherited ones) listed below the > > class name declaration, together with the functions which implement them. > > Of course, knowledge of the internals is required to proceed. > > Very handy information, Tobi. > > I balk at maintaining a local clone of the source, because my hard drive > is like a closet. No matter how much free space I might > start out with, items seem to somehow magically expand to fill all the > available space. > > It does appear, though, that instead of relying on the limited search > capabilities of the Gitlab web interface, having a local > copy would save a lot of time. > > > ___ > Lee > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dickson.tim at googlemail.com Wed Feb 6 17:53:56 2019 From: dickson.tim at googlemail.com (Tim Dickson) Date: Wed, 6 Feb 2019 16:53:56 +0000 Subject: [Gambas-user] git howto Message-ID: it is worth adding in the git howto for gambas that you need to create a certificate, and copy it into your git keys before you can actually connect to download a copy of your fork. something like... ssh-keygen -t ed25519 -C "email at example.com" and copy the contents of ~/.ssh/id_ed25519.pub to settings-sshkeys-addkey on gitlab otherwise you will get permissions issues and you won't be able to push or pull. regards, Tim From jussi.lahtinen at gmail.com Wed Feb 6 20:10:25 2019 From: jussi.lahtinen at gmail.com (Jussi Lahtinen) Date: Wed, 6 Feb 2019 21:10:25 +0200 Subject: [Gambas-user] git howto In-Reply-To: References: Message-ID: I don't think that is true. You can always download without creating certificate. Jussi On Wed, Feb 6, 2019 at 6:55 PM Tim Dickson via User < user at lists.gambas-basic.org> wrote: > it is worth adding in the git howto for gambas that you need to create a > certificate, and copy it into your git keys before you can actually > connect to download a copy of your fork. something like... > > ssh-keygen -t ed25519 -C "email at example.com" > and copy the contents of ~/.ssh/id_ed25519.pub to > settings-sshkeys-addkey on gitlab > > otherwise you will get permissions issues and you won't be able to push > or pull. > regards, Tim > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bagonergi at gmail.com Wed Feb 6 20:20:36 2019 From: bagonergi at gmail.com (Gianluigi) Date: Wed, 6 Feb 2019 20:20:36 +0100 Subject: [Gambas-user] git howto In-Reply-To: References: Message-ID: Here it seems explained: http://gambaswiki.org/wiki/howto/contribute#t2 Regards gianluigi Il giorno mer 6 feb 2019 alle ore 20:11 Jussi Lahtinen < jussi.lahtinen at gmail.com> ha scritto: > I don't think that is true. You can always download without creating > certificate. > > Jussi > > > On Wed, Feb 6, 2019 at 6:55 PM Tim Dickson via User < > user at lists.gambas-basic.org> wrote: > >> it is worth adding in the git howto for gambas that you need to create a >> certificate, and copy it into your git keys before you can actually >> connect to download a copy of your fork. something like... >> >> ssh-keygen -t ed25519 -C "email at example.com" >> and copy the contents of ~/.ssh/id_ed25519.pub to >> settings-sshkeys-addkey on gitlab >> >> otherwise you will get permissions issues and you won't be able to push >> or pull. >> regards, Tim >> >> ----[ 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 rwe-sse at osnanet.de Thu Feb 7 18:10:33 2019 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Thu, 7 Feb 2019 18:10:33 +0100 Subject: [Gambas-user] Small change in look after update Message-ID: Just FYI, after updating Ubuntu Mate last weekend, the look of TableView in Gambas applications has changed quite a little bit. When you have a table with invisible cell lines (Grid=False), the last cell will now get a tender gray horizontal line, so the end of the table (last row) is visible. Before, I could swear, it was left white. It doesn't bother me, I just wanted to inform you. Regards Rolf From bagonergi at gmail.com Thu Feb 7 18:29:39 2019 From: bagonergi at gmail.com (Gianluigi) Date: Thu, 7 Feb 2019 18:29:39 +0100 Subject: [Gambas-user] Translate-shell tool and png compress Message-ID: Hi everyone, in the last master, if we go to the Projects page of Preferences form, we will find two innovations added by Benoit: The ability to compress png files with pngquant and the possibility of obtaining an automatic translation [0] through various translation engines thanks to Google's translate-shell. For it work you need to install the related programs. In Debian, Ubuntu and derivatives, we can write in a terminal: $ sudo apt install pngquant $ sudo apt install translate-shell Regards Gialuigi [0] From a suggestion of V?ctor PEREZ -------------- next part -------------- An HTML attachment was scrubbed... URL: From chrisml at deganius.de Thu Feb 7 23:54:27 2019 From: chrisml at deganius.de (Christof Thalhofer) Date: Thu, 7 Feb 2019 23:54:27 +0100 Subject: [Gambas-user] Grmbl. I like Google ... Message-ID: Hello, Google blocks all mail from us. I will use this thread to test. 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 Fri Feb 8 00:03:28 2019 From: taboege at gmail.com (Tobias Boege) Date: Fri, 8 Feb 2019 00:03:28 +0100 Subject: [Gambas-user] Grmbl. I like Google ... In-Reply-To: References: Message-ID: <20190207230328.GH10006@highrise.localdomain> On Thu, 07 Feb 2019, Christof Thalhofer wrote: > Hello, > > Google blocks all mail from us. I will use this thread to test. > I received it. -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From chrisml at deganius.de Fri Feb 8 00:19:58 2019 From: chrisml at deganius.de (Christof Thalhofer) Date: Fri, 8 Feb 2019 00:19:58 +0100 Subject: [Gambas-user] Grmbl. I like Google ... In-Reply-To: <20190207230328.GH10006@highrise.localdomain> References: <20190207230328.GH10006@highrise.localdomain> Message-ID: Am 08.02.19 um 00:03 schrieb Tobias Boege: > On Thu, 07 Feb 2019, Christof Thalhofer wrote: >> Hello, >> >> Google blocks all mail from us. I will use this thread to test. >> > > I received it. Thank you. :-) I don't know if it was a hickup of Googles "KI" Bash-scripts or if we have a problem now. 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 Fri Feb 8 00:30:41 2019 From: bagonergi at gmail.com (Gianluigi) Date: Fri, 8 Feb 2019 00:30:41 +0100 Subject: [Gambas-user] Italian translations; pipeline has failed Message-ID: I received from GitLab with object: gambas | Pipeline #46625536 has failed for italian-translations | 80cc24b6 in !66. Your pipeline has failed. Project Gianluigi Gradaschi / gambas Branch italian-translations Commit 80cc24b6 in !66 Contains fix and new Italian translations [DEV... Commit Author Gianluigi Gradaschi Pipeline #46625536 triggered by Gianluigi Gradaschi had 2 failed builds. Logs may contain sensitive data. Please consider before forwarding this email. ? test build:archlinux-clang Running with gitlab-runner 11.7.0 (8bb608ff) on docker-auto-scale fa6cab46 Using Docker executor with image base/archlinux ... Pulling docker image base/archlinux ... ERROR: Job failed: Error response from daemon: manifest for base/archlinux:latest not found (executor_docker.go:168:1s) ? test build:archlinux Running with gitlab-runner 11.7.0 (8bb608ff) on docker-auto-scale ed2dce3a Using Docker executor with image base/archlinux ... Pulling docker image base/archlinux ... ERROR: Job failed: Error response from daemon: manifest for base/archlinux:latest not found (executor_docker.go:168:0s) ------------------------------------------------------ Now it's clear: Git hates me :-( What do I have to do now? Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From g4mba5 at gmail.com Fri Feb 8 00:47:08 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Fri, 8 Feb 2019 00:47:08 +0100 Subject: [Gambas-user] Italian translations; pipeline has failed In-Reply-To: References: Message-ID: <5026f2aa-0714-aa51-e3f9-62ac66c969b3@gmail.com> Le 08/02/2019 ? 00:30, Gianluigi a ?crit?: > I received from GitLab with object: gambas | Pipeline #46625536 has > failed for italian-translations | 80cc24b6 in !66. > > ???? Your pipeline has failed. > > Project ??? Gianluigi Gradaschi / gambas > Branch > ??? italian-translations > Commit > ??? 80cc24b6 in !66 > Contains fix and new Italian translations [DEV... > Commit Author > ??? Gianluigi Gradaschi > > Pipeline #46625536 triggered by ??? ??? Gianluigi Gradaschi > had 2 failed builds. > Logs may contain sensitive data. Please consider before forwarding this > email. > ? ??? test > ??? build:archlinux-clang > > Running with gitlab-runner 11.7.0 (8bb608ff) > ? on docker-auto-scale fa6cab46 > Using Docker executor with image base/archlinux ... > Pulling docker image base/archlinux ... > ERROR: Job failed: Error response from daemon: manifest for > base/archlinux:latest not found (executor_docker.go:168:1s) > > ? ??? test > ??? build:archlinux > > Running with gitlab-runner 11.7.0 (8bb608ff) > ? on docker-auto-scale ed2dce3a > Using Docker executor with image base/archlinux ... > Pulling docker image base/archlinux ... > ERROR: Job failed: Error response from daemon: manifest for > base/archlinux:latest not found (executor_docker.go:168:0s) > ------------------------------------------------------ > > Now it's clear: Git hates me :-( > > What do I have to do now? > > Regards > Gianluigi > > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > It's not git, it's gitlab that fails at running its own pipelines. You don't have to do anything. -- Beno?t Minisini From bagonergi at gmail.com Fri Feb 8 00:53:21 2019 From: bagonergi at gmail.com (Gianluigi) Date: Fri, 8 Feb 2019 00:53:21 +0100 Subject: [Gambas-user] Italian translations; pipeline has failed In-Reply-To: <5026f2aa-0714-aa51-e3f9-62ac66c969b3@gmail.com> References: <5026f2aa-0714-aa51-e3f9-62ac66c969b3@gmail.com> Message-ID: > It's not git, it's gitlab that fails at running its own pipelines. You > don't have to do anything. > > -- > Beno?t Minisini > > Thank you very much Good night Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From adamnt42 at gmail.com Fri Feb 8 06:12:44 2019 From: adamnt42 at gmail.com (Bruce) Date: Fri, 8 Feb 2019 15:42:44 +1030 Subject: [Gambas-user] User environment interrogation Message-ID: <6ebf83ee-86fc-95e8-6ffc-4ad82ef1edce@gmail.com> (Quicky?) Is there an easy way to get a particular environment setting for the current user. IOW I want to get the result of (say) echo $LD_LIBRARY_PATH tia Bruce From t.lee.davidson at gmail.com Fri Feb 8 07:29:24 2019 From: t.lee.davidson at gmail.com (T Lee Davidson) Date: Fri, 8 Feb 2019 01:29:24 -0500 Subject: [Gambas-user] User environment interrogation In-Reply-To: <6ebf83ee-86fc-95e8-6ffc-4ad82ef1edce@gmail.com> References: <6ebf83ee-86fc-95e8-6ffc-4ad82ef1edce@gmail.com> Message-ID: <8217909f-7f03-64f5-bf94-855351a4f9f2@gmail.com> On 2/8/19 12:12 AM, Bruce wrote: > (Quicky?) Is there an easy way to get a particular environment setting for the current user. > IOW I want to get the result of (say) > ? echo $LD_LIBRARY_PATH > > tia > Bruce I have to think that I must be missing something, because this should be quite easy. Public Sub Main() Dim sOutput As String Shell "echo $LD_LIBRARY_PATH" To sOutput Print sOutput End ___ Lee From adamnt42 at gmail.com Fri Feb 8 07:49:55 2019 From: adamnt42 at gmail.com (Bruce) Date: Fri, 8 Feb 2019 17:19:55 +1030 Subject: [Gambas-user] User environment interrogation In-Reply-To: <8217909f-7f03-64f5-bf94-855351a4f9f2@gmail.com> References: <6ebf83ee-86fc-95e8-6ffc-4ad82ef1edce@gmail.com> <8217909f-7f03-64f5-bf94-855351a4f9f2@gmail.com> Message-ID: <268a801e-dc40-7422-856a-a4d1c2386f93@gmail.com> On 8/2/19 4:59 pm, T Lee Davidson wrote: > On 2/8/19 12:12 AM, Bruce wrote: >> (Quicky?) Is there an easy way to get a particular environment setting >> for the current user. >> IOW I want to get the result of (say) >> ?? echo $LD_LIBRARY_PATH >> >> tia >> Bruce > > I have to think that I must be missing something, because this should be > quite easy. > > Public Sub Main() > > ? Dim sOutput As String > > ? Shell "echo $LD_LIBRARY_PATH" To sOutput > ? Print sOutput > > End > > > ___ > Lee > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- Missing something? I think not, but my usual over simplification :-) Trying again. Does there exist in the gambas native libraries a way to interrogate the current user's environment for any arbitrary setting? I was looking for an answer to see if I was missing something in my understanding of the User, System, Application etc classes that may save me the effort of doing exactly what you said. What I am really trying to do is something like this: If User.Env["ZZ_ABSOLUTE_RUBBISH"] then DoSomething_ProperLike Else Message.Error("blah,blah, blah. Die you Moron!") Return 300KV_through_keyboard Endif I guess I'll have to write it myself. cheers B From chrisml at deganius.de Fri Feb 8 08:29:04 2019 From: chrisml at deganius.de (Christof Thalhofer) Date: Fri, 8 Feb 2019 08:29:04 +0100 Subject: [Gambas-user] Grmbl. I like Google ... In-Reply-To: References: <20190207230328.GH10006@highrise.localdomain> Message-ID: <3ca74ed4-9261-aa69-7360-09c2fe74890d@deganius.de> Am 08.02.19 um 00:19 schrieb Christof Thalhofer: > I don't know if it was a hickup of Googles "KI" Bash-scripts or if we > have a problem now. I meant "AI" Bash-scripts for "Artificial Intelligence". It was a joke. In Germany currently there is a hype about "K?nstliche Intelligenz" aka KI (which is AI). Here no politicians speech can be without "KI", but they really don't know what that is. I think, they think, traffic light switching is "KI". ;-) 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.fr at gmail.com Fri Feb 8 08:47:21 2019 From: gambas.fr at gmail.com (Fabien Bodard) Date: Fri, 8 Feb 2019 08:47:21 +0100 Subject: [Gambas-user] User environment interrogation In-Reply-To: <268a801e-dc40-7422-856a-a4d1c2386f93@gmail.com> References: <6ebf83ee-86fc-95e8-6ffc-4ad82ef1edce@gmail.com> <8217909f-7f03-64f5-bf94-855351a4f9f2@gmail.com> <268a801e-dc40-7422-856a-a4d1c2386f93@gmail.com> Message-ID: It is here :-) http://gambaswiki.org/wiki/comp/gb/application/env Le ven. 8 f?vr. 2019 ? 07:51, Bruce a ?crit : > > On 8/2/19 4:59 pm, T Lee Davidson wrote: > > On 2/8/19 12:12 AM, Bruce wrote: > >> (Quicky?) Is there an easy way to get a particular environment setting > >> for the current user. > >> IOW I want to get the result of (say) > >> echo $LD_LIBRARY_PATH > >> > >> tia > >> Bruce > > > > I have to think that I must be missing something, because this should be > > quite easy. > > > > Public Sub Main() > > > > Dim sOutput As String > > > > Shell "echo $LD_LIBRARY_PATH" To sOutput > > Print sOutput > > > > End > > > > > > ___ > > Lee > > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > > Missing something? I think not, but my usual over simplification :-) > > Trying again. > > Does there exist in the gambas native libraries a way to interrogate the > current user's environment for any arbitrary setting? > > I was looking for an answer to see if I was missing something in my > understanding of the User, System, Application etc classes that may save > me the effort of doing exactly what you said. > > What I am really trying to do is something like this: > > If User.Env["ZZ_ABSOLUTE_RUBBISH"] then > DoSomething_ProperLike > Else > Message.Error("blah,blah, blah. Die you Moron!") > Return 300KV_through_keyboard > Endif > > I guess I'll have to write it myself. > > cheers > B > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- -- Fabien Bodard From adamnt42 at gmail.com Fri Feb 8 08:58:24 2019 From: adamnt42 at gmail.com (Bruce) Date: Fri, 8 Feb 2019 18:28:24 +1030 Subject: [Gambas-user] User environment interrogation In-Reply-To: References: <6ebf83ee-86fc-95e8-6ffc-4ad82ef1edce@gmail.com> <8217909f-7f03-64f5-bf94-855351a4f9f2@gmail.com> <268a801e-dc40-7422-856a-a4d1c2386f93@gmail.com> Message-ID: Ah Fabien! I just knew it had to be somewhere. (Damned if I know how I couldn't find it :-( Age, eyesight, stupidity, possibly all three. tx B On 8/2/19 6:17 pm, Fabien Bodard wrote: > It is here :-) > > http://gambaswiki.org/wiki/comp/gb/application/env > > Le ven. 8 f?vr. 2019 ? 07:51, Bruce a ?crit : >> >> On 8/2/19 4:59 pm, T Lee Davidson wrote: >>> On 2/8/19 12:12 AM, Bruce wrote: >>>> (Quicky?) Is there an easy way to get a particular environment setting >>>> for the current user. >>>> IOW I want to get the result of (say) >>>> echo $LD_LIBRARY_PATH >>>> >>>> tia >>>> Bruce >>> >>> I have to think that I must be missing something, because this should be >>> quite easy. >>> >>> Public Sub Main() >>> >>> Dim sOutput As String >>> >>> Shell "echo $LD_LIBRARY_PATH" To sOutput >>> Print sOutput >>> >>> End >>> >>> >>> ___ >>> Lee >>> >>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- >> >> Missing something? I think not, but my usual over simplification :-) >> >> Trying again. >> >> Does there exist in the gambas native libraries a way to interrogate the >> current user's environment for any arbitrary setting? >> >> I was looking for an answer to see if I was missing something in my >> understanding of the User, System, Application etc classes that may save >> me the effort of doing exactly what you said. >> >> What I am really trying to do is something like this: >> >> If User.Env["ZZ_ABSOLUTE_RUBBISH"] then >> DoSomething_ProperLike >> Else >> Message.Error("blah,blah, blah. Die you Moron!") >> Return 300KV_through_keyboard >> Endif >> >> I guess I'll have to write it myself. >> >> cheers >> B >> >> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > > > From g4mba5 at gmail.com Fri Feb 8 13:45:51 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Fri, 8 Feb 2019 13:45:51 +0100 Subject: [Gambas-user] Grmbl. I like Google ... In-Reply-To: <3ca74ed4-9261-aa69-7360-09c2fe74890d@deganius.de> References: <20190207230328.GH10006@highrise.localdomain> <3ca74ed4-9261-aa69-7360-09c2fe74890d@deganius.de> Message-ID: Le 08/02/2019 ? 08:29, Christof Thalhofer a ?crit?: > Am 08.02.19 um 00:19 schrieb Christof Thalhofer: > >> I don't know if it was a hickup of Googles "KI" Bash-scripts or if we >> have a problem now. > > I meant "AI" Bash-scripts for "Artificial Intelligence". It was a joke. > In Germany currently there is a hype about "K?nstliche Intelligenz" aka > KI (which is AI). > > Here no politicians speech can be without "KI", but they really don't > know what that is. I think, they think, traffic light switching is "KI". > > ;-) > > Alles Gute > > Christof Thalhofer > Apparently you have the same kind of politicians than us... They know nothing about "artificial intelligence". On the other hand, I'm sure for their "real stupidity". Regards, -- Beno?t Minisini From jussi.lahtinen at gmail.com Fri Feb 8 14:35:41 2019 From: jussi.lahtinen at gmail.com (Jussi Lahtinen) Date: Fri, 8 Feb 2019 15:35:41 +0200 Subject: [Gambas-user] Grmbl. I like Google ... In-Reply-To: References: <20190207230328.GH10006@highrise.localdomain> <3ca74ed4-9261-aa69-7360-09c2fe74890d@deganius.de> Message-ID: AI is *really* worth of getting excited, but of course not the way politicians (try to) represent it. Especially generative adversarial networks! https://www.youtube.com/channel/UCbfYPyITQ-7l4upoX8nvctg Jussi On Fri, Feb 8, 2019 at 2:46 PM Beno?t Minisini wrote: > Le 08/02/2019 ? 08:29, Christof Thalhofer a ?crit : > > Am 08.02.19 um 00:19 schrieb Christof Thalhofer: > > > >> I don't know if it was a hickup of Googles "KI" Bash-scripts or if we > >> have a problem now. > > > > I meant "AI" Bash-scripts for "Artificial Intelligence". It was a joke. > > In Germany currently there is a hype about "K?nstliche Intelligenz" aka > > KI (which is AI). > > > > Here no politicians speech can be without "KI", but they really don't > > know what that is. I think, they think, traffic light switching is "KI". > > > > ;-) > > > > Alles Gute > > > > Christof Thalhofer > > > > Apparently you have the same kind of politicians than us... They know > nothing about "artificial intelligence". On the other hand, I'm sure for > their "real stupidity". > > Regards, > > -- > 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 Fri Feb 8 15:53:01 2019 From: bagonergi at gmail.com (Gianluigi) Date: Fri, 8 Feb 2019 15:53:01 +0100 Subject: [Gambas-user] Translate shell Message-ID: In addition to google what other translation engines are available freely for Linux and how can they be obtained? Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From hans at gambas-buch.de Fri Feb 8 16:14:54 2019 From: hans at gambas-buch.de (Hans Lehmann) Date: Fri, 8 Feb 2019 16:14:54 +0100 Subject: [Gambas-user] Use of the methods ImageToView(...) and ViewToImage(...) of the component ImageView Message-ID: <96d00a64-82aa-d787-22dc-12615502c316@gambas-buch.de> Hello, a use case is searched for in which the two methods ImageToView(...) and ViewToImage(...) of the component ImageView are used. Yours sincerely Hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.lee.davidson at gmail.com Fri Feb 8 18:52:08 2019 From: t.lee.davidson at gmail.com (T Lee Davidson) Date: Fri, 8 Feb 2019 12:52:08 -0500 Subject: [Gambas-user] User environment interrogation In-Reply-To: References: <6ebf83ee-86fc-95e8-6ffc-4ad82ef1edce@gmail.com> <8217909f-7f03-64f5-bf94-855351a4f9f2@gmail.com> <268a801e-dc40-7422-856a-a4d1c2386f93@gmail.com> Message-ID: I'm now torn between, "Don't feel so bad, you're not the only one who missed it," and, whew, I don't feel so bad that I'm not the only one ;-) ___ Lee On 2/8/19 2:58 AM, Bruce wrote: > Ah Fabien! I just knew it had to be somewhere. (Damned if I know how I couldn't?find?it > :-(?Age,?eyesight,?stupidity,?possibly?all?three. > tx > B > > On?8/2/19?6:17?pm,?Fabien?Bodard?wrote: >> It?is?here :-) >> >> http://gambaswiki.org/wiki/comp/gb/application/env From t.lee.davidson at gmail.com Sat Feb 9 02:17:58 2019 From: t.lee.davidson at gmail.com (T Lee Davidson) Date: Fri, 8 Feb 2019 20:17:58 -0500 Subject: [Gambas-user] What exactly does the Clear method in a GridView? In-Reply-To: <58c61269-d12c-81d4-88bc-bb14f4389b7d@gmail.com> References: <58c61269-d12c-81d4-88bc-bb14f4389b7d@gmail.com> Message-ID: <4f40778c-2484-f6fe-604c-25d5d8fef6d4@gmail.com> On 9/2/18 2:35 PM, Beno?t Minisini wrote: > Le 02/09/2018 ? 20:33, Beno?t Minisini a ?crit?: >> Le 02/09/2018 ? 19:20, Jorge Carri?n a ?crit?: >>> The help says that "Clear the grid static contents". >>> What is this static content composed of? >>> Rows and columns size? Cell content? position on screen? >>> >>> Best Regards >>> >> >> Wait a minute, I'm looking into the source code... :-) >> > > It clears the contents that you defined explicitly (not what you draw through the Data event) and that is stored inside the > GridView control. And it sets the rows count to zero. But it keeps the columns. > GridView.Clear does not appear to set the rows count to zero. Did I misunderstand this, or has something changed since a *year* ago? ' Gambas class file Public Sub Form_Open() GridView1.Rows.Count = 10 GridView1.Columns.Count = 2 For x As Integer = 0 To GridView1.Rows.Max For y As Integer = 0 To GridView1.Columns.Max GridView1[x, y].Text = x & ":" & y Next Next End Public Sub Button1_Click() GridView1.Clear GridView1.Refresh ' Makes no difference Debug GridView1.Rows.Count End ___ Lee From adamnt42 at gmail.com Sat Feb 9 02:28:21 2019 From: adamnt42 at gmail.com (Bruce) Date: Sat, 9 Feb 2019 11:58:21 +1030 Subject: [Gambas-user] What exactly does the Clear method in a GridView? In-Reply-To: <4f40778c-2484-f6fe-604c-25d5d8fef6d4@gmail.com> References: <58c61269-d12c-81d4-88bc-bb14f4389b7d@gmail.com> <4f40778c-2484-f6fe-604c-25d5d8fef6d4@gmail.com> Message-ID: <28f3c977-df02-9dc9-f277-2acbe440bace@gmail.com> Hmm, odd. It works here (Rows.Count=0 after a Clear). Both QT4 and QT5. What GUI are you using? B On 9/2/19 11:47 am, T Lee Davidson wrote: > On 9/2/18 2:35 PM, Beno?t Minisini wrote: >> Le 02/09/2018 ? 20:33, Beno?t Minisini a ?crit?: >>> Le 02/09/2018 ? 19:20, Jorge Carri?n a ?crit?: >>>> The help says that "Clear the grid static contents". >>>> What is this static content composed of? >>>> Rows and columns size? Cell content? position on screen? >>>> >>>> Best Regards >>>> >>> >>> Wait a minute, I'm looking into the source code... :-) >>> >> >> It clears the contents that you defined explicitly (not what you draw >> through the Data event) and that is stored inside the GridView >> control. And it sets the rows count to zero. But it keeps the columns. >> > > GridView.Clear does not appear to set the rows count to zero. > > Did I misunderstand this, or has something changed since a *year* ago? > > ' Gambas class file > > Public Sub Form_Open() > > ? GridView1.Rows.Count = 10 > ? GridView1.Columns.Count = 2 > > ? For x As Integer = 0 To GridView1.Rows.Max > ??? For y As Integer = 0 To GridView1.Columns.Max > ????? GridView1[x, y].Text = x & ":" & y > ??? Next > ? Next > > End > > Public Sub Button1_Click() > > ? GridView1.Clear > ? GridView1.Refresh ' Makes no difference > ? Debug GridView1.Rows.Count > > End > > > ___ > Lee > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- From bagonergi at gmail.com Sat Feb 9 08:32:22 2019 From: bagonergi at gmail.com (Gianluigi) Date: Sat, 9 Feb 2019 08:32:22 +0100 Subject: [Gambas-user] What exactly does the Clear method in a GridView? In-Reply-To: <28f3c977-df02-9dc9-f277-2acbe440bace@gmail.com> References: <58c61269-d12c-81d4-88bc-bb14f4389b7d@gmail.com> <4f40778c-2484-f6fe-604c-25d5d8fef6d4@gmail.com> <28f3c977-df02-9dc9-f277-2acbe440bace@gmail.com> Message-ID: Here it deletes the contents but leaves the lines. Tested with gtk, gtk3, qt4, qt5. [System] Gambas=3.12.90 66b357d (master) OperatingSystem=Linux Kernel=4.15.0-45-generic Architecture=x86_64 Distribution=Ubuntu 18.04.1 LTS Desktop=UBUNTU:GNOME Theme=Fusion Language=it_IT.UTF-8 Regards Gianluigi Il giorno sab 9 feb 2019 alle ore 02:29 Bruce ha scritto: > Hmm, odd. > It works here (Rows.Count=0 after a Clear). > Both QT4 and QT5. > What GUI are you using? > B > > On 9/2/19 11:47 am, T Lee Davidson wrote: > > On 9/2/18 2:35 PM, Beno?t Minisini wrote: > >> Le 02/09/2018 ? 20:33, Beno?t Minisini a ?crit : > >>> Le 02/09/2018 ? 19:20, Jorge Carri?n a ?crit : > >>>> The help says that "Clear the grid static contents". > >>>> What is this static content composed of? > >>>> Rows and columns size? Cell content? position on screen? > >>>> > >>>> Best Regards > >>>> > >>> > >>> Wait a minute, I'm looking into the source code... :-) > >>> > >> > >> It clears the contents that you defined explicitly (not what you draw > >> through the Data event) and that is stored inside the GridView > >> control. And it sets the rows count to zero. But it keeps the columns. > >> > > > > GridView.Clear does not appear to set the rows count to zero. > > > > Did I misunderstand this, or has something changed since a *year* ago? > > > > ' Gambas class file > > > > Public Sub Form_Open() > > > > GridView1.Rows.Count = 10 > > GridView1.Columns.Count = 2 > > > > For x As Integer = 0 To GridView1.Rows.Max > > For y As Integer = 0 To GridView1.Columns.Max > > GridView1[x, y].Text = x & ":" & y > > Next > > Next > > > > End > > > > Public Sub Button1_Click() > > > > GridView1.Clear > > GridView1.Refresh ' Makes no difference > > Debug GridView1.Rows.Count > > > > End > > > > > > ___ > > Lee > > > > ----[ 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 adamnt42 at gmail.com Sat Feb 9 09:00:31 2019 From: adamnt42 at gmail.com (Bruce) Date: Sat, 9 Feb 2019 18:30:31 +1030 Subject: [Gambas-user] What exactly does the Clear method in a GridView? In-Reply-To: References: <58c61269-d12c-81d4-88bc-bb14f4389b7d@gmail.com> <4f40778c-2484-f6fe-604c-25d5d8fef6d4@gmail.com> <28f3c977-df02-9dc9-f277-2acbe440bace@gmail.com> Message-ID: Well I was wrong! Had a good look though our local code and found that our gridview override class does an explicit "Me.Rows.Count = 0" in it's Clear() method. :-( (That code (ours) has been around so long, I don't even remember when I, or someone, implemented the explicit setting of the rows count to zero.) Which begs the question... Oh well, sorry about the noise. b On 9/2/19 6:02 pm, Gianluigi wrote: > Here it deletes the contents but leaves the lines. > Tested with gtk, gtk3, qt4, qt5. > > [System] > Gambas=3.12.90 66b357d (master) > OperatingSystem=Linux > Kernel=4.15.0-45-generic > Architecture=x86_64 > Distribution=Ubuntu 18.04.1 LTS > Desktop=UBUNTU:GNOME > Theme=Fusion > Language=it_IT.UTF-8 > > Regards > Gianluigi > > Il giorno sab 9 feb 2019 alle ore 02:29 Bruce > ha scritto: > > Hmm, odd. > It works here (Rows.Count=0 after a Clear). > Both QT4 and QT5. > What GUI are you using? > B > > On 9/2/19 11:47 am, T Lee Davidson wrote: > > On 9/2/18 2:35 PM, Beno?t Minisini wrote: > >> Le 02/09/2018 ? 20:33, Beno?t Minisini a ?crit?: > >>> Le 02/09/2018 ? 19:20, Jorge Carri?n a ?crit?: > >>>> The help says that "Clear the grid static contents". > >>>> What is this static content composed of? > >>>> Rows and columns size? Cell content? position on screen? > >>>> > >>>> Best Regards > >>>> > >>> > >>> Wait a minute, I'm looking into the source code... :-) > >>> > >> > >> It clears the contents that you defined explicitly (not what you > draw > >> through the Data event) and that is stored inside the GridView > >> control. And it sets the rows count to zero. But it keeps the > columns. > >> > > > > GridView.Clear does not appear to set the rows count to zero. > > > > Did I misunderstand this, or has something changed since a *year* > ago? > > > > ' Gambas class file > > > > Public Sub Form_Open() > > > >? ? GridView1.Rows.Count = 10 > >? ? GridView1.Columns.Count = 2 > > > >? ? For x As Integer = 0 To GridView1.Rows.Max > >? ??? For y As Integer = 0 To GridView1.Columns.Max > >? ????? GridView1[x, y].Text = x & ":" & y > >? ??? Next > >? ? Next > > > > End > > > > Public Sub Button1_Click() > > > >? ? GridView1.Clear > >? ? GridView1.Refresh ' Makes no difference > >? ? Debug GridView1.Rows.Count > > > > End > > > > > > ___ > > Lee > > > > ----[ 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 g4mba5 at gmail.com Sat Feb 9 14:00:30 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Sat, 9 Feb 2019 14:00:30 +0100 Subject: [Gambas-user] What exactly does the Clear method in a GridView? In-Reply-To: <4f40778c-2484-f6fe-604c-25d5d8fef6d4@gmail.com> References: <58c61269-d12c-81d4-88bc-bb14f4389b7d@gmail.com> <4f40778c-2484-f6fe-604c-25d5d8fef6d4@gmail.com> Message-ID: <8fffeb9f-251f-3c02-22a8-4646a524cf45@gmail.com> Le 09/02/2019 ? 02:17, T Lee Davidson a ?crit?: > > GridView.Clear does not appear to set the rows count to zero. > > Did I misunderstand this, or has something changed since a *year* ago? > Yes, I told rubbish. GridView.Clear() does not change the row count. It only clears the contents defined specifically and resets the row header. Regards, -- Beno?t Minisini From g4mba5 at gmail.com Sun Feb 10 23:14:39 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Sun, 10 Feb 2019 23:14:39 +0100 Subject: [Gambas-user] Some comparison Message-ID: Number of lines of C code to implement the switch button in GTK+, without the comments : 1167 Number of lines of Gambas code to implement the switch button in Gambas, without the comments : 250 -- Beno?t Minisini From bagonergi at gmail.com Mon Feb 11 09:55:41 2019 From: bagonergi at gmail.com (Gianluigi) Date: Mon, 11 Feb 2019 09:55:41 +0100 Subject: [Gambas-user] Italian translations Message-ID: Hi Benoit, In the Preferences> Projects form, two translations are missing: Compress PNG ... and Automatic translation ... I immediately sent the translations and made the merger request. Have I made a mistake of communication, do I have to wait for more translations? Is it normal to always receive from GitLab: "gambas | Pipeline #46825672 has failed for italian-translations" ? Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From bagonergi at gmail.com Mon Feb 11 10:20:55 2019 From: bagonergi at gmail.com (Gianluigi) Date: Mon, 11 Feb 2019 10:20:55 +0100 Subject: [Gambas-user] Questions on gb.report2 Message-ID: Hi Fabien, I inserted an example on gb.report2 in the farm and I noticed that the text on the right-most (repeatable) label is not centered. In addition, the 4-sheet preview does not refresh and the three sheets remain white, you need to act on the scroll to see the contents. Are they my mistakes or do I have to report to the bugtracker? Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From rwe-sse at osnanet.de Mon Feb 11 11:20:14 2019 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Mon, 11 Feb 2019 11:20:14 +0100 Subject: [Gambas-user] Some comparison In-Reply-To: References: Message-ID: <0c0a3f61-7926-76d8-c825-e5fa01594550@osnanet.de> Am 10.02.19 um 23:14 schrieb Beno?t Minisini: > Number of lines of C code to implement the switch button in GTK+, > without the comments : > > ????1167 > > > Number of lines of Gambas code to implement the switch button in Gambas, > without the comments : > > ????250 > Strange thing that GTK+ is so roundabout. The other day, I asked the author of a (very useful) program why he didn't implement a function that saves the program's window state and reloads it at start. He pointed me to a few links with explanations for GTK+, and I knew why... Regards Rolf From g4mba5 at gmail.com Mon Feb 11 11:46:37 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Mon, 11 Feb 2019 11:46:37 +0100 Subject: [Gambas-user] Italian translations In-Reply-To: References: Message-ID: <00df9282-f420-2830-2d37-c28604297333@gmail.com> Le 11/02/2019 ? 09:55, Gianluigi a ?crit?: > Hi Benoit, > In the Preferences> Projects form, two translations are missing: > Compress PNG ... and Automatic translation ... > I immediately sent the translations and made the merger request. > Have I made a mistake of communication, do I have to wait for more > translations? I haven't merged your merge request yet, so it's normal. Don't you see it in the GitLab interface? > > Is it normal to always receive from GitLab: "gambas | Pipeline #46825672 > has failed for italian-translations" ? Theoritically no, pratically yes: apparently the two ArchLinux pipelines do not work anymore. According to the error message, it seems that they rely on an image that is now missing. I can't say more, I didn't write the Gambas GitLab config file. Regards, -- Beno?t Minisini From g4mba5 at gmail.com Mon Feb 11 11:49:09 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Mon, 11 Feb 2019 11:49:09 +0100 Subject: [Gambas-user] Some comparison In-Reply-To: <0c0a3f61-7926-76d8-c825-e5fa01594550@osnanet.de> References: <0c0a3f61-7926-76d8-c825-e5fa01594550@osnanet.de> Message-ID: Le 11/02/2019 ? 11:20, Rolf-Werner Eilert a ?crit?: > Am 10.02.19 um 23:14 schrieb Beno?t Minisini: >> Number of lines of C code to implement the switch button in GTK+, >> without the comments : >> >> ?????1167 >> >> >> Number of lines of Gambas code to implement the switch button in >> Gambas, without the comments : >> >> ?????250 >> > > > Strange thing that GTK+ is so roundabout. > > The other day, I asked the author of a (very useful) program why he > didn't implement a function that saves the program's window state and > reloads it at start. He pointed me to a few links with explanations for > GTK+, and I knew why... > > Regards > Rolf > I'm aware of that to. But normally this horrible stuff is well hidden by Gambas: you just have to define the Application.Restart property the the command-line you need to restore everything at restart, and it should work with GTK! -- Beno?t Minisini From genbraga1 at gmail.com Mon Feb 11 12:05:51 2019 From: genbraga1 at gmail.com (gen braga) Date: Mon, 11 Feb 2019 09:05:51 -0200 Subject: [Gambas-user] Binding UdpSocket to specific IP In-Reply-To: <8023d457-8787-8030-8ed6-e67cbe76e38f@gmail.com> References: <8ab9220a-466c-5da9-1eff-cc652c13c851@gmail.com> <8023d457-8787-8030-8ed6-e67cbe76e38f@gmail.com> Message-ID: Hi Benoit, It works fine by now. Sorry the delay in provide the feedback. Gen. Em s?b, 12 de jan de 2019 15:27, Beno?t Minisini escreveu: > Hi, > > In commit > > https://gitlab.com/gambas/gambas/commit/23a8fbc81df4947ac00ea361d22198fc0c33f51f, > > I have added a new UdpSocket.Host property that allows to define the IP > address used by the Bind() method. > > Can you test it and tell me if it works for you? > > Le 11/01/2019 ? 02:15, Beno?t Minisini a ?crit : > > Le 10/01/2019 ? 11:11, gen braga a ?crit : > >> Hi there > >> > >> My dev station's NIC has multiple IP addresses currently assigned. Is > >> there a way to bind Gambas's UdpSocket to a specific IP? The default > >> behavior is to listen to any address (0.0.0.0) > >> > >> Thanks in advance. > >> > > > > It's something to add to the gb.net component. > > > > Something like new arguments to the Bind method: Bind(address, port) > > > > > -- > Beno?t Minisini > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From g4mba5 at gmail.com Mon Feb 11 12:08:48 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Mon, 11 Feb 2019 12:08:48 +0100 Subject: [Gambas-user] Binding UdpSocket to specific IP In-Reply-To: References: <8ab9220a-466c-5da9-1eff-cc652c13c851@gmail.com> <8023d457-8787-8030-8ed6-e67cbe76e38f@gmail.com> Message-ID: Le 11/02/2019 ? 12:05, gen braga a ?crit?: > Hi Benoit, > > It works fine by now. > > Sorry the delay in provide the feedback. > > Gen. > OK, fine. I can think about making a new release now. :-) -- Beno?t Minisini From genbraga1 at gmail.com Mon Feb 11 12:37:36 2019 From: genbraga1 at gmail.com (gen braga) Date: Mon, 11 Feb 2019 09:37:36 -0200 Subject: [Gambas-user] Binding UdpSocket to specific IP In-Reply-To: References: <8ab9220a-466c-5da9-1eff-cc652c13c851@gmail.com> <8023d457-8787-8030-8ed6-e67cbe76e38f@gmail.com> Message-ID: Just a note: "host" property doesnt appear in the component properties window in the IDE. Gen. Em seg, 11 de fev de 2019 09:10, Beno?t Minisini escreveu: > Le 11/02/2019 ? 12:05, gen braga a ?crit : > > Hi Benoit, > > > > It works fine by now. > > > > Sorry the delay in provide the feedback. > > > > Gen. > > > > OK, fine. I can think about making a new release now. :-) > > -- > 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 Mon Feb 11 13:24:01 2019 From: bagonergi at gmail.com (Gianluigi) Date: Mon, 11 Feb 2019 13:24:01 +0100 Subject: [Gambas-user] Italian translations In-Reply-To: <00df9282-f420-2830-2d37-c28604297333@gmail.com> References: <00df9282-f420-2830-2d37-c28604297333@gmail.com> Message-ID: Il giorno lun 11 feb 2019 alle ore 11:47 Beno?t Minisini ha scritto: > Le 11/02/2019 ? 09:55, Gianluigi a ?crit : > > Hi Benoit, > > In the Preferences> Projects form, two translations are missing: > > Compress PNG ... and Automatic translation ... > > I immediately sent the translations and made the merger request. > > Have I made a mistake of communication, do I have to wait for more > > translations? > > I haven't merged your merge request yet, so it's normal. Don't you see > it in the GitLab interface? > > > > > Is it normal to always receive from GitLab: "gambas | Pipeline #46825672 > > has failed for italian-translations" ? > > Theoritically no, pratically yes: apparently the two ArchLinux pipelines > do not work anymore. According to the error message, it seems that they > rely on an image that is now missing. I can't say more, I didn't write > the Gambas GitLab config file. > > Regards, > > -- > Beno?t Minisini > > OK thanks Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From bagonergi at gmail.com Mon Feb 11 13:47:05 2019 From: bagonergi at gmail.com (Gianluigi) Date: Mon, 11 Feb 2019 13:47:05 +0100 Subject: [Gambas-user] Questions on gb.report2 In-Reply-To: References: Message-ID: Il giorno lun 11 feb 2019 alle ore 10:20 Gianluigi ha scritto: > Hi Fabien, > I inserted an example on gb.report2 in the farm and I noticed that the > text on the right-most (repeatable) label is not centered. > In addition, the 4-sheet preview does not refresh and the three sheets > remain white, you need to act on the scroll to see the contents. > Are they my mistakes or do I have to report to the bugtracker? > > Regards > Gianluigi > Sorry, I was wrong to write: Not "label is not centered" but "label cannot is centered" Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From g4mba5 at gmail.com Mon Feb 11 15:34:09 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Mon, 11 Feb 2019 15:34:09 +0100 Subject: [Gambas-user] Italian translations In-Reply-To: <00df9282-f420-2830-2d37-c28604297333@gmail.com> References: <00df9282-f420-2830-2d37-c28604297333@gmail.com> Message-ID: Le 11/02/2019 ? 11:46, Beno?t Minisini a ?crit?: > Le 11/02/2019 ? 09:55, Gianluigi a ?crit?: >> Is it normal to always receive from GitLab: "gambas | Pipeline >> #46825672 has failed for italian-translations" ? > > Theoritically no, pratically yes: apparently the two ArchLinux pipelines > do not work anymore. According to the error message, it seems that they > rely on an image that is now missing. I can't say more, I didn't write > the Gambas GitLab config file. > It's fixed. It's the name of the archlinux images on the docker website that changed. -- Beno?t Minisini From bagonergi at gmail.com Mon Feb 11 15:41:48 2019 From: bagonergi at gmail.com (Gianluigi) Date: Mon, 11 Feb 2019 15:41:48 +0100 Subject: [Gambas-user] Italian translations In-Reply-To: References: <00df9282-f420-2830-2d37-c28604297333@gmail.com> Message-ID: Il giorno lun 11 feb 2019 alle ore 15:35 Beno?t Minisini ha scritto: > Le 11/02/2019 ? 11:46, Beno?t Minisini a ?crit : > > Le 11/02/2019 ? 09:55, Gianluigi a ?crit : > >> Is it normal to always receive from GitLab: "gambas | Pipeline > >> #46825672 has failed for italian-translations" ? > > > > Theoritically no, pratically yes: apparently the two ArchLinux pipelines > > do not work anymore. According to the error message, it seems that they > > rely on an image that is now missing. I can't say more, I didn't write > > the Gambas GitLab config file. > > > > It's fixed. It's the name of the archlinux images on the docker website > that changed. > > -- > Beno?t Minisini > Ok thank you so much Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From gambas.fr at gmail.com Mon Feb 11 21:45:29 2019 From: gambas.fr at gmail.com (Fabien Bodard) Date: Mon, 11 Feb 2019 21:45:29 +0100 Subject: [Gambas-user] Questions on gb.report2 In-Reply-To: References: Message-ID: to help you you can set on the open sub Report.Debug = true It show all objects borders and iner padding. In your case you forgot to set the label to expand so the label have just the size of the text. for the preview ... I have a bug ... i need to resolve it ... fast Le lun. 11 f?vr. 2019 ? 13:48, Gianluigi a ?crit : > > > > Il giorno lun 11 feb 2019 alle ore 10:20 Gianluigi ha scritto: >> >> Hi Fabien, >> I inserted an example on gb.report2 in the farm and I noticed that the text on the right-most (repeatable) label is not centered. >> In addition, the 4-sheet preview does not refresh and the three sheets remain white, you need to act on the scroll to see the contents. >> Are they my mistakes or do I have to report to the bugtracker? >> >> Regards >> Gianluigi > > > Sorry, I was wrong to write: > Not "label is not centered" but "label cannot is centered" > > Regards > Gianluigi > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- -- Fabien Bodard From bagonergi at gmail.com Mon Feb 11 22:55:25 2019 From: bagonergi at gmail.com (Gianluigi) Date: Mon, 11 Feb 2019 22:55:25 +0100 Subject: [Gambas-user] Questions on gb.report2 In-Reply-To: References: Message-ID: Il giorno lun 11 feb 2019 alle ore 21:46 Fabien Bodard ha scritto: > to help you you can set on the open sub > Report.Debug = true > It show all objects borders and iner padding. > Really useful > In your case you forgot to set the label to expand so the label have > just the size of the text. > You're right, I'm an idiot > for the preview ... I have a bug ... i need to resolve it ... fast > Fabien Bodard > I had not used this component yet, fabulous! Thank you very much! Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From genbraga1 at gmail.com Tue Feb 12 12:09:24 2019 From: genbraga1 at gmail.com (gen braga) Date: Tue, 12 Feb 2019 09:09:24 -0200 Subject: [Gambas-user] MapView "Proxy" Property override Message-ID: Hi there I'm working on GB.Map's MapView to add authenticated proxy support, and so far it's ok. Benoit suggested to replicate HttpClient interface, which has an Proxy property pointing to a virtual class intended to store proxy server parameters like User and Password. The fact is: MapView already has a Proxy property inherited from UserControl and I cant override it because of different signature. Any ideas? -------------- next part -------------- An HTML attachment was scrubbed... URL: From genbraga1 at gmail.com Tue Feb 12 15:21:07 2019 From: genbraga1 at gmail.com (gen braga) Date: Tue, 12 Feb 2019 12:21:07 -0200 Subject: [Gambas-user] MapView "Proxy" Property override In-Reply-To: References: Message-ID: Things become easier with example code :-D Attached modified sources only, from gb.map . Everything else from Git. Problem is in MapView.class, line 19: Property Read Proxy1 As Proxy should be something like: Property Read Proxy As _Proxy but I get an override error... Gen. Em ter, 12 de fev de 2019 ?s 09:09, gen braga escreveu: > Hi there > > I'm working on GB.Map's MapView to add authenticated proxy support, and so > far it's ok. > > Benoit suggested to replicate HttpClient interface, which has an Proxy > property pointing to a virtual class intended to store proxy server > parameters like User and Password. > > The fact is: MapView already has a Proxy property inherited from > UserControl and I cant override it because of different signature. > > Any ideas? > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: gb.map-3.12.90.tar.gz Type: application/gzip Size: 8150 bytes Desc: not available URL: From g4mba5 at gmail.com Tue Feb 12 15:51:18 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Tue, 12 Feb 2019 15:51:18 +0100 Subject: [Gambas-user] MapView "Proxy" Property override In-Reply-To: References: Message-ID: <50c73f47-ef3d-fe5b-d1e2-0d6700c5d13e@gmail.com> Le 12/02/2019 ? 15:21, gen braga a ?crit?: > Things become easier with example code :-D > > Attached modified sources only, from gb.map . Everything else from Git. > > Problem is in MapView.class, line 19: > > Property Read Proxy1 As Proxy > > should be something like: > > Property Read Proxy As _Proxy > > but I get an override error... > > Gen. > Ha, sorry I forgot the Proxy property inherited from UserControl... I suggest you add the Proxy property to the Map class instead. Something like that: --8<-------------------------------------------------- ' Map.class Public _Proxy as _MapProxy Property Read Proxy As _MapProxy Private Sub Proxy_Read() as _MapProxy If Not _Proxy Yhen _Proxy = New _MapProxy Return _Proxy End ' _MapProxy.class Public Auth As Integer Public Host As String Public Password As String Public Type As Integer Public User As String ' _MapLayer.class Public Sub _new(Optional CacheName As String) ... For I = 0 To $aClients.Max hClient = New HttpClient As "Client" ... With GetMap() If ._Proxy Then hClient.Proxy.Auth = ._Proxy.Auth hClient.Proxy.Host = ._Proxy.Host ' ... and so on Endif Next End --8<-------------------------------------------------- @Fabien: why do _get() and _next() return Object instead of _MapLayer? -- Beno?t Minisini From genbraga1 at gmail.com Tue Feb 12 16:25:50 2019 From: genbraga1 at gmail.com (gen braga) Date: Tue, 12 Feb 2019 13:25:50 -0200 Subject: [Gambas-user] MapView "Proxy" Property override In-Reply-To: <50c73f47-ef3d-fe5b-d1e2-0d6700c5d13e@gmail.com> References: <50c73f47-ef3d-fe5b-d1e2-0d6700c5d13e@gmail.com> Message-ID: I thought that way and even did so, but wasnt as aesthetical as i wished it to be, and wasnt comply with the default interface from HttpClient as you asked. But we cant have everything as we wish, right? At least it works :-D I'll submit it soon. Thanks again Beno?t. Em ter, 12 de fev de 2019 ?s 12:52, Beno?t Minisini escreveu: > Le 12/02/2019 ? 15:21, gen braga a ?crit : > > Things become easier with example code :-D > > > > Attached modified sources only, from gb.map . Everything else from Git. > > > > Problem is in MapView.class, line 19: > > > > Property Read Proxy1 As Proxy > > > > should be something like: > > > > Property Read Proxy As _Proxy > > > > but I get an override error... > > > > Gen. > > > > Ha, sorry I forgot the Proxy property inherited from UserControl... > > I suggest you add the Proxy property to the Map class instead. Something > like that: > > --8<-------------------------------------------------- > > ' Map.class > > Public _Proxy as _MapProxy > > Property Read Proxy As _MapProxy > > Private Sub Proxy_Read() as _MapProxy > > If Not _Proxy Yhen _Proxy = New _MapProxy > Return _Proxy > > End > > ' _MapProxy.class > > Public Auth As Integer > Public Host As String > Public Password As String > Public Type As Integer > Public User As String > > ' _MapLayer.class > > Public Sub _new(Optional CacheName As String) > > ... > > For I = 0 To $aClients.Max > hClient = New HttpClient As "Client" > ... > With GetMap() > If ._Proxy Then > hClient.Proxy.Auth = ._Proxy.Auth > hClient.Proxy.Host = ._Proxy.Host > ' ... and so on > Endif > Next > > End > > --8<-------------------------------------------------- > > @Fabien: why do _get() and _next() return Object instead of _MapLayer? > > -- > Beno?t Minisini > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rwe-sse at osnanet.de Tue Feb 12 18:31:29 2019 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Tue, 12 Feb 2019 18:31:29 +0100 Subject: [Gambas-user] Some comparison In-Reply-To: References: <0c0a3f61-7926-76d8-c825-e5fa01594550@osnanet.de> Message-ID: <49afb2fa-db5a-acd6-94fc-d9a8b123381a@osnanet.de> Am 11.02.19 um 11:49 schrieb Beno?t Minisini: > Le 11/02/2019 ? 11:20, Rolf-Werner Eilert a ?crit?: >> Am 10.02.19 um 23:14 schrieb Beno?t Minisini: >>> Number of lines of C code to implement the switch button in GTK+, >>> without the comments : >>> >>> ?????1167 >>> >>> >>> Number of lines of Gambas code to implement the switch button in >>> Gambas, without the comments : >>> >>> ?????250 >>> >> >> >> Strange thing that GTK+ is so roundabout. >> >> The other day, I asked the author of a (very useful) program why he >> didn't implement a function that saves the program's window state and >> reloads it at start. He pointed me to a few links with explanations >> for GTK+, and I knew why... >> >> Regards >> Rolf >> > > I'm aware of that to. But normally this horrible stuff is well hidden by > Gambas: you just have to define the Application.Restart property the the > command-line you need to restore everything at restart, and it should > work with GTK! > Yes, I didn't mean a Gambas program under GTK but a C++ coded project made by him. But I proposed to make the next program with Gambas :) Regards Rolf From rwe-sse at osnanet.de Tue Feb 12 18:36:52 2019 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Tue, 12 Feb 2019 18:36:52 +0100 Subject: [Gambas-user] Question: Wait-sign on start Message-ID: <8f46dd0b-8e9a-7951-cbbd-3be3544bef80@osnanet.de> Under Ubuntu Mate I don't get a Wait mouse icon when I start a Gambas program. Sometimes I am too hasty and don't doubleclick at one spot, so it doesn't start the program. But sometimes it just starts a bit more slowly, so when I'm nervous I start it twice. You know what I mean... :) Is it possible to get a Wait mouse icon on start, or is it a drawback of the interpreter which can't be changed? I know KDE has an option to set a jumping mouse on any doubleclick of some icon on the desktop, but in Mate other programs (those which are binaries) have it too. Regards Rolf From gambas.fr at gmail.com Wed Feb 13 05:24:14 2019 From: gambas.fr at gmail.com (Fabien Bodard) Date: Wed, 13 Feb 2019 05:24:14 +0100 Subject: [Gambas-user] Question: Wait-sign on start In-Reply-To: <8f46dd0b-8e9a-7951-cbbd-3be3544bef80@osnanet.de> References: <8f46dd0b-8e9a-7951-cbbd-3be3544bef80@osnanet.de> Message-ID: Hi, At the start of your program do Inc application.Busy Then when your application is loaded For exemple at the end of form.open or form.show of your main form just do Dec Application.Busy When Application.Busy is >to 0 then then the wait cursor is displayed. This way allow to have imbricated call to the waiting state Regards, Fabien Bodard Le mar. 12 f?vr. 2019 18:37, Rolf-Werner Eilert a ?crit : > Under Ubuntu Mate I don't get a Wait mouse icon when I start a Gambas > program. Sometimes I am too hasty and don't doubleclick at one spot, so > it doesn't start the program. But sometimes it just starts a bit more > slowly, so when I'm nervous I start it twice. You know what I mean... :) > > Is it possible to get a Wait mouse icon on start, or is it a drawback of > the interpreter which can't be changed? > > I know KDE has an option to set a jumping mouse on any doubleclick of > some icon on the desktop, but in Mate other programs (those which are > binaries) have it too. > > Regards > Rolf > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From georgioskalogiannis at gmail.com Wed Feb 13 11:19:53 2019 From: georgioskalogiannis at gmail.com (Georgios Kalogiannis) Date: Wed, 13 Feb 2019 12:19:53 +0200 Subject: [Gambas-user] gb.map Message-ID: Hello In an existing mapview1.map I add some cycle shapes. After this addition, is it a way to move one of the cycles in a new position ? If not, can I delete it ? (and then add a new one) Georgios ??????????? ??? ????. www.avast.com <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> -------------- next part -------------- An HTML attachment was scrubbed... URL: From chrisml at deganius.de Wed Feb 13 12:47:33 2019 From: chrisml at deganius.de (Christof Thalhofer) Date: Wed, 13 Feb 2019 12:47:33 +0100 Subject: [Gambas-user] Bounces from Gmail In-Reply-To: <20190207230328.GH10006@highrise.localdomain> References: <20190207230328.GH10006@highrise.localdomain> Message-ID: <507687ec-ac76-dd6d-f8ff-816036867686@deganius.de> Hello all, in the last time some mails we sent to gmail accounts were bounced completely randomly and unpredictably. These mails do not even reach the spam folder, but are simply not accepted by Gmail. Gmail is thus part of the group of unreliable mail providers that I cannot recommend myself. There is obviously no guarantee that a mail from our mailing list will be delivered reliably by "Google Mail". I can only speculate about why Google behaves like this. Actually, they should know exactly how to deliver mail. Maybe there is just minor interest on Googles side to support free, reliable and not walled services. So currently I can only tell people who trust Gmail accounts: You get what you paid for. If we get bounces in an excessive way, I will inform Google, they have a special labyrinth of forms to do that. But I cannot do this for every single mail which is bounced by them. In Europe, giants like Google have a duty to behave responsibly towards the community. If they refuse, the authorities will have to take care of it. And if it goes on like this, we must draw their attention to it to preserve these free services fur us in the long run. 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.fr at gmail.com Wed Feb 13 15:35:30 2019 From: gambas.fr at gmail.com (Fabien Bodard) Date: Wed, 13 Feb 2019 15:35:30 +0100 Subject: [Gambas-user] gb.map In-Reply-To: References: Message-ID: What is a cycle shape ? Le mer. 13 f?vr. 2019 11:21, Georgios Kalogiannis < georgioskalogiannis at gmail.com> a ?crit : > > Hello > > In an existing mapview1.map I add some cycle shapes. > After this addition, is it a way to move one of the cycles in a new > position ? > > If not, can I delete it ? (and then add a new one) > > Georgios > > > > > > ??????????? > ??? ????. www.avast.com > > <#m_3704120219160924148_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From genbraga1 at gmail.com Wed Feb 13 16:43:41 2019 From: genbraga1 at gmail.com (gen braga) Date: Wed, 13 Feb 2019 13:43:41 -0200 Subject: [Gambas-user] gb.map In-Reply-To: References: Message-ID: To add: MapView1.Map.AddShape("Shape1").AddCircle("Circle1", MapPoint(48.866667, 2.333333), 1000) to remove 1: MapView1.Map["Shape1"].Remove("Circle1") To clear: MapView1.Map["Shape1"].Clear but seems you cant relocate... Should be: MapView1.Map["Shape1"]["Circle1"].Center = MapPoint(0, 0) as to relocate Points it?s simply: MapView1.Map["Shape1"]["Point1"].Points = MapPoint(0, 0) Now its with Fabien. - Gen. Em qua, 13 de fev de 2019 ?s 08:21, Georgios Kalogiannis < georgioskalogiannis at gmail.com> escreveu: > > Hello > > In an existing mapview1.map I add some cycle shapes. > After this addition, is it a way to move one of the cycles in a new > position ? > > If not, can I delete it ? (and then add a new one) > > Georgios > > > > > > ??????????? > ??? ????. www.avast.com > > <#m_-113023904802154060_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gambas.fr at gmail.com Wed Feb 13 20:41:33 2019 From: gambas.fr at gmail.com (Fabien Bodard) Date: Wed, 13 Feb 2019 20:41:33 +0100 Subject: [Gambas-user] gb.map In-Reply-To: References: Message-ID: In fact for a circle you must remove it because the center property not redefine the object bounds. Le mer. 13 f?vr. 2019 16:44, gen braga a ?crit : > > To add: > > MapView1.Map.AddShape("Shape1").AddCircle("Circle1", MapPoint(48.866667, > 2.333333), 1000) > > to remove 1: > > MapView1.Map["Shape1"].Remove("Circle1") > > To clear: > > MapView1.Map["Shape1"].Clear > > but seems you cant relocate... Should be: > > MapView1.Map["Shape1"]["Circle1"].Center = MapPoint(0, 0) > > as to relocate Points it?s simply: > > MapView1.Map["Shape1"]["Point1"].Points = MapPoint(0, 0) > > Now its with Fabien. > > - > Gen. > > Em qua, 13 de fev de 2019 ?s 08:21, Georgios Kalogiannis < > georgioskalogiannis at gmail.com> escreveu: > >> >> Hello >> >> In an existing mapview1.map I add some cycle shapes. >> After this addition, is it a way to move one of the cycles in a new >> position ? >> >> If not, can I delete it ? (and then add a new one) >> >> Georgios >> >> >> >> >> >> ??????????? >> ??? ????. www.avast.com >> >> <#m_-5642674928626418060_m_-113023904802154060_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> >> >> ----[ 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 genbraga1 at gmail.com Thu Feb 14 01:20:41 2019 From: genbraga1 at gmail.com (gen braga) Date: Wed, 13 Feb 2019 22:20:41 -0200 Subject: [Gambas-user] gb.map In-Reply-To: References: Message-ID: I'm working on It and some others minor issues, If you dont mind, of course. Gen. Em qua, 13 de fev de 2019 17:42, Fabien Bodard escreveu: > In fact for a circle you must remove it because the center property not > redefine the object bounds. > > > Le mer. 13 f?vr. 2019 16:44, gen braga a ?crit : > >> >> To add: >> >> MapView1.Map.AddShape("Shape1").AddCircle("Circle1", MapPoint(48.866667, >> 2.333333), 1000) >> >> to remove 1: >> >> MapView1.Map["Shape1"].Remove("Circle1") >> >> To clear: >> >> MapView1.Map["Shape1"].Clear >> >> but seems you cant relocate... Should be: >> >> MapView1.Map["Shape1"]["Circle1"].Center = MapPoint(0, 0) >> >> as to relocate Points it?s simply: >> >> MapView1.Map["Shape1"]["Point1"].Points = MapPoint(0, 0) >> >> Now its with Fabien. >> >> - >> Gen. >> >> Em qua, 13 de fev de 2019 ?s 08:21, Georgios Kalogiannis < >> georgioskalogiannis at gmail.com> escreveu: >> >>> >>> Hello >>> >>> In an existing mapview1.map I add some cycle shapes. >>> After this addition, is it a way to move one of the cycles in a new >>> position ? >>> >>> If not, can I delete it ? (and then add a new one) >>> >>> Georgios >>> >>> >>> >>> >>> >>> ??????????? >>> ??? ????. www.avast.com >>> >>> <#m_1073363389215611736_m_-5642674928626418060_m_-113023904802154060_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> >>> >>> ----[ 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 gambas.fr at gmail.com Thu Feb 14 10:36:14 2019 From: gambas.fr at gmail.com (Fabien Bodard) Date: Thu, 14 Feb 2019 10:36:14 +0100 Subject: [Gambas-user] gb.map In-Reply-To: References: Message-ID: It's a pleasure for me to have people coming help us... Come and share ideas... code ...feature . I'm a pure GNU maker so I love sharing and learning of course :-). And also I've not so many time than in past to program things. I've begin gb.map just for a personnal need and from 0 in the geo GIS knoledge. Just because I wanted to have a dynamic map that show my vine fields with shapes. So in the same time I've done a DBase reader too because shp files was linked with DB file. that also why gb.map is made in two part. Because I wanted to have the hability to get a snapshot of a map without having to load the viewer. So the map part draw the maps and the viewer just manipulate the center and the drawing box. Then gb.map is a mess of many test of many things. Depend on my needs :-). But is one of the rare library to not use leaflet js or gmap api with a web viewer. Regards, Fabien Le jeu. 14 f?vr. 2019 ? 01:21, gen braga a ?crit : > I'm working on It and some others minor issues, If you dont mind, of > course. > > Gen. > > Em qua, 13 de fev de 2019 17:42, Fabien Bodard > escreveu: > >> In fact for a circle you must remove it because the center property not >> redefine the object bounds. >> >> >> Le mer. 13 f?vr. 2019 16:44, gen braga a ?crit : >> >>> >>> To add: >>> >>> MapView1.Map.AddShape("Shape1").AddCircle("Circle1", MapPoint(48.866667, >>> 2.333333), 1000) >>> >>> to remove 1: >>> >>> MapView1.Map["Shape1"].Remove("Circle1") >>> >>> To clear: >>> >>> MapView1.Map["Shape1"].Clear >>> >>> but seems you cant relocate... Should be: >>> >>> MapView1.Map["Shape1"]["Circle1"].Center = MapPoint(0, 0) >>> >>> as to relocate Points it?s simply: >>> >>> MapView1.Map["Shape1"]["Point1"].Points = MapPoint(0, 0) >>> >>> Now its with Fabien. >>> >>> - >>> Gen. >>> >>> Em qua, 13 de fev de 2019 ?s 08:21, Georgios Kalogiannis < >>> georgioskalogiannis at gmail.com> escreveu: >>> >>>> >>>> Hello >>>> >>>> In an existing mapview1.map I add some cycle shapes. >>>> After this addition, is it a way to move one of the cycles in a new >>>> position ? >>>> >>>> If not, can I delete it ? (and then add a new one) >>>> >>>> Georgios >>>> >>>> >>>> >>>> >>>> >>>> ??????????? >>>> ??? ????. www.avast.com >>>> >>>> <#m_-6475822657739333618_m_4961039645211242828_m_1073363389215611736_m_-5642674928626418060_m_-113023904802154060_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> >>>> >>>> ----[ 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 ]---- > -- Fabien Bodard -------------- next part -------------- An HTML attachment was scrubbed... URL: From bagonergi at gmail.com Thu Feb 14 23:41:01 2019 From: bagonergi at gmail.com (Gianluigi) Date: Thu, 14 Feb 2019 23:41:01 +0100 Subject: [Gambas-user] Create a book with gb.report2 Message-ID: I would like to write a guide to gb.report2 on the Gambas-it wiki, but I have been stuck for two days trying to format a book from a text file. I cannot get the resizing of labels or textlabel, where am I doing wrong? I attach one of my tests. Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: LoremReport-0.0.1.tar.gz Type: application/gzip Size: 92632 bytes Desc: not available URL: From mckaygerhard at gmail.com Fri Feb 15 04:07:32 2019 From: mckaygerhard at gmail.com (PICCORO McKAY Lenz) Date: Thu, 14 Feb 2019 23:07:32 -0400 Subject: [Gambas-user] currently gambas distributed packages and wiki page Message-ID: i want to ask if the wiki page http://gambaswiki.org/wiki/howto/package are correct&up-to-date ?? seems that for packaging and help on distribute the packages from debian/winbuntu and those from ppa's in many sites are very very incorrect respect those wiki directives! Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From mckaygerhard at gmail.com Fri Feb 15 04:21:43 2019 From: mckaygerhard at gmail.com (PICCORO McKAY Lenz) Date: Thu, 14 Feb 2019 23:21:43 -0400 Subject: [Gambas-user] currently gambas distributed packages and wiki page In-Reply-To: References: Message-ID: seems are some miscunderstand redactions on the wiki pacge that relies in many conflictts not only in debian, also for all "made by" packagers.. just see that wiki said that gambas3/ide depends on gambas3/form and that not depends on an y of the gui variants either qt 4/5 or gtk 2/3, so if the package ide does not depends on any of these (and subsequent depends does not depends on any of) so the ide does not run never.. due there-s no gui active provided! and many others .. maybe i cannot understand well the depends system in the table! also the runtime package said that must contain (i read carefully, said "It contains... and te following componetes") that must include qt4 or depends, "and the following" are very different from "depends on" or "relies on"... i guess qt4 components must be in the qt4 related package! also in the debian case git are provided but in many home/made and those ppa-s git was suprimed so many non-knowed users mixed the repos and then the disaster comes! Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com El jue., 14 de feb. de 2019 a la(s) 23:07, PICCORO McKAY Lenz ( mckaygerhard at gmail.com) escribi?: > i want to ask if the wiki page http://gambaswiki.org/wiki/howto/package > are correct&up-to-date ?? > > seems that for packaging and help on distribute the packages from > debian/winbuntu and those from ppa's in many sites are very very incorrect > respect those wiki directives! > > Lenz McKAY Gerardo (PICCORO) > http://qgqlochekone.blogspot.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bagonergi at gmail.com Fri Feb 15 10:19:07 2019 From: bagonergi at gmail.com (Gianluigi) Date: Fri, 15 Feb 2019 10:19:07 +0100 Subject: [Gambas-user] Create a book with gb.report2 In-Reply-To: References: Message-ID: Il giorno gio 14 feb 2019 alle ore 23:41 Gianluigi ha scritto: > I would like to write a guide to gb.report2 on the Gambas-it wiki, but I > have been stuck for two days trying to format a book from a text file. > I cannot get the resizing of labels or textlabel, where am I doing wrong? > I attach one of my tests. > > Regards > Gianluigi > The fact is that I cannot figure out if there is an automatic way to get the label wrap or the height expansion of the textlabel. Or do I have to arrange me and do it manually? Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From gambas.fr at gmail.com Fri Feb 15 11:57:24 2019 From: gambas.fr at gmail.com (Fabien Bodard) Date: Fri, 15 Feb 2019 11:57:24 +0100 Subject: [Gambas-user] Create a book with gb.report2 In-Reply-To: References: Message-ID: Report textlabel is not implemented yet Le ven. 15 f?vr. 2019 10:20, Gianluigi a ?crit : > > > Il giorno gio 14 feb 2019 alle ore 23:41 Gianluigi > ha scritto: > >> I would like to write a guide to gb.report2 on the Gambas-it wiki, but I >> have been stuck for two days trying to format a book from a text file. >> I cannot get the resizing of labels or textlabel, where am I doing wrong? >> I attach one of my tests. >> >> Regards >> Gianluigi >> > > The fact is that I cannot figure out if there is an automatic way to get > the label wrap or the height expansion of the textlabel. > Or do I have to arrange me and do it manually? > > Regards > Gianluigi > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bagonergi at gmail.com Fri Feb 15 12:59:36 2019 From: bagonergi at gmail.com (Gianluigi) Date: Fri, 15 Feb 2019 12:59:36 +0100 Subject: [Gambas-user] Create a book with gb.report2 In-Reply-To: References: Message-ID: Hi Fabien, so, if I understand correctly, we need wrap the text before inserting it into the labels, right? In the example I attached, we need insert "\n" before loading the text into the array. Regards Gianluigi Il giorno ven 15 feb 2019 alle ore 11:58 Fabien Bodard ha scritto: > > Report textlabel is not implemented yet > > > Le ven. 15 f?vr. 2019 10:20, Gianluigi a ?crit : > >> >> >> Il giorno gio 14 feb 2019 alle ore 23:41 Gianluigi >> ha scritto: >> >>> I would like to write a guide to gb.report2 on the Gambas-it wiki, but I >>> have been stuck for two days trying to format a book from a text file. >>> I cannot get the resizing of labels or textlabel, where am I doing wrong? >>> I attach one of my tests. >>> >>> Regards >>> Gianluigi >>> >> >> The fact is that I cannot figure out if there is an automatic way to get >> the label wrap or the height expansion of the textlabel. >> Or do I have to arrange me and do it manually? >> >> 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 mckaygerhard at gmail.com Fri Feb 15 13:04:07 2019 From: mckaygerhard at gmail.com (PICCORO McKAY Lenz) Date: Fri, 15 Feb 2019 08:04:07 -0400 Subject: [Gambas-user] Create a book with gb.report2 In-Reply-To: References: Message-ID: El vie., 15 de feb. de 2019 a la(s) 06:58, Fabien Bodard ( gambas.fr at gmail.com) escribi?: > > Report textlabel is not implemented yet > this it's in gb.report2 or gb.report ? and if one does not have it, the other? -------------- next part -------------- An HTML attachment was scrubbed... URL: From mckaygerhard at gmail.com Fri Feb 15 13:13:39 2019 From: mckaygerhard at gmail.com (PICCORO McKAY Lenz) Date: Fri, 15 Feb 2019 08:13:39 -0400 Subject: [Gambas-user] Bounces from Gmail In-Reply-To: <507687ec-ac76-dd6d-f8ff-816036867686@deganius.de> References: <20190207230328.GH10006@highrise.localdomain> <507687ec-ac76-dd6d-f8ff-816036867686@deganius.de> Message-ID: El mi?., 13 de feb. de 2019 a la(s) 07:48, Christof Thalhofer ( chrisml at deganius.de) escribi?: > in the last time some mails we sent to gmail accounts were bounced > completely randomly and unpredictably. These mails do not even reach the > spam folder, but are simply not accepted by Gmail. Gmail is thus part of > the group of unreliable mail providers that I cannot recommend myself. > There is obviously no guarantee that a mail from our mailing list will > be delivered reliably by "Google Mail". > I noted the same messages.. and i think one only person cannot do much.. but more than one person can do something, ... > If we get bounces in an excessive way, I will inform Google, they have a > special labyrinth of forms to do that. But I cannot do this for every > single mail which is bounced by them. > I already have an idea! we need to be more users that notify this behaviour! but seems those mails already comes in meantime! or not? > > In Europe, giants like Google have a duty to behave responsibly towards > the community. If they refuse, the authorities will have to take care of > it. And if it goes on like this, we must draw their attention to it to > preserve these free services fur us in the long run. > > Alles Gute > > Christof Thalhofer > > -- > Dies ist keine Signatur > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mckaygerhard at gmail.com Fri Feb 15 13:18:33 2019 From: mckaygerhard at gmail.com (PICCORO McKAY Lenz) Date: Fri, 15 Feb 2019 08:18:33 -0400 Subject: [Gambas-user] gb.map In-Reply-To: References: Message-ID: El jue., 14 de feb. de 2019 a la(s) 05:37, Fabien Bodard ( gambas.fr at gmail.com) escribi?: > is one of the rare library to not use leaflet js or gmap api with a web > viewer. > ..and I appreciate that! thanks dude! > > Regards, > > Fabien > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mckaygerhard at gmail.com Fri Feb 15 13:27:29 2019 From: mckaygerhard at gmail.com (PICCORO McKAY Lenz) Date: Fri, 15 Feb 2019 08:27:29 -0400 Subject: [Gambas-user] Some comparison In-Reply-To: References: Message-ID: El dom., 10 de feb. de 2019 a la(s) 18:15, Beno?t Minisini (g4mba5 at gmail.com) escribi?: > Number of lines of C code to implement the switch button in GTK+: 1167 > Number of lines of Gambas code to implement switch button Gambas: 250 > It is unbelievable the great advantage that is... sorry i mean that was programming in Gambas, but even so the programmers use too much C/C++ GTK/QT etc etc etc... maybe it is because Gambas is only done as a hobby (if I do not remember more is what was said in the past..) .. I think a change of vision is needed to help the GNU world of programming get in and make programs faster... > > -- > Beno?t Minisini > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From chrisml at deganius.de Fri Feb 15 15:15:57 2019 From: chrisml at deganius.de (Christof Thalhofer) Date: Fri, 15 Feb 2019 15:15:57 +0100 Subject: [Gambas-user] Bounces from Gmail In-Reply-To: References: <20190207230328.GH10006@highrise.localdomain> <507687ec-ac76-dd6d-f8ff-816036867686@deganius.de> Message-ID: Am 15.02.19 um 13:13 schrieb PICCORO McKAY Lenz: > I already have an idea! we need to be more users that notify this behaviour! > but seems those mails already comes in meantime! or not? In the meanwhile there were no bounces any more. I think Google read my mail and was afraid of further consequences ... ;-) Alles Gute Christof Thalhofer -- [x] nail here for new monitor From chrisml at deganius.de Fri Feb 15 15:30:42 2019 From: chrisml at deganius.de (Christof Thalhofer) Date: Fri, 15 Feb 2019 15:30:42 +0100 Subject: [Gambas-user] EU Politics: Upload-Filters Message-ID: <1efbb4f6-7789-7e52-94e9-3a6ee969ed46@deganius.de> Hi, maybe you have heard of it. The EU wants to direct providers to install upload filters. Anyone who provides public services on the internet that allow the distribution of content should be held liable for copyright infringements: https://juliareda.eu/2019/02/eu-copyright-final-text/ https://juliareda.eu/2019/02/brutal-article-13-finalise/ https://juliareda.eu/2019/02/artikel-13-endgueltig/ The Big 5 (Google, Microsoft, Apple, Facebook und Amazon) are able to do that (install upload filters), but nearly every other not. Not to mention the fact that filters allow censorship this legislative initiative would destroy the internet as we know it. For example: We would need to install an upload-filter for this mailinglist ... impossible! If you are Europeans, please ... activate your parliament member: "Our best bet: The final vote in the plenary of the European Parliament, when all 751 MEPs, directly elected to represent the people, have a vote. This will take place either between March 25 and 28, on April 4 or between April 15 and 18. We?ve already demonstrated last July that a majority against a bad copyright proposal is achievable." Thank you! Alles Gute Christof Thalhofer -- [x] nail here for new monitor From mckaygerhard at gmail.com Fri Feb 15 15:41:39 2019 From: mckaygerhard at gmail.com (PICCORO McKAY Lenz) Date: Fri, 15 Feb 2019 10:41:39 -0400 Subject: [Gambas-user] Bounces from Gmail In-Reply-To: References: <20190207230328.GH10006@highrise.localdomain> <507687ec-ac76-dd6d-f8ff-816036867686@deganius.de> Message-ID: El vie., 15 de feb. de 2019 a la(s) 10:16, Christof Thalhofer (chrisml at deganius.de) escribi?: > In the meanwhile there were no bounces any more. > I think Google read my mail and was afraid of further consequences ... ummm.. i already still have some pendings i hope sni... i, i mean, read also my mail ;-) From mckaygerhard at gmail.com Fri Feb 15 15:44:13 2019 From: mckaygerhard at gmail.com (PICCORO McKAY Lenz) Date: Fri, 15 Feb 2019 10:44:13 -0400 Subject: [Gambas-user] EU Politics: Upload-Filters In-Reply-To: <1efbb4f6-7789-7e52-94e9-3a6ee969ed46@deganius.de> References: <1efbb4f6-7789-7e52-94e9-3a6ee969ed46@deganius.de> Message-ID: more chains!!!!!!!??? we are in 2019 o in 1984? El vie., 15 de feb. de 2019 a la(s) 10:31, Christof Thalhofer (chrisml at deganius.de) escribi?: > maybe you have heard of it. The EU wants to direct providers to install > upload filters. > > If you are Europeans, please ... activate your parliament member: > > "Our best bet: The final vote in the plenary of the European Parliament, > when all 751 MEPs, directly elected to represent the people, have a > vote. This will take place either between March 25 and 28, on April 4 or > between April 15 and 18. We?ve already demonstrated last July that a > majority against a bad copyright proposal is achievable." > > Thank you! > > Alles Gute > > Christof Thalhofer > > -- > [x] nail here for new monitor > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- From valaquarus at gmail.com Fri Feb 15 15:51:14 2019 From: valaquarus at gmail.com (philippe valarcher) Date: Fri, 15 Feb 2019 15:51:14 +0100 Subject: [Gambas-user] segmentation fault (11) Message-ID: Bonjour, this function causes a segmentation error (11) and I do not understand why. Can we help? Public Function TestServeur() As Boolean 'test des param?tres de compte Dim POP1 As Pop3Client Dim rep As Boolean rep = False POP1 = New Pop3Client POP1.host = txtServer.Text POP1.User = txtUser.text POP1.Password = txtPass.text POP1.port = txtPort.text POP1.Encrypt = IIf(chkSSL.value, 1, 0) Try POP1.Open If Not Error Then POP1.Close Message.Warning(("La connexion au serveur ") & " < " & POP1.host & " > " & (" est efficiente.")) rep = True Else Message.Warning(("La connexion au serveur ") & " < " & POP1.host & " > " & (" a ?chou?e.")) rep = False Endif POP1 = Null Return rep End Cordialement. Philippe Valarcher valaquarus at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From g4mba5 at gmail.com Fri Feb 15 16:05:42 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Fri, 15 Feb 2019 16:05:42 +0100 Subject: [Gambas-user] segmentation fault (11) In-Reply-To: References: Message-ID: Le 15/02/2019 ? 15:51, philippe valarcher a ?crit?: > Bonjour, > > this function causes a segmentation error (11) and I do not understand > why. Can we help? > > Please provide an archive of a full project that reproduces the bug, and the information about your system as returned by the IDE system information menu. Regards, -- Beno?t Minisini From philippe.valarcher at free.fr Fri Feb 15 16:52:38 2019 From: philippe.valarcher at free.fr (philippe) Date: Fri, 15 Feb 2019 16:52:38 +0100 Subject: [Gambas-user] segmentation error (11) Message-ID: <5018914.g1fhsiWQLS@piloue-thinkpad-t410> Bonjour, this function causes a segmentation error (11) and I do not understand why. Can we help? Public Function TestServeur() As Boolean 'test des param?tres de compte Dim POP1 As Pop3Client Dim rep As Boolean POP1 = New Pop3Client POP1.host = txtServer.Text POP1.User = txtUser.text POP1.Password = txtPass.text POP1.port = txtPort.text POP1.Encrypt = IIf(chkSSL.value, 1, 0) Try POP1.Open If Not Error Then POP1.Close Message.Warning(("La connexion au serveur ") & " < " & POP1.host & " > " & (" est efficiente.")) rep = True Else Message.Warning(("La connexion au serveur ") & " < " & POP1.host & " > " & (" a ?chou?e.")) rep = False Endif POP1 = Null Return rep End this error happens when after returning the function we click on any tab of the Fmain.form if the data entered in the tab accounts are wrong (any) so when the pop account is either inateignable or does not exist. Here are informations about my system [System] Gambas=3.12.2 OperatingSystem=Linux Kernel=4.4.0-142-generic Architecture=x86_64 Distribution=Ubuntu 14.04.5 LTS Desktop=KDE4 Theme=Oxygen Language=fr_FR.UTF-8 Memory=3750M [Libraries] Cairo=libcairo.so.2.11301.0 Curl=libcurl.so.4.3.0 DBus=libdbus-1.so.3.7.6 GStreamer=libgstreamer-0.10.so.0.30.0 GStreamer=libgstreamer-1.0.so.0.204.0 GTK+2=libgtk-x11-2.0.so.0.2400.23 GTK+3=libgtk-3.so.0.1000.8 OpenGL=libGL.so.1.2.0 Poppler=libpoppler.so.44.0.0 QT4=libQtCore.so.4.8.6 QT5=libQt5Core.so.5.2.1 SDL=libSDL-1.2.so.0.11.4 SQLite=libsqlite3.so.0.8.6 [Environment] DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-M5hGiTFcPT DEFAULTS_PATH=/usr/share/gconf/kde-plasma.default.path DESKTOP_SESSION=kde-plasma DISPLAY=:0 GB_GUI=gb.qt4 GDMSESSION=kde-plasma GDM_LANG=fr_FR GNOME_KEYRING_CONTROL=/run/user/1000/keyring-rQaXng GNOME_KEYRING_PID= GPG_AGENT_INFO=/tmp/gpg-6qFtoB/S.gpg-agent:2622:1 GS_LIB=/.fonts GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/.gtkrc-2.0:/.kde/share/config/gtkrc-2.0 GTK_RC_FILES=/etc/gtk/gtkrc:/.gtkrc:/.kde/share/config/gtkrc HOME= IM_CONFIG_PHASE=1 INSTANCE= JOB=dbus KDE_FULL_SESSION=true KDE_MULTIHEAD=false KDE_SESSION_UID=1000 KDE_SESSION_VERSION=4 LANG=fr_FR.UTF-8 LANGUAGE=fr_FR.UTF-8 LC_ADDRESS=fr_FR.UTF-8 LC_IDENTIFICATION=fr_FR.UTF-8 LC_MEASUREMENT=fr_FR.UTF-8 LC_MONETARY=fr_FR.UTF-8 LC_NAME=fr_FR.UTF-8 LC_NUMERIC=fr_FR.UTF-8 LC_PAPER=fr_FR.UTF-8 LC_TELEPHONE=fr_FR.UTF-8 LC_TIME=fr_FR.UTF-8 LOGNAME= MANDATORY_PATH=/usr/share/gconf/kde-plasma.mandatory.path PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/ snap/bin PWD= QT_PLUGIN_PATH=/.kde/lib/kde4/plugins/:/usr/lib/kde4/plugins/ QT_QPA_PLATFORMTHEME=appmenu-qt5 SELINUX_INIT=YES SESSION=kde-plasma SESSIONTYPE= SESSION_MANAGER=local/:@/tmp/.ICE-unix/2761,unix/:/tmp/.ICE- unix/2761 SHELL=/bin/bash SHLVL=0 SSH_AUTH_SOCK=/run/user/1000/keyring-rQaXng/ssh TEXTDOMAIN=im-config TEXTDOMAINDIR=/usr/share/locale/ TZ=:/etc/localtime UPSTART_EVENTS=started xsession UPSTART_INSTANCE= UPSTART_JOB=startkde UPSTART_SESSION=unix:abstract=/com/ubuntu/upstart-session/1000/2105 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Signature.png Type: image/png Size: 19385 bytes Desc: not available URL: From chrisml at deganius.de Fri Feb 15 17:35:47 2019 From: chrisml at deganius.de (Christof Thalhofer) Date: Fri, 15 Feb 2019 17:35:47 +0100 Subject: [Gambas-user] Bounces from Gmail In-Reply-To: References: <20190207230328.GH10006@highrise.localdomain> <507687ec-ac76-dd6d-f8ff-816036867686@deganius.de> Message-ID: <459577c1-7910-a600-03bf-6ef9cc868db0@deganius.de> Am 15.02.19 um 15:41 schrieb PICCORO McKAY Lenz: > El vie., 15 de feb. de 2019 a la(s) 10:16, Christof Thalhofer > (chrisml at deganius.de) escribi?: >> In the meanwhile there were no bounces any more. >> I think Google read my mail and was afraid of further consequences ... > ummm.. i already still have some pendings i hope sni... i, i mean, > read also my mail If you see it, then this is not what I mean. We saw bounces from Google of mails which were delivered by the ML to members but never reached the account xyz at gmail.com. It looks like so, when Google bounces mail from the mailinglist: > : host gmail-smtp-in.l.google.com[64.233.184.27] > said: 550-5.7.1 [xx.xx.xx.xx 12] Our system has detected that this > message is 550-5.7.1 likely unsolicited mail. To reduce the amount of spam > sent to Gmail, 550-5.7.1 this message has been blocked. Please visit > 550-5.7.1 https://support.google.com/mail/?p=UnsolicitedMessageError 550 > 5.7.1 for more information. xxxxxxxxxxx.xxwma.2 - gsmtp (in reply to end > of DATA command) If you see something like this for your own mail you have sent, you will have to go to https://support.google.com/mail/?p=UnsolicitedMessageError and then have "much fun" with 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 mckaygerhard at gmail.com Fri Feb 15 17:46:12 2019 From: mckaygerhard at gmail.com (PICCORO McKAY Lenz) Date: Fri, 15 Feb 2019 12:46:12 -0400 Subject: [Gambas-user] Bounces from Gmail In-Reply-To: <459577c1-7910-a600-03bf-6ef9cc868db0@deganius.de> References: <20190207230328.GH10006@highrise.localdomain> <507687ec-ac76-dd6d-f8ff-816036867686@deganius.de> <459577c1-7910-a600-03bf-6ef9cc868db0@deganius.de> Message-ID: El vie., 15 de feb. de 2019 a la(s) 12:36, Christof Thalhofer ( chrisml at deganius.de) escribi?: > > : host gmail-smtp-in.l.google.com[64.233.184.27] > > said: 550-5.7.1 [xx.xx.xx.xx 12] Our system has detected that > this > > message is 550-5.7.1 likely unsolicited mail. To reduce the amount > of spam > > sent to Gmail, 550-5.7.1 this message has been blocked. Please visit > > 550-5.7.1 > https://support.google.com/mail/?p=UnsolicitedMessageError 550 > > 5.7.1 for more information. xxxxxxxxxxx.xxwma.2 - gsmtp (in reply > to end > > of DATA command) > > If you see something like this for your own mail you have sent, you will > have to go to https://support.google.com/mail/?p=UnsolicitedMessageError > and then have "much fun" with it. > I have renewed my strength to keep claiming again thanks to your mail. > Dies ist keine Signatur > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bagonergi at gmail.com Fri Feb 15 17:52:32 2019 From: bagonergi at gmail.com (Gianluigi) Date: Fri, 15 Feb 2019 17:52:32 +0100 Subject: [Gambas-user] Create a book with gb.report2 In-Reply-To: References: Message-ID: Hi Fabien, this attached, could be a solution. Unfortunately it does not work well because Report.Font.TextWidth() gives a higher result than reality. Or it's me that I have not correctly set the comparison width. Regards Gianluigi P.S. If you try to translate you get an error Il giorno ven 15 feb 2019 alle ore 12:59 Gianluigi ha scritto: > Hi Fabien, > so, if I understand correctly, we need wrap the text before inserting it > into the labels, right? > In the example I attached, we need insert "\n" before loading the text > into the array. > > Regards > Gianluigi > > Il giorno ven 15 feb 2019 alle ore 11:58 Fabien Bodard < > gambas.fr at gmail.com> ha scritto: > >> >> Report textlabel is not implemented yet >> >> >> Le ven. 15 f?vr. 2019 10:20, Gianluigi a ?crit : >> >>> >>> >>> Il giorno gio 14 feb 2019 alle ore 23:41 Gianluigi >>> ha scritto: >>> >>>> I would like to write a guide to gb.report2 on the Gambas-it wiki, but >>>> I have been stuck for two days trying to format a book from a text file. >>>> I cannot get the resizing of labels or textlabel, where am I doing >>>> wrong? >>>> I attach one of my tests. >>>> >>>> Regards >>>> Gianluigi >>>> >>> >>> The fact is that I cannot figure out if there is an automatic way to get >>> the label wrap or the height expansion of the textlabel. >>> Or do I have to arrange me and do it manually? >>> >>> 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: LoremReport-2-0.0.1.tar.gz Type: application/gzip Size: 92809 bytes Desc: not available URL: From bagonergi at gmail.com Fri Feb 15 19:45:05 2019 From: bagonergi at gmail.com (Gianluigi) Date: Fri, 15 Feb 2019 19:45:05 +0100 Subject: [Gambas-user] Create a book with gb.report2 In-Reply-To: References: Message-ID: I changed the code like that: '------------------------------------------------------------------- Report1.Font = Font["Serif, 12"] *in* Report1.Font = Font["Serif,12"] hRel.Font = Font["Serif"] *in* hRel.Font = Font["Serif,12"] '-------------------------------------------------------------------- and now *all* works well. Regards Gianluigi Il giorno ven 15 feb 2019 alle ore 17:52 Gianluigi ha scritto: > Hi Fabien, > this attached, could be a solution. > Unfortunately it does not work well because Report.Font.TextWidth() gives > a higher result than reality. > Or it's me that I have not correctly set the comparison width. > > Regards > Gianluigi > P.S. If you try to translate you get an error > > Il giorno ven 15 feb 2019 alle ore 12:59 Gianluigi > ha scritto: > >> Hi Fabien, >> so, if I understand correctly, we need wrap the text before inserting it >> into the labels, right? >> In the example I attached, we need insert "\n" before loading the text >> into the array. >> >> Regards >> Gianluigi >> >> Il giorno ven 15 feb 2019 alle ore 11:58 Fabien Bodard < >> gambas.fr at gmail.com> ha scritto: >> >>> >>> Report textlabel is not implemented yet >>> >>> >>> Le ven. 15 f?vr. 2019 10:20, Gianluigi a ?crit : >>> >>>> >>>> >>>> Il giorno gio 14 feb 2019 alle ore 23:41 Gianluigi >>>> ha scritto: >>>> >>>>> I would like to write a guide to gb.report2 on the Gambas-it wiki, but >>>>> I have been stuck for two days trying to format a book from a text file. >>>>> I cannot get the resizing of labels or textlabel, where am I doing >>>>> wrong? >>>>> I attach one of my tests. >>>>> >>>>> Regards >>>>> Gianluigi >>>>> >>>> >>>> The fact is that I cannot figure out if there is an automatic way to >>>> get the label wrap or the height expansion of the textlabel. >>>> Or do I have to arrange me and do it manually? >>>> >>>> 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 jussi.lahtinen at gmail.com Sat Feb 16 00:42:28 2019 From: jussi.lahtinen at gmail.com (Jussi Lahtinen) Date: Sat, 16 Feb 2019 01:42:28 +0200 Subject: [Gambas-user] segmentation error (11) In-Reply-To: <5018914.g1fhsiWQLS@piloue-thinkpad-t410> References: <5018914.g1fhsiWQLS@piloue-thinkpad-t410> Message-ID: Can you provide the project or small demonstration project, which reproduces the problem? Jussi On Fri, Feb 15, 2019 at 5:53 PM philippe wrote: > Bonjour, > > > > this function causes a segmentation error (11) and I do not understand why. > > Can we help? > > > > > > Public Function TestServeur() As Boolean 'test des param?tres de compte > > > > > > Dim POP1 As Pop3Client > > Dim rep As Boolean > > > > > > POP1 = New Pop3Client > > POP1.host = txtServer.Text > > POP1.User = txtUser.text > > POP1.Password = txtPass.text > > POP1.port = txtPort.text > > POP1.Encrypt = IIf(chkSSL.value, 1, 0) > > > > Try POP1.Open > > > > If Not Error Then > > POP1.Close > > Message.Warning(("La connexion au serveur ") & " < " & POP1.host & " > " & > > (" est efficiente.")) > > rep = True > > Else > > Message.Warning(("La connexion au serveur ") & " < " & POP1.host & " > " & > > (" a ?chou?e.")) > > rep = False > > Endif > > > > POP1 = Null > > Return rep > > > > End > > > > > > this error happens when after returning the function we click on any tab > of the Fmain.form if the data entered in the tab accounts are wrong (any) > so when the pop account is either inateignable or does not exist. > > > > Here are informations about my system > > > > [System] > > Gambas=3.12.2 > > OperatingSystem=Linux > > Kernel=4.4.0-142-generic > > Architecture=x86_64 > > Distribution=Ubuntu 14.04.5 LTS > > Desktop=KDE4 > > Theme=Oxygen > > Language=fr_FR.UTF-8 > > Memory=3750M > > > > [Libraries] > > Cairo=libcairo.so.2.11301.0 > > Curl=libcurl.so.4.3.0 > > DBus=libdbus-1.so.3.7.6 > > GStreamer=libgstreamer-0.10.so.0.30.0 > > GStreamer=libgstreamer-1.0.so.0.204.0 > > GTK+2=libgtk-x11-2.0.so.0.2400.23 > > GTK+3=libgtk-3.so.0.1000.8 > > OpenGL=libGL.so.1.2.0 > > Poppler=libpoppler.so.44.0.0 > > QT4=libQtCore.so.4.8.6 > > QT5=libQt5Core.so.5.2.1 > > SDL=libSDL-1.2.so.0.11.4 > > SQLite=libsqlite3.so.0.8.6 > > > > [Environment] > > DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-M5hGiTFcPT > > DEFAULTS_PATH=/usr/share/gconf/kde-plasma.default.path > > DESKTOP_SESSION=kde-plasma > > DISPLAY=:0 > > GB_GUI=gb.qt4 > > GDMSESSION=kde-plasma > > GDM_LANG=fr_FR > > GNOME_KEYRING_CONTROL=/run/user/1000/keyring-rQaXng > > GNOME_KEYRING_PID= > > GPG_AGENT_INFO=/tmp/gpg-6qFtoB/S.gpg-agent:2622:1 > > GS_LIB=/.fonts > > > GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/.gtkrc-2.0:/.kde/share/config/gtkrc-2.0 > > GTK_RC_FILES=/etc/gtk/gtkrc:/.gtkrc:/.kde/share/config/gtkrc > > HOME= > > IM_CONFIG_PHASE=1 > > INSTANCE= > > JOB=dbus > > KDE_FULL_SESSION=true > > KDE_MULTIHEAD=false > > KDE_SESSION_UID=1000 > > KDE_SESSION_VERSION=4 > > LANG=fr_FR.UTF-8 > > LANGUAGE=fr_FR.UTF-8 > > LC_ADDRESS=fr_FR.UTF-8 > > LC_IDENTIFICATION=fr_FR.UTF-8 > > LC_MEASUREMENT=fr_FR.UTF-8 > > LC_MONETARY=fr_FR.UTF-8 > > LC_NAME=fr_FR.UTF-8 > > LC_NUMERIC=fr_FR.UTF-8 > > LC_PAPER=fr_FR.UTF-8 > > LC_TELEPHONE=fr_FR.UTF-8 > > LC_TIME=fr_FR.UTF-8 > > LOGNAME= > > MANDATORY_PATH=/usr/share/gconf/kde-plasma.mandatory.path > > > PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin > > PWD= > > QT_PLUGIN_PATH=/.kde/lib/kde4/plugins/:/usr/lib/kde4/plugins/ > > QT_QPA_PLATFORMTHEME=appmenu-qt5 > > SELINUX_INIT=YES > > SESSION=kde-plasma > > SESSIONTYPE= > > > SESSION_MANAGER=local/:@/tmp/.ICE-unix/2761,unix/:/tmp/.ICE-unix/2761 > > SHELL=/bin/bash > > SHLVL=0 > > SSH_AUTH_SOCK=/run/user/1000/keyring-rQaXng/ssh > > TEXTDOMAIN=im-config > > TEXTDOMAINDIR=/usr/share/locale/ > > TZ=:/etc/localtime > > UPSTART_EVENTS=started xsession > > UPSTART_INSTANCE= > > UPSTART_JOB=startkde > > UPSTART_SESSION=unix:abstract=/com/ubuntu/upstart-session/1000/2105 > > USER= > > XAUTHORITY=/tmp/kde-/xauth-1000-_0 > > XCURSOR_SIZE=0 > > XCURSOR_THEME=oxy-zion > > XDG_CONFIG_DIRS=/etc/xdg/xdg-kde-plasma:/usr/share/upstart/xdg:/etc/xdg > > XDG_CURRENT_DESKTOP=KDE > > > XDG_DATA_DIRS=/usr/share:/usr/share/kde-plasma:/usr/local/share:/usr/share:/var/lib/snapd/desktop > > 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_ID=c1 > > XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0 > > XDG_VTNR=7 > > > > > > Je vais y arriver, Beno?t. (en fran?ais, dans le texte) > -- > > > > Cordialement Philippe Valarcher > > philippe.valarcher at free.fr > > GNU/Linux Kubuntu 14.04.05 64 Bits > > > > Unus Ex Altera > > > > ----[ 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: Signature.png Type: image/png Size: 19385 bytes Desc: not available URL: From chrisml at deganius.de Sat Feb 16 09:45:21 2019 From: chrisml at deganius.de (Christof Thalhofer) Date: Sat, 16 Feb 2019 09:45:21 +0100 Subject: [Gambas-user] segmentation error (11) In-Reply-To: References: <5018914.g1fhsiWQLS@piloue-thinkpad-t410> Message-ID: <8ee19512-5e24-c8dd-0540-4da4dea2cf10@deganius.de> Am 16.02.19 um 00:42 schrieb Jussi Lahtinen: > Can you provide the project or small demonstration project, which > reproduces the problem? Yes, a *small* project. The mailinglist just rejected a project with a size over 500 kB. 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 alarch at alarch.pw Sat Feb 16 10:01:08 2019 From: alarch at alarch.pw (Alarc'h) Date: Sat, 16 Feb 2019 10:01:08 +0100 Subject: [Gambas-user] Chiffrement en Gambas Message-ID: <20190216100108.62d54424.alarch@alarch.pw> Bonjour, je d?sirerais enregistrer des donn?es chiffr?es dans une base de donn?es. Je sais en bash utiliser par exemple OpenSSL avec l'option enc et un algorithme de chiffrement type blowfish pour chiffrer ou d?chiffrer un fichier au moyen d'une passphrase. En Gambas je ne sais pas trop par quel bout prendre la chose. Il existe bien la commande shell, mais openssl fonctionne en interactif et demande de taper la passphrase et ne sait que chiffrer qu'un fichier et sortir le r?sultat soit sur la sortie standard, soit dans un fichier. Je ne veux pas passer par un fichier. En fait je veux qu'au lancement du programme l'utilisateur saisisse sa cl? de chiffrement (passphras si l'on veut) qu'elle soit stock?e dans une variable globale le temps pendant lequel l'application tourne et que pour certaines donn?es celles-ci soient chiffr?es avec la passphrase avant d'?tre plac?e en base, soit d?chiffr?es apr?s requ?te sur la base sans intervention de l'utilisateur. Y a-t-il une solution int?gr?e en gambas ou une biblioth?que de cryptographie (hors l'interface openssl) qui puisse ?tre utilis?e ? Pour info j'ai un poste linux mint sous KDE et gambas 3.12 (donc il me semble la version stable la plus r?cente). Et juste pour rire... c'est amusant le nom gambas (almost mean basic), mais dans mes recherches sur internet je remonte dans mes filets davantage de recettes de cuisines que de renseignements sur l'informatique... m?me si cela m'a permis de d?couvrir quelques bonnes recettes de crevettes grill?es, c'est un vrai probl?me pour rechercher de la doc. -- __ __/o \_ \____ \ / \ //\ \ __/o \-//--\ \_/ \____ ___ \ | || \ |\ | _|| _||_|| From taboege at gmail.com Sat Feb 16 12:02:36 2019 From: taboege at gmail.com (Tobias Boege) Date: Sat, 16 Feb 2019 12:02:36 +0100 Subject: [Gambas-user] Chiffrement en Gambas In-Reply-To: <20190216100108.62d54424.alarch@alarch.pw> References: <20190216100108.62d54424.alarch@alarch.pw> Message-ID: <20190216110236.GC19734@highrise.localdomain> On Sat, 16 Feb 2019, Alarc'h wrote: > Bonjour, > > je d?sirerais enregistrer des donn?es chiffr?es dans une base de > donn?es. Je sais en bash utiliser par exemple OpenSSL avec l'option enc > et un algorithme de chiffrement type blowfish pour chiffrer ou > d?chiffrer un fichier au moyen d'une passphrase. > > En Gambas je ne sais pas trop par quel bout prendre la chose. Il existe > bien la commande shell, mais openssl fonctionne en interactif et > demande de taper la passphrase et ne sait que chiffrer qu'un fichier et > sortir le r?sultat soit sur la sortie standard, soit dans un fichier. > > Je ne veux pas passer par un fichier. En fait je veux qu'au lancement > du programme l'utilisateur saisisse sa cl? de chiffrement (passphras si > l'on veut) qu'elle soit stock?e dans une variable globale le temps > pendant lequel l'application tourne et que pour certaines donn?es > celles-ci soient chiffr?es avec la passphrase avant d'?tre plac?e en > base, soit d?chiffr?es apr?s requ?te sur la base sans intervention de > l'utilisateur. > > Y a-t-il une solution int?gr?e en gambas ou une biblioth?que de > cryptographie (hors l'interface openssl) qui puisse ?tre utilis?e ? > > Pour info j'ai un poste linux mint sous KDE et gambas 3.12 (donc il me > semble la version stable la plus r?cente). > > Et juste pour rire... c'est amusant le nom gambas (almost mean basic), > mais dans mes recherches sur internet je remonte dans mes > filets davantage de recettes de cuisines que de renseignements sur > l'informatique... m?me si cela m'a permis de d?couvrir quelques bonnes > recettes de crevettes grill?es, c'est un vrai probl?me pour rechercher > de la doc. > I'm quite happy that I understood this without external help years after my highschool French classes, but I can't answer in intelligible French. And this *is* an English-speaking mailing list, so you should try to do that. Yes, there is a component wrapping OpenSSL, it's called gb.openssl and you can find its documentation here: http://gambaswiki.org/wiki/comp/gb.openssl In general, visit http://gambaswiki.org/wiki/comp/ to see an overview of all Gambas components. The gb.openssl component has methods that imitate what the openssl program does when you encrypt or decrypt, so you should have an easy time, hopefully. $ openssl enc -blowfish -k "GAMBAS Almost Means BASic" -S 0123456789abcdef -md md5 -e -base64 <<<"Hello world" U2FsdGVkX18BI0VniavN7wRigSkQQjTZcdByRLIn6+g= becomes in Gambas: Print Base64$(Cipher["blowfish"].EncryptSalted("Hello world\n", "GAMBAS Almost Means BASic", "\x01\x23\x45\x67\x89\xab\xcd\xef")) U2FsdGVkX18BI0VniavN7wRigSkQQjTZcdByRLIn6+g= You can use every other cipher besides "blowfish", of course. To get a list of ciphers installed on your system (and how they are called), look at the Cipher.List property. Note a few things: - You don't normally need to specify a salt (-S in `openssl` and the optional last parameter to EncryptSalted) because one is generated for you if you don't. I just included it here to get reproducible outputs. - The `-md md5` part makes `openssl` use MD5 to derive a key from the given passphrase. Newer `openssl`s will use SHA256 for this, but again I wanted the outputs of the two commands to be same. An optional parameter should be added to the Gambas interface to specify the message digest. - Newer `openssl`s will warn you about using a deprecated key derivation function if you, like me above, don't use PBKDF2. gb.openssl is missing an option for this key derivation method. I can try to add that as well, but I don't want to be yelled at for introducing features to the component's *interface* which someone's cold war-era OpenSSL cannot satisfy (thus making the whole component uncompilable). Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From alarch at alarch.pw Sat Feb 16 12:26:16 2019 From: alarch at alarch.pw (Alarc'h) Date: Sat, 16 Feb 2019 12:26:16 +0100 Subject: [Gambas-user] Chiffrement en Gambas In-Reply-To: <20190216110236.GC19734@highrise.localdomain> References: <20190216100108.62d54424.alarch@alarch.pw> <20190216110236.GC19734@highrise.localdomain> Message-ID: <20190216122616.6a88e1fd.alarch@alarch.pw> Le Sat, 16 Feb 2019 12:02:36 +0100, Tobias Boege a ?crit : Thank you for your answer, I'm sorry but the previous list that closed was in French, and I didn't realize that the new one was an english speaking one. It seems that's exactly what I'm looking for. I should be able to do what I wanted with this component. Thank you again -- Marc __ __/o \_ \____ \ / \ //\ \ __/o \-//--\ \_/ \____ ___ \ | || \ |\ | _|| _||_|| From philippe.valarcher at free.fr Sat Feb 16 17:25:44 2019 From: philippe.valarcher at free.fr (philippe) Date: Sat, 16 Feb 2019 17:25:44 +0100 Subject: [Gambas-user] segmentation error (11) In-Reply-To: References: <5018914.g1fhsiWQLS@piloue-thinkpad-t410> Message-ID: <3679537.CGSf9RAyfd@piloue-thinkpad-t410> Le samedi 16 f?vrier 2019, 01:42:28 Jussi Lahtinen a ?crit : > Can you provide the project or small demonstration project, which > reproduces the problem? > > Jussi > > On Fri, Feb 15, 2019 at 5:53 PM philippe wrote: > > Bonjour, > > > > > > > > this function causes a segmentation error (11) and I do not understand > > why. > > > > Can we help? > > > > > > > > > > > > Public Function TestServeur() As Boolean 'test des param?tres de compte > > > > > > > > > > > > Dim POP1 As Pop3Client > > > > Dim rep As Boolean > > > > > > > > > > > > POP1 = New Pop3Client > > > > POP1.host = txtServer.Text > > > > POP1.User = txtUser.text > > > > POP1.Password = txtPass.text > > > > POP1.port = txtPort.text > > > > POP1.Encrypt = IIf(chkSSL.value, 1, 0) > > > > > > > > Try POP1.Open > > > > > > > > If Not Error Then > > > > POP1.Close > > > > Message.Warning(("La connexion au serveur ") & " < " & POP1.host & " > " & > > > > (" est efficiente.")) > > > > rep = True > > > > Else > > > > Message.Warning(("La connexion au serveur ") & " < " & POP1.host & " > " & > > > > (" a ?chou?e.")) > > > > rep = False > > > > Endif > > > > > > > > POP1 = Null > > > > Return rep > > > > > > > > End > > > > > > > > > > > > this error happens when after returning the function we click on any tab > > of the Fmain.form if the data entered in the tab accounts are wrong (any) > > so when the pop account is either inateignable or does not exist. > > > > > > > > Here are informations about my system > > > > > > > > [System] > > > > Gambas=3.12.2 > > > > OperatingSystem=Linux > > > > Kernel=4.4.0-142-generic > > > > Architecture=x86_64 > > > > Distribution=Ubuntu 14.04.5 LTS > > > > Desktop=KDE4 > > > > Theme=Oxygen > > > > Language=fr_FR.UTF-8 > > > > Memory=3750M > > > > > > > > [Libraries] > > > > Cairo=libcairo.so.2.11301.0 > > > > Curl=libcurl.so.4.3.0 > > > > DBus=libdbus-1.so.3.7.6 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Signature.png Type: image/png Size: 19385 bytes Desc: not available URL: From chrisml at deganius.de Sat Feb 16 17:50:51 2019 From: chrisml at deganius.de (Christof Thalhofer) Date: Sat, 16 Feb 2019 17:50:51 +0100 Subject: [Gambas-user] segmentation error (11) In-Reply-To: <3679537.CGSf9RAyfd@piloue-thinkpad-t410> References: <5018914.g1fhsiWQLS@piloue-thinkpad-t410> <3679537.CGSf9RAyfd@piloue-thinkpad-t410> Message-ID: Am 16.02.19 um 17:25 schrieb philippe: > By trying to make you a project that fits within your 256 kb limit, I > eliminated the frills that sound to me to see that they were the ones > causing segmentation fault (11) now I still do not understand why nor > how and how the 256 kb limit is exceeded if I send you the entire > project for you to judge on piece. Could the moderator lift this limit > for once? Ok, send it again once more please, I will accept it. But mention: The message size is multiplied by the thousands ( ;-) ) of users we have in the Gambas mailinglist and so a message like this generates a lot of traffic that we can save ourselves, if you would paste your project to sth like dropbox and just send a link to it. There are also users in countries, where traffic is not free so the size limit has its reasons. 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 philippe.valarcher at free.fr Sat Feb 16 17:58:53 2019 From: philippe.valarcher at free.fr (philippe) Date: Sat, 16 Feb 2019 17:58:53 +0100 Subject: [Gambas-user] segmentation fault Message-ID: <2119170.Nh8FtfF54k@piloue-thinkpad-t410> Here is the one that make segmentation fault: Public Sub TabStrip1_Click() 'son sur les diff?rents tab du tabstrip principal 'here is the one that provoks segmentation fault Select Case TabStrip1.Index Case 0 To 4 If tbstp.Count > 1 Then tbstp.Index = 1 ' If chkNoSon.value = False Then Module1.shade 'provoque l'erreur de segmentation End Select End I joint again the entire project for test. Thank you again very much.-- Cordialement Philippe Valarcher philippe.valarcher at free.fr GNU/Linux Kubuntu 14.04.05 64 Bits Unus Ex Altera -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Signature.png Type: image/png Size: 19385 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: CherchMail_sans_son-0.0.76.tar.gz Type: application/x-compressed-tar Size: 367138 bytes Desc: not available URL: From philippe.valarcher at free.fr Sat Feb 16 19:44:01 2019 From: philippe.valarcher at free.fr (philippe) Date: Sat, 16 Feb 2019 19:44:01 +0100 Subject: [Gambas-user] segmentation error (11) In-Reply-To: References: <5018914.g1fhsiWQLS@piloue-thinkpad-t410> <3679537.CGSf9RAyfd@piloue-thinkpad-t410> Message-ID: <4949692.SV9OU4lIUP@piloue-thinkpad-t410> Le samedi 16 f?vrier 2019, 17:50:51 Christof Thalhofer a ?crit : > if you would > paste your project to sth like dropbox and just send a link to it. I just don't know how it works but I'll try hard to make it happen. Thank you very much Guten Tag.-- Cordialement Philippe Valarcher philippe.valarcher at free.fr GNU/Linux Kubuntu 14.04.05 64 Bits Unus Ex Altera -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Signature.png Type: image/png Size: 19385 bytes Desc: not available URL: From t.lee.davidson at gmail.com Sat Feb 16 19:49:31 2019 From: t.lee.davidson at gmail.com (T Lee Davidson) Date: Sat, 16 Feb 2019 13:49:31 -0500 Subject: [Gambas-user] segmentation fault In-Reply-To: <2119170.Nh8FtfF54k@piloue-thinkpad-t410> References: <2119170.Nh8FtfF54k@piloue-thinkpad-t410> Message-ID: On 2/16/19 11:58 AM, philippe wrote: > Here is the one that make segmentation fault: > > Public Sub TabStrip1_Click() 'son sur les diff?rents tab du tabstrip principal > > 'here is the one that provoks segmentation fault > > Select Case TabStrip1.Index > > Case 0 To 4 > > If tbstp.Count > 1 Then tbstp.Index = 1 > > ' If chkNoSon.value = False Then Module1.shade 'provoque l'erreur de segmentation > > End Select > > End > > I joint again the entire project for test. > > Thank you again very much. > -- > I had to change "/usr/share/cherchmail/sons/shade.ogg" to Application.Path &/ "shade.ogg" since the former path does not exist on my system. I get no segmentation fault. ___ Lee From chrisml at deganius.de Sat Feb 16 19:57:08 2019 From: chrisml at deganius.de (Christof Thalhofer) Date: Sat, 16 Feb 2019 19:57:08 +0100 Subject: [Gambas-user] segmentation error (11) In-Reply-To: <4949692.SV9OU4lIUP@piloue-thinkpad-t410> References: <5018914.g1fhsiWQLS@piloue-thinkpad-t410> <3679537.CGSf9RAyfd@piloue-thinkpad-t410> <4949692.SV9OU4lIUP@piloue-thinkpad-t410> Message-ID: <06c16fd7-49e5-8856-6256-7a6969183acc@deganius.de> Am 16.02.19 um 19:44 schrieb philippe: > Le samedi 16 f?vrier 2019, 17:50:51 Christof Thalhofer a ?crit : > >> if you would > >> paste your project to sth like dropbox and just send a link to it. > > I just don't know how it works but I'll try hard to make it happen. > > Thank you very much Sorry for the advice to a commercial service like Dropbox. Here is a free pastebin service, which allows binary uploads, you can try it out: https://paste.c-net.org/ You can upload binaries up to 50 MB and get a link for distribution. 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 philippe.valarcher at free.fr Sat Feb 16 20:32:05 2019 From: philippe.valarcher at free.fr (philippe) Date: Sat, 16 Feb 2019 20:32:05 +0100 Subject: [Gambas-user] segmentation error (11) In-Reply-To: <06c16fd7-49e5-8856-6256-7a6969183acc@deganius.de> References: <5018914.g1fhsiWQLS@piloue-thinkpad-t410> <4949692.SV9OU4lIUP@piloue-thinkpad-t410> <06c16fd7-49e5-8856-6256-7a6969183acc@deganius.de> Message-ID: <2474606.9J7PKX6xsg@piloue-thinkpad-t410> Le samedi 16 f?vrier 2019, 19:57:08 Christof Thalhofer a ?crit : > Am 16.02.19 um 19:44 schrieb philippe: > > Le samedi 16 f?vrier 2019, 17:50:51 Christof Thalhofer a ?crit : > >> if you would > >> > >> paste your project to sth like dropbox and just send a link to it. > > > > I just don't know how it works but I'll try hard to make it happen. > > > > Thank you very much > > Sorry for the advice to a commercial service like Dropbox. > > Here is a free pastebin service, which allows binary uploads, you can > try it out: > > https://paste.c-net.org/ > > You can upload binaries up to 50 MB and get a link for distribution. > > Alles Gute > > Christof Thalhofer Here is what you ask for, hoping I have done thing right. https://paste.c-net.org/SuperiorScales Cordialement Philippe Valarcher philippe.valarcher at free.fr GNU/Linux Kubuntu 14.04.05 64 Bits Unus Ex Altera -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Signature.png Type: image/png Size: 19385 bytes Desc: not available URL: From chrisml at deganius.de Sat Feb 16 21:55:43 2019 From: chrisml at deganius.de (Christof Thalhofer) Date: Sat, 16 Feb 2019 21:55:43 +0100 Subject: [Gambas-user] segmentation error (11) In-Reply-To: <2474606.9J7PKX6xsg@piloue-thinkpad-t410> References: <5018914.g1fhsiWQLS@piloue-thinkpad-t410> <4949692.SV9OU4lIUP@piloue-thinkpad-t410> <06c16fd7-49e5-8856-6256-7a6969183acc@deganius.de> <2474606.9J7PKX6xsg@piloue-thinkpad-t410> Message-ID: Am 16.02.19 um 20:32 schrieb philippe: > Here is what you ask for, hoping I have done thing right. > > https://paste.c-net.org/SuperiorScales Yes there is it, cool! I didn't test it out. paste.c-net.org gives the binary a random name. It just has to be renamed to SuperiorScales.tar.gz by the downloader then it opens without problems. 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 philippe.valarcher at free.fr Sat Feb 16 22:24:49 2019 From: philippe.valarcher at free.fr (philippe) Date: Sat, 16 Feb 2019 22:24:49 +0100 Subject: [Gambas-user] segmentation error (11) In-Reply-To: References: <5018914.g1fhsiWQLS@piloue-thinkpad-t410> <2474606.9J7PKX6xsg@piloue-thinkpad-t410> Message-ID: <1944180.skVvX674H8@piloue-thinkpad-t410> Le samedi 16 f?vrier 2019, 21:55:43 Christof Thalhofer a ?crit : > Am 16.02.19 um 20:32 schrieb philippe: > > Here is what you ask for, hoping I have done thing right. > > > > https://paste.c-net.org/SuperiorScales > > Yes there is it, cool! I didn't test it out. paste.c-net.org gives the > binary a random name. It just has to be renamed to > > SuperiorScales.tar.gz > > by the downloader then it opens without problems. > > > Alles Gute > > Christof Thalhofer Really Thank you Christof for your guidance. Guten nach!-- Cordialement Philippe Valarcher philippe.valarcher at free.fr GNU/Linux Kubuntu 14.04.05 64 Bits Unus Ex Altera -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Signature.png Type: image/png Size: 19385 bytes Desc: not available URL: From t.lee.davidson at gmail.com Sat Feb 16 23:00:41 2019 From: t.lee.davidson at gmail.com (T Lee Davidson) Date: Sat, 16 Feb 2019 17:00:41 -0500 Subject: [Gambas-user] segmentation error (11) In-Reply-To: <06c16fd7-49e5-8856-6256-7a6969183acc@deganius.de> References: <5018914.g1fhsiWQLS@piloue-thinkpad-t410> <3679537.CGSf9RAyfd@piloue-thinkpad-t410> <4949692.SV9OU4lIUP@piloue-thinkpad-t410> <06c16fd7-49e5-8856-6256-7a6969183acc@deganius.de> Message-ID: <1e3a051f-8992-9b8c-df13-2ff6afa3d23b@gmail.com> On 2/16/19 1:57 PM, Christof Thalhofer wrote: > Sorry for the advice to a commercial service like Dropbox. The Dropbox Basic plan is free for 2 GB of storage. ___ Lee From philippe.valarcher at free.fr Sun Feb 17 09:59:55 2019 From: philippe.valarcher at free.fr (philippe) Date: Sun, 17 Feb 2019 09:59:55 +0100 Subject: [Gambas-user] segmentation fault In-Reply-To: References: <2119170.Nh8FtfF54k@piloue-thinkpad-t410> Message-ID: <2930724.KLJyGW5G5K@piloue-thinkpad-t410> Le samedi 16 f?vrier 2019, 13:49:31 T Lee Davidson a ?crit : > On 2/16/19 11:58 AM, philippe wrote: > > Here is the one that make segmentation fault: > > > > Public Sub TabStrip1_Click() 'son sur les diff?rents tab du tabstrip > > principal > > > > 'here is the one that provoks segmentation fault > > > > Select Case TabStrip1.Index > > > > Case 0 To 4 > > > > If tbstp.Count > 1 Then tbstp.Index = 1 > > > > ' If chkNoSon.value = False Then Module1.shade 'provoque l'erreur de > > segmentation > > > > End Select > > > > End > > > > I joint again the entire project for test. > > > > Thank you again very much. > > I had to change "/usr/share/cherchmail/sons/shade.ogg" to Application.Path > &/ "shade.ogg" since the former path does not exist on my system. > > I get no segmentation fault. > > > ___ > Lee > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- If you incomment the line : if chkNoSon.value=False Then Module1.shade and like in images jointed test an imaginary count then go to any tab of the tabstrip1 (the right one) then you have a segmentation error. Have a good day.-- Cordialement Philippe Valarcher philippe.valarcher at free.fr GNU/Linux Kubuntu 14.04.05 64 Bits Unus Ex Altera -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Signature.png Type: image/png Size: 19385 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Va chercher mail !_028.png Type: image/png Size: 42078 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Va chercher mail !_029.png Type: image/png Size: 56068 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Va chercher mail !_030.png Type: image/png Size: 37678 bytes Desc: not available URL: From chrisml at deganius.de Sun Feb 17 11:33:43 2019 From: chrisml at deganius.de (Christof Thalhofer) Date: Sun, 17 Feb 2019 11:33:43 +0100 Subject: [Gambas-user] segmentation error (11) In-Reply-To: <1e3a051f-8992-9b8c-df13-2ff6afa3d23b@gmail.com> References: <5018914.g1fhsiWQLS@piloue-thinkpad-t410> <3679537.CGSf9RAyfd@piloue-thinkpad-t410> <4949692.SV9OU4lIUP@piloue-thinkpad-t410> <06c16fd7-49e5-8856-6256-7a6969183acc@deganius.de> <1e3a051f-8992-9b8c-df13-2ff6afa3d23b@gmail.com> Message-ID: Am 16.02.19 um 23:00 schrieb T Lee Davidson: > The Dropbox Basic plan is free for 2 GB of storage. Yes, but one has to create an account there. So to share a simple file for short time I think a (binary) pastebin is better. 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 philippe.valarcher at free.fr Sun Feb 17 18:29:38 2019 From: philippe.valarcher at free.fr (philippe) Date: Sun, 17 Feb 2019 18:29:38 +0100 Subject: [Gambas-user] segmentation error (11) In-Reply-To: <1931436.2ctpW9MIGn@piloue-thinkpad-t410> References: <5018914.g1fhsiWQLS@piloue-thinkpad-t410> <1931436.2ctpW9MIGn@piloue-thinkpad-t410> Message-ID: <1683813.klN3KKYrXY@piloue-thinkpad-t410> Le samedi 16 f?vrier 2019, 10:16:58 philippe a ?crit : > Le samedi 16 f?vrier 2019, 01:42:28 Jussi Lahtinen a ?crit : > > Can you provide the project or small demonstration project, which > > reproduces the problem? > > > > Jussi > > > > On Fri, Feb 15, 2019 at 5:53 PM philippe wrote: > > > Bonjour, > > > > > > > > > > > > this function causes a segmentation error (11) and I do not understand > > > why. > > > > > > Can we help? > > > > > > > > > > > > > > > > > > Public Function TestServeur() As Boolean 'test des param?tres de compte > > > > > > > > > > > > > > > > > > Dim POP1 As Pop3Client > > > > > > Dim rep As Boolean > > > > > > > > > > > > > > > > > > POP1 = New Pop3Client > > > > > > POP1.host = txtServer.Text > > > > > > POP1.User = txtUser.text > > > > > > POP1.Password = txtPass.text > > > > > > POP1.port = txtPort.text > > > > > > POP1.Encrypt = IIf(chkSSL.value, 1, 0) > > > > > > > > > > > > Try POP1.Open > > > > > > > > > > > > If Not Error Then > > > > > > POP1.Close > > > > > > Message.Warning(("La connexion au serveur ") & " < " & POP1.host & " > " > > > & > > > > > > (" est efficiente.")) > > > > > > rep = True > > > > > > Else > > > > > > Message.Warning(("La connexion au serveur ") & " < " & POP1.host & " > " > > > & > > > > > > (" a ?chou?e.")) > > > > > > rep = False > > > > > > Endif > > > > > > > > > > > > POP1 = Null > > > > > > Return rep > > > > > > > > > > > > End > > > > > > > > > > > > > > > > > > this error happens when after returning the function we click on any tab > > > of the Fmain.form if the data entered in the tab accounts are wrong > > > (any) > > > so when the pop account is either inateignable or does not exist. > > > > > > > > > > > > Here are informations about my system > > > > > > > > > > > > [System] > > > > > > Gambas=3.12.2 > > > > > > OperatingSystem=Linux > > > > > > Kernel=4.4.0-142-generic > > > > > > Architecture=x86_64 > > > > > > Distribution=Ubuntu 14.04.5 LTS > > > > > > Desktop=KDE4 > > > > > > Theme=Oxygen > > > > > > Language=fr_FR.UTF-8 > > > > > > Memory=3750M > > > > > > > > > > > > [Libraries] > > > > > > Cairo=libcairo.so.2.11301.0 > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Signature.png Type: image/png Size: 19385 bytes Desc: not available URL: From bagonergi at gmail.com Mon Feb 18 22:59:20 2019 From: bagonergi at gmail.com (Gianluigi) Date: Mon, 18 Feb 2019 22:59:20 +0100 Subject: [Gambas-user] How to close a report with the code Message-ID: Hi Fabien, if an error occurs during the opening of the report, can it be closed only with Quit? Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From gambas.fr at gmail.com Tue Feb 19 08:42:15 2019 From: gambas.fr at gmail.com (Fabien Bodard) Date: Tue, 19 Feb 2019 08:42:15 +0100 Subject: [Gambas-user] How to close a report with the code In-Reply-To: References: Message-ID: No Gui programs can be closed by Quit. Quit is just for Terminal programs. What is your idea ? Le lun. 18 f?vr. 2019 ? 23:00, Gianluigi a ?crit : > > Hi Fabien, > if an error occurs during the opening of the report, can it be closed only with Quit? > > Regards > Gianluigi > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- -- Fabien Bodard From bagonergi at gmail.com Tue Feb 19 09:49:17 2019 From: bagonergi at gmail.com (Gianluigi) Date: Tue, 19 Feb 2019 09:49:17 +0100 Subject: [Gambas-user] How to close a report with the code In-Reply-To: References: Message-ID: OK, see attached project. Regards Gianluigi Il giorno mar 19 feb 2019 alle ore 08:43 Fabien Bodard ha scritto: > No Gui programs can be closed by Quit. > > Quit is just for Terminal programs. > > What is your idea ? > > > Le lun. 18 f?vr. 2019 ? 23:00, Gianluigi a ?crit : > > > > Hi Fabien, > > if an error occurs during the opening of the report, can it be closed > only with Quit? > > > > 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: LoremReport-3-0.1.1.tar.gz Type: application/gzip Size: 104417 bytes Desc: not available URL: From rwe-sse at osnanet.de Tue Feb 19 10:09:36 2019 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Tue, 19 Feb 2019 10:09:36 +0100 Subject: [Gambas-user] Question: Wait-sign on start In-Reply-To: References: <8f46dd0b-8e9a-7951-cbbd-3be3544bef80@osnanet.de> Message-ID: Thank you Fabien, good idea, but it doesn't help here. It is the time from clicking the icon to starting the program which gets no indicator. Strangely, Mate seems to know that starting a binary needs some indication to the user like "This icon was clicked". When there is a Gambas app behind, it seems not to know. So there is no reaction when double-clicking the icon, and the user wonders "has my double-click been accepted, or is Mate still waiting for something?" Then, mostly, the program pops up and confirms that the double-click was seen. But prior to this, there is no loading indicator. I just found, the Gambas IDE itself doesn't have a starting indicator. Regards Rolf Am 13.02.19 um 05:24 schrieb Fabien Bodard: > Hi, > > At the start of your program do > > Inc application.Busy > > > Then when your application is loaded > For exemple at the end of form.open or form.show of your main form just do > > Dec Application.Busy > > When Application.Busy is >to 0 then then the wait cursor is displayed. > > This way allow to have imbricated call to the waiting state > > Regards, > > Fabien Bodard > > Le mar. 12 f?vr. 2019 18:37, Rolf-Werner Eilert > a ?crit?: > > Under Ubuntu Mate I don't get a Wait mouse icon when I start a Gambas > program. Sometimes I am too hasty and don't doubleclick at one spot, so > it doesn't start the program. But sometimes it just starts a bit more > slowly, so when I'm nervous I start it twice. You know what I mean... :) > > Is it possible to get a Wait mouse icon on start, or is it a > drawback of > the interpreter which can't be changed? > > I know KDE has an option to set a jumping mouse on any doubleclick of > some icon on the desktop, but in Mate other programs (those which are > binaries) have it too. > > Regards > Rolf > > ----[ 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 Tue Feb 19 13:18:18 2019 From: bagonergi at gmail.com (Gianluigi) Date: Tue, 19 Feb 2019 13:18:18 +0100 Subject: [Gambas-user] Question: Wait-sign on start In-Reply-To: References: <8f46dd0b-8e9a-7951-cbbd-3be3544bef80@osnanet.de> Message-ID: If you don't want to open a new instance of your project: >From a code by Jussi Lahtinen: '----------------------------------------------- Public Sub Form_Open() Dim sOutput As String Dim s As String = Application.Name Exec ["pgrep", "-f", "-l", s] Wait To sOutput If Split(Trim$(sOutput), gb.NewLine).Count > 1 Then Me.Close Endif End '------------------------------------------------------- Another solution from this discussion on the Gambas-it forum [0]: '---------------------------------------------------------------------- ' The gb.settings component must be activated Private hSetting As Settings Public Sub Form_Open() Dim iPid As Integer = Application.Id Dim sPid, sSysPid As String hSetting = New Settings(User.Home &/ "myapp.conf") If (hSetting["Application/pid", 0] = 0) Then ' this is the first execution hSetting["Application/pid"] = iPid hSetting.Save Else sPid = hSetting["Application/pid"] Shell "ps aux | grep " & sPid & " | grep -wv grep | wc -l" Wait To sSysPid sSysPid = Replace(sSysPid, "\n", "") If (Val(sSysPid) > 0) Then Me.Close ' Application already active Else ' previous instance that probably has an abortion hSetting["Application/pid"] = iPid hSetting.Save Endif Endif End '------------------------------------------------------------ Regards Gianluigi [0] http://www.gambas-it.org/smf/index.php?topic=2056.0 Il giorno mar 19 feb 2019 alle ore 10:10 Rolf-Werner Eilert < rwe-sse at osnanet.de> ha scritto: > Thank you Fabien, > > good idea, but it doesn't help here. It is the time from clicking the > icon to starting the program which gets no indicator. > > Strangely, Mate seems to know that starting a binary needs some > indication to the user like "This icon was clicked". > > When there is a Gambas app behind, it seems not to know. So there is no > reaction when double-clicking the icon, and the user wonders "has my > double-click been accepted, or is Mate still waiting for something?" > > Then, mostly, the program pops up and confirms that the double-click was > seen. But prior to this, there is no loading indicator. > > I just found, the Gambas IDE itself doesn't have a starting indicator. > > Regards > Rolf > > > Am 13.02.19 um 05:24 schrieb Fabien Bodard: > > Hi, > > > > At the start of your program do > > > > Inc application.Busy > > > > > > Then when your application is loaded > > For exemple at the end of form.open or form.show of your main form just > do > > > > Dec Application.Busy > > > > When Application.Busy is >to 0 then then the wait cursor is displayed. > > > > This way allow to have imbricated call to the waiting state > > > > Regards, > > > > Fabien Bodard > > > > Le mar. 12 f?vr. 2019 18:37, Rolf-Werner Eilert > > a ?crit : > > > > Under Ubuntu Mate I don't get a Wait mouse icon when I start a Gambas > > program. Sometimes I am too hasty and don't doubleclick at one spot, > so > > it doesn't start the program. But sometimes it just starts a bit more > > slowly, so when I'm nervous I start it twice. You know what I > mean... :) > > > > Is it possible to get a Wait mouse icon on start, or is it a > > drawback of > > the interpreter which can't be changed? > > > > I know KDE has an option to set a jumping mouse on any doubleclick of > > some icon on the desktop, but in Mate other programs (those which are > > binaries) have it too. > > > > 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 ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rwe-sse at osnanet.de Tue Feb 19 15:44:00 2019 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Tue, 19 Feb 2019 15:44:00 +0100 Subject: [Gambas-user] Question: Wait-sign on start In-Reply-To: References: <8f46dd0b-8e9a-7951-cbbd-3be3544bef80@osnanet.de> Message-ID: Hi Gianluigi, yes, I know this code, it's part of my Gambas programs. But it has nothing to do with this problem here. Or do I oversee anything? Regards Rolf Am 19.02.19 um 13:18 schrieb Gianluigi: > If you don't want to open a new instance of your project: > > From a code by Jussi Lahtinen: > '----------------------------------------------- > Public Sub Form_Open() > > ? Dim sOutput As String > ? Dim s As String = Application.Name > > ? Exec ["pgrep", "-f", "-l", s] Wait To sOutput > > ? If Split(Trim$(sOutput), gb.NewLine).Count > 1 Then > ??? Me.Close > ? Endif > > End > '------------------------------------------------------- > > Another solution from this discussion on the Gambas-it forum [0]: > > '---------------------------------------------------------------------- > ' The gb.settings component must be activated > Private hSetting As Settings > > Public Sub Form_Open() > > ? Dim iPid As Integer = Application.Id > ? Dim sPid, sSysPid As String > > ? hSetting = New Settings(User.Home &/ "myapp.conf") > ? If (hSetting["Application/pid", 0] = 0) Then > ??? ' this is the first execution > ??? hSetting["Application/pid"] = iPid > ??? hSetting.Save > ? Else > ??? sPid = hSetting["Application/pid"] > ??? Shell "ps aux | grep " & sPid & "? | grep -wv grep | wc -l" Wait To > sSysPid > ??? sSysPid = Replace(sSysPid, "\n", "") > ??? If (Val(sSysPid) > 0) Then > ????? Me.Close ' Application already active > ??? Else > ????? ' previous instance that probably has an abortion > ????? hSetting["Application/pid"] = iPid > ????? hSetting.Save > ??? Endif > ? Endif > > End > '------------------------------------------------------------ > Regards > Gianluigi > > [0] http://www.gambas-it.org/smf/index.php?topic=2056.0 > > Il giorno mar 19 feb 2019 alle ore 10:10 Rolf-Werner Eilert > > ha scritto: > > Thank you Fabien, > > good idea, but it doesn't help here. It is the time from clicking the > icon to starting the program which gets no indicator. > > Strangely, Mate seems to know that starting a binary needs some > indication to the user like "This icon was clicked". > > When there is a Gambas app behind, it seems not to know. So there is no > reaction when double-clicking the icon, and the user wonders "has my > double-click been accepted, or is Mate still waiting for something?" > > Then, mostly, the program pops up and confirms that the double-click > was > seen. But prior to this, there is no loading indicator. > > I just found, the Gambas IDE itself doesn't have a starting indicator. > > Regards > Rolf > > > Am 13.02.19 um 05:24 schrieb Fabien Bodard: > > Hi, > > > > At the start of your program do > > > > Inc application.Busy > > > > > > Then when your application is loaded > > For exemple at the end of form.open or form.show of your main > form just do > > > > Dec Application.Busy > > > > When Application.Busy is >to 0 then then the wait cursor is > displayed. > > > > This way allow to have imbricated call to the waiting state > > > > Regards, > > > > Fabien Bodard > > > > Le mar. 12 f?vr. 2019 18:37, Rolf-Werner Eilert > > > >> a ?crit?: > > > >? ? ?Under Ubuntu Mate I don't get a Wait mouse icon when I start > a Gambas > >? ? ?program. Sometimes I am too hasty and don't doubleclick at > one spot, so > >? ? ?it doesn't start the program. But sometimes it just starts a > bit more > >? ? ?slowly, so when I'm nervous I start it twice. You know what I > mean... :) > > > >? ? ?Is it possible to get a Wait mouse icon on start, or is it a > >? ? ?drawback of > >? ? ?the interpreter which can't be changed? > > > >? ? ?I know KDE has an option to set a jumping mouse on any > doubleclick of > >? ? ?some icon on the desktop, but in Mate other programs (those > which are > >? ? ?binaries) have it too. > > > >? ? ?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 jussi.lahtinen at gmail.com Tue Feb 19 15:51:12 2019 From: jussi.lahtinen at gmail.com (Jussi Lahtinen) Date: Tue, 19 Feb 2019 16:51:12 +0200 Subject: [Gambas-user] How to close a report with the code In-Reply-To: References: Message-ID: Why? I think in case of fatal error Quit is perfectly fine. I would first display error message and then give quit with error code. Jussi On Tue, Feb 19, 2019 at 9:43 AM Fabien Bodard wrote: > No Gui programs can be closed by Quit. > > Quit is just for Terminal programs. > > What is your idea ? > > > Le lun. 18 f?vr. 2019 ? 23:00, Gianluigi a ?crit : > > > > Hi Fabien, > > if an error occurs during the opening of the report, can it be closed > only with Quit? > > > > 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 g4mba5 at gmail.com Tue Feb 19 16:15:04 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Tue, 19 Feb 2019 16:15:04 +0100 Subject: [Gambas-user] Question: Wait-sign on start In-Reply-To: <8f46dd0b-8e9a-7951-cbbd-3be3544bef80@osnanet.de> References: <8f46dd0b-8e9a-7951-cbbd-3be3544bef80@osnanet.de> Message-ID: <46c204b4-62c2-a175-35af-2fe34721f257@gmail.com> Le 12/02/2019 ? 18:36, Rolf-Werner Eilert a ?crit?: > Under Ubuntu Mate I don't get a Wait mouse icon when I start a Gambas > program. Sometimes I am too hasty and don't doubleclick at one spot, so > it doesn't start the program. But sometimes it just starts a bit more > slowly, so when I'm nervous I start it twice. You know what I mean... :) > > Is it possible to get a Wait mouse icon on start, or is it a drawback of > the interpreter which can't be changed? > > I know KDE has an option to set a jumping mouse on any doubleclick of > some icon on the desktop, but in Mate other programs (those which are > binaries) have it too. > > Regards > Rolf > The "wait mouse icon" is managed by your desktop. Running Gambas on KDE displays it for example (it's a wait mouse icon and a fake taskbar entry with a rolling animation). This wait mouse icon is based on some tricks done by the desktop. I guess that the desktop displays the wait mouse icon until the first application appears. But I don't know why it does not work with Mate. Here is an assumption: Mate thinks that the Gambas program is a console program, and so does not display any wait icon. Another assumption: Mate waits for a DBus registration, and Gambas does not register to the DBus bus. Can you try to make an icon for a console program on Mate, and see if you have the wait mouse icon? -- Beno?t Minisini From rwe-sse at osnanet.de Tue Feb 19 16:34:33 2019 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Tue, 19 Feb 2019 16:34:33 +0100 Subject: [Gambas-user] Question: Wait-sign on start In-Reply-To: <46c204b4-62c2-a175-35af-2fe34721f257@gmail.com> References: <8f46dd0b-8e9a-7951-cbbd-3be3544bef80@osnanet.de> <46c204b4-62c2-a175-35af-2fe34721f257@gmail.com> Message-ID: <81f8b3d4-6c35-7804-4736-fc571fe4772b@osnanet.de> Am 19.02.19 um 16:15 schrieb Beno?t Minisini: > Le 12/02/2019 ? 18:36, Rolf-Werner Eilert a ?crit?: >> Under Ubuntu Mate I don't get a Wait mouse icon when I start a Gambas >> program. Sometimes I am too hasty and don't doubleclick at one spot, >> so it doesn't start the program. But sometimes it just starts a bit >> more slowly, so when I'm nervous I start it twice. You know what I >> mean... :) >> >> Is it possible to get a Wait mouse icon on start, or is it a drawback >> of the interpreter which can't be changed? >> >> I know KDE has an option to set a jumping mouse on any doubleclick of >> some icon on the desktop, but in Mate other programs (those which are >> binaries) have it too. >> >> Regards >> Rolf >> > > The "wait mouse icon" is managed by your desktop. Running Gambas on KDE > displays it for example (it's a wait mouse icon and a fake taskbar entry > with a rolling animation). > > This wait mouse icon is based on some tricks done by the desktop. > > I guess that the desktop displays the wait mouse icon until the first > application appears. > > But I don't know why it does not work with Mate. > > Here is an assumption: Mate thinks that the Gambas program is a console > program, and so does not display any wait icon. > > Another assumption: Mate waits for a DBus registration, and Gambas does > not register to the DBus bus. > > Can you try to make an icon for a console program on Mate, and see if > you have the wait mouse icon? > What console program would give a reaction on the desktop so I can check? Hm... Give me an idea please But you might be right, I have a program here that runs with Java, and it doesn't produce a wait mouse icon too. As it is rather slow on start, this is especially annoying as you don't know if it starts or simply ignores you. Regards Rolf From g4mba5 at gmail.com Tue Feb 19 17:09:17 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Tue, 19 Feb 2019 17:09:17 +0100 Subject: [Gambas-user] Question: Wait-sign on start In-Reply-To: <81f8b3d4-6c35-7804-4736-fc571fe4772b@osnanet.de> References: <8f46dd0b-8e9a-7951-cbbd-3be3544bef80@osnanet.de> <46c204b4-62c2-a175-35af-2fe34721f257@gmail.com> <81f8b3d4-6c35-7804-4736-fc571fe4772b@osnanet.de> Message-ID: Le 19/02/2019 ? 16:34, Rolf-Werner Eilert a ?crit?: > > What console program would give a reaction on the desktop so I can > check? Hm... Give me an idea please > > But you might be right, I have a program here that runs with Java, and > it doesn't produce a wait mouse icon too. As it is rather slow on start, > this is especially annoying as you don't know if it starts or simply > ignores you. > > Regards > Rolf > Run that shell script: #!/bin/bash sleep 5 notify-send "Hello there!" -- Beno?t Minisini From bagonergi at gmail.com Tue Feb 19 17:22:11 2019 From: bagonergi at gmail.com (Gianluigi) Date: Tue, 19 Feb 2019 17:22:11 +0100 Subject: [Gambas-user] Question: Wait-sign on start In-Reply-To: References: <8f46dd0b-8e9a-7951-cbbd-3be3544bef80@osnanet.de> Message-ID: Here it seems to work properly, see attached image. Have you created the desktop file correctly and entered it in .local/share/applications? Regards Gianluigi Il giorno mar 19 feb 2019 alle ore 15:45 Rolf-Werner Eilert < rwe-sse at osnanet.de> ha scritto: > Hi Gianluigi, > > yes, I know this code, it's part of my Gambas programs. > > But it has nothing to do with this problem here. Or do I oversee anything? > > Regards > Rolf > > > Am 19.02.19 um 13:18 schrieb Gianluigi: > > If you don't want to open a new instance of your project: > > > > From a code by Jussi Lahtinen: > > '----------------------------------------------- > > Public Sub Form_Open() > > > > Dim sOutput As String > > Dim s As String = Application.Name > > > > Exec ["pgrep", "-f", "-l", s] Wait To sOutput > > > > If Split(Trim$(sOutput), gb.NewLine).Count > 1 Then > > Me.Close > > Endif > > > > End > > '------------------------------------------------------- > > > > Another solution from this discussion on the Gambas-it forum [0]: > > > > '---------------------------------------------------------------------- > > ' The gb.settings component must be activated > > Private hSetting As Settings > > > > Public Sub Form_Open() > > > > Dim iPid As Integer = Application.Id > > Dim sPid, sSysPid As String > > > > hSetting = New Settings(User.Home &/ "myapp.conf") > > If (hSetting["Application/pid", 0] = 0) Then > > ' this is the first execution > > hSetting["Application/pid"] = iPid > > hSetting.Save > > Else > > sPid = hSetting["Application/pid"] > > Shell "ps aux | grep " & sPid & " | grep -wv grep | wc -l" Wait To > > sSysPid > > sSysPid = Replace(sSysPid, "\n", "") > > If (Val(sSysPid) > 0) Then > > Me.Close ' Application already active > > Else > > ' previous instance that probably has an abortion > > hSetting["Application/pid"] = iPid > > hSetting.Save > > Endif > > Endif > > > > End > > '------------------------------------------------------------ > > Regards > > Gianluigi > > > > [0] http://www.gambas-it.org/smf/index.php?topic=2056.0 > > > > Il giorno mar 19 feb 2019 alle ore 10:10 Rolf-Werner Eilert > > > ha scritto: > > > > Thank you Fabien, > > > > good idea, but it doesn't help here. It is the time from clicking the > > icon to starting the program which gets no indicator. > > > > Strangely, Mate seems to know that starting a binary needs some > > indication to the user like "This icon was clicked". > > > > When there is a Gambas app behind, it seems not to know. So there is > no > > reaction when double-clicking the icon, and the user wonders "has my > > double-click been accepted, or is Mate still waiting for something?" > > > > Then, mostly, the program pops up and confirms that the double-click > > was > > seen. But prior to this, there is no loading indicator. > > > > I just found, the Gambas IDE itself doesn't have a starting > indicator. > > > > Regards > > Rolf > > > > > > Am 13.02.19 um 05:24 schrieb Fabien Bodard: > > > Hi, > > > > > > At the start of your program do > > > > > > Inc application.Busy > > > > > > > > > Then when your application is loaded > > > For exemple at the end of form.open or form.show of your main > > form just do > > > > > > Dec Application.Busy > > > > > > When Application.Busy is >to 0 then then the wait cursor is > > displayed. > > > > > > This way allow to have imbricated call to the waiting state > > > > > > Regards, > > > > > > Fabien Bodard > > > > > > Le mar. 12 f?vr. 2019 18:37, Rolf-Werner Eilert > > > > > >> a > ?crit : > > > > > > Under Ubuntu Mate I don't get a Wait mouse icon when I start > > a Gambas > > > program. Sometimes I am too hasty and don't doubleclick at > > one spot, so > > > it doesn't start the program. But sometimes it just starts a > > bit more > > > slowly, so when I'm nervous I start it twice. You know what I > > mean... :) > > > > > > Is it possible to get a Wait mouse icon on start, or is it a > > > drawback of > > > the interpreter which can't be changed? > > > > > > I know KDE has an option to set a jumping mouse on any > > doubleclick of > > > some icon on the desktop, but in Mate other programs (those > > which are > > > binaries) have it too. > > > > > > 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: wait-test.png Type: image/png Size: 14067 bytes Desc: not available URL: From gambas.fr at gmail.com Tue Feb 19 21:07:31 2019 From: gambas.fr at gmail.com (Fabien Bodard) Date: Tue, 19 Feb 2019 21:07:31 +0100 Subject: [Gambas-user] How to close a report with the code In-Reply-To: References: Message-ID: just for info : You have already : Report.UnitTo(Value, "cm","in") Report.UnitToInch(Value,"cm") and Report.AllowedUnits that return supported units as string array Thy must be used in your case as Me.UnitTo(.... To get correct conversion with the current used device as the desktop resolution is not the same as printer one. It is important in the case of conversion from unity to pixel for example. Regards Le mar. 19 f?vr. 2019 ? 15:52, Jussi Lahtinen a ?crit : > > Why? > I think in case of fatal error Quit is perfectly fine. I would first display error message and then give quit with error code. > > > Jussi > > On Tue, Feb 19, 2019 at 9:43 AM Fabien Bodard wrote: >> >> No Gui programs can be closed by Quit. >> >> Quit is just for Terminal programs. >> >> What is your idea ? >> >> >> Le lun. 18 f?vr. 2019 ? 23:00, Gianluigi a ?crit : >> > >> > Hi Fabien, >> > if an error occurs during the opening of the report, can it be closed only with Quit? >> > >> > Regards >> > Gianluigi >> > >> > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- >> >> >> >> -- >> Fabien Bodard >> >> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- -- Fabien Bodard From bagonergi at gmail.com Wed Feb 20 09:44:46 2019 From: bagonergi at gmail.com (Gianluigi) Date: Wed, 20 Feb 2019 09:44:46 +0100 Subject: [Gambas-user] How to close a report with the code In-Reply-To: References: Message-ID: Hi Fabien, if you received yesterday my email [0] with the project attached, you will have seen that I did something similar to what you wrote. Not knowing how to use the inches I converted everything in millimeters. Now I will try to use what you have suggested using the inches of internal functions. In your opinion, is a correct strategy to calculate the height of the textlabel for each paragraph based on the width of the sentences and then their number? I remind you the other question: How can you stop the opening of the preview in case of error? Regards Gianluigi [0] https://lists.gambas-basic.org/pipermail/user/2019-February/066496.html Il giorno mar 19 feb 2019 alle ore 21:08 Fabien Bodard ha scritto: > just for info : > > You have already : > > Report.UnitTo(Value, "cm","in") > Report.UnitToInch(Value,"cm") > and > Report.AllowedUnits that return supported units as string array > > Thy must be used in your case as > > Me.UnitTo(.... > To get correct conversion with the current used device as the desktop > resolution is not the same as printer one. > > It is important in the case of conversion from unity to pixel for example. > > Regards > > > > > > Le mar. 19 f?vr. 2019 ? 15:52, Jussi Lahtinen > a ?crit : > > > > Why? > > I think in case of fatal error Quit is perfectly fine. I would first > display error message and then give quit with error code. > > > > > > Jussi > > > > On Tue, Feb 19, 2019 at 9:43 AM Fabien Bodard > wrote: > >> > >> No Gui programs can be closed by Quit. > >> > >> Quit is just for Terminal programs. > >> > >> What is your idea ? > >> > >> > >> Le lun. 18 f?vr. 2019 ? 23:00, Gianluigi a ?crit > : > >> > > >> > Hi Fabien, > >> > if an error occurs during the opening of the report, can it be closed > only with Quit? > >> > > >> > Regards > >> > Gianluigi > >> > > >> > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net > ]---- > >> > >> > >> > >> -- > >> Fabien Bodard > >> > >> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net > ]---- > > > > > > ----[ 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 adamnt42 at gmail.com Wed Feb 20 10:02:26 2019 From: adamnt42 at gmail.com (Bruce) Date: Wed, 20 Feb 2019 19:32:26 +1030 Subject: [Gambas-user] Question: Wait-sign on start In-Reply-To: References: <8f46dd0b-8e9a-7951-cbbd-3be3544bef80@osnanet.de> <46c204b4-62c2-a175-35af-2fe34721f257@gmail.com> <81f8b3d4-6c35-7804-4736-fc571fe4772b@osnanet.de> Message-ID: <6ef9605a-c9dc-92ef-810f-aeab6fc92dfe@gmail.com> In Mate (if you are trying to start the program from a desktop icon or a menu item then) the [Desktop Entry] StartupNotify=true entry in the .desktop file will add a totally annoying entry in the taskbar telling you that the program is starting. I know this because: a) it persists "long" after the program has started and the gui is ready to use and b) I have spent months trying to get rid of it. hth b On 20/2/19 2:39 am, Beno?t Minisini wrote: > Le 19/02/2019 ? 16:34, Rolf-Werner Eilert a ?crit?: >> >> What console program would give a reaction on the desktop so I can >> check? Hm... Give me an idea please >> >> But you might be right, I have a program here that runs with Java, and >> it doesn't produce a wait mouse icon too. As it is rather slow on >> start, this is especially annoying as you don't know if it starts or >> simply ignores you. >> >> Regards >> Rolf >> > > Run that shell script: > > #!/bin/bash > sleep 5 > notify-send "Hello there!" > From mckaygerhard at gmail.com Wed Feb 20 10:39:44 2019 From: mckaygerhard at gmail.com (PICCORO McKAY Lenz) Date: Wed, 20 Feb 2019 05:09:44 -0430 Subject: [Gambas-user] How to close a report with the code In-Reply-To: References: Message-ID: 2019-02-19 3:12 GMT-04:30, Fabien Bodard : > No Gui programs can be closed by Quit. err Quit are not for gui, so only "Close" > Quit is just for Terminal programs. so then something that works for both? i mean i have a programs that can be lauched at terminal or as gui! just for curious!? > > What is your idea ? > > > Le lun. 18 f?vr. 2019 ? 23:00, Gianluigi a ?crit : >> >> Hi Fabien, >> if an error occurs during the opening of the report, can it be closed only >> with Quit? >> >> Regards >> Gianluigi >> >> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > > > > -- > Fabien Bodard > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -- Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com From rwe-sse at osnanet.de Wed Feb 20 11:21:25 2019 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Wed, 20 Feb 2019 11:21:25 +0100 Subject: [Gambas-user] Question: Wait-sign on start In-Reply-To: <6ef9605a-c9dc-92ef-810f-aeab6fc92dfe@gmail.com> References: <8f46dd0b-8e9a-7951-cbbd-3be3544bef80@osnanet.de> <46c204b4-62c2-a175-35af-2fe34721f257@gmail.com> <81f8b3d4-6c35-7804-4736-fc571fe4772b@osnanet.de> <6ef9605a-c9dc-92ef-810f-aeab6fc92dfe@gmail.com> Message-ID: <40fce017-597e-85d0-603f-641cc5e624d4@osnanet.de> Thank you Bruce, but on my desktop, this has no effect. I tried it with the Gambas icon, because Gambas will take some three seconds to start. No reaction, even after a re-login. Regards Rolf Am 20.02.19 um 10:02 schrieb Bruce: > In Mate (if you are trying to start the program from a desktop icon or a > menu item then) the > ????[Desktop Entry] > ????StartupNotify=true > entry in the .desktop file will add a totally annoying entry in the > taskbar telling you that the program is starting. > I know this because: > a) it persists "long" after the program has started and the gui is ready > to use and > b) I have spent months trying to get rid of it. > > hth > b > > On 20/2/19 2:39 am, Beno?t Minisini wrote: >> Le 19/02/2019 ? 16:34, Rolf-Werner Eilert a ?crit?: >>> >>> What console program would give a reaction on the desktop so I can >>> check? Hm... Give me an idea please >>> >>> But you might be right, I have a program here that runs with Java, >>> and it doesn't produce a wait mouse icon too. As it is rather slow on >>> start, this is especially annoying as you don't know if it starts or >>> simply ignores you. >>> >>> Regards >>> Rolf >>> >> >> Run that shell script: >> >> #!/bin/bash >> sleep 5 >> notify-send "Hello there!" >> > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > > From g4mba5 at gmail.com Wed Feb 20 11:25:47 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Wed, 20 Feb 2019 11:25:47 +0100 Subject: [Gambas-user] Question: Wait-sign on start In-Reply-To: <40fce017-597e-85d0-603f-641cc5e624d4@osnanet.de> References: <8f46dd0b-8e9a-7951-cbbd-3be3544bef80@osnanet.de> <46c204b4-62c2-a175-35af-2fe34721f257@gmail.com> <81f8b3d4-6c35-7804-4736-fc571fe4772b@osnanet.de> <6ef9605a-c9dc-92ef-810f-aeab6fc92dfe@gmail.com> <40fce017-597e-85d0-603f-641cc5e624d4@osnanet.de> Message-ID: <910ffaae-4141-508f-21d1-ebb1fdced1ee@gmail.com> Le 20/02/2019 ? 11:21, Rolf-Werner Eilert a ?crit?: > Thank you Bruce, > > but on my desktop, this has no effect. I tried it with the Gambas icon, > because Gambas will take some three seconds to start. No reaction, even > after a re-login. > > Regards > Rolf > By the way, you can deactivate the JIT compiler, and it should be faster to start. Regards, -- Beno?t Minisini From rwe-sse at osnanet.de Wed Feb 20 12:02:56 2019 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Wed, 20 Feb 2019 12:02:56 +0100 Subject: [Gambas-user] Question: Wait-sign on start In-Reply-To: References: <8f46dd0b-8e9a-7951-cbbd-3be3544bef80@osnanet.de> Message-ID: <64cf5753-9295-f676-0975-282d958c5e35@osnanet.de> Well, I right-clicked on the desktop and chose "Create a starter..." (or whatever it is in English). This makes an icon, and for most of the programs this runs with notification. Only Wine has a list of the desktop files in .local/share/applications. Regards Rolf Am 19.02.19 um 17:22 schrieb Gianluigi: > Here it seems to work properly, see attached image. > Have you created the desktop file correctly and entered it in > .local/share/applications? > > Regards > Gianluigi > > Il giorno mar 19 feb 2019 alle ore 15:45 Rolf-Werner Eilert > > ha scritto: > > Hi Gianluigi, > > yes, I know this code, it's part of my Gambas programs. > > But it has nothing to do with this problem here. Or do I oversee > anything? > > Regards > Rolf > > > Am 19.02.19 um 13:18 schrieb Gianluigi: > > If you don't want to open a new instance of your project: > > > >? From a code by Jussi Lahtinen: > > '----------------------------------------------- > > Public Sub Form_Open() > > > >? ? Dim sOutput As String > >? ? Dim s As String = Application.Name > > > >? ? Exec ["pgrep", "-f", "-l", s] Wait To sOutput > > > >? ? If Split(Trim$(sOutput), gb.NewLine).Count > 1 Then > >? ??? Me.Close > >? ? Endif > > > > End > > '------------------------------------------------------- > > > > Another solution from this discussion on the Gambas-it forum [0]: > > > > > '---------------------------------------------------------------------- > > ' The gb.settings component must be activated > > Private hSetting As Settings > > > > Public Sub Form_Open() > > > >? ? Dim iPid As Integer = Application.Id > >? ? Dim sPid, sSysPid As String > > > >? ? hSetting = New Settings(User.Home &/ "myapp.conf") > >? ? If (hSetting["Application/pid", 0] = 0) Then > >? ??? ' this is the first execution > >? ??? hSetting["Application/pid"] = iPid > >? ??? hSetting.Save > >? ? Else > >? ??? sPid = hSetting["Application/pid"] > >? ??? Shell "ps aux | grep " & sPid & "? | grep -wv grep | wc -l" > Wait To > > sSysPid > >? ??? sSysPid = Replace(sSysPid, "\n", "") > >? ??? If (Val(sSysPid) > 0) Then > >? ????? Me.Close ' Application already active > >? ??? Else > >? ????? ' previous instance that probably has an abortion > >? ????? hSetting["Application/pid"] = iPid > >? ????? hSetting.Save > >? ??? Endif > >? ? Endif > > > > End > > '------------------------------------------------------------ > > Regards > > Gianluigi > > > > [0] http://www.gambas-it.org/smf/index.php?topic=2056.0 > > > > Il giorno mar 19 feb 2019 alle ore 10:10 Rolf-Werner Eilert > > > >> ha scritto: > > > >? ? ?Thank you Fabien, > > > >? ? ?good idea, but it doesn't help here. It is the time from > clicking the > >? ? ?icon to starting the program which gets no indicator. > > > >? ? ?Strangely, Mate seems to know that starting a binary needs some > >? ? ?indication to the user like "This icon was clicked". > > > >? ? ?When there is a Gambas app behind, it seems not to know. So > there is no > >? ? ?reaction when double-clicking the icon, and the user wonders > "has my > >? ? ?double-click been accepted, or is Mate still waiting for > something?" > > > >? ? ?Then, mostly, the program pops up and confirms that the > double-click > >? ? ?was > >? ? ?seen. But prior to this, there is no loading indicator. > > > >? ? ?I just found, the Gambas IDE itself doesn't have a starting > indicator. > > > >? ? ?Regards > >? ? ?Rolf > > > > > >? ? ?Am 13.02.19 um 05:24 schrieb Fabien Bodard: > >? ? ? > Hi, > >? ? ? > > >? ? ? > At the start of your program do > >? ? ? > > >? ? ? > Inc application.Busy > >? ? ? > > >? ? ? > > >? ? ? > Then when your application is loaded > >? ? ? > For exemple at the end of form.open or form.show of your main > >? ? ?form just do > >? ? ? > > >? ? ? > Dec Application.Busy > >? ? ? > > >? ? ? > When Application.Busy is >to 0 then then the wait cursor is > >? ? ?displayed. > >? ? ? > > >? ? ? > This way allow to have imbricated call to the waiting state > >? ? ? > > >? ? ? > Regards, > >? ? ? > > >? ? ? > Fabien Bodard > >? ? ? > > >? ? ? > Le mar. 12 f?vr. 2019 18:37, Rolf-Werner Eilert > >? ? ? > > > >? ? ? > > >>> a ?crit?: > >? ? ? > > >? ? ? >? ? ?Under Ubuntu Mate I don't get a Wait mouse icon when I > start > >? ? ?a Gambas > >? ? ? >? ? ?program. Sometimes I am too hasty and don't doubleclick at > >? ? ?one spot, so > >? ? ? >? ? ?it doesn't start the program. But sometimes it just > starts a > >? ? ?bit more > >? ? ? >? ? ?slowly, so when I'm nervous I start it twice. You know > what I > >? ? ?mean... :) > >? ? ? > > >? ? ? >? ? ?Is it possible to get a Wait mouse icon on start, or > is it a > >? ? ? >? ? ?drawback of > >? ? ? >? ? ?the interpreter which can't be changed? > >? ? ? > > >? ? ? >? ? ?I know KDE has an option to set a jumping mouse on any > >? ? ?doubleclick of > >? ? ? >? ? ?some icon on the desktop, but in Mate other programs > (those > >? ? ?which are > >? ? ? >? ? ?binaries) have it too. > >? ? ? > > >? ? ? >? ? ?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 ]---- > > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > From rwe-sse at osnanet.de Wed Feb 20 12:06:02 2019 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Wed, 20 Feb 2019 12:06:02 +0100 Subject: [Gambas-user] Question: Wait-sign on start In-Reply-To: References: <8f46dd0b-8e9a-7951-cbbd-3be3544bef80@osnanet.de> <46c204b4-62c2-a175-35af-2fe34721f257@gmail.com> <81f8b3d4-6c35-7804-4736-fc571fe4772b@osnanet.de> Message-ID: <09c9af58-6741-5b78-303b-067b33ea3596@osnanet.de> Am 19.02.19 um 17:09 schrieb Beno?t Minisini: > #!/bin/bash > sleep 5 > notify-send "Hello there!" Yes, there is no reaction, no notification, and after 5 seconds I get the message. Regards Rolf From gambas.fr at gmail.com Wed Feb 20 12:34:37 2019 From: gambas.fr at gmail.com (Fabien Bodard) Date: Wed, 20 Feb 2019 12:34:37 +0100 Subject: [Gambas-user] How to close a report with the code In-Reply-To: References: Message-ID: Quit work for both but in the gui way it is a quite dirty escape as all things are not freed. Le mer. 20 f?vr. 2019 10:40, PICCORO McKAY Lenz a ?crit : > 2019-02-19 3:12 GMT-04:30, Fabien Bodard : > > No Gui programs can be closed by Quit. > err Quit are not for gui, so only "Close" > > > Quit is just for Terminal programs. > so then something that works for both? > > i mean i have a programs that can be lauched at terminal or as gui! > > just for curious!? > > > > > What is your idea ? > > > > > > Le lun. 18 f?vr. 2019 ? 23:00, Gianluigi a ?crit : > >> > >> Hi Fabien, > >> if an error occurs during the opening of the report, can it be closed > only > >> with Quit? > >> > >> Regards > >> Gianluigi > >> > >> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net > ]---- > > > > > > > > -- > > Fabien Bodard > > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > > > > > -- > Lenz McKAY Gerardo (PICCORO) > http://qgqlochekone.blogspot.com > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gambas.fr at gmail.com Wed Feb 20 12:36:47 2019 From: gambas.fr at gmail.com (Fabien Bodard) Date: Wed, 20 Feb 2019 12:36:47 +0100 Subject: [Gambas-user] How to close a report with the code In-Reply-To: References: Message-ID: Le mer. 20 f?vr. 2019 09:45, Gianluigi a ?crit : > Hi Fabien, > if you received yesterday my email [0] with the project attached, you will > have seen that I did something similar to what you wrote. > Not knowing how to use the inches I converted everything in millimeters. > In internal i use inches to have a common size unit as resolutions are given in dot per inch. So one less convertion Now I will try to use what you have suggested using the inches of internal > functions. > In your opinion, is a correct strategy to calculate the height of the > textlabel for each paragraph based on the width of the sentences and then > their number? > I remind you the other question: How can you stop the opening of the > preview in case of error? > > Regards > Gianluigi > [0] > https://lists.gambas-basic.org/pipermail/user/2019-February/066496.html > > Il giorno mar 19 feb 2019 alle ore 21:08 Fabien Bodard < > gambas.fr at gmail.com> ha scritto: > >> just for info : >> >> You have already : >> >> Report.UnitTo(Value, "cm","in") >> Report.UnitToInch(Value,"cm") >> and >> Report.AllowedUnits that return supported units as string array >> >> Thy must be used in your case as >> >> Me.UnitTo(.... >> To get correct conversion with the current used device as the desktop >> resolution is not the same as printer one. >> >> It is important in the case of conversion from unity to pixel for example. >> >> Regards >> >> >> >> >> >> Le mar. 19 f?vr. 2019 ? 15:52, Jussi Lahtinen >> a ?crit : >> > >> > Why? >> > I think in case of fatal error Quit is perfectly fine. I would first >> display error message and then give quit with error code. >> > >> > >> > Jussi >> > >> > On Tue, Feb 19, 2019 at 9:43 AM Fabien Bodard >> wrote: >> >> >> >> No Gui programs can be closed by Quit. >> >> >> >> Quit is just for Terminal programs. >> >> >> >> What is your idea ? >> >> >> >> >> >> Le lun. 18 f?vr. 2019 ? 23:00, Gianluigi a >> ?crit : >> >> > >> >> > Hi Fabien, >> >> > if an error occurs during the opening of the report, can it be >> closed only with Quit? >> >> > >> >> > Regards >> >> > Gianluigi >> >> > >> >> > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >> ]---- >> >> >> >> >> >> >> >> -- >> >> Fabien Bodard >> >> >> >> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >> ]---- >> > >> > >> > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >> ]---- >> >> >> >> -- >> Fabien Bodard >> >> ----[ 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 Feb 20 13:46:24 2019 From: bagonergi at gmail.com (Gianluigi) Date: Wed, 20 Feb 2019 13:46:24 +0100 Subject: [Gambas-user] Question: Wait-sign on start In-Reply-To: <64cf5753-9295-f676-0975-282d958c5e35@osnanet.de> References: <8f46dd0b-8e9a-7951-cbbd-3be3544bef80@osnanet.de> <64cf5753-9295-f676-0975-282d958c5e35@osnanet.de> Message-ID: If you do not have the applications folder in .local/share, you must create it manually or through the terminal as a normal user. So, always through the terminal or manually, inside the folder you create with the text editor an empty file where you copy this (changing the paths): [Desktop Entry] Version=1.6 Comment=Application Encoding=UTF-8 Exec=//gambas3.gambas Icon=/.png Name=Gambas3 StartupNotify=true Terminal=false NoDisplay=false Type=Application Categories=Development; And save it as gambas3.desktop. You'll see an new entry to Mate's menu, see attached image. Note: StartupNotify=true otherwise you will not see the mouse wait icon. Regards Gianluigi Il giorno mer 20 feb 2019 alle ore 12:03 Rolf-Werner Eilert < rwe-sse at osnanet.de> ha scritto: > Well, I right-clicked on the desktop and chose "Create a starter..." (or > whatever it is in English). This makes an icon, and for most of the > programs this runs with notification. Only Wine has a list of the > desktop files in .local/share/applications. > > Regards > Rolf > > > Am 19.02.19 um 17:22 schrieb Gianluigi: > > Here it seems to work properly, see attached image. > > Have you created the desktop file correctly and entered it in > > .local/share/applications? > > > > Regards > > Gianluigi > > > > Il giorno mar 19 feb 2019 alle ore 15:45 Rolf-Werner Eilert > > > ha scritto: > > > > Hi Gianluigi, > > > > yes, I know this code, it's part of my Gambas programs. > > > > But it has nothing to do with this problem here. Or do I oversee > > anything? > > > > Regards > > Rolf > > > > > > Am 19.02.19 um 13:18 schrieb Gianluigi: > > > If you don't want to open a new instance of your project: > > > > > > From a code by Jussi Lahtinen: > > > '----------------------------------------------- > > > Public Sub Form_Open() > > > > > > Dim sOutput As String > > > Dim s As String = Application.Name > > > > > > Exec ["pgrep", "-f", "-l", s] Wait To sOutput > > > > > > If Split(Trim$(sOutput), gb.NewLine).Count > 1 Then > > > Me.Close > > > Endif > > > > > > End > > > '------------------------------------------------------- > > > > > > Another solution from this discussion on the Gambas-it forum [0]: > > > > > > > > > '---------------------------------------------------------------------- > > > ' The gb.settings component must be activated > > > Private hSetting As Settings > > > > > > Public Sub Form_Open() > > > > > > Dim iPid As Integer = Application.Id > > > Dim sPid, sSysPid As String > > > > > > hSetting = New Settings(User.Home &/ "myapp.conf") > > > If (hSetting["Application/pid", 0] = 0) Then > > > ' this is the first execution > > > hSetting["Application/pid"] = iPid > > > hSetting.Save > > > Else > > > sPid = hSetting["Application/pid"] > > > Shell "ps aux | grep " & sPid & " | grep -wv grep | wc -l" > > Wait To > > > sSysPid > > > sSysPid = Replace(sSysPid, "\n", "") > > > If (Val(sSysPid) > 0) Then > > > Me.Close ' Application already active > > > Else > > > ' previous instance that probably has an abortion > > > hSetting["Application/pid"] = iPid > > > hSetting.Save > > > Endif > > > Endif > > > > > > End > > > '------------------------------------------------------------ > > > Regards > > > Gianluigi > > > > > > [0] http://www.gambas-it.org/smf/index.php?topic=2056.0 > > > > > > Il giorno mar 19 feb 2019 alle ore 10:10 Rolf-Werner Eilert > > > > > >> ha scritto: > > > > > > Thank you Fabien, > > > > > > good idea, but it doesn't help here. It is the time from > > clicking the > > > icon to starting the program which gets no indicator. > > > > > > Strangely, Mate seems to know that starting a binary needs > some > > > indication to the user like "This icon was clicked". > > > > > > When there is a Gambas app behind, it seems not to know. So > > there is no > > > reaction when double-clicking the icon, and the user wonders > > "has my > > > double-click been accepted, or is Mate still waiting for > > something?" > > > > > > Then, mostly, the program pops up and confirms that the > > double-click > > > was > > > seen. But prior to this, there is no loading indicator. > > > > > > I just found, the Gambas IDE itself doesn't have a starting > > indicator. > > > > > > Regards > > > Rolf > > > > > > > > > Am 13.02.19 um 05:24 schrieb Fabien Bodard: > > > > Hi, > > > > > > > > At the start of your program do > > > > > > > > Inc application.Busy > > > > > > > > > > > > Then when your application is loaded > > > > For exemple at the end of form.open or form.show of your > main > > > form just do > > > > > > > > Dec Application.Busy > > > > > > > > When Application.Busy is >to 0 then then the wait cursor is > > > displayed. > > > > > > > > This way allow to have imbricated call to the waiting state > > > > > > > > Regards, > > > > > > > > Fabien Bodard > > > > > > > > Le mar. 12 f?vr. 2019 18:37, Rolf-Werner Eilert > > > > > > > > > > > > >>> a ?crit : > > > > > > > > Under Ubuntu Mate I don't get a Wait mouse icon when I > > start > > > a Gambas > > > > program. Sometimes I am too hasty and don't > doubleclick at > > > one spot, so > > > > it doesn't start the program. But sometimes it just > > starts a > > > bit more > > > > slowly, so when I'm nervous I start it twice. You know > > what I > > > mean... :) > > > > > > > > Is it possible to get a Wait mouse icon on start, or > > is it a > > > > drawback of > > > > the interpreter which can't be changed? > > > > > > > > I know KDE has an option to set a jumping mouse on any > > > doubleclick of > > > > some icon on the desktop, but in Mate other programs > > (those > > > which are > > > > binaries) have it too. > > > > > > > > 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 > ]---- > > > > > > > > ----[ 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: mate-menu.png Type: image/png Size: 44762 bytes Desc: not available URL: From rwe-sse at osnanet.de Wed Feb 20 15:43:35 2019 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Wed, 20 Feb 2019 15:43:35 +0100 Subject: [Gambas-user] Question: Wait-sign on start In-Reply-To: References: <8f46dd0b-8e9a-7951-cbbd-3be3544bef80@osnanet.de> <64cf5753-9295-f676-0975-282d958c5e35@osnanet.de> Message-ID: <937c72e3-50d8-2a87-7128-64c08e76a4be@osnanet.de> Ok, Gianluigi, it works, but like on Bruce's computer. I have to make a copy of the .desktop file into .local/share/applications, and at least one of these copies has to contain StartupNotify=true. Then I get the mouse waiting cursor, but it appears longer than the program starts, so Mate seems not to know when the program is up and running. Anyway, at least a workaround for slowly starting programs ;) Regards Rolf Am 20.02.19 um 13:46 schrieb Gianluigi: > If you do not have the applications folder in .local/share, you must > create it manually or through the terminal as a normal user. > So, always through the terminal or manually, inside the folder you > create with the text editor an empty file where you copy this (changing > the paths): > > [Desktop Entry] > Version=1.6 > Comment=Application > Encoding=UTF-8 > Exec=//gambas3.gambas > Icon=/.png > Name=Gambas3 > StartupNotify=true > Terminal=false > NoDisplay=false > Type=Application > Categories=Development; > > And save it as gambas3.desktop. > You'll see an new entry to Mate's menu, see attached image. > Note: StartupNotify=true otherwise you will not see the mouse wait icon. > > Regards > Gianluigi > > Il giorno mer 20 feb 2019 alle ore 12:03 Rolf-Werner Eilert > > ha scritto: > > Well, I right-clicked on the desktop and chose "Create a starter..." > (or > whatever it is in English). This makes an icon, and for most of the > programs this runs with notification. Only Wine has a list of the > desktop files in .local/share/applications. > > Regards > Rolf > > > Am 19.02.19 um 17:22 schrieb Gianluigi: > > Here it seems to work properly, see attached image. > > Have you created the desktop file correctly and entered it in > > .local/share/applications? > > > > Regards > > Gianluigi > > > > Il giorno mar 19 feb 2019 alle ore 15:45 Rolf-Werner Eilert > > > >> ha scritto: > > > >? ? ?Hi Gianluigi, > > > >? ? ?yes, I know this code, it's part of my Gambas programs. > > > >? ? ?But it has nothing to do with this problem here. Or do I oversee > >? ? ?anything? > > > >? ? ?Regards > >? ? ?Rolf > > > > > >? ? ?Am 19.02.19 um 13:18 schrieb Gianluigi: > >? ? ? > If you don't want to open a new instance of your project: > >? ? ? > > >? ? ? >? From a code by Jussi Lahtinen: > >? ? ? > '----------------------------------------------- > >? ? ? > Public Sub Form_Open() > >? ? ? > > >? ? ? >? ? Dim sOutput As String > >? ? ? >? ? Dim s As String = Application.Name > >? ? ? > > >? ? ? >? ? Exec ["pgrep", "-f", "-l", s] Wait To sOutput > >? ? ? > > >? ? ? >? ? If Split(Trim$(sOutput), gb.NewLine).Count > 1 Then > >? ? ? >? ??? Me.Close > >? ? ? >? ? Endif > >? ? ? > > >? ? ? > End > >? ? ? > '------------------------------------------------------- > >? ? ? > > >? ? ? > Another solution from this discussion on the Gambas-it > forum [0]: > >? ? ? > > >? ? ? > > > > ?'---------------------------------------------------------------------- > >? ? ? > ' The gb.settings component must be activated > >? ? ? > Private hSetting As Settings > >? ? ? > > >? ? ? > Public Sub Form_Open() > >? ? ? > > >? ? ? >? ? Dim iPid As Integer = Application.Id > >? ? ? >? ? Dim sPid, sSysPid As String > >? ? ? > > >? ? ? >? ? hSetting = New Settings(User.Home &/ "myapp.conf") > >? ? ? >? ? If (hSetting["Application/pid", 0] = 0) Then > >? ? ? >? ??? ' this is the first execution > >? ? ? >? ??? hSetting["Application/pid"] = iPid > >? ? ? >? ??? hSetting.Save > >? ? ? >? ? Else > >? ? ? >? ??? sPid = hSetting["Application/pid"] > >? ? ? >? ??? Shell "ps aux | grep " & sPid & "? | grep -wv grep | > wc -l" > >? ? ?Wait To > >? ? ? > sSysPid > >? ? ? >? ??? sSysPid = Replace(sSysPid, "\n", "") > >? ? ? >? ??? If (Val(sSysPid) > 0) Then > >? ? ? >? ????? Me.Close ' Application already active > >? ? ? >? ??? Else > >? ? ? >? ????? ' previous instance that probably has an abortion > >? ? ? >? ????? hSetting["Application/pid"] = iPid > >? ? ? >? ????? hSetting.Save > >? ? ? >? ??? Endif > >? ? ? >? ? Endif > >? ? ? > > >? ? ? > End > >? ? ? > '------------------------------------------------------------ > >? ? ? > Regards > >? ? ? > Gianluigi > >? ? ? > > >? ? ? > [0] http://www.gambas-it.org/smf/index.php?topic=2056.0 > >? ? ? > > >? ? ? > Il giorno mar 19 feb 2019 alle ore 10:10 Rolf-Werner Eilert > >? ? ? > > > > >? ? ? > >>> ha scritto: > >? ? ? > > >? ? ? >? ? ?Thank you Fabien, > >? ? ? > > >? ? ? >? ? ?good idea, but it doesn't help here. It is the time from > >? ? ?clicking the > >? ? ? >? ? ?icon to starting the program which gets no indicator. > >? ? ? > > >? ? ? >? ? ?Strangely, Mate seems to know that starting a binary > needs some > >? ? ? >? ? ?indication to the user like "This icon was clicked". > >? ? ? > > >? ? ? >? ? ?When there is a Gambas app behind, it seems not to > know. So > >? ? ?there is no > >? ? ? >? ? ?reaction when double-clicking the icon, and the user > wonders > >? ? ?"has my > >? ? ? >? ? ?double-click been accepted, or is Mate still waiting for > >? ? ?something?" > >? ? ? > > >? ? ? >? ? ?Then, mostly, the program pops up and confirms that the > >? ? ?double-click > >? ? ? >? ? ?was > >? ? ? >? ? ?seen. But prior to this, there is no loading indicator. > >? ? ? > > >? ? ? >? ? ?I just found, the Gambas IDE itself doesn't have a > starting > >? ? ?indicator. > >? ? ? > > >? ? ? >? ? ?Regards > >? ? ? >? ? ?Rolf > >? ? ? > > >? ? ? > > >? ? ? >? ? ?Am 13.02.19 um 05:24 schrieb Fabien Bodard: > >? ? ? >? ? ? > Hi, > >? ? ? >? ? ? > > >? ? ? >? ? ? > At the start of your program do > >? ? ? >? ? ? > > >? ? ? >? ? ? > Inc application.Busy > >? ? ? >? ? ? > > >? ? ? >? ? ? > > >? ? ? >? ? ? > Then when your application is loaded > >? ? ? >? ? ? > For exemple at the end of form.open or form.show of > your main > >? ? ? >? ? ?form just do > >? ? ? >? ? ? > > >? ? ? >? ? ? > Dec Application.Busy > >? ? ? >? ? ? > > >? ? ? >? ? ? > When Application.Busy is >to 0 then then the wait > cursor is > >? ? ? >? ? ?displayed. > >? ? ? >? ? ? > > >? ? ? >? ? ? > This way allow to have imbricated call to the > waiting state > >? ? ? >? ? ? > > >? ? ? >? ? ? > Regards, > >? ? ? >? ? ? > > >? ? ? >? ? ? > Fabien Bodard > >? ? ? >? ? ? > > >? ? ? >? ? ? > Le mar. 12 f?vr. 2019 18:37, Rolf-Werner Eilert > >? ? ? >? ? ? > > > >? ? ? > >> > >? ? ? >? ? ? > > > >? ? ? > >>>> a ?crit?: > >? ? ? >? ? ? > > >? ? ? >? ? ? >? ? ?Under Ubuntu Mate I don't get a Wait mouse icon > when I > >? ? ?start > >? ? ? >? ? ?a Gambas > >? ? ? >? ? ? >? ? ?program. Sometimes I am too hasty and don't > doubleclick at > >? ? ? >? ? ?one spot, so > >? ? ? >? ? ? >? ? ?it doesn't start the program. But sometimes it just > >? ? ?starts a > >? ? ? >? ? ?bit more > >? ? ? >? ? ? >? ? ?slowly, so when I'm nervous I start it twice. > You know > >? ? ?what I > >? ? ? >? ? ?mean... :) > >? ? ? >? ? ? > > >? ? ? >? ? ? >? ? ?Is it possible to get a Wait mouse icon on > start, or > >? ? ?is it a > >? ? ? >? ? ? >? ? ?drawback of > >? ? ? >? ? ? >? ? ?the interpreter which can't be changed? > >? ? ? >? ? ? > > >? ? ? >? ? ? >? ? ?I know KDE has an option to set a jumping mouse > on any > >? ? ? >? ? ?doubleclick of > >? ? ? >? ? ? >? ? ?some icon on the desktop, but in Mate other > programs > >? ? ?(those > >? ? ? >? ? ?which are > >? ? ? >? ? ? >? ? ?binaries) have it too. > >? ? ? >? ? ? > > >? ? ? >? ? ? >? ? ?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 ]---- > > > > > > > > ----[ 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 gambas.fr at gmail.com Wed Feb 20 18:43:00 2019 From: gambas.fr at gmail.com (Fabien Bodard) Date: Wed, 20 Feb 2019 18:43:00 +0100 Subject: [Gambas-user] Question: Wait-sign on start In-Reply-To: <937c72e3-50d8-2a87-7128-64c08e76a4be@osnanet.de> References: <8f46dd0b-8e9a-7951-cbbd-3be3544bef80@osnanet.de> <64cf5753-9295-f676-0975-282d958c5e35@osnanet.de> <937c72e3-50d8-2a87-7128-64c08e76a4be@osnanet.de> Message-ID: The question can be what is the info that allow mate to know when the app is started. in gambas the command line and the pid label are different. All the gambas programs have the same processus name... gbr3. This is maybe the problem... I'm curious to know if you have same problem with a python gui program. From bagonergi at gmail.com Wed Feb 20 19:34:52 2019 From: bagonergi at gmail.com (Gianluigi) Date: Wed, 20 Feb 2019 19:34:52 +0100 Subject: [Gambas-user] Question: Wait-sign on start In-Reply-To: References: <8f46dd0b-8e9a-7951-cbbd-3be3544bef80@osnanet.de> <64cf5753-9295-f676-0975-282d958c5e35@osnanet.de> <937c72e3-50d8-2a87-7128-64c08e76a4be@osnanet.de> Message-ID: Hi Fabien, I installed an Ubuntu-Mate on VBox, Gambas works perfectly as you can see from the movies. Evidently they make some mistakes in the installation and/or configuration. Regards Gianluigi Il giorno mer 20 feb 2019 alle ore 18:44 Fabien Bodard ha scritto: > The question can be what is the info that allow mate to know when the > app is started. > > in gambas the command line and the pid label are different. All the > gambas programs have the same processus name... gbr3. > This is maybe the problem... > > I'm curious to know if you have same problem with a python gui program. > > ----[ 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: bar-icon.mp4 Type: video/mp4 Size: 30570 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: desktop-icon.mp4 Type: video/mp4 Size: 15950 bytes Desc: not available URL: From rwe-sse at osnanet.de Thu Feb 21 08:42:35 2019 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Thu, 21 Feb 2019 08:42:35 +0100 Subject: [Gambas-user] Question: Wait-sign on start In-Reply-To: References: <8f46dd0b-8e9a-7951-cbbd-3be3544bef80@osnanet.de> <64cf5753-9295-f676-0975-282d958c5e35@osnanet.de> <937c72e3-50d8-2a87-7128-64c08e76a4be@osnanet.de> Message-ID: <44919496-e6d4-2db1-e615-a9c42b70efaa@osnanet.de> Am 20.02.19 um 18:43 schrieb Fabien Bodard: > The question can be what is the info that allow mate to know when the > app is started. > > in gambas the command line and the pid label are different. All the > gambas programs have the same processus name... gbr3. > This is maybe the problem... > > I'm curious to know if you have same problem with a python gui program. > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > > As Benoit proposed, it might be missing to be connected to DBus. I have a Java-based program here, and I tried the trick with the copy of the .desktop file in .local/share/applications plus "StartupNotify". Here it runs perfectly, the mouse wait appears, but disappears as soon as the application has started. Could I make a connection to DBus in the Gambas code? What would that look like? Regards Rolf From rwe-sse at osnanet.de Thu Feb 21 08:46:01 2019 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Thu, 21 Feb 2019 08:46:01 +0100 Subject: [Gambas-user] Question: Wait-sign on start In-Reply-To: References: <8f46dd0b-8e9a-7951-cbbd-3be3544bef80@osnanet.de> <64cf5753-9295-f676-0975-282d958c5e35@osnanet.de> <937c72e3-50d8-2a87-7128-64c08e76a4be@osnanet.de> Message-ID: <9dc0d96d-61dd-2ad3-6b2e-25a18062b332@osnanet.de> Hi Gianluigi, everything works fine when I make it the way you proposed: setting a copy of the .desktop into .local/share/application AND setting "StartupNotify=true" in at least one of these two. The only point is that Gambas doesn't inform Mate about the program being started, so Mate lets the wait icon rotate for a standard period. This affects only the window's gadgets and other applications, not the application that was started, but it's a bit annoying anyway. Regards Rolf Am 20.02.19 um 19:34 schrieb Gianluigi: > Hi Fabien, > I installed an Ubuntu-Mate on VBox, Gambas works perfectly as you can > see from the movies. > Evidently they make some mistakes in the installation and/or configuration. > > Regards > Gianluigi > > Il giorno mer 20 feb 2019 alle ore 18:44 Fabien Bodard > > ha scritto: > > The question can be what is the info that allow mate to know when the > app is started. > > in gambas the command line and the pid label are different. All the > gambas programs have the same processus name... gbr3. > This is maybe the problem... > > I'm curious to know if you have same problem with a python gui program. > > ----[ 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 Feb 21 11:09:29 2019 From: bagonergi at gmail.com (Gianluigi) Date: Thu, 21 Feb 2019 11:09:29 +0100 Subject: [Gambas-user] Question: Wait-sign on start In-Reply-To: <9dc0d96d-61dd-2ad3-6b2e-25a18062b332@osnanet.de> References: <8f46dd0b-8e9a-7951-cbbd-3be3544bef80@osnanet.de> <64cf5753-9295-f676-0975-282d958c5e35@osnanet.de> <937c72e3-50d8-2a87-7128-64c08e76a4be@osnanet.de> <9dc0d96d-61dd-2ad3-6b2e-25a18062b332@osnanet.de> Message-ID: I do not understand what you mean by "AND setting" StartupNotify=true "in at least one of these two". Here I have only one desktop file for many launchers: menu , favorites menu, tray-icon, desktop-icon. Here the mouse wait icon works correctly and stops as soon as it open the application even if there are other applications open. Regards Gianluigi Il giorno gio 21 feb 2019 alle ore 08:47 Rolf-Werner Eilert < rwe-sse at osnanet.de> ha scritto: > Hi Gianluigi, > > everything works fine when I make it the way you proposed: setting a > copy of the .desktop into .local/share/application AND setting > "StartupNotify=true" in at least one of these two. > > The only point is that Gambas doesn't inform Mate about the program > being started, so Mate lets the wait icon rotate for a standard period. > This affects only the window's gadgets and other applications, not the > application that was started, but it's a bit annoying anyway. > > Regards > Rolf > > Am 20.02.19 um 19:34 schrieb Gianluigi: > > Hi Fabien, > > I installed an Ubuntu-Mate on VBox, Gambas works perfectly as you can > > see from the movies. > > Evidently they make some mistakes in the installation and/or > configuration. > > > > Regards > > Gianluigi > > > > Il giorno mer 20 feb 2019 alle ore 18:44 Fabien Bodard > > > ha scritto: > > > > The question can be what is the info that allow mate to know when the > > app is started. > > > > in gambas the command line and the pid label are different. All the > > gambas programs have the same processus name... gbr3. > > This is maybe the problem... > > > > I'm curious to know if you have same problem with a python gui > program. > > > > ----[ 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 rwe-sse at osnanet.de Thu Feb 21 11:28:18 2019 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Thu, 21 Feb 2019 11:28:18 +0100 Subject: [Gambas-user] Question: Wait-sign on start In-Reply-To: References: <8f46dd0b-8e9a-7951-cbbd-3be3544bef80@osnanet.de> <64cf5753-9295-f676-0975-282d958c5e35@osnanet.de> <937c72e3-50d8-2a87-7128-64c08e76a4be@osnanet.de> <9dc0d96d-61dd-2ad3-6b2e-25a18062b332@osnanet.de> Message-ID: <8aabf576-03f4-5af7-2f71-cf9eee535ed6@osnanet.de> Originally, I had icons for some Gambas programs on the Desktop, therefore in ~/Desktop (in the German localisation it is called "~/Schreibtisch"). That was not enough, even if I added StartupNotify=true in them. The programs would start, but without notification. I had to make a copy into .local/share/applications plus I added StartupNotify=true to either of them (it doesn't need to be contained in both). Was that clear enough? Regards Rolf Am 21.02.19 um 11:09 schrieb Gianluigi: > I do not understand what you mean by "AND setting" StartupNotify=true > "in at least one of these two". > Here I have only one desktop file for many launchers: menu development etc.>, favorites menu, tray-icon, desktop-icon. > Here the mouse wait icon works correctly and stops as soon as it open > the application even if there are other applications open. > > Regards > Gianluigi > > Il giorno gio 21 feb 2019 alle ore 08:47 Rolf-Werner Eilert > > ha scritto: > > Hi Gianluigi, > > everything works fine when I make it the way you proposed: setting a > copy of the .desktop into .local/share/application AND setting > "StartupNotify=true" in at least one of these two. > > The only point is that Gambas doesn't inform Mate about the program > being started, so Mate lets the wait icon rotate for a standard period. > This affects only the window's gadgets and other applications, not the > application that was started, but it's a bit annoying anyway. > > Regards > Rolf > > Am 20.02.19 um 19:34 schrieb Gianluigi: > > Hi Fabien, > > I installed an Ubuntu-Mate on VBox, Gambas works perfectly as you > can > > see from the movies. > > Evidently they make some mistakes in the installation and/or > configuration. > > > > Regards > > Gianluigi > > > > Il giorno mer 20 feb 2019 alle ore 18:44 Fabien Bodard > > > >> ha scritto: > > > >? ? ?The question can be what is the info that allow mate to know > when the > >? ? ?app is started. > > > >? ? ?in gambas the command line and the pid label are different. > All the > >? ? ?gambas programs have the same processus name... gbr3. > >? ? ?This is maybe the problem... > > > >? ? ?I'm curious to know if you have same problem with a python > gui program. > > > >? ? ?----[ 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 Feb 21 14:09:37 2019 From: bagonergi at gmail.com (Gianluigi) Date: Thu, 21 Feb 2019 14:09:37 +0100 Subject: [Gambas-user] Question: Wait-sign on start In-Reply-To: <8aabf576-03f4-5af7-2f71-cf9eee535ed6@osnanet.de> References: <8f46dd0b-8e9a-7951-cbbd-3be3544bef80@osnanet.de> <64cf5753-9295-f676-0975-282d958c5e35@osnanet.de> <937c72e3-50d8-2a87-7128-64c08e76a4be@osnanet.de> <9dc0d96d-61dd-2ad3-6b2e-25a18062b332@osnanet.de> <8aabf576-03f4-5af7-2f71-cf9eee535ed6@osnanet.de> Message-ID: Yes, now it is clear that it is wrong :-) For Gambas launchers and applications created by him, this is the procedure I have adopted in all Linux derived from Debian and Ubuntu. Gambas already has the executable, for the programs made by you, you must create the executable. In ~/.local/share/applications, create the desktop file as we seen. Attention to the desktop file items, they must have correct paths and correct category names (eg Office, Development etc.). I also recommend an appropriate comment eg for Gambas "IDE development in BASIC". Save and open the menu, go to the new item and check the functioning, if ok, drag the menu item, keeping the left mouse button pressed, in the tray (panel) or on the desktop. Note: If you can not insert the item in the tray, first try entering it in the favorites menu (right click, Pin to favorites menu). On the desktop it does not immediately appear the name of the program but the desktop file: Double click on it, then on the window that appears click on Mark as trusted. I would do it like this: After verifying the correct operation of the procedure, I would eliminate all the lancers created previously for Gambas and re-make them using the method described above. Regards Gianluigi Il giorno gio 21 feb 2019 alle ore 11:29 Rolf-Werner Eilert < rwe-sse at osnanet.de> ha scritto: > Originally, I had icons for some Gambas programs on the Desktop, > therefore in ~/Desktop (in the German localisation it is called > "~/Schreibtisch"). That was not enough, even if I added > StartupNotify=true in them. The programs would start, but without > notification. > > I had to make a copy into .local/share/applications plus I added > StartupNotify=true to either of them (it doesn't need to be contained in > both). > > Was that clear enough? > > Regards > Rolf > > Am 21.02.19 um 11:09 schrieb Gianluigi: > > I do not understand what you mean by "AND setting" StartupNotify=true > > "in at least one of these two". > > Here I have only one desktop file for many launchers: menu > development etc.>, favorites menu, tray-icon, desktop-icon. > > Here the mouse wait icon works correctly and stops as soon as it open > > the application even if there are other applications open. > > > > Regards > > Gianluigi > > > > Il giorno gio 21 feb 2019 alle ore 08:47 Rolf-Werner Eilert > > > ha scritto: > > > > Hi Gianluigi, > > > > everything works fine when I make it the way you proposed: setting a > > copy of the .desktop into .local/share/application AND setting > > "StartupNotify=true" in at least one of these two. > > > > The only point is that Gambas doesn't inform Mate about the program > > being started, so Mate lets the wait icon rotate for a standard > period. > > This affects only the window's gadgets and other applications, not > the > > application that was started, but it's a bit annoying anyway. > > > > Regards > > Rolf > > > > Am 20.02.19 um 19:34 schrieb Gianluigi: > > > Hi Fabien, > > > I installed an Ubuntu-Mate on VBox, Gambas works perfectly as you > > can > > > see from the movies. > > > Evidently they make some mistakes in the installation and/or > > configuration. > > > > > > Regards > > > Gianluigi > > > > > > Il giorno mer 20 feb 2019 alle ore 18:44 Fabien Bodard > > > > > >> ha > scritto: > > > > > > The question can be what is the info that allow mate to know > > when the > > > app is started. > > > > > > in gambas the command line and the pid label are different. > > All the > > > gambas programs have the same processus name... gbr3. > > > This is maybe the problem... > > > > > > I'm curious to know if you have same problem with a python > > gui program. > > > > > > ----[ 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 adsicks at gmail.com Thu Feb 21 20:54:16 2019 From: adsicks at gmail.com (jeff zacher) Date: Thu, 21 Feb 2019 13:54:16 -0600 Subject: [Gambas-user] gb.web.JSONCollection parse problem Message-ID: Two valid JSON files will not parse properly with a call to JSON.Decode(, True) Consider this is valid JSON: [ { "name" : "Value", "another" : "Value" } ] The above will decode as a Variant[] and not a JSONCollection. Consider this other valid JSON: { "name" : "value", "another" : { "nestedname" : "value" } } These will return as JSONCollections. This is somewhat as expected, however there is no way to gracefully detect what type of object has been decoded. Using Try blocks to determine by trial and error which of the above forms of a JSON are present cannot be good programming form. The TypeOf() function gives a gb.object type of object for both. This is very problematic when parsing large files. What is the proper work around or how is this been properly used in these cases (what am I missing about this?) -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.lee.davidson at gmail.com Thu Feb 21 22:44:20 2019 From: t.lee.davidson at gmail.com (T Lee Davidson) Date: Thu, 21 Feb 2019 16:44:20 -0500 Subject: [Gambas-user] gb.web.JSONCollection parse problem In-Reply-To: References: Message-ID: <25c04fc6-7b98-fd8c-9fc1-6b1da1511e2c@gmail.com> On 2/21/19 2:54 PM, jeff zacher wrote: > Two valid JSON files will not parse properly with a call to > > JSON.Decode(, True) > > Consider this is valid JSON: > [ > ? { > ?? "name" : "Value", > ?? "another" : "Value" > ? } > ] > > The above will decode as a Variant[] and not a JSONCollection. > > Consider this other valid JSON: > > { > ? "name" : "value", > ? "another" : { > ??????? "nestedname" : "value" > ? } > } > > These will return as JSONCollections. > > This is somewhat as expected, however there is no way to gracefully detect what type of object has been decoded. Using Try > blocks to determine by trial and error which of the above forms of a JSON are present cannot be good programming form. The > TypeOf() function gives a gb.object type of object for both. This is very problematic when parsing large > files. What is the proper work around or how is this been properly used in these cases? (what am I missing about this?) > The first JSON content is actually not a Collection. It is an array (or list) of collections with only one element. So, it decodes as a Variant. You can test the type of the object using the "IS" operator which differentiates between both types, whereas TypeOf is lazy. ' Gambas module file Public Sub Main() Dim sJson1 As String = "[{\"name\": \"Value\", \"another\": \"Value\"}]" Dim sJson2 As String = "{\"name\": \"value\", \"another\": {\"nestedname\": \"value\"}}" Dim JsonResult As Variant JsonResult = JSON.Decode(sJson1) If JsonResult Is Collection Then Print "Collection" Else Print "Array of Collections" Endif JsonResult = JSON.Decode(sJson2) If JsonResult Is Collection Then Print "Collection" Else Print "Array of Collections" Endif End This code yields: Array of Collections Collection ___ Lee From cedron at exede.net Fri Feb 22 17:10:31 2019 From: cedron at exede.net (Cedron Dawg) Date: Fri, 22 Feb 2019 11:10:31 -0500 (EST) Subject: [Gambas-user] Distribution of custom shared libraries Message-ID: <1717618006.105176456.1550851831192.JavaMail.zimbra@exede.net> Hello all, I've been messing around with Gambas for a few weeks now. It's very impressive, and since VB6 has been my favorite rapid development platform I am finding Gambas very helpful. I've done a little bit of GUI programming in raw X and Tkinter, and this beats them hands down. I have written a small shared library to access GamePads or Joysticks using the "/dev/input/js#" device. Along with that I have a small demo project which simply prints the GamePad data to the console and a more substantive video game that I intend to put in the software farm. I have some questions concerns the distribution of shared libraries in general: 1) What header text should I include in the source code file? 2) If I want to distribute the source code, where should it be located? 3) If I want ot distribute compiled versions only, where to include it? 32-bit vs 64bit? 4) Any other issues I should be concerned about? Thank you very much, Ced From jussi.lahtinen at gmail.com Fri Feb 22 20:02:41 2019 From: jussi.lahtinen at gmail.com (Jussi Lahtinen) Date: Fri, 22 Feb 2019 21:02:41 +0200 Subject: [Gambas-user] Distribution of custom shared libraries In-Reply-To: <1717618006.105176456.1550851831192.JavaMail.zimbra@exede.net> References: <1717618006.105176456.1550851831192.JavaMail.zimbra@exede.net> Message-ID: 1. License information. Example https://www.gnu.org/licenses/gpl-howto.html . 2. Example Software farm. 3. I don't know, but I would provide both 32 and 64 bit binaries. Jussi On Fri, Feb 22, 2019 at 6:31 PM Cedron Dawg wrote: > Hello all, > > I've been messing around with Gambas for a few weeks now. It's very > impressive, and since VB6 has been my favorite rapid development platform I > am finding Gambas very helpful. I've done a little bit of GUI programming > in raw X and Tkinter, and this beats them hands down. > > I have written a small shared library to access GamePads or Joysticks > using the "/dev/input/js#" device. Along with that I have a small demo > project which simply prints the GamePad data to the console and a more > substantive video game that I intend to put in the software farm. > > I have some questions concerns the distribution of shared libraries in > general: > > 1) What header text should I include in the source code file? > > 2) If I want to distribute the source code, where should it be located? > > 3) If I want ot distribute compiled versions only, where to include it? > 32-bit vs 64bit? > > 4) Any other issues I should be concerned about? > > Thank you very much, > > Ced > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From g4mba5 at gmail.com Fri Feb 22 20:14:40 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Fri, 22 Feb 2019 20:14:40 +0100 Subject: [Gambas-user] Distribution of custom shared libraries In-Reply-To: <1717618006.105176456.1550851831192.JavaMail.zimbra@exede.net> References: <1717618006.105176456.1550851831192.JavaMail.zimbra@exede.net> Message-ID: <6910aa38-42c4-c088-3435-fe6d0865e1a8@gmail.com> Le 22/02/2019 ? 17:10, Cedron Dawg a ?crit?: > Hello all, > > I've been messing around with Gambas for a few weeks now. It's very impressive, and since VB6 has been my favorite rapid development platform I am finding Gambas very helpful. I've done a little bit of GUI programming in raw X and Tkinter, and this beats them hands down. > > I have written a small shared library to access GamePads or Joysticks using the "/dev/input/js#" device. Along with that I have a small demo project which simply prints the GamePad data to the console and a more substantive video game that I intend to put in the software farm. > > I have some questions concerns the distribution of shared libraries in general: > > 1) What header text should I include in the source code file? > > 2) If I want to distribute the source code, where should it be located? > > 3) If I want ot distribute compiled versions only, where to include it? 32-bit vs 64bit? > > 4) Any other issues I should be concerned about? > > Thank you very much, > > Ced > Sorry, I didn't answer your private mail. Anyway, it's better to talk about Gambas on the mailing-list! If you use Ubuntu, search google for "gambas stable ppa" (or "gambas latest ppa" for the development version), and install Gambas from that. Regards, -- Beno?t Minisini From cedron at exede.net Fri Feb 22 20:26:07 2019 From: cedron at exede.net (Cedron Dawg) Date: Fri, 22 Feb 2019 14:26:07 -0500 (EST) Subject: [Gambas-user] Distribution of custom shared libraries In-Reply-To: <6910aa38-42c4-c088-3435-fe6d0865e1a8@gmail.com> References: <1717618006.105176456.1550851831192.JavaMail.zimbra@exede.net> <6910aa38-42c4-c088-3435-fe6d0865e1a8@gmail.com> Message-ID: <924421473.105391512.1550863567442.JavaMail.zimbra@exede.net> Thanks. That's okay. I am trying to do things properly. I was able to define a PPA and am now on version 3.12.2. Notes about that: I was using the GTK2. When I upgraded, the Form_Keypress event failed to fire. I switched to QT4, and it now works fine. This problem is reproducible with a simple test program. I have a Struct defined in my code to share with the shared library. Public Struct InfoBlock AxisCount As Integer ButtonCount As Integer DriverVersion As Integer Filler As Integer GamepadName[128] As Byte End Struct typedef struct { int AxisCount; int ButtonCount; int DriverVersion; int Filler; char GamepadName[128]; } InfoBlock; In the 3.1.1 version, the Filler was not there. When I upgraded, I needed to add the Filler to make the alignment correct. I know you mention in the docs that this is a tricky issue, so this is meant to be informative, I'm not looking for any kind of resolution. ----- Original Message ----- From: "Beno?t Minisini" To: "user" Sent: Friday, February 22, 2019 2:14:40 PM Subject: Re: [Gambas-user] Distribution of custom shared libraries Le 22/02/2019 ? 17:10, Cedron Dawg a ?crit?: > Hello all, > [...snip...] > > Thank you very much, > > Ced > Sorry, I didn't answer your private mail. Anyway, it's better to talk about Gambas on the mailing-list! If you use Ubuntu, search google for "gambas stable ppa" (or "gambas latest ppa" for the development version), and install Gambas from that. Regards, -- Beno?t Minisini ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- From cedron at exede.net Fri Feb 22 20:40:46 2019 From: cedron at exede.net (Cedron Dawg) Date: Fri, 22 Feb 2019 14:40:46 -0500 (EST) Subject: [Gambas-user] Distribution of custom shared libraries In-Reply-To: References: <1717618006.105176456.1550851831192.JavaMail.zimbra@exede.net> Message-ID: <501183231.105410768.1550864446940.JavaMail.zimbra@exede.net> Hi Jussi, Thanks for the quick response. I'm not sure which license version to use. This example is individual hobby stuff. I will include the source code for the shared library in the project directory, leave it for the user to compile. I do have the compilation command lines in a comment at the bottom of the source code file. I'm still getting oriented so this may take a bit of time. I will let you know when I post my projects. Thanks, Ced ----- Original Message ----- From: "Jussi Lahtinen" To: "user" Sent: Friday, February 22, 2019 2:02:41 PM Subject: Re: [Gambas-user] Distribution of custom shared libraries 1. License information. Example [ https://www.gnu.org/licenses/gpl-howto.html | https://www.gnu.org/licenses/gpl-howto.html ] . 2. Example Software farm. 3. I don't know, but I would provide both 32 and 64 bit binaries. Jussi On Fri, Feb 22, 2019 at 6:31 PM Cedron Dawg < [ mailto:cedron at exede.net | cedron at exede.net ] > wrote: Hello all, [...snip...] Thank you very much, Ced From taboege at gmail.com Fri Feb 22 20:41:00 2019 From: taboege at gmail.com (Tobias Boege) Date: Fri, 22 Feb 2019 20:41:00 +0100 Subject: [Gambas-user] Distribution of custom shared libraries In-Reply-To: <1717618006.105176456.1550851831192.JavaMail.zimbra@exede.net> References: <1717618006.105176456.1550851831192.JavaMail.zimbra@exede.net> Message-ID: <20190222194100.GA28675@highrise.localdomain> On Fri, 22 Feb 2019, Cedron Dawg wrote: > Hello all, > > I've been messing around with Gambas for a few weeks now. It's very impressive, and since VB6 has been my favorite rapid development platform I am finding Gambas very helpful. I've done a little bit of GUI programming in raw X and Tkinter, and this beats them hands down. > > I have written a small shared library to access GamePads or Joysticks using the "/dev/input/js#" device. Along with that I have a small demo project which simply prints the GamePad data to the console and a more substantive video game that I intend to put in the software farm. > Cool, I also have that (as a native component, though) but never got around to release it :-/ > 3) If I want ot distribute compiled versions only, where to include it? 32-bit vs 64bit? > Compiled Gambas executables are architecture-independent which I'm pretty sure includes endianness as well as word length. That is because *.gambas files contain classes compiled to Gambas bytecode. You need the Gambas virtual machine, aka interpreter, to execute them -- unlike the *.exe files that VB6 presumably produces. If you want to distribute compiled versions of your program, I would suggest making an installation package via the IDE. This includes the *.gambas file and links to all the dependencies required on the consumer's machine to run it, including at least the Gambas interpreter. Their package manager will resolve the dependencies when your program gets installed. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From cedron at exede.net Fri Feb 22 21:08:12 2019 From: cedron at exede.net (Cedron Dawg) Date: Fri, 22 Feb 2019 15:08:12 -0500 (EST) Subject: [Gambas-user] Distribution of custom shared libraries In-Reply-To: <20190222194100.GA28675@highrise.localdomain> References: <1717618006.105176456.1550851831192.JavaMail.zimbra@exede.net> <20190222194100.GA28675@highrise.localdomain> Message-ID: <711388928.105441173.1550866092779.JavaMail.zimbra@exede.net> Hi Tobi, I did search quite a bit for GamePad support before I wrote my own. The only thing I could find was an old mailing list entry about reading the "/dev/input/js#" through an EXEC command since the read didn't work. I've lost the refernence, sorry. I think it would be great to have it as a gb.* component, but that is beyond my ability at this point. Also, apparently the "/dev/input/event##" is the more recent way of doing it, but I haven't figure that out yet either. For this project, I am happy to distribute source. The question I have is not about the Gambas code, rather is what do I do with the .c file? It is not project specific since it is meant to be usable with any Gambas application. On my machine, this is how I have is set up: I am putting my projects in my "~/Gambas" directory. I also have a "~/Gambas/so/" directory for my library code. In my "/usr/lib" directory (as root), I added a link called "libGambas_GamePad.so" which points to the same file in my development directory. This works great. I can modify the library, compile in place, and test immediately from the Gambas IDE. These are my functions: Extern GP_GetAttachedList() As String In "libGambas_GamePad" Extern GP_FillInfoBlock(argPadIndex As Integer, argInfo As InfoBlock) As String In "libGambas_GamePad" Extern GP_RawRead(argPadIndex As Integer, argEvent As EventBlock) As String In "libGambas_GamePad" So, if I include the source code in my project, how best to communicate installation instructions for the .so library for the end user? Thanks, Ced ----- Original Message ----- From: "Tobias Boege" To: "user" Sent: Friday, February 22, 2019 2:41:00 PM Subject: Re: [Gambas-user] Distribution of custom shared libraries On Fri, 22 Feb 2019, Cedron Dawg wrote: > Hello all, > > I've been messing around with Gambas for a few weeks now. It's very impressive, and since VB6 has been my favorite rapid development platform I am finding Gambas very helpful. I've done a little bit of GUI programming in raw X and Tkinter, and this beats them hands down. > > I have written a small shared library to access GamePads or Joysticks using the "/dev/input/js#" device. Along with that I have a small demo project which simply prints the GamePad data to the console and a more substantive video game that I intend to put in the software farm. > Cool, I also have that (as a native component, though) but never got around to release it :-/ > 3) If I want ot distribute compiled versions only, where to include it? 32-bit vs 64bit? > Compiled Gambas executables are architecture-independent which I'm pretty sure includes endianness as well as word length. That is because *.gambas files contain classes compiled to Gambas bytecode. You need the Gambas virtual machine, aka interpreter, to execute them -- unlike the *.exe files that VB6 presumably produces. If you want to distribute compiled versions of your program, I would suggest making an installation package via the IDE. This includes the *.gambas file and links to all the dependencies required on the consumer's machine to run it, including at least the Gambas interpreter. Their package manager will resolve the dependencies when your program gets installed. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- From g4mba5 at gmail.com Sat Feb 23 00:23:00 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Sat, 23 Feb 2019 00:23:00 +0100 Subject: [Gambas-user] Distribution of custom shared libraries In-Reply-To: <924421473.105391512.1550863567442.JavaMail.zimbra@exede.net> References: <1717618006.105176456.1550851831192.JavaMail.zimbra@exede.net> <6910aa38-42c4-c088-3435-fe6d0865e1a8@gmail.com> <924421473.105391512.1550863567442.JavaMail.zimbra@exede.net> Message-ID: Le 22/02/2019 ? 20:26, Cedron Dawg a ?crit?: > Thanks. That's okay. I am trying to do things properly. > > I was able to define a PPA and am now on version 3.12.2. > > Notes about that: > > I was using the GTK2. When I upgraded, the Form_Keypress event failed to fire. I switched to QT4, and it now works fine. This problem is reproducible with a simple test program. This has been fixed in commit https://gitlab.com/gambas/gambas/commit/aa66e9bcd5f10719428d77014fda3c6df2093f26. > > I have a Struct defined in my code to share with the shared library. > > Public Struct InfoBlock > AxisCount As Integer > ButtonCount As Integer > DriverVersion As Integer > Filler As Integer > GamepadName[128] As Byte > End Struct > > typedef struct > { > int AxisCount; > int ButtonCount; > int DriverVersion; > int Filler; > char GamepadName[128]; > } InfoBlock; > > > In the 3.1.1 version, the Filler was not there. When I upgraded, I needed to add the Filler to make the alignment correct. I know you mention in the docs that this is a tricky issue, so this is meant to be informative, I'm not looking for any kind of resolution. Without your full source code, I can't tell you. It's just that a structure may be aligned differently by the C compiler, whereas Gambas has a deterministic algorithm for that. And the result may not be the same as soon as there are holes or unaligned fields in your structure. AFAIK, there is no norm for structure implementation in C: the compiler can reorder the fields and add memory holes as it wants, changing its mind between 32 bits / 64 bits and between versions. So it's almost impossible for an interpreter to deal with that in all cases. :-( -- Beno?t Minisini From cedron at exede.net Sat Feb 23 00:47:46 2019 From: cedron at exede.net (Cedron Dawg) Date: Fri, 22 Feb 2019 18:47:46 -0500 (EST) Subject: [Gambas-user] Distribution of custom shared libraries In-Reply-To: References: <1717618006.105176456.1550851831192.JavaMail.zimbra@exede.net> <6910aa38-42c4-c088-3435-fe6d0865e1a8@gmail.com> <924421473.105391512.1550863567442.JavaMail.zimbra@exede.net> Message-ID: <889814139.105647860.1550879266903.JavaMail.zimbra@exede.net> [...snip...] > Notes about that: > > I was using the GTK2. When I upgraded, the Form_Keypress event failed to fire. I switched to QT4, and it now works fine. This problem is reproducible with a simple test program. This has been fixed in commit https://gitlab.com/gambas/gambas/commit/aa66e9bcd5f10719428d77014fda3c6df2093f26. > > I have a Struct defined in my code to share with the shared library. > > Public Struct InfoBlock > AxisCount As Integer > ButtonCount As Integer > DriverVersion As Integer > Filler As Integer > GamepadName[128] As Byte > End Struct > > typedef struct > { > int AxisCount; > int ButtonCount; > int DriverVersion; > int Filler; > char GamepadName[128]; > } InfoBlock; > > > In the 3.1.1 version, the Filler was not there. When I upgraded, I needed to add the Filler to make the alignment correct. I know you mention in the docs that this is a tricky issue, so this is meant to be informative, I'm not looking for any kind of resolution. Without your full source code, I can't tell you. It's just that a structure may be aligned differently by the C compiler, whereas Gambas has a deterministic algorithm for that. And the result may not be the same as soon as there are holes or unaligned fields in your structure. AFAIK, there is no norm for structure implementation in C: the compiler can reorder the fields and add memory holes as it wants, changing its mind between 32 bits / 64 bits and between versions. So it's almost impossible for an interpreter to deal with that in all cases. :-( -- Beno?t Minisini ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- Thank you. That was quick. I figured it was a simple fix. I am fine with using Qt4. I am running Linux Mint 17, and both Qt4 and Gtk seem to work. I originally chose Gtk because I have previously used Tkinter. I have not found any guidance in the documentation, or web searches, on which I should use. I get the idea that Qt is preferred, so that is what I will using. I mentioned the Struct issue because it changed between Gambas versions. I've gotten burned by this in the past writing C programs to read predefined binaries. The solution I found then was to use "#pragma pack(1)". This forces the C compiler to build the struct exactly as specified. I've added a #pragma pack(1) to my library source and it still works. :-) Unrelated question: Should this mailing list be top posting or bottom posting? From cedron at exede.net Sat Feb 23 01:11:28 2019 From: cedron at exede.net (Cedron Dawg) Date: Fri, 22 Feb 2019 19:11:28 -0500 (EST) Subject: [Gambas-user] Distribution of custom shared libraries In-Reply-To: References: <1717618006.105176456.1550851831192.JavaMail.zimbra@exede.net> <6910aa38-42c4-c088-3435-fe6d0865e1a8@gmail.com> <924421473.105391512.1550863567442.JavaMail.zimbra@exede.net> Message-ID: <1340850554.105676873.1550880688346.JavaMail.zimbra@exede.net> Here is the source code for the simple demonstration program. Not quite farm ready yet, but you can see what I am doing. In this particular case, the original 3.1.1 matched the C version without the Filler field. When I upgraded to 3.12.2 the padding was introduced. Adding the Filler variable made them align again. Also, I tried all sorts of variations of strings to match the char[128] field. I found that the byte array worked just fine combined with a .ToString() call. Is there a preferred way? ----- Original Message ----- From: "Beno?t Minisini" To: "user" Sent: Friday, February 22, 2019 6:23:00 PM Subject: Re: [Gambas-user] Distribution of custom shared libraries Le 22/02/2019 ? 20:26, Cedron Dawg a ?crit?: Without your full source code, I can't tell you. It's just that a structure may be aligned differently by the C compiler, whereas Gambas has a deterministic algorithm for that. And the result may not be the same as soon as there are holes or unaligned fields in your structure. AFAIK, there is no norm for structure implementation in C: the compiler can reorder the fields and add memory holes as it wants, changing its mind between 32 bits / 64 bits and between versions. So it's almost impossible for an interpreter to deal with that in all cases. :-( -- Beno?t Minisini ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- -------------- next part -------------- A non-text attachment was scrubbed... Name: GamePadShow-0.0.2.tar.gz Type: application/x-compressed-tar Size: 14406 bytes Desc: not available URL: From taboege at gmail.com Sat Feb 23 01:16:58 2019 From: taboege at gmail.com (Tobias Boege) Date: Sat, 23 Feb 2019 01:16:58 +0100 Subject: [Gambas-user] Distribution of custom shared libraries In-Reply-To: <889814139.105647860.1550879266903.JavaMail.zimbra@exede.net> References: <1717618006.105176456.1550851831192.JavaMail.zimbra@exede.net> <6910aa38-42c4-c088-3435-fe6d0865e1a8@gmail.com> <924421473.105391512.1550863567442.JavaMail.zimbra@exede.net> <889814139.105647860.1550879266903.JavaMail.zimbra@exede.net> Message-ID: <20190223001643.GB28675@highrise.localdomain> On Fri, 22 Feb 2019, Cedron Dawg wrote: > Unrelated question: Should this mailing list be top posting or bottom posting? Some people will disagree but for me this is a bottom-posting list :-) [ In reality, everyone does as they please (and I get to reorder or cut down the reply-chain into something consistent when I reply). ] Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From taboege at gmail.com Sat Feb 23 01:37:11 2019 From: taboege at gmail.com (Tobias Boege) Date: Sat, 23 Feb 2019 01:37:11 +0100 Subject: [Gambas-user] Distribution of custom shared libraries In-Reply-To: <711388928.105441173.1550866092779.JavaMail.zimbra@exede.net> References: <1717618006.105176456.1550851831192.JavaMail.zimbra@exede.net> <20190222194100.GA28675@highrise.localdomain> <711388928.105441173.1550866092779.JavaMail.zimbra@exede.net> Message-ID: <20190223003711.GC28675@highrise.localdomain> On Fri, 22 Feb 2019, Cedron Dawg wrote: > Hi Tobi, > > I did search quite a bit for GamePad support before I wrote my own. The only thing I could find was an old mailing list entry about reading the "/dev/input/js#" through an EXEC command since the read didn't work. I've lost the refernence, sorry. > > I think it would be great to have it as a gb.* component, but that is beyond my ability at this point. Also, apparently the "/dev/input/event##" is the more recent way of doing it, but I haven't figure that out yet either. > > For this project, I am happy to distribute source. The question I have is not about the Gambas code, rather is what do I do with the .c file? It is not project specific since it is meant to be usable with any Gambas application. > > On my machine, this is how I have is set up: > > I am putting my projects in my "~/Gambas" directory. I also have a "~/Gambas/so/" directory for my library code. In my "/usr/lib" directory (as root), I added a link called "libGambas_GamePad.so" which points to the same file in my development directory. This works great. I can modify the library, compile in place, and test immediately from the Gambas IDE. > > These are my functions: > > Extern GP_GetAttachedList() As String In "libGambas_GamePad" > Extern GP_FillInfoBlock(argPadIndex As Integer, argInfo As InfoBlock) As String In "libGambas_GamePad" > Extern GP_RawRead(argPadIndex As Integer, argEvent As EventBlock) As String In "libGambas_GamePad" > > So, if I include the source code in my project, how best to communicate installation instructions for the .so library for the end user? > I didn't realise that you were talking about shipping a shared library with your project. That changes matters substantially in that architecture does make a difference. I've never done anything like that and it seems like the IDE dialogs do not provide means for compiling C sources into shared objects before packaging -- or cross-compiling options for that matter. There might be ways to do it, but the most clean solution is a native component, which is Gambas' term for gb.* components which are written in C and directly connect the interpreter to some C-level interface. These are not as easy to write as a C program or a Gambas component and they have to be included in the Gambas source tree. As I said, I have such a half-baked component on my computer (apparently from 2015!). Maybe we should exchange ideas and turn your and my component into something that can be included in the Gambas source tree. From that point on, Linux distributions will take care of architecture dependency when putting Gambas into their repositories. It will also free you from worrying about receiving Structs from Extern functions. Native components have a nicer way of making C-level data structures available to Gambas programs. I'm taking a look at your C file. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From cedron at exede.net Sat Feb 23 01:39:25 2019 From: cedron at exede.net (Cedron Dawg) Date: Fri, 22 Feb 2019 19:39:25 -0500 (EST) Subject: [Gambas-user] Distribution of custom shared libraries In-Reply-To: <20190223001643.GB28675@highrise.localdomain> References: <1717618006.105176456.1550851831192.JavaMail.zimbra@exede.net> <6910aa38-42c4-c088-3435-fe6d0865e1a8@gmail.com> <924421473.105391512.1550863567442.JavaMail.zimbra@exede.net> <889814139.105647860.1550879266903.JavaMail.zimbra@exede.net> <20190223001643.GB28675@highrise.localdomain> Message-ID: <531135924.105694369.1550882365424.JavaMail.zimbra@exede.net> Some people will disagree but for me this is a bottom-posting list :-) [ In reality, everyone does as they please (and I get to reorder or cut down the reply-chain into something consistent when I reply). ] Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- ===================================================== Very good, then I will do the same since that seems to be how Beno?t does it as well. It does take a little bit more work, but no big deal. I'm going to insert a divider line though so it makes it clear where the reply starts. Thanks, Ced From gambas.fr at gmail.com Sat Feb 23 09:08:54 2019 From: gambas.fr at gmail.com (Fabien Bodard) Date: Sat, 23 Feb 2019 09:08:54 +0100 Subject: [Gambas-user] This is Spam :-) Message-ID: Recently I've begin to follow an interresting hardware project. I'm not going to promote it again and again ... But I want to share with you a cool thing. This project is about making an open source Hybrid Touch Screen Tablet based on a nano computer like raspberry or compatible (octopi, up, etc). It can be on battery (10 h autonomy) and run linux, android or windows depend of the nano computer. They have published all the draw and howto for making yourselft the childboards and wires and they share all the stl for printing yourself the box. I see many and many good idea to were I can use it, Accounting, 3D printer pc, portable retropi, domotic displayer and manager etc... This is the link : https://www.diskiopi.com/ https://fr.ulule.com/fabrication-diskio-pi/ And it's a french project... Well, we have bad politics, we don't know how to won money, but we have peoples with ideas XD Sorry for the noise, Have a good Gambas Day Regards, -- Fabien Bodard From cedron at exede.net Sat Feb 23 15:46:48 2019 From: cedron at exede.net (Cedron Dawg) Date: Sat, 23 Feb 2019 09:46:48 -0500 (EST) Subject: [Gambas-user] Distribution of custom shared libraries In-Reply-To: <20190223003711.GC28675@highrise.localdomain> References: <1717618006.105176456.1550851831192.JavaMail.zimbra@exede.net> <20190222194100.GA28675@highrise.localdomain> <711388928.105441173.1550866092779.JavaMail.zimbra@exede.net> <20190223003711.GC28675@highrise.localdomain> Message-ID: <200318024.106438940.1550933208926.JavaMail.zimbra@exede.net> [...snip...] I didn't realise that you were talking about shipping a shared library with your project. That changes matters substantially in that architecture does make a difference. I've never done anything like that and it seems like the IDE dialogs do not provide means for compiling C sources into shared objects before packaging -- or cross-compiling options for that matter. There might be ways to do it, but the most clean solution is a native component, which is Gambas' term for gb.* components which are written in C and directly connect the interpreter to some C-level interface. These are not as easy to write as a C program or a Gambas component and they have to be included in the Gambas source tree. As I said, I have such a half-baked component on my computer (apparently from 2015!). Maybe we should exchange ideas and turn your and my component into something that can be included in the Gambas source tree. From that point on, Linux distributions will take care of architecture dependency when putting Gambas into their repositories. It will also free you from worrying about receiving Structs from Extern functions. Native components have a nicer way of making C-level data structures available to Gambas programs. I'm taking a look at your C file. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk =================================================================== I was half expecting to wake up this morning to find that gp.GamePad has been added to the latest release. ;-) Feel free to incorporate whatever you want. You made me go back and look: My original GamePad test program, from where I got the guts of the library, was done in the Fall of 2014. I think having a gp.GamePad (or gp.GameDevice, or gp.JoystickDevice, or whatever) would make programming a lot more attractive to the young gamer crowd. The game I wrote (still thinking of a good name for it) is meant to be a good starter template for beginning programmers to develop their own games. I'm not a gamer at all, but I thought it was a good project for me to evaluate Gambas' capabilities. The ease of interfacing to C code is a huge plus for me. As to the original question, it would be really nice if there were a built in method through the IDE for .c shared libraries. I would suggest that they get their own category and every library would have to be submitted with a Gambas demo program which shows how the functions are to be used. Seeing as I only have a vague understanding of the whole packaging process, I haven't a clue how it should be done properly. Finally, a note of caution about using the "#pragma pack(1)" directive, for those who may not know. The reason the compiler pads a struct is to align multibyte values on appropriate addresses. A two byte value should be aligned to even addresses, a four byte value to multiple of four addresses, and so on. When you don't, the CPU has to do two memory fetches to get the value instead of one. Unfortunately, on some architectures, it won't even work and you get a fault. The lesson is if you use the pragma directive, and you are designing the struct, make sure those alignment rules are followed. Thanks for looking at my code, I hope you like it. Ced From t.lee.davidson at gmail.com Sat Feb 23 21:41:32 2019 From: t.lee.davidson at gmail.com (T Lee Davidson) Date: Sat, 23 Feb 2019 15:41:32 -0500 Subject: [Gambas-user] XmlElement.GetChildrenByFilter misbehaving ? Message-ID: <609ee95f-7e1a-18ae-bfbf-05d37597ba27@gmail.com> XmlElement.GetChildrenByFilter() does not seem to correctly match CSS selectors and sometimes allows partial matches on an attribute value. Given the following HTML ("test.html"):
And the following code: ' Gambas module file Public Sub Main() Dim HtmlContent As New HtmlDocument Dim Users As XmlElement[] HtmlContent.HtmlFromString(File.Load(Application.Path &/ "test.html")) Users = HtmlContent.Body.GetChildrenByFilter(".user > a") ' Gets div tags also; instead of just anchor tags. For Each MyElement As XmlElement In Users Print MyElement.tagname, MyElement.classname Next End I get: div user a div userspacer div user a div userspacer div user a Is this one or more bugs, a misunderstanding on my part, or a combination of both? Project attached. ___ Lee -------------- next part -------------- A non-text attachment was scrubbed... Name: TestCommandical-0.0.4.tar.gz Type: application/gzip Size: 12279 bytes Desc: not available URL: From cedron at exede.net Sun Feb 24 22:13:27 2019 From: cedron at exede.net (Cedron Dawg) Date: Sun, 24 Feb 2019 16:13:27 -0500 (EST) Subject: [Gambas-user] Complex Numbers and Shared Libraries Message-ID: <230961450.108189344.1551042807771.JavaMail.zimbra@exede.net> Hello all, Well, I'd like to ask for some more specific technical advice. I am writing a wrapper shared library to access the FFTW library from Gambas. The design of that library requires that an input and output area be provided to a "preparation step", then subsequent calls use these areas, then they need to be freed. It is also a requirement that these areas don't move in memory. Therefore, I am having my wrapper allocate the memory and free it, rather than assume that a Gambas garbage collection won't move it. So far, I am able to get the address back to Gambas as a pointer. I can read the memory with either Float@ or reading a memory stream. No problem. I can write to the memory using a memory stream. No problem. First question: Is there any other method, particularly one that makes the memory access "look native"? Similar perhaps to how C allows you to use a pointer with array syntax. Now we come to the crux of my real question. The return values from a DFT is an array of complex numbers. In the FFTW library, a complex number is two adjacent floats in memory, the first being the real part and the second being the imaginary part. I seem to have three options: 1) Deal with two doubles 2) Use the gb.gsl complex 3) Use gb.complex The first I know I can do. The other two are mutually incompatible. Since I am likely to want to use the gsl for more stuff, I think I would like to use #2. I've been doing some experimenting and researching, and have not been able to figure out how to get the address of the actual values. Nor have I been able to read or write complex values to the remote memory area. Second question: Is this possible? I am proceeding under the assumption it is not. Any opinions on how I am doing things are welcome. I am still a newbie to Gambas. Thanks, Ced Yes, I am heavy into Digital Signal Processing, see my stuff at: dsprelated.com/blogs-1/nf/Cedron_Dawg.php dsp.stackexchange.com/users/33154/cedron-dawg From taboege at gmail.com Sun Feb 24 22:42:25 2019 From: taboege at gmail.com (Tobias Boege) Date: Sun, 24 Feb 2019 22:42:25 +0100 Subject: [Gambas-user] Distribution of custom shared libraries In-Reply-To: <200318024.106438940.1550933208926.JavaMail.zimbra@exede.net> References: <1717618006.105176456.1550851831192.JavaMail.zimbra@exede.net> <20190222194100.GA28675@highrise.localdomain> <711388928.105441173.1550866092779.JavaMail.zimbra@exede.net> <20190223003711.GC28675@highrise.localdomain> <200318024.106438940.1550933208926.JavaMail.zimbra@exede.net> Message-ID: <20190224214225.GD28675@highrise.localdomain> On Sat, 23 Feb 2019, Cedron Dawg wrote: > I think having a gp.GamePad (or gp.GameDevice, or gp.JoystickDevice, or whatever) would make programming a lot more attractive to the young gamer crowd. The game I wrote (still thinking of a good name for it) is meant to be a good starter template for beginning programmers to develop their own games. I'm not a gamer at all, but I thought it was a good project for me to evaluate Gambas' capabilities. The ease of interfacing to C code is a huge plus for me. > I called it gb.joystick for two reasons: (1) that's what it was already called on my computer and (2) it uses the Linux Joystick API. For games, the gb.sdl2 component is probably better suited, it just has to be developed more. I wrote my joystick component to be able to use a gamepad for operating an image viewer I wrote, instead of keyboard and mouse. I didn't want to load gb.sdl(2) just to get input via a gamepad and otherwise write the application in QT. But SDL has many more things if you actually want to develop a game, so you're more likely to just want to use SDL for everything in that case. > As to the original question, it would be really nice if there were a built in method through the IDE for .c shared libraries. I would suggest that they get their own category and every library would have to be submitted with a Gambas demo program which shows how the functions are to be used. Seeing as I only have a vague understanding of the whole packaging process, I haven't a clue how it should be done properly. I don't know about that. Bundling shared libraries sounds out of scope for the Gambas packager. The IDE handles Gambas projects, not C source files. Shipping a custom native library together with a component wrapper that makes it available to Gambas is not something I have seen someone doing, but it may be worth looking into. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From taboege at gmail.com Sun Feb 24 23:02:33 2019 From: taboege at gmail.com (Tobias Boege) Date: Sun, 24 Feb 2019 23:02:33 +0100 Subject: [Gambas-user] gb.joystick (and Where is my gbh3?) Message-ID: <20190224220233.GE28675@highrise.localdomain> Hi all, I have just pushed two commits to the gb.joystick branch. This is work that has been on my hard disk(s) since 2015, with a few bits from Cedron Dawg mixed in. The component makes Linux' legacy Joystick API available to Gambas without bells and whistles. You create a joystick by opening the appropriate device /dev/input/jsX and then you receive Button or Axis events when someone touches the thing. [ There is a newer evdev API but the legacy one is nice too. ] Attached is a fairly minimal toy program. Please test it if you have the hardware. One thing: The first commit on that branch had a concept of a "stick" on your joystick which has two axes associated with it. That's usually what you imagine a joystick/gamepad to have. The second commit removes these notions because I realized that sticks with only one axis exist. Maybe that's the reason why the underlying Linux API refers to axes individually. And while axes do seem to come in pairs on my gamepad, they do not always come in the same order: sometimes the horizontal axis is index 0, sometimes it is index 1. So, I decided to remove that logic and leave the mapping of axes to the user. Tell me what you think. One more thing: the component is basically fully documented in its source code. How does that documentation go into the wiki again? Has it been automated yet? BTW, I've seen that the entire source code of gbh3 was wiped out by commit 5bb2f41b21b72: Remove '*.mo' files now automatically generated by the compiler, and other filed that should be ignored too. Surely that was by mistake? (I remember someone reporting spurious "gbh3 could not be compiled" errors. That's the reason why.) 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 cedron at exede.net Sun Feb 24 23:06:52 2019 From: cedron at exede.net (Cedron Dawg) Date: Sun, 24 Feb 2019 17:06:52 -0500 (EST) Subject: [Gambas-user] Distribution of custom shared libraries In-Reply-To: <20190224214225.GD28675@highrise.localdomain> References: <1717618006.105176456.1550851831192.JavaMail.zimbra@exede.net> <20190222194100.GA28675@highrise.localdomain> <711388928.105441173.1550866092779.JavaMail.zimbra@exede.net> <20190223003711.GC28675@highrise.localdomain> <200318024.106438940.1550933208926.JavaMail.zimbra@exede.net> <20190224214225.GD28675@highrise.localdomain> Message-ID: <1711149716.108237835.1551046012110.JavaMail.zimbra@exede.net> On Sat, 23 Feb 2019, Cedron Dawg wrote: > I think having a gp.GamePad (or gp.GameDevice, or gp.JoystickDevice, or whatever) would make programming a lot more attractive to the young gamer crowd. The game I wrote (still thinking of a good name for it) is meant to be a good starter template for beginning programmers to develop their own games. I'm not a gamer at all, but I thought it was a good project for me to evaluate Gambas' capabilities. The ease of interfacing to C code is a huge plus for me. > I called it gb.joystick for two reasons: (1) that's what it was already called on my computer and (2) it uses the Linux Joystick API. For games, the gb.sdl2 component is probably better suited, it just has to be developed more. I wrote my joystick component to be able to use a gamepad for operating an image viewer I wrote, instead of keyboard and mouse. I didn't want to load gb.sdl(2) just to get input via a gamepad and otherwise write the application in QT. But SDL has many more things if you actually want to develop a game, so you're more likely to just want to use SDL for everything in that case. > As to the original question, it would be really nice if there were a built in method through the IDE for .c shared libraries. I would suggest that they get their own category and every library would have to be submitted with a Gambas demo program which shows how the functions are to be used. Seeing as I only have a vague understanding of the whole packaging process, I haven't a clue how it should be done properly. I don't know about that. Bundling shared libraries sounds out of scope for the Gambas packager. The IDE handles Gambas projects, not C source files. Shipping a custom native library together with a component wrapper that makes it available to Gambas is not something I have seen someone doing, but it may be worth looking into. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk ======================================================================== Hi Tobi, Awesome, awesome, awesome. Does that mean I have to go to the gambas-daily PPA to install it? I'm a bit reluctant to be on the "bleeding edge", but if that's what it takes, I'll do it. Thank you, I will hold off posting my little game, until I have incorporated this new component. I guess I'll hold off any specific implementation questions until I play with it myself. As for the library, there are other libraries in the Package Manager that offer specific language wrappers for other languages, so I know it is possible to distribute the library that way. I have no experience preparing a library for broad distribution, but it must be doable. Since it is supposed to span any Gambas project, this is probably the appropriate path, but then the installation instructions from the farm package will have to include a reference to install that package. I wonder if it wouldn't be easier, if not better, to simply include the source code with a shell script to compile it. Ced From taboege at gmail.com Sun Feb 24 23:11:04 2019 From: taboege at gmail.com (Tobias Boege) Date: Sun, 24 Feb 2019 23:11:04 +0100 Subject: [Gambas-user] gb.joystick (and Where is my gbh3?) In-Reply-To: <20190224220233.GE28675@highrise.localdomain> References: <20190224220233.GE28675@highrise.localdomain> Message-ID: <20190224221104.GF28675@highrise.localdomain> On Sun, 24 Feb 2019, Tobias Boege wrote: > Attached is a fairly minimal toy program. -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk -------------- next part -------------- A non-text attachment was scrubbed... Name: joystick-test-0.0.1.tar.gz Type: application/gzip Size: 11616 bytes Desc: not available URL: -------------- 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 Sun Feb 24 23:33:10 2019 From: taboege at gmail.com (Tobias Boege) Date: Sun, 24 Feb 2019 23:33:10 +0100 Subject: [Gambas-user] Complex Numbers and Shared Libraries In-Reply-To: <230961450.108189344.1551042807771.JavaMail.zimbra@exede.net> References: <230961450.108189344.1551042807771.JavaMail.zimbra@exede.net> Message-ID: <20190224223310.GG28675@highrise.localdomain> On Sun, 24 Feb 2019, Cedron Dawg wrote: > Hello all, > > Well, I'd like to ask for some more specific technical advice. > > I am writing a wrapper shared library to access the FFTW library from Gambas. The design of that library requires that an input and output area be provided to a "preparation step", then subsequent calls use these areas, then they need to be freed. It is also a requirement that these areas don't move in memory. Therefore, I am having my wrapper allocate the memory and free it, rather than assume that a Gambas garbage collection won't move it. > Gambas is reference-counted, not garbage-collected, but you're right in not relying on that. Gambas has its own Alloc and Free [1] functions for dealing with exactly these requirements for external libraries. You don't have to write a C library to give you opaque areas of memory. You could also have Extern'd malloc and free directly from libc. > So far, I am able to get the address back to Gambas as a pointer. > > I can read the memory with either Float@ or reading a memory stream. No problem. I can write to the memory using a memory stream. No problem. > > First question: Is there any other method, particularly one that makes the memory access "look native"? Similar perhaps to how C allows you to use a pointer with array syntax. > There are embedded arrays [2] which should have a packed representation in memory like arrays in C, but I don't know if you can cast any pointer to such an array type and then use it successfully. > Now we come to the crux of my real question. The return values from a DFT is an array of complex numbers. In the FFTW library, a complex number is two adjacent floats in memory, the first being the real part and the second being the imaginary part. > > I seem to have three options: > > 1) Deal with two doubles > 2) Use the gb.gsl complex > 3) Use gb.complex > > The first I know I can do. The other two are mutually incompatible. Since I am likely to want to use the gsl for more stuff, I think I would like to use #2. > > I've been doing some experimenting and researching, and have not been able to figure out how to get the address of the actual values. Nor have I been able to read or write complex values to the remote memory area. > > Second question: Is this possible? > That should be very possible. If you have the two Floats (note: a C float is a Gambas Single, a C double is a Gambas Float), you can create a complex number object from them: ' ... get re and im from the library ... Dim z As New Complex(re, im) You can get the real and imaginary part back out of the object if you need to pass them again to the library later. gb.complex and gb.gsl both allow that. > I am proceeding under the assumption it is not. Any opinions on how I am doing things are welcome. I am still a newbie to Gambas. If you want to interface Gambas with C libraries, the -by far- cleanest solution is to write what is called a *native component* for Gambas. This is a C library itself which is written in the Gambas C framework. This framework consists of many preprocessor macros and an interpreter API. At the end of the day, this framework enables you to implement Gambas classes in C, so that you can access your target library properly in C, but present it as if it was written in Gambas. As a corollary, you don't have to wrestle with struct alignment issues anymore because all access to C structs is done from C code, not Gambas code. All this translation of struct definitions and functions from a C library into Gambas Struct and Extern declarations becomes really, really messy really, really fast. The downside is that currently native components have to live in the Gambas source tree and be compiled from there, so you are less flexible about the distribution of your component. I don't see why that has to stay like this though. The only thing you really need most of the time is the gambas.h header which might even be installed into /usr/include in a hypothetical future. Regards, Tobi [1] http://gambaswiki.org/wiki/lang/alloc [2] http://gambaswiki.org/wiki/lang/arraydecl -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From taboege at gmail.com Sun Feb 24 23:41:10 2019 From: taboege at gmail.com (Tobias Boege) Date: Sun, 24 Feb 2019 23:41:10 +0100 Subject: [Gambas-user] Distribution of custom shared libraries In-Reply-To: <1711149716.108237835.1551046012110.JavaMail.zimbra@exede.net> References: <1717618006.105176456.1550851831192.JavaMail.zimbra@exede.net> <20190222194100.GA28675@highrise.localdomain> <711388928.105441173.1550866092779.JavaMail.zimbra@exede.net> <20190223003711.GC28675@highrise.localdomain> <200318024.106438940.1550933208926.JavaMail.zimbra@exede.net> <20190224214225.GD28675@highrise.localdomain> <1711149716.108237835.1551046012110.JavaMail.zimbra@exede.net> Message-ID: <20190224224110.GH28675@highrise.localdomain> On Sun, 24 Feb 2019, Cedron Dawg wrote: > Does that mean I have to go to the gambas-daily PPA to install it? > > I'm a bit reluctant to be on the "bleeding edge", but if that's what it takes, I'll do it. Thank you, I will hold off posting my little game, until I have incorporated this new component. > Oh, it isn't in the master branch yet, so even if you installed the daily PPA, you wouldn't get it quite yet. I made a pull request for that branch so that Beno?t first has to comment on the interface or other aspects of the code before it is available even to daily users. Extra bleeding-edge people can checkout and compile the branch right now though. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From cedron at exede.net Sun Feb 24 23:57:49 2019 From: cedron at exede.net (Cedron Dawg) Date: Sun, 24 Feb 2019 17:57:49 -0500 (EST) Subject: [Gambas-user] Distribution of custom shared libraries In-Reply-To: <20190224224110.GH28675@highrise.localdomain> References: <1717618006.105176456.1550851831192.JavaMail.zimbra@exede.net> <20190222194100.GA28675@highrise.localdomain> <711388928.105441173.1550866092779.JavaMail.zimbra@exede.net> <20190223003711.GC28675@highrise.localdomain> <200318024.106438940.1550933208926.JavaMail.zimbra@exede.net> <20190224214225.GD28675@highrise.localdomain> <1711149716.108237835.1551046012110.JavaMail.zimbra@exede.net> <20190224224110.GH28675@highrise.localdomain> Message-ID: <2002515186.108269440.1551049069425.JavaMail.zimbra@exede.net> On Sun, 24 Feb 2019, Cedron Dawg wrote: > Does that mean I have to go to the gambas-daily PPA to install it? > > I'm a bit reluctant to be on the "bleeding edge", but if that's what it takes, I'll do it. Thank you, I will hold off posting my little game, until I have incorporated this new component. > Oh, it isn't in the master branch yet, so even if you installed the daily PPA, you wouldn't get it quite yet. I made a pull request for that branch so that Beno?t first has to comment on the interface or other aspects of the code before it is available even to daily users. Extra bleeding-edge people can checkout and compile the branch right now though. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk ============================================================= There's a learning curve for me here. I am reading "How To Deal With Git and Gitlab". I was also able to find your source code at "gitlab.com/gambas/gambas/blob/3b166c7f9b1e11a99938209fcaf3191fb726ccd8/main/lib/joystick/c_joystick.c", and have studied it some. My first experimentation with FFTW was to try to access it directly from Gambas. I went the wrapper approach because of the memory issue (rendered moot) and there seem to be data type declarations I don't know how to match to Gambas equivalents, complex being one case. I think I may write a "shared library code" to "Gambas component source". Don't hold your breath, I will have to do both manually to work out the details. Would you be willing to take an attempt of mine, quality control it, and install it if good enough? I don't think I am ready to swim in the deep end yet. Ced From g4mba5 at gmail.com Mon Feb 25 00:02:27 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Mon, 25 Feb 2019 00:02:27 +0100 Subject: [Gambas-user] gb.joystick (and Where is my gbh3?) In-Reply-To: <20190224220233.GE28675@highrise.localdomain> References: <20190224220233.GE28675@highrise.localdomain> Message-ID: > > One more thing: the component is basically fully documented in its > source code. How does that documentation go into the wiki again? > Has it been automated yet? BTW, I've seen that the entire source > code of gbh3 was wiped out by commit 5bb2f41b21b72: > > Remove '*.mo' files now automatically generated by the compiler, > and other filed that should be ignored too. > > Surely that was by mistake? (I remember someone reporting spurious > "gbh3 could not be compiled" errors. That's the reason why.) > > Regards, > Tobi > Oops. No idea why it was removed by the commit. Hopefully, the project is still in my repository, I will add it back. -- Beno?t Minisini From taboege at gmail.com Mon Feb 25 00:07:20 2019 From: taboege at gmail.com (Tobias Boege) Date: Mon, 25 Feb 2019 00:07:20 +0100 Subject: [Gambas-user] Distribution of custom shared libraries In-Reply-To: <2002515186.108269440.1551049069425.JavaMail.zimbra@exede.net> References: <1717618006.105176456.1550851831192.JavaMail.zimbra@exede.net> <20190222194100.GA28675@highrise.localdomain> <711388928.105441173.1550866092779.JavaMail.zimbra@exede.net> <20190223003711.GC28675@highrise.localdomain> <200318024.106438940.1550933208926.JavaMail.zimbra@exede.net> <20190224214225.GD28675@highrise.localdomain> <1711149716.108237835.1551046012110.JavaMail.zimbra@exede.net> <20190224224110.GH28675@highrise.localdomain> <2002515186.108269440.1551049069425.JavaMail.zimbra@exede.net> Message-ID: <20190224230720.GI28675@highrise.localdomain> On Sun, 24 Feb 2019, Cedron Dawg wrote: > I think I may write a "shared library code" to "Gambas component source". Don't hold your breath, I will have to do both manually to work out the details. Would you be willing to take an attempt of mine, quality control it, and install it if good enough? I don't think I am ready to swim in the deep end yet. > Sure. What's worse though is that there is no guide on how to develop native components. The best I know is in the "Developers" section of [1] which you presumably already found. But beware that information in there might be randomly outdated, in parts or whole. What I know I learned from reading source code and asking questions. We don't have a mailing list for Gambas development anymore, only for Gambas using. FWIW there is also an IRC channel #gambas on freenode for quicker and ephemeral discussion. [1] http://gambaswiki.org/wiki/ -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From cedron at exede.net Mon Feb 25 00:10:49 2019 From: cedron at exede.net (Cedron Dawg) Date: Sun, 24 Feb 2019 18:10:49 -0500 (EST) Subject: [Gambas-user] Complex Numbers and Shared Libraries In-Reply-To: <20190224223310.GG28675@highrise.localdomain> References: <230961450.108189344.1551042807771.JavaMail.zimbra@exede.net> <20190224223310.GG28675@highrise.localdomain> Message-ID: <2138973454.108293680.1551049849143.JavaMail.zimbra@exede.net> [...snip...] There are embedded arrays [2] which should have a packed representation in memory like arrays in C, but I don't know if you can cast any pointer to such an array type and then use it successfully. > Now we come to the crux of my real question. The return values from a DFT is an array of complex numbers. In the FFTW library, a complex number is two adjacent floats in memory, the first being the real part and the second being the imaginary part. > > I seem to have three options: > > 1) Deal with two doubles > 2) Use the gb.gsl complex > 3) Use gb.complex > > The first I know I can do. The other two are mutually incompatible. Since I am likely to want to use the gsl for more stuff, I think I would like to use #2. > > I've been doing some experimenting and researching, and have not been able to figure out how to get the address of the actual values. Nor have I been able to read or write complex values to the remote memory area. > > Second question: Is this possible? > That should be very possible. If you have the two Floats (note: a C float is a Gambas Single, a C double is a Gambas Float), you can create a complex number object from them: ' ... get re and im from the library ... Dim z As New Complex(re, im) You can get the real and imaginary part back out of the object if you need to pass them again to the library later. gb.complex and gb.gsl both allow that. > I am proceeding under the assumption it is not. Any opinions on how I am doing things are welcome. I am still a newbie to Gambas. If you want to interface Gambas with C libraries, the -by far- cleanest solution is to write what is called a *native component* for Gambas. This is a C library itself which is written in the Gambas C framework. This framework consists of many preprocessor macros and an interpreter API. At the end of the day, this framework enables you to implement Gambas classes in C, so that you can access your target library properly in C, but present it as if it was written in Gambas. As a corollary, you don't have to wrestle with struct alignment issues anymore because all access to C structs is done from C code, not Gambas code. All this translation of struct definitions and functions from a C library into Gambas Struct and Extern declarations becomes really, really messy really, really fast. The downside is that currently native components have to live in the Gambas source tree and be compiled from there, so you are less flexible about the distribution of your component. I don't see why that has to stay like this though. The only thing you really need most of the time is the gambas.h header which might even be installed into /usr/include in a hypothetical future. Regards, Tobi [1] http://gambaswiki.org/wiki/lang/alloc [2] http://gambaswiki.org/wiki/lang/arraydecl -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk ======================================================================= That's what I meant by the two doubles approach. I should have said floats, sorry. The ease of development and debugging is a big consideration for me. With a shared library, I can edit the source code in Pluma, press save, go to my terminal, hit up arrow/enter, then go to Gambas and press the run button. I don't see being able to make something easier than that. I really like that I can put temporary debug printf statements in my C code and see the output in the console. I'm also root on my machine, so putting a .so link in my /usr/lib or a .h in my /usr/include is not a problem. Ced From g4mba5 at gmail.com Mon Feb 25 00:57:37 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Mon, 25 Feb 2019 00:57:37 +0100 Subject: [Gambas-user] gb.joystick (and Where is my gbh3?) In-Reply-To: <20190224220233.GE28675@highrise.localdomain> References: <20190224220233.GE28675@highrise.localdomain> Message-ID: Le 24/02/2019 ? 23:02, Tobias Boege a ?crit?: > Hi all, > > I have just pushed two commits to the gb.joystick branch. This is > work that has been on my hard disk(s) since 2015, with a few bits > from Cedron Dawg mixed in. > > The component makes Linux' legacy Joystick API available to Gambas > without bells and whistles. You create a joystick by opening the > appropriate device /dev/input/jsX and then you receive Button or > Axis events when someone touches the thing. [ There is a newer > evdev API but the legacy one is nice too. ] > > Attached is a fairly minimal toy program. Please test it if you > have the hardware. > > One thing: The first commit on that branch had a concept of a > "stick" on your joystick which has two axes associated with it. > That's usually what you imagine a joystick/gamepad to have. > The second commit removes these notions because I realized that > sticks with only one axis exist. Maybe that's the reason why > the underlying Linux API refers to axes individually. And while > axes do seem to come in pairs on my gamepad, they do not always > come in the same order: sometimes the horizontal axis is index 0, > sometimes it is index 1. So, I decided to remove that logic and > leave the mapping of axes to the user. Tell me what you think. > > The interface of such a component should: 1) Hide the Linux specific things as much as possible. 2) Have the same interface whatever the underlying kernel API ('js' or 'evdev'). What do you think? Is it possible? In the case of someone who would want to make the component work on FreeBSD, or something else. I don't want to see one component by OS! -- Beno?t Minisini From gambas.fr at gmail.com Mon Feb 25 14:37:19 2019 From: gambas.fr at gmail.com (Fabien Bodard) Date: Mon, 25 Feb 2019 14:37:19 +0100 Subject: [Gambas-user] Distribution of custom shared libraries In-Reply-To: <20190224230720.GI28675@highrise.localdomain> References: <1717618006.105176456.1550851831192.JavaMail.zimbra@exede.net> <20190222194100.GA28675@highrise.localdomain> <711388928.105441173.1550866092779.JavaMail.zimbra@exede.net> <20190223003711.GC28675@highrise.localdomain> <200318024.106438940.1550933208926.JavaMail.zimbra@exede.net> <20190224214225.GD28675@highrise.localdomain> <1711149716.108237835.1551046012110.JavaMail.zimbra@exede.net> <20190224224110.GH28675@highrise.localdomain> <2002515186.108269440.1551049069425.JavaMail.zimbra@exede.net> <20190224230720.GI28675@highrise.localdomain> Message-ID: > > The best to learn how to devellop components is to read existing ones from > Benoit, or mine. We try to keep a coding noclamenture. How to naming vars How arrange code And some usual way to draw the api. This is important for the user experience. So he can use your component without learning curve. I'll keep a look this evening ? Ps : Benoit and Tobias's code are better than mine ? Look at gb.form gambas/comp/src/gb.form Regards, Fabien -------------- next part -------------- An HTML attachment was scrubbed... URL: From cedron at exede.net Mon Feb 25 15:30:16 2019 From: cedron at exede.net (Cedron Dawg) Date: Mon, 25 Feb 2019 09:30:16 -0500 (EST) Subject: [Gambas-user] Distribution of custom shared libraries In-Reply-To: References: <1717618006.105176456.1550851831192.JavaMail.zimbra@exede.net> <200318024.106438940.1550933208926.JavaMail.zimbra@exede.net> <20190224214225.GD28675@highrise.localdomain> <1711149716.108237835.1551046012110.JavaMail.zimbra@exede.net> <20190224224110.GH28675@highrise.localdomain> <2002515186.108269440.1551049069425.JavaMail.zimbra@exede.net> <20190224230720.GI28675@highrise.localdomain> Message-ID: <1736802430.108939972.1551105016808.JavaMail.zimbra@exede.net> The best to learn how to devellop components is to read existing ones from Benoit, or mine. We try to keep a coding noclamenture. How to naming vars How arrange code And some usual way to draw the api. This is important for the user experience. So he can use your component without learning curve. I'll keep a look this evening \uD83D\uDE0A Ps : Benoit and Tobias's code are better than mine \uD83D\uDE0A Look at gb.form gambas/comp/src/gb.form Regards, Fabien ===================================================================== Hi Fabien, I have a Tobias' gp.joystick, and Benoit's gp.gsl that I have been looking at. Haven't looked at yours yet. I've been coding for more than forty years, across many platforms/languages and have a coding style that works well in all. I don't care for cryptic names or crammed code. If you can't print it out and tape in on the wall and stand a good distance away and tell which part is which, your formatting is lacking. Sorry, Hungarian notation sucks. Nor is it universally applied in this code. Matching arrangement: Check "And some usual way to draw the api. ": Not sure what you mean. Naming variables: I'm crazy, you should do it my way. A variable name should fall into two categories: 1) Simple one or two letter (lower case), extremely local 2) A proper name A proper name has three parts: prefix + basename + suffix The prefix gives the scope of the variable and tells you where it is defined "the" local routine variable "arg" calling argument, read only "ret" calling argument, expected to be updated "my" module level variable, or property "our" static module level, or class property The basename is optional or can be compound. It is an occurrence specifier. If only one of a kind is being used, it isn't really necessary. Proper case, no underscores. The suffix tells you the kind of thing, which also implies its type. For instance, "Count" obviously means an integer, "Name" obviously means a string. Example: Typical way, you have a class with a property called lastName (following Java lower case convention): String lastName; ... void setLastName( String lastName ) { this.lastName = lastName; } My Way: String myLastName; ... void setLastName( String argLastName ) { myLastName = argLastName; } First off, way clearer. Second, and more importantly, now I want to copy it and change it to "FirstName". You do the math. Parallel Arrays (aka pseudo objects): theUser_FirstName[] theUser_LastName[] theUser_PhoneNumber[] theUser_EmailAddress[] theUser_StreetAddress[] Syntactically, the "_" replaces a "." and then the code appears to be an object. Only difference is the array index is at the end. Real Object: theUser[u].FirstName Pseudo Object: theUser_FirstName[u] If you follow these conventions, your code becomes almost readable as natural language: return theResult My two, very experienced, cents. From cedron at exede.net Mon Feb 25 15:45:21 2019 From: cedron at exede.net (Cedron Dawg) Date: Mon, 25 Feb 2019 09:45:21 -0500 (EST) Subject: [Gambas-user] gb.joystick (and Where is my gbh3?) In-Reply-To: References: <20190224220233.GE28675@highrise.localdomain> Message-ID: <106091404.108991905.1551105921926.JavaMail.zimbra@exede.net> Le 24/02/2019 ? 23:02, Tobias Boege a ?crit?: > Hi all, > > I have just pushed two commits to the gb.joystick branch. This is > work that has been on my hard disk(s) since 2015, with a few bits > from Cedron Dawg mixed in. > > The component makes Linux' legacy Joystick API available to Gambas > without bells and whistles. You create a joystick by opening the > appropriate device /dev/input/jsX and then you receive Button or > Axis events when someone touches the thing. [ There is a newer > evdev API but the legacy one is nice too. ] > > Attached is a fairly minimal toy program. Please test it if you > have the hardware. > > One thing: The first commit on that branch had a concept of a > "stick" on your joystick which has two axes associated with it. > That's usually what you imagine a joystick/gamepad to have. > The second commit removes these notions because I realized that > sticks with only one axis exist. Maybe that's the reason why > the underlying Linux API refers to axes individually. And while > axes do seem to come in pairs on my gamepad, they do not always > come in the same order: sometimes the horizontal axis is index 0, > sometimes it is index 1. So, I decided to remove that logic and > leave the mapping of axes to the user. Tell me what you think. > > The interface of such a component should: 1) Hide the Linux specific things as much as possible. 2) Have the same interface whatever the underlying kernel API ('js' or 'evdev'). What do you think? Is it possible? In the case of someone who would want to make the component work on FreeBSD, or something else. I don't want to see one component by OS! -- Beno?t Minisini ============================================================= Hi Benoit, I am working on an evdev version as a C console program. When I get that working, I plan to pound it into gb.* style code, following Tobi's example. I don't quite totally agree with his interface design, but I should be able to match it. If there is a serious disagreement, perhaps we can arm wrestle. Ced From g4mba5 at gmail.com Mon Feb 25 15:56:48 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Mon, 25 Feb 2019 15:56:48 +0100 Subject: [Gambas-user] gb.joystick (and Where is my gbh3?) In-Reply-To: <106091404.108991905.1551105921926.JavaMail.zimbra@exede.net> References: <20190224220233.GE28675@highrise.localdomain> <106091404.108991905.1551105921926.JavaMail.zimbra@exede.net> Message-ID: <97ee12e3-153a-b47a-53b5-43567491c7fc@gmail.com> Le 25/02/2019 ? 15:45, Cedron Dawg a ?crit?: > Le 24/02/2019 ? 23:02, Tobias Boege a ?crit?: >> Hi all, >> >> I have just pushed two commits to the gb.joystick branch. This is >> work that has been on my hard disk(s) since 2015, with a few bits >> from Cedron Dawg mixed in. >> >> The component makes Linux' legacy Joystick API available to Gambas >> without bells and whistles. You create a joystick by opening the >> appropriate device /dev/input/jsX and then you receive Button or >> Axis events when someone touches the thing. [ There is a newer >> evdev API but the legacy one is nice too. ] >> >> Attached is a fairly minimal toy program. Please test it if you >> have the hardware. >> >> One thing: The first commit on that branch had a concept of a >> "stick" on your joystick which has two axes associated with it. >> That's usually what you imagine a joystick/gamepad to have. >> The second commit removes these notions because I realized that >> sticks with only one axis exist. Maybe that's the reason why >> the underlying Linux API refers to axes individually. And while >> axes do seem to come in pairs on my gamepad, they do not always >> come in the same order: sometimes the horizontal axis is index 0, >> sometimes it is index 1. So, I decided to remove that logic and >> leave the mapping of axes to the user. Tell me what you think. >> >> > The interface of such a component should: > > 1) Hide the Linux specific things as much as possible. > > 2) Have the same interface whatever the underlying kernel API ('js' or > 'evdev'). > > What do you think? Is it possible? > > In the case of someone who would want to make the component work on > FreeBSD, or something else. > > I don't want to see one component by OS! > > -- Beno?t Minisini > ============================================================= Hi Benoit, > I am working on an evdev version as a C console program. When I get that > working, I plan to pound it into gb.* style code, following Tobi's > example. I don't quite totally agree with his interface design, but I > should be able to match it. If there is a serious disagreement, perhaps > we can arm wrestle. Ced Hi, Please don't put your answer without quoting! As your answer is written after the signature of the mail you are answering to, Thunderbird thinks it's part of that signature. As for the stuff Tobias and you deal with, if Gambas interpreter had an interface to ioctl(), I think that all the joystick stuff could be written entirely in Gambas. What do Tobias and you think about that? -- Beno?t Minisini From cedron at exede.net Mon Feb 25 16:08:25 2019 From: cedron at exede.net (Cedron Dawg) Date: Mon, 25 Feb 2019 10:08:25 -0500 (EST) Subject: [Gambas-user] gb.joystick (and Where is my gbh3?) In-Reply-To: <97ee12e3-153a-b47a-53b5-43567491c7fc@gmail.com> References: <20190224220233.GE28675@highrise.localdomain> <106091404.108991905.1551105921926.JavaMail.zimbra@exede.net> <97ee12e3-153a-b47a-53b5-43567491c7fc@gmail.com> Message-ID: <1049045532.109025081.1551107305304.JavaMail.zimbra@exede.net> I'm sorry. I just checked my email preferences and could not find a way to have it introduce the ">" lines. I guess I should top post from now on. [...snip...] Well, the in the Joystick model, you have to call the IOCTLs yourself. In the evdev model, it is hidden from you. So, in order to do it in Gambas, the functionality of evdev would in essence have to be replicated. Can I assume you have a strong preference for components to be written in Gambas? I will give accessing evdev via Gambas a shot as soon as I figure out how it works. Ced =================================================================== Hi, Please don't put your answer without quoting! As your answer is written after the signature of the mail you are answering to, Thunderbird thinks it's part of that signature. As for the stuff Tobias and you deal with, if Gambas interpreter had an interface to ioctl(), I think that all the joystick stuff could be written entirely in Gambas. What do Tobias and you think about that? -- Beno?t Minisini ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- From g4mba5 at gmail.com Mon Feb 25 16:16:26 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Mon, 25 Feb 2019 16:16:26 +0100 Subject: [Gambas-user] gb.joystick (and Where is my gbh3?) In-Reply-To: <1049045532.109025081.1551107305304.JavaMail.zimbra@exede.net> References: <20190224220233.GE28675@highrise.localdomain> <106091404.108991905.1551105921926.JavaMail.zimbra@exede.net> <97ee12e3-153a-b47a-53b5-43567491c7fc@gmail.com> <1049045532.109025081.1551107305304.JavaMail.zimbra@exede.net> Message-ID: <17d4b8c1-d61c-5fae-f72e-0a180ff3286a@gmail.com> Le 25/02/2019 ? 16:08, Cedron Dawg a ?crit : > I'm sorry. I just checked my email preferences and could not find a > way to have it introduce the ">" lines. I guess I should top post > from now on. > > [...snip...] > > Well, the in the Joystick model, you have to call the IOCTLs > yourself. In the evdev model, it is hidden from you. So, in order > to do it in Gambas, the functionality of evdev would in essence have > to be replicated. I don't know how evdev works. But it's usually opening a device file, ioctl() on it, watching it. Opening and watching is already implemented in Gambas. But not ioctl() that are device-specific. Doing ioctl() in Gambas will anyway be boring, as you have to define all the ioctl specific constants by hand. But maybe a program could be written that would parse the kernel headers to generate the constant definitions in Gambas... > > Can I assume you have a strong preference for components to be > written in Gambas? No, because it is usually harder with Gambas to deal with C structures used by system calls. I told that only for people who are afraid to make a component in C following the badly documented Gambas interpreter interface. -- Beno?t Minisini From cedron at exede.net Mon Feb 25 17:46:14 2019 From: cedron at exede.net (Cedron Dawg) Date: Mon, 25 Feb 2019 11:46:14 -0500 (EST) Subject: [Gambas-user] gb.joystick (and Where is my gbh3?) In-Reply-To: <17d4b8c1-d61c-5fae-f72e-0a180ff3286a@gmail.com> References: <20190224220233.GE28675@highrise.localdomain> <106091404.108991905.1551105921926.JavaMail.zimbra@exede.net> <97ee12e3-153a-b47a-53b5-43567491c7fc@gmail.com> <1049045532.109025081.1551107305304.JavaMail.zimbra@exede.net> <17d4b8c1-d61c-5fae-f72e-0a180ff3286a@gmail.com> Message-ID: <1505274327.109137207.1551113174568.JavaMail.zimbra@exede.net> Here is my console evdev demonstation .c program. It is not exhaustive of evdev capability, but enough to run my game, once incorporated. Actually, I am considering writing an library .h reader that will write starter gb.component code. Of course, I'll do it in Gambas. Enjoy, Ced ============================================================== I don't know how evdev works. But it's usually opening a device file, ioctl() on it, watching it. Opening and watching is already implemented in Gambas. But not ioctl() that are device-specific. Doing ioctl() in Gambas will anyway be boring, as you have to define all the ioctl specific constants by hand. But maybe a program could be written that would parse the kernel headers to generate the constant definitions in Gambas... > > Can I assume you have a strong preference for components to be > written in Gambas? No, because it is usually harder with Gambas to deal with C structures used by system calls. I told that only for people who are afraid to make a component in C following the badly documented Gambas interpreter interface. -- Beno?t Minisini ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- -------------- next part -------------- A non-text attachment was scrubbed... Name: evdev_test.c Type: text/x-c++src Size: 9304 bytes Desc: not available URL: From g4mba5 at gmail.com Mon Feb 25 18:50:52 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Mon, 25 Feb 2019 18:50:52 +0100 Subject: [Gambas-user] gb.joystick (and Where is my gbh3?) In-Reply-To: <1505274327.109137207.1551113174568.JavaMail.zimbra@exede.net> References: <20190224220233.GE28675@highrise.localdomain> <106091404.108991905.1551105921926.JavaMail.zimbra@exede.net> <97ee12e3-153a-b47a-53b5-43567491c7fc@gmail.com> <1049045532.109025081.1551107305304.JavaMail.zimbra@exede.net> <17d4b8c1-d61c-5fae-f72e-0a180ff3286a@gmail.com> <1505274327.109137207.1551113174568.JavaMail.zimbra@exede.net> Message-ID: <428dcad7-aa9a-a993-3413-447025682278@gmail.com> Le 25/02/2019 ? 17:46, Cedron Dawg a ?crit?: > Here is my console evdev demonstation .c program. It is not exhaustive of evdev capability, but enough to run my game, once incorporated. > > Actually, I am considering writing an library .h reader that will write starter gb.component code. Of course, I'll do it in Gambas. > > Enjoy, > > Ced > If it's more generic, and it's the offical way of dealing with inputs libevdev seems a better choice. I think then that the best solution is doing a "gb.input" (or something like that) component with: - A part written in C that implements all needed utilities functions based on libevdev. - A part written in Gambas that implements the actual public interface in a clean, easy and beautiful way. This interface will make the difference between a joystick, a keyboard, a mouse, etc. so that the user does not have to handle the evdev way of seeing devices. Note: yes, a component can have both a C and a gambas part. Regards, -- Beno?t Minisini From taboege at gmail.com Mon Feb 25 19:19:45 2019 From: taboege at gmail.com (Tobias Boege) Date: Mon, 25 Feb 2019 19:19:45 +0100 Subject: [Gambas-user] gb.joystick (and Where is my gbh3?) In-Reply-To: <428dcad7-aa9a-a993-3413-447025682278@gmail.com> References: <20190224220233.GE28675@highrise.localdomain> <106091404.108991905.1551105921926.JavaMail.zimbra@exede.net> <97ee12e3-153a-b47a-53b5-43567491c7fc@gmail.com> <1049045532.109025081.1551107305304.JavaMail.zimbra@exede.net> <17d4b8c1-d61c-5fae-f72e-0a180ff3286a@gmail.com> <1505274327.109137207.1551113174568.JavaMail.zimbra@exede.net> <428dcad7-aa9a-a993-3413-447025682278@gmail.com> Message-ID: <20190225181945.GJ28675@highrise.localdomain> On Mon, 25 Feb 2019, Beno?t Minisini wrote: > I think then that the best solution is doing a "gb.input" (or something like > that) component with: > Caution: a libinput also exists. -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From cedron at exede.net Mon Feb 25 19:35:53 2019 From: cedron at exede.net (Cedron Dawg) Date: Mon, 25 Feb 2019 13:35:53 -0500 (EST) Subject: [Gambas-user] gb.joystick (and Where is my gbh3?) In-Reply-To: <428dcad7-aa9a-a993-3413-447025682278@gmail.com> References: <20190224220233.GE28675@highrise.localdomain> <106091404.108991905.1551105921926.JavaMail.zimbra@exede.net> <97ee12e3-153a-b47a-53b5-43567491c7fc@gmail.com> <1049045532.109025081.1551107305304.JavaMail.zimbra@exede.net> <17d4b8c1-d61c-5fae-f72e-0a180ff3286a@gmail.com> <1505274327.109137207.1551113174568.JavaMail.zimbra@exede.net> <428dcad7-aa9a-a993-3413-447025682278@gmail.com> Message-ID: <802053495.109229265.1551119753486.JavaMail.zimbra@exede.net> In my original testing, instead of going to the "/dev/input/by-id" directory, I tried opening the "/dev/input/event##" files directly in a loop. There are two problems with this approach. First, without doing a directory read, I have no way of know the number to scan. Not a big deal, just pick a big number, but that's sloppy. Second, and this is significant, only the joystick/gamepad devices were successfully opened. My preference would be to have a specific gamepad/joystick component. I think this would be easier for newbies to find and use rather than having to find a subset of a more generic model. The function call names could also then be more descriptive. I've started looking at gb.* component code. Besides Tobi's c_joystick.c program, are there any component modules Gambas/C that you feel would be particularly good for me to study? Between you, me, and Tobi, and perhaps anybody else, where do we go from here? =================================================== If it's more generic, and it's the offical way of dealing with inputs libevdev seems a better choice. I think then that the best solution is doing a "gb.input" (or something like that) component with: - A part written in C that implements all needed utilities functions based on libevdev. - A part written in Gambas that implements the actual public interface in a clean, easy and beautiful way. This interface will make the difference between a joystick, a keyboard, a mouse, etc. so that the user does not have to handle the evdev way of seeing devices. Note: yes, a component can have both a C and a gambas part. Regards, -- Beno?t Minisini ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- From pinozollo at gmail.com Mon Feb 25 20:14:04 2019 From: pinozollo at gmail.com (Pino Zollo) Date: Mon, 25 Feb 2019 16:14:04 -0300 Subject: [Gambas-user] Crash Gambas3.12.2 Message-ID: <70cb1f57-f8de-2685-b01f-1570e002d508@gmail.com> Playing with serial port I have met a simple program that crashes the IDE. where can I send it ? Pino From t.lee.davidson at gmail.com Mon Feb 25 20:16:42 2019 From: t.lee.davidson at gmail.com (T Lee Davidson) Date: Mon, 25 Feb 2019 14:16:42 -0500 Subject: [Gambas-user] Crash Gambas3.12.2 In-Reply-To: <70cb1f57-f8de-2685-b01f-1570e002d508@gmail.com> References: <70cb1f57-f8de-2685-b01f-1570e002d508@gmail.com> Message-ID: It it's small enough (less than 256k), just send it to the list as an attachment. ___ Lee On 2/25/19 2:14 PM, Pino Zollo wrote: > Playing with serial port I have met a simple program that crashes the IDE. > > where can I send it ? > > Pino > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > From pinozollo at gmail.com Tue Feb 26 18:24:29 2019 From: pinozollo at gmail.com (Pino Zollo) Date: Tue, 26 Feb 2019 14:24:29 -0300 Subject: [Gambas-user] Crash Gambas3.12.2 Message-ID: <8fb80765-c2d0-02d9-d6b3-827e89d14d80@gmail.com> Here it is....only 12 KB... Run it and Just click on the button. ...the IDE closes. Thanks Pino Zollo -------------- next part -------------- A non-text attachment was scrubbed... Name: CrashG3-0.0.1.tar.gz Type: application/gzip Size: 12552 bytes Desc: not available URL: From genbraga1 at gmail.com Tue Feb 26 18:37:03 2019 From: genbraga1 at gmail.com (gen braga) Date: Tue, 26 Feb 2019 14:37:03 -0300 Subject: [Gambas-user] Crash Gambas3.12.2 In-Reply-To: <8fb80765-c2d0-02d9-d6b3-827e89d14d80@gmail.com> References: <8fb80765-c2d0-02d9-d6b3-827e89d14d80@gmail.com> Message-ID: If you make the executable, works fine. Only when ran under the IDE It crashes... Gen. Em ter, 26 de fev de 2019 14:25, Pino Zollo escreveu: > Here it is....only 12 KB... > > Run it and Just click on the button. > > ...the IDE closes. > > Thanks > > Pino Zollo > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.lee.davidson at gmail.com Tue Feb 26 18:46:47 2019 From: t.lee.davidson at gmail.com (T Lee Davidson) Date: Tue, 26 Feb 2019 12:46:47 -0500 Subject: [Gambas-user] Crash Gambas3.12.2 In-Reply-To: References: <8fb80765-c2d0-02d9-d6b3-827e89d14d80@gmail.com> Message-ID: <1d57f95b-8de4-0a56-a5fd-989296322ac7@gmail.com> Same here Gen. Run in the IDE, it crashes at "Debug PacketH" which attempts to output a string with non-ascii characters. Commenting that line allows to project to run. ___ Lee On 2/26/19 12:37 PM, gen braga wrote: > If you make the executable, works fine. Only when ran under the IDE It crashes... > > Gen. > > Em ter, 26 de fev de 2019 14:25, Pino Zollo > escreveu: > > Here it is....only 12 KB... > > Run it and Just click on the button. > > ...the IDE closes. > > Thanks > > Pino Zollo > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > From genbraga1 at gmail.com Tue Feb 26 18:52:53 2019 From: genbraga1 at gmail.com (gen braga) Date: Tue, 26 Feb 2019 14:52:53 -0300 Subject: [Gambas-user] Crash Gambas3.12.2 In-Reply-To: <1d57f95b-8de4-0a56-a5fd-989296322ac7@gmail.com> References: <8fb80765-c2d0-02d9-d6b3-827e89d14d80@gmail.com> <1d57f95b-8de4-0a56-a5fd-989296322ac7@gmail.com> Message-ID: Try sending as byte: Dim packet as new byte[] Packet=[1,2,3,4,5] For each b as byte in packet Write #sport, b as byte Next Or something like It. Gen. Em ter, 26 de fev de 2019 14:47, T Lee Davidson escreveu: > Same here Gen. Run in the IDE, it crashes at "Debug PacketH" which > attempts to output a string with non-ascii characters. > Commenting that line allows to project to run. > > > ___ > Lee > > > On 2/26/19 12:37 PM, gen braga wrote: > > If you make the executable, works fine. Only when ran under the IDE It > crashes... > > > > Gen. > > > > Em ter, 26 de fev de 2019 14:25, Pino Zollo > escreveu: > > > > Here it is....only 12 KB... > > > > Run it and Just click on the button. > > > > ...the IDE closes. > > > > Thanks > > > > Pino Zollo > > > > > > ----[ 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 genbraga1 at gmail.com Tue Feb 26 19:09:53 2019 From: genbraga1 at gmail.com (gen braga) Date: Tue, 26 Feb 2019 15:09:53 -0300 Subject: [Gambas-user] Crash Gambas3.12.2 In-Reply-To: <1d57f95b-8de4-0a56-a5fd-989296322ac7@gmail.com> References: <8fb80765-c2d0-02d9-d6b3-827e89d14d80@gmail.com> <1d57f95b-8de4-0a56-a5fd-989296322ac7@gmail.com> Message-ID: Ops, my bad. Didnt read last line of ur reply... Em ter, 26 de fev de 2019 14:47, T Lee Davidson escreveu: > Same here Gen. Run in the IDE, it crashes at "Debug PacketH" which > attempts to output a string with non-ascii characters. > Commenting that line allows to project to run. > > > ___ > Lee > > > On 2/26/19 12:37 PM, gen braga wrote: > > If you make the executable, works fine. Only when ran under the IDE It > crashes... > > > > Gen. > > > > Em ter, 26 de fev de 2019 14:25, Pino Zollo > escreveu: > > > > Here it is....only 12 KB... > > > > Run it and Just click on the button. > > > > ...the IDE closes. > > > > Thanks > > > > Pino Zollo > > > > > > ----[ 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 Tue Feb 26 19:13:16 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Tue, 26 Feb 2019 19:13:16 +0100 Subject: [Gambas-user] Crash Gambas3.12.2 In-Reply-To: <8fb80765-c2d0-02d9-d6b3-827e89d14d80@gmail.com> References: <8fb80765-c2d0-02d9-d6b3-827e89d14d80@gmail.com> Message-ID: <06b45d04-98d5-1cda-a941-9d9142dc5b68@gmail.com> Le 26/02/2019 ? 18:24, Pino Zollo a ?crit?: > Here it is....only 12 KB... > > Run it and Just click on the button. > > ...the IDE closes. > > Thanks > > Pino Zollo > > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > Mmm... I have no crash at all. The non UTF-8 characters display rubbish, but no crash. -- Beno?t Minisini From t.lee.davidson at gmail.com Tue Feb 26 19:20:03 2019 From: t.lee.davidson at gmail.com (T Lee Davidson) Date: Tue, 26 Feb 2019 13:20:03 -0500 Subject: [Gambas-user] Crash Gambas3.12.2 In-Reply-To: <06b45d04-98d5-1cda-a941-9d9142dc5b68@gmail.com> References: <8fb80765-c2d0-02d9-d6b3-827e89d14d80@gmail.com> <06b45d04-98d5-1cda-a941-9d9142dc5b68@gmail.com> Message-ID: <6c55cc3a-8e5b-4003-d244-3543348bc1dd@gmail.com> On 2/26/19 1:13 PM, Beno?t Minisini wrote: > Le 26/02/2019 ? 18:24, Pino Zollo a ?crit?: >> Here it is....only 12 KB... >> >> Run it and Just click on the button. >> >> ...the IDE closes. >> >> Thanks >> >> Pino Zollo >> >> >> >> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- >> > > Mmm... I have no crash at all. The non UTF-8 characters display rubbish, but no crash. > It crashes for me on the "Debug PacketH" statement. Looping through the bytes and using Print works fine. Debug "PacketH: ", For i As Integer = 1 To Len(PacketH) Print Asc(PacketH, i), Next Print ___ Lee [System] Gambas=3.12.90 1f7394694 (master) OperatingSystem=Linux Kernel=4.4.172-86-default Architecture=x86_64 Distribution=openSUSE Leap 42.3 Desktop=KDE5 Theme=QtCurve Language=en_US.UTF-8 Memory=3951M [Libraries] Cairo=/usr/lib64/libcairo.so.2.11502.0 Curl=/usr/lib64/libcurl.so.4.3.0 DBus=/lib64/libdbus-1.so.3.8.14 GStreamer=/usr/lib64/libgstreamer-0.10.so.0.30.0 GStreamer=/usr/lib64/libgstreamer-1.0.so.0.803.0 GTK+2=/usr/lib64/libgtk-x11-2.0.so.0.2400.31 GTK+3=/usr/lib64/libgtk-3.so.0.2000.10 OpenGL=/usr/lib64/libGL.so.1.2.0 Poppler=/usr/lib64/libpoppler.so.60.0.0 QT4=/usr/lib64/libQtCore.so.4.8.7 QT5=/usr/lib64/libQt5Core.so.5.6.2 SDL=/usr/lib64/libSDL-1.2.so.0.11.4 SQLite=/usr/lib64/libsqlite3.so.0.8.6 [Environment] [snip] From cedron at exede.net Tue Feb 26 19:36:38 2019 From: cedron at exede.net (Cedron Dawg) Date: Tue, 26 Feb 2019 13:36:38 -0500 (EST) Subject: [Gambas-user] Gambas Header Files Message-ID: <1966464177.110581531.1551206198303.JavaMail.zimbra@exede.net> Hello all, As part of me getting the lay of the land, so to speak, I have written a scanner program that walks the "gambas-master" (maybe a week old) directory tree and finds all the header (.h) files. So far I have determined all the versions of all the files and where they are located. My initial output is attached (40K). As I produce other files, I will build in links. In database diagram nomenclature, this is what I have in memory at this time: =================== ================== : HeaderFileNames : : Directories : =================== ================== 1 1 | | M | ======================= | : HeaderFileVarieties : | ======================= | 1 1 | | | | | M M | ========================= | : HeaderFileLocations : | ========================= | | M ================= : LinesOfCode : ================= To this, I will be adding Structs and Defines. The reason I am posting this is I'm taking requests. What other info about .h files would you like reported? Any other file types you want scanned? For What? Current source code available on request by email. Of course it is written in Gambas. I'll upload it to the farm when it is suitably advance, which will be a while. Ced -------------- next part -------------- An HTML attachment was scrubbed... URL: From cedron at exede.net Tue Feb 26 22:40:05 2019 From: cedron at exede.net (Cedron Dawg) Date: Tue, 26 Feb 2019 16:40:05 -0500 (EST) Subject: [Gambas-user] Gambas Header Files In-Reply-To: <1966464177.110581531.1551206198303.JavaMail.zimbra@exede.net> References: <1966464177.110581531.1551206198303.JavaMail.zimbra@exede.net> Message-ID: <1015503898.110846100.1551217205170.JavaMail.zimbra@exede.net> Alright, the Defines are done, I think. There are some strange entries I need to verify. Attached is the output for the first ten .h files (~26k). The full table is ~460K so I am not including it. Please let me know if you spot any errors. Suggestions for HTML formatting welcome. The full list or source code available upon request via email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cedron at exede.net Tue Feb 26 22:53:30 2019 From: cedron at exede.net (Cedron Dawg) Date: Tue, 26 Feb 2019 16:53:30 -0500 (EST) Subject: [Gambas-user] Gambas Header Files In-Reply-To: <1015503898.110846100.1551217205170.JavaMail.zimbra@exede.net> References: <1966464177.110581531.1551206198303.JavaMail.zimbra@exede.net> <1015503898.110846100.1551217205170.JavaMail.zimbra@exede.net> Message-ID: <1695013455.110854837.1551218010658.JavaMail.zimbra@exede.net> Oop, I did my Replace syntax wrong (Still catching on, but am really appreciating the richness of Gambas compared to VB). Tabs were not replaced, so here is the corrected version. Side note: Real programmers use spaces only. Flame away if you like about that, but don your Teflon underwear first. ;-) -------------- next part -------------- An HTML attachment was scrubbed... URL: From taboege at gmail.com Tue Feb 26 22:57:11 2019 From: taboege at gmail.com (Tobias Boege) Date: Tue, 26 Feb 2019 22:57:11 +0100 Subject: [Gambas-user] Gambas Header Files In-Reply-To: <1966464177.110581531.1551206198303.JavaMail.zimbra@exede.net> References: <1966464177.110581531.1551206198303.JavaMail.zimbra@exede.net> Message-ID: <20190226215711.GK28675@highrise.localdomain> On Tue, 26 Feb 2019, Cedron Dawg wrote: > As part of me getting the lay of the land, so to speak, I have written a scanner program that walks the "gambas-master" (maybe a week old) directory tree and finds all the header (.h) files. > > So far I have determined all the versions of all the files and where they are located. My initial output is attached (40K). As I produce other files, I will build in links. > > [...] > > To this, I will be adding Structs and Defines. > > The reason I am posting this is I'm taking requests. What other info about .h files would you like reported? > > Any other file types you want scanned? For What? > Do you know ctags [1]? It does all of that and more. I highly recommend it when working with Gambas' core. Regards, Tobi [1] https://en.wikipedia.org/wiki/Ctags -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From cedron at exede.net Tue Feb 26 23:05:36 2019 From: cedron at exede.net (Cedron Dawg) Date: Tue, 26 Feb 2019 17:05:36 -0500 (EST) Subject: [Gambas-user] Gambas Header Files In-Reply-To: <20190226215711.GK28675@highrise.localdomain> References: <1966464177.110581531.1551206198303.JavaMail.zimbra@exede.net> <20190226215711.GK28675@highrise.localdomain> Message-ID: <594557622.110863523.1551218736325.JavaMail.zimbra@exede.net> No, I was not aware of that, thanks. Even if it could produce this, I doubt I could turn around and use it as a code generator/fixer. Hey Benoit, wanna talk about "__attribute__ ((packed))" and using data types? >From usb.hP: struct usb_hid_descriptor { uint8_t bLength; uint8_t bDescriptorType; uint16_t bcdHID; uint8_t bCountryCode; uint8_t bNumDescriptors; /* uint8_t bReportDescriptorType; */ /* uint16_t wDescriptorLength; */ /* ... */ } __attribute__ ((packed)); ================================================== [...snip...] Do you know ctags [1]? It does all of that and more. I highly recommend it when working with Gambas' core. Regards, Tobi [1] https://en.wikipedia.org/wiki/Ctags -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- From cedron at exede.net Tue Feb 26 23:43:19 2019 From: cedron at exede.net (Cedron Dawg) Date: Tue, 26 Feb 2019 17:43:19 -0500 (EST) Subject: [Gambas-user] Gambas Header Files In-Reply-To: <594557622.110863523.1551218736325.JavaMail.zimbra@exede.net> References: <1966464177.110581531.1551206198303.JavaMail.zimbra@exede.net> <20190226215711.GK28675@highrise.localdomain> <594557622.110863523.1551218736325.JavaMail.zimbra@exede.net> Message-ID: <511893252.110902537.1551220999892.JavaMail.zimbra@exede.net> Apples and oranges. I assumed that Ctags was a reporting tool. So there must be a utility that scans codes and generates tag files, which then allows your editor to jump to the symbol definition. Do I have that right? Slick, but that's not how I like to work. Seeing all the defines in one place is helpful for me as well. This project is part of a learning exercise for me. Having useful report files as output is a beneficial side effect. I'm trying to work towards a solution that solves the struct incompatibility problem in an entirely automated way. That may have an impact on how component files are best architected. That is part of a larger goal of being able to automatically generate shell components for existing libraries. I'm thinking about libusb and a full implementation of the Gnu Scientific Library. Way too much work to do manually. ======================================== [...snip...] Do you know ctags [1]? It does all of that and more. I highly recommend it when working with Gambas' core. Regards, Tobi [1] https://en.wikipedia.org/wiki/Ctags -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- From jussi.lahtinen at gmail.com Tue Feb 26 23:47:08 2019 From: jussi.lahtinen at gmail.com (Jussi Lahtinen) Date: Wed, 27 Feb 2019 00:47:08 +0200 Subject: [Gambas-user] Crash Gambas3.12.2 In-Reply-To: <06b45d04-98d5-1cda-a941-9d9142dc5b68@gmail.com> References: <8fb80765-c2d0-02d9-d6b3-827e89d14d80@gmail.com> <06b45d04-98d5-1cda-a941-9d9142dc5b68@gmail.com> Message-ID: The IDE freeze, but gdb says it crashes. The back trace is weird... (gdb) run Starting program: /usr/bin/gbx3 [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". gb.gui.qt: warning: 'gb.qt5' component not found, using 'gb.qt4' instead [New Thread 0x7fffd7bd3700 (LWP 4274)] [New Thread 0x7fff96de9700 (LWP 4275)] [New Thread 0x7fff965e8700 (LWP 4276)] [New Thread 0x7fff95c01700 (LWP 4277)] Thread 1 "gbx3" received signal SIGSEGV, Segmentation fault. __memcpy_ssse3 () at ../sysdeps/x86_64/multiarch/memcpy-ssse3.S:2940 2940 ../sysdeps/x86_64/multiarch/memcpy-ssse3.S: No such file or directory. (gdb) bt #0 0x00007ffff7b53062 in __memcpy_ssse3 () at ../sysdeps/x86_64/multiarch/memcpy-ssse3.S:2940 #1 0x00005555555b8082 in memcpy (__len=18446744073709551615, __src=0x555556a28bef, __dest=) at /usr/include/x86_64-linux-gnu/bits/string_fortified.h:34 #2 0x00005555555b8082 in STRING_new (src=0x555556a28bef "", len=-1) at gbx_string.c:320 #3 0x00005555555bbc68 in VALUE_write (value=0x7ffff640e220, addr=0x555556689f20, type=) at gbx_value.c:1136 #4 0x00005555555bbdb1 in VALUE_class_write (class=, value=, addr=, ctype=...) at gbx_value.c:1537 #5 0x00005555555aee01 in EXEC_loop () at gbx_exec_loop.c:1716 #6 0x00005555555b2fbd in EXEC_function_loop () at gbx_exec.c:913 #7 0x00005555555b3432 in EXEC_function_real () at gbx_exec.c:900 #8 0x00005555555b4774 in EXEC_public_desc (class=, object=, desc=, nparam=) at gbx_exec.c:1593 #9 0x000055555558def0 in raise_event (observer=, observer at entry=0x555555c2e408, object=object at entry=0x5555566a9318, func_id=175, func_id at entry=176, nparam=nparam at entry=0) at gbx_api.c:794 #10 0x000055555558e1b0 in GB_Raise (object=object at entry=0x5555566a9318, event_id=0, nparam=nparam at entry=0) at gbx_api.c:926 #11 0x00005555555a7d77 in trigger_timer (_object=_object at entry =0x5555566a9318) at gbx_c_timer.c:162 Jussi On Tue, Feb 26, 2019 at 8:14 PM Beno?t Minisini wrote: > Le 26/02/2019 ? 18:24, Pino Zollo a ?crit : > > Here it is....only 12 KB... > > > > Run it and Just click on the button. > > > > ...the IDE closes. > > > > Thanks > > > > Pino Zollo > > > > > > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > > > > Mmm... I have no crash at all. The non UTF-8 characters display rubbish, > but no crash. > > -- > Beno?t Minisini > > ----[ 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: sysinfo Type: application/octet-stream Size: 2244 bytes Desc: not available URL: From cedron at exede.net Wed Feb 27 14:53:57 2019 From: cedron at exede.net (Cedron Dawg) Date: Wed, 27 Feb 2019 08:53:57 -0500 (EST) Subject: [Gambas-user] A suggestion for gambaswiki Message-ID: <2103978966.111483165.1551275637007.JavaMail.zimbra@exede.net> Since I am on the Gambas learning curve, I've been referencing the documentation a lot. It really is quite good and I can usually find out what I need to know rather quickly. I keep a separate browser window open with a whole slew of tabs open to different pages. The nit I have is the display order in the title. Every tab says "Gambas Documentio...", so I have to search through them to find the topic I was looking at, or maybe I closed it. Would it be possible to reverse the order in the title to be: topic - Gambas Documentation? Thanks, Ced From g4mba5 at gmail.com Wed Feb 27 15:00:00 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Wed, 27 Feb 2019 15:00:00 +0100 Subject: [Gambas-user] A suggestion for gambaswiki In-Reply-To: <2103978966.111483165.1551275637007.JavaMail.zimbra@exede.net> References: <2103978966.111483165.1551275637007.JavaMail.zimbra@exede.net> Message-ID: Le 27/02/2019 ? 14:53, Cedron Dawg a ?crit?: > Since I am on the Gambas learning curve, I've been referencing the documentation a lot. It really is quite good and I can usually find out what I need to know rather quickly. > > I keep a separate browser window open with a whole slew of tabs open to different pages. The nit I have is the display order in the title. Every tab says "Gambas Documentio...", so I have to search through them to find the topic I was looking at, or maybe I closed it. > > Would it be possible to reverse the order in the title to be: topic - Gambas Documentation? > > Thanks, > > Ced > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > Done. -- Beno?t Minisini From cedron at exede.net Wed Feb 27 15:06:09 2019 From: cedron at exede.net (Cedron Dawg) Date: Wed, 27 Feb 2019 09:06:09 -0500 (EST) Subject: [Gambas-user] A suggestion for gambaswiki In-Reply-To: References: <2103978966.111483165.1551275637007.JavaMail.zimbra@exede.net> Message-ID: <770201414.111494142.1551276369395.JavaMail.zimbra@exede.net> Thank you very much. ==================================================== Le 27/02/2019 ? 14:53, Cedron Dawg a ?crit?: > Since I am on the Gambas learning curve, I've been referencing the documentation a lot. It really is quite good and I can usually find out what I need to know rather quickly. > > I keep a separate browser window open with a whole slew of tabs open to different pages. The nit I have is the display order in the title. Every tab says "Gambas Documentio...", so I have to search through them to find the topic I was looking at, or maybe I closed it. > > Would it be possible to reverse the order in the title to be: topic - Gambas Documentation? > > Thanks, > > Ced > Done. -- Beno?t Minisini From cedron at exede.net Wed Feb 27 15:35:06 2019 From: cedron at exede.net (Cedron Dawg) Date: Wed, 27 Feb 2019 09:35:06 -0500 (EST) Subject: [Gambas-user] Gambas language suggestion Message-ID: <1568786685.111539265.1551278106917.JavaMail.zimbra@exede.net> Under "File & Directory Functions", add: * Result = IsLink( Path AS String ) AS Boolean ' meaning a soft link Also, * Result = GetActual( Path AS String ) AS Boolean ' or better named Returns Path if it is an actual file or dir. On links, will follow the link chain to locate the actual path. No pressing need for this, but it would be nice to have. Ced From cedron at exede.net Wed Feb 27 15:48:40 2019 From: cedron at exede.net (Cedron Dawg) Date: Wed, 27 Feb 2019 09:48:40 -0500 (EST) Subject: [Gambas-user] Gambas language suggestion In-Reply-To: <1568786685.111539265.1551278106917.JavaMail.zimbra@exede.net> References: <1568786685.111539265.1551278106917.JavaMail.zimbra@exede.net> Message-ID: <350269684.111556521.1551278920925.JavaMail.zimbra@exede.net> Please pardon my sloppiness, I meant: * Result = GetActual( Path AS String ) AS String ' or better named Returns Path if it is an actual file or dir. On links, will follow the link chain to locate the actual path. From g4mba5 at gmail.com Wed Feb 27 16:22:47 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Wed, 27 Feb 2019 16:22:47 +0100 Subject: [Gambas-user] Gambas language suggestion In-Reply-To: <350269684.111556521.1551278920925.JavaMail.zimbra@exede.net> References: <1568786685.111539265.1551278106917.JavaMail.zimbra@exede.net> <350269684.111556521.1551278920925.JavaMail.zimbra@exede.net> Message-ID: <9f6bdc70-1184-54bd-fbee-67f1ddfcd152@gmail.com> Le 27/02/2019 ? 15:48, Cedron Dawg a ?crit?: > Please pardon my sloppiness, I meant: > > * Result = GetActual( Path AS String ) AS String ' or better named > > Returns Path if it is an actual file or dir. On links, will follow the link chain to locate the actual path. > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > Better put your language requests in the bugtracker (that is not only for bugs, but also for requests). Regards, -- Beno?t Minisini From cedron at exede.net Thu Feb 28 18:51:31 2019 From: cedron at exede.net (Cedron Dawg) Date: Thu, 28 Feb 2019 12:51:31 -0500 (EST) Subject: [Gambas-user] A fine afternoon for a good rant Message-ID: <1229468738.113300486.1551376291417.JavaMail.zimbra@exede.net> I'm reaching frustration levels here. This is a rant. I wrote a nice little video game in Gambas that employs a GamePad or Joystick. Good enought that I wanted to share it. Not just for the playability, but to provide a starter program for others who may want to write their own video game, but don't know how to start. First problem: Gambas doesn't have Joystick/GamePad support built in. Okay, I can do that in C with a shared library. Gambas support for shared libraries is simple and easy. Second problem: How do you distribute a shared library along with your project? Thorny issues like 32 bit vs 64 bit, special compilation instructions for the end user if just source is distributed, etc. Better to build a Gambas native component. Third problem: How do you do that? RTFM. (Read the *fine* manual) Tried, somewhat incomplete. Two ways: C or Gambas Okay, to do it in C properly requires a large investment in getting a development environment set up. (Economics term: "Barrier to Entry) Fourth problem: My shared library is based on the legacy joystick model, it needs to be updated to the current model (evdev). Okay, do a bunch of research, recode, and test the in a console app. Works great. Upload for someone to adapt to the Gambas environment. The sound of *fine* crickets. Obviously nobody is interested or cares enough to do the work. Tobias is kind enough to convert his existing code and upload it to GitHub. Fifth problem: It is also based on the legacy model. Okay, use Tobias' code as a template and incorporate the evdec GamePad code the best I can. I know it is close, but not completely correct. Sixth problem: Tobias' code uses a GB.Watch to follow the file descriptor so Gambas can call when input is ready. Evdev doesn't work that way, it reads the FD and makes an internal queue. Therefore, my component has to be called polling style from the main event loop. How do you do that? GB.Hook doesn't seem to have the right call. GB.Post looks close, but it seems to be a one time deal. Okay, step back a minute. Maybe it would be better to develop a Gambas component, and call libevdev from there. First thing to do is to figure out how to make a component in Gambas. Great, there is a doc page for that: "How To Program Components In Gambas" Just what I need. Create the project, check. Test the stubby little component from within its project. Check. Oh no, the documentation turns to special "Control" implementation details. Good if I need that, but I am not trying to make a control. Okay, time to package this sucker up and install it so I can test it from another Gambas project, as if I were a different user. No point in not trying. Use the Project/Make/Installation Package menu options, go through the screens, produce a *.tar.gz. Hey, that was easy, there it is. Okay, time to install it. Look on the internet for how to install tar.gz's. Normally I use Package Manager to do everything, so this is new to me. Find: tar -xzf archive-name.tar.gz cd archive-name ./configure make sudo make install The first two steps I can do easier through the File Manger window, but I did it both ways. Seventh problem: There's no ./configure file. At this point I am going to take a break. All I wanted to do was share a neat little demo program I wrote. I am not knowledgeable enough to become a major contributor to the project itself, yet. I do like Gambas a lot. It is an incredible piece of work. I have been doing a lot of work in Python, which I consider to be a dialect of BASIC. It has some neat features of its own. Much of the popularity of Python as to do with its MatplotLib and Numpy/Scipy libraries. Gambas is lacking those or you would have a large client base ready to convert simply because of the ability to quickly and easily develop GUI apps in Linux. Having GamePad support would also gain you a large base of newbie programmers wanting to learn how to program video games. If you can program a game, a busines app is a piece of cake. Game programming is more fun. Final word: Benoit, buy a GamePad. It is as much a toy as BASIC is a toy language. You'll see what I mean. I'm going for a walk. From g4mba5 at gmail.com Thu Feb 28 19:23:45 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Thu, 28 Feb 2019 19:23:45 +0100 Subject: [Gambas-user] A fine afternoon for a good rant In-Reply-To: <1229468738.113300486.1551376291417.JavaMail.zimbra@exede.net> References: <1229468738.113300486.1551376291417.JavaMail.zimbra@exede.net> Message-ID: Le 28/02/2019 ? 18:51, Cedron Dawg a ?crit : > I'm reaching frustration levels here. This is a rant. > > I wrote a nice little video game in Gambas that employs a GamePad or > Joystick. Good enought that I wanted to share it. Not just for the > playability, but to provide a starter program for others who may want > to write their own video game, but don't know how to start. > > First problem: Gambas doesn't have Joystick/GamePad support built > in. > > Okay, I can do that in C with a shared library. Gambas support for > shared libraries is simple and easy. > > Second problem: How do you distribute a shared library along with > your project? > > Thorny issues like 32 bit vs 64 bit, special compilation instructions > for the end user if just source is distributed, etc. Better to build > a Gambas native component. > > Third problem: How do you do that? > > RTFM. (Read the *fine* manual) Tried, somewhat incomplete. > > Two ways: C or Gambas > > Okay, to do it in C properly requires a large investment in getting a > development environment set up. (Economics term: "Barrier to Entry) > > Fourth problem: My shared library is based on the legacy joystick > model, it needs to be updated to the current model (evdev). > > Okay, do a bunch of research, recode, and test the in a console app. > Works great. Upload for someone to adapt to the Gambas environment. > > The sound of *fine* crickets. > > Obviously nobody is interested or cares enough to do the work. > Tobias is kind enough to convert his existing code and upload it to > GitHub. > > Fifth problem: It is also based on the legacy model. > > Okay, use Tobias' code as a template and incorporate the evdec > GamePad code the best I can. I know it is close, but not completely > correct. > > Sixth problem: Tobias' code uses a GB.Watch to follow the file > descriptor so Gambas can call when input is ready. Evdev doesn't > work that way, it reads the FD and makes an internal queue. > Therefore, my component has to be called polling style from the main > event loop. How do you do that? > > GB.Hook doesn't seem to have the right call. > > GB.Post looks close, but it seems to be a one time deal. > > Okay, step back a minute. Maybe it would be better to develop a > Gambas component, and call libevdev from there. First thing to do is > to figure out how to make a component in Gambas. Great, there is a > doc page for that: "How To Program Components In Gambas" Just what > I need. Create the project, check. Test the stubby little component > from within its project. Check. Oh no, the documentation turns to > special "Control" implementation details. Good if I need that, but I > am not trying to make a control. > > Okay, time to package this sucker up and install it so I can test it > from another Gambas project, as if I were a different user. No point > in not trying. Use the Project/Make/Installation Package menu > options, go through the screens, produce a *.tar.gz. Hey, that was > easy, there it is. > > Okay, time to install it. Look on the internet for how to install > tar.gz's. Normally I use Package Manager to do everything, so this > is new to me. > > Find: > > tar -xzf archive-name.tar.gz cd archive-name ./configure make sudo > make install > > The first two steps I can do easier through the File Manger window, > but I did it both ways. > > Seventh problem: There's no ./configure file. > > At this point I am going to take a break. All I wanted to do was > share a neat little demo program I wrote. I am not knowledgeable > enough to become a major contributor to the project itself, yet. I > do like Gambas a lot. It is an incredible piece of work. I have > been doing a lot of work in Python, which I consider to be a dialect > of BASIC. It has some neat features of its own. Much of the > popularity of Python as to do with its MatplotLib and Numpy/Scipy > libraries. Gambas is lacking those or you would have a large client > base ready to convert simply because of the ability to quickly and > easily develop GUI apps in Linux. > > Having GamePad support would also gain you a large base of newbie > programmers wanting to learn how to program video games. If you can > program a game, a busines app is a piece of cake. Game programming > is more fun. > > Final word: > > Benoit, buy a GamePad. It is as much a toy as BASIC is a toy > language. You'll see what I mean. > > I'm going for a walk. > Welcome to the world of programming. Before reading "how to make components", did you read the wiki page "compilation and installation", where it is explained how to compile and install Gambas from sources? Apparently no. You have to generate the "./configure" file first, by running "./reconf-all". See that page: http://gambaswiki.org/wiki/install As for the joystick support, I thought that SDL would be enough. You usually use SDL to make games. Anyway, it could be a good idea to make a component that gives access to libevdev. As for your event management problem, no, you don't have to poll. According to what I read in the libevdec doc, you just have to watch the evdev file descriptor returned by libevdev_get_fd(), and then use libevdev_next_event() in the watch handler. As for adding a component in the source tree, it's a boring and ugly work. Because it's based on autoconf & automake, and it's them that make the process boring and ugly. I can do it for you. I strongly suggest to make a component with a C part and a Gambas part. The C part will contain only helpers functions, and the Gambas part will be the actual public interface of the component. Regards, -- Beno?t Minisini From g4mba5 at gmail.com Thu Feb 28 19:45:00 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Thu, 28 Feb 2019 19:45:00 +0100 Subject: [Gambas-user] A fine afternoon for a good rant In-Reply-To: References: <1229468738.113300486.1551376291417.JavaMail.zimbra@exede.net> Message-ID: Le 28/02/2019 ? 19:23, Beno?t Minisini a ?crit?: > Le 28/02/2019 ? 18:51, Cedron Dawg a ?crit : >> I'm reaching frustration levels here.? This is a rant. >> >> [...rant...] >> >> I'm going for a walk. >> > > Welcome to the world of programming. > > Before reading "how to make components", did you read the wiki page > "compilation and installation", where it is explained how to compile and > install Gambas from sources? Apparently no. > > You have to generate the "./configure" file first, by running > "./reconf-all". > > See that page: http://gambaswiki.org/wiki/install > > As for the joystick support, I thought that SDL would be enough. You > usually use SDL to make games. > > Anyway, it could be a good idea to make a component that gives access to > libevdev. > > As for your event management problem, no, you don't have to poll. > > According to what I read in the libevdec doc, you just have to watch the > evdev file descriptor returned by libevdev_get_fd(), and then use > libevdev_next_event() in the watch handler. > > As for adding a component in the source tree, it's a boring and ugly > work. Because it's based on autoconf & automake, and it's them that make > the process boring and ugly. > > I can do it for you. > > I strongly suggest to make a component with a C part and a Gambas part. > The C part will contain only helpers functions, and the Gambas part will > be the actual public interface of the component. > > Regards, > I have created a new branch named 'evdev', with a new void 'gb.input' component in it, so that you can start playing with it. So checkout the 'evdev' branch, and make merge requests from it when you want me to look at your code. Regards, -- Beno?t Minisini From cedron at exede.net Thu Feb 28 20:11:29 2019 From: cedron at exede.net (Cedron Dawg) Date: Thu, 28 Feb 2019 14:11:29 -0500 (EST) Subject: [Gambas-user] A fine afternoon for a good rant In-Reply-To: References: <1229468738.113300486.1551376291417.JavaMail.zimbra@exede.net> Message-ID: <1301094310.113389983.1551381089967.JavaMail.zimbra@exede.net> I have been drinking from a firehose the last few weeks. I do not want to remake the version of Gambas on my machine so I did not read that section in detail. There is no gp.sdl option in the Project/Properties/Components list. Looking at the source code, there is a Cjoystick in .../sdl, but not in .../sdl2. It appears to be a wrapper around SDL_Joystick, which is fine with me if it is fine with you. Somebody could have mentioned its availability a little earlier. Would Tobias have bothered to start a new branch if he knew about it? As for my attempt, I have recoded the top to fix something I know now is quite wrong. I've attached the file. Notice that I put your name in the copyright figuring you should have legal control. There is very little of Tobi's code left, none of his names, but most the **G comments are still his. If it works for you, please incorporate it. I can get by with using my shared library to develop the GamePad based programs I have in mind. I will return to trying to make components when I am more experienced and familiar with the environment. If the GB.Watch mechanism is the right one, I believe I have coded that part correctly. This was my guess at returning a string array. Did I do it right? At first I didn't think I should free the ListEntry, but afterthought says the string array makes a reference and if I don't free it there will be a memory leak. The previous version does not have the GB.Free. /*--- Set the Return Array ????? Not sure this is right at all */ void* theReturnArray; char* theListEntry; int f; GB.New( &theReturnArray, "String[]", NULL, NULL ); for( f = 0; f < theFoundCount; f++ ) { theListEntry = GB.NewString( theList[f], 0 ); theReturnArray->Add( theListEntry ); GB.Free( theListEntry ); } GB.ReturnObject( &theReturnArray ); You should still buy yourself a GamePad. ========================================================= [...snip...] Welcome to the world of programming. Before reading "how to make components", did you read the wiki page "compilation and installation", where it is explained how to compile and install Gambas from sources? Apparently no. You have to generate the "./configure" file first, by running "./reconf-all". See that page: http://gambaswiki.org/wiki/install As for the joystick support, I thought that SDL would be enough. You usually use SDL to make games. Anyway, it could be a good idea to make a component that gives access to libevdev. As for your event management problem, no, you don't have to poll. According to what I read in the libevdec doc, you just have to watch the evdev file descriptor returned by libevdev_get_fd(), and then use libevdev_next_event() in the watch handler. As for adding a component in the source tree, it's a boring and ugly work. Because it's based on autoconf & automake, and it's them that make the process boring and ugly. I can do it for you. I strongly suggest to make a component with a C part and a Gambas part. The C part will contain only helpers functions, and the Gambas part will be the actual public interface of the component. Regards, -- Beno?t Minisini ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- -------------- next part -------------- A non-text attachment was scrubbed... Name: c_joystick_Ced_0_0_3.c Type: text/x-c++src Size: 18119 bytes Desc: not available URL: From cedron at exede.net Thu Feb 28 20:16:50 2019 From: cedron at exede.net (Cedron Dawg) Date: Thu, 28 Feb 2019 14:16:50 -0500 (EST) Subject: [Gambas-user] A fine afternoon for a good rant In-Reply-To: References: <1229468738.113300486.1551376291417.JavaMail.zimbra@exede.net> Message-ID: <946103649.113395845.1551381410125.JavaMail.zimbra@exede.net> I will look, but I don't think I can be that helpful. All I know about evdev is what I've learned to make the evdev based joystick program. You assume I am Github trained. ----- Original Message ----- [...snip...] I have created a new branch named 'evdev', with a new void 'gb.input' component in it, so that you can start playing with it. So checkout the 'evdev' branch, and make merge requests from it when you want me to look at your code. Regards, -- Beno?t Minisini ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- From taboege at gmail.com Thu Feb 28 20:18:41 2019 From: taboege at gmail.com (Tobias Boege) Date: Thu, 28 Feb 2019 20:18:41 +0100 Subject: [Gambas-user] A fine afternoon for a good rant In-Reply-To: <1301094310.113389983.1551381089967.JavaMail.zimbra@exede.net> References: <1229468738.113300486.1551376291417.JavaMail.zimbra@exede.net> <1301094310.113389983.1551381089967.JavaMail.zimbra@exede.net> Message-ID: <20190228191841.GP28675@highrise.localdomain> On Thu, 28 Feb 2019, Cedron Dawg wrote: > Looking at the source code, there is a Cjoystick in .../sdl, but not in .../sdl2. It appears to be a wrapper around SDL_Joystick, which is fine with me if it is fine with you. > > Somebody could have mentioned its availability a little earlier. Would Tobias have bothered to start a new branch if he knew about it? > I mentioned it and also explained why I did bother with the new component, here: https://lists.gambas-basic.org/pipermail/user/2019-February/066543.html Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From cedron at exede.net Thu Feb 28 20:27:45 2019 From: cedron at exede.net (Cedron Dawg) Date: Thu, 28 Feb 2019 14:27:45 -0500 (EST) Subject: [Gambas-user] A fine afternoon for a good rant In-Reply-To: <20190228191841.GP28675@highrise.localdomain> References: <1229468738.113300486.1551376291417.JavaMail.zimbra@exede.net> <1301094310.113389983.1551381089967.JavaMail.zimbra@exede.net> <20190228191841.GP28675@highrise.localdomain> Message-ID: <1407150093.113418111.1551382065956.JavaMail.zimbra@exede.net> Sorry, I remember that. Qt incompatibility is a show stopper for me too. I'm not planning on writing games. Thanks ----- Original Message ----- [...snip...] I mentioned it and also explained why I did bother with the new component, here: https://lists.gambas-basic.org/pipermail/user/2019-February/066543.html Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- From g4mba5 at gmail.com Thu Feb 28 20:34:02 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Thu, 28 Feb 2019 20:34:02 +0100 Subject: [Gambas-user] A fine afternoon for a good rant In-Reply-To: <946103649.113395845.1551381410125.JavaMail.zimbra@exede.net> References: <1229468738.113300486.1551376291417.JavaMail.zimbra@exede.net> <946103649.113395845.1551381410125.JavaMail.zimbra@exede.net> Message-ID: <9ecf0b43-bff8-f67b-c65f-919ff3ef7fdb@gmail.com> Le 28/02/2019 ? 20:16, Cedron Dawg a ?crit?: > I will look, but I don't think I can be that helpful. All I know about evdev is what I've learned to make the evdev based joystick program. > > You assume I am Github trained. git, not Github. Moreover Gambas is hosted on GitLab, not GitHub. Gambas development is based on git, it's not so much a big deal to learn to use it. Moreover GitLab offers a nifty interface to review code and exchange comments about it. -- Beno?t Minisini From g4mba5 at gmail.com Thu Feb 28 20:42:50 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Thu, 28 Feb 2019 20:42:50 +0100 Subject: [Gambas-user] A fine afternoon for a good rant In-Reply-To: <1301094310.113389983.1551381089967.JavaMail.zimbra@exede.net> References: <1229468738.113300486.1551376291417.JavaMail.zimbra@exede.net> <1301094310.113389983.1551381089967.JavaMail.zimbra@exede.net> Message-ID: <5061566a-43fa-19fe-2f52-47b79a3a85cc@gmail.com> Le 28/02/2019 ? 20:11, Cedron Dawg a ?crit?: > > /*--- Set the Return Array ????? Not sure this is right at all > */ > void* theReturnArray; > char* theListEntry; > int f; > > GB.New( &theReturnArray, "String[]", NULL, NULL ); > > for( f = 0; f < theFoundCount; f++ ) > { > theListEntry = GB.NewString( theList[f], 0 ); > theReturnArray->Add( theListEntry ); > GB.Free( theListEntry ); > } > > GB.ReturnObject( &theReturnArray ); > It's not right: void* theReturnArray; char* theListEntry; int f; GB.Array.New(&theReturnArray, GB_T_STRING, theFoundCount); for( f = 0; f < theFoundCount; f++ ) { theListEntry = GB.NewZeroString(theList[f]); *((char **)GB.Array.Get(theReturnedArray, f) = theListEntry; } GB.ReturnObject( &theReturnArray ); Regards, -- Beno?t Minisini From cedron at exede.net Thu Feb 28 21:15:44 2019 From: cedron at exede.net (Cedron Dawg) Date: Thu, 28 Feb 2019 15:15:44 -0500 (EST) Subject: [Gambas-user] A fine afternoon for a good rant In-Reply-To: <9ecf0b43-bff8-f67b-c65f-919ff3ef7fdb@gmail.com> References: <1229468738.113300486.1551376291417.JavaMail.zimbra@exede.net> <946103649.113395845.1551381410125.JavaMail.zimbra@exede.net> <9ecf0b43-bff8-f67b-c65f-919ff3ef7fdb@gmail.com> Message-ID: <1931754162.113471204.1551384944806.JavaMail.zimbra@exede.net> My ignorance on full display. I'll probably get to it. Like I said, I want to actually write some programs, not work on the infrastructure. ----- Original Message ----- git, not Github. Moreover Gambas is hosted on GitLab, not GitHub. Gambas development is based on git, it's not so much a big deal to learn to use it. Moreover GitLab offers a nifty interface to review code and exchange comments about it. -- Beno?t Minisini ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- From cedron at exede.net Thu Feb 28 21:19:41 2019 From: cedron at exede.net (Cedron Dawg) Date: Thu, 28 Feb 2019 15:19:41 -0500 (EST) Subject: [Gambas-user] A fine afternoon for a good rant In-Reply-To: <5061566a-43fa-19fe-2f52-47b79a3a85cc@gmail.com> References: <1229468738.113300486.1551376291417.JavaMail.zimbra@exede.net> <1301094310.113389983.1551381089967.JavaMail.zimbra@exede.net> <5061566a-43fa-19fe-2f52-47b79a3a85cc@gmail.com> Message-ID: <1751262496.113474636.1551385181688.JavaMail.zimbra@exede.net> You gotta admit that that is not obvious. Anyway, the source I sent you is pretty much an evdev wrapper. The only things joystick specific about it are the file names it looks for and how the return values are handled, e.g. the Gambas events raised. ----- Original Message ----- Le 28/02/2019 ? 20:11, Cedron Dawg a ?crit?: > > /*--- Set the Return Array ????? Not sure this is right at all > */ > void* theReturnArray; > char* theListEntry; > int f; > > GB.New( &theReturnArray, "String[]", NULL, NULL ); > > for( f = 0; f < theFoundCount; f++ ) > { > theListEntry = GB.NewString( theList[f], 0 ); > theReturnArray->Add( theListEntry ); > GB.Free( theListEntry ); > } > > GB.ReturnObject( &theReturnArray ); > It's not right: void* theReturnArray; char* theListEntry; int f; GB.Array.New(&theReturnArray, GB_T_STRING, theFoundCount); for( f = 0; f < theFoundCount; f++ ) { theListEntry = GB.NewZeroString(theList[f]); *((char **)GB.Array.Get(theReturnedArray, f) = theListEntry; } GB.ReturnObject( &theReturnArray ); Regards, -- Beno?t Minisini ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- From g4mba5 at gmail.com Thu Feb 28 21:36:43 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Thu, 28 Feb 2019 21:36:43 +0100 Subject: [Gambas-user] A fine afternoon for a good rant In-Reply-To: <1751262496.113474636.1551385181688.JavaMail.zimbra@exede.net> References: <1229468738.113300486.1551376291417.JavaMail.zimbra@exede.net> <1301094310.113389983.1551381089967.JavaMail.zimbra@exede.net> <5061566a-43fa-19fe-2f52-47b79a3a85cc@gmail.com> <1751262496.113474636.1551385181688.JavaMail.zimbra@exede.net> Message-ID: Le 28/02/2019 ? 21:19, Cedron Dawg a ?crit : > You gotta admit that that is not obvious. I admit. > > Anyway, the source I sent you is pretty much an evdev wrapper. The > only things joystick specific about it are the file names it looks > for and how the return values are handled, e.g. the Gambas events > raised. > My proposal was to make the C code a non-specific interface to livevdev, with the device specific thing in the Gambas part of the component. For example, gb.dbus is designed a bit like that. So, concretely, we could imagine a "Joystick" class written in Gambas that can enumerate all joysticks with some heuristic like in your code, opens the device file and watch it, send the file descriptor to the C part, and calls the C part from the read watch handler. The C part should mainly be a thin layer on libevdev. All the file opening and descriptor watching is done from the Gambas part. I think things would be easier that way. What do you think? -- Beno?t Minisini From cedron at exede.net Thu Feb 28 21:38:14 2019 From: cedron at exede.net (Cedron Dawg) Date: Thu, 28 Feb 2019 15:38:14 -0500 (EST) Subject: [Gambas-user] A fine afternoon for a good rant In-Reply-To: <5061566a-43fa-19fe-2f52-47b79a3a85cc@gmail.com> References: <1229468738.113300486.1551376291417.JavaMail.zimbra@exede.net> <1301094310.113389983.1551381089967.JavaMail.zimbra@exede.net> <5061566a-43fa-19fe-2f52-47b79a3a85cc@gmail.com> Message-ID: <1636225180.113494800.1551386294045.JavaMail.zimbra@exede.net> Wait a sec, you have unbalanced parentheses. *((char **)GB.Array.Get(theReturnedArray, f) = theListEntry; You see, good parentheses spacing is not only more readable, but it is also "error correcting". *( (char**) GB.Array.Get( theReturnedArray, f ) ) = theListEntry; Annoyance of mine with C and how it is used. When I am declaring a variable char* myTitle vs char *myTitle Were it done more commonely like I do it (the left one), there wouldn't me so much confusion of what it means when you use *myTitle to store a value in the code. The * is a modifier of the type, that's why it needs to be in cast parenthesis: (char*) theOtherPointerType Otherwise it should be (char) *theOtherPointerType, but it doesn't work that way. The parentheses belong to the cast, so they can be tight. On the other hand, case like if, for, while statements: if (logical<>expression) { code starts here } Is ugly and unbalanced. The parentheses belong to the if statement, and the braces should be balanced. if( logical <> expression ) { code starts here } The extra blank line introduced improves the readability. Spacing inside the lines improves readability as well. Both let your eyes focus on the actual meaning without having to "parse" out the clutter. C is still ugly. Anybody seen my spare semicolon? Oh, the compiler told me with 400 error messages. Snark. ----- Original Message ----- for( f = 0; f < theFoundCount; f++ ) { theListEntry = GB.NewZeroString(theList[f]); *((char **)GB.Array.Get(theReturnedArray, f) = theListEntry; } GB.ReturnObject( &theReturnArray ); Regards, -- Beno?t Minisini From cedron at exede.net Thu Feb 28 21:45:21 2019 From: cedron at exede.net (Cedron Dawg) Date: Thu, 28 Feb 2019 15:45:21 -0500 (EST) Subject: [Gambas-user] A fine afternoon for a good rant In-Reply-To: References: <1229468738.113300486.1551376291417.JavaMail.zimbra@exede.net> <1301094310.113389983.1551381089967.JavaMail.zimbra@exede.net> <5061566a-43fa-19fe-2f52-47b79a3a85cc@gmail.com> <1751262496.113474636.1551385181688.JavaMail.zimbra@exede.net> Message-ID: <951464719.113506894.1551386721897.JavaMail.zimbra@exede.net> That sounds quite reasonable, it was sort of the direction I was heading by trying to write a component in Gambas. You should be able to cleave my code kind of cleanly to do that. Or maybe somebody else could pick it up, I'm just not adept enough yet. The end goal is that a first time user should be able to find a joystick component (or perhaps we should start saying GamePad since they are way more prevalent) and be able to use it without too much difficulty. ----- Original Message ----- Le 28/02/2019 ? 21:19, Cedron Dawg a ?crit : > You gotta admit that that is not obvious. I admit. > > Anyway, the source I sent you is pretty much an evdev wrapper. The > only things joystick specific about it are the file names it looks > for and how the return values are handled, e.g. the Gambas events > raised. > My proposal was to make the C code a non-specific interface to livevdev, with the device specific thing in the Gambas part of the component. For example, gb.dbus is designed a bit like that. So, concretely, we could imagine a "Joystick" class written in Gambas that can enumerate all joysticks with some heuristic like in your code, opens the device file and watch it, send the file descriptor to the C part, and calls the C part from the read watch handler. The C part should mainly be a thin layer on libevdev. All the file opening and descriptor watching is done from the Gambas part. I think things would be easier that way. What do you think? -- Beno?t Minisini ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----