From johna at starflightinc.com Tue Jun 1 15:00:38 2021 From: johna at starflightinc.com (John Anderson) Date: Tue, 1 Jun 2021 06:00:38 -0700 Subject: [Gambas-user] Gb3.16.90 - Data Breakpoint Crash - possible bug? Message-ID: <8d39e8e6-5851-d629-9994-b97bffb4828f@starflightinc.com> An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Gb_DataBreakpoint_Crash_Proj_Info.tar.gz Type: application/gzip Size: 14553 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Gambas3_DataBreakpoint_Step1.png Type: image/png Size: 118594 bytes Desc: not available URL: From chrisml at deganius.de Tue Jun 1 16:11:19 2021 From: chrisml at deganius.de (Christof Thalhofer) Date: Tue, 1 Jun 2021 16:11:19 +0200 Subject: [Gambas-user] Gb3.16.90 - Data Breakpoint Crash - possible bug? In-Reply-To: <8d39e8e6-5851-d629-9994-b97bffb4828f@starflightinc.com> References: <8d39e8e6-5851-d629-9994-b97bffb4828f@starflightinc.com> Message-ID: Am 01.06.21 um 15:00 schrieb John Anderson: > Gambas3 3.16.90 May 27, 2021 on LM 20.1 > > Project an sys info included. > > This is very repeatable at my end > > Screenshots included. (Well, they were attached until? mailing list got > scared of total message size of 700kb ...OK, I took rest of screen shots > out.). Yes, we need to save traffic. Your small size of 700kb becomes 700kb times all users of the Gambas ML when we send it. I think it's better to report this in the Gambas bugtracker: http://gambaswiki.org/bugtracker/main There you can store alot of images and other data you need to describe. And btw, if you store your screenshots as PNG-8 instead of PNG-24 they need a third of the space. Alles Gute Christof Thalhofer -- Dies ist keine Signatur -------------- next part -------------- A non-text attachment was scrubbed... Name: Gambas3_DataBreakpoint_Step1-1-png8.png Type: image/png Size: 34346 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From johna at starflightinc.com Tue Jun 1 16:42:53 2021 From: johna at starflightinc.com (John Anderson) Date: Tue, 1 Jun 2021 07:42:53 -0700 Subject: [Gambas-user] Gb3.16.90 - Data Breakpoint Crash - possible bug? In-Reply-To: References: <8d39e8e6-5851-d629-9994-b97bffb4828f@starflightinc.com> Message-ID: On 6/1/2021 7:11 AM, Christof Thalhofer wrote: > Am 01.06.21 um 15:00 schrieb John Anderson: > >> Gambas3 3.16.90 May 27, 2021 on LM 20.1 >> >> Project an sys info included. >> >> This is very repeatable at my end >> >> Screenshots included. (Well, they were attached until? mailing list got >> scared of total message size of 700kb ...OK, I took rest of screen shots >> out.). > Yes, we need to save traffic. Your small size of 700kb becomes 700kb > times all users of the Gambas ML when we send it. > > I think it's better to report this in the Gambas bugtracker: > http://gambaswiki.org/bugtracker/main > > There you can store alot of images and other data you need to describe. > And btw, if you store your screenshots as PNG-8 instead of PNG-24 they > need a third of the space. > > Alles Gute > > Christof Thalhofer > Thanks, of course - I'm more used to forum format...? I'll send to bug tracker - I just wanted to make sure I wasn't doing something wrong at my end first. -J From johna at starflightinc.com Tue Jun 1 17:14:35 2021 From: johna at starflightinc.com (John Anderson) Date: Tue, 1 Jun 2021 08:14:35 -0700 Subject: [Gambas-user] Correct strategy for VB static var conversion to Gambas? In-Reply-To: References: <7de51a3c-3ff0-d4f9-1153-1277c6c9a201@gmail.com> <99d1c971-4651-ed0e-1521-7221b1d405d1@deganius.de> <2e08d9e3-44f8-e6dd-7055-542ccc674dd2@deganius.de> Message-ID: <36a4f829-7551-b6c1-85e2-1edd3e7204ef@starflightinc.com> On 5/31/2021 6:12 AM, Christof Thalhofer wrote: > Hi John, > > Am 31.05.21 um 01:40 schrieb John Anderson: > >> As a concept - This is what we have now in VB code - and we have many >> hundreds of these function sequences that operate as state machines, and >> can be called from other state machines above them. > Thank you for your explanations. I finally understood what it's all > about. You know, we're just playing the good guy/bad guy game here to > drive up the price. ;-) > > So I hope Beno?t gets the money he deserves when he makes Gambas > suitable for state machines. You can still put something "for the > beauty" on it. > > And then have fun with Gambas, it's such a great software to work with! > > Alles Gute > > Christof Thalhofer > I saw your good guy / bad guy message and snorted coffee all over my keyboard.?? Yeah, I see how it works with the Gambas guys now... Now you know why I wanted a "static" declare - that dramatically changes the whole conversion process when we deal with many state machine functions.?? And now you know why I wanted a Data Breakpoint feature.? And seeing how some of these sequenced state machines have 5 states, and others have hundreds of states...you know why I was asking about a how to show just one procedure at a time in IDE. If you're looking at a module file with many long procedures, it would be helpful if there was a way to keep the window vertical scroller bar limited to the current procedure or declare section. That makes it easy-er to scroll up and down over one very long procedure in a file without overshooting top or bottom.? For instance - nothing changes on the IDE as it is.? BUT if I open a file with long procedures I can tick on an option where the vertical scroller is limited to just one procedure or declaration section at a time.? In that mode I select procedures to view with the drop-down box that is already there.? Or maybe it's MouseAlt-Drag on scroller bar engages "Limit to One Procedure" function (ie. use? "Left mouse" button, but we never use that term any more so as to not discriminate against left-handers who use reversed mouse devices - new docs rules).? It looks like MouseAlt function is available on scroller bar.? Or whatever method works best Of course having one function per module file is another way to view one procedure at a time - but that's gonna generate -a lot- of module files in our conversion case example. I'll have to play with different styles. -J From sharon at 455.co.il Tue Jun 1 19:43:27 2021 From: sharon at 455.co.il (Mayost Sharon) Date: Tue, 1 Jun 2021 20:43:27 +0300 Subject: [Gambas-user] UDP hole punching Message-ID: <20210601173711.M32684@455.co.il> Hello to you Can it be done: UDP hole punching Through: gb.net I understand that I need to change: UdpSocket.SourceHost and UdpSocket.SourcePort And they are for reading only They cannot be changed Is there another way to perform: UDP hole punching Thank you From brian at westwoodsvcs.com Wed Jun 2 01:01:23 2021 From: brian at westwoodsvcs.com (Brian G) Date: Tue, 1 Jun 2021 16:01:23 -0700 (PDT) Subject: [Gambas-user] UDP hole punching In-Reply-To: <20210601173711.M32684@455.co.il> References: <20210601173711.M32684@455.co.il> Message-ID: <855101793.11668.1622588483310.JavaMail.zimbra@westwoodsvcs.com> I thought the nat took care of that.. Flow: A and B each begin a UDP conversation with S; the NAT devices NA and NB create UDP translation states and assign temporary external port numbers EPA and EPB. S examines the UDP packets to get the source port used by NA and NB (the external NAT ports EPA and EPB). S passes EIPA:EPA to B and EIPB:EPB to A. A sends a packet to EIPB:EPB. NA examines A's packet and creates the following tuple in its translation table: (Source-IP-A, EPA, EIPB, EPB). B sends a packet to EIPA:EPA. NB examines B's packet and creates the following tuple in its translation table: (Source-IP-B, EPB, EIPA, EPA). Depending on the state of NA's translation table when B's first packet arrives (i.e. whether the tuple (Source-IP-A, EPA, EIPB, EPB) has been created by the time of arrival of B's first packet), B's first packet is dropped (no entry in translation table) or passed (entry in translation table has been made). Depending on the state of NB's translation table when A's first packet arrives (i.e. whether the tuple (Source-IP-B, EPB, EIPA, EPA) has been created by the time of arrival of A's first packet), A's first packet is dropped (no entry in translation table) or passed (entry in translation table has been made). At worst, the second packet from A reaches B; at worst the second packet from B reaches A. Holes have been "punched" in the NAT and both hosts can directly communicate. >From this it looks like your app get a message from S the go between containing the ip and port and then creates an outbound connection to the other host looks like you just need to read s's message and create a new udp connection to B. Maybe I am just miss reading or don't get what you are doing. Do you have a sample program? "Failure is the key to success; each mistake teaches us something" .. Morihei Ueshiba Brian G ----- On Jun 1, 2021, at 10:43 AM, Mayost Sharon sharon at 455.co.il wrote: > Hello to you > > Can it be done: > UDP hole punching > Through: > gb.net > > I understand that I need to change: > UdpSocket.SourceHost and UdpSocket.SourcePort > And they are for reading only > They cannot be changed > > Is there another way to perform: UDP hole punching > > Thank you > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- From dosida at gmail.com Wed Jun 2 02:30:55 2021 From: dosida at gmail.com (Dimitris Anogiatis) Date: Tue, 1 Jun 2021 18:30:55 -0600 Subject: [Gambas-user] UDP hole punching In-Reply-To: <855101793.11668.1622588483310.JavaMail.zimbra@westwoodsvcs.com> References: <20210601173711.M32684@455.co.il> <855101793.11668.1622588483310.JavaMail.zimbra@westwoodsvcs.com> Message-ID: Brian G, A silly question. So in essence is hole punching just basically using an external server S to connect two clients A and B without doing port forwarding on each other's router? On Tue, Jun 1, 2021 at 5:28 PM Brian G wrote: > I thought the nat took care of that.. > > Flow: > > A and B each begin a UDP conversation with S; the NAT devices NA and NB > create UDP translation states and assign temporary external port numbers > EPA and EPB. > > S examines the UDP packets to get the source port used by NA and NB (the > external NAT ports EPA and EPB). > > S passes EIPA:EPA to B and EIPB:EPB to A. > > A sends a packet to EIPB:EPB. > > NA examines A's packet and creates the following tuple in its translation > table: (Source-IP-A, EPA, EIPB, EPB). > > B sends a packet to EIPA:EPA. > > NB examines B's packet and creates the following tuple in its translation > table: (Source-IP-B, EPB, EIPA, EPA). > > Depending on the state of NA's translation table when B's first packet > arrives > (i.e. whether the tuple (Source-IP-A, EPA, EIPB, EPB) has been created > by the time of arrival of B's first packet), > B's first packet is dropped (no entry in translation table) or passed > (entry in translation table has been made). > > Depending on the state of NB's translation table when A's first packet > arrives > (i.e. whether the tuple (Source-IP-B, EPB, EIPA, EPA) has been created > by the time of arrival of A's first packet), > A's first packet is dropped (no entry in translation table) or passed > (entry in translation table has been made). > > At worst, the second packet from A reaches B; at worst the second packet > from B reaches A. > Holes have been "punched" in the NAT and both hosts can directly > communicate. > > > From this it looks like your app get a message from S the go between > containing the ip and port and then creates an outbound connection to the > other host > looks like you just need to read s's message and create a new udp > connection to B. > > Maybe I am just miss reading or don't get what you are doing. > > Do you have a sample program? > > "Failure is the key to success; > each mistake teaches us something" .. Morihei Ueshiba > Brian G > > ----- On Jun 1, 2021, at 10:43 AM, Mayost Sharon sharon at 455.co.il wrote: > > > Hello to you > > > > Can it be done: > > UDP hole punching > > Through: > > gb.net > > > > I understand that I need to change: > > UdpSocket.SourceHost and UdpSocket.SourcePort > > And they are for reading only > > They cannot be changed > > > > Is there another way to perform: UDP hole punching > > > > Thank you > > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dovey.john at gmail.com Wed Jun 2 02:35:31 2021 From: dovey.john at gmail.com (John Dovey) Date: Tue, 1 Jun 2021 19:35:31 -0500 Subject: [Gambas-user] UDP hole punching In-Reply-To: References: <20210601173711.M32684@455.co.il> <855101793.11668.1622588483310.JavaMail.zimbra@westwoodsvcs.com> Message-ID: What I do know, that this was a truly educational post. Never heard it explained better. I?ve always just sent out a UDP packet with the same hopeful faith that people put messages in a bottle, with next to no expectation that it will ever be delivered ? ;-) John On Tue, Jun 1, 2021 at 7:32 PM Dimitris Anogiatis wrote: > Brian G, > > A silly question. So in essence is hole punching just basically using an > external server S to connect two clients A and B without doing port > forwarding on each other's router? > > On Tue, Jun 1, 2021 at 5:28 PM Brian G wrote: > >> I thought the nat took care of that.. >> >> Flow: >> >> A and B each begin a UDP conversation with S; the NAT devices NA and NB >> create UDP translation states and assign temporary external port numbers >> EPA and EPB. >> >> S examines the UDP packets to get the source port used by NA and NB (the >> external NAT ports EPA and EPB). >> >> S passes EIPA:EPA to B and EIPB:EPB to A. >> >> A sends a packet to EIPB:EPB. >> >> NA examines A's packet and creates the following tuple in its translation >> table: (Source-IP-A, EPA, EIPB, EPB). >> >> B sends a packet to EIPA:EPA. >> >> NB examines B's packet and creates the following tuple in its translation >> table: (Source-IP-B, EPB, EIPA, EPA). >> >> Depending on the state of NA's translation table when B's first packet >> arrives >> (i.e. whether the tuple (Source-IP-A, EPA, EIPB, EPB) has been created >> by the time of arrival of B's first packet), >> B's first packet is dropped (no entry in translation table) or passed >> (entry in translation table has been made). >> >> Depending on the state of NB's translation table when A's first packet >> arrives >> (i.e. whether the tuple (Source-IP-B, EPB, EIPA, EPA) has been created >> by the time of arrival of A's first packet), >> A's first packet is dropped (no entry in translation table) or passed >> (entry in translation table has been made). >> >> At worst, the second packet from A reaches B; at worst the second packet >> from B reaches A. >> Holes have been "punched" in the NAT and both hosts can directly >> communicate. >> >> >> From this it looks like your app get a message from S the go between >> containing the ip and port and then creates an outbound connection to the >> other host >> looks like you just need to read s's message and create a new udp >> connection to B. >> >> Maybe I am just miss reading or don't get what you are doing. >> >> Do you have a sample program? >> >> "Failure is the key to success; >> each mistake teaches us something" .. Morihei Ueshiba >> Brian G >> >> ----- On Jun 1, 2021, at 10:43 AM, Mayost Sharon sharon at 455.co.il wrote: >> >> > Hello to you >> > >> > Can it be done: >> > UDP hole punching >> > Through: >> > gb.net >> > >> > I understand that I need to change: >> > UdpSocket.SourceHost and UdpSocket.SourcePort >> > And they are for reading only >> > They cannot be changed >> > >> > Is there another way to perform: UDP hole punching >> > >> > Thank you >> > >> > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- >> >> ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- >> > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -- Sent from Gmail Mobile -------------- next part -------------- An HTML attachment was scrubbed... URL: From mckaygerhard at gmail.com Wed Jun 2 04:24:13 2021 From: mckaygerhard at gmail.com (PICCORO McKAY Lenz) Date: Tue, 1 Jun 2021 22:24:13 -0400 Subject: [Gambas-user] The Wiki - Some [OPINION] In-Reply-To: References: Message-ID: El s?b, 29 de may. de 2021 a la(s) 15:34, Bruce (adamnt42 at gmail.com) escribi?: > 2) The structure of the wiki --- > The Gambas wiki is one of the best structured, elegant and > sensible online help sites anywhere! If you want a comparison > with complexity, obscurity and mind-bending layout try reading > some of the TrollTech documentation at https://doc.qt.io/ ... > i will read complete mail.. but this IS CORRECT! *The Gambas wiki is one of the best structured, elegant and sensible online help sites anywhere!* i hate the gambas benoit markdown sintax .. (tables are ilegible in source mode, and marks are special.. but best usefully for ) but that work of gambas wiki is the best wiki! good work Benoit and all of you guys! > 3) The structure of pages for syntax, explanations, "how-to's" etc --- > That list of page types is not unintentional. It follows the > "intent" of the sections on the start page. I will now talk > about some of my strongly held opinions regarding these. > > "syntax" pages > -------------- > This group includes the command syntax pages, the class overview pages, > component overview pages and language concepts pages. In other words, > the pages accessed through the Language Reference section of the start > page. The most important matter here is their appearance in the code > completion feature and in the IDE form designer. > > These pages should be SHORT, SUCCINCT and conform to the unwritten > standard (which I shall now write). > > These pages SHOULD NOT include LONG WINDED EXPLANATIONS of "why" or > "how" this syntax arose in Gambas. > > NOR SHOULD they include LONG WINDED EXAMPLES. In fact sample code in > these pages should only be included when it can be IMMEDIATELY copied > and pasted into the reader's code. > > They SHOULD (MUST) respect trademarks, copyrights, authorship's and > things of that ilk and should only contain external links where the > subject matter is perfectly and adequately explained on that external > page. A perfect example is Tobi's page on the Trie class in the gb.data > component where "You can learn about its semantics from Wikipedia." > (link removed). > > Finally they SHOULD NEVER contain discussion about certain other > programming languages! The reader is looking for information on Gambas > programming, not programming in, say Fj?lnir > (https://en.wikipedia.org/wiki/Fj%C3%B6lnir_(programming_language)) or > something. > > There ARE places for these things, as discussed in the following. > > "explanations" > -------------- > These are the non-syntax pages in the Language Reference section. > > These pages, IMO, are the exclusive domain of Benoit and should be left > to his authorship only. > > "how-to's" and other documents > ------------------------------ > Now here (section 2 of the start page) is the place for most if not all > the guff that should be left out of section 1. The general rule is "go > for your life! The more the better". A really good example is the > "Network Programming" page by Daniel Campos and Beno?t. > > BUT some unwritten rules should be followed: > * Include an INDEX at the top. See the wiki manual for how to do that. > * DON'T waste space by repeating information that is adequately > explained elsewhere. Reference it and include a link. > * Observe the legal and professional courtesy rules mentioned above. > * (I'm sorry to have to mention this one, but...) If you have a less > than "almost perfect" ability to compose readable, correctly spelled > and grammatically correct English then SEEK ASSISTANCE before posting > the page. Probably the best approach is to draft the page in your > native tongue and seek help in translating it on the mailing list. > DO NOT rely on online translation services like Google(TM). The > results are often total gibberish. English is a hard language and > one where specific words have completely confusing meanings depending > on context and grammar. For example the word "BEFORE" has at least > three totally different and conflicting meanings. > * Freely use but dont over-use the "special boxes". > * (An odd one) Draft your pages or updates to pages in an external > editor until the draft is pretty-well up to scratch! At least get all > the content, spelling, grammar and structure sorted BEFORE (sic) > submitting the page into the wiki. > > Pages in the other sections > --------------------------- > In general DO NOT play with these pages unless you are a RECOGNIZED > EXPERT (in the Gambas world) on these subjects. Instead use the mailing > list to raise any ambiguities, suspected defects, etc etc. > > Finally > ======= > RECOGNIZE that all the above is MY opinion and is NOT in any way an > "Official" policy of Gambas or it's author(s). The opinions are based > on well over 10 years of using Gambas. I think it was version 1.99? > Over that time I have had to repeatedly refer to the wiki because I > can't remember everything about the language ... ;-( > > and finally, finally > -------------------- > To novice readers of the wiki pages, especially the first section pages > and the various popup helps. I just want to say (again) "Read EVERY > word of the help page." Every single word. When I first started with > Gambas I had to write that out and put it on the wall above my screen. > Whenever I got stumped, leaned back and saw that sign it jolted me into > re-reading the page to find the bit I had mis-understood. And beware, if > you don't do that and ask on the mailing list when the answer is there > in black and white you might incur the wrath of a certain old curmudgeon > who will impolitely tell you to RTFM! There is a reason for that and > it's not just intentional rudeness on my part. But that is a topic for > another day. > > best regards > bruce > > P.S. Feel free to discuss, disagree or otherwise comment on the above. I > welcome it, but will defend it until the keys on my keyboard crumble to > dust. > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From brian at westwoodsvcs.com Wed Jun 2 05:43:57 2021 From: brian at westwoodsvcs.com (=?UTF-8?B?QnJpYW4gRw==?=) Date: Wed, 02 Jun 2021 06:43:57 +0300 Subject: [Gambas-user] =?utf-8?q?UDP_hole_punching?= In-Reply-To: References: <20210601173711.M32684@455.co.il> <855101793.11668.1622588483310.JavaMail.zimbra@westwoodsvcs.com> Message-ID: <1622605437.968184524@f21.my.com> Yes Dimitris! -- Thanks Brian G Tuesday, 01 June 2021, 05:32PM -07:00 from Dimitris Anogiatis dosida at gmail.com : >Brian G, > >A silly question. So in essence is hole punching just basically using an external server S to connect two clients A and B without?doing port forwarding on each other's router? >On Tue, Jun 1, 2021 at 5:28 PM Brian G < brian at westwoodsvcs.com> wrote: >>I thought the nat took care of that.. >> >>Flow: >> >>A and B each begin a UDP conversation with S; the NAT devices NA and NB create UDP translation states and assign temporary external port numbers EPA and EPB. >> >>S examines the UDP packets to get the source port used by NA and NB (the external NAT ports EPA and EPB). >> >>S passes EIPA:EPA to B and EIPB:EPB to A. >> >>A sends a packet to EIPB:EPB. >> >>NA examines A's packet and creates the following tuple in its translation table: (Source-IP-A, EPA, EIPB, EPB). >> >>B sends a packet to EIPA:EPA. >> >>NB examines B's packet and creates the following tuple in its translation table: (Source-IP-B, EPB, EIPA, EPA). >> >>Depending on the state of NA's translation table when B's first packet arrives >>? ?(i.e. whether the tuple (Source-IP-A, EPA, EIPB, EPB) has been created by the time of arrival of B's first packet), >>? ?B's first packet is dropped (no entry in translation table) or passed (entry in translation table has been made). >> >>Depending on the state of NB's translation table when A's first packet arrives >>? ?(i.e. whether the tuple (Source-IP-B, EPB, EIPA, EPA) has been created by the time of arrival of A's first packet), >>? ?A's first packet is dropped (no entry in translation table) or passed (entry in translation table has been made). >> >>At worst, the second packet from A reaches B; at worst the second packet from B reaches A. >>? ?Holes have been "punched" in the NAT and both hosts can directly communicate. >> >> >>From this it looks like your app get a message from S the go between containing the ip and port and then creates an outbound connection to the other host >>looks like you just need to read s's message and create a new udp connection to B. >> >>Maybe I am just miss reading or don't get what you are doing. >> >>Do you have a sample program? >> >>"Failure is the key to success; >>?each mistake teaches us something"? .. Morihei Ueshiba >>Brian G >> >>----- On Jun 1, 2021, at 10:43 AM, Mayost Sharon sharon at 455.co.il wrote: >> > Hello to you > > Can it be done: > UDP hole punching > Through: > gb.net > > I understand that I need to change: > UdpSocket.SourceHost and UdpSocket.SourcePort > And they are for reading only > They cannot be changed > > Is there another way to perform: UDP hole punching > > Thank you > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- >> >>----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > >----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From chrisml at deganius.de Wed Jun 2 09:15:43 2021 From: chrisml at deganius.de (Christof Thalhofer) Date: Wed, 2 Jun 2021 09:15:43 +0200 Subject: [Gambas-user] Correct strategy for VB static var conversion to Gambas? In-Reply-To: <36a4f829-7551-b6c1-85e2-1edd3e7204ef@starflightinc.com> References: <7de51a3c-3ff0-d4f9-1153-1277c6c9a201@gmail.com> <99d1c971-4651-ed0e-1521-7221b1d405d1@deganius.de> <2e08d9e3-44f8-e6dd-7055-542ccc674dd2@deganius.de> <36a4f829-7551-b6c1-85e2-1edd3e7204ef@starflightinc.com> Message-ID: <170b3c0a-4878-7ba1-fdeb-6904a6661b1f@deganius.de> Am 01.06.21 um 17:14 schrieb John Anderson: > I saw your good guy / bad guy message and snorted coffee all over my > keyboard.?? Yeah, I see how it works with the Gambas guys > now... :-) I like to have some fun at work. But not everyone can always follow that. > Now you know why I wanted a "static" declare - that dramatically changes > the whole conversion process when we deal with many state machine > functions.?? And now you know why I wanted a Data Breakpoint feature.? > And seeing how some of these sequenced state machines have 5 states, and > others have hundreds of states...you know why I was asking about a how > to show just one procedure at a time in IDE. Yes. > If you're looking at a module file with many long procedures, it would > be helpful if there was a way to keep the window vertical scroller bar > limited to the current procedure or declare section. That makes it > easy-er to scroll up and down over one very long procedure in a file > without overshooting top or bottom.? For instance - nothing changes on > the IDE as it is.? BUT if I open a file with long procedures I can tick > on an option where the vertical scroller is limited to just one > procedure or declaration section at a time.? In that mode I select > procedures to view with the drop-down box that is already there.? Or > maybe it's MouseAlt-Drag on scroller bar engages "Limit to One > Procedure" function (ie. use? "Left mouse" button, but we never use that > term any more so as to not discriminate against left-handers who use > reversed mouse devices - new docs rules).? It looks like MouseAlt > function is available on scroller bar.? Or whatever method works best I agree that this would be a handy feature but I personally wouldn't need it. As I said to you earlier: Please have a look at the bookmark feature first. When I have the "joy" to work with very large methods ? this is something that happens when speed is important and one works with GoSub/Return to simulate functions inside functions but without leaving the scope, I use bookmarks. Usually I have two or three bookmarks set inside the method with Ctrl-B at the places I'm currently working on and then jump with Alt-Pgup/Pgdown from one to the other. Did you try it? Did you also try Ctrl-Alt-Enter and Ctrl-Enter? 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 johna at starflightinc.com Wed Jun 2 17:29:21 2021 From: johna at starflightinc.com (John Anderson) Date: Wed, 2 Jun 2021 08:29:21 -0700 Subject: [Gambas-user] Correct strategy for VB static var conversion to Gambas? In-Reply-To: <170b3c0a-4878-7ba1-fdeb-6904a6661b1f@deganius.de> References: <7de51a3c-3ff0-d4f9-1153-1277c6c9a201@gmail.com> <99d1c971-4651-ed0e-1521-7221b1d405d1@deganius.de> <2e08d9e3-44f8-e6dd-7055-542ccc674dd2@deganius.de> <36a4f829-7551-b6c1-85e2-1edd3e7204ef@starflightinc.com> <170b3c0a-4878-7ba1-fdeb-6904a6661b1f@deganius.de> Message-ID: <86405d4e-ea8e-4bdf-e2f7-36760ef0bbce@starflightinc.com> On 6/2/2021 12:15 AM, Christof Thalhofer wrote: > >> If you're looking at a module file with many long procedures, it would >> be helpful if there was a way to keep the window vertical scroller bar >> limited to the current procedure or declare section. That makes it >> easy-er to scroll up and down over one very long procedure in a file >> without overshooting top or bottom.? For instance - nothing changes on >> the IDE as it is.? BUT if I open a file with long procedures I can tick >> on an option where the vertical scroller is limited to just one >> procedure or declaration section at a time.? In that mode I select >> procedures to view with the drop-down box that is already there.? Or >> maybe it's MouseAlt-Drag on scroller bar engages "Limit to One >> Procedure" function (ie. use? "Left mouse" button, but we never use that >> term any more so as to not discriminate against left-handers who use >> reversed mouse devices - new docs rules).? It looks like MouseAlt >> function is available on scroller bar.? Or whatever method works best > I agree that this would be a handy feature but I personally wouldn't > need it. > > As I said to you earlier: Please have a look at the bookmark feature > first. When I have the "joy" to work with very large methods ? this is > something that happens when speed is important and one works with > GoSub/Return to simulate functions inside functions but without leaving > the scope, I use bookmarks. > > Usually I have two or three bookmarks set inside the method with Ctrl-B > at the places I'm currently working on and then jump with > Alt-Pgup/Pgdown from one to the other. > > Did you try it? > > Did you also try Ctrl-Alt-Enter and Ctrl-Enter? > > Alles Gute > > Christof Thalhofer > Yes, I did try bookmarks and folding / unfolding, etc.? That certainly helps! - but when you compare to other IDE's that lets you focus on one and only one function at a time with vertical scroller:? Gambas IDE could be even better maybe.? But that's just how I see it.? IDE works OK for now and is really pretty good, albeit a little bit clumsy feeling (to me) in some spots - but that's probably due to my muscle memory and the fact I'm jumping around different IDE's / OS's several times a day. It's all good overall.? I'm not complaining, just noticing where IDE could be even better. -John From johna at starflightinc.com Wed Jun 2 18:24:45 2021 From: johna at starflightinc.com (John Anderson) Date: Wed, 2 Jun 2021 09:24:45 -0700 Subject: [Gambas-user] Debugging window, add expression & "+" button? Message-ID: <1d10e8c0-5175-d4ac-acd5-4f6f960ee653@starflightinc.com> An HTML attachment was scrubbed... URL: From chrisml at deganius.de Wed Jun 2 22:28:13 2021 From: chrisml at deganius.de (Christof Thalhofer) Date: Wed, 2 Jun 2021 22:28:13 +0200 Subject: [Gambas-user] Correct strategy for VB static var conversion to Gambas? In-Reply-To: <86405d4e-ea8e-4bdf-e2f7-36760ef0bbce@starflightinc.com> References: <7de51a3c-3ff0-d4f9-1153-1277c6c9a201@gmail.com> <99d1c971-4651-ed0e-1521-7221b1d405d1@deganius.de> <2e08d9e3-44f8-e6dd-7055-542ccc674dd2@deganius.de> <36a4f829-7551-b6c1-85e2-1edd3e7204ef@starflightinc.com> <170b3c0a-4878-7ba1-fdeb-6904a6661b1f@deganius.de> <86405d4e-ea8e-4bdf-e2f7-36760ef0bbce@starflightinc.com> Message-ID: Am 02.06.21 um 17:29 schrieb John Anderson: > Yes, I did try bookmarks and folding / unfolding, etc.? That certainly > helps! - but when you compare to other IDE's that lets you focus on one > and only one function at a time with vertical scroller:? Gambas IDE > could be even better maybe.? But that's just how I see it.? IDE works OK > for now and is really pretty good, albeit a little bit clumsy feeling > (to me) in some spots - but that's probably due to my muscle memory and > the fact I'm jumping around different IDE's / OS's several times a day. > > It's all good overall.? I'm not complaining, just noticing where IDE > could be even better. Just write a feature bug. So your idea does not disappear into the past of the ML and maybe Beno?t can spend some time on it when he is bored. ;-) It's been a long time that I've worked with Windows IDE's, so I can't compare well, but I find the Gambas IDE pretty much the best I've ever worked with. It's quite simple which is what I like, and that's why I sometimes worry that it might get too fat over time. 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 sharon at 455.co.il Thu Jun 3 01:04:57 2021 From: sharon at 455.co.il (Mayost Sharon) Date: Thu, 3 Jun 2021 02:04:57 +0300 Subject: [Gambas-user] UDP hole punching In-Reply-To: <855101793.11668.1622588483310.JavaMail.zimbra@westwoodsvcs.com> References: <20210601173711.M32684@455.co.il> <855101793.11668.1622588483310.JavaMail.zimbra@westwoodsvcs.com> Message-ID: <20210602230415.M49995@455.co.il> Hello everyone I am attaching a demo that shows it works beautifully. My mistake, I thought it was not necessary for both clients to be connected to the server One more thing to pay attention to! Need to occasionally communicate minimally with the server, otherwise it may lose connection I did an experiment and it works very nicely There should be two connection clients each client sitting at a separate address behind Nat This client is: udp_02 Need another third place that is with an open public address is the server This server: udp_01 Run the server: (For example the server address is: 1.2.3.4) udp_01.gambas 0.0.0.0 8060 Customer A: udp_02.gambas 1.2.3.4 8060 Customer B: udp_02.gambas 1.2.3.4 8060 To see that it's safe working try to stop the server and see that there is still a direct connection between A and B. P2P Thank you ---------- Original Message ----------- From: Brian G To: Gambas mailing list Sent: Tue, 1 Jun 2021 16:01:23 -0700 (PDT) Subject: Re: [Gambas-user] UDP hole punching > I thought the nat took care of that.. > > Flow: > > A and B each begin a UDP conversation with S; the NAT devices NA and NB create > UDP translation states and assign temporary external port numbers EPA and EPB. > > S examines the UDP packets to get the source port used by NA and NB (the > external NAT ports EPA and EPB). > > S passes EIPA:EPA to B and EIPB:EPB to A. > > A sends a packet to EIPB:EPB. > > NA examines A's packet and creates the following tuple in its translation > table: (Source-IP-A, EPA, EIPB, EPB). > > B sends a packet to EIPA:EPA. > > NB examines B's packet and creates the following tuple in its translation > table: (Source-IP-B, EPB, EIPA, EPA). > > Depending on the state of NA's translation table when B's first packet arrives > > (i.e. whether the tuple (Source-IP-A, EPA, EIPB, EPB) has been created by > the time of arrival of B's first packet), B's first packet is dropped (no > entry in translation table) or passed (entry in translation table has been > made). > > Depending on the state of NB's translation table when A's first packet arrives > > (i.e. whether the tuple (Source-IP-B, EPB, EIPA, EPA) has been created by > the time of arrival of A's first packet), A's first packet is dropped (no > entry in translation table) or passed (entry in translation table has been > made). > > At worst, the second packet from A reaches B; at worst the second packet from > B reaches A. Holes have been "punched" in the NAT and both hosts can > directly communicate. > > >From this it looks like your app get a message from S the go between containing the ip and port and then creates an outbound connection to the other host > looks like you just need to read s's message and create a new udp connection > to B. > > Maybe I am just miss reading or don't get what you are doing. > > Do you have a sample program? > > "Failure is the key to success; > each mistake teaches us something" .. Morihei Ueshiba > Brian G > > ----- On Jun 1, 2021, at 10:43 AM, Mayost Sharon sharon at 455.co.il wrote: > > > Hello to you > > > > Can it be done: > > UDP hole punching > > Through: > > gb.net > > > > I understand that I need to change: > > UdpSocket.SourceHost and UdpSocket.SourcePort > > And they are for reading only > > They cannot be changed > > > > Is there another way to perform: UDP hole punching > > > > Thank you > > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- ------- End of Original Message ------- -------------- next part -------------- A non-text attachment was scrubbed... Name: udp_01.zip Type: application/zip Size: 15466 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: udp_02.zip Type: application/zip Size: 15710 bytes Desc: not available URL: From dovey.john at gmail.com Fri Jun 4 06:13:17 2021 From: dovey.john at gmail.com (John Dovey) Date: Thu, 3 Jun 2021 23:13:17 -0500 Subject: [Gambas-user] UDP hole punching In-Reply-To: <20210602230415.M49995@455.co.il> References: <20210601173711.M32684@455.co.il> <855101793.11668.1622588483310.JavaMail.zimbra@westwoodsvcs.com> <20210602230415.M49995@455.co.il> Message-ID: > I am attaching a demo that shows it works beautifully. yYes it does!! Thank you, tested it and I could get two clients, each behind their own NAT, to send and receive data via UDP. > > One more thing to pay attention to! > Need to occasionally communicate minimally with the server, otherwise it > may lose connection > Let me see if I understand exactly what?s happening here. A public server is running udp01. That is always available and can be contacted by anyone who initiates a connection. When client A and B both connect to the server, your program connects them together and that established the path that all further UDP traffic between A and B will flow. To ensure the path remains open, A and B need to contact the server once a minute or so? Is that essentially correct? Now for my next question. Is it possible to do the same for tcp? John > > -- Sent from Gmail Mobile -------------- next part -------------- An HTML attachment was scrubbed... URL: From sharon at 455.co.il Fri Jun 4 13:19:48 2021 From: sharon at 455.co.il (Mayost Sharon) Date: Fri, 4 Jun 2021 14:19:48 +0300 Subject: [Gambas-user] UDP hole punching In-Reply-To: References: <20210601173711.M32684@455.co.il> <855101793.11668.1622588483310.JavaMail.zimbra@westwoodsvcs.com> <20210602230415.M49995@455.co.il> Message-ID: <20210604111939.M69781@455.co.il> Yes that's how it works In TCP it seems more complicated Because in our tools within GAMBAS it is not possible to send to the destination and the remote port before you create a connection. Or maybe it's not related to GAMBAS Because that's how TCP works But I have seen articles that say yes it can be done directly through IPV4 ---------- Original Message ----------- From: John Dovey To: Gambas Mailing List Sent: Thu, 3 Jun 2021 23:13:17 -0500 Subject: Re: [Gambas-user] UDP hole punching > > I am attaching a demo that shows it works beautifully. > > yYes it does!! Thank you, tested it and I could get two clients, each > behind their own NAT, to send and receive data via UDP. > > > > > One more thing to pay attention to! > > Need to occasionally communicate minimally with the server, otherwise it > > may lose connection > > > > Let me see if I understand exactly what?s happening here. > > A public server is running udp01. That is always available and can be > contacted by anyone who initiates a connection. > > When client A and B both connect to the server, your program connects them > together and that established the path that all further UDP traffic between > A and B will flow. > > To ensure the path remains open, A and B need to contact the server once a > minute or so? > > Is that essentially correct? > > Now for my next question. Is it possible to do the same for tcp? > > John > > > > > -- > Sent from Gmail Mobile ------- End of Original Message ------- From brian at westwoodsvcs.com Fri Jun 4 14:40:39 2021 From: brian at westwoodsvcs.com (=?UTF-8?B?QnJpYW4gRw==?=) Date: Fri, 04 Jun 2021 15:40:39 +0300 Subject: [Gambas-user] =?utf-8?q?UDP_hole_punching?= In-Reply-To: References: <20210601173711.M32684@455.co.il> <20210602230415.M49995@455.co.il> Message-ID: <1622810439.855655097@f28.my.com> It is far more difficult for tcp as it is a bidirctional protocol which requires an open connection.? Nat port translation is not predictable. Both sessions must guess the port number the nat will allocate to the peer and then do an open port on the others sides nat port.? Some nat processes do not support predictable port allocation . So is not a very reliable way to do this in tcp . Better to map a port number in this case on the client I think. Most routers now a day support port mapping through upnp.? -- Thanks Brian G Friday, 04 June 2021, 03:34AM -07:00 from John Dovey dovey.john at gmail.com : > >>I am attaching a demo that shows it works beautifully. >yYes it does!! Thank you, tested it and I could get two clients, each behind their own NAT, to send and receive data via UDP.? >>One more thing to pay attention to! >>Need to occasionally communicate minimally with the server, otherwise it may lose connection > >Let me see if I understand exactly what?s happening here.? > >A public server is running udp01. That is always available and can be contacted by anyone who initiates a connection. > >When client A and B both connect to the server, your program connects them together and that established the path that all further UDP traffic between A and B will flow. > >To ensure the path remains open, A and B need to contact the server once a minute or so? > >Is that essentially correct? > > >Now for my next question. Is it possible to do the same for tcp? > >John >-- >Sent from Gmail Mobile > >----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From claude.dessere at orange.fr Fri Jun 4 15:36:27 2021 From: claude.dessere at orange.fr (CD) Date: Fri, 04 Jun 2021 15:36:27 +0200 Subject: [Gambas-user] TestLocalTime Message-ID: <3a1028fdc54fac1f79aad8df21c3be6b2facca39.camel@orange.fr> Hello, I have an HTML page that displays the time using a script. The browser I use(Firefox) displays the local time (new Date () in JavaScript). Why does the Gambas WebView control not display local time but UTC? The same with gtk3 and qt5 How to remedy this difference? Regards. Attachments : TestLocalTime-0.0.1.tar.gz [System]Gambas=3.16.1OperatingSystem=LinuxKernel=5.4.0-73- genericArchitecture=x86_64Distribution=Ubuntu 20.04.2 LTSDesktop=MATEFont=Ubuntu,11Scale=8Theme=traditionalgreenLanguage=fr_FR.UTF- 8Memory=7838M [Libraries]Cairo=libcairo.so.2.11600.0Curl=libcurl.so.4.6.0DBus=libdbus- 1.so.3.19.11GDK2=libgdk-x11-2.0.so.0.2400.32GDK3=libgdk- 3.so.0.2404.16GStreamer=libgstreamer-1.0.so.0.1602.0GTK+2=libgtk-x11- 2.0.so.0.2400.32GTK+3=libgtk- 3.so.0.2404.16OpenGL=libGL.so.1.7.0Poppler=libpoppler.so.73.0.0Poppler=libpopple r.so.97.0.0QT5=libQt5Core.so.5.12.8SDL=libSDL- 1.2.so.0.11.4SQLite=libsqlite3.so.0.8.6 [Environment]COMPIZ_CONFIG_PROFILE=mateDBUS_SESSION_BUS_ADDRESS=unix:path=/run/u ser/1000/busDEFAULTS_PATH=/usr/share/gconf/mate.default.pathDESKTOP_SESSION=mate DISPLAY=:0GB_GUI=gb.gtk3GDMSESSION=mateGDM_LANG=fr_FRGIO_LAUNCHED_DESKTOP_FILE=< home>/Bureau/gambas3.desktopGIO_LAUNCHED_DESKTOP_FILE_PID=26522GPG_AGENT_INFO=/r un/user/1000/gnupg/S.gpg-agent:0:1GTK_MODULES=appmenu-gtk-module:gail:atk- bridge:canberra-gtk- moduleGTK_OVERLAY_SCROLLING=0HOME=INSIDE_CAJA_PYTHON=LANG=fr_FR.UTF- 8LANGUAGE=fr_FR.UTF-8LC_ADDRESS=fr_FR.UTF-8LC_ALL=fr_FR.UTF- 8LC_IDENTIFICATION=fr_FR.UTF-8LC_MEASUREMENT=fr_FR.UTF-8LC_MONETARY=fr_FR.UTF- 8LC_NAME=fr_FR.UTF-8LC_NUMERIC=fr_FR.UTF-8LC_PAPER=fr_FR.UTF- 8LC_TELEPHONE=fr_FR.UTF-8LC_TIME=fr_FR.UTF- 8LOGNAME=MANDATORY_PATH=/usr/share/gconf/mate.mandatory.pathMATE_DESKTOP_S ESSION_ID=this-is- deprecatedPAPERSIZE=a4PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sb in:/bin:/usr/games:/usr/local/games:/snap/binPWD=QT_ACCESSIBILITY=1QT_AUTO _SCREEN_SCALE_FACTOR=0QT_LOGGING_RULES=*.debug=falseQT_QPA_PLATFORMTHEME=gtk2QT_ SCALE_FACTOR=1SESSION_MANAGER=local/:@/tmp/.ICE- unix/1503,unix/:/tmp/.ICE- unix/1503SHELL=/bin/bashSHLVL=0SSH_AGENT_PID=1563SSH_AUTH_SOCK=/run/user/1000/ke yring/sshTZ=:/etc/localtimeUBUNTU_MENUPROXY=1USER=XAUTHORITY=/.Xauth orityXDG_CONFIG_DIRS=/etc/xdg/xdg- mate:/etc/xdgXDG_CURRENT_DESKTOP=MATEXDG_DATA_DIRS=/usr/share/mate:/usr/local/sh are:/usr/share:/var/lib/snapd/desktopXDG_GREETER_DATA_DIR=/var/lib/lightdm- data/XDG_RUNTIME_DIR=/run/user/1000XDG_SEAT=seat0XDG_SEAT_PATH=/org/freede sktop/DisplayManager/Seat0XDG_SESSION_CLASS=userXDG_SESSION_DESKTOP=mateXDG_SESS ION_ID=c2XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0XDG_SESSION_TY PE=x11XDG_VTNR=7 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: TestLocalTime-0.0.1.tar.gz Type: application/x-compressed-tar Size: 14156 bytes Desc: not available URL: From jose.rodriguez at cenpalab.cu Fri Jun 4 16:25:56 2021 From: jose.rodriguez at cenpalab.cu (jose.rodriguez at cenpalab.cu) Date: Fri, 04 Jun 2021 14:25:56 +0000 Subject: [Gambas-user] UDP hole punching In-Reply-To: References: <20210601173711.M32684@455.co.il> <855101793.11668.1622588483310.JavaMail.zimbra@westwoodsvcs.com> <20210602230415.M49995@455.co.il> Message-ID: June 4, 2021 6:33 AM, "John Dovey" wrote: > > Now for my next question. Is it possible to do the same for tcp? > According to Wikipedia: "The same technique is sometimes extended to Transmission Control Protocol (TCP) connections, though with less success because TCP connection streams are controlled by the host OS, not the application, and sequence numbers are selected randomly; thus any NAT device that performs sequence-number checking will not consider the packets to be associated with an existing connection and drop them." https://en.wikipedia.org/wiki/UDP_hole_punching Regards, Joe1962 From dovey.john at gmail.com Fri Jun 4 21:23:27 2021 From: dovey.john at gmail.com (John Dovey) Date: Fri, 4 Jun 2021 14:23:27 -0500 Subject: [Gambas-user] UDP hole punching In-Reply-To: <1622810439.855655097@f28.my.com> References: <20210601173711.M32684@455.co.il> <20210602230415.M49995@455.co.il> <1622810439.855655097@f28.my.com> Message-ID: I found this as part of BaShare (on the "Farm" I think. Investigating now. Seems to hold out some hope. miniupnpc_1.4.orig.tar.gz On Fri, 4 Jun 2021 at 07:51, Brian G wrote: > It is far more difficult for tcp as it is a bidirctional protocol which > requires an open connection. Nat port translation is not predictable. > Both sessions must guess the port number the nat will allocate to the peer > and then do an open port on the others sides nat port. Some nat processes > do not support predictable port allocation . So is not a very reliable way > to do this in tcp . > Better to map a port number in this case on the client I think. > Most routers now a day support port mapping through upnp. > > -- > Thanks > Brian G > Friday, 04 June 2021, 03:34AM -07:00 from John Dovey dovey.john at gmail.com: > > > I am attaching a demo that shows it works beautifully. > > yYes it does!! Thank you, tested it and I could get two clients, each > behind their own NAT, to send and receive data via UDP. > > > One more thing to pay attention to! > Need to occasionally communicate minimally with the server, otherwise it > may lose connection > > > Let me see if I understand exactly what?s happening here. > > A public server is running udp01. That is always available and can be > contacted by anyone who initiates a connection. > > When client A and B both connect to the server, your program connects them > together and that established the path that all further UDP traffic between > A and B will flow. > > To ensure the path remains open, A and B need to contact the server once a > minute or so? > > Is that essentially correct? > > > Now for my next question. Is it possible to do the same for tcp? > > John > > > -- > Sent from Gmail Mobile > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dovey.john at gmail.com Fri Jun 4 21:25:07 2021 From: dovey.john at gmail.com (John Dovey) Date: Fri, 4 Jun 2021 14:25:07 -0500 Subject: [Gambas-user] UDP hole punching In-Reply-To: References: <20210601173711.M32684@455.co.il> <20210602230415.M49995@455.co.il> <1622810439.855655097@f28.my.com> Message-ID: Here's the full src file BaShare-gambas-src-0.4.2.tar.gz On Fri, 4 Jun 2021 at 14:23, John Dovey wrote: > I found this as part of BaShare (on the "Farm" I think. > Investigating now. Seems to hold out some hope. > > > miniupnpc_1.4.orig.tar.gz > > > > On Fri, 4 Jun 2021 at 07:51, Brian G wrote: > >> It is far more difficult for tcp as it is a bidirctional protocol which >> requires an open connection. Nat port translation is not predictable. >> Both sessions must guess the port number the nat will allocate to the >> peer and then do an open port on the others sides nat port. Some nat >> processes do not support predictable port allocation . So is not a very >> reliable way to do this in tcp . >> Better to map a port number in this case on the client I think. >> Most routers now a day support port mapping through upnp. >> >> -- >> Thanks >> Brian G >> Friday, 04 June 2021, 03:34AM -07:00 from John Dovey dovey.john at gmail.com >> : >> >> >> I am attaching a demo that shows it works beautifully. >> >> yYes it does!! Thank you, tested it and I could get two clients, each >> behind their own NAT, to send and receive data via UDP. >> >> >> One more thing to pay attention to! >> Need to occasionally communicate minimally with the server, otherwise it >> may lose connection >> >> >> Let me see if I understand exactly what?s happening here. >> >> A public server is running udp01. That is always available and can be >> contacted by anyone who initiates a connection. >> >> When client A and B both connect to the server, your program connects >> them together and that established the path that all further UDP traffic >> between A and B will flow. >> >> To ensure the path remains open, A and B need to contact the server once >> a minute or so? >> >> Is that essentially correct? >> >> >> Now for my next question. Is it possible to do the same for tcp? >> >> John >> >> >> -- >> Sent from Gmail Mobile >> >> ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- >> >> >> ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bagonergi at gmail.com Fri Jun 4 22:46:11 2021 From: bagonergi at gmail.com (Gianluigi) Date: Fri, 4 Jun 2021 22:46:11 +0200 Subject: [Gambas-user] Compiling Gambas: error in gb.qt5 Message-ID: Compiling Gambas i get this error: ... Making all in gb.qt5 make[2]: ingresso nella directory ?/home/gian/gambasdevel/gb.qt5? make all-recursive make[3]: ingresso nella directory ?/home/gian/gambasdevel/gb.qt5? Making all in src make[4]: ingresso nella directory ?/home/gian/gambasdevel/gb.qt5/src? Making all in . make[5]: ingresso nella directory ?/home/gian/gambasdevel/gb.qt5/src? CC gb_qt5_la-desktop.lo /usr/lib/x86_64-linux-gnu/qt5/bin/moc -o main_moc.cpp main.h CXX gb_qt5_la-main_moc.lo CXX gb_qt5_la-main.lo CXX gb_qt5_la-CFont.lo CXX gb_qt5_la-CScreen.lo CXX gb_qt5_la-CStyle.lo /usr/lib/x86_64-linux-gnu/qt5/bin/moc -o CWidget_moc.cpp CWidget.h CXX gb_qt5_la-CWidget_moc.lo CXX gb_qt5_la-CWidget.lo CWidget.cpp: In member function ?virtual bool CWidget::eventFilter(QObject*, QEvent*)?: CWidget.cpp:2904:16: error: ?class QWheelEvent? has no member named ?position? 2904 | p.setX(ev->position().x()); | ^~~~~~~~ CWidget.cpp:2905:16: error: ?class QWheelEvent? has no member named ?position? 2905 | p.setY(ev->position().y()); | ^~~~~~~~ CWidget.cpp:2917:30: error: ?class QWheelEvent? has no member named ?globalPosition?; did you mean ?globalPos?? 2917 | MOUSE_info.screenX = ev->globalPosition().x(); | ^~~~~~~~~~~~~~ | globalPos CWidget.cpp:2918:30: error: ?class QWheelEvent? has no member named ?globalPosition?; did you mean ?globalPos?? 2918 | MOUSE_info.screenY = ev->globalPosition().y(); | ^~~~~~~~~~~~~~ | globalPos make[5]: *** [Makefile:848: gb_qt5_la-CWidget.lo] Errore 1 make[5]: uscita dalla directory ?/home/gian/gambasdevel/gb.qt5/src? make[4]: *** [Makefile:1301: all-recursive] Errore 1 make[4]: uscita dalla directory ?/home/gian/gambasdevel/gb.qt5/src? make[3]: *** [Makefile:467: all-recursive] Errore 1 make[3]: uscita dalla directory ?/home/gian/gambasdevel/gb.qt5? make[2]: *** [Makefile:399: all] Errore 2 make[2]: uscita dalla directory ?/home/gian/gambasdevel/gb.qt5? make[1]: *** [Makefile:441: all-recursive] Errore 1 make[1]: uscita dalla directory ?/home/gian/gambasdevel? make: *** [Makefile:382: all] Errore 2 Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From bagonergi at gmail.com Fri Jun 4 23:04:15 2021 From: bagonergi at gmail.com (Gianluigi) Date: Fri, 4 Jun 2021 23:04:15 +0200 Subject: [Gambas-user] Compiling Gambas: error in gb.qt5 In-Reply-To: References: Message-ID: Il giorno ven 4 giu 2021 alle ore 22:46 Gianluigi ha scritto: > Compiling Gambas i get this error: > ... > Making all in gb.qt5 > ... > Installed correctly with last fix, thanks ! Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From adamnt42 at gmail.com Sat Jun 5 00:24:27 2021 From: adamnt42 at gmail.com (Bruce) Date: Sat, 5 Jun 2021 07:54:27 +0930 Subject: [Gambas-user] Concordance and reverse concordance for controls Message-ID: <7b69fe4d-1523-407f-1583-75bdb1d4f420@gmail.com> I have just spent the better part of a day trying to figure out how to build a concordance and reverse concordance model for Gambas control properties, methods and events. Having not got very far, I thought I may ask if anyone has done that or something similar. tia b From brian at westwoodsvcs.com Sat Jun 5 00:58:35 2021 From: brian at westwoodsvcs.com (=?UTF-8?B?QnJpYW4gRw==?=) Date: Sat, 05 Jun 2021 01:58:35 +0300 Subject: [Gambas-user] =?utf-8?q?Concordance_and_reverse_concordance_for_?= =?utf-8?q?controls?= In-Reply-To: <7b69fe4d-1523-407f-1583-75bdb1d4f420@gmail.com> References: <7b69fe4d-1523-407f-1583-75bdb1d4f420@gmail.com> Message-ID: <1622847515.771954163@f14.my.com> Ok, I am a little dumb here. But do you mean your trying to build and index of some form and reverse index for the properties, methods and events? Maybe you can say a little more about what you are trying to accomplish? Confused but interested! -- Thanks Brian G Friday, 04 June 2021, 03:25PM -07:00 from Bruce adamnt42 at gmail.com : >I have just spent the better part of a day trying to figure out how to >build a concordance and reverse concordance model for Gambas control >properties, methods and events. > >Having not got very far, I thought I may ask if anyone has done that or >something similar. > >tia >b > >----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: From brian at westwoodsvcs.com Sat Jun 5 01:09:49 2021 From: brian at westwoodsvcs.com (=?UTF-8?B?QnJpYW4gRw==?=) Date: Sat, 05 Jun 2021 02:09:49 +0300 Subject: [Gambas-user] =?utf-8?q?Concordance_and_reverse_concordance_for_?= =?utf-8?q?controls?= In-Reply-To: <7b69fe4d-1523-407f-1583-75bdb1d4f420@gmail.com> References: <7b69fe4d-1523-407f-1583-75bdb1d4f420@gmail.com> Message-ID: <1622848189.762492690@f34.my.com> Bruce, Or perhaps you mean an old fashioned cross reference listing... -- Thanks Brian G Friday, 04 June 2021, 03:25PM -07:00 from Bruce adamnt42 at gmail.com : >I have just spent the better part of a day trying to figure out how to >build a concordance and reverse concordance model for Gambas control >properties, methods and events. > >Having not got very far, I thought I may ask if anyone has done that or >something similar. > >tia >b > >----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: From adamnt42 at gmail.com Sat Jun 5 02:32:20 2021 From: adamnt42 at gmail.com (Bruce) Date: Sat, 5 Jun 2021 10:02:20 +0930 Subject: [Gambas-user] Concordance and reverse concordance for controls In-Reply-To: <1622848189.762492690@f34.my.com> References: <7b69fe4d-1523-407f-1583-75bdb1d4f420@gmail.com> <1622848189.762492690@f34.my.com> Message-ID: On 5/6/21 8:39 am, Brian G wrote: > > Bruce, > Or perhaps you mean an old fashioned cross reference listing... > > -- > Thanks > Brian G Friday, 04 June 2021, 03:25PM -07:00 from Bruce adamnt42 at gmail.com : > >> I have just spent the better part of a day trying to figure out how to >> build a concordance and reverse concordance model for Gambas control >> properties, methods and events. >> >> Having not got very far, I thought I may ask if anyone has done that or >> something similar. >> >> tia >> b >> >> ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- >> >> >> ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- Well, yep pretty well all three. What I am trying to do is a) given a pproperty or event in one control, what are all the other controls that have the same property or event. b) given two controls, what properties or events do they share or hold uniquely, similarly three,four etc controls (a "product comparison" if you like, c) at the end of the day, what events affect what properties. The reason for all this is that we have over eighty custom controls, many of which are what I'd call "custom composite controls" such as a "LabelTextBox" that consists of a horizontally arranged Label and a TextBox. These have to re-expose (or hide) some of the native TextBox properties and events. The goal is to reduce the amount of dulicated code, across these CCC's. For instance, "who has a border property?" The whole mess is being rewritten (after 7-10 years of operation) into a "factory pattern" style of architecture, which may be illustrated as (even if a text model is confusing): CCC <-- _LabelledXYZControl <-- _LabelledControl <-- UserContainer (XYZ is a control"group") _LabelledControl has two attributes, one for the label and one for the actual operative control "BaseControl" As UserControl/UserContainer/Other (yes there are some that are "labelled custom controls" of our own. I am trying to move common procedures and event handlers as far up the inheritance chain as possible. For example, if every control had a "Text" property, which is patently not true, I could move methods that handle the Text up to the _LabelledControl level. Instead of the current code where say, the "Change" event is detected here there and everywhere depending on the CCC. Trying to manually analyse what properties, events and handler methods exist for each CCC and whether they can be generalised is mind-bending. So if I could get a concordance for the native controls, thats more than half the job done. Clear as mud, eh? But that's what I need to do. bruce From brian at westwoodsvcs.com Sat Jun 5 05:10:46 2021 From: brian at westwoodsvcs.com (=?UTF-8?B?QnJpYW4gRw==?=) Date: Sat, 05 Jun 2021 06:10:46 +0300 Subject: [Gambas-user] =?utf-8?q?Concordance_and_reverse_concordance_for_?= =?utf-8?q?controls?= In-Reply-To: References: <7b69fe4d-1523-407f-1583-75bdb1d4f420@gmail.com> <1622848189.762492690@f34.my.com> Message-ID: <1622862646.891256709@f11.my.com> Might it be easier to add a module to your app that runs thru all the classes and controls and generates a report. When the app is started would much of that info be available thru classes and the control classes and hierarchy ? Which can all be accessed at runtime. Inheritance of course is compile time mostly I think. Trying to write a app to basically compile everything but not really compile would be very time consuming I wonder if Benoit could print it from the compiler and linker... -- Thanks Brian G Friday, 04 June 2021, 05:33PM -07:00 from Bruce adamnt42 at gmail.com : >On 5/6/21 8:39 am, Brian G wrote: > > Bruce, > Or perhaps you mean an old fashioned cross reference listing... > > -- > Thanks > Brian G Friday, 04 June 2021, 03:25PM -07:00 from Bruce adamnt42 at gmail.com : > >> I have just spent the better part of a day trying to figure out how to >> build a concordance and reverse concordance model for Gambas control >> properties, methods and events. >> >> Having not got very far, I thought I may ask if anyone has done that or >> something similar. >> >> tia >> b >> >> ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- >> >> >> ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > >Well, yep pretty well all three. > >What I am trying to do is >a) given a pproperty or event in one control, what are all the other >controls that have the same property or event. >b) given two controls, what properties or events do they share or hold >uniquely, similarly three,four etc controls (a "product comparison" if >you like, >c) at the end of the day, what events affect what properties. > >The reason for all this is that we have over eighty custom controls, >many of which are what I'd call "custom composite controls" such as a >"LabelTextBox" that consists of a horizontally arranged Label and a >TextBox. These have to re-expose (or hide) some of the native TextBox >properties and events. The goal is to reduce the amount of dulicated >code, across these CCC's. For instance, "who has a border property?" > >The whole mess is being rewritten (after 7-10 years of operation) into a >"factory pattern" style of architecture, which may be illustrated as >(even if a text model is confusing): > >CCC < -- _LabelledXYZControl < -- _LabelledControl < -- UserContainer > >(XYZ is a control"group") > >_LabelledControl has two attributes, one for the label and one for the >actual operative control "BaseControl" As >UserControl/UserContainer/Other (yes there are some that are "labelled >custom controls" of our own. > >I am trying to move common procedures and event handlers as far up the >inheritance chain as possible. For example, if every control had a >"Text" property, which is patently not true, I could move methods that >handle the Text up to the _LabelledControl level. Instead of the current >code where say, the "Change" event is detected here there and everywhere >depending on the CCC. > >Trying to manually analyse what properties, events and handler methods >exist for each CCC and whether they can be generalised is mind-bending. >So if I could get a concordance for the native controls, thats more than >half the job done. > >Clear as mud, eh? But that's what I need to do. > >bruce > >----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: From herberthguzman at gmail.com Sun Jun 6 02:02:20 2021 From: herberthguzman at gmail.com (Herberth Guzman) Date: Sat, 5 Jun 2021 18:02:20 -0600 Subject: [Gambas-user] Webform Color Palette Message-ID: Hi group Can someone help me how to show a colorpalette in webform and when selecting the color it returns the integer of the selected color. I temporarily use a webcombobox but it is not what I want WebTextColor.Add ("Blue", 255) Herberth -------------- next part -------------- An HTML attachment was scrubbed... URL: From adamnt42 at gmail.com Sun Jun 6 12:17:45 2021 From: adamnt42 at gmail.com (Bruce) Date: Sun, 6 Jun 2021 19:47:45 +0930 Subject: [Gambas-user] Concordance and reverse concordance for controls In-Reply-To: <1622862646.891256709@f11.my.com> References: <7b69fe4d-1523-407f-1583-75bdb1d4f420@gmail.com> <1622848189.762492690@f34.my.com> <1622862646.891256709@f11.my.com> Message-ID: <9ece3c6e-fb86-a292-1c4e-b7e36715247f@gmail.com> On 5/6/21 12:40 pm, Brian G wrote: > Might it be easier to add a module to your app that runs thru all the classes and controls and generates a report. When the app is started would much of that info be available thru classes and the control classes and hierarchy ? Which can all be accessed at runtime. Thanks Brian, that gave me a fresh viewpoint and a "restart". I realised "suddenly" that all this information is essentially unchanging. So, I decided not to persue it in a "live" fashion but from a persisted reference list. So I created a new project that builds a concordance list and stores it in a SQLite database. That takes care of the "forward" side of the question, viz: given a control symbol, what other controls also expose the same symbol. But even that is not a trivial exercise. Neither in the creation nor the use of the concordance database. Building it takes about 3 hours! And there are over 15,000 rows in the "symbol" table. I have created some of the very basic queries and they run like a flash. Did you know that there are over 500 hidden methods in the Gambas GUI controls? And some of them look quite interesting when I consider the "Why cant the xyzzy control do a plugh?" questions that often occur to me. Anyway, having built the database I now find more things that I need/would like to know. But they are for a different thread. b From brian at westwoodsvcs.com Sun Jun 6 14:34:08 2021 From: brian at westwoodsvcs.com (=?UTF-8?B?QnJpYW4gRw==?=) Date: Sun, 06 Jun 2021 15:34:08 +0300 Subject: [Gambas-user] =?utf-8?q?Concordance_and_reverse_concordance_for_?= =?utf-8?q?controls?= In-Reply-To: <9ece3c6e-fb86-a292-1c4e-b7e36715247f@gmail.com> References: <7b69fe4d-1523-407f-1583-75bdb1d4f420@gmail.com> <1622862646.891256709@f11.my.com> <9ece3c6e-fb86-a292-1c4e-b7e36715247f@gmail.com> Message-ID: <1622982848.968348935@f32.my.com> Maybe you can post the code the builds the database, I am sure other would like to do the same thing. -- Thanks Brian G Sunday, 06 June 2021, 03:20AM -07:00 from Bruce adamnt42 at gmail.com : >On 5/6/21 12:40 pm, Brian G wrote: > Might it be easier to add a module to your app that runs thru all the classes and controls and generates a report. When the app is started would much of that info be available thru classes and the control classes and hierarchy ? Which can all be accessed at runtime. > >Thanks Brian, that gave me a fresh viewpoint and a "restart". > >I realised "suddenly" that all this information is essentially >unchanging. So, I decided not to persue it in a "live" fashion but from >a persisted reference list. >So I created a new project that builds a concordance list and stores it >in a SQLite database. That takes care of the "forward" side of the >question, viz: given a control symbol, what other controls also expose >the same symbol. > >But even that is not a trivial exercise. Neither in the creation nor the >use of the concordance database. Building it takes about 3 hours! And >there are over 15,000 rows in the "symbol" table. I have created some of >the very basic queries and they run like a flash. Did you know that >there are over 500 hidden methods in the Gambas GUI controls? And some >of them look quite interesting when I consider the "Why cant the xyzzy >control do a plugh?" questions that often occur to me. > >Anyway, having built the database I now find more things that I >need/would like to know. But they are for a different thread. > >b > >----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: From rwe-sse at osnanet.de Mon Jun 7 09:11:34 2021 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Mon, 7 Jun 2021 09:11:34 +0200 Subject: [Gambas-user] Howto tweak Apache for Gambas Message-ID: When I want to use webforms in Gambas, or Gambas in general as a possible source of web pages, how do I have to tell my Apache server? There is this very old wiki page with so bad English that it is nearly incomprehensible, is it still the only reference? Should we make it up? Or is the task much easier nowadays? Regards Rolf From claus.dietrich at freenet.de Mon Jun 7 09:39:46 2021 From: claus.dietrich at freenet.de (Claus Dietrich) Date: Mon, 7 Jun 2021 09:39:46 +0200 Subject: [Gambas-user] ListView - Erasing the Array of Selected Items in Multiple Selection Mode Message-ID: <23897161-01be-7dcc-c687-33eb60ad1671@freenet.de> Hi When running a ListView control in multi-select mode I noted that the list of selected items (property = Selection) is not emptied after a ListView.Clear. The same applies to the method ListView.Selection.Clear. I solved the problem with a ListView.UnSelectAll but would have expected that at least the ListView.Selection.Clear erases the array. Is that by design or a bug? Regards Claus From isafiur at gmail.com Mon Jun 7 09:50:56 2021 From: isafiur at gmail.com (Safiur Rahman) Date: Mon, 7 Jun 2021 13:35:56 +0545 Subject: [Gambas-user] Howto tweak Apache for Gambas Message-ID: Hi To run gambas gb.web.gui in Ubuntu 20.04 with apache2 server is very easy. You need to: 1) Repackage your package so that the executable goes to /usr/lib/cgi-bin (I extract package created by gambas IDE and then transfer executable in /usr/bin to /usr/lib/cgi-bin and then repackage with command $ dpkg -b 2) Install Apachae2 server $ sudo apt install apache2 $ sudo a2enmod cgid $ systemctl restart apache2 3) To allow Cross domain request in apache2: $ sudo a2enmod headers $ sudo nano /etc/apache2/apache2.conf Change to look as Options Indexes FollowSymLinks AllowOverride None Require all granted Header set Access-Control-Allow-Origin "*" Direct your client browser to http:///cgi-bin/ -- Regards Safiur Rahman From g4mba5 at gmail.com Mon Jun 7 13:10:15 2021 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Mon, 7 Jun 2021 13:10:15 +0200 Subject: [Gambas-user] Howto tweak Apache for Gambas In-Reply-To: References: Message-ID: <09c192e3-f918-a54e-f846-162740cc0e95@gmail.com> Le 07/06/2021 ? 09:11, Rolf-Werner Eilert a ?crit?: > When I want to use webforms in Gambas, or Gambas in general as a > possible source of web pages, how do I have to tell my Apache server? > > There is this very old wiki page with so bad English that it is nearly > incomprehensible, is it still the only reference? Should we make it up? > Or is the task much easier nowadays? > > Regards > Rolf > The executable of a webform / webpage project is a CGI script. So any documentation telling you how to run a CGI script with Apache should give you what you need. Regards, -- Beno?t Minisini From g4mba5 at gmail.com Mon Jun 7 13:11:02 2021 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Mon, 7 Jun 2021 13:11:02 +0200 Subject: [Gambas-user] ListView - Erasing the Array of Selected Items in Multiple Selection Mode In-Reply-To: <23897161-01be-7dcc-c687-33eb60ad1671@freenet.de> References: <23897161-01be-7dcc-c687-33eb60ad1671@freenet.de> Message-ID: <8e83ba25-e569-8dea-fd11-9e384b7a54a6@gmail.com> Le 07/06/2021 ? 09:39, Claus Dietrich a ?crit?: > Hi > > When running a ListView control in multi-select mode I noted that the > list of selected items (property = Selection) is not emptied after a > ListView.Clear. The same applies to the method ListView.Selection.Clear. > > I solved the problem with a ListView.UnSelectAll but would have expected > that at least the ListView.Selection.Clear erases the array. > > Is that by design or a bug? > > Regards > > Claus > I would say it's a "design misconception". :-) -- Beno?t Minisini From g4mba5 at gmail.com Mon Jun 7 13:12:43 2021 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Mon, 7 Jun 2021 13:12:43 +0200 Subject: [Gambas-user] Howto tweak Apache for Gambas In-Reply-To: References: Message-ID: Le 07/06/2021 ? 09:50, Safiur Rahman a ?crit?: > Hi > > To run gambas gb.web.gui in Ubuntu 20.04 with apache2 server is very > easy. You need to: > 1) Repackage your package so that the executable goes to /usr/lib/cgi-bin > (I extract package created by gambas IDE and then transfer executable > in /usr/bin to /usr/lib/cgi-bin and then repackage with command $ dpkg > -b That should be handled by the IDE packager... -- Beno?t Minisini From dovey.john at gmail.com Mon Jun 7 19:20:04 2021 From: dovey.john at gmail.com (John Dovey) Date: Mon, 7 Jun 2021 12:20:04 -0500 Subject: [Gambas-user] Patch Message-ID: Hi, I have searched in vain for any docs on the patch mechanism in the IDE. Can someone point me in the right direction? I want to know how it is designed to be used. All the best John -------------- next part -------------- An HTML attachment was scrubbed... URL: From adamnt42 at gmail.com Mon Jun 7 19:32:15 2021 From: adamnt42 at gmail.com (Bruce) Date: Tue, 8 Jun 2021 03:02:15 +0930 Subject: [Gambas-user] Patch In-Reply-To: References: Message-ID: <5fdc92bd-af9b-3ba2-24b5-06692d4125c2@gmail.com> On 8/6/21 2:50 am, John Dovey wrote: > Hi, > I have searched in vain for any docs on the patch mechanism in the IDE. Can > someone point me in the right direction? I want to know how it is designed > to be used. > > All the best > John > > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > IIRC there may be something way back in the mail archives. b From tobs at taboege.de Mon Jun 7 19:42:31 2021 From: tobs at taboege.de (Tobias Boege) Date: Mon, 7 Jun 2021 19:42:31 +0200 Subject: [Gambas-user] Patch In-Reply-To: References: Message-ID: <20210607174231.GI2520705@T580.localdomain> On Mon, 07 Jun 2021, John Dovey wrote: > Hi, > I have searched in vain for any docs on the patch mechanism in the IDE. Can > someone point me in the right direction? I want to know how it is designed > to be used. > A patch in the IDE is a *source code* patch as generated by the diff(1) utility and applied by the patch(1) utility (or `git diff` and `git apply`). Patches are created with respect to old versions of the current project. You open your project and click Patch ? Create. You navigate to wherever you store the tar.gz archives of the old versions of your project and select one of them. When you click Next, the patch will be created and displayed. You can choose which parts to include. Then you save the patch file. This patch describes how to upgrade the old version from the tar.gz archive you selected to the current state of the project you have loaded in your IDE. You can email this patch file to anyone who still has the old version of your project. They would open their (old) project in the IDE and click Patch ? Apply. They select the patch file and click on the Apply button. This applies the patch and reloads the project. If they ever want to go back from the new to the old version, they can load the patch again and click Revert. I attached you the tar.gz of version 0.0.1 of a test project and a patch which upgrades your version 0.0.1 to my current 0.0.2. Try it out. Best, Tobias -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk -------------- next part -------------- A non-text attachment was scrubbed... Name: gambastest-0.0.1.tar.gz Type: application/gzip Size: 11401 bytes Desc: not available URL: -------------- next part -------------- diff -urNaX /tmp/gambas-patch-ignore a/.project b/.project --- a/.project 2021-06-07 19:29:22.000000000 +0200 +++ b/.project 2021-06-07 19:31:58.000000000 +0200 @@ -1,6 +1,6 @@ # Gambas Project File 3.0 Startup=Main -Version=0.0.1 +Version=0.0.2 TabSize=2 Language=en_US SourcePath=/tmp diff -urNaX /tmp/gambas-patch-ignore a/.src/Class1.class b/.src/Class1.class --- a/.src/Class1.class 1970-01-01 01:00:00.000000000 +0100 +++ b/.src/Class1.class 2021-06-07 19:29:46.000000000 +0200 @@ -0,0 +1,7 @@ +' Gambas class file + +Public Sub _new() + + Print "New!" + +End diff -urNaX /tmp/gambas-patch-ignore a/.src/Main.module b/.src/Main.module --- a/.src/Main.module 2021-06-07 19:29:01.000000000 +0200 +++ b/.src/Main.module 2021-06-07 19:29:29.000000000 +0200 @@ -2,6 +2,6 @@ Public Sub Main() - Print "Hello world" + Print "Hallo Welt" End From dovey.john at gmail.com Tue Jun 8 06:56:16 2021 From: dovey.john at gmail.com (John Dovey) Date: Mon, 7 Jun 2021 23:56:16 -0500 Subject: [Gambas-user] Patch In-Reply-To: <20210607174231.GI2520705@T580.localdomain> References: <20210607174231.GI2520705@T580.localdomain> Message-ID: Thank you. That explains it perfectly. On Mon, 7 Jun 2021 at 12:42, Tobias Boege via User < user at lists.gambas-basic.org> wrote: > On Mon, 07 Jun 2021, John Dovey wrote: > > Hi, > > I have searched in vain for any docs on the patch mechanism in the IDE. > Can > > someone point me in the right direction? I want to know how it is > designed > > to be used. > > > > A patch in the IDE is a *source code* patch as generated by the diff(1) > utility and applied by the patch(1) utility (or `git diff` and `git > apply`). > > Patches are created with respect to old versions of the current project. > You open your project and click Patch ? Create. You navigate to wherever > you store the tar.gz archives of the old versions of your project and > select one of them. When you click Next, the patch will be created and > displayed. You can choose which parts to include. Then you save the > patch file. This patch describes how to upgrade the old version from the > tar.gz archive you selected to the current state of the project you have > loaded in your IDE. > > You can email this patch file to anyone who still has the old version > of your project. They would open their (old) project in the IDE and click > Patch ? Apply. They select the patch file and click on the Apply button. > This applies the patch and reloads the project. If they ever want to go > back from the new to the old version, they can load the patch again and > click Revert. > > I attached you the tar.gz of version 0.0.1 of a test project and a patch > which upgrades your version 0.0.1 to my current 0.0.2. Try it out. > > Best, > Tobias > > -- > "There's an old saying: Don't change anything... ever!" -- Mr. Monk > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Tue Jun 8 09:21:42 2021 From: bsteers4 at gmail.com (Bruce Steers) Date: Tue, 8 Jun 2021 08:21:42 +0100 Subject: [Gambas-user] ListView - Erasing the Array of Selected Items in Multiple Selection Mode In-Reply-To: <8e83ba25-e569-8dea-fd11-9e384b7a54a6@gmail.com> References: <23897161-01be-7dcc-c687-33eb60ad1671@freenet.de> <8e83ba25-e569-8dea-fd11-9e384b7a54a6@gmail.com> Message-ID: On Mon, 7 Jun 2021 at 12:12, Beno?t Minisini wrote: > Le 07/06/2021 ? 09:39, Claus Dietrich a ?crit : > > Hi > > > > When running a ListView control in multi-select mode I noted that the > > list of selected items (property = Selection) is not emptied after a > > ListView.Clear. The same applies to the method ListView.Selection.Clear. > > > > I solved the problem with a ListView.UnSelectAll but would have expected > > that at least the ListView.Selection.Clear erases the array. > > > > Is that by design or a bug? > > > > Regards > > > > Claus > > > > I would say it's a "design misconception". :-) > Haha , That sounds like most of my awesome ideas ;) -------------- next part -------------- An HTML attachment was scrubbed... URL: From claude.dessere at orange.fr Tue Jun 8 11:45:41 2021 From: claude.dessere at orange.fr (CD) Date: Tue, 08 Jun 2021 11:45:41 +0200 Subject: [Gambas-user] TestLocalTime (New Gambas test project ) Message-ID: <1748b39bb77f70449625a9abbb518f33534c9c27.camel@orange.fr> Hello, I have an HTML page that displays the time using a script. The browser I use(Firefox) displays the local time (new Date () in JavaScript). Why does the Gambas WebView control not display local time but UTC?( http://gambaswiki.org/wiki/comp : gb.qt5.webview New web browser component based on Chromium for gb.qt5 3.16 The same with gtk3 WebView control. If the page must be displayed in both ways: -in a browser -in a gambas app with WebView control this poses a problem. How to remedy this difference? Regards. Attachments : TestLocalTime-0.0.2.tar.gz [System]Gambas=3.16.1OperatingSystem=LinuxKernel=5.4.0-73- genericArchitecture=x86_64Distribution=Ubuntu 20.04.2 LTSDesktop=MATEFont=Ubuntu,11Scale=8Theme=traditionalgreenLanguage=fr_FR.UTF- 8Memory=7838M [Libraries]Cairo=libcairo.so.2.11600.0Curl=libcurl.so.4.6.0DBus=libdbus- 1.so.3.19.11GDK2=libgdk-x11-2.0.so.0.2400.32GDK3=libgdk- 3.so.0.2404.16GStreamer=libgstreamer-1.0.so.0.1602.0GTK+2=libgtk-x11- 2.0.so.0.2400.32GTK+3=libgtk- 3.so.0.2404.16OpenGL=libGL.so.1.7.0Poppler=libpoppler.so.73.0.0Poppler=libpopple r.so.97.0.0QT5=libQt5Core.so.5.12.8SDL=libSDL- 1.2.so.0.11.4SQLite=libsqlite3.so.0.8.6 [Environment]COMPIZ_CONFIG_PROFILE=mateDBUS_SESSION_BUS_ADDRESS=unix:path=/run/u ser/1000/busDEFAULTS_PATH=/usr/share/gconf/mate.default.pathDESKTOP_SESSION=mate DISPLAY=:0GB_GUI=gb.gtk3GDMSESSION=mateGDM_LANG=fr_FRGIO_LAUNCHED_DESKTOP_FILE=< home>/Bureau/gambas3.desktopGIO_LAUNCHED_DESKTOP_FILE_PID=26522GPG_AGENT_INFO=/r un/user/1000/gnupg/S.gpg-agent:0:1GTK_MODULES=appmenu-gtk-module:gail:atk- bridge:canberra-gtk- moduleGTK_OVERLAY_SCROLLING=0HOME=INSIDE_CAJA_PYTHON=LANG=fr_FR.UTF- 8LANGUAGE=fr_FR.UTF-8LC_ADDRESS=fr_FR.UTF-8LC_ALL=fr_FR.UTF- 8LC_IDENTIFICATION=fr_FR.UTF-8LC_MEASUREMENT=fr_FR.UTF-8LC_MONETARY=fr_FR.UTF- 8LC_NAME=fr_FR.UTF-8LC_NUMERIC=fr_FR.UTF-8LC_PAPER=fr_FR.UTF- 8LC_TELEPHONE=fr_FR.UTF-8LC_TIME=fr_FR.UTF- 8LOGNAME=MANDATORY_PATH=/usr/share/gconf/mate.mandatory.pathMATE_DESKTOP_S ESSION_ID=this-is- deprecatedPAPERSIZE=a4PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sb in:/bin:/usr/games:/usr/local/games:/snap/binPWD=QT_ACCESSIBILITY=1QT_AUTO _SCREEN_SCALE_FACTOR=0QT_LOGGING_RULES=*.debug=falseQT_QPA_PLATFORMTHEME=gtk2QT_ SCALE_FACTOR=1SESSION_MANAGER=local/:@/tmp/.ICE- unix/1503,unix/:/tmp/.ICE- unix/1503SHELL=/bin/bashSHLVL=0SSH_AGENT_PID=1563SSH_AUTH_SOCK=/run/user/1000/ke yring/sshTZ=:/etc/localtimeUBUNTU_MENUPROXY=1USER=XAUTHORITY=/.Xauth orityXDG_CONFIG_DIRS=/etc/xdg/xdg- mate:/etc/xdgXDG_CURRENT_DESKTOP=MATEXDG_DATA_DIRS=/usr/share/mate:/usr/local/sh are:/usr/share:/var/lib/snapd/desktopXDG_GREETER_DATA_DIR=/var/lib/lightdm- data/XDG_RUNTIME_DIR=/run/user/1000XDG_SEAT=seat0XDG_SEAT_PATH=/org/freede sktop/DisplayManager/Seat0XDG_SESSION_CLASS=userXDG_SESSION_DESKTOP=mateXDG_SESS ION_ID=c2XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0XDG_SESSION_TY PE=x11XDG_VTNR=7 -------------- next part -------------- An HTML attachment was scrubbed... URL: From claude.dessere at orange.fr Tue Jun 8 11:49:14 2021 From: claude.dessere at orange.fr (CD) Date: Tue, 08 Jun 2021 11:49:14 +0200 Subject: [Gambas-user] TestLocalTime (New Gambas test project ) Message-ID: Hello, I have an HTML page that displays the time using a script. The browser I use(Firefox) displays the local time (new Date () in JavaScript). Why does the Gambas WebView control not display local time but UTC? (http://gambaswiki.org/wiki/comp : gb.qt5.webview New web browser component based on Chromium for gb.qt5 3.16 The same with gtk3 WebView control. If the page must be displayed in both ways: -in a browser -in a gambas app with WebView control this poses a problem. How to remedy this difference? Regards. Attachments : TestLocalTime-0.0.2.tar.gz [System] Gambas=3.16.1 OperatingSystem=Linux Kernel=5.4.0-73-generic Architecture=x86_64 Distribution=Ubuntu 20.04.2 LTS Desktop=MATE Font=Ubuntu,11 Scale=8 Theme=traditionalgreen Language=fr_FR.UTF-8 Memory=7838M [Libraries] Cairo=libcairo.so.2.11600.0 Curl=libcurl.so.4.6.0 DBus=libdbus-1.so.3.19.11 GDK2=libgdk-x11-2.0.so.0.2400.32 GDK3=libgdk-3.so.0.2404.16 GStreamer=libgstreamer-1.0.so.0.1602.0 GTK+2=libgtk-x11-2.0.so.0.2400.32 GTK+3=libgtk-3.so.0.2404.16 OpenGL=libGL.so.1.7.0 Poppler=libpoppler.so.73.0.0 Poppler=libpoppler.so.97.0.0 QT5=libQt5Core.so.5.12.8 SDL=libSDL-1.2.so.0.11.4 SQLite=libsqlite3.so.0.8.6 [Environment] COMPIZ_CONFIG_PROFILE=mate DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus DEFAULTS_PATH=/usr/share/gconf/mate.default.path DESKTOP_SESSION=mate DISPLAY=:0 GB_GUI=gb.gtk3 GDMSESSION=mate GDM_LANG=fr_FR GIO_LAUNCHED_DESKTOP_FILE=/Bureau/gambas3.desktop GIO_LAUNCHED_DESKTOP_FILE_PID=26522 GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1 GTK_MODULES=appmenu-gtk-module:gail:atk-bridge:canberra-gtk-module GTK_OVERLAY_SCROLLING=0 HOME= INSIDE_CAJA_PYTHON= LANG=fr_FR.UTF-8 LANGUAGE=fr_FR.UTF-8 LC_ADDRESS=fr_FR.UTF-8 LC_ALL=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/mate.mandatory.path MATE_DESKTOP_SESSION_ID=this-is-deprecated PAPERSIZE=a4 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/us r/local/games:/snap/bin PWD= QT_ACCESSIBILITY=1 QT_AUTO_SCREEN_SCALE_FACTOR=0 QT_LOGGING_RULES=*.debug=false QT_QPA_PLATFORMTHEME=gtk2 QT_SCALE_FACTOR=1 SESSION_MANAGER=local/:@/tmp/.ICE-unix/1503,unix/:/tmp/.ICE- unix/1503 SHELL=/bin/bash SHLVL=0 SSH_AGENT_PID=1563 SSH_AUTH_SOCK=/run/user/1000/keyring/ssh TZ=:/etc/localtime UBUNTU_MENUPROXY=1 USER= XAUTHORITY=/.Xauthority XDG_CONFIG_DIRS=/etc/xdg/xdg-mate:/etc/xdg XDG_CURRENT_DESKTOP=MATE XDG_DATA_DIRS=/usr/share/mate:/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_CLASS=user XDG_SESSION_DESKTOP=mate XDG_SESSION_ID=c2 XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0 XDG_SESSION_TYPE=x11 XDG_VTNR=7 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: TestLocalTime-0.0.2.tar.gz Type: application/x-compressed-tar Size: 14263 bytes Desc: not available URL: From g4mba5 at gmail.com Tue Jun 8 14:32:17 2021 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Tue, 8 Jun 2021 14:32:17 +0200 Subject: [Gambas-user] TestLocalTime (New Gambas test project ) In-Reply-To: References: Message-ID: <871ae682-929f-a2f3-4913-af03a958ea00@gmail.com> Le 08/06/2021 ? 11:49, CD a ?crit?: > Hello, > > I have an HTML page that displays the time using a script. > The browser I use(Firefox) displays the local time (new Date () in > JavaScript). > > Why does the Gambas WebView control not display local time but UTC? > (http://gambaswiki.org/wiki/comp ?: > gb.qt5.webview ?New web > browser component based on Chromium for gb.qt5? 3.16 > The same with gtk3 WebView control. > > If the page must be displayed in both ways: > -in a browser > -in a gambas app with WebView control this poses a problem. > > How to remedy this difference? > > Regards. > Here is the end of my answer: So, no idea at the moment! As I told you, WebView is sort of an embedded Chromium, and does what it wants. One should look at the javascript standard (lol) to see how it decided to print date/times. Maybe you are using a stupid Javascript method (there are a lot) instead of a similar one that would do the job correctly? -- Beno?t Minisini From claus.dietrich at freenet.de Tue Jun 8 21:50:14 2021 From: claus.dietrich at freenet.de (Claus Dietrich) Date: Tue, 8 Jun 2021 21:50:14 +0200 Subject: [Gambas-user] ListView - Erasing the Array of Selected Items in Multiple Selection Mode Message-ID: <8052bd0e-41bf-cc09-ae6d-27780c49b323@freenet.de> An HTML attachment was scrubbed... URL: From adamnt42 at gmail.com Tue Jun 8 23:20:48 2021 From: adamnt42 at gmail.com (Bruce) Date: Wed, 9 Jun 2021 06:50:48 +0930 Subject: [Gambas-user] ListView - Erasing the Array of Selected Items in Multiple Selection Mode In-Reply-To: <8052bd0e-41bf-cc09-ae6d-27780c49b323@freenet.de> References: <8052bd0e-41bf-cc09-ae6d-27780c49b323@freenet.de> Message-ID: <8fcabb22-0a2c-a4b7-d90f-2bf6f1acf86d@gmail.com> On 9/6/21 5:20 am, Claus Dietrich wrote: > > I would say it's a "design misconception". :-) > > As a user I really like the ListView I didn't see a misconception yet. I would > rather suggest to think about the completion of functionalities i.e. providing > the ListView.Selection.Clear - method with a functionality. Would you support an > according feature request in the bug-tracker? > > Regards, Claus > > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > I had the same problem about a year ago. @Benoit: Is ListView.Selection a copy of the underlying array, like the ComboBox.List? b From dovey.john at gmail.com Wed Jun 9 01:16:00 2021 From: dovey.john at gmail.com (John Dovey) Date: Tue, 8 Jun 2021 18:16:00 -0500 Subject: [Gambas-user] Migrating to Gambas Message-ID: Does anyone have any thoughts/advice about migrating a project from vb6 to Gambas? I found a reference to an old project for migrating some forms, but that was for an old version of Gambas. John -------------- next part -------------- An HTML attachment was scrubbed... URL: From adamnt42 at gmail.com Wed Jun 9 01:58:15 2021 From: adamnt42 at gmail.com (Bruce) Date: Wed, 9 Jun 2021 09:28:15 +0930 Subject: [Gambas-user] Migrating to Gambas In-Reply-To: References: Message-ID: On 9/6/21 8:46 am, John Dovey wrote: > Does anyone have any thoughts/advice about migrating a project from vb6 to > Gambas? > I found a reference to an old project for migrating some forms, but that > was for an old version of Gambas. > > John > > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > Several million, most being unsuitable for publication. A few that leap to mind are: * You can't make a silk purse from a sow's ear. * A 60 year old street walker wearing Chanel makeup is still an old tart. * No other profession pretends to, nor attempts to, "migrate" something into something else. Does a chef "migrate" a piece of burned toast into a three-layer wedding cake? Does a builder "migrate" an old lean-to into a 5 bedroom mansion? Does a mechanic "migrate" a 125cc Vespa into a Lamborghini Contache? I think the most efficient approach is: 1) Get ahold of the design documentation for the VB6 application. 2) Throw it out. It's mainly lies anyway. 3) Start from scratch. Quickest, Cheapest, Correctest. The alternative, "damn the alligators, let's jump in" approach has been attempted many times... 1) Write a Gambas utility program that converts the "virtual bullsh*t" into Gambas code. 2) Spent hours and days posting to the mailing list asking "why isn't Gambas like VB6?" 3) RTFM 4) Use a more efficient approach. Have fun. b From dovey.john at gmail.com Wed Jun 9 03:16:37 2021 From: dovey.john at gmail.com (John Dovey) Date: Tue, 8 Jun 2021 20:16:37 -0500 Subject: [Gambas-user] Migrating to Gambas In-Reply-To: References: Message-ID: ROTFLMAO I've started rewriting it by hand anyway. Just hoped there was something to help migrate the forms. They're a PIA JD On Tue, 8 Jun 2021 at 18:59, Bruce wrote: > On 9/6/21 8:46 am, John Dovey wrote: > > Does anyone have any thoughts/advice about migrating a project from vb6 > to > > Gambas? > > I found a reference to an old project for migrating some forms, but that > > was for an old version of Gambas. > > > > John > > > > > > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > > > Several million, most being unsuitable for publication. > > A few that leap to mind are: > * You can't make a silk purse from a sow's ear. > * A 60 year old street walker wearing Chanel makeup is still an old tart. > * No other profession pretends to, nor attempts to, "migrate" something > into something else. Does a chef "migrate" a piece of burned toast into > a three-layer wedding cake? Does a builder "migrate" an old lean-to into > a 5 bedroom mansion? Does a mechanic "migrate" a 125cc Vespa into a > Lamborghini Contache? > > I think the most efficient approach is: > 1) Get ahold of the design documentation for the VB6 application. > 2) Throw it out. It's mainly lies anyway. > 3) Start from scratch. > > Quickest, Cheapest, Correctest. > > The alternative, "damn the alligators, let's jump in" approach has been > attempted many times... > 1) Write a Gambas utility program that converts the "virtual bullsh*t" > into Gambas code. > 2) Spent hours and days posting to the mailing list asking "why isn't > Gambas like VB6?" > 3) RTFM > 4) Use a more efficient approach. > > Have fun. > b > > > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From johna at starflightinc.com Wed Jun 9 06:05:56 2021 From: johna at starflightinc.com (John Anderson) Date: Tue, 8 Jun 2021 21:05:56 -0700 Subject: [Gambas-user] Migrating to Gambas In-Reply-To: References: Message-ID: <22909d4c-4ff3-fe56-f472-a82073096ce7@starflightinc.com> An HTML attachment was scrubbed... URL: From brian at westwoodsvcs.com Wed Jun 9 07:41:56 2021 From: brian at westwoodsvcs.com (=?UTF-8?B?QnJpYW4gRw==?=) Date: Wed, 09 Jun 2021 08:41:56 +0300 Subject: [Gambas-user] =?utf-8?q?Migrating_to_Gambas?= In-Reply-To: <22909d4c-4ff3-fe56-f472-a82073096ce7@starflightinc.com> References: <22909d4c-4ff3-fe56-f472-a82073096ce7@starflightinc.com> Message-ID: <1623217316.487661076@f34.my.com> Gambas has special object functions _get _put for assignment and getting value of an object -- Thanks Brian G Tuesday, 08 June 2021, 09:07PM -07:00 from John Anderson johna at starflightinc.com : >On 6/8/2021 4:16 PM, John Dovey wrote: >>Does anyone have any thoughts/advice about >> migrating a project from vb6 to Gambas? >>I found a reference to an old project for migrating some >> forms, but that was for an old version of Gambas. >> >>John >Doing a VB6 to Gambas conversion now on large > codebase.? New-ish user here but it gets easier quick. > >Actually, I'm getting good results on a large project where we > want to keep source code as close to original as possible. Thanks > to advice from kind people here and just trying different methods > out. > >In my case - Starting "from scratch" is 100% bullshit in terms > of labor time if it can be avoided on a large system; in our > case it could be years testing something we started from ground > zero.? We especially have to keep the critical state machine > routines intact, exactly as they are, and without any errors > introduced - that source code has millions of hours verified and > expensive testing.? If you're the one paying the bills and > running a business, you want to re-use existing source code > where it makes sense to do so.? Not all the time, but be > practical about your approach.? Sometimes you might start from > scratch.? Other times that is the very last thing you want to > do. > >So far we have been able to re-create a lot of the most critical > state machine code pretty well now that we can declare a Static > var inside a state machine.? That completely changes things, and > for the better...IF you're doing a VB conversion. > >We have converted several forms already, trying different > methods.? It tuns out it doesn't take too long to print out the > form on VB6, jot down the control names for each control, and then > duplicate the equivalent layout in Gambas with the same or close > equivalent control.? It helps to run VB6 on a Windows VM in one > monitor, and Gambas on another, so you can get the layouts and > control names the same. > >After that I made a wrapper for VB6 MsgBox to something like > Message.Info etc. on Gambas - gotta use Qt for that, according to > docs (we are).? Because we used MsgBox hundreds of times.? We can > clean that up later but for now wherever we can make a wrapper for > your simpler VB calls that don't exist in Gambas, or the maybe > function exists but goes by a different name. > >Convert "Double" vars to "Float".??? Watch out on your C-code > function call test suites here, if your test procedure thinks a > struct has a float instead of a double....it might flag a struct > mismatch for a C-call until you change your code review > procedures. > >Handle Globals a little different, we use the "Put globals in > Globals.mod" file method as suggested in docs.? > >Your Find / Replace tools works very close to how it works in in > VB6. > >The real bummer is converting arrays to square brackets.? We will > have to do that in many many thousands of places.? I'm toying with > the idea of scanning the code base for all arrays, and using that > list to search for where those arrays are used in > code...automation might help here.? > >Watch out for your class Getters and Setters - in VB6 look for > Property Let, Get, Set and convert that to Property _Read, _Write, > and ??? in Gambas.? In Property Declarations section of help > file.? I haven't needed to convert a Property Set yet, but in VB6 > that was a property object that could -only- be used on left side > of an expression... I'm not sure if I need to do that in my > conversion yet.? > >There is a gb.vb component that makes some string funcs, dates, > rounding etc working like VB6. > >There are SOME spots that yes, will require rewrite.? But I'm > finding that probably 85% of expensive source code is re-useable > pretty much as is.? > >At least that's what we're finding out so far.? Some weeks of work > ahead of us, but early testing is looking hopeful. > >-John > > >----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bagonergi at gmail.com Wed Jun 9 09:38:16 2021 From: bagonergi at gmail.com (Gianluigi) Date: Wed, 9 Jun 2021 09:38:16 +0200 Subject: [Gambas-user] Migrating to Gambas In-Reply-To: <22909d4c-4ff3-fe56-f472-a82073096ce7@starflightinc.com> References: <22909d4c-4ff3-fe56-f472-a82073096ce7@starflightinc.com> Message-ID: As has already been said, there are many similarities. An important point to investigate is window management, you need to understand how containers work and you will see that with a few clicks you will create professional windows. Another important point is to understand how Action works which allows you to coordinate buttons with menus and keyboard shortcuts. Take a look at the gb.form.mdi component my three cents :-) Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From chrisml at deganius.de Wed Jun 9 10:30:35 2021 From: chrisml at deganius.de (Christof Thalhofer) Date: Wed, 9 Jun 2021 10:30:35 +0200 Subject: [Gambas-user] Migrating to Gambas In-Reply-To: References: Message-ID: Am 09.06.21 um 01:16 schrieb John Dovey: > Does anyone have any thoughts/advice about migrating a project from vb6 > to Gambas? > I found a reference to an old project for migrating some forms, but that > was for an old version of Gambas. The migration of some large VBA projects of our firm happened some years ago. I could reuse a lot of old code, but I had to create all forms and MS Access reports new in Gambas. For the reports I created a small templating system based on LaTeX. I had found a hidden function in MS Access which could be used to export the code as .txt so I could copy/paste a lot of code from textfiles into Gambas, let it run and see what happens. A lot of code runs as it is, some semantics are different, but after a while I could refactor quite fast. Meanwhile, in Gambas 'Dim' doesn't have to be just at the beginning, as it was before, which i think is a pity because: The 'Dim's spread across the old code was what pointed out to me the most how bad my old code was and forced me to refactor it. I found large code blocks with sometimes duplicate variables (with spurious names) for the same content, often it was the random result of the undocumented 'trial and error' coding of a very unexperienced programmer: Me when I was young. It worked but at the same time it was hardly understandable. My experience is that migration is not only to make the same piece of code run in Gambas as it is, but also refactoring the code in a way that it is cleaner, well documented and better understandable in future. Look at the code of Gambas itself to figure out how code can be organized and documented and how variables can be named. I don't know what your old code is like, but mine was terrible. The time I spent refactoring and partially reprogramming the thing in a new and better way was not in vain though, simply because one can continue working much better afterwards. Alles Gute Christof Thalhofer -- Dies ist keine Signatur From chrisml at deganius.de Wed Jun 9 10:34:55 2021 From: chrisml at deganius.de (Christof Thalhofer) Date: Wed, 9 Jun 2021 10:34:55 +0200 Subject: [Gambas-user] Migrating to Gambas In-Reply-To: References: Message-ID: <1e56d598-2d4e-81f6-763a-e0a6ad8e4f7d@deganius.de> Am 09.06.21 um 01:58 schrieb Bruce: > 3) Start from scratch. Why this is the worst idea ever: https://www.joelonsoftware.com/2000/04/06/things-you-should-never-do-part-i/ Alles Gute Christof Thalhofer -- Dies ist keine Signatur From g4mba5 at gmail.com Wed Jun 9 14:04:47 2021 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Wed, 9 Jun 2021 14:04:47 +0200 Subject: [Gambas-user] Migrating to Gambas In-Reply-To: <22909d4c-4ff3-fe56-f472-a82073096ce7@starflightinc.com> References: <22909d4c-4ff3-fe56-f472-a82073096ce7@starflightinc.com> Message-ID: Le 09/06/2021 ? 06:05, John Anderson a ?crit?: > On 6/8/2021 4:16 PM, John Dovey wrote: >> Does anyone have any thoughts/advice about migrating a project from >> vb6 to Gambas? >> I found a reference to an old project for migrating some forms, but >> that was for an old version of Gambas. >> >> John > > Doing a VB6 to Gambas conversion now on large codebase.? New-ish user > here but it gets easier quick. > > Actually, I'm getting good results on a large project where we want to > keep source code as close to original as possible. Thanks to advice from > kind people here and just trying different methods out. > > In my case - Starting "from scratch" is 100% bullshit in terms of labor > time if it can be avoided on a large system; in our case it could be > years testing something we started from ground zero.? We especially have > to keep the critical state machine routines intact, exactly as they are, > and without any errors introduced - that source code has millions of > hours verified and expensive testing.? If you're the one paying the > bills and running a business, you want to re-use existing source code > where it makes sense to do so.? Not all the time, but be practical about > your approach.? Sometimes you might start from scratch.? Other times > that is the very last thing you want to do. > > So far we have been able to re-create a lot of the most critical state > machine code pretty well now that we can declare a Static var inside a > state machine.? That completely changes things, and for the better...IF > you're doing a VB conversion. > > We have converted several forms already, trying different methods.? It > tuns out it doesn't take too long to print out the form on VB6, jot down > the control names for each control, and then duplicate the equivalent > layout in Gambas with the same or close equivalent control.? It helps to > run VB6 on a Windows VM in one monitor, and Gambas on another, so you > can get the layouts and control names the same. > > After that I made a wrapper for VB6 MsgBox to something like > Message.Info etc. on Gambas - gotta use Qt for that, according to docs > (we are).? Because we used MsgBox hundreds of times.? We can clean that > up later but for now wherever we can make a wrapper for your simpler VB > calls that don't exist in Gambas, or the maybe function exists but goes > by a different name. > > Convert "Double" vars to "Float".??? Watch out on your C-code function > call test suites here, if your test procedure thinks a struct has a > float instead of a double....it might flag a struct mismatch for a > C-call until you change your code review procedures. > > Handle Globals a little different, we use the "Put globals in > Globals.mod" file method as suggested in docs. > > Your Find / Replace tools works very close to how it works in in VB6. > > The real bummer is converting arrays to square brackets.? We will have > to do that in many many thousands of places.? I'm toying with the idea > of scanning the code base for all arrays, and using that list to search > for where those arrays are used in code...automation might help here. > > Watch out for your class Getters and Setters - in VB6 look for Property > Let, Get, Set and convert that to Property _Read, _Write, and ??? in > Gambas.? In Property Declarations section of help file.? I haven't > needed to convert a Property Set yet, but in VB6 that was a property > object that could -only- be used on left side of an expression... I'm > not sure if I need to do that in my conversion yet. > > There is a gb.vb component that makes some string funcs, dates, rounding > etc working like VB6. > > There are SOME spots that yes, will require rewrite.? But I'm finding > that probably 85% of expensive source code is re-useable pretty much as is. > > At least that's what we're finding out so far.? Some weeks of work ahead > of us, but early testing is looking hopeful. > > -John > It reminds me two important horrors in VB that you must be aware of: 1) You have to use 'Set ...' to set an object reference. Otherwise, it assumes that you are assigning a (random ?) property of the object. So "A = B" must not become "A = B" in Gambas if A is an object reference. 2) Every function argument is passed by reference by default! I think this is the most stupid thing I have ever seen in a language, leading, for unaware programmers, to countless bugs. So, when you translate VB code, you have to check every function to be sure that it does not assign its arguments, and then change the value located in the calling function. If this is the expected behaviour, then you have to add the "ByRef" keyword in Gambas, both in the function declaration and in the function call (see the documentation on ByRef). Regards, -- Beno?t Minisini From adamnt42 at gmail.com Wed Jun 9 14:17:07 2021 From: adamnt42 at gmail.com (Bruce) Date: Wed, 9 Jun 2021 21:47:07 +0930 Subject: [Gambas-user] Migrating to Gambas In-Reply-To: <1e56d598-2d4e-81f6-763a-e0a6ad8e4f7d@deganius.de> References: <1e56d598-2d4e-81f6-763a-e0a6ad8e4f7d@deganius.de> Message-ID: On 9/6/21 6:04 pm, Christof Thalhofer wrote: > Am 09.06.21 um 01:58 schrieb Bruce: > >> 3) Start from scratch. > > Why this is the worst idea ever: > > https://www.joelonsoftware.com/2000/04/06/things-you-should-never-do-part-i/ > > Alles Gute > > Christof Thalhofer > Ouch! That hurt, he is one of my favorite commenters. But then I got just a little over halfway down the article. "The idea that new code is better than old is patently absurd. Old code has been used. It has been tested." Oh really? Not to my knowledge. Tested, hah! (And I did spend over 10 years as a software tester. Let me tell you this little "fact". In that time the project budgets were around 50% management, 35% marketing, 14% programming, 0.8% thinking and 0.2% testing. I kid you not. I used to secure lots of contracts with questions along the lines of "So, you are spending $15million on this mission critical project and you want to keep the testing budget under $15000? Fairly confident of your future career then are you?" "Lots of bugs have been found, and they?ve been fixed. There?s nothing wrong with it" Oh dear, oh dear, oh dear. Then we had better do nothing then eh, just in case something bigger than "lots" wasn't "found" and didn't get "fixed". "There's nothing wrong with it" is a line Typhoid Mary used at her trial. "It doesn?t acquire bugs just by sitting around on your hard drive. Au contraire, baby! Is software supposed to be like an old Dodge Dart, that rusts just sitting in the garage? Is software like a teddy bear that?s kind of gross if it?s not made out of all new material?" Oh really? Then we had better do nothing then. In short, I guess GWBasic is what we should all be using then. I mean there was a not bad game of "Pong" around. So I will repeat the question, why is this industry so psychologically dependent on trying to turn something that does not work into something else that probably wont work because they insist on re-using poorly engineered code with myriads of known and yet to be discovered faults that has been hacked at by a large farmyard full of script chickens until a commercial decision is taken along the lines of "Hey you, yes you, the IT guy in the corridor there! I want you to take all this COBOL code and turn it into this new-fangled Y2K stuff I have been hearing about from all the other equally incompetent middle managers here. You have two weeks and a budget that includes 2 new pencils. Also, don't bother testing it because Y2K happened 22 years ago. Can't spend too much time discussing it further because I'm off to lunch with the MD." Hmmm. Perhaps I just answered my own question. Someone once said "Those who do not understand history are doomed to repeat it". (It wasn't Henry Ford by the way.) Anyway, cheers. b p.s. Why did Benoit write Gambas in the first place? Why didn't he just, ahem, "migrate" VB to Linux? Hmmmmmmm ....................... From kicking177 at gmail.com Wed Jun 9 14:58:32 2021 From: kicking177 at gmail.com (KKing) Date: Wed, 9 Jun 2021 13:58:32 +0100 Subject: [Gambas-user] Migrating to Gambas Message-ID: Most of our VB6 migration so far have been console based apps, or ones that literally only had a handful of buttons so haven't had to delve into "Forms" migration too much. But one thing to bear in mind is if you used the old shortcut to a field via an "&" in the label description is not the same. You need to add a separate TextLabel field and put e.g. "Preview" in the Text of the control to get the visual of an underlined "P" in the text of "Preview" and then on the form do something like << Public Sub Form_KeyRelease() ? Dim inTest01 As Integer ? inTest01 = Key.Code ?? If Key.Alt Then ???? Select Case inTest01 ?????? Case 76 ???????? ' do stuff ?????? Case 80 ???????? ' do stuff ?????? Case Else ????????? inTest01 = inTest01 ???? End Select ?? Endif End >> As people have alluded to (or forthrightly said) will depend on the structure of your old code and I am not casting any aspersions! We always had "DIM" at top of routines and used Option Explicit and a certain amount of consistent structure. Most of our pain with the code I think you have already encountered arrays () vs [] and double vs float. Some more pain was in converting some jet/access mdb usage. When it was read-only we used ODBC+mdbtools otherwise we have converted to sqlite. There is certainly some benefit if the code works and you have a number of people familiar with it to migrate not start from scratch. K From dovey.john at gmail.com Thu Jun 10 00:10:28 2021 From: dovey.john at gmail.com (John Dovey) Date: Wed, 9 Jun 2021 17:10:28 -0500 Subject: [Gambas-user] Migrating to Gambas In-Reply-To: References: Message-ID: Thanks for all the advice. All taken in the spirit it was given. I've migrated one app twice. From VB6 -> VB.Net and from VB6->Gambas. The simpler migration was VB6->Gambas. I find the best is to dump code into the new environment, then work through the errors. Some things don't translate well.. and for those wrapper functions are, I agree, the best solution. Once strange one is the ability to split strings[*]. I ended up writing an "explode" function where I could make the tweaks to how it worked, so that through the code I replace all the splits with explode, then I modify explode as needed.. That approach seems to be working quite well. All the best John * Gambas: http://gambaswiki.org/wiki/lang/split * VBA/VB6: https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/split-function * VB.Net: https://docs.microsoft.com/en-us/dotnet/api/microsoft.visualbasic.strings.split On Wed, 9 Jun 2021 at 07:59, KKing wrote: > Most of our VB6 migration so far have been console based apps, or ones > that literally only had a handful of buttons so haven't had to delve > into "Forms" migration too much. But one thing to bear in mind is if you > used the old shortcut to a field via an "&" in the label description is > not the same. > You need to add a separate TextLabel field and put e.g. "Preview" > in the Text of the control to get the visual of an underlined "P" in the > text of "Preview" and then on the form do something like > << > Public Sub Form_KeyRelease() > Dim inTest01 As Integer > inTest01 = Key.Code > If Key.Alt Then > Select Case inTest01 > Case 76 > ' do stuff > Case 80 > ' do stuff > Case Else > inTest01 = inTest01 > End Select > Endif > End > >> > > As people have alluded to (or forthrightly said) will depend on the > structure of your old code and I am not casting any aspersions! > We always had "DIM" at top of routines and used Option Explicit and a > certain amount of consistent structure. > Most of our pain with the code I think you have already encountered > arrays () vs [] and double vs float. > Some more pain was in converting some jet/access mdb usage. When it was > read-only we used ODBC+mdbtools otherwise we have converted to sqlite. > > There is certainly some benefit if the code works and you have a number > of people familiar with it to migrate not start from scratch. > > K > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tercoide at hotmail.com Thu Jun 10 01:04:43 2021 From: tercoide at hotmail.com (martin cristia) Date: Wed, 9 Jun 2021 20:04:43 -0300 Subject: [Gambas-user] Error after system upgrade to Ubuntu 21.04 In-Reply-To: References: Message-ID: I just did a system upgrade to Ubuntu 21.04, running gives: Failed to init Glew: unknown error [System] Gambas=3.16.90 OperatingSystem=Linux Kernel=5.11.0-18-generic Architecture=x86_64 Distribution=Ubuntu 21.04 Desktop=UBUNTU:GNOME Font=Ubuntu,11 Scale=8 Theme=yaru Language=es_AR.UTF-8 Memory=11847M [Libraries] Cairo=libcairo.so.2.11600.0 Curl=libcurl.so.4.7.0 DBus=libdbus-1.so.3.19.13 GDK2=libgdk-x11-2.0.so.0.2400.33 GDK3=libgdk-3.so.0.2404.21 GStreamer=libgstreamer-1.0.so.0.1804.0 GTK+2=libgtk-x11-2.0.so.0.2400.33 GTK+3=libgtk-3.so.0.2404.21 OpenGL=libGL.so.1.7.0 Poppler=libpoppler.so.102.0.0 Poppler=libpoppler.so.107.0.0 QT5=libQt5Core.so.5.15.2 SDL=libSDL-1.2.so.0.11.4 SQLite=libsqlite3.so.0.8.6 [Environment] DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus DESKTOP_SESSION=ubuntu DISPLAY=:0 EDITOR=gedit GB_GUI=gb.gtk3 GDMSESSION=ubuntu GIO_LAUNCHED_DESKTOP_FILE=/usr/share/applications/gambas3.desktop GIO_LAUNCHED_DESKTOP_FILE_PID=2753 GJS_DEBUG_OUTPUT=stderr GJS_DEBUG_TOPICS=JS ERROR;JS LOG GNOME_DESKTOP_SESSION_ID=this-is-deprecated GNOME_SETUP_DISPLAY=:1 GNOME_SHELL_SESSION_MODE=ubuntu GTK_MODULES=gail:atk-bridge HOME= IM_CONFIG_PHASE=1 INVOCATION_ID=5430c4297a67447bbcfd829baf6db20c JOURNAL_STREAM=8:30085 LANG=es_AR.UTF-8 LANGUAGE=es_AR.UTF-8 LC_ALL=es_AR.UTF-8 LOGNAME= MANAGERPID=985 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin PWD= QT_ACCESSIBILITY=1 QT_IM_MODULE=ibus QT_LOGGING_RULES=*.debug=false SESSION_MANAGER=local/:@/tmp/.ICE-unix/1158,unix/:/tmp/.ICE-unix/1158 SHELL=/bin/bash SHLVL=0 SSH_AGENT_LAUNCHER=gnome-keyring SSH_AUTH_SOCK=/run/user/1000/keyring/ssh TZ=:/etc/localtime USER= USERNAME= WAYLAND_DISPLAY=wayland-0 XAUTHORITY=/run/user/1000/.mutter-Xwaylandauth.8NZ340 XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg XDG_CURRENT_DESKTOP=ubuntu:GNOME XDG_DATA_DIRS=/usr/share/ubuntu:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop XDG_MENU_PREFIX=gnome- XDG_RUNTIME_DIR=/run/user/1000 XDG_SESSION_CLASS=user XDG_SESSION_DESKTOP=ubuntu XDG_SESSION_TYPE=wayland XMODIFIERS=@im=ibus _=/usr/bin/gnome-session From jussi.lahtinen at gmail.com Thu Jun 10 03:56:28 2021 From: jussi.lahtinen at gmail.com (Jussi Lahtinen) Date: Thu, 10 Jun 2021 04:56:28 +0300 Subject: [Gambas-user] End of tile error is raised with try Message-ID: End of file error is raised even when called with try. See attachment. This isn't tested in the unit tester? Jussi -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: GambasTestercmd-0.10.24.tar.gz Type: application/gzip Size: 30736 bytes Desc: not available URL: From tercoide at hotmail.com Thu Jun 10 04:44:56 2021 From: tercoide at hotmail.com (martin cristia) Date: Wed, 9 Jun 2021 23:44:56 -0300 Subject: [Gambas-user] Error after system upgrade to Ubuntu 21.04 (SOLVED) In-Reply-To: References: Message-ID: (answering to myself) After: sudo apt-get install glew-utils It worked again. El 9/6/21 a las 22:57, user-request at lists.gambas-basic.org escribi?: > I just did a system upgrade to Ubuntu 21.04, running gives: > > Failed to init Glew: unknown error > > *************** From chrisml at deganius.de Thu Jun 10 07:58:09 2021 From: chrisml at deganius.de (Christof Thalhofer) Date: Thu, 10 Jun 2021 07:58:09 +0200 Subject: [Gambas-user] Migrating to Gambas In-Reply-To: References: <1e56d598-2d4e-81f6-763a-e0a6ad8e4f7d@deganius.de> Message-ID: <6072e9e7-2101-1dba-e059-1b175d67db6e@deganius.de> Am 09.06.21 um 14:17 schrieb Bruce: > So I will repeat the question, why is this industry so psychologically > dependent on trying to turn something that does not work into something > else that probably wont work because they insist on re-using poorly > engineered code with myriads of known and yet to be discovered faults > that has been hacked at by a large farmyard full of script chickens ... Nice story, but: If one has *reliable working code* in *discontinued VB6* there is no reason to rewrite it from scratch instead of migrating it to Gambas and be as carefully as possible to keep the old work. For example: I have a large method which creates invoices automatically based on some data in the database. It started as a couple of macros in Microsoft Works(!), then was migrated to MS Access. In the first ten years it crashed a lot: New client with shipping address: Crash. New client with shipping address not in Germany: Crash. New foreign customer with shipping address in Germany: Crash. New client with "&" in it's name: Crash. New foreign client with a company and special tax circumstances: Crash. And so on and so forth... After about ten years, we had grazed the vast pasture of crash possibilities, the method has worked smoothly ever since and now it contains lots of fine distinctions (that might look a little twisted if you don't analyze exactly what they do). If anything, I only touch it very carefully with tweezers. I'd be crazy to throw it away and develop it new from scratch! This is what Joel Spolsky is talking about. When he says that the code is "tested", he means that it has been tested on the reality. Alles Gute Christof Thalhofer -- Dies ist keine Signatur From adamnt42 at gmail.com Thu Jun 10 08:58:39 2021 From: adamnt42 at gmail.com (Bruce) Date: Thu, 10 Jun 2021 16:28:39 +0930 Subject: [Gambas-user] Migrating to Gambas In-Reply-To: <6072e9e7-2101-1dba-e059-1b175d67db6e@deganius.de> References: <1e56d598-2d4e-81f6-763a-e0a6ad8e4f7d@deganius.de> <6072e9e7-2101-1dba-e059-1b175d67db6e@deganius.de> Message-ID: <3f9b63fc-7c9b-a250-ebf0-a2f761200c58@gmail.com> On 10/6/21 3:28 pm, Christof Thalhofer wrote: > Am 09.06.21 um 14:17 schrieb Bruce: > >> So I will repeat the question, why is this industry so psychologically >> dependent on trying to turn something that does not work into something >> else that probably wont work because they insist on re-using poorly >> engineered code with myriads of known and yet to be discovered faults >> that has been hacked at by a large farmyard full of script chickens ... > > Nice story, but: If one has *reliable working code* in *discontinued > VB6* there is no reason to rewrite it from scratch instead of migrating > it to Gambas and be as carefully as possible to keep the old work. > > For example: I have a large method which creates invoices automatically > based on some data in the database. It started as a couple of macros in > Microsoft Works(!), then was migrated to MS Access. In the first ten > years it crashed a lot: > > New client with shipping address: Crash. > New client with shipping address not in Germany: Crash. > New foreign customer with shipping address in Germany: Crash. > New client with "&" in it's name: Crash. > New foreign client with a company and special tax circumstances: Crash. > > And so on and so forth... > > After about ten years, we had grazed the vast pasture of crash > possibilities, the method has worked smoothly ever since and now it > contains lots of fine distinctions (that might look a little twisted if > you don't analyze exactly what they do). > > If anything, I only touch it very carefully with tweezers. I'd be crazy > to throw it away and develop it new from scratch! > > This is what Joel Spolsky is talking about. When he says that the code > is "tested", he means that it has been tested on the reality. > > Alles Gute > > Christof Thalhofer > Christof, I fully accept that and agree, you would be mad to muck with stuff that works. However, are you saying a) you migrated it after those 10 years or are b) still using the MSA application? (Just to clear my understanding.) A bit further down he says "Back to that two page function. Yes, I know, it?s just a simple function to display a window, but it has grown little hairs and stuff on it and nobody knows why. Well, I?ll tell you why: those are bug fixes. One of them fixes that bug that Nancy had when she tried to install the thing on a computer that didn?t have Internet Explorer. Another one fixes that bug that occurs in low memory conditions. Another one fixes that bug that occurred when the file is on a floppy disk and the user yanks out the disk in the middle. That LoadLibrary call is ugly but it makes the code work on old versions of Windows 95." That is the stuff I am talking about. Apart from maybe "that bug that occurs in low memory conditions" those bugs no longer exist in the known universe! Spending time "migrating" the remediant code is almost assuredly a waste of time. Better to understand (for want of a better word) the algorithm of the original code and code it. Maybe you CAN paste the source code and delete vast chunks of workarounds and patches that no longer apply and then start testing, fixing, re-testing the new Gambas version. Maybe that DOES give you a "quickstart" into the Gambas version. Maybe. But my experience differs. And one was a very similar case to yours, a "large" MSA code set, 4 "main" applications and from memory about 6-8 "library" applications. (I cant recall what they were called in MSA.) Anyway, we gave up on the whole "migrate" approach after a few weeks as, wait for it, there was stuff in the MSA code and forms that Gambas could not do. The typical one was comboboxes with keys that were driven by static metadata in the database that specified the key-value pairs and various attributes pertaining to those values. Easy example "Error", key="ERR", background=red. The MSA code "custom" control took care of all of that. Guess what! To this day I have not been able to get Gambas/QT controls to emulate that behavior in a ComboBox. Another example was the Security/Authorisation code, which HAD to be re-written to the adoption of postgres as the underlying database. Another was a "state machine" thing that most assuredly need never have been done in the first place, messy, buggy and totally lacking in any added value within the MSA code base anyhow. I think it was done when "state machines" were the buzz-word of the week. (Someone here was talking about these recently I think.) Anyway, the net result was that we excised almost ALL of the fancy code from the MSA base which left about 20% of the code - could have written it from scratch in Gambas using proper OO techniques in about half the time. As always YMMV! regards bruce From mbelmonte at belmotek.net Thu Jun 10 09:52:11 2021 From: mbelmonte at belmotek.net (Martin) Date: Thu, 10 Jun 2021 09:52:11 +0200 Subject: [Gambas-user] About translation form Message-ID: <0cf4116d-bc8d-3ad9-290b-3d83ce8181f1@belmotek.net> Hello, I would like to share with you some comments about the translation form as I can't understand some of its behaviors. 1) Why is it possible to choose several source languages? Beno?t says it is for cases where a word has two different translations, but this does not answer the question completely. for example, if you translate to es_ES from en_US (default) and then translate from en_US (an translation .po) to es_ES then you will have only one es_ES anyway. But well maybe this process follows a more convoluted logic and I am not able to see it. 2) Why are unnecessary .po files created and deleted? This last one can have an answer in that the form tries to create the system language in the combobox list. But in my opinion this is not necessary and even seems to me counterproductive. Best regards. Martin From chrisml at deganius.de Thu Jun 10 12:32:47 2021 From: chrisml at deganius.de (Christof Thalhofer) Date: Thu, 10 Jun 2021 12:32:47 +0200 Subject: [Gambas-user] Migrating to Gambas In-Reply-To: <3f9b63fc-7c9b-a250-ebf0-a2f761200c58@gmail.com> References: <1e56d598-2d4e-81f6-763a-e0a6ad8e4f7d@deganius.de> <6072e9e7-2101-1dba-e059-1b175d67db6e@deganius.de> <3f9b63fc-7c9b-a250-ebf0-a2f761200c58@gmail.com> Message-ID: <845c36e2-e9c2-80e2-33d7-0b1313c8a905@deganius.de> Am 10.06.21 um 08:58 schrieb Bruce: > Christof, I fully accept that and agree, you would be mad to muck > with stuff that works. However, are you saying a) you migrated it > after those 10 years or are b) still using the MSA application? (Just > to clear my understanding.) Yes, you're right, I forgot to tell that this method was migrated to Gambas afterwards (my whole application, of which it is a part, was migrated). I had to tweak only small things and now it works in Gambas for years without any problems. > A bit further down he says > > "Back to that two page function. Yes, I know, it?s just a simple > function to display a window, but it has grown little hairs and stuff > on it and nobody knows why. Well, I?ll tell you why: those are bug > fixes. One of them fixes that bug that Nancy had when she tried to > install the thing on a computer that didn?t have Internet Explorer. > Another one fixes that bug that occurs in low memory conditions. > Another one fixes that bug that occurred when the file is on a floppy > disk and the user yanks out the disk in the middle. That LoadLibrary > call is ugly but it makes the code work on old versions of Windows > 95." > > That is the stuff I am talking about. Apart from maybe "that bug > that occurs in low memory conditions" those bugs no longer exist in > the known universe! Spending time "migrating" the remediant code is > almost assuredly a waste of time. Better to understand (for want of a > better word) the algorithm of the original code and code it. Ok, did you realize that the text is from 2000? Win95 and IE are now gone but were not at that time. > Maybe you CAN paste the source code and delete vast chunks of > workarounds and patches that no longer apply and then start testing, > fixing, re-testing the new Gambas version. Maybe that DOES give you > a "quickstart" into the Gambas version. Ok, here I agree with you. I call that "refactoring" and for me, this means not only adjusting the semantics and changing variable names, but also rebuilding the code at the same time so that it is cleaner and easier to understand. But it is important to keep all the functionality and I have experienced myself in my migration project that I had to add things again later that I had removed because I thought they were unimportant. Although I had written the whole junk myself(!?). > Maybe. But my experience differs. As it always happens. > And one was a very similar case to yours, a "large" MSA code set, 4 > "main" applications and from memory about 6-8 "library" applications. > (I cant recall what they were called in MSA.) Anyway, we gave up on > the whole "migrate" approach after a few weeks as, wait for it, there > was stuff in the MSA code and forms that Gambas could not do. The > typical one was comboboxes with keys that were driven by static > metadata in the database that specified the key-value pairs and > various attributes pertaining to those values. If you think you can migrate a large MSA project to Gambas within few weeks, you're wrong. I addressed exactly this problem by writing an Access-like combobox and a tableview to rebuild this functionality in Gambas and this alone cost me a couple weeks of development. As it was one of the first things I have written in Gambas it is not so "gambassy" as it should, but it does the job: https://gitlab.com/christhal/gb.deg.form Btw it is an "illegal" component, Beno?t, if you're listening, could we make it a legal component for Gambas as it is absolutely necessary for people who want to migrate a MSA application to Gambas? > Easy example "Error", key="ERR", background=red. The MSA code > "custom" control took care of all of that. Guess what! To this day I > have not been able to get Gambas/QT controls to emulate that > behavior in a ComboBox. Another example was the > Security/Authorisation code, which HAD to be re-written to the > adoption of postgres as the underlying database. I had used the MSA app to talk to Postgresql before, so this was easy. I went to Gambas because MS had made it difficult to talk to Postgresql. > Another was a "state machine" thing that most assuredly need never > have been done in the first place, messy, buggy and totally lacking > in any added value within the MSA code base anyhow. I think it was > done when "state machines" were the buzz-word of the week. (Someone > here was talking about these recently I think.) Yes we talked about that. But in his case, it seems to be the right architectural decision, since state machines are used to capture the states of machines and reflect them in the software. And he uses it to control machines. > Anyway, the net result was that we excised almost ALL of the fancy > code from the MSA base which left about 20% of the code - could have > written it from scratch in Gambas using proper OO techniques in about > half the time. > > As always YMMV! Yeah! I think we meet in the middle. Alles Gute Christof Thalhofer -- Dies ist keine Signatur From hans at gambas-buch.de Thu Jun 10 15:31:24 2021 From: hans at gambas-buch.de (Hans Lehmann) Date: Thu, 10 Jun 2021 15:31:24 +0200 Subject: [Gambas-user] Are DB servers installed and started? Message-ID: <8e7d027b-4400-5a93-b5a7-49383e5bc9ff@gambas-buch.de> An HTML attachment was scrubbed... URL: From tobs at taboege.de Thu Jun 10 16:11:45 2021 From: tobs at taboege.de (Tobias Boege) Date: Thu, 10 Jun 2021 16:11:45 +0200 Subject: [Gambas-user] Are DB servers installed and started? In-Reply-To: <8e7d027b-4400-5a93-b5a7-49383e5bc9ff@gambas-buch.de> References: <8e7d027b-4400-5a93-b5a7-49383e5bc9ff@gambas-buch.de> Message-ID: <20210610141145.GQ2520705@T580.localdomain> Hello Hans, On Thu, 10 Jun 2021, Hans Lehmann wrote: > Hello. > > When I present my DB sample programs in the Gambas book, I want to make > sure that the DB program only starts if (A) the DB server is installed and > (B) is also started. For (A) I use both System.Find("postgresql") and > System.Exist("postgresql"). In both cases the output is NULL. With MySQL, > however, I get TRUE and the path '/usr/bin/mysql'. Whether the DB server - > related to (B) - is started can be safely retrieved via its status, which > certainly works for PostgreSQL *and* MySQL on my system. Now the question: > Where do you see possible errors? > System.Find or System.Exist look for *program names*, not *package names* (which are of course not standardized across distributions). You may have the package "postgresql" installed, but the program you may want to look for is the postgresql server program, called "postgres". This should work unless your distribution decides to change the executable name. As for question (B), I can suggest two alternatives: (1) Before your main program starts, pop up a small input form which asks the user for their preferred database connection string (and give the user feedback about whether you detect a server at the given address) and maybe store that for the future in a settings file. This is the robust solution which annoys or expects too much knowledge from your users. Given the myriad ways of running a database server (over TCP, which port, or over UNIX only, or ...) it will be hard to detect if there is a specific database server. Even default configurations may vary across systems. (2) Rather, I would suggest you use your system's service manager. This is less portable because some (many) systems use systemd, some the old /etc/init.d scripts. BSDs may work yet differently. But _if_ you commit to systemd-based distributions, you can query systemctl for the status of any service managed by it: $ systemctl is-active postgresql inactive This has the added advantage that that "mariadb" and "mysqld" are synonyms, so you could use either to get the status of whatever implementation is installed on the machine. Using systemctl also allows you to solve your problem (A). The exit status of `systemctl status` tells you whether a service is active, inactive or unknown (which you can take as "not installed"): $ systemctl status NetworkManager >/dev/null 2>&1; echo $? 0 # --> NetworkManager is running (and obviously installed) $ systemctl status postgresql >/dev/null 2>&1; echo $? 3 # --> postgresql is installed but not running $ systemctl status msaccess >/dev/null 2>&1; echo $? 4 # --> no service by the name "msaccess" on my system This is documented in `man systemctl`. In Gambas, you would do the following to obtain $?: ' Exec For Read Write but do not read or write anything to avoid ' cluttering the terminal. We only want the exit code. Exec ["systemctl", "status", "postgresql"] Wait For Read Write Print Process.LastValue Of course, you can do something similar with /etc/init.d scripts instead of systemd. Best, Tobias -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From dovey.john at gmail.com Thu Jun 10 16:55:12 2021 From: dovey.john at gmail.com (John Dovey) Date: Thu, 10 Jun 2021 09:55:12 -0500 Subject: [Gambas-user] Are DB servers installed and started? In-Reply-To: <20210610141145.GQ2520705@T580.localdomain> References: <8e7d027b-4400-5a93-b5a7-49383e5bc9ff@gambas-buch.de> <20210610141145.GQ2520705@T580.localdomain> Message-ID: > > > In Gambas, you would do the following to obtain $?: > > ' Exec For Read Write but do not read or write anything to avoid > ' cluttering the terminal. We only want the exit code. > Exec ["systemctl", "status", "postgresql"] Wait For Read Write > Print Process.LastValue > > That's really elegant and works for more than just this. Thank you for that. JD -------------- next part -------------- An HTML attachment was scrubbed... URL: From johna at starflightinc.com Thu Jun 10 18:31:22 2021 From: johna at starflightinc.com (John Anderson) Date: Thu, 10 Jun 2021 09:31:22 -0700 Subject: [Gambas-user] Migrating to Gambas In-Reply-To: <6072e9e7-2101-1dba-e059-1b175d67db6e@deganius.de> References: <1e56d598-2d4e-81f6-763a-e0a6ad8e4f7d@deganius.de> <6072e9e7-2101-1dba-e059-1b175d67db6e@deganius.de> Message-ID: <8347b867-e8e1-5435-78fe-174cac106ad1@starflightinc.com> On 6/9/2021 10:58 PM, Christof Thalhofer wrote: > Am 09.06.21 um 14:17 schrieb Bruce: > >> So I will repeat the question, why is this industry so psychologically >> dependent on trying to turn something that does not work into something >> else that probably wont work because they insist on re-using poorly >> engineered code with myriads of known and yet to be discovered faults >> that has been hacked at by a large farmyard full of script chickens ... > Nice story, but: If one has *reliable working code* in *discontinued > VB6* there is no reason to rewrite it from scratch instead of migrating > it to Gambas and be as carefully as possible to keep the old work. > > For example: I have a large method which creates invoices automatically > based on some data in the database. It started as a couple of macros in > Microsoft Works(!), then was migrated to MS Access. In the first ten > years it crashed a lot: > > New client with shipping address: Crash. > New client with shipping address not in Germany: Crash. > New foreign customer with shipping address in Germany: Crash. > New client with "&" in it's name: Crash. > New foreign client with a company and special tax circumstances: Crash. > > And so on and so forth... > > After about ten years, we had grazed the vast pasture of crash > possibilities, the method has worked smoothly ever since and now it > contains lots of fine distinctions (that might look a little twisted if > you don't analyze exactly what they do). > > If anything, I only touch it very carefully with tweezers. I'd be crazy > to throw it away and develop it new from scratch! > > This is what Joel Spolsky is talking about. When he says that the code > is "tested", he means that it has been tested on the reality. > > Alles Gute > > Christof Thalhofer > I agree 100%.? In our case we are converting away from VB6 NOT because anything was wrong with VB6 code - it has served perfectly well for decades, and it is OO in a friendly way.? We're only changing anything because field customers don't want Windows based OS's on the factory floor any more.? We're on industrial WES7 now, which is still valid for a few more years - but after that there is little interest in Win10/Iot for many reasons.? And no we can't run the existing system in a VM or Wine. So my conversion project is out of necessity, and not for any real perceived performance gain - because the equipment under the GUI control works as perfect and as fast as it ever will.? We want as few changes as possible in the existing source code - for reduced labor expense, reduced possibility of errors introduced, plus any major change could trigger a massive acceptance cycle testing as I've explained before, and that could take years.? A project of that size is not in the budget, nor it it practical.? The GUI interface has to work and look exactly the same as VB6 version...except without the "C:" drive.? We don't want the operators to really notice they aren't on Win98/XP/7 anymore. I think in the whole time we ever encountered a true major bug problem in VB6 was with a third party spin button control in 2002. All the other changes to code were NOT VB6's fault, it was something like the customer had to go to a new product bar code format, or they wanted to connect to a different downstream test jig and needed wafer placement information in a different format, etc.? All code changes over time were feature additions, not bug patches. In any CompSci language you can do the code correct or not - It's the same concept that a good or bad typewriter / notebook / word processor doesn't make or break a good or bad novelist.? It is the final outcome we're looking for: is the GUI rock solid and reliable. From what I see so far, Gambas is like the love child of VB6 and Java.? It looks a lot like VB6 Daddy, but has mom Java's eyes.? So close to VB6, but some places frustratingly different - but that's just me... .? Gambas is a good product! -J From johna at starflightinc.com Thu Jun 10 21:10:57 2021 From: johna at starflightinc.com (John Anderson) Date: Thu, 10 Jun 2021 12:10:57 -0700 Subject: [Gambas-user] Arrays of Structs - how to - and curious debug message Message-ID: <7712688d-4f60-bb4e-fb7d-5d3edff3fb89@starflightinc.com> An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Gambas3_StructTest_A.png Type: image/png Size: 52952 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Gambas3_StructTest_B.png Type: image/png Size: 18379 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Gambas3_StructTest_C.png Type: image/png Size: 7783 bytes Desc: not available URL: -------------- next part -------------- [System] Gambas=3.16.90 OperatingSystem=Linux Kernel=5.4.0-74-generic Architecture=x86_64 Distribution=Linux Mint 20.1 Ulyssa Desktop=CINNAMON Font=Ubuntu,10 Scale=7 Theme=mint-y-aqua Language=en_US.UTF-8 Memory=7868M [Libraries] Cairo=libcairo.so.2.11600.0 Curl=libcurl.so.4.6.0 DBus=libdbus-1.so.3.19.11 GDK2=libgdk-x11-2.0.so.0.2400.32 GDK3=libgdk-3.so.0.2404.16 GStreamer=libgstreamer-1.0.so.0.1602.0 GTK+2=libgtk-x11-2.0.so.0.2400.32 GTK+3=libgtk-3.so.0.2404.16 OpenGL=libGL.so.1.7.0 Poppler=libpoppler.so.97.0.0 QT5=libQt5Core.so.5.12.8 SDL=libSDL-1.2.so.0.11.4 SQLite=libsqlite3.so.0.8.6 [Environment] DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus DEFAULTS_PATH=/usr/share/gconf/cinnamon.default.path DESKTOP_SESSION=cinnamon DISPLAY=:0 GB_GUI=gb.gtk3 GDMSESSION=cinnamon GDM_LANG=en_US GENICAM_CLPROTOCOL=/opt/matrox_imaging/mil/../drivers/genicam/v3_2/bin/ GENICAM_MAJOR=3 GENICAM_MINOR=2 GIO_LAUNCHED_DESKTOP_FILE=/Desktop/gambas3.desktop GIO_LAUNCHED_DESKTOP_FILE_PID=55397 GNOME_DESKTOP_SESSION_ID=this-is-deprecated GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1 GTK3_MODULES=xapp-gtk3-module GTK_MODULES=gail:atk-bridge GTK_OVERLAY_SCROLLING=1 HOME= INSIDE_NEMO_PYTHON= LANG=en_US.UTF-8 LANGUAGE=en_US.UTF-8 LC_ALL=en_US.UTF-8 LOGNAME= MANDATORY_PATH=/usr/share/gconf/cinnamon.mandatory.path MILDIR=/opt/matrox_imaging/mil MIL_GENICAM_PATH=/opt/matrox_imaging/mil/../drivers/genicam MIL_XML_REPOSITORY=/opt/matrox_imaging/mil/../drivers/genicam/v3_2/xml/GenApi PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/matrox_imaging/mil/../tools PWD= QT_ACCESSIBILITY=1 QT_LOGGING_RULES=*.debug=false QT_QPA_PLATFORMTHEME=qt5ct SESSION_MANAGER=local/:@/tmp/.ICE-unix/1595,unix/:/tmp/.ICE-unix/1595 SHELL=/bin/bash SHLVL=0 SSH_AGENT_PID=1771 SSH_AUTH_SOCK=/run/user/1000/keyring/ssh TEMP=/tmp TZ=:/etc/localtime USER= XAUTHORITY=/.Xauthority XDG_CONFIG_DIRS=/etc/xdg/xdg-cinnamon:/etc/xdg XDG_CURRENT_DESKTOP=X-Cinnamon XDG_DATA_DIRS=/usr/share/cinnamon:/usr/share/gnome:/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/ XDG_RUNTIME_DIR=/run/user/1000 XDG_SEAT=seat0 XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0 XDG_SESSION_CLASS=user XDG_SESSION_DESKTOP=cinnamon XDG_SESSION_ID=c1 XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0 XDG_SESSION_TYPE=x11 XDG_VTNR=7 -------------- next part -------------- A non-text attachment was scrubbed... Name: TestStruct_Project.tar Type: application/octet-stream Size: 25600 bytes Desc: not available URL: From g4mba5 at gmail.com Thu Jun 10 22:17:48 2021 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Thu, 10 Jun 2021 22:17:48 +0200 Subject: [Gambas-user] Arrays of Structs - how to - and curious debug message In-Reply-To: <7712688d-4f60-bb4e-fb7d-5d3edff3fb89@starflightinc.com> References: <7712688d-4f60-bb4e-fb7d-5d3edff3fb89@starflightinc.com> Message-ID: <3b796717-014b-a44d-246a-93a658734a75@gmail.com> Le 10/06/2021 ? 21:10, John Anderson a ?crit?: > I've come across an issue I'm trying to solve in Gambas.? I KNOW I'm > doing this wrong, and I'm being dumb - but maybe somebody can point the > way.? I can't find any more deets online, and the examples about structs > are kind of scarce.? But that's not the interesting part...what's > interesting is how Gambas decides to NOT flag an error, but maybe I have > that wrong too. > > ...too much text to read at 22 PM > 1) Please compress your project archives when you post on the mailing-list. 2) Apparently you didn't read the wiki page on structure declarations. https://gambaswiki.org/wiki/lang/structdecl Especially the last paragraph "Arrays of structure". If you declare that: Public Struct Foo A As Integer B As Boolean C As String End Private $aArray[16] As Struct Foo ' Note the Struct keyword before Foo Then $aArray will be an array of sixteen Foo structures allocated in one slot successively in memory, like the C language does. For Gambas, $aArray is a special variable of type "array of structure". It's not a real array, so you will not have all the methods of the standard Array class. It's really for send it to some C code. Note that a structure declaration can be used like a class with just public variables. It's what you did when declaring: Dim var As New StructureName In other words: As StructName -> declare a pointer to a structure allocated like a normal object. As Struct StructName -> embeds a structure directly inside a variable or another structure, like C does by default. So be careful! If you find the wiki page not clear enough, do not hesitate to fix it. -- Beno?t Minisini From dovey.john at gmail.com Thu Jun 10 23:09:31 2021 From: dovey.john at gmail.com (John Dovey) Date: Thu, 10 Jun 2021 16:09:31 -0500 Subject: [Gambas-user] Check Boxes Message-ID: I have an odd change of value which I can't track down. I load some values of true and false from an ini file into variables declared as boolean, then set the checkbox.value = variable On the .click event of the checkbox, I make some changes but when it emerges from that, the values are back to defaults. You can see in the load event of the form I have some debug statements to show the change. You can see the check boxes on the third tab JD -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: proj.tar.gz Type: application/x-gzip Size: 5044 bytes Desc: not available URL: From bsteers4 at gmail.com Fri Jun 11 01:03:57 2021 From: bsteers4 at gmail.com (Bruce Steers) Date: Fri, 11 Jun 2021 00:03:57 +0100 Subject: [Gambas-user] Check Boxes In-Reply-To: References: Message-ID: you must make hSettings a global variable and only instance it once in Form_Load() with hsettings = New Settings. then just set the settings and call hSettings.Save() in SaveInfo() , i think you create a brand new settings object the way you do it. and the hSettings object created in From_Load() is cleared after the functions runs because it is not global. BruceS On Thu, 10 Jun 2021 at 22:10, John Dovey wrote: > I have an odd change of value which I can't track down. > I load some values of true and false from an ini file into variables > declared as boolean, then set the checkbox.value = variable > > On the .click event of the checkbox, I make some changes but when it > emerges from that, the values are back to defaults. You can see in the load > event of the form I have some debug statements to show the change. > > You can see the check boxes on the third tab > > JD > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.lee.davidson at gmail.com Fri Jun 11 02:08:18 2021 From: t.lee.davidson at gmail.com (T Lee Davidson) Date: Thu, 10 Jun 2021 20:08:18 -0400 Subject: [Gambas-user] Check Boxes (a bug?) In-Reply-To: References: Message-ID: <4d753a7e-b07e-5e85-d9b2-6f977c65c31f@gmail.com> On 6/10/21 5:09 PM, John Dovey wrote: > I have an odd change of value which I can't track down. > I load some values of true and false from an ini file into variables declared as boolean, then set the checkbox.value = variable > > On the .click event of the checkbox, I make some changes but when it emerges from that, the values are back to defaults. You can > see in the load event of the form I have some debug statements to show the change. > > You can see the check boxes on the third tab > > JD Bruce Steers is right about hSettings needing to be global. I made changes to effect that including not re-creating it multiple times. And, it still does not work as it should. The settings do get saved correctly, but upon a relaunch, they are reverted. Stepping through the program, I see that at line 126 ("ChkAflag_CM.Value = myAflag_CM"), *setting the value of the CheckBox is treated as a click* and the ChkAflag_CM_Click event handler is triggered. ** Beno?t, is this expected behavior, or a bug? ** The Click event handler calls myMakeAflags() which tests the value of each CheckBox and sets the appropriate myAflag_[XX] accordingly. Since the only checkbox with a true value is ChkAflag_CM, the settings are reverted to the same as the default. -- Lee From g4mba5 at gmail.com Fri Jun 11 02:17:20 2021 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Fri, 11 Jun 2021 02:17:20 +0200 Subject: [Gambas-user] Check Boxes (a bug?) In-Reply-To: <4d753a7e-b07e-5e85-d9b2-6f977c65c31f@gmail.com> References: <4d753a7e-b07e-5e85-d9b2-6f977c65c31f@gmail.com> Message-ID: <85400f40-a4c5-5b6e-f28e-4da57bb54f71@gmail.com> Le 11/06/2021 ? 02:08, T Lee Davidson a ?crit?: > On 6/10/21 5:09 PM, John Dovey wrote: >> I have an odd change of value which I can't track down. >> I load some values of true and false from an ini file into variables >> declared as boolean, then set the checkbox.value = variable >> >> On the .click event of the checkbox, I make some changes but when it >> emerges from that, the values are back to defaults. You can see in the >> load event of the form I have some debug statements to show the change. >> >> You can see the check boxes on the third tab >> >> JD > > Bruce Steers is right about hSettings needing to be global. I made > changes to effect that including not re-creating it multiple times. And, > it still does not work as it should. The settings do get saved > correctly, but upon a relaunch, they are reverted. > > Stepping through the program, I see that at line 126 ("ChkAflag_CM.Value > = myAflag_CM"), > *setting the value of the CheckBox is treated as a click* and the > ChkAflag_CM_Click event handler is triggered. > > ** Beno?t, is this expected behavior, or a bug? ** > The Click event is raised when the value of the control changes, whatever the reason. It's the expected behaviour. Regards, -- Beno?t Minisini From johna at starflightinc.com Fri Jun 11 02:34:40 2021 From: johna at starflightinc.com (John Anderson) Date: Thu, 10 Jun 2021 17:34:40 -0700 Subject: [Gambas-user] Arrays of Structs - how to - and curious debug message In-Reply-To: <3b796717-014b-a44d-246a-93a658734a75@gmail.com> References: <3b796717-014b-a44d-246a-93a658734a75@gmail.com> Message-ID: An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: TestStruct.tar.gz Type: application/gzip Size: 13479 bytes Desc: not available URL: From dovey.john at gmail.com Fri Jun 11 04:34:16 2021 From: dovey.john at gmail.com (John Dovey) Date: Thu, 10 Jun 2021 21:34:16 -0500 Subject: [Gambas-user] Check Boxes (a bug?) In-Reply-To: <4d753a7e-b07e-5e85-d9b2-6f977c65c31f@gmail.com> References: <4d753a7e-b07e-5e85-d9b2-6f977c65c31f@gmail.com> Message-ID: Thank you for laying it out for me. For some reason I got all tongue tied. You describe my problem exactly. I see Benoit indicates that this is expected behaviour. I?ve worked through it twenty times and I can?t figure it out. Part of it is possibly my confusion over what a click event it. I made the, probably incorrect, assumption it would only trigger with an actual mouseclick, which is why I first looked for a _changed event, like in the text boxes. I?ll look at it again, relaxing ?click? with ?change? mentally and see if it makes more sense to me. All the best John On Thu, Jun 10, 2021 at 7:09 PM T Lee Davidson wrote: > On 6/10/21 5:09 PM, John Dovey wrote: > > I have an odd change of value which I can't track down. > > I load some values of true and false from an ini file into variables > declared as boolean, then set the checkbox.value = variable > > > > On the .click event of the checkbox, I make some changes but when it > emerges from that, the values are back to defaults. You can > > see in the load event of the form I have some debug statements to show > the change. > > > > You can see the check boxes on the third tab > > > > JD > > Bruce Steers is right about hSettings needing to be global. I made changes > to effect that including not re-creating it multiple > times. And, it still does not work as it should. The settings do get saved > correctly, but upon a relaunch, they are reverted. > > Stepping through the program, I see that at line 126 ("ChkAflag_CM.Value = > myAflag_CM"), > *setting the value of the CheckBox is treated as a click* and the > ChkAflag_CM_Click event handler is triggered. > > ** Beno?t, is this expected behavior, or a bug? ** > > > The Click event handler calls myMakeAflags() which tests the value of each > CheckBox and sets the appropriate myAflag_[XX] > accordingly. Since the only checkbox with a true value is ChkAflag_CM, the > settings are reverted to the same as the default. > > > -- > Lee > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -- Sent from Gmail Mobile -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Fri Jun 11 10:33:39 2021 From: bsteers4 at gmail.com (Bruce Steers) Date: Fri, 11 Jun 2021 09:33:39 +0100 Subject: [Gambas-user] Check Boxes (a bug?) In-Reply-To: References: <4d753a7e-b07e-5e85-d9b2-6f977c65c31f@gmail.com> Message-ID: On Fri, 11 Jun 2021 at 03:35, John Dovey wrote: > > Thank you for laying it out for me. For some reason I got all tongue tied. > You describe my problem exactly. > I see Benoit indicates that this is expected behaviour. I?ve worked > through it twenty times and I can?t figure it out. Part of it is possibly > my confusion over what a click event it. I made the, probably incorrect, > assumption it would only trigger with an actual mouseclick, which is why I > first looked for a _changed event, like in the text boxes. > I?ll look at it again, relaxing ?click? with ?change? mentally and see if > it makes more sense to me. > > All the best > John > I studied your code and did notice the call to Checkbox.Value would trigger the Click events but i could not see the code causing your error. I do not know if Settings.class saves settings on "program close" or as each object is destroyed during execution because not using a global variable. I suspect that. But also... To stop click events triggering try something like this... Object.Lock(ChkAflag_CM) ChkAflag_CM.Value = myAflag_CM Object.UnLock(ChkAflag_CM) Hope that helps. BruceS -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.lee.davidson at gmail.com Fri Jun 11 14:56:03 2021 From: t.lee.davidson at gmail.com (T Lee Davidson) Date: Fri, 11 Jun 2021 08:56:03 -0400 Subject: [Gambas-user] Check Boxes (a bug?) In-Reply-To: References: <4d753a7e-b07e-5e85-d9b2-6f977c65c31f@gmail.com> Message-ID: On 6/11/21 4:33 AM, Bruce Steers wrote: > To stop click events triggering try something like this... > > Object.Lock(ChkAflag_CM) > ?ChkAflag_CM.Value = myAflag_CM > Object.UnLock(ChkAflag_CM) > That's one way to skin a cat. There is also another solution that, although a bit more involved, could, IMO, simplify the code somewhat. I don't have time at the moment to present full example code, but it involves the following principles. 1. Controls can be grouped. If the checkboxes are given the group, say, CheckBoxGroup, then a single event handler (CheckBoxGroup_Click) could be used for all four. 2. Within that single event handler, the Last keyword can be used as a reference to the control that triggered the handler. The value of the checkbox that changed would then be accessed with Last.Value. 3. The Settings component can store a Collection. For example, define the defaults as follows: Public myAflags as Collection = ["CM": true, "MO": false, "LO": false, "ICM": false] And, change the code to store and retrieve the flags as a collection instead of individual variables. 4. Controls have a Tag property. This could be used to tag the individual checkboxes with the appropriate string, ie, "MO", "CM", etc. Using these principles, all that would be needed to be done in the event handler is: Public Sub CheckBoxGroup_Click() Dim myAflagsString as String[] myAflags[Last.Tag] = Last.Value ' We set the value only on the flag that changed and do not mess with the others. For Each myFlag as String in myAflags If myFlag Then myAflagsString.Add(myAflags.Key) End If Next LblAflags.Text = myAflagsString.Join(",") End I may have missed a few things and have not tested that code. -- Lee From g4mba5 at gmail.com Fri Jun 11 15:55:55 2021 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Fri, 11 Jun 2021 15:55:55 +0200 Subject: [Gambas-user] Arrays of Structs - how to - and curious debug message In-Reply-To: References: <3b796717-014b-a44d-246a-93a658734a75@gmail.com> Message-ID: <1abe73e6-d3e4-a773-695e-97ec395f8ec1@gmail.com> Le 11/06/2021 ? 02:34, John Anderson a ?crit?: > > Yes, I did the description as per your wiki page.? I tried that first, > but it says it's not a real array.? But throwing all caution to wind I > Did 'MyBigArray2[200] as Struct MyStruct.' > > Now Object.SizeOf(MyBigArray2) has a size of 40 bytes (I know it is just > an object).?? Then I started to try different ways but I was just being > stupid. > > C code needs pointer to that array PLUS size of the array it's getting > (ByRef MyBigArray2, tsize)... I guess I have to calc final array size in > bytes as Object.SizeOf(MyStruct) * MyBigArray2.Count? > > How to copy array of struct contents Gambas way? (not pointers, > contents).? I'm sorry if its in docs, I don't see it yet.? I know I can > copy arrays of Gambas [] types with .Copy method, but I don't think that > works with array of struct? (If I try Copy with array of struct , it > comes back "Copy Unknown Method error). > > Attached, compressed project (with known error) will emit errors upon > completion if a data breakpoint is set, but will show NO errors when > breakpoint NOT set.? That could be a real problem - is it supposed to > work that way?? If it might be a bug, I'll post on bug tracker when its > login works again. > > -John > OK, I have analyzed the problem: the structure assignment is buggy, it does not handle all cases. Hopefully the memory stream does, so it should be a matter of code refactoring. If you don't know what is a memory stream in Gambas, I suggest you look it, you can use it as a workaround for the current problem (Look at OPEN MEMORY in the documentation). As for the breakpoint problem, let's see that later. Regards, -- Beno?t Minisini From bsteers4 at gmail.com Fri Jun 11 16:00:19 2021 From: bsteers4 at gmail.com (Bruce Steers) Date: Fri, 11 Jun 2021 15:00:19 +0100 Subject: [Gambas-user] Dark theme issues In-Reply-To: References: Message-ID: On Fri, 11 Jun 2021 at 14:58, Bruce Steers wrote: > > So i just set my desktop to a dark theme to try one of my apps and , well > , a fair few issues. > > The app has a custom light background , once dark theme was enabled i > could not see label texts. > > I set the Form.Background to Black. > Doh! Form.Foreground i meant to say, sorry. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dovey.john at gmail.com Fri Jun 11 19:20:02 2021 From: dovey.john at gmail.com (John Dovey) Date: Fri, 11 Jun 2021 12:20:02 -0500 Subject: [Gambas-user] Check Boxes (a bug?) In-Reply-To: References: <4d753a7e-b07e-5e85-d9b2-6f977c65c31f@gmail.com> Message-ID: Thank you, That's helpful. Now to make it work... Just one quick comment. I pasted your code with the "CheckBoxGroup_Click()" subroutine, but I named the group 'AflagsGroup". It took me a few minutes to figure out why it wasn't working. There was no error that there was no such event :-) [image: image.png] On Fri, 11 Jun 2021 at 07:57, T Lee Davidson wrote: > On 6/11/21 4:33 AM, Bruce Steers wrote: > > To stop click events triggering try something like this... > > > > Object.Lock(ChkAflag_CM) > > ChkAflag_CM.Value = myAflag_CM > > Object.UnLock(ChkAflag_CM) > > > > That's one way to skin a cat. > > There is also another solution that, although a bit more involved, could, > IMO, simplify the code somewhat. I don't have time at > the moment to present full example code, but it involves the following > principles. > > 1. Controls can be grouped. If the checkboxes are given the group, say, > CheckBoxGroup, then a single event handler > (CheckBoxGroup_Click) could be used for all four. > > 2. Within that single event handler, the Last keyword can be used as a > reference to the control that triggered the handler. The > value of the checkbox that changed would then be accessed with Last.Value. > > 3. The Settings component can store a Collection. For example, define the > defaults as follows: > Public myAflags as Collection = ["CM": true, "MO": false, "LO": false, > "ICM": false] > And, change the code to store and retrieve the flags as a collection > instead of individual variables. > > 4. Controls have a Tag property. This could be used to tag the individual > checkboxes with the appropriate string, ie, "MO", > "CM", etc. > > Using these principles, all that would be needed to be done in the event > handler is: > Public Sub CheckBoxGroup_Click() > Dim myAflagsString as String[] > > myAflags[Last.Tag] = Last.Value ' We set the value only on the flag > that changed and do not mess with the others. > For Each myFlag as String in myAflags > If myFlag Then > myAflagsString.Add(myAflags.Key) > End If > Next > LblAflags.Text = myAflagsString.Join(",") > End > > I may have missed a few things and have not tested that code. > > > -- > Lee > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 44015 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: proj.tar.gz Type: application/x-gzip Size: 4885 bytes Desc: not available URL: From t.lee.davidson at gmail.com Fri Jun 11 21:33:31 2021 From: t.lee.davidson at gmail.com (T Lee Davidson) Date: Fri, 11 Jun 2021 15:33:31 -0400 Subject: [Gambas-user] Check Boxes (a bug?) In-Reply-To: References: <4d753a7e-b07e-5e85-d9b2-6f977c65c31f@gmail.com> Message-ID: <2f53bdfd-3916-9d68-c152-9dbcff3bfe5c@gmail.com> On 6/11/21 1:20 PM, John Dovey wrote: > Thank you, That's helpful. > Now to make it work... > > Just one quick comment. I pasted your code with the "CheckBoxGroup_Click()" subroutine, but I named the group 'AflagsGroup". It > took me a few minutes to figure out why it wasn't working. There was no error that there was no such event :-) Ah, my bad. Please change the declaration for myAflagsString to: Dim myAflagsString As New String[] Scalars and strings are automatically instantiated while arrays and collections are not (unless a definition is provided with the declaration using the "=" operator). And also, in the Form_Open event, uncomment lines 123-126 and change them to: ChkAflag_CM.Value = myAflags["CM"] ChkAflag_MO.Value = myAflags["MO"] ChkAflag_LO.Value = myAflags["LO"] ChkAflag_ICM.Value = myAflags["ICM"] This will set the status of each checkbox appropriately. -- Lee From dovey.john at gmail.com Sat Jun 12 01:00:46 2021 From: dovey.john at gmail.com (John Dovey) Date: Fri, 11 Jun 2021 18:00:46 -0500 Subject: [Gambas-user] Check Boxes (a bug?) In-Reply-To: <2f53bdfd-3916-9d68-c152-9dbcff3bfe5c@gmail.com> References: <4d753a7e-b07e-5e85-d9b2-6f977c65c31f@gmail.com> <2f53bdfd-3916-9d68-c152-9dbcff3bfe5c@gmail.com> Message-ID: One more question: In the subroutine: Public Sub AflagsGroup_Click() Dim myAflagsString As New String[] myAflags[Last.Tag] = Last.Value ' We set the value only on the flag that changed and do not mess with the others. For Each myFlag As String In myAflags If myFlag Then myAflagsString.Add(myAflags.Key) Next LblAflags.Text = myAflagsString.Join(",") End My understanding is it runs through all the myAflags and adds all the occurrences that are checked. If that's the case, then I don't understand why it's not "removing" previously checked (and now unchecked) items? Thanks for all your assistance!! JD On Fri, 11 Jun 2021 at 14:34, T Lee Davidson wrote: > On 6/11/21 1:20 PM, John Dovey wrote: > > Thank you, That's helpful. > > Now to make it work... > > > > Just one quick comment. I pasted your code with the > "CheckBoxGroup_Click()" subroutine, but I named the group 'AflagsGroup". It > > took me a few minutes to figure out why it wasn't working. There was no > error that there was no such event :-) > > Ah, my bad. Please change the declaration for myAflagsString to: > Dim myAflagsString As New String[] > > Scalars and strings are automatically instantiated while arrays and > collections are not (unless a definition is provided with > the declaration using the "=" operator). > > > And also, in the Form_Open event, uncomment lines 123-126 and change them > to: > ChkAflag_CM.Value = myAflags["CM"] > ChkAflag_MO.Value = myAflags["MO"] > ChkAflag_LO.Value = myAflags["LO"] > ChkAflag_ICM.Value = myAflags["ICM"] > > This will set the status of each checkbox appropriately. > > > -- > Lee > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: proj.tar.gz Type: application/x-gzip Size: 7693 bytes Desc: not available URL: From dovey.john at gmail.com Sat Jun 12 01:10:09 2021 From: dovey.john at gmail.com (John Dovey) Date: Fri, 11 Jun 2021 18:10:09 -0500 Subject: [Gambas-user] Check Boxes (a bug?) In-Reply-To: References: <4d753a7e-b07e-5e85-d9b2-6f977c65c31f@gmail.com> <2f53bdfd-3916-9d68-c152-9dbcff3bfe5c@gmail.com> Message-ID: Never mind. Found it. Changed the line If myFlag Then myAflagsString.Add(myAflags.Key) to If myFlag = -1 Then myAflagsString.Add(myAflags.Key) --- Public Sub AflagsGroup_Click() Dim myAflagsString As New String[] myAflags[Last.Tag] = Last.Value ' We set the value only on the flag that changed and do not mess with the others. For Each myFlag As String In myAflags Debug ("myFlag:" & myFlag & ":" & myAflags.Key) If myFlag = -1 Then myAflagsString.Add(myAflags.Key) Next LblAflags.Text = myAflagsString.Join(",") Debug ("LblAflags: " & LblAflags.Text) End --- On Fri, 11 Jun 2021 at 18:00, John Dovey wrote: > One more question: > In the subroutine: > Public Sub AflagsGroup_Click() > > Dim myAflagsString As New String[] > > myAflags[Last.Tag] = Last.Value ' We set the value only on the flag > that changed and do not mess with the others. > For Each myFlag As String In myAflags > If myFlag Then myAflagsString.Add(myAflags.Key) > Next > LblAflags.Text = myAflagsString.Join(",") > > End > > My understanding is it runs through all the myAflags and adds all the > occurrences that are checked. If that's the case, then I don't understand > why it's not "removing" previously checked (and now unchecked) items? > > Thanks for all your assistance!! > JD > > > On Fri, 11 Jun 2021 at 14:34, T Lee Davidson > wrote: > >> On 6/11/21 1:20 PM, John Dovey wrote: >> > Thank you, That's helpful. >> > Now to make it work... >> > >> > Just one quick comment. I pasted your code with the >> "CheckBoxGroup_Click()" subroutine, but I named the group 'AflagsGroup". It >> > took me a few minutes to figure out why it wasn't working. There was no >> error that there was no such event :-) >> >> Ah, my bad. Please change the declaration for myAflagsString to: >> Dim myAflagsString As New String[] >> >> Scalars and strings are automatically instantiated while arrays and >> collections are not (unless a definition is provided with >> the declaration using the "=" operator). >> >> >> And also, in the Form_Open event, uncomment lines 123-126 and change them >> to: >> ChkAflag_CM.Value = myAflags["CM"] >> ChkAflag_MO.Value = myAflags["MO"] >> ChkAflag_LO.Value = myAflags["LO"] >> ChkAflag_ICM.Value = myAflags["ICM"] >> >> This will set the status of each checkbox appropriately. >> >> >> -- >> Lee >> >> ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.lee.davidson at gmail.com Sat Jun 12 03:52:31 2021 From: t.lee.davidson at gmail.com (T Lee Davidson) Date: Fri, 11 Jun 2021 21:52:31 -0400 Subject: [Gambas-user] Check Boxes (a bug?) In-Reply-To: References: <4d753a7e-b07e-5e85-d9b2-6f977c65c31f@gmail.com> <2f53bdfd-3916-9d68-c152-9dbcff3bfe5c@gmail.com> Message-ID: <4e55ac28-1bb1-0649-f37d-9e51f27e73c8@gmail.com> On 6/11/21 7:10 PM, John Dovey wrote: > Never mind. Found it. > Changed the line > If myFlag Then myAflagsString.Add(myAflags.Key) > to > If myFlag = -1 Then myAflagsString.Add(myAflags.Key) > A True value is represented internally as -1. So, the unchanged line should have worked (it did for me in your project). Given this code: ' Gambas module file Public Sub Main() Dim cFlags As Collection = ["one": True, "two": -1] If cFlags["one"] Then Print "One is true" If cFlags["two"] Then Print "Two is also true" End The output is: One is true Two is also true -- Lee From chrisml at deganius.de Sat Jun 12 08:43:52 2021 From: chrisml at deganius.de (Christof Thalhofer) Date: Sat, 12 Jun 2021 08:43:52 +0200 Subject: [Gambas-user] End of tile error is raised with try In-Reply-To: References: Message-ID: <4429edfc-23a5-d177-534c-a0a0eb922a15@deganius.de> Am 10.06.21 um 03:56 schrieb Jussi Lahtinen: > End of file error is raised even when called with try. > See attachment. > > This isn't tested in the unit tester? It is. Please run: app/src/gambas3-selftest/run.sh Alles Gute Christof Thalhofer -- Dies ist keine Signatur From g4mba5 at gmail.com Sat Jun 12 11:22:13 2021 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Sat, 12 Jun 2021 11:22:13 +0200 Subject: [Gambas-user] End of tile error is raised with try In-Reply-To: References: Message-ID: <148de130-cee3-3152-536b-e6331f5894f6@gmail.com> Le 10/06/2021 ? 03:56, Jussi Lahtinen a ?crit?: > End of file error is raised even when called with try. > See attachment. > > This isn't tested in the unit tester? > > > Jussi Strange! -- Beno?t Minisini From g4mba5 at gmail.com Sat Jun 12 23:43:07 2021 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Sat, 12 Jun 2021 23:43:07 +0200 Subject: [Gambas-user] End of tile error is raised with try In-Reply-To: <148de130-cee3-3152-536b-e6331f5894f6@gmail.com> References: <148de130-cee3-3152-536b-e6331f5894f6@gmail.com> Message-ID: Le 12/06/2021 ? 11:22, Beno?t Minisini a ?crit?: > Le 10/06/2021 ? 03:56, Jussi Lahtinen a ?crit?: >> End of file error is raised even when called with try. >> See attachment. >> >> This isn't tested in the unit tester? >> >> >> Jussi > > Strange! > It should be fixed now. -- Beno?t Minisini From ian.roper at iinet.net.au Sun Jun 13 00:44:42 2021 From: ian.roper at iinet.net.au (Ian Roper) Date: Sun, 13 Jun 2021 08:44:42 +1000 Subject: [Gambas-user] GUI - Parent Class folding. Message-ID: <28ca2bc4-d8d7-2fd5-89bb-58a83ef98d7d@iinet.net.au> Greetings, Normally when a user created class has a parent, it then becomes a child of that class in the treeview display of modules, classes and forms. This is very useful to minimise the amount of classes displayed and to show the groupings by parent. This no longer happens ? Have I turned off a setting by mistake or is this by design ? [System] Gambas=3.16.1 OperatingSystem=Linux Kernel=5.4.0-74-generic Architecture=x86_64 Distribution=Linux Mint 20.1 Ulyssa Desktop=CINNAMON Font=Ubuntu,10 Scale=7 Theme=mint-y Language=en_AU.UTF-8 Memory=3410M Cheers, Ian From chrisml at deganius.de Sun Jun 13 08:47:52 2021 From: chrisml at deganius.de (Christof Thalhofer) Date: Sun, 13 Jun 2021 08:47:52 +0200 Subject: [Gambas-user] End of tile error is raised with try In-Reply-To: References: <148de130-cee3-3152-536b-e6331f5894f6@gmail.com> Message-ID: Am 12.06.21 um 23:43 schrieb Beno?t Minisini: >> Le 10/06/2021 ? 03:56, Jussi Lahtinen a ?crit?: >>> End of file error is raised even when called with try. >>> See attachment. >>> >>> This isn't tested in the unit tester? >>> >>> >>> Jussi >> >> Strange! > > It should be fixed now. Yes. Maybe you can integrate 'app/src/gambas3-selftest/run.sh' to your muscle memory on every update to see if nothing (tested) has been broken. Alles Gute Christof Thalhofer -- Dies ist keine Signatur From adamnt42 at gmail.com Sun Jun 13 13:47:42 2021 From: adamnt42 at gmail.com (Bruce) Date: Sun, 13 Jun 2021 21:17:42 +0930 Subject: [Gambas-user] GUI - Parent Class folding. In-Reply-To: <28ca2bc4-d8d7-2fd5-89bb-58a83ef98d7d@iinet.net.au> References: <28ca2bc4-d8d7-2fd5-89bb-58a83ef98d7d@iinet.net.au> Message-ID: <92cd9e2f-32d5-3437-ea19-8c5318700ce5@gmail.com> On 13/6/21 8:14 am, Ian Roper wrote: > Greetings, > > Normally when a user created class has a parent, it then becomes a child > of that class in the treeview display of modules, classes and forms. > > This is very useful to minimise the amount of classes displayed and to > show the groupings by parent. > > This no longer happens ? > > Have I turned off a setting by mistake or is this by design ? > > [System] > Gambas=3.16.1 > OperatingSystem=Linux > Kernel=5.4.0-74-generic > Architecture=x86_64 > Distribution=Linux Mint 20.1 Ulyssa > Desktop=CINNAMON > Font=Ubuntu,10 > Scale=7 > Theme=mint-y > Language=en_AU.UTF-8 > Memory=3410M > > > Cheers, > > Ian > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- Here -------------- next part -------------- A non-text attachment was scrubbed... Name: Selection_001.png Type: image/png Size: 78954 bytes Desc: not available URL: From hans at gambas-buch.de Sun Jun 13 15:35:31 2021 From: hans at gambas-buch.de (Hans Lehmann) Date: Sun, 13 Jun 2021 15:35:31 +0200 Subject: [Gambas-user] Catching multiple error messages from one process Message-ID: <7d9ee2f5-78b6-c80c-7268-581989341da7@gambas-buch.de> An HTML attachment was scrubbed... URL: From t.lee.davidson at gmail.com Sun Jun 13 17:03:26 2021 From: t.lee.davidson at gmail.com (T Lee Davidson) Date: Sun, 13 Jun 2021 11:03:26 -0400 Subject: [Gambas-user] Catching multiple error messages from one process In-Reply-To: <7d9ee2f5-78b6-c80c-7268-581989341da7@gambas-buch.de> References: <7d9ee2f5-78b6-c80c-7268-581989341da7@gambas-buch.de> Message-ID: On 6/13/21 9:35 AM, Hans Lehmann wrote: > I am looking for a solution to capture all incoming warnings and error messages and output them as one message. Perhaps append the messages to a global string variable (or string array that is joined into a string before display) that is empty prior to initiating the process. Then after hProcess.Wait() finishes, if the string is not empty, pop up the error message. -- Lee From hans at gambas-buch.de Sun Jun 13 18:40:34 2021 From: hans at gambas-buch.de (Hans Lehmann) Date: Sun, 13 Jun 2021 18:40:34 +0200 Subject: [Gambas-user] Catching multiple error messages from one process In-Reply-To: References: <7d9ee2f5-78b6-c80c-7268-581989341da7@gambas-buch.de> Message-ID: An HTML attachment was scrubbed... URL: From g4mba5 at gmail.com Sun Jun 13 20:02:21 2021 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Sun, 13 Jun 2021 20:02:21 +0200 Subject: [Gambas-user] End of tile error is raised with try In-Reply-To: References: <148de130-cee3-3152-536b-e6331f5894f6@gmail.com> Message-ID: <798e1ca5-e546-6f3b-7227-8cff57f3670e@gmail.com> Le 13/06/2021 ? 08:47, Christof Thalhofer a ?crit?: > Am 12.06.21 um 23:43 schrieb Beno?t Minisini: > >>> Le 10/06/2021 ? 03:56, Jussi Lahtinen a ?crit?: >>>> End of file error is raised even when called with try. >>>> See attachment. >>>> >>>> This isn't tested in the unit tester? >>>> >>>> >>>> Jussi >>> >>> Strange! >> >> It should be fixed now. > > Yes. Maybe you can integrate 'app/src/gambas3-selftest/run.sh' to your > muscle memory on every update to see if nothing (tested) has been broken. > > Alles Gute > > Christof Thalhofer > Yes I should. Maybe it's my aging brain who has difficulties to changes its habits. More seriously, I don't think I can run each time I modify something in the interpreter, because it takes a lot of time to run. If someone masters GitLab enough, maybe it's possible to modify the '.gitlab-ci.yml' file so that the test is run at each commit. -- Beno?t Minisini From bsteers4 at gmail.com Sun Jun 13 20:15:26 2021 From: bsteers4 at gmail.com (Bruce Steers) Date: Sun, 13 Jun 2021 19:15:26 +0100 Subject: [Gambas-user] End of tile error is raised with try In-Reply-To: <798e1ca5-e546-6f3b-7227-8cff57f3670e@gmail.com> References: <148de130-cee3-3152-536b-e6331f5894f6@gmail.com> <798e1ca5-e546-6f3b-7227-8cff57f3670e@gmail.com> Message-ID: doesn't work for me :( bonus at bonus-G33M-DS2R:/media/bonus/SSDiskspace/git/gambas-b$ app/src/gambas3-selftest/run.sh gbx3: unable to find startup file Test without JIT failed BruceS On Sun, 13 Jun 2021 at 19:03, Beno?t Minisini wrote: > Le 13/06/2021 ? 08:47, Christof Thalhofer a ?crit : > > Am 12.06.21 um 23:43 schrieb Beno?t Minisini: > > > >>> Le 10/06/2021 ? 03:56, Jussi Lahtinen a ?crit : > >>>> End of file error is raised even when called with try. > >>>> See attachment. > >>>> > >>>> This isn't tested in the unit tester? > >>>> > >>>> > >>>> Jussi > >>> > >>> Strange! > >> > >> It should be fixed now. > > > > Yes. Maybe you can integrate 'app/src/gambas3-selftest/run.sh' to your > > muscle memory on every update to see if nothing (tested) has been broken. > > > > Alles Gute > > > > Christof Thalhofer > > > > Yes I should. Maybe it's my aging brain who has difficulties to changes > its habits. > > More seriously, I don't think I can run each time I modify something in > the interpreter, because it takes a lot of time to run. > > If someone masters GitLab enough, maybe it's possible to modify the > '.gitlab-ci.yml' file so that the test is run at each commit. > > -- > Beno?t Minisini > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From chrisml at deganius.de Sun Jun 13 23:13:55 2021 From: chrisml at deganius.de (Christof Thalhofer) Date: Sun, 13 Jun 2021 23:13:55 +0200 Subject: [Gambas-user] End of tile error is raised with try In-Reply-To: <798e1ca5-e546-6f3b-7227-8cff57f3670e@gmail.com> References: <148de130-cee3-3152-536b-e6331f5894f6@gmail.com> <798e1ca5-e546-6f3b-7227-8cff57f3670e@gmail.com> Message-ID: Am 13.06.21 um 20:02 schrieb Beno?t Minisini: > Yes I should. Maybe it's my aging brain who has difficulties to changes > its habits. Pfff ... what should I say ... ;-) > More seriously, I don't think I can run each time I modify something in > the interpreter, because it takes a lot of time to run. We have also a test suite called 'Fast' which does most of the tests and needs maybe two seconds. I've just integrated it to the run.sh script. It can be called with: 'app/src/gambas3-selftest/run.sh fast' Maybe we should at first call it with 'make'. A la: 'make test' => 'app/src/gambas3-selftest/run.sh' 'make testfast' => 'app/src/gambas3-selftest/run.sh fast' This might fit better on the stack of you muscle memory? > If someone masters GitLab enough, maybe it's possible to modify the > '.gitlab-ci.yml' file so that the test is run at each commit. Anyone? Alles Gute Christof Thalhofer -- Dies ist keine Signatur From mbelmonte at belmotek.net Mon Jun 14 15:49:40 2021 From: mbelmonte at belmotek.net (Martin) Date: Mon, 14 Jun 2021 15:49:40 +0200 Subject: [Gambas-user] Where report incidence about the bugtraker? Message-ID: Hello friends. A colleague of the Spanish forum wants to report some bugs that he has found in version 3.16 but has not managed to enter the bugtracker, he says that he tried to create an account twice with different user each time, then he receives the confirmation email but can not pass the login. Where can he go to give more details? Thanks. Mart?n. From brian at westwoodsvcs.com Mon Jun 14 20:29:28 2021 From: brian at westwoodsvcs.com (Brian G) Date: Mon, 14 Jun 2021 11:29:28 -0700 (PDT) Subject: [Gambas-user] Arrays of Structs - how to - and curious debug message In-Reply-To: <1abe73e6-d3e4-a773-695e-97ec395f8ec1@gmail.com> References: <3b796717-014b-a44d-246a-93a658734a75@gmail.com> <1abe73e6-d3e4-a773-695e-97ec395f8ec1@gmail.com> Message-ID: <1929683396.14613.1623695368203.JavaMail.zimbra@westwoodsvcs.com> I have been using structures for a while Here is an example of how I handle them, I hope this helps It uses memcpy() to get the real address of the element and to also copy elements 'Struct must be declared before the memcpy extern declare as it uses the structure Public Struct Hello b As Integer c As Integer d As Long e As Float End Struct ' We will use memcpy for two purposes , get the real address of the data, actually copy the data Extern memcpy(dest As Hello, src As Hello, len As Integer) As Pointer In "libc:6" Extern Arraymemcpy(dest As Pointer, src As Pointer, len As Integer) As Pointer In "libc:6" Exec "memcpy" Public b As Struct Hello Public c[20] As Struct Hello Public Sub Main() b.b = 43 Dim a As Variant = b Dim e As Hello = c[1] ' these just set pointers Dim f As Hello = c[2] Dim g As Hello = c[3] g.d = 500 g.e = 3.67 ' calc the struct length subtrack address of second element from the first Dim iStructLen As Integer = memcpy(c[1], c[1], 0) - memcpy(c[0], c[0], 0) Print f.d, f.e 'Copy one entry to another memcpy(f, g, iStructLen) Print f.d, f.e a.b = 45 Print a.b, b.b Display the actual address Of Each element And root Print memcpy(a, a, 0), memcpy(b, b, 0), arraymemcpy(VarPtr(c), VarPtr(c), 0), memcpy(e, e, 0), memcpy(f, f, 0), memcpy(g, g, 0) Print VarPtr(a), VarPtr(b), VarPtr(c) Print "Hello world" End "Failure is the key to success; each mistake teaches us something" .. Morihei Ueshiba Brian G ----- On Jun 11, 2021, at 6:55 AM, Beno?t Minisini g4mba5 at gmail.com wrote: > Le 11/06/2021 ? 02:34, John Anderson a ?crit?: >> >> Yes, I did the description as per your wiki page.? I tried that first, >> but it says it's not a real array.? But throwing all caution to wind I >> Did 'MyBigArray2[200] as Struct MyStruct.' >> >> Now Object.SizeOf(MyBigArray2) has a size of 40 bytes (I know it is just >> an object).?? Then I started to try different ways but I was just being >> stupid. >> >> C code needs pointer to that array PLUS size of the array it's getting >> (ByRef MyBigArray2, tsize)... I guess I have to calc final array size in >> bytes as Object.SizeOf(MyStruct) * MyBigArray2.Count? >> >> How to copy array of struct contents Gambas way? (not pointers, >> contents).? I'm sorry if its in docs, I don't see it yet.? I know I can >> copy arrays of Gambas [] types with .Copy method, but I don't think that >> works with array of struct? (If I try Copy with array of struct , it >> comes back "Copy Unknown Method error). >> >> Attached, compressed project (with known error) will emit errors upon >> completion if a data breakpoint is set, but will show NO errors when >> breakpoint NOT set.? That could be a real problem - is it supposed to >> work that way?? If it might be a bug, I'll post on bug tracker when its >> login works again. >> >> -John >> > > OK, I have analyzed the problem: the structure assignment is buggy, it > does not handle all cases. Hopefully the memory stream does, so it > should be a matter of code refactoring. > > If you don't know what is a memory stream in Gambas, I suggest you look > it, you can use it as a workaround for the current problem (Look at OPEN > MEMORY in the documentation). > > As for the breakpoint problem, let's see that later. > > Regards, > > -- > Beno?t Minisini > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- From brian at westwoodsvcs.com Mon Jun 14 21:34:23 2021 From: brian at westwoodsvcs.com (Brian G) Date: Mon, 14 Jun 2021 12:34:23 -0700 (PDT) Subject: [Gambas-user] Arrays of Structs - how to - and curious debug message In-Reply-To: <1929683396.14613.1623695368203.JavaMail.zimbra@westwoodsvcs.com> References: <3b796717-014b-a44d-246a-93a658734a75@gmail.com> <1abe73e6-d3e4-a773-695e-97ec395f8ec1@gmail.com> <1929683396.14613.1623695368203.JavaMail.zimbra@westwoodsvcs.com> Message-ID: <434889412.14631.1623699263380.JavaMail.zimbra@westwoodsvcs.com> And one more example using embedded structures and arrays, showing how to call c fucntions with arrays and structures how to redefine the c call to allow muliple uses of the function with differing inputs to that function ' Gambas module file Public Struct newit x[20] As Byte End Struct Public Struct byeit c As Integer b As Float e[20] As Struct Newit End Struct Public Struct Hello b As Integer c As Integer d As Long e As Float f As Struct Byeit g[20] As Struct Byeit End Struct ' We will use memcpy for two purposes , get the real address of the data, actually copy the data Extern memcpy(dest As Hello, src As Hello, len As Integer) As Pointer In "libc:6" Extern Arraymemcpy(dest As Pointer, src As Pointer, len As Integer) As Pointer In "libc:6" Exec "memcpy" Public b As Struct Hello Public c[20] As Struct Hello Public Sub Main() b.b = 43 'Static xx As Struct Hello Dim a As Variant = b Dim e As Hello = c[1] ' these just set pointers Dim f As Hello = c[2] Dim g As Hello = c[3] g.d = 500 g.e = 3.67 c[3].g[0].e[0].x[0] = 32 ' Calc Struct length do pointer math c[1]-c[0] Dim iStructLen As Integer = memcpy(c[1], c[1], 0) - memcpy(c[0], c[0], 0) Print "Struct len = "; iStructLen, "Dest Values before copy ", f.d, f.e, f.g[0].e[0].x[0] 'Copy one entry to another memcpy(f, g, iStructLen) Print c[2].d, c[2].e, c[2].g[0].e[0].x[0] ' g = c[3] f = c[2] a.b = 45 Print a.b, b.b ' Display the actual address Of Each element And root Print memcpy(a, a, 0), memcpy(b, b, 0), arraymemcpy(VarPtr(c), VarPtr(c), 0), memcpy(e, e, 0), memcpy(f, f, 0), memcpy(g, g, 0) Print VarPtr(a), VarPtr(b), VarPtr(c) Print "Hello world" End "Failure is the key to success; each mistake teaches us something" .. Morihei Ueshiba Brian G ----- On Jun 14, 2021, at 11:29 AM, Brian G brian at westwoodsvcs.com wrote: > I have been using structures for a while > Here is an example of how I handle them, I hope this helps > > It uses memcpy() to get the real address of the element and to also copy > elements > > 'Struct must be declared before the memcpy extern declare as it uses the > structure > Public Struct Hello > b As Integer > c As Integer > d As Long > e As Float > End Struct > > ' We will use memcpy for two purposes , get the real address of the data, > actually copy the data > Extern memcpy(dest As Hello, src As Hello, len As Integer) As Pointer In > "libc:6" > Extern Arraymemcpy(dest As Pointer, src As Pointer, len As Integer) As Pointer > In "libc:6" Exec "memcpy" > > Public b As Struct Hello > Public c[20] As Struct Hello > > Public Sub Main() > b.b = 43 > > Dim a As Variant = b > > Dim e As Hello = c[1] ' these just set pointers > Dim f As Hello = c[2] > Dim g As Hello = c[3] > g.d = 500 > g.e = 3.67 > > ' calc the struct length subtrack address of second element from the first > Dim iStructLen As Integer = memcpy(c[1], c[1], 0) - memcpy(c[0], c[0], 0) > Print f.d, f.e > 'Copy one entry to another > memcpy(f, g, iStructLen) > Print f.d, f.e > a.b = 45 > > Print a.b, b.b > Display the actual address Of Each element And root > Print memcpy(a, a, 0), memcpy(b, b, 0), arraymemcpy(VarPtr(c), VarPtr(c), 0), > memcpy(e, e, 0), memcpy(f, f, 0), memcpy(g, g, 0) > Print VarPtr(a), VarPtr(b), VarPtr(c) > Print "Hello world" > > End > > "Failure is the key to success; > each mistake teaches us something" .. Morihei Ueshiba > Brian G > > ----- On Jun 11, 2021, at 6:55 AM, Beno?t Minisini g4mba5 at gmail.com wrote: > >> Le 11/06/2021 ? 02:34, John Anderson a ?crit?: >>> >>> Yes, I did the description as per your wiki page.? I tried that first, >>> but it says it's not a real array.? But throwing all caution to wind I >>> Did 'MyBigArray2[200] as Struct MyStruct.' >>> >>> Now Object.SizeOf(MyBigArray2) has a size of 40 bytes (I know it is just >>> an object).?? Then I started to try different ways but I was just being >>> stupid. >>> >>> C code needs pointer to that array PLUS size of the array it's getting >>> (ByRef MyBigArray2, tsize)... I guess I have to calc final array size in >>> bytes as Object.SizeOf(MyStruct) * MyBigArray2.Count? >>> >>> How to copy array of struct contents Gambas way? (not pointers, >>> contents).? I'm sorry if its in docs, I don't see it yet.? I know I can >>> copy arrays of Gambas [] types with .Copy method, but I don't think that >>> works with array of struct? (If I try Copy with array of struct , it >>> comes back "Copy Unknown Method error). >>> >>> Attached, compressed project (with known error) will emit errors upon >>> completion if a data breakpoint is set, but will show NO errors when >>> breakpoint NOT set.? That could be a real problem - is it supposed to >>> work that way?? If it might be a bug, I'll post on bug tracker when its >>> login works again. >>> >>> -John >>> >> >> OK, I have analyzed the problem: the structure assignment is buggy, it >> does not handle all cases. Hopefully the memory stream does, so it >> should be a matter of code refactoring. >> >> If you don't know what is a memory stream in Gambas, I suggest you look >> it, you can use it as a workaround for the current problem (Look at OPEN >> MEMORY in the documentation). >> >> As for the breakpoint problem, let's see that later. >> >> Regards, >> >> -- >> Beno?t Minisini >> >> ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- From g4mba5 at gmail.com Tue Jun 15 02:14:36 2021 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Tue, 15 Jun 2021 02:14:36 +0200 Subject: [Gambas-user] Where report incidence about the bugtraker? In-Reply-To: References: Message-ID: <66b6cc0b-0a71-fbb1-98df-c5262f017de0@gmail.com> Le 14/06/2021 ? 15:49, Martin a ?crit?: > Hello friends. > A colleague of the Spanish forum wants to report some bugs that he has > found in version 3.16 but has not managed to enter the bugtracker, he > says that he tried to create an account twice with different user each > time, then he receives the confirmation email but can not pass the login. > Where can he go to give more details? > Thanks. > > Mart?n. > What are his user names? Does it change anything if he clears the cache and the 'gambaswiki.org' cookies? -- Beno?t Minisini From claude.dessere at orange.fr Tue Jun 15 10:06:28 2021 From: claude.dessere at orange.fr (CD) Date: Tue, 15 Jun 2021 10:06:28 +0200 Subject: [Gambas-user] [CRASH REPORT] Message-ID: <6956b4b802375e42134e27696054dac4a426d718.camel@orange.fr> Hello, Damned, my program crashed Gambas that way : Component : gb.qt5 Class : Image Instructions : Dim clsClass As Class Dim strSymbols As New String[] For Each clsClass In Classes 'Browse all loaded classes If clsClass.Name = "Image" Then If clsClass.Symbols.Count > 0 Then strSymbols = clsClass.Symbols 'Crash Erreur de segmentation (11) .../... -------------- next part -------------- An HTML attachment was scrubbed... URL: From hans at gambas-buch.de Tue Jun 15 14:49:45 2021 From: hans at gambas-buch.de (Hans Lehmann) Date: Tue, 15 Jun 2021 14:49:45 +0200 Subject: [Gambas-user] Connection to the Internet ... Message-ID: An HTML attachment was scrubbed... URL: From chrisml at deganius.de Tue Jun 15 15:14:28 2021 From: chrisml at deganius.de (Christof Thalhofer) Date: Tue, 15 Jun 2021 15:14:28 +0200 Subject: [Gambas-user] Connection to the Internet ... In-Reply-To: References: Message-ID: <76937962-db15-75af-c11f-5ad031a1cb17@deganius.de> Am 15.06.21 um 14:49 schrieb Hans Lehmann: > I am looking for a way to find out for sure whether from my PC there is > currently > (b) also to the Internet. This is the easier one: 'ping -c 1 google.com' But you must hope that Google is alive. > (a) a connection to the local router and then This is difficult: https://stackoverflow.com/questions/1204629/how-do-i-get-the-default-gateway-in-linux-given-the-destination Alles Gute Christof Thalhofer -- Dies ist keine Signatur From dickson.tim at googlemail.com Tue Jun 15 15:46:47 2021 From: dickson.tim at googlemail.com (Tim Dickson) Date: Tue, 15 Jun 2021 14:46:47 +0100 Subject: [Gambas-user] Connection to the Internet ... In-Reply-To: <76937962-db15-75af-c11f-5ad031a1cb17@deganius.de> References: <76937962-db15-75af-c11f-5ad031a1cb17@deganius.de> Message-ID: On 15/06/2021 14:14, Christof Thalhofer wrote: > Am 15.06.21 um 14:49 schrieb Hans Lehmann: > >> I am looking for a way to find out for sure whether from my PC there is >> currently >> (b) also to the Internet. > This is the easier one: > 'ping -c 1 google.com' > > But you must hope that Google is alive. > >> (a) a connection to the local router and then this will ping the default gateway on linux ping -c1 `route|grep default|awk '{print $2}'` > This is difficult: > > https://stackoverflow.com/questions/1204629/how-do-i-get-the-default-gateway-in-linux-given-the-destination > > Alles Gute > > Christof Thalhofer > -- This email has been checked for viruses by AVG. https://www.avg.com From jose.rodriguez at cenpalab.cu Tue Jun 15 19:00:42 2021 From: jose.rodriguez at cenpalab.cu (jose.rodriguez at cenpalab.cu) Date: Tue, 15 Jun 2021 17:00:42 +0000 Subject: [Gambas-user] Connection to the Internet ... In-Reply-To: References: <76937962-db15-75af-c11f-5ad031a1cb17@deganius.de> Message-ID: June 15, 2021 9:47 AM, "Tim Dickson via User" wrote: > On 15/06/2021 14:14, Christof Thalhofer wrote: > > this will ping the default gateway on linux > ping -c1 `route|grep default|awk '{print $2}'` > This might only work in english locales if the output is localized. Regards, Joe1962 From johna at starflightinc.com Tue Jun 15 19:00:30 2021 From: johna at starflightinc.com (John Anderson) Date: Tue, 15 Jun 2021 10:00:30 -0700 Subject: [Gambas-user] Arrays of Structs - how to - and curious debug message In-Reply-To: <434889412.14631.1623699263380.JavaMail.zimbra@westwoodsvcs.com> References: <3b796717-014b-a44d-246a-93a658734a75@gmail.com> <1abe73e6-d3e4-a773-695e-97ec395f8ec1@gmail.com> <1929683396.14613.1623695368203.JavaMail.zimbra@westwoodsvcs.com> <434889412.14631.1623699263380.JavaMail.zimbra@westwoodsvcs.com> Message-ID: <58a10653-5330-ae91-bbf7-d4155101e2b4@starflightinc.com> On 6/14/2021 12:34 PM, Brian G wrote: > And one more example using embedded structures and arrays, showing how to call c fucntions with arrays and structures > how to redefine the c call to allow muliple uses of the function with differing inputs to that function > > ' Gambas module file > > Public Struct newit > x[20] As Byte > End Struct > > Public Struct byeit > c As Integer > b As Float > e[20] As Struct Newit > End Struct > > Public Struct Hello > b As Integer > c As Integer > d As Long > e As Float > f As Struct Byeit > g[20] As Struct Byeit > End Struct > > ' We will use memcpy for two purposes , get the real address of the data, actually copy the data > > Extern memcpy(dest As Hello, src As Hello, len As Integer) As Pointer In "libc:6" > Extern Arraymemcpy(dest As Pointer, src As Pointer, len As Integer) As Pointer In "libc:6" Exec "memcpy" > > Public b As Struct Hello > Public c[20] As Struct Hello > > Public Sub Main() > b.b = 43 > 'Static xx As Struct Hello > > Dim a As Variant = b > Dim e As Hello = c[1] ' these just set pointers > Dim f As Hello = c[2] > Dim g As Hello = c[3] > g.d = 500 > g.e = 3.67 > c[3].g[0].e[0].x[0] = 32 > ' Calc Struct length do pointer math c[1]-c[0] > Dim iStructLen As Integer = memcpy(c[1], c[1], 0) - memcpy(c[0], c[0], 0) > > Print "Struct len = "; iStructLen, "Dest Values before copy ", f.d, f.e, f.g[0].e[0].x[0] > 'Copy one entry to another > memcpy(f, g, iStructLen) > Print c[2].d, c[2].e, c[2].g[0].e[0].x[0] ' g = c[3] f = c[2] > a.b = 45 > > Print a.b, b.b > ' Display the actual address Of Each element And root > Print memcpy(a, a, 0), memcpy(b, b, 0), arraymemcpy(VarPtr(c), VarPtr(c), 0), memcpy(e, e, 0), memcpy(f, f, 0), memcpy(g, g, 0) > Print VarPtr(a), VarPtr(b), VarPtr(c) > Print "Hello world" > > End > > > "Failure is the key to success; > each mistake teaches us something" .. Morihei Ueshiba > Brian G > Thanks Brian, I got that response on Bugtracker too.? I guess what had me fouled up is (at least until yesterday)? is that the Wiki Extern and Wki How To? didn't make it very clear that you have to use the struct definition to send pointer to sruct.? I interpreted the wiki as : declare struct "abc" and then struct abc gets converted to pointer in EXTERN function call.? I guess it makes more sense now that I see a concrete example.? I thought EXTERN command would look at the instanced struct name and know how to compute the pointer to data...but you have to setup EXTERN call to match up to the array struct you want to send .? Oops. I think a good example like yours would make an excellent clarification to wiki.? That would save users lots of time. There is a big distinction between copying Pointers in gambas - like MySvar = MySVarArray[5]: that will work.? BUT you have just copied pointers, not data contents. I need to copy data contents between array of struct to another unique struct, as you are showing. As C user - It seems a little odd that there is no way in Gambas to retrieve a pointer to struct array without calling C function.? But then again array of structs isn't really a real array - which is the same type of problem we run into with dotNet where the data has to be marshaled around to and from compatible C call.? It really slows everything down on dotNet when you need a lot of fast C calls. Our conversion problem is:? We've got dozens of structs and array of struct.? It's not my choice - we have to interface with other vendors' C code for machine controls, machine vision etc.? And we now have to maintain several versions of the same EXTERN memcpy call for each struct array type - each with different parameter calls to define EXTERN calls for different arrays.? And Beno?t says he wont be making Struct[] any sort of type with built-in .Copy or .VarPtr method, etc.? OK.? That's how Gambas works, and I can't change that. Without thinking too much (and is probably bad idea):? It would be cool if somehow Struct[] were the parent of all storage class datatypes (and if only one element in the array you ditch the square brackets) but we don't have that option now, and I don't even know if that could work for interpreter.? Dang. SO - We are deciding to re-evaluate the situation and see if it isn't better to put everything into C anyway, and move away from GBasic dialect style of storage altogether.? We have to move a lot of data around fast - in between each video frame sometimes - so it might be better to stick to straight C altogether - which puts our data as close as possible to our control system calls. Thanks Again!! -John From brian at westwoodsvcs.com Tue Jun 15 20:46:48 2021 From: brian at westwoodsvcs.com (=?UTF-8?B?QnJpYW4gRw==?=) Date: Tue, 15 Jun 2021 21:46:48 +0300 Subject: [Gambas-user] =?utf-8?q?Arrays_of_Structs_-_how_to_-_and_curious?= =?utf-8?q?_debug_message?= In-Reply-To: <58a10653-5330-ae91-bbf7-d4155101e2b4@starflightinc.com> References: <3b796717-014b-a44d-246a-93a658734a75@gmail.com> <434889412.14631.1623699263380.JavaMail.zimbra@westwoodsvcs.com> <58a10653-5330-ae91-bbf7-d4155101e2b4@starflightinc.com> Message-ID: <1623782808.152552135@f25.my.com> Varptr does work on the array as a whole or a scripture as a whole. I shoved memcopy into a module called copyall It checks the data type and calls the correct version of memcopy as needed. So in the code you need only have one call. Gambas does allow to see what type of data you are handling. The module entry point looks like Sub _call( day as variant, src? as variant, length as integer) as pointer sub StructPtr(variable as variant) as pointer With these I am able to do most things, inside just hides the c calls. With fast unsafe in your module or class header, the calls are close to realtime.? The code is translated into c code and then compiled linked and executed. Hope this help -- Thanks Brian G Tuesday, 15 June 2021, 10:56AM -07:00 from John Anderson johna at starflightinc.com : >On 6/14/2021 12:34 PM, Brian G wrote: > And one more example using embedded structures and arrays, showing how to call c fucntions with arrays and structures > how to redefine the c call to allow muliple uses of the function with differing inputs to that function > > ' Gambas module file > > Public Struct newit > x[20] As Byte > End Struct > > Public Struct byeit > c As Integer > b As Float > e[20] As Struct Newit > End Struct > > Public Struct Hello > b As Integer > c As Integer > d As Long > e As Float > f As Struct Byeit > g[20] As Struct Byeit > End Struct > > ' We will use memcpy for two purposes , get the real address of the data, actually copy the data > > Extern memcpy(dest As Hello, src As Hello, len As Integer) As Pointer In "libc:6" > Extern Arraymemcpy(dest As Pointer, src As Pointer, len As Integer) As Pointer In "libc:6" Exec "memcpy" > > Public b As Struct Hello > Public c[20] As Struct Hello > > Public Sub Main() > b.b = 43 > 'Static xx As Struct Hello > > Dim a As Variant = b > Dim e As Hello = c[1] ' these just set pointers > Dim f As Hello = c[2] > Dim g As Hello = c[3] > g.d = 500 > g.e = 3.67 > c[3].g[0].e[0].x[0] = 32 > ' Calc Struct length do pointer math c[1]-c[0] > Dim iStructLen As Integer = memcpy(c[1], c[1], 0) - memcpy(c[0], c[0], 0) > > Print "Struct len = "; iStructLen, "Dest Values before copy ", f.d, f.e, f.g[0].e[0].x[0] > 'Copy one entry to another > memcpy(f, g, iStructLen) > Print c[2].d, c[2].e, c[2].g[0].e[0].x[0] ' g = c[3] f = c[2] > a.b = 45 > > Print a.b, b.b > ' Display the actual address Of Each element And root > Print memcpy(a, a, 0), memcpy(b, b, 0), arraymemcpy(VarPtr(c), VarPtr(c), 0), memcpy(e, e, 0), memcpy(f, f, 0), memcpy(g, g, 0) > Print VarPtr(a), VarPtr(b), VarPtr(c) > Print "Hello world" > > End > > > "Failure is the key to success; > each mistake teaches us something" .. Morihei Ueshiba > Brian G > >Thanks Brian, I got that response on Bugtracker too.? I guess what had >me fouled up is (at least until yesterday)? is that the Wiki Extern and >Wki How To? didn't make it very clear that you have to use the struct >definition to send pointer to sruct.? I interpreted the wiki as : >declare struct "abc" and then struct abc gets converted to pointer in >EXTERN function call.? I guess it makes more sense now that I see a >concrete example.? I thought EXTERN command would look at the instanced >struct name and know how to compute the pointer to data...but you have >to setup EXTERN call to match up to the array struct you want to send .? >Oops. > >I think a good example like yours would make an excellent clarification >to wiki.? That would save users lots of time. > >There is a big distinction between copying Pointers in gambas - like >MySvar = MySVarArray[5]: that will work.? BUT you have just copied >pointers, not data contents. > >I need to copy data contents between array of struct to another unique >struct, as you are showing. > >As C user - It seems a little odd that there is no way in Gambas to >retrieve a pointer to struct array without calling C function.? But then >again array of structs isn't really a real array - which is the same >type of problem we run into with dotNet where the data has to be >marshaled around to and from compatible C call.? It really slows >everything down on dotNet when you need a lot of fast C calls. > >Our conversion problem is:? We've got dozens of structs and array of >struct.? It's not my choice - we have to interface with other vendors' C >code for machine controls, machine vision etc.? And we now have to >maintain several versions of the same EXTERN memcpy call for each struct >array type - each with different parameter calls to define EXTERN calls >for different arrays.? And Beno?t says he wont be making Struct[] any >sort of type with built-in .Copy or .VarPtr method, etc.? OK.? That's >how Gambas works, and I can't change that. > >Without thinking too much (and is probably bad idea):? It would be cool >if somehow Struct[] were the parent of all storage class datatypes (and >if only one element in the array you ditch the square brackets) but we >don't have that option now, and I don't even know if that could work for >interpreter.? Dang. > >SO - We are deciding to re-evaluate the situation and see if it isn't >better to put everything into C anyway, and move away from GBasic >dialect style of storage altogether.? We have to move a lot of data >around fast - in between each video frame sometimes - so it might be >better to stick to straight C altogether - which puts our data as close >as possible to our control system calls. > >Thanks Again!! > >-John > > > > > >----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: From mbelmonte at belmotek.net Tue Jun 15 21:44:28 2021 From: mbelmonte at belmotek.net (Martin) Date: Tue, 15 Jun 2021 21:44:28 +0200 Subject: [Gambas-user] Installing package in manjaro Message-ID: Hi, My system is a manjaro linux xfce, gambas is 3.16 from sources I try to install a package but pacman needs? dependencies ??. ?Is not possible use development version from sources and install a package ? ?How to proceed correctly? Thanks./ / Martin./ / / / /$ sudo pacman -U tradukisto-0.2.32-1-any.pkg.tar.zst // //loading packages...// //resolving dependencies...// //warning: cannot resolve "gambas3-gb-image>=3.16", a dependency of "tradukisto"// //warning: cannot resolve "gambas3-gb-form>=3.16", a dependency of "tradukisto"// //warning: cannot resolve "gambas3-gb-chart>=3.16", a dependency of "tradukisto"// //warning: cannot resolve "gambas3-gb-db>=3.16", a dependency of "tradukisto"// //warning: cannot resolve "gambas3-gb-desktop>=3.16", a dependency of "tradukisto"// //warning: cannot resolve "gambas3-gb-util>=3.16", a dependency of "tradukisto"// //warning: cannot resolve "gambas3-gb-settings>=3.16", a dependency of "tradukisto"// //warning: cannot resolve "gambas3-gb-logging>=3.16", a dependency of "tradukisto"// //warning: cannot resolve "gambas3-gb-util-web>=3.16", a dependency of "tradukisto"// //warning: cannot resolve "gambas3-gb-xml>=3.16", a dependency of "tradukisto"// //:: The following package cannot be upgraded due to unresolvable dependencies:// //????? tradukisto// // //:: Do you want to skip the above package for this upgrade? [y/N] / -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Tue Jun 15 22:27:06 2021 From: bsteers4 at gmail.com (Bruce Steers) Date: Tue, 15 Jun 2021 21:27:06 +0100 Subject: [Gambas-user] Installing package in manjaro In-Reply-To: References: Message-ID: What happens if press n for no to upgrading packages for the upgrade? If that works still (installs the app) then there should not be a problem. A system will either have a package installed gambas and maybe need more gambas components or a compiled development gambas version that will have them all. If it fails then I guess there would be a problem there. BruceS On Tue, 15 Jun 2021, 20:50 Martin, wrote: > Hi, > > My system is a manjaro linux xfce, gambas is 3.16 from sources I try to > install a package but pacman needs dependencies ??. > > ?Is not possible use development version from sources and install a > package ? > > ?How to proceed correctly? > > Thanks. > > Martin. > > > *$ sudo pacman -U tradukisto-0.2.32-1-any.pkg.tar.zst * > *loading packages...* > *resolving dependencies...* > *warning: cannot resolve "gambas3-gb-image>=3.16", a dependency of > "tradukisto"* > *warning: cannot resolve "gambas3-gb-form>=3.16", a dependency of > "tradukisto"* > *warning: cannot resolve "gambas3-gb-chart>=3.16", a dependency of > "tradukisto"* > *warning: cannot resolve "gambas3-gb-db>=3.16", a dependency of > "tradukisto"* > *warning: cannot resolve "gambas3-gb-desktop>=3.16", a dependency of > "tradukisto"* > *warning: cannot resolve "gambas3-gb-util>=3.16", a dependency of > "tradukisto"* > *warning: cannot resolve "gambas3-gb-settings>=3.16", a dependency of > "tradukisto"* > *warning: cannot resolve "gambas3-gb-logging>=3.16", a dependency of > "tradukisto"* > *warning: cannot resolve "gambas3-gb-util-web>=3.16", a dependency of > "tradukisto"* > *warning: cannot resolve "gambas3-gb-xml>=3.16", a dependency of > "tradukisto"* > *:: The following package cannot be upgraded due to unresolvable > dependencies:* > * tradukisto* > > *:: Do you want to skip the above package for this upgrade? [y/N] * > > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From chrisml at deganius.de Tue Jun 15 23:20:50 2021 From: chrisml at deganius.de (Christof Thalhofer) Date: Tue, 15 Jun 2021 23:20:50 +0200 Subject: [Gambas-user] Connection to the Internet ... In-Reply-To: References: <76937962-db15-75af-c11f-5ad031a1cb17@deganius.de> Message-ID: <996a6039-e729-e924-ac49-f0e6943b4d0d@deganius.de> Am 15.06.21 um 19:00 schrieb jose.rodriguez at cenpalab.cu: >> this will ping the default gateway on linux >> ping -c1 `route|grep default|awk '{print $2}'` > > This might only work in english locales if the output is localized. And it is slow as hell. Alles Gute Christof Thalhofer -- Dies ist keine Signatur From johna at starflightinc.com Tue Jun 15 23:08:11 2021 From: johna at starflightinc.com (John Anderson) Date: Tue, 15 Jun 2021 14:08:11 -0700 Subject: [Gambas-user] Arrays of Structs - how to - and curious debug message In-Reply-To: <1623782808.152552135@f25.my.com> References: <3b796717-014b-a44d-246a-93a658734a75@gmail.com> <434889412.14631.1623699263380.JavaMail.zimbra@westwoodsvcs.com> <58a10653-5330-ae91-bbf7-d4155101e2b4@starflightinc.com> <1623782808.152552135@f25.my.com> Message-ID: <003864e8-2737-da8e-6276-0d96c512e21c@starflightinc.com> An HTML attachment was scrubbed... URL: From kicking177 at gmail.com Wed Jun 16 08:26:16 2021 From: kicking177 at gmail.com (Ken King) Date: Wed, 16 Jun 2021 07:26:16 +0100 Subject: [Gambas-user] Value is not static Message-ID: If I have the following code - - - - - ' Gambas class file Public Value1 As Integer Public Value2 As Integer Public Function ProcessIt() As Boolean Value2 = Value1 * 2 Return True Catch Return False End - - - - - ' Gambas module file Public Sub Main() Dim class1 As Class1 Dim CalcValue As Integer class1 = New Class1 class1.Value1 = 3 If class1.ProcessIt() Then CalcValue = class1.Value2 Print CalcValue Else Print "An error Occurred" Endif End - - - - it runs and works as I expect but if if I try to look at the class1 values I get 'class1.Value1' is not static What am I not understanding? -------------- next part -------------- An HTML attachment was scrubbed... URL: From bagonergi at gmail.com Wed Jun 16 09:24:48 2021 From: bagonergi at gmail.com (Gianluigi) Date: Wed, 16 Jun 2021 09:24:48 +0200 Subject: [Gambas-user] Value is not static In-Reply-To: References: Message-ID: Il giorno mer 16 giu 2021 alle ore 08:27 Ken King ha scritto: > If I have the following code > > ' Gambas module file > Public Sub Main() > Dim class1 As Class1 > ... > End > - - - - > it runs and works as I expect but if if I try to look at the class1 > values I get > 'class1.Value1' is not static > What am I not understanding? > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > Dim class1 As *New* Class1 Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From bagonergi at gmail.com Wed Jun 16 09:32:14 2021 From: bagonergi at gmail.com (Gianluigi) Date: Wed, 16 Jun 2021 09:32:14 +0200 Subject: [Gambas-user] Value is not static In-Reply-To: References: Message-ID: Il giorno mer 16 giu 2021 alle ore 09:24 Gianluigi ha scritto: > > > Il giorno mer 16 giu 2021 alle ore 08:27 Ken King > ha scritto: > >> If I have the following code >> >> ' Gambas module file >> Public Sub Main() >> Dim class1 As Class1 >> ... >> End >> - - - - >> it runs and works as I expect but if if I try to look at the class1 >> values I get >> 'class1.Value1' is not static >> What am I not understanding? >> >> ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- >> > > Dim class1 As *New* Class1 > > I forgot: Or ' Gambas class file *Create Static * Public Value1 As Integer Public Value2 As Integer Public Function ProcessIt() As Boolean Value2 = Value1 * 2 Return True Catch Return False End Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From mbelmonte at belmotek.net Wed Jun 16 09:33:37 2021 From: mbelmonte at belmotek.net (Martin) Date: Wed, 16 Jun 2021 09:33:37 +0200 Subject: [Gambas-user] Installing package in manjaro In-Reply-To: References: Message-ID: <60502405-9673-838f-9306-7512240b9f11@belmotek.net> Yes, sorry, I forgot to mention that I pressed N and also Y but nothing worked. _This is the output of N_ /:: Do you want to skip the above package for this upgrade? [y/N] n// //error: failed to prepare transaction (could not satisfy dependencies)// //:: unable to satisfy dependency 'gambas3-gb-image>=3.16' required by tradukisto// //:: unable to satisfy dependency 'gambas3-gb-form>=3.16' required by tradukisto// //:: unable to satisfy dependency 'gambas3-gb-chart>=3.16' required by tradukisto// //:: unable to satisfy dependency 'gambas3-gb-db>=3.16' required by tradukisto// //:: unable to satisfy dependency 'gambas3-gb-desktop>=3.16' required by tradukisto// //:: unable to satisfy dependency 'gambas3-gb-util>=3.16' required by tradukisto// //:: unable to satisfy dependency 'gambas3-gb-settings>=3.16' required by tradukisto// //:: unable to satisfy dependency 'gambas3-gb-logging>=3.16' required by tradukisto// //:: unable to satisfy dependency 'gambas3-gb-util-web>=3.16' required by tradukisto// //:: unable to satisfy dependency 'gambas3-gb-xml>=3.16' required by tradukisto/ _And this is the output of Y_ /:: Do you want to skip the above package for this upgrade? [y/N] y// //looking for conflicting packages...// //?there is nothing to do/ Best regards Mart?n. On 15/6/21 22:27, Bruce Steers wrote: > What happens if press n for no to upgrading packages for the upgrade? > > If that works still (installs the app) then there should not be a problem. > > A system will either have a package installed gambas and maybe need > more gambas components or a compiled development gambas version that > will have them all. > > If it fails then I guess there would be a problem there. > > BruceS > > On Tue, 15 Jun 2021, 20:50 Martin, > wrote: > > Hi, > > My system is a manjaro linux xfce, gambas is 3.16 from sources I > try to install a package but pacman needs? dependencies ??. > > ?Is not possible use development version from sources and install > a package ? > > ?How to proceed correctly? > > Thanks./ > / > > Martin./ > / > > / > / > > /$ sudo pacman -U tradukisto-0.2.32-1-any.pkg.tar.zst // > //loading packages...// > //resolving dependencies...// > //warning: cannot resolve "gambas3-gb-image>=3.16", a dependency > of "tradukisto"// > //warning: cannot resolve "gambas3-gb-form>=3.16", a dependency of > "tradukisto"// > //warning: cannot resolve "gambas3-gb-chart>=3.16", a dependency > of "tradukisto"// > //warning: cannot resolve "gambas3-gb-db>=3.16", a dependency of > "tradukisto"// > //warning: cannot resolve "gambas3-gb-desktop>=3.16", a dependency > of "tradukisto"// > //warning: cannot resolve "gambas3-gb-util>=3.16", a dependency of > "tradukisto"// > //warning: cannot resolve "gambas3-gb-settings>=3.16", a > dependency of "tradukisto"// > //warning: cannot resolve "gambas3-gb-logging>=3.16", a dependency > of "tradukisto"// > //warning: cannot resolve "gambas3-gb-util-web>=3.16", a > dependency of "tradukisto"// > //warning: cannot resolve "gambas3-gb-xml>=3.16", a dependency of > "tradukisto"// > //:: The following package cannot be upgraded due to unresolvable > dependencies:// > //????? tradukisto// > // > //:: Do you want to skip the above package for this upgrade? [y/N] / > > > > ----[ http://gambaswiki.org/wiki/doc/netiquette > ]---- > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Wed Jun 16 09:54:20 2021 From: bsteers4 at gmail.com (Bruce Steers) Date: Wed, 16 Jun 2021 08:54:20 +0100 Subject: [Gambas-user] Value is not static In-Reply-To: References: Message-ID: error i see is... you are naming your variable the same as the class "class1" maybe try *Dim myClass as New Class1* or something Try this... ' Gambas module file Public Sub Main() Dim myClass As New Class1 Dim CalcValue As Integer myClass.Value1 = 3 If myClass.ProcessIt() Then CalcValue = myClass.Value2 Print CalcValue Else Print "An error Occurred" Endif End There using myClass.Value1 will access your defined instanced variable using Class1.Value1 tries to access a static variable. Static variables and functions are available through the class itself, non static variables/functions are available through a defined instance of it. think of a static variable as a global setting you can define for the class at any time without creating a new object non static as things you can set/use for each individual defined object. BruceS On Wed, 16 Jun 2021 at 07:27, Ken King wrote: > If I have the following code > - - - - - > ' Gambas class file > Public Value1 As Integer > Public Value2 As Integer > > Public Function ProcessIt() As Boolean > Value2 = Value1 * 2 > Return True > Catch > Return False > End > - - - - - > ' Gambas module file > Public Sub Main() > Dim class1 As Class1 > Dim CalcValue As Integer > class1 = New Class1 > class1.Value1 = 3 > If class1.ProcessIt() Then > CalcValue = class1.Value2 > Print CalcValue > Else > Print "An error Occurred" > Endif > End > - - - - > it runs and works as I expect but if if I try to look at the class1 > values I get > 'class1.Value1' is not static > What am I not understanding? > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hans at gambas-buch.de Wed Jun 16 10:08:33 2021 From: hans at gambas-buch.de (Hans Lehmann) Date: Wed, 16 Jun 2021 10:08:33 +0200 Subject: [Gambas-user] Connection to the Internet ... In-Reply-To: References: <76937962-db15-75af-c11f-5ad031a1cb17@deganius.de> Message-ID: <06426f18-485b-aa18-dc36-4a14cd8ead33@gambas-buch.de> An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Wed Jun 16 10:28:39 2021 From: bsteers4 at gmail.com (Bruce Steers) Date: Wed, 16 Jun 2021 09:28:39 +0100 Subject: [Gambas-user] Installing package in manjaro In-Reply-To: <60502405-9673-838f-9306-7512240b9f11@belmotek.net> References: <60502405-9673-838f-9306-7512240b9f11@belmotek.net> Message-ID: aaah then i guess you have for sure stumbled upon an issue there. On Wed, 16 Jun 2021 at 08:34, Martin wrote: > Yes, sorry, I forgot to mention that I pressed N and also Y but nothing > worked. > > *This is the output of N* > > *:: Do you want to skip the above package for this upgrade? [y/N] n* > *error: failed to prepare transaction (could not satisfy dependencies)* > *:: unable to satisfy dependency 'gambas3-gb-image>=3.16' required by > tradukisto* > *:: unable to satisfy dependency 'gambas3-gb-form>=3.16' required by > tradukisto* > *:: unable to satisfy dependency 'gambas3-gb-chart>=3.16' required by > tradukisto* > *:: unable to satisfy dependency 'gambas3-gb-db>=3.16' required by > tradukisto* > *:: unable to satisfy dependency 'gambas3-gb-desktop>=3.16' required by > tradukisto* > *:: unable to satisfy dependency 'gambas3-gb-util>=3.16' required by > tradukisto* > *:: unable to satisfy dependency 'gambas3-gb-settings>=3.16' required by > tradukisto* > *:: unable to satisfy dependency 'gambas3-gb-logging>=3.16' required by > tradukisto* > *:: unable to satisfy dependency 'gambas3-gb-util-web>=3.16' required by > tradukisto* > *:: unable to satisfy dependency 'gambas3-gb-xml>=3.16' required by > tradukisto* > > *And this is the output of Y* > > *:: Do you want to skip the above package for this upgrade? [y/N] y* > *looking for conflicting packages...* > * there is nothing to do* > > Best regards > > Mart?n. > > On 15/6/21 22:27, Bruce Steers wrote: > > What happens if press n for no to upgrading packages for the upgrade? > > If that works still (installs the app) then there should not be a problem. > > A system will either have a package installed gambas and maybe need more > gambas components or a compiled development gambas version that will have > them all. > > If it fails then I guess there would be a problem there. > > BruceS > > On Tue, 15 Jun 2021, 20:50 Martin, wrote: > >> Hi, >> >> My system is a manjaro linux xfce, gambas is 3.16 from sources I try to >> install a package but pacman needs dependencies ??. >> >> ?Is not possible use development version from sources and install a >> package ? >> >> ?How to proceed correctly? >> >> Thanks. >> >> Martin. >> >> >> *$ sudo pacman -U tradukisto-0.2.32-1-any.pkg.tar.zst * >> *loading packages...* >> *resolving dependencies...* >> *warning: cannot resolve "gambas3-gb-image>=3.16", a dependency of >> "tradukisto"* >> *warning: cannot resolve "gambas3-gb-form>=3.16", a dependency of >> "tradukisto"* >> *warning: cannot resolve "gambas3-gb-chart>=3.16", a dependency of >> "tradukisto"* >> *warning: cannot resolve "gambas3-gb-db>=3.16", a dependency of >> "tradukisto"* >> *warning: cannot resolve "gambas3-gb-desktop>=3.16", a dependency of >> "tradukisto"* >> *warning: cannot resolve "gambas3-gb-util>=3.16", a dependency of >> "tradukisto"* >> *warning: cannot resolve "gambas3-gb-settings>=3.16", a dependency of >> "tradukisto"* >> *warning: cannot resolve "gambas3-gb-logging>=3.16", a dependency of >> "tradukisto"* >> *warning: cannot resolve "gambas3-gb-util-web>=3.16", a dependency of >> "tradukisto"* >> *warning: cannot resolve "gambas3-gb-xml>=3.16", a dependency of >> "tradukisto"* >> *:: The following package cannot be upgraded due to unresolvable >> dependencies:* >> * tradukisto* >> >> *:: Do you want to skip the above package for this upgrade? [y/N] * >> >> >> >> ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- >> > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From adamnt42 at gmail.com Wed Jun 16 10:36:55 2021 From: adamnt42 at gmail.com (bb) Date: Wed, 16 Jun 2021 18:06:55 +0930 Subject: [Gambas-user] Connection to the Internet ... In-Reply-To: References: Message-ID: <480b2e5c52ec7278530beac174f943cd609478c0.camel@gmail.com> On Tue, 2021-06-15 at 14:49 +0200, Hans Lehmann wrote: > Hello. > > I am looking for a way to find out for sure whether from my PC there > is currently > > (a) a connection to the local router and then > (b) also to the Internet. > > With kind regards > > Hans Hi Hans, The others' answers are good but i have to ask. for a) Since you are trying to find your "local router" then surely it's IP address is fixed and known, e.g. 192.168.0.1 or 10.0.0.1. So you could check connectivity just with ping -c1 -w0 |grep transmitted (you might have to vary the -w factor to cope with any local network latency). for b) there are many, many possible ways none to my knowledge all that "foolproof". The one I think is the best is to try to query one of the ARPAnet name servers for a "generally well known" address. There is a quick way to do a DNS lookup via one of the system network utilities but its a long time since I used them so someone else will need to help out here. @others: Yep that method usinng awk is very slow, incredibly slow even. But I have no idea why? cheers b From mbelmonte at belmotek.net Wed Jun 16 10:44:28 2021 From: mbelmonte at belmotek.net (Martin) Date: Wed, 16 Jun 2021 10:44:28 +0200 Subject: [Gambas-user] gbc3 - Segmentation fault (core dumped) Message-ID: Hi, I try to package an app (tradukisto the same in other email) in appimage I just follow this tutorial: https://appimage-builder.readthedocs.io/en/latest/examples/gambas3.html But in this step: *gbc3 project/** **Segmentation fault (core dumped)* ?What that means? Has anyone managed to make an AppImage of a program made in gambas3? Regards. -------------- next part -------------- An HTML attachment was scrubbed... URL: From chrisml at deganius.de Wed Jun 16 10:55:58 2021 From: chrisml at deganius.de (Christof Thalhofer) Date: Wed, 16 Jun 2021 10:55:58 +0200 Subject: [Gambas-user] Connection to the Internet ... In-Reply-To: <996a6039-e729-e924-ac49-f0e6943b4d0d@deganius.de> References: <76937962-db15-75af-c11f-5ad031a1cb17@deganius.de> <996a6039-e729-e924-ac49-f0e6943b4d0d@deganius.de> Message-ID: <4d1363f4-48c1-34d3-95e0-ffce0add9f46@deganius.de> Am 15.06.21 um 23:20 schrieb Christof Thalhofer: > Am 15.06.21 um 19:00 schrieb jose.rodriguez at cenpalab.cu: > >>> this will ping the default gateway on linux >>> ping -c1 `route|grep default|awk '{print $2}'` >> >> This might only work in english locales if the output is localized. > > And it is slow as hell. Sorry, I meant it is a lot faster to use 'route -n': route -n | grep ^0.0.0.0 | awk '{print $2}' Alles Gute Christof Thalhofer -- Dies ist keine Signatur From kicking177 at gmail.com Wed Jun 16 16:55:43 2021 From: kicking177 at gmail.com (KKing) Date: Wed, 16 Jun 2021 15:55:43 +0100 Subject: [Gambas-user] Value is not static Message-ID: <26b68143-1120-8b1d-3fe7-9dafc9478091@gmail.com> @BruceS Thankyou works @Gianluigi when I had ??? Dim class1 As New Class1 it still didn't seem to work, but when I tried ??? Dim myClass1 as New Class1 it was fine many thanks K -------------- next part -------------- An HTML attachment was scrubbed... URL: From bagonergi at gmail.com Wed Jun 16 17:17:05 2021 From: bagonergi at gmail.com (Gianluigi) Date: Wed, 16 Jun 2021 17:17:05 +0200 Subject: [Gambas-user] Value is not static In-Reply-To: <26b68143-1120-8b1d-3fe7-9dafc9478091@gmail.com> References: <26b68143-1120-8b1d-3fe7-9dafc9478091@gmail.com> Message-ID: Il giorno mer 16 giu 2021 alle ore 16:56 KKing ha scritto: > @BruceS Thankyou works > > @Gianluigi when I had > Dim class1 As New Class1 > it still didn't seem to work, but when I tried > Dim myClass1 as New Class1 > it was fine > > many thanks > K > Here work fine. Unfortunately someone confused your ideas and you thanked him ;-D With Create static class: ------------------------- ' Gambas class file Create Static Public Value1 As Integer Public Value2 As Integer Public Function ProcessIt() As Boolean Value2 = Value1 * 2 Return True Catch Return False End ' Gambas module file Public Sub Main() Dim CalcValue As Integer class1.Value1 = 3 If class1.ProcessIt() Then CalcValue = class1.Value2 Print CalcValue Else Print "An error Occurred" Endif End --------------------------- with the instantiated class: ---------------------------------- ' Gambas class file Public Value1 As Integer Public Value2 As Integer Public Function ProcessIt() As Boolean Value2 = Value1 * 2 Return True Catch Return False End ' Gambas module file Public Sub Main() Dim class1 As New Class1 Dim CalcValue As Integer class1.Value1 = 3 If class1.ProcessIt() Then CalcValue = class1.Value2 Print CalcValue Else Print "An error Occurred" Endif End ------------------------------- Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Wed Jun 16 17:27:16 2021 From: bsteers4 at gmail.com (Bruce Steers) Date: Wed, 16 Jun 2021 16:27:16 +0100 Subject: [Gambas-user] Value is not static In-Reply-To: References: <26b68143-1120-8b1d-3fe7-9dafc9478091@gmail.com> Message-ID: On Wed, 16 Jun 2021 at 16:18, Gianluigi wrote: > > > Il giorno mer 16 giu 2021 alle ore 16:56 KKing ha > scritto: > >> @BruceS Thankyou works >> >> @Gianluigi when I had >> Dim class1 As New Class1 >> it still didn't seem to work, but when I tried >> Dim myClass1 as New Class1 >> it was fine >> >> many thanks >> K >> > > Here work fine. > Unfortunately someone confused your ideas and you thanked him ;-D > Hey! I think you misread the problem Gian that's why my way ,, worked. your way did not solve.. but if you really really want to be correct we can say i just confused him ;) lol happy to help KKing BruceS -------------- next part -------------- An HTML attachment was scrubbed... URL: From bagonergi at gmail.com Wed Jun 16 17:41:34 2021 From: bagonergi at gmail.com (Gianluigi) Date: Wed, 16 Jun 2021 17:41:34 +0200 Subject: [Gambas-user] Value is not static In-Reply-To: References: <26b68143-1120-8b1d-3fe7-9dafc9478091@gmail.com> Message-ID: Il giorno mer 16 giu 2021 alle ore 17:28 Bruce Steers ha scritto: > > happy to help KKing > BruceS > > ... which means happy to confuse, if you had not intervened, K would have reasoned on my suggestions. Best regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Wed Jun 16 18:06:15 2021 From: bsteers4 at gmail.com (Bruce Steers) Date: Wed, 16 Jun 2021 17:06:15 +0100 Subject: [Gambas-user] Value is not static In-Reply-To: References: <26b68143-1120-8b1d-3fe7-9dafc9478091@gmail.com> Message-ID: I dont think he wanted a static class/variable. I think he just did not know using the class name would attempt to read static variables. A simple error, a simple solution/explanation. I think it is you who got confused and was confusing. You terrible confuser accuser you (I resent the accusation so i return it).. So there. Na na nana na ? ? BruceS On Wed, 16 Jun 2021, 16:42 Gianluigi, wrote: > > > Il giorno mer 16 giu 2021 alle ore 17:28 Bruce Steers > ha scritto: > >> >> happy to help KKing >> BruceS >> >> > ... which means happy to confuse, if you had not intervened, K would have > reasoned on my suggestions. > > Best regards > > Gianluigi > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bagonergi at gmail.com Wed Jun 16 18:21:41 2021 From: bagonergi at gmail.com (Gianluigi) Date: Wed, 16 Jun 2021 18:21:41 +0200 Subject: [Gambas-user] Value is not static In-Reply-To: References: <26b68143-1120-8b1d-3fe7-9dafc9478091@gmail.com> Message-ID: Il giorno mer 16 giu 2021 alle ore 18:07 Bruce Steers ha scritto: > I dont think he wanted a static class/variable. > I think he just did not know using the class name would attempt to read > static variables. > > A simple error, a simple solution/explanation. > > I think it is you who got confused and was confusing. You terrible > confuser accuser you (I resent the accusation so i return it).. > So there. > Na na nana na ? > ? > Bruce > I believe K is studying and trying to understand how classes work. I was out of kindergarten 68 years ago, today, thanks to you, I went back. Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From kicking177 at gmail.com Wed Jun 16 18:38:08 2021 From: kicking177 at gmail.com (KKing) Date: Wed, 16 Jun 2021 17:38:08 +0100 Subject: [Gambas-user] Migrating to Gambas Message-ID: <879e6642-67ea-4ffd-9c04-840dd5deb195@gmail.com> Hi also to mention if you have any serious amount of XML handling in VB6 you may also be in for a fair amount of pain in trying to migrate. It's been a while since we looked at this so things may have moved on but last we looked there was no XPath support and no selectSingleNode or selectNodes or equivalent. The closest seemed to be something called GetElementsByTagName which only works at the document level so not very helpful if you have things like "DateTime" or "UserId" appearing in multiple nodes and you want a specific one. Think we found a lot of syntax quite different which after some joy at so much similarity was a blow. We also had issue with formatting of output . So a few big solutions are running under wine because it was the quickest way to keep the same functionality with minimal effort. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dovey.john at gmail.com Wed Jun 16 18:44:58 2021 From: dovey.john at gmail.com (John Dovey) Date: Wed, 16 Jun 2021 11:44:58 -0500 Subject: [Gambas-user] Migrating to Gambas In-Reply-To: <879e6642-67ea-4ffd-9c04-840dd5deb195@gmail.com> References: <879e6642-67ea-4ffd-9c04-840dd5deb195@gmail.com> Message-ID: Thanks. Thankfully none of that. I have the situation, which I don't think is too unique, that I need to have the same functionality across platforms. This works extremely well with dotnet VB. Then something comes along which just breaks it. Such as trying to run Shell or system.diagnostics.Process.Start which just will not work. So.. I've used Gambas to rewrite the app because of that (and a few other things) which is fantastic, but means I have two separate code bases to maintain. I wish Gambas could run cross platform, then I'd use it exclusively.. JD On Wed, 16 Jun 2021 at 11:39, KKing wrote: > Hi also to mention if you have any serious amount of XML handling in VB6 > you may also be in for a fair amount of pain in trying to migrate. > > It's been a while since we looked at this so things may have moved on but > last we looked there was no XPath support and no selectSingleNode or > selectNodes or equivalent. The closest seemed to be something called > GetElementsByTagName which only works at the document level so not very > helpful if you have things like "DateTime" or "UserId" appearing in > multiple nodes and you want a specific one. Think we found a lot of syntax > quite different which after some joy at so much similarity was a blow. We > also had issue with formatting of output . > > So a few big solutions are running under wine because it was the quickest > way to keep the same functionality with minimal effort. > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mbelmonte at belmotek.net Wed Jun 16 20:55:04 2021 From: mbelmonte at belmotek.net (Martin) Date: Wed, 16 Jun 2021 20:55:04 +0200 Subject: [Gambas-user] Installing package in manjaro In-Reply-To: References: <60502405-9673-838f-9306-7512240b9f11@belmotek.net> Message-ID: <85e27786-d8f9-93dc-e898-389a03d7518d@belmotek.net> I made the test in other system (same manjaro) but in a virtual machine gambas 3.16.2 of official repositories, then works fine. I made the package and then i install it. So, the problem is when we use Gambas from the sources or Gambas 3.16 miss something when made the packages form arch. ?What do you think? On 16/6/21 10:28, Bruce Steers wrote: > aaah then i guess you have for sure stumbled upon an issue there. > > > On Wed, 16 Jun 2021 at 08:34, Martin > wrote: > > Yes, sorry, I forgot to mention that I pressed N and also Y but > nothing worked. > > _This is the output of N_ > > /:: Do you want to skip the above package for this upgrade? [y/N] n// > //error: failed to prepare transaction (could not satisfy > dependencies)// > //:: unable to satisfy dependency 'gambas3-gb-image>=3.16' > required by tradukisto// > //:: unable to satisfy dependency 'gambas3-gb-form>=3.16' required > by tradukisto// > //:: unable to satisfy dependency 'gambas3-gb-chart>=3.16' > required by tradukisto// > //:: unable to satisfy dependency 'gambas3-gb-db>=3.16' required > by tradukisto// > //:: unable to satisfy dependency 'gambas3-gb-desktop>=3.16' > required by tradukisto// > //:: unable to satisfy dependency 'gambas3-gb-util>=3.16' required > by tradukisto// > //:: unable to satisfy dependency 'gambas3-gb-settings>=3.16' > required by tradukisto// > //:: unable to satisfy dependency 'gambas3-gb-logging>=3.16' > required by tradukisto// > //:: unable to satisfy dependency 'gambas3-gb-util-web>=3.16' > required by tradukisto// > //:: unable to satisfy dependency 'gambas3-gb-xml>=3.16' required > by tradukisto/ > > _And this is the output of Y_ > > /:: Do you want to skip the above package for this upgrade? [y/N] y// > //looking for conflicting packages...// > //?there is nothing to do/ > > Best regards > > Mart?n. > > > On 15/6/21 22:27, Bruce Steers wrote: >> What happens if press n for no to upgrading packages for the >> upgrade? >> >> If that works still (installs the app) then there should not be a >> problem. >> >> A system will either have a package installed gambas and maybe >> need more gambas components or a compiled development gambas >> version that will have them all. >> >> If it fails then I guess there would be a problem there. >> >> BruceS >> >> On Tue, 15 Jun 2021, 20:50 Martin, > > wrote: >> >> Hi, >> >> My system is a manjaro linux xfce, gambas is 3.16 from >> sources I try to install a package but pacman needs? >> dependencies ??. >> >> ?Is not possible use development version from sources and >> install a package ? >> >> ?How to proceed correctly? >> >> Thanks./ >> / >> >> Martin./ >> / >> >> / >> / >> >> /$ sudo pacman -U tradukisto-0.2.32-1-any.pkg.tar.zst // >> //loading packages...// >> //resolving dependencies...// >> //warning: cannot resolve "gambas3-gb-image>=3.16", a >> dependency of "tradukisto"// >> //warning: cannot resolve "gambas3-gb-form>=3.16", a >> dependency of "tradukisto"// >> //warning: cannot resolve "gambas3-gb-chart>=3.16", a >> dependency of "tradukisto"// >> //warning: cannot resolve "gambas3-gb-db>=3.16", a dependency >> of "tradukisto"// >> //warning: cannot resolve "gambas3-gb-desktop>=3.16", a >> dependency of "tradukisto"// >> //warning: cannot resolve "gambas3-gb-util>=3.16", a >> dependency of "tradukisto"// >> //warning: cannot resolve "gambas3-gb-settings>=3.16", a >> dependency of "tradukisto"// >> //warning: cannot resolve "gambas3-gb-logging>=3.16", a >> dependency of "tradukisto"// >> //warning: cannot resolve "gambas3-gb-util-web>=3.16", a >> dependency of "tradukisto"// >> //warning: cannot resolve "gambas3-gb-xml>=3.16", a >> dependency of "tradukisto"// >> //:: The following package cannot be upgraded due to >> unresolvable dependencies:// >> //????? tradukisto// >> // >> //:: Do you want to skip the above package for this upgrade? >> [y/N] / >> >> >> >> ----[ http://gambaswiki.org/wiki/doc/netiquette >> ]---- >> >> >> ----[http://gambaswiki.org/wiki/doc/netiquette ]---- > > ----[ http://gambaswiki.org/wiki/doc/netiquette > ]---- > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: From chrisml at deganius.de Thu Jun 17 00:24:46 2021 From: chrisml at deganius.de (Christof Thalhofer) Date: Thu, 17 Jun 2021 00:24:46 +0200 Subject: [Gambas-user] Migrating to Gambas In-Reply-To: References: <879e6642-67ea-4ffd-9c04-840dd5deb195@gmail.com> Message-ID: <4da5a197-2751-daa9-4728-8865df599d8a@deganius.de> Am 16.06.21 um 18:44 schrieb John Dovey: > I wish Gambas could run cross platform, then I'd > use it exclusively..? Maybe you want to have a look at this thread: https://lists.gambas-basic.org/pipermail/user/2020-January/068453.html Alles Gute Christof Thalhofer -- Dies ist keine Signatur From dovey.john at gmail.com Thu Jun 17 00:38:58 2021 From: dovey.john at gmail.com (John Dovey) Date: Wed, 16 Jun 2021 17:38:58 -0500 Subject: [Gambas-user] Migrating to Gambas In-Reply-To: <4da5a197-2751-daa9-4728-8865df599d8a@deganius.de> References: <879e6642-67ea-4ffd-9c04-840dd5deb195@gmail.com> <4da5a197-2751-daa9-4728-8865df599d8a@deganius.de> Message-ID: Fantastic. I think this deserves getting it's own "How To" on the Wiki. I'll tackle it and once I've done the basics, maybe some of you can chime in and update where I go wrong :-) All the best John On Wed, 16 Jun 2021 at 17:25, Christof Thalhofer wrote: > Am 16.06.21 um 18:44 schrieb John Dovey: > > > I wish Gambas could run cross platform, then I'd > > use it exclusively.. > > Maybe you want to have a look at this thread: > > https://lists.gambas-basic.org/pipermail/user/2020-January/068453.html > > Alles Gute > > Christof Thalhofer > > -- > Dies ist keine Signatur > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dovey.john at gmail.com Thu Jun 17 01:27:34 2021 From: dovey.john at gmail.com (John Dovey) Date: Wed, 16 Jun 2021 18:27:34 -0500 Subject: [Gambas-user] Migrating to Gambas In-Reply-To: <4da5a197-2751-daa9-4728-8865df599d8a@deganius.de> References: <879e6642-67ea-4ffd-9c04-840dd5deb195@gmail.com> <4da5a197-2751-daa9-4728-8865df599d8a@deganius.de> Message-ID: Ok. Quick and nasty version is up. How to run Gambas and Gambas Apps on Windows using WSL On Wed, 16 Jun 2021 at 17:25, Christof Thalhofer wrote: > Am 16.06.21 um 18:44 schrieb John Dovey: > > > I wish Gambas could run cross platform, then I'd > > use it exclusively.. > > Maybe you want to have a look at this thread: > > https://lists.gambas-basic.org/pipermail/user/2020-January/068453.html > > Alles Gute > > Christof Thalhofer > > -- > Dies ist keine Signatur > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dovey.john at gmail.com Thu Jun 17 06:31:23 2021 From: dovey.john at gmail.com (John Dovey) Date: Wed, 16 Jun 2021 23:31:23 -0500 Subject: [Gambas-user] Installation Problem Message-ID: Hi, I wanted to upgrade the version of Gambas on a Linux server. It's running Ubuntu (Ubuntu 16.04.7 LTS (GNU/Linux 4.4.0-210-generic x86_64) which I am unable to upgrade. I ran sudo apt remove gambas3, just to have it clean, then sudo add-apt-repository ppa:gambas-team/gambas3 sudo apt-get update sudo apt-get install gambas3 Everything goes fine, it starts downloading the packages then the installation aborts. Here are the last few lines: Need to get 511 kB/63.7 MB of archives. After this operation, 226 MB of additional disk space will be used. Do you want to continue? [Y/n] Err:1 https://packages.microsoft.com/ubuntu/20.04/prod focal/main amd64 libodbc1 amd64 2.3.7 404 Not Found Unable to correct missing packages. E: Failed to fetch https://packages.microsoft.com/ubuntu/20.04/prod/pool/main/u/ unixodbc/libodbc1_2.3.7_amd64.deb 404 Not Found E: Aborting install. -------------- next part -------------- An HTML attachment was scrubbed... URL: From adamnt42 at gmail.com Thu Jun 17 06:44:58 2021 From: adamnt42 at gmail.com (bb) Date: Thu, 17 Jun 2021 14:14:58 +0930 Subject: [Gambas-user] Installation Problem In-Reply-To: References: Message-ID: On Wed, 2021-06-16 at 23:31 -0500, John Dovey wrote: > Hi, > I wanted to upgrade the version of Gambas on a Linux server. It's > running Ubuntu (Ubuntu 16.04.7 LTS (GNU/Linux 4.4.0-210-generic > x86_64) which I am unable to upgrade. > > I ran sudo apt remove gambas3, just to have it clean, then > sudo add-apt-repository ppa:gambas-team/gambas3 > sudo apt-get update > sudo apt-get install gambas3 > > Everything goes fine, it starts downloading the packages then the > installation aborts. Here are the last few lines: > Need to get 511 kB/63.7 MB of archives. > After this operation, 226 MB of additional disk space will be used. > Do you want to continue? [Y/n] > Err:1 https://packages.microsoft.com/ubuntu/20.04/prod focal/main > amd64 libodbc1 > amd64 2.3.7 > 404 Not Found > Unable to correct missing packages. > E: Failed to fetch > https://packages.microsoft.com/ubuntu/20.04/prod/pool/main/u/ > unixodbc/libodbc1_2.3.7_amd64.deb 404 Not Found > > E: Aborting install. > > > ----[ > http://gambaswiki.org/wiki/doc/netiquette > ]---- > Odd, I had no problems about an hour ago and no 404 on that URL just now. Try opening that link in a browser. You should get something like the attached pic. If so then the internet must have taken a momentary dislike to you, so just try the "install" step again. If not then I dont know. b -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot from 2021-06-17 14-13-41.png Type: image/png Size: 32475 bytes Desc: not available URL: From dovey.john at gmail.com Thu Jun 17 07:37:52 2021 From: dovey.john at gmail.com (John Dovey) Date: Thu, 17 Jun 2021 00:37:52 -0500 Subject: [Gambas-user] Installation Problem In-Reply-To: References: Message-ID: [image: image.png] Going back up the tree, this is the first time I see anything: [image: image.png] On Wed, 16 Jun 2021 at 23:46, bb wrote: > On Wed, 2021-06-16 at 23:31 -0500, John Dovey wrote: > > Hi, > > I wanted to upgrade the version of Gambas on a Linux server. It's > > running Ubuntu (Ubuntu 16.04.7 LTS (GNU/Linux 4.4.0-210-generic > > x86_64) which I am unable to upgrade. > > > > I ran sudo apt remove gambas3, just to have it clean, then > > sudo add-apt-repository ppa:gambas-team/gambas3 > > sudo apt-get update > > sudo apt-get install gambas3 > > > > Everything goes fine, it starts downloading the packages then the > > installation aborts. Here are the last few lines: > > Need to get 511 kB/63.7 MB of archives. > > After this operation, 226 MB of additional disk space will be used. > > Do you want to continue? [Y/n] > > Err:1 https://packages.microsoft.com/ubuntu/20.04/prod focal/main > > amd64 libodbc1 > > amd64 2.3.7 > > 404 Not Found > > Unable to correct missing packages. > > E: Failed to fetch > > https://packages.microsoft.com/ubuntu/20.04/prod/pool/main/u/ > > unixodbc/libodbc1_2.3.7_amd64.deb 404 Not Found > > > > E: Aborting install. > > > > > > ----[ > > http://gambaswiki.org/wiki/doc/netiquette > > ]---- > > > Odd, I had no problems about an hour ago and no 404 on that URL just > now. > Try opening that link in a browser. You should get something like the > attached pic. If so then the internet must have taken a momentary > dislike to you, so just try the "install" step again. > If not then I dont know. > b > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 15031 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 15067 bytes Desc: not available URL: From rwe-sse at osnanet.de Thu Jun 17 08:48:49 2021 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Thu, 17 Jun 2021 08:48:49 +0200 Subject: [Gambas-user] Migrating to Gambas In-Reply-To: References: <879e6642-67ea-4ffd-9c04-840dd5deb195@gmail.com> <4da5a197-2751-daa9-4728-8865df599d8a@deganius.de> Message-ID: <0163da99-4fe8-3f1e-98ec-b8e4be2a7ffa@osnanet.de> Thank you very much for this, John. I've tried WSL and Gambas some time ago, and I found that WSL is not able to access my Samba directory on the Linux server which is shared to the Windows PC. All the necessary data is on this share, so this was a real showstopper to me. From the error messages I found that WSL is trying to let Windows translate the shared ext4 directory into something Windows would know. There is a native VB6 application on this Windows PC, and it can read the share like any other application there. Regards Rolf Am 17.06.21 um 01:27 schrieb John Dovey: > Ok. Quick and nasty version is up. How to run Gambas and Gambas Apps on > Windows using WSL > > > On Wed, 16 Jun 2021 at 17:25, Christof Thalhofer > wrote: > > Am 16.06.21 um 18:44 schrieb John Dovey: > > > I wish Gambas could run cross platform, then I'd > > use it exclusively.. > > Maybe you want to have a look at this thread: > > https://lists.gambas-basic.org/pipermail/user/2020-January/068453.html > > Alles Gute > > Christof Thalhofer > > -- > Dies ist keine Signatur > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > From chrisml at deganius.de Thu Jun 17 08:55:14 2021 From: chrisml at deganius.de (Christof Thalhofer) Date: Thu, 17 Jun 2021 08:55:14 +0200 Subject: [Gambas-user] Migrating to Gambas In-Reply-To: References: <879e6642-67ea-4ffd-9c04-840dd5deb195@gmail.com> <4da5a197-2751-daa9-4728-8865df599d8a@deganius.de> Message-ID: Am 17.06.21 um 01:27 schrieb John Dovey: > Ok. Quick and nasty version is up.?How to run Gambas and Gambas Apps on > Windows using WSL Cool, super, thank you! :-) Alles Gute Christof Thalhofer -- Dies ist keine Signatur From adamnt42 at gmail.com Thu Jun 17 08:59:05 2021 From: adamnt42 at gmail.com (bb) Date: Thu, 17 Jun 2021 16:29:05 +0930 Subject: [Gambas-user] Installation Problem In-Reply-To: References: Message-ID: On Thu, 2021-06-17 at 00:37 -0500, John Dovey wrote: > > > Going back up the tree, this is the first time I see anything: > > OK, yes, quite interesting. You will have to use a different mirror. That one is quite ahem "interesting". There must be one closer to the truth that you can use. You know how to that, yes? b From dovey.john at gmail.com Thu Jun 17 09:00:52 2021 From: dovey.john at gmail.com (John Dovey) Date: Thu, 17 Jun 2021 02:00:52 -0500 Subject: [Gambas-user] Installation Problem In-Reply-To: References: Message-ID: I know how to that, no. Definitely not! On Thu, Jun 17, 2021 at 2:00 AM bb wrote: > On Thu, 2021-06-17 at 00:37 -0500, John Dovey wrote: > > > > > > Going back up the tree, this is the first time I see anything: > > > > > > OK, yes, quite interesting. > > You will have to use a different mirror. That one is quite ahem > "interesting". > > There must be one closer to the truth that you can use. > > You know how to that, yes? > > b > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -- Sent from Gmail Mobile -------------- next part -------------- An HTML attachment was scrubbed... URL: From adamnt42 at gmail.com Thu Jun 17 09:13:51 2021 From: adamnt42 at gmail.com (bb) Date: Thu, 17 Jun 2021 16:43:51 +0930 Subject: [Gambas-user] Installation Problem In-Reply-To: References: Message-ID: <81f25bb0733716e316f2de3d8397338f6767a3db.camel@gmail.com> On Thu, 2021-06-17 at 02:00 -0500, John Dovey wrote: > I know how to that, no. Definitely not! > > On Thu, Jun 17, 2021 at 2:00 AM bb wrote: > > On Thu, 2021-06-17 at 00:37 -0500, John Dovey wrote: > > > > > > > > > Going back up the tree, this is the first time I see anything: > > > > > > > > > > OK, yes, quite interesting. > > > > You will have to use a different mirror. That one is quite ahem > > "interesting". > > > > There must be one closer to the truth that you can use. > > > > You know how to that, yes? > > > > b > > > > Sorry John, someone else will have to help you with that I have no freaking idea how Ubuntu works. Guessing ... it's Synaptic settings repositories or something like that. :-( Here, we use the aarnet mirror which is quite frequently updated http://mirror.aarnet.edu.au/ and because it's "close". The one you should choose "should" be based on the same two characteristics. b From bsteers4 at gmail.com Thu Jun 17 10:48:22 2021 From: bsteers4 at gmail.com (Bruce Steers) Date: Thu, 17 Jun 2021 09:48:22 +0100 Subject: [Gambas-user] Installation Problem In-Reply-To: References: Message-ID: why are you using a microsoft ubuntu server not an ubuntu one? you are also using a focal 20.04 base when your linux is 16.04?? you should maybe use http://archive.ubuntu.com/ubuntu/ and set it to xenial 16.04 remove entries from /etc/apt/sources.list.d and/or /etc/apt/sources.list (or modify the lines to use the xenial info below... then use something like this to add the correct ones for your os (not tested, you may need to tweak) sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu xenial main restricted universe multiverse' sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse' sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse' sudo add-apt-repository 'deb http://security.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse' sudo add-apt-repository 'deb http://archive.canonical.com/ubuntu/ xenial partner' BruceS On Thu, 17 Jun 2021 at 05:32, John Dovey wrote: > Hi, > I wanted to upgrade the version of Gambas on a Linux server. It's running > Ubuntu (Ubuntu 16.04.7 LTS (GNU/Linux 4.4.0-210-generic x86_64) which I am > unable to upgrade. > > I ran sudo apt remove gambas3, just to have it clean, then > sudo add-apt-repository ppa:gambas-team/gambas3 > sudo apt-get update > sudo apt-get install gambas3 > > Everything goes fine, it starts downloading the packages then the > installation aborts. Here are the last few lines: > Need to get 511 kB/63.7 MB of archives. > After this operation, 226 MB of additional disk space will be used. > Do you want to continue? [Y/n] > Err:1 https://packages.microsoft.com/ubuntu/20.04/prod focal/main amd64 > libodbc1 > amd64 2.3.7 > 404 Not Found > Unable to correct missing packages. > E: Failed to fetch > https://packages.microsoft.com/ubuntu/20.04/prod/pool/main/u/ > unixodbc/libodbc1_2.3.7_amd64.deb 404 Not Found > > E: Aborting install. > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Thu Jun 17 11:10:32 2021 From: bsteers4 at gmail.com (Bruce Steers) Date: Thu, 17 Jun 2021 10:10:32 +0100 Subject: [Gambas-user] Installation Problem In-Reply-To: References: Message-ID: On Thu, 17 Jun 2021 at 09:48, Bruce Steers wrote: > why are you using a microsoft ubuntu server not an ubuntu one? > you are also using a focal 20.04 base when your linux is 16.04?? > > you should maybe use http://archive.ubuntu.com/ubuntu/ > and set it to xenial 16.04 > > remove entries from /etc/apt/sources.list.d and/or /etc/apt/sources.list > (or modify the lines to use the xenial info below... > If you have your own reasons to need the ms ubuntu focal repos then maybe just add the below repositories without removing the above ones. Seems wrong to me though that you have 20.04 repo on a 16.04 system > > then use something like this to add the correct ones for your os (not > tested, you may need to tweak) > > sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu xenial main > restricted universe multiverse' > sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu > xenial-updates main restricted universe multiverse' > sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu > xenial-backports main restricted universe multiverse' > > sudo add-apt-repository 'deb http://security.ubuntu.com/ubuntu/ > xenial-security main restricted universe multiverse' > sudo add-apt-repository 'deb http://archive.canonical.com/ubuntu/ xenial > partner' > > BruceS > > > On Thu, 17 Jun 2021 at 05:32, John Dovey wrote: > >> Hi, >> I wanted to upgrade the version of Gambas on a Linux server. It's running >> Ubuntu (Ubuntu 16.04.7 LTS (GNU/Linux 4.4.0-210-generic x86_64) which I am >> unable to upgrade. >> >> I ran sudo apt remove gambas3, just to have it clean, then >> sudo add-apt-repository ppa:gambas-team/gambas3 >> sudo apt-get update >> sudo apt-get install gambas3 >> >> Everything goes fine, it starts downloading the packages then the >> installation aborts. Here are the last few lines: >> Need to get 511 kB/63.7 MB of archives. >> After this operation, 226 MB of additional disk space will be used. >> Do you want to continue? [Y/n] >> Err:1 https://packages.microsoft.com/ubuntu/20.04/prod focal/main amd64 >> libodbc1 >> amd64 2.3.7 >> 404 Not Found >> Unable to correct missing packages. >> E: Failed to fetch >> https://packages.microsoft.com/ubuntu/20.04/prod/pool/main/u/ >> unixodbc/libodbc1_2.3.7_amd64.deb 404 Not Found >> >> E: Aborting install. >> >> >> ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bagonergi at gmail.com Thu Jun 17 11:43:47 2021 From: bagonergi at gmail.com (Gianluigi) Date: Thu, 17 Jun 2021 11:43:47 +0200 Subject: [Gambas-user] =?utf-8?q?Compilation_error=3A_=E2=80=98KeepEmptyP?= =?utf-8?b?YXJ0c+KAmSBpcyBub3QgYSBtZW1iZXIgb2Yg4oCYUXTigJk=?= Message-ID: Hi Benoit, the terminal returns: /usr/lib/x86_64-linux-gnu/qt5/bin/moc -o CMouse_moc.cpp CMouse.h CMouse.h:0: Note: No relevant classes found. No output generated. CXX gb_qt5_la-CMouse_moc.lo CXX gb_qt5_la-CMouse.lo /usr/lib/x86_64-linux-gnu/qt5/bin/moc -o CKey_moc.cpp CKey.h CKey.h:0: Note: No relevant classes found. No output generated. CXX gb_qt5_la-CKey_moc.lo CXX gb_qt5_la-CKey.lo /usr/lib/x86_64-linux-gnu/qt5/bin/moc -o CColor_moc.cpp CColor.h CColor.h:0: Note: No relevant classes found. No output generated. CXX gb_qt5_la-CColor_moc.lo CXX gb_qt5_la-CColor.lo CXX gb_qt5_la-CConst.lo /usr/lib/x86_64-linux-gnu/qt5/bin/moc -o CCheckBox_moc.cpp CCheckBox.h CXX gb_qt5_la-CCheckBox_moc.lo CXX gb_qt5_la-CCheckBox.lo /usr/lib/x86_64-linux-gnu/qt5/bin/moc -o CPanel_moc.cpp CPanel.h CPanel.h:0: Note: No relevant classes found. No output generated. CXX gb_qt5_la-CPanel_moc.lo CXX gb_qt5_la-CPanel.lo /usr/lib/x86_64-linux-gnu/qt5/bin/moc -o CRadioButton_moc.cpp CRadioButton.h CXX gb_qt5_la-CRadioButton_moc.lo CXX gb_qt5_la-CRadioButton.lo /usr/lib/x86_64-linux-gnu/qt5/bin/moc -o CTextArea_moc.cpp CTextArea.h CXX gb_qt5_la-CTextArea_moc.lo CXX gb_qt5_la-CTextArea.lo /usr/lib/x86_64-linux-gnu/qt5/bin/moc -o CTabStrip_moc.cpp CTabStrip.h CXX gb_qt5_la-CTabStrip_moc.lo CXX gb_qt5_la-CTabStrip.lo /usr/lib/x86_64-linux-gnu/qt5/bin/moc -o CDialog_moc.cpp CDialog.h CDialog.h:0: Note: No relevant classes found. No output generated. CXX gb_qt5_la-CDialog_moc.lo CXX gb_qt5_la-CDialog.lo /usr/lib/x86_64-linux-gnu/qt5/bin/moc -o CPicture_moc.cpp CPicture.h CPicture.h:0: Note: No relevant classes found. No output generated. CXX gb_qt5_la-CPicture_moc.lo CXX gb_qt5_la-CPicture.lo /usr/lib/x86_64-linux-gnu/qt5/bin/moc -o CImage_moc.cpp CImage.h CImage.h:0: Note: No relevant classes found. No output generated. CXX gb_qt5_la-CImage_moc.lo CXX gb_qt5_la-CImage.lo /usr/lib/x86_64-linux-gnu/qt5/bin/moc -o canimation_moc.cpp canimation.h CXX gb_qt5_la-canimation_moc.lo CXX gb_qt5_la-canimation.lo /usr/lib/x86_64-linux-gnu/qt5/bin/moc -o CClipboard_moc.cpp CClipboard.h CClipboard.h:0: Note: No relevant classes found. No output generated. CXX gb_qt5_la-CClipboard_moc.lo CXX gb_qt5_la-CClipboard.lo CXX gb_qt5_la-CDraw.lo CDraw.cpp: In function ?int get_text_width(QPainter*, QString&)?: CDraw.cpp:123:30: error: ?KeepEmptyParts? is not a member of ?Qt? 123 | text_sl = s.split('\n', Qt::KeepEmptyParts); | ^~~~~~~~~~~~~~ make[5]: *** [Makefile:1114: gb_qt5_la-CDraw.lo] Errore 1 make[5]: uscita dalla directory ?/home/gian/gambasdevel/gb.qt5/src? make[4]: *** [Makefile:1301: all-recursive] Errore 1 make[4]: uscita dalla directory ?/home/gian/gambasdevel/gb.qt5/src? make[3]: *** [Makefile:467: all-recursive] Errore 1 make[3]: uscita dalla directory ?/home/gian/gambasdevel/gb.qt5? make[2]: *** [Makefile:399: all] Errore 2 make[2]: uscita dalla directory ?/home/gian/gambasdevel/gb.qt5? make[1]: *** [Makefile:441: all-recursive] Errore 1 make[1]: uscita dalla directory ?/home/gian/gambasdevel? make: *** [Makefile:382: all] Errore 2 --------------------------------------------- Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Thu Jun 17 12:47:37 2021 From: bsteers4 at gmail.com (Bruce Steers) Date: Thu, 17 Jun 2021 11:47:37 +0100 Subject: [Gambas-user] =?utf-8?q?Compilation_error=3A_=E2=80=98KeepEmptyP?= =?utf-8?b?YXJ0c+KAmSBpcyBub3QgYSBtZW1iZXIgb2Yg4oCYUXTigJk=?= In-Reply-To: References: Message-ID: Same thing here (LinuxMint 20) Just seen the fix commit. All fixed. Cheers Ben , GL On Thu, 17 Jun 2021 at 10:45, Gianluigi wrote: > Hi Benoit, > > the terminal returns: > > /usr/lib/x86_64-linux-gnu/qt5/bin/moc -o CMouse_moc.cpp CMouse.h > CMouse.h:0: Note: No relevant classes found. No output generated. > CXX gb_qt5_la-CMouse_moc.lo > CXX gb_qt5_la-CMouse.lo > /usr/lib/x86_64-linux-gnu/qt5/bin/moc -o CKey_moc.cpp CKey.h > CKey.h:0: Note: No relevant classes found. No output generated. > CXX gb_qt5_la-CKey_moc.lo > CXX gb_qt5_la-CKey.lo > /usr/lib/x86_64-linux-gnu/qt5/bin/moc -o CColor_moc.cpp CColor.h > CColor.h:0: Note: No relevant classes found. No output generated. > CXX gb_qt5_la-CColor_moc.lo > CXX gb_qt5_la-CColor.lo > CXX gb_qt5_la-CConst.lo > /usr/lib/x86_64-linux-gnu/qt5/bin/moc -o CCheckBox_moc.cpp CCheckBox.h > CXX gb_qt5_la-CCheckBox_moc.lo > CXX gb_qt5_la-CCheckBox.lo > /usr/lib/x86_64-linux-gnu/qt5/bin/moc -o CPanel_moc.cpp CPanel.h > CPanel.h:0: Note: No relevant classes found. No output generated. > CXX gb_qt5_la-CPanel_moc.lo > CXX gb_qt5_la-CPanel.lo > /usr/lib/x86_64-linux-gnu/qt5/bin/moc -o CRadioButton_moc.cpp > CRadioButton.h > CXX gb_qt5_la-CRadioButton_moc.lo > CXX gb_qt5_la-CRadioButton.lo > /usr/lib/x86_64-linux-gnu/qt5/bin/moc -o CTextArea_moc.cpp CTextArea.h > CXX gb_qt5_la-CTextArea_moc.lo > CXX gb_qt5_la-CTextArea.lo > /usr/lib/x86_64-linux-gnu/qt5/bin/moc -o CTabStrip_moc.cpp CTabStrip.h > CXX gb_qt5_la-CTabStrip_moc.lo > CXX gb_qt5_la-CTabStrip.lo > /usr/lib/x86_64-linux-gnu/qt5/bin/moc -o CDialog_moc.cpp CDialog.h > CDialog.h:0: Note: No relevant classes found. No output generated. > CXX gb_qt5_la-CDialog_moc.lo > CXX gb_qt5_la-CDialog.lo > /usr/lib/x86_64-linux-gnu/qt5/bin/moc -o CPicture_moc.cpp CPicture.h > CPicture.h:0: Note: No relevant classes found. No output generated. > CXX gb_qt5_la-CPicture_moc.lo > CXX gb_qt5_la-CPicture.lo > /usr/lib/x86_64-linux-gnu/qt5/bin/moc -o CImage_moc.cpp CImage.h > CImage.h:0: Note: No relevant classes found. No output generated. > CXX gb_qt5_la-CImage_moc.lo > CXX gb_qt5_la-CImage.lo > /usr/lib/x86_64-linux-gnu/qt5/bin/moc -o canimation_moc.cpp canimation.h > CXX gb_qt5_la-canimation_moc.lo > CXX gb_qt5_la-canimation.lo > /usr/lib/x86_64-linux-gnu/qt5/bin/moc -o CClipboard_moc.cpp CClipboard.h > CClipboard.h:0: Note: No relevant classes found. No output generated. > CXX gb_qt5_la-CClipboard_moc.lo > CXX gb_qt5_la-CClipboard.lo > CXX gb_qt5_la-CDraw.lo > CDraw.cpp: In function ?int get_text_width(QPainter*, QString&)?: > CDraw.cpp:123:30: error: ?KeepEmptyParts? is not a member of ?Qt? > 123 | text_sl = s.split('\n', Qt::KeepEmptyParts); > | ^~~~~~~~~~~~~~ > make[5]: *** [Makefile:1114: gb_qt5_la-CDraw.lo] Errore 1 > make[5]: uscita dalla directory ?/home/gian/gambasdevel/gb.qt5/src? > make[4]: *** [Makefile:1301: all-recursive] Errore 1 > make[4]: uscita dalla directory ?/home/gian/gambasdevel/gb.qt5/src? > make[3]: *** [Makefile:467: all-recursive] Errore 1 > make[3]: uscita dalla directory ?/home/gian/gambasdevel/gb.qt5? > make[2]: *** [Makefile:399: all] Errore 2 > make[2]: uscita dalla directory ?/home/gian/gambasdevel/gb.qt5? > make[1]: *** [Makefile:441: all-recursive] Errore 1 > make[1]: uscita dalla directory ?/home/gian/gambasdevel? > make: *** [Makefile:382: all] Errore 2 > --------------------------------------------- > > Regards > Gianluigi > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dovey.john at gmail.com Thu Jun 17 15:11:40 2021 From: dovey.john at gmail.com (John Dovey) Date: Thu, 17 Jun 2021 08:11:40 -0500 Subject: [Gambas-user] Installation Problem In-Reply-To: References: Message-ID: I have no idea why it's using the server it is. All I did was to follow the instructions on http://gambaswiki.org/edit/install/ubuntu Added the PPA, ran update, did install. I am on a Linux 16 system as I noted, so I have no idea why it's trying to access a 20.04 repo. It's not a crisis for me any more because I've installed individually each package that my app complained about, so there is just enough for it to run. JD On Thu, 17 Jun 2021 at 03:49, Bruce Steers wrote: > why are you using a microsoft ubuntu server not an ubuntu one? > you are also using a focal 20.04 base when your linux is 16.04?? > > you should maybe use http://archive.ubuntu.com/ubuntu/ > and set it to xenial 16.04 > > remove entries from /etc/apt/sources.list.d and/or /etc/apt/sources.list > (or modify the lines to use the xenial info below... > > then use something like this to add the correct ones for your os (not > tested, you may need to tweak) > > sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu xenial main > restricted universe multiverse' > sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu > xenial-updates main restricted universe multiverse' > sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu > xenial-backports main restricted universe multiverse' > > sudo add-apt-repository 'deb http://security.ubuntu.com/ubuntu/ > xenial-security main restricted universe multiverse' > sudo add-apt-repository 'deb http://archive.canonical.com/ubuntu/ xenial > partner' > > BruceS > > > On Thu, 17 Jun 2021 at 05:32, John Dovey wrote: > >> Hi, >> I wanted to upgrade the version of Gambas on a Linux server. It's running >> Ubuntu (Ubuntu 16.04.7 LTS (GNU/Linux 4.4.0-210-generic x86_64) which I am >> unable to upgrade. >> >> I ran sudo apt remove gambas3, just to have it clean, then >> sudo add-apt-repository ppa:gambas-team/gambas3 >> sudo apt-get update >> sudo apt-get install gambas3 >> >> Everything goes fine, it starts downloading the packages then the >> installation aborts. Here are the last few lines: >> Need to get 511 kB/63.7 MB of archives. >> After this operation, 226 MB of additional disk space will be used. >> Do you want to continue? [Y/n] >> Err:1 https://packages.microsoft.com/ubuntu/20.04/prod focal/main amd64 >> libodbc1 >> amd64 2.3.7 >> 404 Not Found >> Unable to correct missing packages. >> E: Failed to fetch >> https://packages.microsoft.com/ubuntu/20.04/prod/pool/main/u/ >> unixodbc/libodbc1_2.3.7_amd64.deb 404 Not Found >> >> E: Aborting install. >> >> >> ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- >> > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dovey.john at gmail.com Thu Jun 17 16:46:51 2021 From: dovey.john at gmail.com (John Dovey) Date: Thu, 17 Jun 2021 09:46:51 -0500 Subject: [Gambas-user] File Format Help Message-ID: I hope no-one minds if I ask this here. I'm just really unsure how to do this best in Gambas. I want to read and write files that have a (very old) specification Essentially, it looks like this: 1. Application Layer Data Definition : a Stored Message Stored Message Offset dec hex .-----------------------------------------------. 0 0 | | ~ fromUserName ~ | 36 bytes | +-----------------------+-----------------------+ 36 24 | | ~ toUserName ~ | 36 bytes | +-----------------------+-----------------------+ 72 48 | | ~ subject ~ | 72 bytes | +-----------------------+-----------------------+ 144 90 | | ~ DateTime ~ | 20 bytes | +-----------------------+-----------------------+ 164 A4 | timesRead (low order) | timesRead (high order)| +-----------------------+-----------------------+ 166 A6 | destNode (low order) | destNode (high order) | +-----------------------+-----------------------+ 168 A8 | origNode (low order) | origNode (high order) | +-----------------------+-----------------------+ 170 AA | cost (low order) | cost (high order) | +-----------------------+-----------------------+ 172 AC | origNet (low order) | origNet (high order) | +-----------------------+-----------------------+ 174 AE | destNet (low order) | destNet (high order) | +-----------------------+-----------------------+ 176 B0 | destZone (optional) | destZone (optional) | +-----------------------+-----------------------+ 178 B2 | origZone (optional) | origZone (optional) | +-----------------------+-----------------------+ 180 B4 | destPoint(optional) | destPoint(optional) | +-----------------------+-----------------------+ 182 B6 | origPoint(optional) | origPoint(optional) | +-----------------------+-----------------------+ 184 B8 | replyTo (low order) | replyTo (high order) | +-----------------------+-----------------------+ 186 BA | Attribute (low order) | Attribute (high order)| +-----------------------+-----------------------+ 188 BC | nextReply (low order) | nextReply (high order)| +-----------------------+-----------------------+ 190 BE | text | ~ unbounded ~ | null terminated | `-----------------------------------------------' Message = fromUserName(36) (* Null terminated *) toUserName(36) (* Null terminated *) subject(72) (* see FileList below *) DateTime (* message body was last edited *) timesRead (* number of times msg has been read *) destNode (* of message *) origNode (* of message *) cost (* in lowest unit of originator's currency *) origNet (* of message *) destNet (* of message *) destZone (* of message *) origZone (* of message *) destPoint (* of message *) origPoint (* of message *) replyTo (* msg to which this replies *) AttributeWord nextReply (* msg which replies to this *) text(unbounded) (* Null terminated *) There is a sample packet you can look at if you really want to see what it looks like, but this should give you an idea: [image: image.png] I'm guessing a "Struct" of some sort? Any advice would be appreciated. John -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 41649 bytes Desc: not available URL: From dovey.john at gmail.com Thu Jun 17 18:09:18 2021 From: dovey.john at gmail.com (John Dovey) Date: Thu, 17 Jun 2021 11:09:18 -0500 Subject: [Gambas-user] File Format Help In-Reply-To: References: Message-ID: As a followup to my own message, this is what I've gotten to so far. I KNOW my struct is incorrect, but I'm not sure what it should be. For those interested, I've included a test.msg file that is maybe a better example. Public Struct myFidoMsg 'Datatype fromUserName As Byte[] '36 toUserName As Byte[] '36 subject As Byte[] '72 DateTime As Byte[] ' 20 timesRead As Integer destNode As Integer origNode As Integer cost As Integer origNet As Integer destNet As Integer destZone As Integer origZone As Integer destPoint As Integer origPoint As Integer replyTo As Integer Attribute As Integer nextReply As Integer text As String 'null terminated End Struct Sub Main() Dim hfile As File Dim FidoMsg As MyFidoMsg hfile = Open "test.msg" For Read 'Write Create FidoMsg = Read #hfile As MyFidoMsg 'Read 'Write #hfile, FidoMsg As MyFidoMsg Close #hfile end sub On Thu, 17 Jun 2021 at 09:46, John Dovey wrote: > I hope no-one minds if I ask this here. I'm just really unsure how to do > this best in Gambas. > I want to read and write files that have a (very old) specification > > Essentially, it looks like this: > > 1. Application Layer Data Definition : a Stored Message > > Stored Message > > Offset > dec hex > .-----------------------------------------------. > 0 0 | | > ~ fromUserName ~ > | 36 bytes | > +-----------------------+-----------------------+ > 36 24 | | > ~ toUserName ~ > | 36 bytes | > +-----------------------+-----------------------+ > 72 48 | | > ~ subject ~ > | 72 bytes | > +-----------------------+-----------------------+ > 144 90 | | > ~ DateTime ~ > | 20 bytes | > +-----------------------+-----------------------+ > 164 A4 | timesRead (low order) | timesRead (high order)| > +-----------------------+-----------------------+ > 166 A6 | destNode (low order) | destNode (high order) | > +-----------------------+-----------------------+ > 168 A8 | origNode (low order) | origNode (high order) | > +-----------------------+-----------------------+ > 170 AA | cost (low order) | cost (high order) | > +-----------------------+-----------------------+ > 172 AC | origNet (low order) | origNet (high order) | > +-----------------------+-----------------------+ > 174 AE | destNet (low order) | destNet (high order) | > +-----------------------+-----------------------+ > 176 B0 | destZone (optional) | destZone (optional) | > +-----------------------+-----------------------+ > 178 B2 | origZone (optional) | origZone (optional) | > +-----------------------+-----------------------+ > 180 B4 | destPoint(optional) | destPoint(optional) | > +-----------------------+-----------------------+ > 182 B6 | origPoint(optional) | origPoint(optional) | > +-----------------------+-----------------------+ > 184 B8 | replyTo (low order) | replyTo (high order) | > +-----------------------+-----------------------+ > 186 BA | Attribute (low order) | Attribute (high order)| > +-----------------------+-----------------------+ > 188 BC | nextReply (low order) | nextReply (high order)| > +-----------------------+-----------------------+ > 190 BE | text | > ~ unbounded ~ > | null terminated | > `-----------------------------------------------' > > Message = fromUserName(36) (* Null terminated *) > toUserName(36) (* Null terminated *) > subject(72) (* see FileList below *) > DateTime (* message body was last edited *) > timesRead (* number of times msg has been read *) > destNode (* of message *) > origNode (* of message *) > cost (* in lowest unit of originator's > currency *) > origNet (* of message *) > destNet (* of message *) > destZone (* of message *) > origZone (* of message *) > destPoint (* of message *) > origPoint (* of message *) > replyTo (* msg to which this replies *) > AttributeWord > nextReply (* msg which replies to this *) > text(unbounded) (* Null terminated *) > > There is a sample packet you can look at if you really want to see what it looks like, but this should give you an idea: > > [image: image.png] > > > I'm guessing a "Struct" of some sort? > > Any advice would be appreciated. > > > John > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 41649 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: test.msg Type: application/octet-stream Size: 523 bytes Desc: not available URL: From dovey.john at gmail.com Thu Jun 17 19:51:08 2021 From: dovey.john at gmail.com (John Dovey) Date: Thu, 17 Jun 2021 12:51:08 -0500 Subject: [Gambas-user] File Format Help In-Reply-To: References: Message-ID: Replying to myself again. I've now progressed this far. Am I on the right track? Sub Main() '' FidoMsg Dim FM_fromUserName As String '36 Dim FM_toUserName As String '36 Dim FM_subject As String '72 Dim FM_DateTime As String ' 20 Dim FM_timesRead As Short Dim FM_destNode As Short Dim FM_origNode As Short Dim FM_cost As Short Dim FM_origNet As Short Dim FM_destNet As Short Dim FM_destZone As Short Dim FM_origZone As Short Dim FM_destPoint As Short Dim FM_origPoint As Short Dim FM_replyTo As Short Dim FM_Attribute As Short Dim FM_nextReply As Short Dim FM_text As String 'null terminated ' 1) Numeric elements (bytes, byte-arrays, shorts, integers, longs) can be Read directly From the stream.ie(4 byte Integer) = Read #Stream As Integer. Gambas can handle little endian / big endian issues. ' 2)Fixed length strings must be handled In a two stage process. ' First, the required string length number Of bytes Is Read Into a byte array. This byte array Is Then converted To a string. 'Sample code: Dim hfile As File hfile = Open "test.msg" For Read 'Write Create ''Test Dim Bytes As New Byte[36] Bytes.Read(hfile) FM_fromUserName = Bytes.ToString() Bytes.Read(hfile) FM_toUserName = bytes.ToString() Dim Bytes2 As New Byte[72] Bytes2.Read(hfile) FM_subject = Bytes2.ToString() Dim Bytes3 As New Byte[20] Bytes3.Read(hfile) FM_DateTime = Bytes3.ToString() FM_timesRead = Read #hfile As Short FM_destNode = Read #hfile As Short FM_origNode = Read #hfile As Short FM_cost = Read #hfile As Short FM_origNet = Read #hfile As Short FM_destNet = Read #hfile As Short FM_destZone = Read #hfile As Short FM_origZone = Read #hfile As Short FM_destPoint = Read #hfile As Short FM_origPoint = Read #hfile As Short FM_replyTo = Read #hfile As Short FM_Attribute = Read #hfile As Short FM_nextReply = Read #hfile As Short FM_text = Read #hfile As String '' End Test 'FidoMsg = Read #hfile As MyFidoMsg 'Write #hfile, FidoMsg As MyFidoMsg Close #hfile End Sub On Thu, 17 Jun 2021 at 11:09, John Dovey wrote: > As a followup to my own message, this is what I've gotten to so far. I > KNOW my struct is incorrect, but I'm not sure what it should be. For those > interested, I've included a test.msg file that is maybe a better example. > > Public Struct myFidoMsg 'Datatype > fromUserName As Byte[] '36 > toUserName As Byte[] '36 > subject As Byte[] '72 > DateTime As Byte[] ' 20 > timesRead As Integer > destNode As Integer > origNode As Integer > cost As Integer > origNet As Integer > destNet As Integer > destZone As Integer > origZone As Integer > destPoint As Integer > origPoint As Integer > replyTo As Integer > Attribute As Integer > nextReply As Integer > text As String 'null terminated > End Struct > > Sub Main() > > Dim hfile As File > Dim FidoMsg As MyFidoMsg > > hfile = Open "test.msg" For Read 'Write Create > FidoMsg = Read #hfile As MyFidoMsg > 'Read > 'Write #hfile, FidoMsg As MyFidoMsg > Close #hfile > end sub > > On Thu, 17 Jun 2021 at 09:46, John Dovey wrote: > >> I hope no-one minds if I ask this here. I'm just really unsure how to do >> this best in Gambas. >> I want to read and write files that have a (very old) specification >> >> Essentially, it looks like this: >> >> 1. Application Layer Data Definition : a Stored Message >> >> Stored Message >> >> Offset >> dec hex >> .-----------------------------------------------. >> 0 0 | | >> ~ fromUserName ~ >> | 36 bytes | >> +-----------------------+-----------------------+ >> 36 24 | | >> ~ toUserName ~ >> | 36 bytes | >> +-----------------------+-----------------------+ >> 72 48 | | >> ~ subject ~ >> | 72 bytes | >> +-----------------------+-----------------------+ >> 144 90 | | >> ~ DateTime ~ >> | 20 bytes | >> +-----------------------+-----------------------+ >> 164 A4 | timesRead (low order) | timesRead (high order)| >> +-----------------------+-----------------------+ >> 166 A6 | destNode (low order) | destNode (high order) | >> +-----------------------+-----------------------+ >> 168 A8 | origNode (low order) | origNode (high order) | >> +-----------------------+-----------------------+ >> 170 AA | cost (low order) | cost (high order) | >> +-----------------------+-----------------------+ >> 172 AC | origNet (low order) | origNet (high order) | >> +-----------------------+-----------------------+ >> 174 AE | destNet (low order) | destNet (high order) | >> +-----------------------+-----------------------+ >> 176 B0 | destZone (optional) | destZone (optional) | >> +-----------------------+-----------------------+ >> 178 B2 | origZone (optional) | origZone (optional) | >> +-----------------------+-----------------------+ >> 180 B4 | destPoint(optional) | destPoint(optional) | >> +-----------------------+-----------------------+ >> 182 B6 | origPoint(optional) | origPoint(optional) | >> +-----------------------+-----------------------+ >> 184 B8 | replyTo (low order) | replyTo (high order) | >> +-----------------------+-----------------------+ >> 186 BA | Attribute (low order) | Attribute (high order)| >> +-----------------------+-----------------------+ >> 188 BC | nextReply (low order) | nextReply (high order)| >> +-----------------------+-----------------------+ >> 190 BE | text | >> ~ unbounded ~ >> | null terminated | >> `-----------------------------------------------' >> >> Message = fromUserName(36) (* Null terminated *) >> toUserName(36) (* Null terminated *) >> subject(72) (* see FileList below *) >> DateTime (* message body was last edited *) >> timesRead (* number of times msg has been read *) >> destNode (* of message *) >> origNode (* of message *) >> cost (* in lowest unit of originator's >> currency *) >> origNet (* of message *) >> destNet (* of message *) >> destZone (* of message *) >> origZone (* of message *) >> destPoint (* of message *) >> origPoint (* of message *) >> replyTo (* msg to which this replies *) >> AttributeWord >> nextReply (* msg which replies to this *) >> text(unbounded) (* Null terminated *) >> >> There is a sample packet you can look at if you really want to see what it looks like, but this should give you an idea: >> >> [image: image.png] >> >> >> I'm guessing a "Struct" of some sort? >> >> Any advice would be appreciated. >> >> >> John >> >> >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 41649 bytes Desc: not available URL: From adamnt42 at gmail.com Thu Jun 17 20:02:33 2021 From: adamnt42 at gmail.com (bb) Date: Fri, 18 Jun 2021 03:32:33 +0930 Subject: [Gambas-user] File Format Help In-Reply-To: References: Message-ID: <0d455ff7606a3680a20c3e13dcc7948a8b7fd25e.camel@gmail.com> On Thu, 2021-06-17 at 12:51 -0500, John Dovey wrote: > Replying to myself again. > I've now progressed this far. Am I on the right track? > > Sub Main() > '' FidoMsg > > Dim FM_fromUserName As String '36 > Dim FM_toUserName As String '36 > Dim FM_subject As String '72 > Dim FM_DateTime As String ' 20 > Dim FM_timesRead As Short > Dim FM_destNode As Short > Dim FM_origNode As Short > Dim FM_cost As Short > Dim FM_origNet As Short > Dim FM_destNet As Short > Dim FM_destZone As Short > Dim FM_origZone As Short > Dim FM_destPoint As Short > Dim FM_origPoint As Short > Dim FM_replyTo As Short > Dim FM_Attribute As Short > Dim FM_nextReply As Short > Dim FM_text As String 'null terminated > ' 1) Numeric elements (bytes, byte-arrays, shorts, integers, > longs) can be Read directly From the stream.ie(4 byte Integer) = Read > #Stream As Integer. Gambas can handle little endian / big endian > issues. > ' 2)Fixed length strings must be handled In a two stage process. > ' First, the required string length number Of bytes Is Read Into > a byte array. This byte array Is Then converted To a string. > 'Sample code: > > Dim hfile As File > > hfile = Open "test.msg" For Read 'Write Create > ''Test > Dim Bytes As New Byte[36] > Bytes.Read(hfile) > FM_fromUserName = Bytes.ToString() > Bytes.Read(hfile) > FM_toUserName = bytes.ToString() > Dim Bytes2 As New Byte[72] > Bytes2.Read(hfile) > FM_subject = Bytes2.ToString() > Dim Bytes3 As New Byte[20] > Bytes3.Read(hfile) > FM_DateTime = Bytes3.ToString() > FM_timesRead = Read #hfile As Short > FM_destNode = Read #hfile As Short > FM_origNode = Read #hfile As Short > FM_cost = Read #hfile As Short > FM_origNet = Read #hfile As Short > FM_destNet = Read #hfile As Short > FM_destZone = Read #hfile As Short > FM_origZone = Read #hfile As Short > FM_destPoint = Read #hfile As Short > FM_origPoint = Read #hfile As Short > FM_replyTo = Read #hfile As Short > FM_Attribute = Read #hfile As Short > FM_nextReply = Read #hfile As Short > FM_text = Read #hfile As String > '' End Test > 'FidoMsg = Read #hfile As MyFidoMsg > 'Write #hfile, FidoMsg As MyFidoMsg > Close #hfile > End Sub > > On Thu, 17 Jun 2021 at 11:09, John Dovey > wrote: > > As a followup to my own message, this is what I've gotten to so > > far. I KNOW my struct is incorrect, but I'm not sure what it should > > be. For those interested, I've included a test.msg file that is > > maybe a better example. > > > > Public Struct myFidoMsg 'Datatype > > fromUserName As Byte[] '36 > > toUserName As Byte[] '36 > > subject As Byte[] '72 > > DateTime As Byte[] ' 20 > > timesRead As Integer > > destNode As Integer > > origNode As Integer > > cost As Integer > > origNet As Integer > > destNet As Integer > > destZone As Integer > > origZone As Integer > > destPoint As Integer > > origPoint As Integer > > replyTo As Integer > > Attribute As Integer > > nextReply As Integer > > text As String 'null terminated > > End Struct > > > > Sub Main() > > > > Dim hfile As File > > Dim FidoMsg As MyFidoMsg > > > > hfile = Open "test.msg" For Read 'Write Create > > FidoMsg = Read #hfile As MyFidoMsg > > 'Read > > 'Write #hfile, FidoMsg As MyFidoMsg > > Close #hfile > > end sub > > > > On Thu, 17 Jun 2021 at 09:46, John Dovey > > wrote: > > > I hope no-one minds if I ask this here. I'm just really unsure > > > how to do this best in Gambas. > > > I want to read and write files that have a (very old) > > > specification > > > Essentially, it looks like this: > > > 1. Application Layer Data Definition : a Stored Message > > > > > > Stored Message > > > > > > Offset > > > dec hex > > > .-----------------------------------------------. > > > 0 0 | | > > > ~ fromUserName ~ > > > | 36 bytes | > > > +-----------------------+-----------------------+ > > > 36 24 | | > > > ~ toUserName ~ > > > | 36 bytes | > > > +-----------------------+-----------------------+ > > > 72 48 | | > > > ~ subject ~ > > > | 72 bytes | > > > +-----------------------+-----------------------+ > > > 144 90 | | > > > ~ DateTime ~ > > > | 20 bytes | > > > +-----------------------+-----------------------+ > > > 164 A4 | timesRead (low order) | timesRead (high order)| > > > +-----------------------+-----------------------+ > > > 166 A6 | destNode (low order) | destNode (high order) | > > > +-----------------------+-----------------------+ > > > 168 A8 | origNode (low order) | origNode (high order) | > > > +-----------------------+-----------------------+ > > > 170 AA | cost (low order) | cost (high order) | > > > +-----------------------+-----------------------+ > > > 172 AC | origNet (low order) | origNet (high order) | > > > +-----------------------+-----------------------+ > > > 174 AE | destNet (low order) | destNet (high order) | > > > +-----------------------+-----------------------+ > > > 176 B0 | destZone (optional) | destZone (optional) | > > > +-----------------------+-----------------------+ > > > 178 B2 | origZone (optional) | origZone (optional) | > > > +-----------------------+-----------------------+ > > > 180 B4 | destPoint(optional) | destPoint(optional) | > > > +-----------------------+-----------------------+ > > > 182 B6 | origPoint(optional) | origPoint(optional) | > > > +-----------------------+-----------------------+ > > > 184 B8 | replyTo (low order) | replyTo (high order) | > > > +-----------------------+-----------------------+ > > > 186 BA | Attribute (low order) | Attribute (high order)| > > > +-----------------------+-----------------------+ > > > 188 BC | nextReply (low order) | nextReply (high order)| > > > +-----------------------+-----------------------+ > > > 190 BE | text | > > > ~ unbounded ~ > > > | null terminated | > > > `-----------------------------------------------' > > > > > > Message = fromUserName(36) (* Null terminated *) > > > toUserName(36) (* Null terminated *) > > > subject(72) (* see FileList below *) > > > DateTime (* message body was last > > > edited *) > > > timesRead (* number of times msg has > > > been read *) > > > destNode (* of message *) > > > origNode (* of message *) > > > cost (* in lowest unit of > > > originator's > > > currency *) > > > origNet (* of message *) > > > destNet (* of message *) > > > destZone (* of message *) > > > origZone (* of message *) > > > destPoint (* of message *) > > > origPoint (* of message *) > > > replyTo (* msg to which this replies > > > *) > > > AttributeWord > > > nextReply (* msg which replies to this > > > *) > > > text(unbounded) (* Null terminated *) > > > There is a sample packet you can look at if you really want to > > > see what it looks like, but this should give you an idea: > > > > > > > > > I'm guessing a "Struct" of some sort? > > > Any advice would be appreciated. > > > > > > John > > > Compartmentalize! Compartmentalize! Compartmentalize! After quickly scanning through that spec, if it were I I'd be immediately looking to build a set of classes that implement each structure as a separate class exposing the data as properties and containing at least methods to read and parse the object. Some inheritance looks possible e.g. message & compressed message (but I haven't read it too closely. These types of parser classes and structures (concepts not "structs"!) we use very commonly for data scraping applications. At least you have a well-formed data specification! :-) b From chrisml at deganius.de Thu Jun 17 20:09:27 2021 From: chrisml at deganius.de (Christof Thalhofer) Date: Thu, 17 Jun 2021 20:09:27 +0200 Subject: [Gambas-user] File Format Help In-Reply-To: References: Message-ID: <6ea51181-71a1-2916-4fcc-6061eb25e215@deganius.de> Am 17.06.21 um 16:46 schrieb John Dovey: > I hope no-one minds if I ask this here. I'm just really unsure how to do > this best in Gambas.? > I want to read and write files that have a (very old) specification > > Essentially, it looks like this: > > 1. Application Layer Data Definition : a Stored Message > > Stored Message > > Offset > dec hex > .-----------------------------------------------. > 0 0 | | > ~ fromUserName ~ > | 36 bytes | > +-----------------------+-----------------------+ > 36 24 | | > ~ toUserName ~ > | 36 bytes | > +-----------------------+-----------------------+ > I'm guessing a "Struct" of some sort? > > Any advice would be appreciated. I would create a class for that with r/w properties that can be written and controls the length when the Value is written. ----------------------------------------------------------------- ' Gambas class file '' From User (max 36 Byte) Property fromUserName As String Private $fromUserName As String '' To User (max 36 Byte) Property toUserName As String Private $toUserName As String ' -------------------------- Getter/Setter Private Function fromUserName_Read() As String Return $fromUserName End Private Sub fromUserName_Write(Value As String) TestSize(Value, 36) $fromUserName = Value End Private Function toUserName_Read() As String Return $toUserName End Private Sub toUserName_Write(Value As String) TestSize(Value, 36) $toUserName = Value End Private Sub TestSize(Value As String, Size As Integer) If Len(Value) > Size Then Error.Raise("Size of string " & Value & " too large. Must not exceed " & Size) Endif End Public Function Get() As String Return fromUserName & gb.lf & toUserName '... and so on End ----------------------------------------------------------------- Alles Gute Christof Thalhofer -- Dies ist keine Signatur From chrisml at deganius.de Thu Jun 17 20:18:51 2021 From: chrisml at deganius.de (Christof Thalhofer) Date: Thu, 17 Jun 2021 20:18:51 +0200 Subject: [Gambas-user] File Format Help In-Reply-To: <6ea51181-71a1-2916-4fcc-6061eb25e215@deganius.de> References: <6ea51181-71a1-2916-4fcc-6061eb25e215@deganius.de> Message-ID: Am 17.06.21 um 20:09 schrieb Christof Thalhofer: > Public Function Get() As String > > Return fromUserName & gb.lf & toUserName '... and so on > > End Does not work, this is correct: ---------------------------------------------------------------- Public Function Get() As String Return Me.fromUserName & gb.lf & Me.toUserName '... and so on End ----------------------------------------------------------------- Sorry, I also forgot the Usage: ----------------------------------------------------------------- Public Sub Main() Dim FMessage As New CFidoMessage With FMessage .fromUserName = "Albert" .toUserName = "Nils" End With File.Save("/tmp/1.msg", FMessage.Get()) End ----------------------------------------------------------------- Alles Gute Christof Thalhofer -- Dies ist keine Signatur From adamnt42 at gmail.com Thu Jun 17 20:25:11 2021 From: adamnt42 at gmail.com (bb) Date: Fri, 18 Jun 2021 03:55:11 +0930 Subject: [Gambas-user] File Format Help In-Reply-To: References: <6ea51181-71a1-2916-4fcc-6061eb25e215@deganius.de> Message-ID: <8f8a9aac4048b13e41bd220ddc5a80846b9aa439.camel@gmail.com> On Thu, 2021-06-17 at 20:18 +0200, Christof Thalhofer wrote: > Am 17.06.21 um 20:09 schrieb Christof Thalhofer: > > > Public Function Get() As String > > > > Return fromUserName & gb.lf & toUserName '... and so on > > > > End > > Does not work, this is correct: > > ---------------------------------------------------------------- > > Public Function Get() As String > > Return Me.fromUserName & gb.lf & Me.toUserName '... and so on > > End > Return $fromUserName & gb.lf & $toUserName '... and so on Surely if you define state variables then you may as well use them. b From g4mba5 at gmail.com Thu Jun 17 22:05:07 2021 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Thu, 17 Jun 2021 22:05:07 +0200 Subject: [Gambas-user] File Format Help In-Reply-To: References: Message-ID: <5fd925fc-c88e-2749-540d-c63bcc61da3e@gmail.com> Le 17/06/2021 ? 16:46, John Dovey a ?crit?: > I hope no-one minds if I ask this here. I'm just really unsure how to do > this best in Gambas. > I want to read and write files that have a (very old) specification > > Essentially, it looks like this: > > [...] Hi, 1) The safest way of reading such file format is opening the file and use the READ instruction to read exactly the number of bytes you need for each format element. 2) A more elegant way is declaring a structure like you did so that you can read the file format in one shot, -but- you *must* understand how Gambas datatypes work then! Read carefully the READ help page, and understand that: - You can't use a Gambas string for reading a fixed size string, that is actually an array of bytes. Once you have an array of bytes, you can transform it into a string. - You can't use a Gambas array for reading an array of native datatypes. You have to use embedded arrays (see the documentation page about arrays, and the one about structures). Note that if you use the method 1), the READ instruction has a special syntax for directly reading a specific number of bytes and transform them into a Gambas string. Use either method 1) or 2), depending on what you prefer. Regards, -- Beno?t Minisini From chrisml at deganius.de Thu Jun 17 22:10:19 2021 From: chrisml at deganius.de (Christof Thalhofer) Date: Thu, 17 Jun 2021 22:10:19 +0200 Subject: [Gambas-user] File Format Help In-Reply-To: <8f8a9aac4048b13e41bd220ddc5a80846b9aa439.camel@gmail.com> References: <6ea51181-71a1-2916-4fcc-6061eb25e215@deganius.de> <8f8a9aac4048b13e41bd220ddc5a80846b9aa439.camel@gmail.com> Message-ID: Am 17.06.21 um 20:25 schrieb bb: > Return $fromUserName & gb.lf & $toUserName '... and so on > Surely if you define state variables then you may as well use them. Yapp. Using properties has the disadvantage that it is a bit slower and the advantage that you can possibly do something with the content of the variables at the output, e.g. checks or trim or something. But i agree, your solution is simpler and intuitive. Alles Gute Christof Thalhofer -- Dies ist keine Signatur From g4mba5 at gmail.com Thu Jun 17 22:15:08 2021 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Thu, 17 Jun 2021 22:15:08 +0200 Subject: [Gambas-user] [CRASH REPORT] In-Reply-To: <6956b4b802375e42134e27696054dac4a426d718.camel@orange.fr> References: <6956b4b802375e42134e27696054dac4a426d718.camel@orange.fr> Message-ID: Le 15/06/2021 ? 10:06, CD a ?crit?: > Hello, > > Damned, my program crashed Gambas that way : > > Component : gb.qt5 > Class : Image > Instructions : > Dim clsClass As Class > Dim strSymbols As New String[] > > For Each clsClass In Classes????????????????????????????'Browse all > loaded classes > ??? If clsClass.Name = "Image" Then > ????????????????If clsClass.Symbols.Count > 0 Then > ????????????????????????strSymbols = clsClass.Symbols???'Crash Erreur > de segmentation (11) > .../... I can't reproduce the crash. Please always post a full project that reproduces the bug or the crash, with your system information! Regards, -- Beno?t Minisini From adamnt42 at gmail.com Thu Jun 17 22:30:47 2021 From: adamnt42 at gmail.com (bb) Date: Fri, 18 Jun 2021 06:00:47 +0930 Subject: [Gambas-user] File Format Help In-Reply-To: References: Message-ID: <972cb7189d018510e994960a2e5aae24739254b3.camel@gmail.com> On Thu, 2021-06-17 at 12:51 -0500, John Dovey wrote: > Replying to myself again. > I've now progressed this far. Am I on the right track? > [...] > (Too much rain falling to sleep.) OK, I have read that spec and I think the first thing you may have to do is read from the "Packed Message" classifier rather than the "Stored Message" classifier. Packed Message is the specification defined Presentation Layer structure. So called Fidonet "nodes" transmit and receive messages in that structure. Stored Message is an "example" of how your local Application could structure a message object. As the spec says "Perfectly valid FidoNet systems may be implemented whose stored messages differ greatly from this format." b From tercoide at hotmail.com Fri Jun 18 02:49:56 2021 From: tercoide at hotmail.com (martin cristia) Date: Thu, 17 Jun 2021 21:49:56 -0300 Subject: [Gambas-user] OpenGL problem In-Reply-To: References: Message-ID: This is happening after upgrading to Ubuntu 21.04... A simple application with a Form and a GLArea with this code Public Sub form_Open() ? gl.Viewport(0, 0, GLArea1.w, GLArea1.h) ? Print gl.GetString(gl.VERSION) End Gives "Unknown name" error. # Gambas Project File 3.0 Title=Otro test de OpenGL con QT5 Startup=FMain Version=0.0.3 Component=gb.image Component=gb.qt5 Component=gb.form Component=gb.qt5.opengl Component=gb.opengl Component=gb.opengl.glsl Component=gb.opengl.glu TabSize=2 Language=en_US Warnings=0 Packager=1 [System] Gambas=3.16.90 OperatingSystem=Linux Kernel=5.11.0-18-generic Architecture=x86_64 Distribution=Ubuntu 21.04 Desktop=UBUNTU:GNOME Font=Ubuntu,11 Scale=8 Theme=yaru Language=es_AR.UTF-8 Memory=11847M [Libraries] Cairo=libcairo.so.2.11600.0 Curl=libcurl.so.4.7.0 DBus=libdbus-1.so.3.19.13 GDK2=libgdk-x11-2.0.so.0.2400.33 GDK3=libgdk-3.so.0.2404.21 GStreamer=libgstreamer-1.0.so.0.1804.0 GTK+2=libgtk-x11-2.0.so.0.2400.33 GTK+3=libgtk-3.so.0.2404.21 OpenGL=libGL.so.1.7.0 Poppler=libpoppler.so.102.0.0 Poppler=libpoppler.so.107.0.0 QT5=libQt5Core.so.5.15.2 SDL=libSDL-1.2.so.0.11.4 SQLite=libsqlite3.so.0.8.6 [Environment] DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus DESKTOP_SESSION=ubuntu DISPLAY=:0 EDITOR=gedit GB_GUI=gb.gtk3 GDMSESSION=ubuntu GIO_LAUNCHED_DESKTOP_FILE=/usr/share/applications/gambas3.desktop GIO_LAUNCHED_DESKTOP_FILE_PID=4146 GJS_DEBUG_OUTPUT=stderr GJS_DEBUG_TOPICS=JS ERROR;JS LOG GNOME_DESKTOP_SESSION_ID=this-is-deprecated GNOME_SETUP_DISPLAY=:1 GNOME_SHELL_SESSION_MODE=ubuntu GTK_MODULES=gail:atk-bridge HOME= IM_CONFIG_PHASE=1 INVOCATION_ID=5fbdaba4ba304125923a8fdee9632aed JOURNAL_STREAM=8:28122 LANG=es_AR.UTF-8 LANGUAGE=es_AR.UTF-8 LC_ALL=es_AR.UTF-8 LOGNAME= MANAGERPID=938 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin PWD= QT_ACCESSIBILITY=1 QT_IM_MODULE=ibus QT_LOGGING_RULES=*.debug=false SESSION_MANAGER=local/:@/tmp/.ICE-unix/1095,unix/:/tmp/.ICE-unix/1095 SHELL=/bin/bash SHLVL=0 SSH_AGENT_LAUNCHER=gnome-keyring SSH_AUTH_SOCK=/run/user/1000/keyring/ssh TZ=:/etc/localtime USER= USERNAME= WAYLAND_DISPLAY=wayland-0 XAUTHORITY=/run/user/1000/.mutter-Xwaylandauth.EWX440 XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg XDG_CURRENT_DESKTOP=ubuntu:GNOME XDG_DATA_DIRS=/usr/share/ubuntu:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop XDG_MENU_PREFIX=gnome- XDG_RUNTIME_DIR=/run/user/1000 XDG_SESSION_CLASS=user XDG_SESSION_DESKTOP=ubuntu XDG_SESSION_TYPE=wayland XMODIFIERS=@im=ibus _=/usr/bin/gnome-session From claude.dessere at orange.fr Fri Jun 18 21:04:34 2021 From: claude.dessere at orange.fr (CD) Date: Fri, 18 Jun 2021 21:04:34 +0200 Subject: [Gambas-user] [CRASH REPORT] In-Reply-To: References: Message-ID: <606aa465089793114daf256ad1faf74876ca87b9.camel@orange.fr> Le jeudi 17 juin 2021 ? 22:15 +0200, Beno?t Minisini a ?crit : > Le 15/06/2021 ? 10:06, CD a ?crit : > > Hello, > > Damned, my program crashed Gambas that way : > > Component : gb.qt5Class : ImageInstructions :Dim clsClass As ClassDim > > strSymbols As New String[] > > For Each clsClass In Classes 'Browse all loaded > > classes If clsClass.Name = "Image" Then If > > clsClass.Symbols.Count > 0 Then strSymbols = > > clsClass.Symbols 'Crash Erreur de segmentation (11).../... > > I can't reproduce the crash. Please always post a full project that reproduces > the bug or the crash, with your system information! > Regards, Thank you for your reply I made numerous modifications in my code and the crash does not occur again! Well rated for the test project. Regards. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jussi.lahtinen at gmail.com Fri Jun 18 22:31:15 2021 From: jussi.lahtinen at gmail.com (Jussi Lahtinen) Date: Fri, 18 Jun 2021 23:31:15 +0300 Subject: [Gambas-user] [CRASH REPORT] In-Reply-To: <606aa465089793114daf256ad1faf74876ca87b9.camel@orange.fr> References: <606aa465089793114daf256ad1faf74876ca87b9.camel@orange.fr> Message-ID: > > Thank you for your reply > I made numerous modifications in my code and the crash does not occur > again! > Well rated for the test project. > Now the bug is left without a fix. Can you try to repeat it in an isolated project? Jussi -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Sat Jun 19 17:32:56 2021 From: bsteers4 at gmail.com (Bruce Steers) Date: Sat, 19 Jun 2021 16:32:56 +0100 Subject: [Gambas-user] New offline help search panel (Thanks you Benoit) Message-ID: A million thanks for making an offline help search feature Ben. A sorely missed feature. and a much appreciated addition :) You sir are a star :) BruceS -------------- next part -------------- An HTML attachment was scrubbed... URL: From claude.dessere at orange.fr Sat Jun 19 18:28:46 2021 From: claude.dessere at orange.fr (CD) Date: Sat, 19 Jun 2021 18:28:46 +0200 Subject: [Gambas-user] [CRASH REPORT] (Jussi Lahtinen) TestImageQT5 Message-ID: Le samedi 19 juin 2021 ? 12:12 +0200, user-request at lists.gambas-basic.org a ?crit : > Send User mailing list submissions to user at lists.gambas-basic.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://lists.gambas-basic.org/listinfo/user > or, via email, send a message with subject or body 'help' to > user-request at lists.gambas-basic.org > > You can reach the person managing the list at > user-owner at lists.gambas-basic.org > > When replying, please edit your Subject line so it is more specificthan "Re: > Contents of User digest..."Today's Topics: > 1. Re: [CRASH REPORT] (CD) 2. Re: [CRASH REPORT] (Jussi Lahtinen)----[ > Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > Thank you for your reply > I made numerous modifications in my code and the crash does not occur again! > Well rated for the test project. Now the bug is left without a fix. Can you try to repeat it in an isolated project? Jussi yes I do it I write a browser of Gambas3 Components/Classes /Symbols. I extracted the code that reproduces the crash [System] Gambas=3.16.1 OperatingSystem=Linux Kernel=5.4.0-74-generic Architecture=x86_64 Distribution=Ubuntu 20.04.2 LTS Desktop=MATE Font=Ubuntu,11 Scale=8 Theme=blackmate Language=fr_FR.UTF-8 Memory=7838M [Libraries] Cairo=libcairo.so.2.11600.0 Curl=libcurl.so.4.6.0 DBus=libdbus-1.so.3.19.11 GDK2=libgdk-x11-2.0.so.0.2400.32 GDK3=libgdk-3.so.0.2404.16 GStreamer=libgstreamer-1.0.so.0.1602.0 GTK+2=libgtk-x11-2.0.so.0.2400.32 GTK+3=libgtk-3.so.0.2404.16 OpenGL=libGL.so.1.7.0 Poppler=libpoppler.so.73.0.0 Poppler=libpoppler.so.97.0.0 QT5=libQt5Core.so.5.12.8 SDL=libSDL-1.2.so.0.11.4 SQLite=libsqlite3.so.0.8.6 [Environment] COMPIZ_CONFIG_PROFILE=mate DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus DEFAULTS_PATH=/usr/share/gconf/mate.default.path DESKTOP_SESSION=mate DISPLAY=:0 GB_GUI=gb.gtk3 GDMSESSION=mate GDM_LANG=fr_FR GIO_LAUNCHED_DESKTOP_FILE=/Bureau/gambas3.desktop GIO_LAUNCHED_DESKTOP_FILE_PID=299270 GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1 GTK_MODULES=appmenu-gtk-module:gail:atk-bridge:canberra-gtk-module GTK_OVERLAY_SCROLLING=0 HOME= INSIDE_CAJA_PYTHON= LANG=fr_FR.UTF-8 LANGUAGE=fr_FR.UTF-8 LC_ADDRESS=fr_FR.UTF-8 LC_ALL=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/mate.mandatory.path MATE_DESKTOP_SESSION_ID=this-is-deprecated PAPERSIZE=a4 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/us r/local/games:/snap/bin PWD= QT_ACCESSIBILITY=1 QT_AUTO_SCREEN_SCALE_FACTOR=0 QT_LOGGING_RULES=*.debug=false QT_QPA_PLATFORMTHEME=gtk2 QT_SCALE_FACTOR=1 SESSION_MANAGER=local/:@/tmp/.ICE-unix/1597,unix/:/tmp/.ICE- unix/1597 SHELL=/bin/bash SHLVL=0 SSH_AGENT_PID=1657 SSH_AUTH_SOCK=/run/user/1000/keyring/ssh TZ=:/etc/localtime UBUNTU_MENUPROXY=1 USER= XAUTHORITY=/.Xauthority XDG_CONFIG_DIRS=/etc/xdg/xdg-mate:/etc/xdg XDG_CURRENT_DESKTOP=MATE XDG_DATA_DIRS=/usr/share/mate:/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_CLASS=user XDG_SESSION_DESKTOP=mate XDG_SESSION_ID=c2 XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0 XDG_SESSION_TYPE=x11 XDG_VTNR=7 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: TestImageQT5-0.0.1.tar.gz Type: application/x-compressed-tar Size: 12933 bytes Desc: not available URL: From jussi.lahtinen at gmail.com Sat Jun 19 19:51:04 2021 From: jussi.lahtinen at gmail.com (Jussi Lahtinen) Date: Sat, 19 Jun 2021 20:51:04 +0300 Subject: [Gambas-user] [CRASH REPORT] (Jussi Lahtinen) TestImageQT5 In-Reply-To: References: Message-ID: It doesn't crash on Linux Mint 20. At least with the dev version. Can someone else try? Jussi On Sat, Jun 19, 2021 at 7:28 PM CD wrote: > Le samedi 19 juin 2021 ? 12:12 +0200, user-request at lists.gambas-basic.org > a ?crit : > > Send User mailing list submissions to > > user at lists.gambas-basic.org > > > > To subscribe or unsubscribe via the World Wide Web, visit > > http://lists.gambas-basic.org/listinfo/user > > > or, via email, send a message with subject or body 'help' to > > user-request at lists.gambas-basic.org > > > > You can reach the person managing the list at > > user-owner at lists.gambas-basic.org > > > > When replying, please edit your Subject line so it is more specific > > than "Re: Contents of User digest..." > > Today's Topics: > > > 1. Re: [CRASH REPORT] (CD) > > 2. Re: [CRASH REPORT] (Jussi Lahtinen) > > ----[ Gambas mailing-list is hosted by > > > > https://www.hostsharing.net > > ]---- > > > > Thank you for your reply >> I made numerous modifications in my code and the crash does not occur >> again! >> Well rated for the test project. >> > > Now the bug is left without a fix. Can you try to repeat it in an isolated > project? > > > Jussi > > > yes I do it > I write a browser of Gambas3 Components/Classes /Symbols. > I extracted the code that reproduces the crash > > > [System] > Gambas=3.16.1 > OperatingSystem=Linux > Kernel=5.4.0-74-generic > Architecture=x86_64 > Distribution=Ubuntu 20.04.2 LTS > Desktop=MATE > Font=Ubuntu,11 > Scale=8 > Theme=blackmate > Language=fr_FR.UTF-8 > Memory=7838M > > [Libraries] > Cairo=libcairo.so.2.11600.0 > Curl=libcurl.so.4.6.0 > DBus=libdbus-1.so.3.19.11 > GDK2=libgdk-x11-2.0.so.0.2400.32 > GDK3=libgdk-3.so.0.2404.16 > GStreamer=libgstreamer-1.0.so.0.1602.0 > GTK+2=libgtk-x11-2.0.so.0.2400.32 > GTK+3=libgtk-3.so.0.2404.16 > OpenGL=libGL.so.1.7.0 > Poppler=libpoppler.so.73.0.0 > Poppler=libpoppler.so.97.0.0 > QT5=libQt5Core.so.5.12.8 > SDL=libSDL-1.2.so.0.11.4 > SQLite=libsqlite3.so.0.8.6 > > [Environment] > COMPIZ_CONFIG_PROFILE=mate > DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus > DEFAULTS_PATH=/usr/share/gconf/mate.default.path > DESKTOP_SESSION=mate > DISPLAY=:0 > GB_GUI=gb.gtk3 > GDMSESSION=mate > GDM_LANG=fr_FR > GIO_LAUNCHED_DESKTOP_FILE=/Bureau/gambas3.desktop > GIO_LAUNCHED_DESKTOP_FILE_PID=299270 > GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1 > GTK_MODULES=appmenu-gtk-module:gail:atk-bridge:canberra-gtk-module > GTK_OVERLAY_SCROLLING=0 > HOME= > INSIDE_CAJA_PYTHON= > LANG=fr_FR.UTF-8 > LANGUAGE=fr_FR.UTF-8 > LC_ADDRESS=fr_FR.UTF-8 > LC_ALL=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/mate.mandatory.path > MATE_DESKTOP_SESSION_ID=this-is-deprecated > PAPERSIZE=a4 > > PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin > PWD= > QT_ACCESSIBILITY=1 > QT_AUTO_SCREEN_SCALE_FACTOR=0 > QT_LOGGING_RULES=*.debug=false > QT_QPA_PLATFORMTHEME=gtk2 > QT_SCALE_FACTOR=1 > > SESSION_MANAGER=local/:@/tmp/.ICE-unix/1597,unix/:/tmp/.ICE-unix/1597 > SHELL=/bin/bash > SHLVL=0 > SSH_AGENT_PID=1657 > SSH_AUTH_SOCK=/run/user/1000/keyring/ssh > TZ=:/etc/localtime > UBUNTU_MENUPROXY=1 > USER= > XAUTHORITY=/.Xauthority > XDG_CONFIG_DIRS=/etc/xdg/xdg-mate:/etc/xdg > XDG_CURRENT_DESKTOP=MATE > > XDG_DATA_DIRS=/usr/share/mate:/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_CLASS=user > XDG_SESSION_DESKTOP=mate > XDG_SESSION_ID=c2 > XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0 > XDG_SESSION_TYPE=x11 > XDG_VTNR=7 > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: TestImageQT5-0.0.1.tar.gz Type: application/gzip Size: 12933 bytes Desc: not available URL: From adamnt42 at gmail.com Sat Jun 19 21:19:53 2021 From: adamnt42 at gmail.com (bb) Date: Sun, 20 Jun 2021 04:49:53 +0930 Subject: [Gambas-user] [CRASH REPORT] (Jussi Lahtinen) TestImageQT5 In-Reply-To: References: Message-ID: <85dc2dcc0895f873909b610ed800747ceb335c80.camel@gmail.com> On Sat, 2021-06-19 at 20:51 +0300, Jussi Lahtinen wrote: > It doesn't crash on Linux Mint 20. At least with the dev version. Can > someone else try? > > > Jussi > Yep, it crashes here (Mint 20.1) The reason is that the Image class returns a Symbol "." (I cant remember what this refers to but it's Kind always causes a segfault) This will happen for any class that has a "." symbol, not only Image. I have an equivalent project that builds a db of all GUI class symbols. In it, whereever I put it*, I expressly ignore the "." symbol when it is encountered. hth b * We are rebuilding our dev server this weekend, I can't access it atm From jussi.lahtinen at gmail.com Sat Jun 19 23:38:35 2021 From: jussi.lahtinen at gmail.com (Jussi Lahtinen) Date: Sun, 20 Jun 2021 00:38:35 +0300 Subject: [Gambas-user] [CRASH REPORT] (Jussi Lahtinen) TestImageQT5 In-Reply-To: <85dc2dcc0895f873909b610ed800747ceb335c80.camel@gmail.com> References: <85dc2dcc0895f873909b610ed800747ceb335c80.camel@gmail.com> Message-ID: > > Yep, it crashes here (Mint 20.1) > Gambas version? Jussi -------------- next part -------------- An HTML attachment was scrubbed... URL: From dovey.john at gmail.com Sat Jun 19 23:57:00 2021 From: dovey.john at gmail.com (John Dovey) Date: Sat, 19 Jun 2021 16:57:00 -0500 Subject: [Gambas-user] Not an Object (Collection) Message-ID: Hi, I define a collection and later add a value to it: Dim WorkCmd As New Collection ' Leaving out the "new" makes no difference '... WorkCmd.Add(Date(Now), "BoneDate") When I try to check for an existing key, it tells me it's "Not an Object" Print "Date: ", WorkCmd["BoneDate"] ' <-- This works Print WorkCmd["BoneDate"] '<-- This works Print WorkCmd["BoneDate"].Exist '<-- This doesn't If Print WorkCmd["BoneDate"].exist then '<-- This gives the same error [image: image.png] Any ideas? JD -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 7755 bytes Desc: not available URL: From tobs at taboege.de Sun Jun 20 00:04:28 2021 From: tobs at taboege.de (Tobias Boege) Date: Sun, 20 Jun 2021 00:04:28 +0200 Subject: [Gambas-user] Not an Object (Collection) In-Reply-To: References: Message-ID: <20210619220428.GC2230200@highrise.localdomain> On Sat, 19 Jun 2021, John Dovey wrote: > Hi, > I define a collection and later add a value to it: > > Dim WorkCmd As New Collection ' Leaving out the "new" makes no difference > '... > WorkCmd.Add(Date(Now), "BoneDate") > > > When I try to check for an existing key, it tells me it's "Not an Object" > Print "Date: ", WorkCmd["BoneDate"] ' <-- This works > Print WorkCmd["BoneDate"] '<-- This works > Print WorkCmd["BoneDate"].Exist '<-- This doesn't > If Print WorkCmd["BoneDate"].exist then '<-- This gives the same error > You're retrieving the value at "BoneDate" and call the Exist method on that value. Given that you stored a Date value in there, which is not an object, the error is justified. A Date value has no "Exist" method. I think you want WorkCmd.Exist("BoneDate"). Best, Tobias -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From g4mba5 at gmail.com Sun Jun 20 00:12:03 2021 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Sun, 20 Jun 2021 00:12:03 +0200 Subject: [Gambas-user] [CRASH REPORT] (Jussi Lahtinen) TestImageQT5 In-Reply-To: <85dc2dcc0895f873909b610ed800747ceb335c80.camel@gmail.com> References: <85dc2dcc0895f873909b610ed800747ceb335c80.camel@gmail.com> Message-ID: <271df923-b6e4-d589-0ec9-b664b5d87170@gmail.com> Le 19/06/2021 ? 21:19, bb a ?crit?: > On Sat, 2021-06-19 at 20:51 +0300, Jussi Lahtinen wrote: >> It doesn't crash on Linux Mint 20. At least with the dev version. Can >> someone else try? >> >> >> Jussi >> > > Yep, it crashes here (Mint 20.1) > > The reason is that the Image class returns a Symbol "." (I cant > remember what this refers to but it's Kind always causes a segfault) > > This will happen for any class that has a "." symbol, not only Image. > > I have an equivalent project that builds a db of all GUI class symbols. > In it, whereever I put it*, I expressly ignore the "." symbol when it > is encountered. > > hth > b > > * We are rebuilding our dev server this weekend, I can't access it atm > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > The bug should be fixed by commit https://gitlab.com/gambas/gambas/-/commit/51068e17bde9272bae9d753fc2d6af5a3c297566. Regards, -- Beno?t Minisini From dovey.john at gmail.com Sun Jun 20 03:52:57 2021 From: dovey.john at gmail.com (John Dovey) Date: Sat, 19 Jun 2021 20:52:57 -0500 Subject: [Gambas-user] Not an Object (Collection) In-Reply-To: <20210619220428.GC2230200@highrise.localdomain> References: <20210619220428.GC2230200@highrise.localdomain> Message-ID: > I think you want WorkCmd.Exist("BoneDate"). 100% correct. Thank you! On Sat, 19 Jun 2021 at 17:13, Tobias Boege via User < user at lists.gambas-basic.org> wrote: > On Sat, 19 Jun 2021, John Dovey wrote: > > Hi, > > I define a collection and later add a value to it: > > > > Dim WorkCmd As New Collection ' Leaving out the "new" makes no difference > > '... > > WorkCmd.Add(Date(Now), "BoneDate") > > > > > > When I try to check for an existing key, it tells me it's "Not an Object" > > Print "Date: ", WorkCmd["BoneDate"] ' <-- This works > > Print WorkCmd["BoneDate"] '<-- This works > > Print WorkCmd["BoneDate"].Exist '<-- This doesn't > > If Print WorkCmd["BoneDate"].exist then '<-- This gives the same error > > > > You're retrieving the value at "BoneDate" and call the Exist method > on that value. Given that you stored a Date value in there, which is > not an object, the error is justified. A Date value has no "Exist" > method. > > I think you want WorkCmd.Exist("BoneDate"). > > Best, > Tobias > > -- > "There's an old saying: Don't change anything... ever!" -- Mr. Monk > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From claude.dessere at orange.fr Sun Jun 20 08:38:57 2021 From: claude.dessere at orange.fr (CD) Date: Sun, 20 Jun 2021 08:38:57 +0200 Subject: [Gambas-user] [CRASH REPORT] (Jussi Lahtinen) TestImageQT5 (Beno?t Minisini) Message-ID: <8aad77e4973351e941203d43e3e2f67be340ea33.camel@orange.fr> Le dimanche 20 juin 2021 ? 00:13 +0200, user-request at lists.gambas-basic.org a ?crit : > Send User mailing list submissions to user at lists.gambas-basic.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://lists.gambas-basic.org/listinfo/user > or, via email, send a message with subject or body 'help' to > user-request at lists.gambas-basic.org > > You can reach the person managing the list at > user-owner at lists.gambas-basic.org > > When replying, please edit your Subject line so it is more specificthan "Re: > Contents of User digest..."Today's Topics: > 1. Re: [CRASH REPORT] (Jussi Lahtinen) TestImageQT5 (bb) 2. Re: [CRASH > REPORT] (Jussi Lahtinen) TestImageQT5 (Jussi Lahtinen) 3. Not an Object > (Collection) (John Dovey) 4. Re: Not an Object (Collection) (Tobias > Boege) 5. Re: [CRASH REPORT] (Jussi Lahtinen) TestImageQT5 (Beno?t > Minisini)----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]- > --- > > Yep, it crashes here (Mint 20.1) > > The reason is that the Image class returns a Symbol "." (I cant > remember what this refers to but it's Kind always causes a segfault) > > This will happen for any class that has a "." symbol, not only Image. > > I have an equivalent project that builds a db of all GUI class symbols. > In it, whereever I put it*, I expressly ignore the "." symbol when it > is encountered. > > hth > b > > * We are rebuilding our dev server this weekend, I can't access it atm > This will happen for any class that has a "." symbol, not only Image. I do not agree for example in gb.form.mdi it works perfectly with the Workspace class and the ToolBar class, each of which has the first symbol ".", on the other hand it also crashes with the Action class whose first symbol is a "." too what to understand? Moreover by observing the contents of the file gb.form.mdi.info there is no symbol "." What does this symbol "." does he match??? Regards Project TestImageQT5-0.0.1.tar.gz modified with gb.form.mdi -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: TestImageQT5-0.0.1.tar.gz Type: application/x-compressed-tar Size: 12953 bytes Desc: not available URL: From adamnt42 at gmail.com Mon Jun 21 04:08:11 2021 From: adamnt42 at gmail.com (bb) Date: Mon, 21 Jun 2021 11:38:11 +0930 Subject: [Gambas-user] Optional parameters for Read accessors Message-ID: <3dfd04187c470c4d0f1ca36d0ab2237061a66532.camel@gmail.com> I'm pushing the boundaries again. Sometimes we have a property that has more than one state variable. An easy example is one where its original value or "at some point" is set by the property Write accessor and its current state variable value is variable perhaps based on user activity. What I am trying to achieve is a way to have the property Read accessor accept on optional parameter that will determine which of those values is returned. Of course, the obvious answer is to use another property or function to return a specific state variable. However it would be "neater" to have this in the natural accessor method. Private Sub MyProp_Read(Optional orig As Boolean=False) as Integer If orig then Return $originalValue Else Return $currentValue EndIf End or something like that. In my current case the situation is much more complex, hence the question, but that example encapsulates what I am trying to achieve. At the moment, trying this results in a "_Read declaration does not match" error from the compiler, naturally. Is this viable? Thoughts? regards bruce From g4mba5 at gmail.com Mon Jun 21 11:24:59 2021 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Mon, 21 Jun 2021 11:24:59 +0200 Subject: [Gambas-user] Optional parameters for Read accessors In-Reply-To: <3dfd04187c470c4d0f1ca36d0ab2237061a66532.camel@gmail.com> References: <3dfd04187c470c4d0f1ca36d0ab2237061a66532.camel@gmail.com> Message-ID: Le 21/06/2021 ? 04:08, bb a ?crit?: > I'm pushing the boundaries again. > > Sometimes we have a property that has more than one state variable. An > easy example is one where its original value or "at some point" is set > by the property Write accessor and its current state variable value is > variable perhaps based on user activity. > > What I am trying to achieve is a way to have the property Read accessor > accept on optional parameter that will determine which of those values > is returned. > > Of course, the obvious answer is to use another property or function to > return a specific state variable. > > However it would be "neater" to have this in the natural accessor > method. > Private Sub MyProp_Read(Optional orig As Boolean=False) as Integer > If orig then > Return $originalValue > Else > Return $currentValue > EndIf > End > or something like that. In my current case the situation is much more > complex, hence the question, but that example encapsulates what I am > trying to achieve. > > At the moment, trying this results in a "_Read declaration does not > match" error from the compiler, naturally. > > Is this viable? > Thoughts? > > regards > bruce > Then you have to replace your "MyProp" property by a "GetMyProp" function with your optional parameter, like you would do in Java. Regards, -- Beno?t Minisini From adamnt42 at gmail.com Mon Jun 21 18:25:26 2021 From: adamnt42 at gmail.com (bb) Date: Tue, 22 Jun 2021 01:55:26 +0930 Subject: [Gambas-user] Optional parameters for Read accessors In-Reply-To: References: <3dfd04187c470c4d0f1ca36d0ab2237061a66532.camel@gmail.com> Message-ID: <04413d06a06109d3936729163426783ac347f1b8.camel@gmail.com> On Mon, 2021-06-21 at 11:24 +0200, Beno?t Minisini wrote: > Le 21/06/2021 ? 04:08, bb a ?crit : > > I'm pushing the boundaries again. > > > > Sometimes we have a property that has more than one state variable. > > An > > easy example is one where its original value or "at some point" is > > set > > by the property Write accessor and its current state variable value > > is > > variable perhaps based on user activity. > > > > What I am trying to achieve is a way to have the property Read > > accessor > > accept on optional parameter that will determine which of those > > values > > is returned. > > > > Of course, the obvious answer is to use another property or > > function to > > return a specific state variable. > > > > However it would be "neater" to have this in the natural accessor > > method. > > Private Sub MyProp_Read(Optional orig As Boolean=False) as > > Integer > > If orig then > > Return $originalValue > > Else > > Return $currentValue > > EndIf > > End > > or something like that. In my current case the situation is much > > more > > complex, hence the question, but that example encapsulates what I > > am > > trying to achieve. > > > > At the moment, trying this results in a "_Read declaration does not > > match" error from the compiler, naturally. > > > > Is this viable? > > Thoughts? > > > > regards > > bruce > > > > Then you have to replace your "MyProp" property by a "GetMyProp" > function with your optional parameter, like you would do in Java. > > Regards, > Ah, of course! Thank you. From james at lixce.com Mon Jun 21 06:19:57 2021 From: james at lixce.com (james at lixce.com) Date: Mon, 21 Jun 2021 04:19:57 GMT Subject: [Gambas-user] Start IDE in QT5 mode an 3.16.1 on Arch Message-ID: Gambas 3.16.1 finally showed up on the Arch repos. They went straight to 3.16.1 skipping 3.16 which is good. Installed on my x86 system this morning with some trepidation, my entire desktop is made up of over a hundred programs written in Gambas (even this email program). No major issues so far, the depricated MovieBox caused a few minor problems but was pretty simple to comment out in most cases. FileView returning font colors for hidden files limited my File Manager but a temporary fix with a couple of Replace statements took care of that. I filed a bug report on that one. The only way I could get the IDE to launch in QT5 mode was to uninstall gambas3-gb-gtk3. Would prefer to keep that arround even though I build everything in QT. There is nothing I could find in the command-line help or on the wiki. I seem to remember someone talking about it on this mailing list fairly recently but could not find it in the mailing list archives. I normlly use a customized version of the IDE for consistent look and feel with my other programs and a couple of special utilities, but will have to do considerable updating before it is usable in 3.16. Is there an environment variable to set, or a command line option, to force the IDE to use QT? I'll do my best to compile 3.16.1 on aarch64 today and update the wiki if needed. Thanks Benoit for such a great environment and thanks to all the Gambasers for sharing info. Regards, -j (LiXCE) From jose.rodriguez at cenpalab.cu Mon Jun 21 21:49:34 2021 From: jose.rodriguez at cenpalab.cu (jose.rodriguez at cenpalab.cu) Date: Mon, 21 Jun 2021 19:49:34 +0000 Subject: [Gambas-user] Start IDE in QT5 mode an 3.16.1 on Arch In-Reply-To: <20210621191001.CE49B20C7BF6@h08.hostsharing.net> References: <20210621191001.CE49B20C7BF6@h08.hostsharing.net> Message-ID: <7d443393c3cfd6f0addd410500bce5e0@cenpalab.cu> June 21, 2021 3:09 PM, james at lixce.com wrote: > > Is there an environment variable to set, or a command line option, to force the IDE to use QT? > export GB_GUI=gb.qt5 Regards, Joe1962 From g4mba5 at gmail.com Mon Jun 21 22:36:28 2021 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Mon, 21 Jun 2021 22:36:28 +0200 Subject: [Gambas-user] Start IDE in QT5 mode an 3.16.1 on Arch In-Reply-To: <20210621191001.C843A20C7BF5@h08.hostsharing.net> References: <20210621191001.C843A20C7BF5@h08.hostsharing.net> Message-ID: Le 21/06/2021 ? 06:19, james at lixce.com a ?crit : > Gambas 3.16.1 finally showed up on the Arch repos. They went straight > to 3.16.1 skipping 3.16 which is good. Installed on my x86 system > this morning with some trepidation, my entire desktop is made up of > over a hundred programs written in Gambas (even this email program). What? Do you really mean that? > No major issues so far, the depricated MovieBox caused a few minor > problems but was pretty simple to comment out in most cases. > FileView returning font colors for hidden files limited my File > Manager but a temporary fix with a couple of Replace statements took > care of that. I filed a bug report on that one. It has been fixed, and the fix will be backported in 3.16.2 version. > > The only way I could get the IDE to launch in QT5 mode was to > uninstall gambas3-gb-gtk3. Would prefer to keep that arround even > though I build everything in QT. There is nothing I could find in > the command-line help or on the wiki. I seem to remember someone > talking about it on this mailing list fairly recently but could not > find it in the mailing list archives. I normlly use a customized > version of the IDE for consistent look and feel with my other > programs and a couple of special utilities, but will have to do > considerable updating before it is usable in 3.16. > > Is there an environment variable to set, or a command line option, to > force the IDE to use QT? GB_GUI=gb.qt5 The 'gb.gui' component is the component that chooses the GUI component according to that environment variable. If it is not set, the GUI component is chosen according to the current desktop (Qt if KDE, GTK+ otherwise). Regards, -- Beno?t Minisini From mbelmonte at belmotek.net Tue Jun 22 16:34:15 2021 From: mbelmonte at belmotek.net (=?UTF-8?Q?Mart=c3=adn?=) Date: Tue, 22 Jun 2021 16:34:15 +0200 Subject: [Gambas-user] WebView in 3.16 Message-ID: <67c667b5-7d36-8e8b-86cc-fc26422bd894@belmotek.net> Hello, could someone please tell me, what is the name of the .HitTest property of WebView control now? Sample: Dim hTest As WebHitTest = hWebView.HitTest(Mouse.X, Mouse.Y) Thanks. From mbelmonte at belmotek.net Tue Jun 22 21:05:45 2021 From: mbelmonte at belmotek.net (=?UTF-8?Q?Mart=c3=adn?=) Date: Tue, 22 Jun 2021 21:05:45 +0200 Subject: [Gambas-user] How to WebView ExecJavascript Message-ID: <3c0d6d67-4bcd-a5f7-e4d6-564eae49311d@belmotek.net> Hi, I try to use this WebView1.ExecJavascript() but something doesn't work or i made something bad. Public Sub tobColor_Click() ? WebView1.ExecJavascript("document.execCommand('forecolor', false, '#000000')") 'or this ? WebView1.ExecJavascript("document.execCommand('bold', false, false)") ? WebView1.Refresh ' ?Its line is necessary? End Also documentation in [1] is not available. [1] http://gambaswiki.org/wiki/comp/gb.qt5.webview/webview/execjavascript I would be grateful if someone could tell me where to find documentation or an ExecJavascript example for gambas version 3.16. Some developers of the spanish forum are trying to develop a rich text editor with the webview control in WYSIWYG style. Mart?n. From tercoide at hotmail.com Wed Jun 23 15:59:12 2021 From: tercoide at hotmail.com (martin p cristia) Date: Wed, 23 Jun 2021 10:59:12 -0300 Subject: [Gambas-user] KeyPress event is fired twice Message-ID: To reproduce, click on the GLArea and then press a key. If the Form has the focus, it's ok. See output in console. [System] Gambas=3.16.90 OperatingSystem=Linux Kernel=5.11.0-22-generic Architecture=x86_64 Distribution=Ubuntu 21.04 Desktop=UBUNTU:GNOME Font=Ubuntu,11 Scale=8 Theme=yaru Language=es_AR.UTF-8 Memory=7859M [Libraries] Cairo=libcairo.so.2.11600.0 Curl=libcurl.so.4.7.0 DBus=libdbus-1.so.3.19.13 GDK2=libgdk-x11-2.0.so.0.2400.33 GDK3=libgdk-3.so.0.2404.21 GStreamer=libgstreamer-1.0.so.0.1804.0 GTK+2=libgtk-x11-2.0.so.0.2400.33 GTK+3=libgtk-3.so.0.2404.21 OpenGL=libGL.so.1.7.0 Poppler=libpoppler.so.107.0.0 Poppler=libpoppler.so.73.0.0 QT5=libQt5Core.so.5.15.2 SDL=libSDL-1.2.so.0.11.4 SQLite=libsqlite3.so.0.8.6 [Environment] DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus DEFAULTS_PATH=/usr/share/gconf/ubuntu.default.path DESKTOP_SESSION=ubuntu DISPLAY=:1 EDITOR=gedit GB_GUI=gb.gtk3 GDMSESSION=ubuntu GIO_LAUNCHED_DESKTOP_FILE=/usr/share/applications/gambas3.desktop GIO_LAUNCHED_DESKTOP_FILE_PID=7103 GJS_DEBUG_OUTPUT=stderr GJS_DEBUG_TOPICS=JS ERROR;JS LOG GNOME_DESKTOP_SESSION_ID=this-is-deprecated GNOME_SHELL_SESSION_MODE=ubuntu GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1 GTK_MODULES=gail:atk-bridge HOME= IM_CONFIG_PHASE=1 INVOCATION_ID=5878cf9cfb1f4eaab099441dad7c65a2 JOURNAL_STREAM=8:81965 LANG=es_AR.UTF-8 LANGUAGE=es_AR.UTF-8 LC_ADDRESS=en_US.UTF-8 LC_ALL=es_AR.UTF-8 LC_IDENTIFICATION=en_US.UTF-8 LC_MEASUREMENT=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_NAME=en_US.UTF-8 LC_NUMERIC=en_US.UTF-8 LC_PAPER=en_US.UTF-8 LC_TELEPHONE=en_US.UTF-8 LC_TIME=en_US.UTF-8 LOGNAME= MANAGERPID=2412 MANDATORY_PATH=/usr/share/gconf/ubuntu.mandatory.path PAPERSIZE=letter PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin PWD= QT_ACCESSIBILITY=1 QT_IM_MODULE=ibus QT_LOGGING_RULES=*.debug=false QT_QPA_PLATFORM=xcb SESSION_MANAGER=local/:@/tmp/.ICE-unix/2926,unix/:/tmp/.ICE-unix/2926 SHELL=/bin/bash SHLVL=0 SSH_AGENT_LAUNCHER=gnome-keyring SSH_AUTH_SOCK=/run/user/1000/keyring/ssh TZ=:/etc/localtime USER= USERNAME= WINDOWPATH=2 XAUTHORITY=/run/user/1000/gdm/Xauthority XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg XDG_CURRENT_DESKTOP=ubuntu:GNOME XDG_DATA_DIRS=/usr/share/ubuntu:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop XDG_MENU_PREFIX=gnome- XDG_RUNTIME_DIR=/run/user/1000 XDG_SESSION_CLASS=user XDG_SESSION_DESKTOP=ubuntu XDG_SESSION_TYPE=x11 XMODIFIERS=@im=ibus _=/usr/bin/dbus-update-activation-environment -- Saludos Ing. Martin P Cristia -------------- next part -------------- A non-text attachment was scrubbed... Name: testgl-0.0.1.tar.gz Type: application/gzip Size: 12630 bytes Desc: not available URL: From james at lixce.com Wed Jun 23 05:34:23 2021 From: james at lixce.com (james at lixce.com) Date: Wed, 23 Jun 2021 03:34:23 GMT Subject: [Gambas-user] Start IDE in QT5 and LiXCE Desktop (150k pic) Message-ID: Thank you Joe1962 and Beno?t for the env-var ! Thank you Beno?t for fixing that bug so quickly. Beno?t: Yes my dev tree has 126 Gambas projects, some of those are duplicates because of rewrites. The count is pushed up because I prefer small-single-function programs, For example the file manager is made up of about 6 programs, the main window and then seperate programs for mounting external drives, setting mime defaults, displaying file info, editing .desktop files etc. That helps with the single-threading and I'm not very smart so I have to keep things simple. Many programs start from something I find on the Farm, I do my best to credit the original author even if I end up completely rewriting all the code. Most of the games are javascript that I have found various places run in a dedicated WebView wrapper. EVERYTHING you see in the attached screenshot was written in Gambas. There is a LOT of ugly code and I have been eating my own dog food for about three years now. The new WebView in 3.16 looks like I may finally be able to get rid of my non-Gambas web browser. Lately I have been concentrating on integrating with WebDav, CalDav and CrdDav using Rclone. There are still a few non-Gambas GUI programs on my system, mostly backups like LibreOffice, Chromium and as a last ditch Stterm. Oh, and Cura and OpenScad for 3d printing. I have NO PLAN to rewrite Cura in Gambas but OpenScad could use a better text editor ; ) I DID get 3.16.1 to compile from the Arch repo on ARM64. It was ugly because I could not find a PKGBUILD for 3.16 so I had to edit the one for 3.15 and I know nothing about editing PKGBUILD files. Will try to get it installed on my PinePhone in the next couple of days, Wayland support should help there. Sorry for the long missive, Regards -j (LiXCE) -------------- next part -------------- A non-text attachment was scrubbed... Name: lixce.png Type: image/png Size: 155508 bytes Desc: not available URL: From g4mba5 at gmail.com Wed Jun 23 19:40:26 2021 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Wed, 23 Jun 2021 19:40:26 +0200 Subject: [Gambas-user] Start IDE in QT5 and LiXCE Desktop (150k pic) In-Reply-To: <20210623173501.E731A2023D1D@h08.hostsharing.net> References: <20210623173501.E731A2023D1D@h08.hostsharing.net> Message-ID: <37bf98d4-909d-6c42-9c76-5964399206e5@gmail.com> Le 23/06/2021 ? 05:34, james at lixce.com a ?crit : > Thank you Joe1962 and Beno?t for the env-var ! > > Thank you Beno?t for fixing that bug so quickly. > > Beno?t: Yes my dev tree has 126 Gambas projects, some of those are > duplicates because of rewrites. The count is pushed up because I > prefer small-single-function programs, For example the file manager > is made up of about 6 programs, the main window and then seperate > programs for mounting external drives, setting mime defaults, > displaying file info, editing .desktop files etc. That helps with > the single-threading and I'm not very smart so I have to keep things > simple. Many programs start from something I find on the Farm, I do > my best to credit the original author even if I end up completely > rewriting all the code. Most of the games are javascript that I > have found various places run in a dedicated WebView wrapper. > EVERYTHING you see in the attached screenshot was written in Gambas. > There is a LOT of ugly code and I have been eating my own dog food > for about three years now. The new WebView in 3.16 looks like I may > finally be able to get rid of my non-Gambas web browser. Lately I > have been concentrating on integrating with WebDav, CalDav and CrdDav > using Rclone. There are still a few non-Gambas GUI programs on my > system, mostly backups like LibreOffice, Chromium and as a last ditch > Stterm. Oh, and Cura and OpenScad for 3d printing. I have NO PLAN > to rewrite Cura in Gambas but OpenScad could use a better text editor > ; ) > > I DID get 3.16.1 to compile from the Arch repo on ARM64. It was ugly > because I could not find a PKGBUILD for 3.16 so I had to edit the one > for 3.15 and I know nothing about editing PKGBUILD files. Will try > to get it installed on my PinePhone in the next couple of days, > Wayland support should help there. > > Sorry for the long missive, > > Regards -j (LiXCE) > Note: if you want to post a screenshot, use the JPEG format, otherwise your image is too small. -- Beno?t Minisini From mbelmonte at belmotek.net Wed Jun 23 22:58:54 2021 From: mbelmonte at belmotek.net (=?UTF-8?Q?Mart=c3=adn?=) Date: Wed, 23 Jun 2021 22:58:54 +0200 Subject: [Gambas-user] Some documentation for webview in 3.16 execjavascript ?? Message-ID: <50aa12c8-7a61-327c-7b25-d2e08ac6dd19@belmotek.net> Hello, I'm trying to find documentation or a usage example about the webview control for gb.gui but I can't find anything. I have already searched in [1] but the page is blank. [1] https://gambaswiki.org/wiki/comp/gb.qt5.webview/webview/execjavascript Would it be possible that someone could give me some information about it? Also I use this WebView1.ExecJavascript("document.execCommand('foreColor', false, 'red');") But doesn't work Thanks. From g4mba5 at gmail.com Wed Jun 23 23:09:32 2021 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Wed, 23 Jun 2021 23:09:32 +0200 Subject: [Gambas-user] Some documentation for webview in 3.16 execjavascript ?? In-Reply-To: <50aa12c8-7a61-327c-7b25-d2e08ac6dd19@belmotek.net> References: <50aa12c8-7a61-327c-7b25-d2e08ac6dd19@belmotek.net> Message-ID: <27a7a744-c749-6ed4-73fc-c8849ef3e9b1@gmail.com> Le 23/06/2021 ? 22:58, Mart?n a ?crit?: > Hello, > > I'm trying to find documentation or a usage example about the webview > control for gb.gui but I can't find anything. > > I have already searched in [1] but the page is blank. > > [1] https://gambaswiki.org/wiki/comp/gb.qt5.webview/webview/execjavascript > > Would it be possible that someone could give me some information about it? > > Also I use this > > WebView1.ExecJavascript("document.execCommand('foreColor', false, 'red');") > > But doesn't work > > Thanks. > > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- This is the javascript execution of WebKit, you can find the documentation in the Qt documentation or WebKitGtk documentation, depending on which one you use. But you won't find any information more than "execute javascript in the context of the browser page". Regards, -- Beno?t Minisini From mbelmonte at belmotek.net Thu Jun 24 10:15:15 2021 From: mbelmonte at belmotek.net (=?UTF-8?Q?Mart=c3=adn?=) Date: Thu, 24 Jun 2021 10:15:15 +0200 Subject: [Gambas-user] Some documentation for webview in 3.16 execjavascript ?? In-Reply-To: <27a7a744-c749-6ed4-73fc-c8849ef3e9b1@gmail.com> References: <50aa12c8-7a61-327c-7b25-d2e08ac6dd19@belmotek.net> <27a7a744-c749-6ed4-73fc-c8849ef3e9b1@gmail.com> Message-ID: I'm looking for documentation for the control WebView because in gambas wiki is blank or some sample program on this version of WebView. I share here a project which i use for learning and testing. I want to change the text content and text style like as text editor program. Could be possible someone do this changes in the code an share, in order to understand how it works. Thanks. On 23/6/21 23:09, Beno?t Minisini wrote: > Le 23/06/2021 ? 22:58, Mart?n a ?crit?: >> Hello, >> >> I'm trying to find documentation or a usage example about the webview >> control for gb.gui but I can't find anything. >> >> I have already searched in [1] but the page is blank. >> >> [1] >> https://gambaswiki.org/wiki/comp/gb.qt5.webview/webview/execjavascript >> >> Would it be possible that someone could give me some information >> about it? >> >> Also I use this >> >> WebView1.ExecJavascript("document.execCommand('foreColor', false, >> 'red');") >> >> But doesn't work >> >> Thanks. >> >> >> >> ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > > This is the javascript execution of WebKit, you can find the > documentation in the Qt documentation or WebKitGtk documentation, > depending on which one you use. > > But you won't find any information more than "execute javascript in > the context of the browser page". > > Regards, > -------------- next part -------------- A non-text attachment was scrubbed... Name: test-webform-0.0.3.tar.gz Type: application/gzip Size: 12782 bytes Desc: not available URL: From dovey.john at gmail.com Thu Jun 24 17:16:23 2021 From: dovey.john at gmail.com (John Dovey) Date: Thu, 24 Jun 2021 10:16:23 -0500 Subject: [Gambas-user] Some documentation for webview in 3.16 execjavascript ?? In-Reply-To: References: <50aa12c8-7a61-327c-7b25-d2e08ac6dd19@belmotek.net> <27a7a744-c749-6ed4-73fc-c8849ef3e9b1@gmail.com> Message-ID: I was hoping there would be documentation on webview for qt4, but no luck... circular reference :-( [image: image.png] [image: image.png] On Thu, 24 Jun 2021 at 03:15, Mart?n wrote: > I'm looking for documentation for the control WebView because in gambas > wiki is blank or some sample program on this version of WebView. > > I share here a project which i use for learning and testing. > > I want to change the text content and text style like as text editor > program. > > Could be possible someone do this changes in the code an share, in order > to understand how it works. > > Thanks. > > > On 23/6/21 23:09, Beno?t Minisini wrote: > > Le 23/06/2021 ? 22:58, Mart?n a ?crit : > >> Hello, > >> > >> I'm trying to find documentation or a usage example about the webview > >> control for gb.gui but I can't find anything. > >> > >> I have already searched in [1] but the page is blank. > >> > >> [1] > >> https://gambaswiki.org/wiki/comp/gb.qt5.webview/webview/execjavascript > >> > >> Would it be possible that someone could give me some information > >> about it? > >> > >> Also I use this > >> > >> WebView1.ExecJavascript("document.execCommand('foreColor', false, > >> 'red');") > >> > >> But doesn't work > >> > >> Thanks. > >> > >> > >> > >> ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > > > > This is the javascript execution of WebKit, you can find the > > documentation in the Qt documentation or WebKitGtk documentation, > > depending on which one you use. > > > > But you won't find any information more than "execute javascript in > > the context of the browser page". > > > > Regards, > > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 30103 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 30458 bytes Desc: not available URL: From tercoide at hotmail.com Thu Jun 24 20:38:09 2021 From: tercoide at hotmail.com (martin p cristia) Date: Thu, 24 Jun 2021 15:38:09 -0300 Subject: [Gambas-user] KeyPress event is fired twice (martin p cristia) In-Reply-To: References: Message-ID: Found a workaround: there has to be a dummy GLArea_Keypress sub and the event fires only once in Form_KeyPress Public Sub Form_KeyPress() ? Debug Key.Text End Public Sub GLArea1_KeyPress() ? ' Debug "GLArea", Key.Text End El 6/23/21 a las 2:35 PM, user-request at lists.gambas-basic.org escribi?: > > ---------------------------------------------------------------------- > > Message: 1 > Date: Wed, 23 Jun 2021 10:59:12 -0300 > From: martin p cristia > To: Gambas mailing list > Subject: [Gambas-user] KeyPress event is fired twice > Message-ID: > > > Content-Type: text/plain; charset="windows-1252"; Format="flowed" > > To reproduce, click on the GLArea and then press a key. If the Form has > the focus, it's ok. See output in console. > > [ -- Saludos Ing. Martin P Cristia From dovey.john at gmail.com Fri Jun 25 03:23:56 2021 From: dovey.john at gmail.com (John Dovey) Date: Thu, 24 Jun 2021 20:23:56 -0500 Subject: [Gambas-user] ExecuteScalar Message-ID: This is not a terribly important question, because there are obvious ways to do it, but is there a Gambas equivalent for " ExecuteScalar"? For example if I have the SQL "Select COUNT(*) from 'SomeTable';" I can of course do Dim RS As Result Try RS = $con.Exec( "SELECT COUNT(*) as NoOfRecords from 'echodist' " ) doCountEchos = RS!NoOfRecords Try $con.Close but I'm wondering if there is a better way? -------------- next part -------------- An HTML attachment was scrubbed... URL: From adamnt42 at gmail.com Fri Jun 25 03:34:32 2021 From: adamnt42 at gmail.com (bb) Date: Fri, 25 Jun 2021 11:04:32 +0930 Subject: [Gambas-user] Latest ppa: bad package dependencies Message-ID: There are two issues here. 1) The dependencies for the target package are including dependencies on libraries that are only defined for the development work. IOW a library listed in the Project Properties "Libraries" tab is being included in the dependencies for the Ubuntu package. The library is NOT included in the Project Properties "Information" tab. 2) The dependency is misnamed. It looks for a package named with the FULL vendor name rather than the vendor prefix, when both are defined in the packaging wizard. I'll leave this post at this length ATM. bruce From g4mba5 at gmail.com Fri Jun 25 03:38:11 2021 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Fri, 25 Jun 2021 03:38:11 +0200 Subject: [Gambas-user] Latest ppa: bad package dependencies In-Reply-To: References: Message-ID: <67bf213d-97ec-3f73-5f18-291eaa124273@gmail.com> Le 25/06/2021 ? 03:34, bb a ?crit?: > There are two issues here. > 1) The dependencies for the target package are including dependencies > on libraries that are only defined for the development work. IOW a > library listed in the Project Properties "Libraries" tab is being > included in the dependencies for the Ubuntu package. The library is NOT > included in the Project Properties "Information" tab. > 2) The dependency is misnamed. It looks for a package named with the > FULL vendor name rather than the vendor prefix, when both are defined > in the packaging wizard. > I'll leave this post at this length ATM. > > bruce > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > I don't understand what you are talking about. -- Beno?t Minisini From adamnt42 at gmail.com Fri Jun 25 03:42:53 2021 From: adamnt42 at gmail.com (bb) Date: Fri, 25 Jun 2021 11:12:53 +0930 Subject: [Gambas-user] ExecuteScalar In-Reply-To: References: Message-ID: <712aeea6ea4c9fb7fc8ab762f90c4c68d5b39e0c.camel@gmail.com> On Thu, 2021-06-24 at 20:23 -0500, John Dovey wrote: > This is not a terribly important question, because there are obvious > ways to do it, but is there a Gambas equivalent for " ExecuteScalar"? > > For example if I have the SQL "Select COUNT(*) from 'SomeTable';" > I can of course do > > > Dim RS As Result > Try RS = $con.Exec( "SELECT COUNT(*) as NoOfRecords from > 'echodist' " ) > doCountEchos = RS!NoOfRecords > Try $con.Close > > but I'm wondering if there is a better way? Not that I can think of. But I will point out that count(*) is teribly inefficient as the engine has to evaluate every column in the table to get an answer. It is much better to count a specific column (except the OID column if it exists). I generally use count(1) which works for me as the way I design database tables is always with the primary key columns at the top of the colummn list. regards bruce From adamnt42 at gmail.com Fri Jun 25 04:19:38 2021 From: adamnt42 at gmail.com (bb) Date: Fri, 25 Jun 2021 11:49:38 +0930 Subject: [Gambas-user] Latest ppa: bad package dependencies In-Reply-To: <67bf213d-97ec-3f73-5f18-291eaa124273@gmail.com> References: <67bf213d-97ec-3f73-5f18-291eaa124273@gmail.com> Message-ID: On Fri, 2021-06-25 at 03:38 +0200, Beno?t Minisini wrote: > Le 25/06/2021 ? 03:34, bb a ?crit : > > There are two issues here. > > 1) The dependencies for the target package are including > > dependencies > > on libraries that are only defined for the development work. IOW a > > library listed in the Project Properties "Libraries" tab is being > > included in the dependencies for the Ubuntu package. The library is > > NOT > > included in the Project Properties "Information" tab. > > 2) The dependency is misnamed. It looks for a package named with > > the > > FULL vendor name rather than the vendor prefix, when both are > > defined > > in the packaging wizard. > > I'll leave this post at this length ATM. > > > > bruce > > > > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > > > > I don't understand what you are talking about. > I am talking about packaging a project for installation on a Ubuntu based system. We have a library that provides us with some testing and debugging methods, some "code quality" checking methods and some environment checking methods. It is only necessary when running the target project within the IDE. It is not needed in the installed project. In the packaging wizard I have : On page 1 "Add vendor prefix or name to package names" checked "Vendor name" set to "paddys-hill" "Vendor prefix" set to "ph" On page 5 "Minimum Gambas version" checked and set to 3.14 There are no other dependencies set. I create the package successfully as "gambas3-ph-internalsrt_0.0.31- 0ubuntu1_all.deb" etc, but when I try to install it with "GDebi Packager Installer" it fails with "Error: Dependency is not satisfiable: paddys-hill-qatest (>=0.90.0)" Now firstly qatest is a library, there is no package for it. It only lives as ~/.local/share/gambas3/lib/qatest.gambas So why is the packager including a dependency on a library in the first place? Secondly, disregarding the fact that it does, why is it looking for a package prefixed with the full vendor name instead of the vendor prefix? regards bruce From adamnt42 at gmail.com Fri Jun 25 04:27:12 2021 From: adamnt42 at gmail.com (bb) Date: Fri, 25 Jun 2021 11:57:12 +0930 Subject: [Gambas-user] Latest ppa: bad package dependencies In-Reply-To: References: <67bf213d-97ec-3f73-5f18-291eaa124273@gmail.com> Message-ID: <6495eb71f6ae91c1392cf9b67d78d5329e38c87e.camel@gmail.com> On Fri, 2021-06-25 at 11:49 +0930, bb wrote: > On Fri, 2021-06-25 at 03:38 +0200, Beno?t Minisini wrote: > > Le 25/06/2021 ? 03:34, bb a ?crit : > > > There are two issues here. > > > 1) The dependencies for the target package are including > > > dependencies > > > on libraries that are only defined for the development work. IOW > > > a > > > library listed in the Project Properties "Libraries" tab is being > > > included in the dependencies for the Ubuntu package. The library > > > is > > > NOT > > > included in the Project Properties "Information" tab. > > > 2) The dependency is misnamed. It looks for a package named with > > > the > > > FULL vendor name rather than the vendor prefix, when both are > > > defined > > > in the packaging wizard. > > > I'll leave this post at this length ATM. > > > > > > bruce > > > > > > > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > > > > > > > I don't understand what you are talking about. > > > I am talking about packaging a project for installation on a Ubuntu > based system. > > We have a library that provides us with some testing and debugging > methods, some "code quality" checking methods and some environment > checking methods. It is only necessary when running the target > project > within the IDE. It is not needed in the installed project. > > In the packaging wizard I have : > On page 1 > "Add vendor prefix or name to package names" checked > "Vendor name" set to "paddys-hill" > "Vendor prefix" set to "ph" > On page 5 > "Minimum Gambas version" checked and set to 3.14 > There are no other dependencies set. > > I create the package successfully as "gambas3-ph-internalsrt_0.0.31- > 0ubuntu1_all.deb" etc, but when I try to install it with "GDebi > Packager Installer" it fails with > > "Error: Dependency is not satisfiable: paddys-hill-qatest (>=0.90.0)" > > Now firstly qatest is a library, there is no package for it. It only > lives as ~/.local/share/gambas3/lib/qatest.gambas > > So why is the packager including a dependency on a library in the > first > place? Secondly, disregarding the fact that it does, why is it > looking > for a package prefixed with the full vendor name instead of the > vendor > prefix? > > regards > bruce > p.s. The ph-internalsrt_0.0.30-0ubuntu1.dsc file contains the following line: Build-Depends: debhelper (>= 9), gambas3-dev (>= 3.14), gambas3-dev (<< 3.99.0), paddys-hill-qatest (>= 0.90.0), paddys-hill-qatest (<< 1.0.90) From claude.dessere at orange.fr Fri Jun 25 07:54:30 2021 From: claude.dessere at orange.fr (CD) Date: Fri, 25 Jun 2021 07:54:30 +0200 Subject: [Gambas-user] Some questions about Component/Classes/Symbols Message-ID: Some questions about Component/Classes/Symbols 1) What do the symbols "." for example in gb.jit component/Jit class/property "." gb.map component/class _MapTile/property "." gb.form.mdi component/Workspace class/constant "." these symbols do not appear in * .info files from the /usr/share/gambas3/info directory? 2) Why in the *; list files in the same directory/usr/share/gambas3/info some class names are followed by an exclamation mark "!", others don't? 3) Why some classes appear with their name preceded by a "^", for example gb.image component, classes ^Image and ^color; in gb.image.info file no "^" sign? Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From claude.dessere at orange.fr Fri Jun 25 10:37:40 2021 From: claude.dessere at orange.fr (CD) Date: Fri, 25 Jun 2021 10:37:40 +0200 Subject: [Gambas-user] Some questions about Component/Classes/Symbols (Text format) Message-ID: <395d532b8b1cf8089af20723108a78ddc8946818.camel@orange.fr> Some questions about Component/Classes/Symbols 1) What do the symbols "." for example in gb.jit component/Jit class/property "." gb.map component/class _MapTile/property "." gb.form.mdi component/Workspace class/constant "." these symbols do not appear in * .info files from the /usr/share/gambas3/info directory? 2) Why in the *; list files in the same directory/usr/share/gambas3/info some class names are followed by an exclamation mark "!", others don't? 3) Why some classes appear with their name preceded by a "^", for example gb.image component, classes ^Image and ^color; in gb.image.info file no "^" sign? Regards From g4mba5 at gmail.com Fri Jun 25 10:44:27 2021 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Fri, 25 Jun 2021 10:44:27 +0200 Subject: [Gambas-user] Some questions about Component/Classes/Symbols (Text format) In-Reply-To: <395d532b8b1cf8089af20723108a78ddc8946818.camel@orange.fr> References: <395d532b8b1cf8089af20723108a78ddc8946818.camel@orange.fr> Message-ID: <5a2b12de-ebb6-e000-5cb1-ee87a1b60b54@gmail.com> Le 25/06/2021 ? 10:37, CD a ?crit?: > Some questions about Component/Classes/Symbols ...that you posted twice on the mailing-list. > > 1) What do the symbols "." for example in > gb.jit component/Jit class/property "." > gb.map component/class _MapTile/property "." > gb.form.mdi component/Workspace class/constant "." > these symbols do not appear in * .info files > from the /usr/share/gambas3/info directory? You should not see them anymore now the bug is fixed. They don't exist. > > 2) Why in the *; list files in the same directory/usr/share/gambas3/info > some class names are followed by an exclamation mark "!", others don't? Why do you want to know that? This is an implementation detail not meant to be used publicly. > > 3) Why some classes appear with their name preceded by a "^", > for example gb.image component, classes ^Image and ^color; > in gb.image.info file no "^" sign? They are the overriden classes. You can't use them anymore explicitely. This is an internal interpreter thing. -- Beno?t Minisini From adamnt42 at gmail.com Fri Jun 25 10:58:51 2021 From: adamnt42 at gmail.com (bb) Date: Fri, 25 Jun 2021 18:28:51 +0930 Subject: [Gambas-user] Some questions about Component/Classes/Symbols (Text format) In-Reply-To: <5a2b12de-ebb6-e000-5cb1-ee87a1b60b54@gmail.com> References: <395d532b8b1cf8089af20723108a78ddc8946818.camel@orange.fr> <5a2b12de-ebb6-e000-5cb1-ee87a1b60b54@gmail.com> Message-ID: <748afc26d637c202cf9e6ec458cb57304a34f0e5.camel@gmail.com> Inline. On Fri, 2021-06-25 at 10:44 +0200, Beno?t Minisini wrote: > Le 25/06/2021 ? 10:37, CD a ?crit : > > Some questions about Component/Classes/Symbols > > ...that you posted twice on the mailing-list. > Because I asked him not to post in html (for personal reasons.) > > 1) What do the symbols "." for example in > > gb.jit component/Jit class/property "." > > gb.map component/class _MapTile/property "." > > gb.form.mdi component/Workspace class/constant "." > > these symbols do not appear in * .info files > > from the /usr/share/gambas3/info directory? > > > You should not see them anymore now the bug is fixed. They don't > exist. Yes and that was a great fix, thank you > > > 2) Why in the *; list files in the same > > directory/usr/share/gambas3/info > > some class names are followed by an exclamation mark "!", others > > don't? > > Why do you want to know that? This is an implementation detail not > meant > to be used publicly. > Me too! I'd love to know what he is trying to do. We have a database of all the GUI symbols that we use when creating custom controls. It is quite handy to sort out what symbols are available in yours and ours GUI controls. Hence the interest. > > 3) Why some classes appear with their name preceded by a "^", > > for example gb.image component, classes ^Image and ^color; > > in gb.image.info file no "^" sign? > > They are the overriden classes. You can't use them anymore > explicitely. > This is an internal interpreter thing. > Help me out here. When you say overriden, do you mean that the symbol in the overriding class is appended with the "^" or the symbol in the overriden class? This could explain a defect I have in our project that rebuilds the abovementioned database. As usual, best regards bruce From g4mba5 at gmail.com Fri Jun 25 11:11:49 2021 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Fri, 25 Jun 2021 11:11:49 +0200 Subject: [Gambas-user] Some questions about Component/Classes/Symbols (Text format) In-Reply-To: <748afc26d637c202cf9e6ec458cb57304a34f0e5.camel@gmail.com> References: <395d532b8b1cf8089af20723108a78ddc8946818.camel@orange.fr> <5a2b12de-ebb6-e000-5cb1-ee87a1b60b54@gmail.com> <748afc26d637c202cf9e6ec458cb57304a34f0e5.camel@gmail.com> Message-ID: Le 25/06/2021 ? 10:58, bb a ?crit?: >> >> They are the overriden classes. You can't use them anymore >> explicitely. >> This is an internal interpreter thing. >> > Help me out here. When you say overriden, do you mean that the symbol > in the overriding class is appended with the "^" or the symbol in the > overriden class? This could explain a defect I have in our project that > rebuilds the abovementioned database. > No, I'm talking about overridden classes, as explained in the "Gambas object model" documentation page at paragraph 4.3. Regards, -- Beno?t Minisini From mbelmonte at belmotek.net Fri Jun 25 12:02:27 2021 From: mbelmonte at belmotek.net (Martin) Date: Fri, 25 Jun 2021 12:02:27 +0200 Subject: [Gambas-user] Some documentation for webview in 3.16 execjavascript ?? In-Reply-To: References: <50aa12c8-7a61-327c-7b25-d2e08ac6dd19@belmotek.net> <27a7a744-c749-6ed4-73fc-c8849ef3e9b1@gmail.com> Message-ID: <91315f64-608c-459d-2899-67e83dd48096@belmotek.net> what I would like to know is, if it is possible or not, to send javascript commands to the WebView control of the gb.gtk3.webview component, of course without enabling gb.qt5.webkit in the project, since that would imply disabling gb.gtk3.webview. On 24/6/21 17:16, John Dovey wrote: > I was hoping there would be documentation on webview for qt4, but no > luck... circular reference :-( > > image.png > > image.png > > On Thu, 24 Jun 2021 at 03:15, Mart?n > wrote: > > I'm looking for documentation for the control WebView because in > gambas > wiki is blank or some sample program on this version of WebView. > > I share here a project which i use for learning and testing. > > I want to change the text content and text style like as text editor > program. > > Could be possible someone do this changes in the code an share, in > order > to understand how it works. > > Thanks. > > > On 23/6/21 23:09, Beno?t Minisini wrote: > > Le 23/06/2021 ? 22:58, Mart?n a ?crit?: > >> Hello, > >> > >> I'm trying to find documentation or a usage example about the > webview > >> control for gb.gui but I can't find anything. > >> > >> I have already searched in [1] but the page is blank. > >> > >> [1] > >> > https://gambaswiki.org/wiki/comp/gb.qt5.webview/webview/execjavascript > > >> > >> Would it be possible that someone could give me some information > >> about it? > >> > >> Also I use this > >> > >> WebView1.ExecJavascript("document.execCommand('foreColor', false, > >> 'red');") > >> > >> But doesn't work > >> > >> Thanks. > >> > >> > >> > >> ----[ http://gambaswiki.org/wiki/doc/netiquette > ]---- > > > > This is the javascript execution of WebKit, you can find the > > documentation in the Qt documentation or WebKitGtk documentation, > > depending on which one you use. > > > > But you won't find any information more than "execute javascript in > > the context of the browser page". > > > > Regards, > > > > ----[ http://gambaswiki.org/wiki/doc/netiquette > ]---- > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 30458 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 30103 bytes Desc: not available URL: From claude.dessere at orange.fr Fri Jun 25 14:06:15 2021 From: claude.dessere at orange.fr (CD) Date: Fri, 25 Jun 2021 14:06:15 +0200 Subject: [Gambas-user] User Digest, Vol 45, Issue 61 In-Reply-To: References: Message-ID: <58138a685afc7a64603eb16cf809860f0f393771.camel@orange.fr> Le vendredi 25 juin 2021 ? 11:12 +0200, user-request at lists.gambas-basic.org a ?crit : > Send User mailing list submissions to > > user at lists.gambas-basic.org > > > To subscribe or unsubscribe via the World Wide Web, visit > > http://lists.gambas-basic.org/listinfo/user > > or, via email, send a message with subject or body 'help' to > > user-request at lists.gambas-basic.org > > > You can reach the person managing the list at > > user-owner at lists.gambas-basic.org > > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of User digest..." > Today's Topics: > > 1. Re: Latest ppa: bad package dependencies (bb) > 2. Some questions about Component/Classes/Symbols (CD) > 3. Some questions about Component/Classes/Symbols (Text format) (CD) > 4. Re: Some questions about Component/Classes/Symbols (Text > format) (Beno?t Minisini) > 5. Re: Some questions about Component/Classes/Symbols (Text > format) (bb) > 6. Re: Some questions about Component/Classes/Symbols (Text > format) (Beno?t Minisini) > ----[ Gambas mailing-list is hosted by > https://www.hostsharing.net > ]---- > >> 2) Why in the *; list files in the same directory/usr/share/gambas3/info >> some class names are followed by an exclamation mark "!", others don't? >Why do you want to know that? This is an implementation detail not meant >to be used publicly. -Because I am naturally curious -that I thoroughly explore your programming software -that you shouldn't be surprised that we are interested in all aspects of Gambas -and that for me the /usr/share/gambas3/info directory is public ... moreover i wrote two components, and like in the installed components, some of the classes i implemented have this "!" character, some don't. After careful examination I did not find a reason !!!!!!!!! Regards From bsteers4 at gmail.com Fri Jun 25 15:20:42 2021 From: bsteers4 at gmail.com (Bruce Steers) Date: Fri, 25 Jun 2021 14:20:42 +0100 Subject: [Gambas-user] Some documentation for webview in 3.16 execjavascript ?? In-Reply-To: <91315f64-608c-459d-2899-67e83dd48096@belmotek.net> References: <50aa12c8-7a61-327c-7b25-d2e08ac6dd19@belmotek.net> <27a7a744-c749-6ed4-73fc-c8849ef3e9b1@gmail.com> <91315f64-608c-459d-2899-67e83dd48096@belmotek.net> Message-ID: gtk webview docs clearly says it does what the qt5 webview does so refer to qt5 webview docs http://gambaswiki.org/wiki/comp/gb.qt5.webview/webview/ http://gambaswiki.org/wiki/comp/gb.qt5.webview/webview/execjavascript BruceS On Fri, 25 Jun 2021 at 11:02, Martin wrote: > what I would like to know is, if it is possible or not, to send javascript > commands to the WebView control of the gb.gtk3.webview component, of course > without enabling gb.qt5.webkit in the project, since that would imply > disabling gb.gtk3.webview. > On 24/6/21 17:16, John Dovey wrote: > > I was hoping there would be documentation on webview for qt4, but no > luck... circular reference :-( > > [image: image.png] > > [image: image.png] > > On Thu, 24 Jun 2021 at 03:15, Mart?n wrote: > >> I'm looking for documentation for the control WebView because in gambas >> wiki is blank or some sample program on this version of WebView. >> >> I share here a project which i use for learning and testing. >> >> I want to change the text content and text style like as text editor >> program. >> >> Could be possible someone do this changes in the code an share, in order >> to understand how it works. >> >> Thanks. >> >> >> On 23/6/21 23:09, Beno?t Minisini wrote: >> > Le 23/06/2021 ? 22:58, Mart?n a ?crit : >> >> Hello, >> >> >> >> I'm trying to find documentation or a usage example about the webview >> >> control for gb.gui but I can't find anything. >> >> >> >> I have already searched in [1] but the page is blank. >> >> >> >> [1] >> >> https://gambaswiki.org/wiki/comp/gb.qt5.webview/webview/execjavascript >> >> >> >> Would it be possible that someone could give me some information >> >> about it? >> >> >> >> Also I use this >> >> >> >> WebView1.ExecJavascript("document.execCommand('foreColor', false, >> >> 'red');") >> >> >> >> But doesn't work >> >> >> >> Thanks. >> >> >> >> >> >> >> >> ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- >> > >> > This is the javascript execution of WebKit, you can find the >> > documentation in the Qt documentation or WebKitGtk documentation, >> > depending on which one you use. >> > >> > But you won't find any information more than "execute javascript in >> > the context of the browser page". >> > >> > Regards, >> > >> >> ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- >> > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 30458 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 30103 bytes Desc: not available URL: From bsteers4 at gmail.com Fri Jun 25 23:24:36 2021 From: bsteers4 at gmail.com (Bruce Steers) Date: Fri, 25 Jun 2021 22:24:36 +0100 Subject: [Gambas-user] Some documentation for webview in 3.16 execjavascript ?? In-Reply-To: <91315f64-608c-459d-2899-67e83dd48096@belmotek.net> References: <50aa12c8-7a61-327c-7b25-d2e08ac6dd19@belmotek.net> <27a7a744-c749-6ed4-73fc-c8849ef3e9b1@gmail.com> <91315f64-608c-459d-2899-67e83dd48096@belmotek.net> Message-ID: On Fri, 25 Jun 2021 at 11:02, Martin wrote: > what I would like to know is, if it is possible or not, to send javascript > commands to the WebView control of the gb.gtk3.webview component, of course > without enabling gb.qt5.webkit in the project, since that would imply > disabling gb.gtk3.webview. > The Gambas IDE uses a webview and Javascript controls (with either qt or gtk) when you preview a html/md document. You can use Benoits code as an example. it is in the FTextEditor.class https://gitlab.com/gambas/gambas/-/blob/master/app/src/gambas3/.src/Editor/Code/FTextEditor.class Line 1779 Public Sub Preview_Ready() and line 1790 Private Sub RefreshPreview(Optional bReload As Boolean) Maybe that helps. BruceS -------------- next part -------------- An HTML attachment was scrubbed... URL: From adamnt42 at gmail.com Sat Jun 26 17:11:41 2021 From: adamnt42 at gmail.com (bb) Date: Sun, 27 Jun 2021 00:41:41 +0930 Subject: [Gambas-user] Latest ppa: bad package dependencies In-Reply-To: <6495eb71f6ae91c1392cf9b67d78d5329e38c87e.camel@gmail.com> References: <67bf213d-97ec-3f73-5f18-291eaa124273@gmail.com> <6495eb71f6ae91c1392cf9b67d78d5329e38c87e.camel@gmail.com> Message-ID: <511589f9941d7dfa2840a7f325800770d7013b9a.camel@gmail.com> On Fri, 2021-06-25 at 11:57 +0930, bb wrote: > On Fri, 2021-06-25 at 11:49 +0930, bb wrote: > > On Fri, 2021-06-25 at 03:38 +0200, Beno?t Minisini wrote: > > > Le 25/06/2021 ? 03:34, bb a ?crit : > > > > There are two issues here. > > > > 1) The dependencies for the target package are including > > > > dependencies > > > > on libraries that are only defined for the development work. > > > > IOW > > > > a > > > > library listed in the Project Properties "Libraries" tab is > > > > being > > > > included in the dependencies for the Ubuntu package. The > > > > library > > > > is > > > > NOT > > > > included in the Project Properties "Information" tab. > > > > 2) The dependency is misnamed. It looks for a package named > > > > with > > > > the > > > > FULL vendor name rather than the vendor prefix, when both are > > > > defined > > > > in the packaging wizard. > > > > I'll leave this post at this length ATM. > > > > > > > > bruce > > > > > > > > > > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > > > > > > > > > > I don't understand what you are talking about. > > > OK, I figured it out, the problem that is, not the fix. What is happening is that I am jumping in and out of different projects without restarting the IDE and I am building installation packages and installing them as I go. This is for a new infrastructure build here. What seems to be happening is that when I load a different project over the top of the one that is current in the IDE the old project components are not getting cleared and the new ones are "not loading". I know components cannot be unloaded. So is it even possible that my problem can be fixed? The "issue" I originally posted seems to be a side effect of this and is not the real problem. regards bruce From chrisml at deganius.de Sun Jun 27 08:28:50 2021 From: chrisml at deganius.de (Christof Thalhofer) Date: Sun, 27 Jun 2021 08:28:50 +0200 Subject: [Gambas-user] Latest ppa: bad package dependencies In-Reply-To: <511589f9941d7dfa2840a7f325800770d7013b9a.camel@gmail.com> References: <67bf213d-97ec-3f73-5f18-291eaa124273@gmail.com> <6495eb71f6ae91c1392cf9b67d78d5329e38c87e.camel@gmail.com> <511589f9941d7dfa2840a7f325800770d7013b9a.camel@gmail.com> Message-ID: <3d8fae65-d12a-9adc-a952-4764465f0801@deganius.de> Am 26.06.21 um 17:11 schrieb bb: > OK, I figured it out, the problem that is, not the fix. > > What is happening is that I am jumping in and out of different projects > without restarting the IDE and I am building installation packages and > installing them as I go. This is for a new infrastructure build here. > > What seems to be happening is that when I load a different project over > the top of the one that is current in the IDE the old project > components are not getting cleared and the new ones are "not loading". > > I know components cannot be unloaded. So is it even possible that my > problem can be fixed? > > The "issue" I originally posted seems to be a side effect of this and > is not the real problem. In earlier posts you talked about libs. I sometimes have this or a similar problem when i have old or broken libraries from the development process kept in ~/.local/share/gambas3/lib/myvenddorname and also installed the correct versions of these libraries from installation packages which then reside in /usr/lib/gambas3/deganius/myvenddorname. Then i frequently wonder why my software does not work correctly because Gambas always looks at first after the existence of the library in ~/.local/share/gambas3/lib. If there's a broken lib it will crash. So if problems happen after installing a new software package which installs libraries my standard procedure on this development machine is a resolute: rm ~/.local/share/gambas3/lib/myvenddorname/* But for me, however, this is not a problem that needs to be fixed in Gambas. Alles Gute Christof Thalhofer -- Dies ist keine Signatur From adamnt42 at gmail.com Sun Jun 27 08:49:34 2021 From: adamnt42 at gmail.com (bb) Date: Sun, 27 Jun 2021 16:19:34 +0930 Subject: [Gambas-user] Latest ppa: bad package dependencies In-Reply-To: <3d8fae65-d12a-9adc-a952-4764465f0801@deganius.de> References: <67bf213d-97ec-3f73-5f18-291eaa124273@gmail.com> <6495eb71f6ae91c1392cf9b67d78d5329e38c87e.camel@gmail.com> <511589f9941d7dfa2840a7f325800770d7013b9a.camel@gmail.com> <3d8fae65-d12a-9adc-a952-4764465f0801@deganius.de> Message-ID: <40e2b70cbb144ab35ef955092c6be057181ef894.camel@gmail.com> On Sun, 2021-06-27 at 08:28 +0200, Christof Thalhofer wrote: > Am 26.06.21 um 17:11 schrieb bb: > > > OK, I figured it out, the problem that is, not the fix. > > > > What is happening is that I am jumping in and out of different > > projects > > without restarting the IDE and I am building installation packages > > and > > installing them as I go. This is for a new infrastructure build > > here. > > > > What seems to be happening is that when I load a different project > > over > > the top of the one that is current in the IDE the old project > > components are not getting cleared and the new ones are "not > > loading". > > > > I know components cannot be unloaded. So is it even possible that > > my > > problem can be fixed? > > > > The "issue" I originally posted seems to be a side effect of this > > and > > is not the real problem. > > In earlier posts you talked about libs. > > I sometimes have this or a similar problem when i have old or broken > libraries from the development process kept in > > ~/.local/share/gambas3/lib/myvenddorname > > and also installed the correct versions of these libraries from > installation packages which then reside in > > /usr/lib/gambas3/deganius/myvenddorname. > > Then i frequently wonder why my software does not work correctly > because > Gambas always looks at first after the existence of the library in > > ~/.local/share/gambas3/lib. > > If there's a broken lib it will crash. > > So if problems happen after installing a new software package which > installs libraries my standard procedure on this development machine > is > a resolute: > > rm ~/.local/share/gambas3/lib/myvenddorname/* > > But for me, however, this is not a problem that needs to be fixed in > Gambas. > > Alles Gute > > Christof Thalhofer > Yes, I agree. What I am wondering though is whether MY USAGE problem (loading a new project in the IDE) CAN actually be fixed? I only noticed it when I loaded and ran a little project that looks at what components exist and can be loaded. It showed that all the components used in the previous project were still loaded - which was a bit surprising until I thought about it. If I load it in a new instance of the IDE it just lists gb, gb.debug and gb.eval as being loaded - which is quite correct. Re your libraries matters, yes that's why I wrote that gibberish in http://gambaswiki.org/wiki/doc/library?nl back in 2017. I wonder if it is all still true? (I do note that someone has added some misdirectional info about libraries vs components which is both untrue and IMO should not have been added.) b From chrisml at deganius.de Sun Jun 27 10:40:11 2021 From: chrisml at deganius.de (Christof Thalhofer) Date: Sun, 27 Jun 2021 10:40:11 +0200 Subject: [Gambas-user] Latest ppa: bad package dependencies In-Reply-To: <40e2b70cbb144ab35ef955092c6be057181ef894.camel@gmail.com> References: <67bf213d-97ec-3f73-5f18-291eaa124273@gmail.com> <6495eb71f6ae91c1392cf9b67d78d5329e38c87e.camel@gmail.com> <511589f9941d7dfa2840a7f325800770d7013b9a.camel@gmail.com> <3d8fae65-d12a-9adc-a952-4764465f0801@deganius.de> <40e2b70cbb144ab35ef955092c6be057181ef894.camel@gmail.com> Message-ID: <3b8bf910-0dde-57dd-bf2b-3f12292ad85d@deganius.de> Am 27.06.21 um 08:49 schrieb bb: > Yes, I agree. Ok, I told you sth you already know. > What I am wondering though is whether MY USAGE problem (loading a new > project in the IDE) CAN actually be fixed? I only noticed it when I > loaded and ran a little project that looks at what components exist and > can be loaded. It showed that all the components used in the previous > project were still loaded - which was a bit surprising until I thought > about it. If I load it in a new instance of the IDE it just lists gb, > gb.debug and gb.eval as being loaded - which is quite correct. Hmm, this should not be the case. And I cannot reproduce this behavior here. If I load a project that requires a certain set of components and then another that requires a different set, the correct components are loaded for both no matter how many times I repeat it and even if I do it the other way around. Can that have something to do with "that looks at what components exist"? Alles Gute Christof Thalhofer -- Dies ist keine Signatur From adamnt42 at gmail.com Sun Jun 27 11:30:19 2021 From: adamnt42 at gmail.com (bb) Date: Sun, 27 Jun 2021 19:00:19 +0930 Subject: [Gambas-user] Latest ppa: bad package dependencies In-Reply-To: <3b8bf910-0dde-57dd-bf2b-3f12292ad85d@deganius.de> References: <67bf213d-97ec-3f73-5f18-291eaa124273@gmail.com> <6495eb71f6ae91c1392cf9b67d78d5329e38c87e.camel@gmail.com> <511589f9941d7dfa2840a7f325800770d7013b9a.camel@gmail.com> <3d8fae65-d12a-9adc-a952-4764465f0801@deganius.de> <40e2b70cbb144ab35ef955092c6be057181ef894.camel@gmail.com> <3b8bf910-0dde-57dd-bf2b-3f12292ad85d@deganius.de> Message-ID: <603c23e8afa96f43b7cd151bcb639046ae56d692.camel@gmail.com> On Sun, 2021-06-27 at 10:40 +0200, Christof Thalhofer wrote: > Am 27.06.21 um 08:49 schrieb bb: > > > Yes, I agree. > > Ok, I told you sth you already know. > > > What I am wondering though is whether MY USAGE problem (loading a > > new > > project in the IDE) CAN actually be fixed? I only noticed it when I > > loaded and ran a little project that looks at what components exist > > and > > can be loaded. It showed that all the components used in the > > previous > > project were still loaded - which was a bit surprising until I > > thought > > about it. If I load it in a new instance of the IDE it just lists > > gb, > > gb.debug and gb.eval as being loaded - which is quite correct. > > Hmm, this should not be the case. And I cannot reproduce this > behavior > here. If I load a project that requires a certain set of components > and > then another that requires a different set, the correct components > are > loaded for both no matter how many times I repeat it and even if I do > it > the other way around. > > Can that have something to do with "that looks at what components > exist"? > > Alles Gute > > Christof Thalhofer > Christof, Thank you for a) taking the time to look at this :-) b) your answer :-( Which was was I was afraid of. It's something that is happening here only. By way of background, we are trying to move away from the distro we have used for perhaps a decade or more (PCLinuxOS) which is a rolling release rpm based system to something more "cough" stable. The reason being that the recent upstream updates to Xorg have been disastrough for our purposes. So, at the moment I am trying to see if we can base the co-op on Mint. I was attracted to the Cinnamon desktop. Fine for me but when I started to migrate our stuff to our source code server all kinds of stuff has hit the proverbiable "air movement device". For your interest I have attached a copy of the little project that looks at what components are installed. It would probably need a bit of tender care (with a hammer) to get it to run on whatever your system is. I have also attached a picture of the madness I am trying to set up in terms of custom control components and libraries. Aaaaaaaaaaaaaaaaarrrrrrrrrrrrrrrrrrggggggggggghhhhhhhhhhhhh! After a reboot the component checker is now working perfectly correctly. I may have to go and sit in the corner under a warm blanket for a while.?>:-) Rather than put us all through the email poisons, the code for that project is simply: ' Gambas module file ''' This is for checking which Paddys-Hill components have been installed. Public Sub Main() Dim hComp As Component Dim aList As String[] Dim idx As Integer Dim sComp As String ' For Mint! Dim sPath As String = "/lib/gambas3" aList = Dir(sPath, "ph*.Gambas") aList.Sort ' Print aList.Join("\n") For idx = 0 To aList.Max sComp = File.BaseName(aList[idx]) If Not Component.IsLoaded(sComp) Then Print "*"; Try Component.Load(sComp) If Error Then Print "!"; ' Error.Text Error.Clear Endif Endif Print idx + 1, sComp ', Components[sComp].Version Next End thanks again bruce -------------- next part -------------- A non-text attachment was scrubbed... Name: build dependencies.png Type: image/png Size: 35893 bytes Desc: not available URL: From mbelmonte at belmotek.net Sun Jun 27 11:44:28 2021 From: mbelmonte at belmotek.net (Martin) Date: Sun, 27 Jun 2021 11:44:28 +0200 Subject: [Gambas-user] Some documentation for webview in 3.16 execjavascript ?? In-Reply-To: References: <50aa12c8-7a61-327c-7b25-d2e08ac6dd19@belmotek.net> <27a7a744-c749-6ed4-73fc-c8849ef3e9b1@gmail.com> <91315f64-608c-459d-2899-67e83dd48096@belmotek.net> Message-ID: <21e3cbdc-575b-6536-80b8-67e9ec3ce64f@belmotek.net> ok, i use this code snippet from FTextEditor.class Public Sub Preview_Ready() ? If $bMovePreviewOnReady Then ??? $bMovePreviewOnReady = False ??? Try $hPreview.ExecJavascript("goto_line(" & CStr($hEditor.Line) & ");") ??? If Error Then Error Error.Text ? Endif ? $bPreviewReady = True End Then i use in my sample project this: Public Sub tobColor_Click() ???? Try WebView1.ExecJavascript("goto_line(" & CStr(2) & ");") ???? If Error Then Error Error.Text ? WebView1.SetFocus() End thi error was returned: Javascript error: TypeError: undefined is not a function On 25/6/21 23:24, Bruce Steers wrote: > > > On Fri, 25 Jun 2021 at 11:02, Martin > wrote: > > what I would like to know is, if it is possible or not, to send > javascript commands to the WebView control of the gb.gtk3.webview > component, of course without enabling gb.qt5.webkit in the > project, since that would imply disabling gb.gtk3.webview. > > > The Gambas IDE uses a webview and Javascript controls (with either qt > or gtk) when you preview a html/md document. > > You can use Benoits code as an example. > it is in the FTextEditor.class > https://gitlab.com/gambas/gambas/-/blob/master/app/src/gambas3/.src/Editor/Code/FTextEditor.class > > > Line 1779? Public Sub Preview_Ready() > and > line 1790 Private Sub RefreshPreview(Optional bReload As Boolean) > > Maybe that helps. > BruceS > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: From mbelmonte at belmotek.net Sun Jun 27 11:58:05 2021 From: mbelmonte at belmotek.net (Martin) Date: Sun, 27 Jun 2021 11:58:05 +0200 Subject: [Gambas-user] Why are some components not available? Message-ID: I have installed Gambas from source (master) following the steps indicated in the wiki, and installing the dependencies for my distribution (debian testing) but the result is that some components are not available. Can anyone tell me if the same thing happens to them? Any idea how to fix it? * gb.chart * gb.mysql * gb.poppler * gb.term.form Best regards. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bagonergi at gmail.com Sun Jun 27 12:05:11 2021 From: bagonergi at gmail.com (Gianluigi) Date: Sun, 27 Jun 2021 12:05:11 +0200 Subject: [Gambas-user] Why are some components not available? In-Reply-To: References: Message-ID: Il giorno dom 27 giu 2021 alle ore 11:59 Martin ha scritto: > I have installed Gambas from source (master) following the steps indicated > in the wiki, and installing the dependencies for my distribution (debian > testing) but the result is that some components are not available. > Can anyone tell me if the same thing happens to them? > Any idea how to fix it? > > - gb.chart > - gb.mysql > - gb.poppler > - gb.term.form > > Best regards. > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > Where did you get the dependencies from? The ones you get from this document should work: https://gitlab.com/gambas/gambas/-/blob/master/.gitlab-ci.yml Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Sun Jun 27 12:05:27 2021 From: bsteers4 at gmail.com (Bruce Steers) Date: Sun, 27 Jun 2021 11:05:27 +0100 Subject: [Gambas-user] Why are some components not available? In-Reply-To: References: Message-ID: What is your output from... ./configure -C -q Did it say "all components will be compiled"? BruceS On Sun, 27 Jun 2021, 10:59 Martin, wrote: > I have installed Gambas from source (master) following the steps indicated > in the wiki, and installing the dependencies for my distribution (debian > testing) but the result is that some components are not available. > Can anyone tell me if the same thing happens to them? > Any idea how to fix it? > > - gb.chart > - gb.mysql > - gb.poppler > - gb.term.form > > Best regards. > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mbelmonte at belmotek.net Sun Jun 27 12:17:35 2021 From: mbelmonte at belmotek.net (Martin) Date: Sun, 27 Jun 2021 12:17:35 +0200 Subject: [Gambas-user] Why are some components not available? In-Reply-To: References: Message-ID: <44c5e07e-0f57-ac37-3eab-d45c76ae35ff@belmotek.net> I get the dependencies from the web page: http://gambaswiki.org/wiki/install#t11 buy I made again some check using: https://gitlab.com/gambas/gambas/-/blob/master/.gitlab-ci.yml and no missing packages. Thanks. On 27/6/21 12:05, Gianluigi wrote: > > > Il giorno dom 27 giu 2021 alle ore 11:59 Martin > > ha scritto: > > I have installed Gambas from source (master) following the steps > indicated in the wiki, and installing the dependencies for my > distribution (debian testing) but the result is that some > components are not available. > Can anyone tell me if the same thing happens to them? > Any idea how to fix it? > > * gb.chart > * gb.mysql > * gb.poppler > * gb.term.form > > Best regards. > > > ----[ http://gambaswiki.org/wiki/doc/netiquette > ]---- > > > Where did you get the dependencies from? > The ones you get from this document should work: > https://gitlab.com/gambas/gambas/-/blob/master/.gitlab-ci.yml > > > Regards > Gianluigi > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: From bagonergi at gmail.com Sun Jun 27 12:30:22 2021 From: bagonergi at gmail.com (Gianluigi) Date: Sun, 27 Jun 2021 12:30:22 +0200 Subject: [Gambas-user] Why are some components not available? In-Reply-To: <44c5e07e-0f57-ac37-3eab-d45c76ae35ff@belmotek.net> References: <44c5e07e-0f57-ac37-3eab-d45c76ae35ff@belmotek.net> Message-ID: Il giorno dom 27 giu 2021 alle ore 12:18 Martin ha scritto: > I get the dependencies from the web page: > > http://gambaswiki.org/wiki/install#t11 > > buy I made again some check using: > > https://gitlab.com/gambas/gambas/-/blob/master/.gitlab-ci.yml > > and no missing packages. > > Thanks. > Have you tried giving these commands from the terminal? cd in your folder with Gambas sudo make uninstall cd rm -rf your folder with Gambas/ git clone --depth=1 https://gitlab.com/gambas/gambas.git gambasdevel cd gambasdevel ./reconf-all && ./configure -C make && LANG="C" sudo make install Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From mbelmonte at belmotek.net Sun Jun 27 12:48:51 2021 From: mbelmonte at belmotek.net (Martin) Date: Sun, 27 Jun 2021 12:48:51 +0200 Subject: [Gambas-user] Why are some components not available? In-Reply-To: References: Message-ID: <9f91b731-39f1-d883-309f-4a18fecbd843@belmotek.net> I don't use that exactly, but: ./configure -C --disable-keyring --disable-sqlite2 --disable-qt4 --disable-qtwebkit which is what the wiki recommends for debian testing, and the output was: || ALL COMPONENTS WILL BE COMPILED I will made again the process and see what happens. ?What is the -q option in ./configure -C -q? Regards. On 27/6/21 12:05, Bruce Steers wrote: > ./configure -C -q From adamnt42 at gmail.com Sun Jun 27 12:52:37 2021 From: adamnt42 at gmail.com (bb) Date: Sun, 27 Jun 2021 20:22:37 +0930 Subject: [Gambas-user] Some documentation for webview in 3.16 execjavascript ?? In-Reply-To: <21e3cbdc-575b-6536-80b8-67e9ec3ce64f@belmotek.net> References: <50aa12c8-7a61-327c-7b25-d2e08ac6dd19@belmotek.net> <27a7a744-c749-6ed4-73fc-c8849ef3e9b1@gmail.com> <91315f64-608c-459d-2899-67e83dd48096@belmotek.net> <21e3cbdc-575b-6536-80b8-67e9ec3ce64f@belmotek.net> Message-ID: <07c7dfefd8003143206057f4f949ca64ccb91d0c.camel@gmail.com> On Sun, 2021-06-27 at 11:44 +0200, Martin wrote: > ok, i use this code snippet from FTextEditor.class > etc Martin, You really will have to do some web searching on the underlying QT webthingo. What QT is doing is using some upstream shared libraries that provide the QT webthing with features. Gambas is using the QT webthing as the basis for its component. If I recall correctly I went through a similar problem about 2 years ago. All I can remember is this, the JavaScript or the ExecJavaScript functions in QT do not actually allow "arbitrary" javascript. (WebKit? Was that it? No, I dont think so) >From memory, there were only some really basic things you could do. Imagine if it let you do what ever you wanted, redirects, nasty code injection, header rewrites etc. I am sorry, but I'm a bit too busy at the moment to offer more. regards bruce From adamnt42 at gmail.com Sun Jun 27 12:54:49 2021 From: adamnt42 at gmail.com (bb) Date: Sun, 27 Jun 2021 20:24:49 +0930 Subject: [Gambas-user] Why are some components not available? In-Reply-To: <9f91b731-39f1-d883-309f-4a18fecbd843@belmotek.net> References: <9f91b731-39f1-d883-309f-4a18fecbd843@belmotek.net> Message-ID: <7627cdcf4740ae498090c337158fa03d55853c0c.camel@gmail.com> On Sun, 2021-06-27 at 12:48 +0200, Martin wrote: > I don't use that exactly, but: > > ./configure -C --disable-keyring --disable-sqlite2 --disable-qt4 > --disable-qtwebkit > > which is what the wiki recommends for debian testing, and the output > was: > > > > ALL COMPONENTS WILL BE COMPILED > > I will made again the process and see what happens. > > ?What is the -q option in ./configure -C -q? > > Regards. > > On 27/6/21 12:05, Bruce Steers wrote: > > ./configure -C -q > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -q prints out a lot less "interesting" information. Just warnings and errors. bruce (the little b one) From bsteers4 at gmail.com Sun Jun 27 12:56:08 2021 From: bsteers4 at gmail.com (Bruce Steers) Date: Sun, 27 Jun 2021 11:56:08 +0100 Subject: [Gambas-user] Why are some components not available? In-Reply-To: <9f91b731-39f1-d883-309f-4a18fecbd843@belmotek.net> References: <9f91b731-39f1-d883-309f-4a18fecbd843@belmotek.net> Message-ID: Using -q makes it only output errors and not all the normal checking info. If all components are compiling then maybe use gianluigi suggestions of reinstall but manually delete gambas3 folders from usr/lib and usr/share to force reinstall. It's a guess though. I do not know why your components are missing. BruceS On Sun, 27 Jun 2021, 11:49 Martin, wrote: > I don't use that exactly, but: > > ./configure -C --disable-keyring --disable-sqlite2 --disable-qt4 > --disable-qtwebkit > > which is what the wiki recommends for debian testing, and the output was: > > || ALL COMPONENTS WILL BE COMPILED > > I will made again the process and see what happens. > > ?What is the -q option in ./configure -C -q? > > Regards. > > On 27/6/21 12:05, Bruce Steers wrote: > > ./configure -C -q > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mbelmonte at belmotek.net Sun Jun 27 12:57:57 2021 From: mbelmonte at belmotek.net (Martin) Date: Sun, 27 Jun 2021 12:57:57 +0200 Subject: [Gambas-user] Why are some components not available? In-Reply-To: References: <44c5e07e-0f57-ac37-3eab-d45c76ae35ff@belmotek.net> Message-ID: ok, i doing now your recipe. then i tell you the results. regards. On 27/6/21 12:30, Gianluigi wrote: > > > Il giorno dom 27 giu 2021 alle ore 12:18 Martin > > ha scritto: > > I get the dependencies from the web page: > > http://gambaswiki.org/wiki/install#t11 > > > buy I made again some check using: > > https://gitlab.com/gambas/gambas/-/blob/master/.gitlab-ci.yml > > > and no missing packages. > > Thanks. > > > Have you tried giving these commands from the terminal? > > cd in your folder with Gambas > > sudo make uninstall > > cd > > rm -rf your folder with Gambas/ > > git clone --depth=1 https://gitlab.com/gambas/gambas.git > gambasdevel > > cd gambasdevel > > ./reconf-all && ./configure -C > > make && LANG="C" sudo make install > > Regards > Gianluigi > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: From mbelmonte at belmotek.net Sun Jun 27 13:04:14 2021 From: mbelmonte at belmotek.net (Martin) Date: Sun, 27 Jun 2021 13:04:14 +0200 Subject: [Gambas-user] Some documentation for webview in 3.16 execjavascript ?? In-Reply-To: <07c7dfefd8003143206057f4f949ca64ccb91d0c.camel@gmail.com> References: <50aa12c8-7a61-327c-7b25-d2e08ac6dd19@belmotek.net> <27a7a744-c749-6ed4-73fc-c8849ef3e9b1@gmail.com> <91315f64-608c-459d-2899-67e83dd48096@belmotek.net> <21e3cbdc-575b-6536-80b8-67e9ec3ce64f@belmotek.net> <07c7dfefd8003143206057f4f949ca64ccb91d0c.camel@gmail.com> Message-ID: <1b478589-08f5-aa5e-2cb4-87af060fd4a4@belmotek.net> Hi, the trouble here is webkit (is only for qt components), i intent to use only gui components, so i not using webkit component only webview component and this may not work. Take it eassy, Time is like that, never enough. On 27/6/21 12:52, bb wrote: > From memory, there were only some really basic things you could do. > Imagine if it let you do what ever you wanted, redirects, nasty code > injection, header rewrites etc. > > I am sorry, but I'm a bit too busy at the moment to offer more. From mbelmonte at belmotek.net Sun Jun 27 13:21:49 2021 From: mbelmonte at belmotek.net (Martin) Date: Sun, 27 Jun 2021 13:21:49 +0200 Subject: [Gambas-user] Why are some components not available? In-Reply-To: References: <44c5e07e-0f57-ac37-3eab-d45c76ae35ff@belmotek.net> Message-ID: <173e3dd6-3d2f-ebbc-4994-203dc3d415ae@belmotek.net> ok, i finish try you recipe. but gb.poppler steel disabled. Regards. On 27/6/21 12:30, Gianluigi wrote: > Have you tried giving these commands from the terminal? > > cd in your folder with Gambas > > sudo make uninstall > > cd > > rm -rf your folder with Gambas/ > > git clone --depth=1 https://gitlab.com/gambas/gambas.git > gambasdevel > > cd gambasdevel > > ./reconf-all && ./configure -C > > make && LANG="C" sudo make install > > Regards > Gianluigi -------------- next part -------------- A non-text attachment was scrubbed... Name: Captura de pantalla de 2021-06-27 13-19-29.png Type: image/png Size: 112906 bytes Desc: not available URL: From mbelmonte at belmotek.net Sun Jun 27 13:25:05 2021 From: mbelmonte at belmotek.net (Martin) Date: Sun, 27 Jun 2021 13:25:05 +0200 Subject: [Gambas-user] Why are some components not available? In-Reply-To: References: <44c5e07e-0f57-ac37-3eab-d45c76ae35ff@belmotek.net> Message-ID: after that: || || THESE COMPONENTS ARE DISABLED: || - gb.db.sqlite2 || - gb.desktop.gnome.keyring || - gb.qt4 || - gb.qt4.ext || - gb.qt4.opengl || - gb.qt4.webkit || - gb.qt4.webview || On 27/6/21 12:30, Gianluigi wrote: > ./reconf-all && ./configure -C From bagonergi at gmail.com Sun Jun 27 13:29:47 2021 From: bagonergi at gmail.com (Gianluigi) Date: Sun, 27 Jun 2021 13:29:47 +0200 Subject: [Gambas-user] Why are some components not available? In-Reply-To: References: <44c5e07e-0f57-ac37-3eab-d45c76ae35ff@belmotek.net> Message-ID: Il giorno dom 27 giu 2021 alle ore 13:26 Martin ha scritto: > after that: > > || > || THESE COMPONENTS ARE DISABLED: > || - gb.db.sqlite2 > || - gb.desktop.gnome.keyring > || - gb.qt4 > || - gb.qt4.ext > || - gb.qt4.opengl > || - gb.qt4.webkit > || - gb.qt4.webview > || > > On 27/6/21 12:30, Gianluigi wrote: > > ./reconf-all && ./configure -C > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > Everything seems OK gb.poppler is correct so, have you tried to use it? Look at the farm project Documnt ViewPdfZoomDialog Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From bagonergi at gmail.com Sun Jun 27 17:14:20 2021 From: bagonergi at gmail.com (Gianluigi) Date: Sun, 27 Jun 2021 17:14:20 +0200 Subject: [Gambas-user] Why are some components not available? In-Reply-To: References: <44c5e07e-0f57-ac37-3eab-d45c76ae35ff@belmotek.net> Message-ID: Il giorno dom 27 giu 2021 alle ore 13:29 Gianluigi ha scritto: > > > Il giorno dom 27 giu 2021 alle ore 13:26 Martin > ha scritto: > >> after that: >> >> || >> || THESE COMPONENTS ARE DISABLED: >> || - gb.db.sqlite2 >> || - gb.desktop.gnome.keyring >> || - gb.qt4 >> || - gb.qt4.ext >> || - gb.qt4.opengl >> || - gb.qt4.webkit >> || - gb.qt4.webview >> || >> >> On 27/6/21 12:30, Gianluigi wrote: >> > ./reconf-all && ./configure -C >> >> ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- >> > > I forgot, I don't know which Debian you have exactly, I have Ubuntu 20.04 > LTS and besides libsqlite3-dev I also installed libsqlite0-dev library > which is needed for sqlite2. > gb.db.sqlite2 on my Gambas is enabled. > > Regards > Gianluigi > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Sun Jun 27 18:24:24 2021 From: bsteers4 at gmail.com (Bruce Steers) Date: Sun, 27 Jun 2021 17:24:24 +0100 Subject: [Gambas-user] Why are some components not available? In-Reply-To: References: <44c5e07e-0f57-ac37-3eab-d45c76ae35ff@belmotek.net> Message-ID: Are you sure the components you speak of are "missing" things like gb.form.term and gb.chart are "greyed" in the component chooser but you can still select them, they are greyed because they are "unstable" components. BruceS On Sun, 27 Jun 2021 at 16:15, Gianluigi wrote: > > > Il giorno dom 27 giu 2021 alle ore 13:29 Gianluigi > ha scritto: > >> >> >> Il giorno dom 27 giu 2021 alle ore 13:26 Martin >> ha scritto: >> >>> after that: >>> >>> || >>> || THESE COMPONENTS ARE DISABLED: >>> || - gb.db.sqlite2 >>> || - gb.desktop.gnome.keyring >>> || - gb.qt4 >>> || - gb.qt4.ext >>> || - gb.qt4.opengl >>> || - gb.qt4.webkit >>> || - gb.qt4.webview >>> || >>> >>> On 27/6/21 12:30, Gianluigi wrote: >>> > ./reconf-all && ./configure -C >>> >>> ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- >>> >> >> I forgot, I don't know which Debian you have exactly, I have Ubuntu 20.04 >> LTS and besides libsqlite3-dev I also installed libsqlite0-dev library >> which is needed for sqlite2. >> gb.db.sqlite2 on my Gambas is enabled. >> >> Regards >> Gianluigi >> > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From brian at westwoodsvcs.com Mon Jun 28 03:14:46 2021 From: brian at westwoodsvcs.com (Brian G) Date: Sun, 27 Jun 2021 18:14:46 -0700 (PDT) Subject: [Gambas-user] gb.scripter draft interface Message-ID: <96817127.1870.1624842886442.JavaMail.zimbra@westwoodsvcs.com> hi, I have been working on a gb.scripter component. I am attaching a very rough draft document of what the interface to this may look like. I would love to get some feedback and comment if possible. "Failure is the key to success; each mistake teaches us something" .. Morihei Ueshiba Brian G -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: GB.SCRIPTER _Component.pdf Type: application/pdf Size: 108276 bytes Desc: not available URL: From mbelmonte at belmotek.net Mon Jun 28 10:05:26 2021 From: mbelmonte at belmotek.net (Martin) Date: Mon, 28 Jun 2021 10:05:26 +0200 Subject: [Gambas-user] Why are some components not available? In-Reply-To: References: <44c5e07e-0f57-ac37-3eab-d45c76ae35ff@belmotek.net> Message-ID: <0aee1846-2546-7955-48fc-c777724967db@belmotek.net> oops !! you are right, I can use it. :-) Regards. On 27/6/21 18:24, Bruce Steers wrote: > things like gb.form.term and gb.chart are "greyed" in the component > chooser but you can still select them,? they are greyed because they > are "unstable" components. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From isafiur at gmail.com Mon Jun 28 15:36:48 2021 From: isafiur at gmail.com (Safiur Rahman) Date: Mon, 28 Jun 2021 19:21:48 +0545 Subject: [Gambas-user] Progress of WebProgressBar Message-ID: Hi Beno?t When I use WebProgressBar for long process (eg. counting a result from database) then its value doesn't alter might be because the process gets busy. WebProgressBar1.Value = (res.Index + 1) / res.Count WebProgressBar1.Refresh() This shows me 0% then busy sign then 100%. How can I remove busy sign and update the value in WebProgressBar? -- Regards Safiur Rahman From g4mba5 at gmail.com Mon Jun 28 15:52:54 2021 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Mon, 28 Jun 2021 15:52:54 +0200 Subject: [Gambas-user] Progress of WebProgressBar In-Reply-To: References: Message-ID: <9257fc4e-9f37-b8cc-a267-a3a18156c65d@gmail.com> Le 28/06/2021 ? 15:36, Safiur Rahman a ?crit?: > Hi Beno?t > > When I use WebProgressBar for long process (eg. counting a result > from database) then its value doesn't alter might be because the > process gets busy. > > WebProgressBar1.Value = (res.Index + 1) / res.Count > WebProgressBar1.Refresh() > > This shows me 0% then busy sign then 100%. > > How can I remove busy sign and update the value in WebProgressBar? > You must not forget that you are inside a request answer, so the webbrowser is locked waiting for the request end. You must split your long process so that it can be run using several successive requests by using a WebTimer. Each step is processed during the WebTimer 'Timer' event handler, and the Timer delay is adapted to the duration of each step. Another possible solution is running your job in an external process whose state is read regularly by the main program. It's a bit tedious as the main process is suspended between each request. Regards, -- Beno?t Minisini From isafiur at gmail.com Mon Jun 28 16:12:11 2021 From: isafiur at gmail.com (Safiur Rahman) Date: Mon, 28 Jun 2021 19:57:11 +0545 Subject: [Gambas-user] Progress of WebProgressBar In-Reply-To: References: Message-ID: Same status with Wait e.g. WebProgressBar1.Value = (res.Index + 1) / res.Count Wait On 6/28/21, Safiur Rahman wrote: > Hi Beno?t > > When I use WebProgressBar for long process (eg. counting a result > from database) then its value doesn't alter might be because the > process gets busy. > > WebProgressBar1.Value = (res.Index + 1) / res.Count > WebProgressBar1.Refresh() > > This shows me 0% then busy sign then 100%. > > How can I remove busy sign and update the value in WebProgressBar? > > > > > > -- > Regards > Safiur Rahman > -- Regards Safiur Rahman From g4mba5 at gmail.com Mon Jun 28 16:27:25 2021 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Mon, 28 Jun 2021 16:27:25 +0200 Subject: [Gambas-user] Progress of WebProgressBar In-Reply-To: References: Message-ID: <12e236e5-ed3c-ebd0-7151-d175e376934c@gmail.com> Le 28/06/2021 ? 16:12, Safiur Rahman a ?crit?: > Same status with Wait e.g. > Of course. You must do what I told you in my previous answer. -- Beno?t Minisini From g4mba5 at gmail.com Mon Jun 28 20:13:26 2021 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Mon, 28 Jun 2021 20:13:26 +0200 Subject: [Gambas-user] KeyPress event is fired twice (martin p cristia) In-Reply-To: References: Message-ID: <25233346-8cd8-e323-3edc-ef5759f3792e@gmail.com> Le 24/06/2021 ? 20:38, martin p cristia a ?crit?: > Found a workaround: there has to be a dummy GLArea_Keypress sub and the > event fires only once in Form_KeyPress > > Public Sub Form_KeyPress() > > ? Debug Key.Text > > End > > Public Sub GLArea1_KeyPress() > > ? ' Debug "GLArea", Key.Text > > End > It should be fixed in master. Regards, -- Beno?t Minisini From g4mba5 at gmail.com Mon Jun 28 20:44:31 2021 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Mon, 28 Jun 2021 20:44:31 +0200 Subject: [Gambas-user] gb.scripter draft interface In-Reply-To: <96817127.1870.1624842886442.JavaMail.zimbra@westwoodsvcs.com> References: <96817127.1870.1624842886442.JavaMail.zimbra@westwoodsvcs.com> Message-ID: Le 28/06/2021 ? 03:14, Brian G a ?crit?: > hi, > > I have been working on a gb.scripter component. > > I am attaching a very rough draft document of what the interface to this > may look like. > I would love to get some feedback and comment if possible. > > "Failure is the key to success; > ?each mistake teaches us something" ?.. Morihei Ueshiba > Brian G > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > Hi, Brian. I have juste quickly read your document, so here are my comments about the interface for running scripts only: Sorry, but I really dislike your interface. You designed it like a C library, but Gambas has objects and events. A script is, for the user, a Process-like object that encapsulates an actual Process object with a lot of magic around it. So we can imagine a 'Script' class that you instanciate for running a script. That class would define properties that match the arguments of your 'ScriptRun' function, added to the interface of the Process class. The 'ScriptRun' callback is replaced by events. You can add events for each script preprocessing or compilation step, when there is a compilation error, and delegates the events of the Process class. The 'Script' class could have a static method (or use the static '_call' special methid) for running a script in a quick way like 'ScriptRun' would do. Not being able to raise event, the static method could raise errors instead when there is a compilation problem. And why do you want to return script compilation errors as structured strings? You should better create objects with properties and return an array of them. Regards, -- Beno?t Minisini From brian at westwoodsvcs.com Tue Jun 29 02:20:19 2021 From: brian at westwoodsvcs.com (Brian G) Date: Mon, 28 Jun 2021 17:20:19 -0700 (PDT) Subject: [Gambas-user] gb.scripter draft interface In-Reply-To: References: <96817127.1870.1624842886442.JavaMail.zimbra@westwoodsvcs.com> Message-ID: <2126329160.2146.1624926019476.JavaMail.zimbra@westwoodsvcs.com> Thanks for the feedback! Ok, Those sound like reasonable changes, It should be straight forward to move things to objects. Yes and I do a lot of work in c.... lol "Failure is the key to success; each mistake teaches us something" .. Morihei Ueshiba Brian G ----- On Jun 28, 2021, at 11:44 AM, Beno?t Minisini g4mba5 at gmail.com wrote: > Le 28/06/2021 ? 03:14, Brian G a ?crit?: >> hi, >> >> I have been working on a gb.scripter component. >> >> I am attaching a very rough draft document of what the interface to this >> may look like. >> I would love to get some feedback and comment if possible. >> >> "Failure is the key to success; >> ?each mistake teaches us something" ?.. Morihei Ueshiba >> Brian G >> >> >> ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- >> > > Hi, Brian. > > I have juste quickly read your document, so here are my comments about > the interface for running scripts only: > > Sorry, but I really dislike your interface. You designed it like a C > library, but Gambas has objects and events. > > A script is, for the user, a Process-like object that encapsulates an > actual Process object with a lot of magic around it. > > So we can imagine a 'Script' class that you instanciate for running a > script. > > That class would define properties that match the arguments of your > 'ScriptRun' function, added to the interface of the Process class. > > The 'ScriptRun' callback is replaced by events. You can add events for > each script preprocessing or compilation step, when there is a > compilation error, and delegates the events of the Process class. > > The 'Script' class could have a static method (or use the static '_call' > special methid) for running a script in a quick way like 'ScriptRun' > would do. Not being able to raise event, the static method could raise > errors instead when there is a compilation problem. > > And why do you want to return script compilation errors as structured > strings? You should better create objects with properties and return an > array of them. > > Regards, > > -- > Beno?t Minisini > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- From bsteers4 at gmail.com Tue Jun 29 10:13:06 2021 From: bsteers4 at gmail.com (Bruce Steers) Date: Tue, 29 Jun 2021 09:13:06 +0100 Subject: [Gambas-user] Finding if app is launched from terminal or not Message-ID: Hi all, I have an app that uses lame to make mp3s from wav files and lame puts info out to stdout as it works. It's primary use is going to be either drag-n-drop files onto a launcher or right clicking files and choosing open with app. Both those cases will not have a terminal so the app opens up it's own terminalview form and runs the command in it. but the app could also be run from terminal in which case it would not need the terminalview and could just output to stdout. But i do not know of a good way to detect if the app has been run from a terminal or i need to open it's own one. Any advice appreciated. BruceS -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobs at taboege.de Tue Jun 29 11:09:22 2021 From: tobs at taboege.de (Tobias Boege) Date: Tue, 29 Jun 2021 11:09:22 +0200 Subject: [Gambas-user] Finding if app is launched from terminal or not In-Reply-To: References: Message-ID: <20210629090922.GA769054@highrise.localdomain> On Tue, 29 Jun 2021, Bruce Steers wrote: > Hi all, I have an app that uses lame to make mp3s from wav files and lame > puts info out to stdout as it works. > > It's primary use is going to be either drag-n-drop files onto a launcher or > right clicking files and choosing open with app. > Both those cases will not have a terminal so the app opens up it's own > terminalview form and runs the command in it. > > but the app could also be run from terminal in which case it would not need > the terminalview and could just output to stdout. > > But i do not know of a good way to detect if the app has been run from a > terminal or i need to open it's own one. > File.In.IsTerm is true if and only if the standard input of your program is connected to a (pseudo) terminal. This will be the case when you launch the program in a terminal emulator. It will also be the case if you launch it in the IDE (because it is connected to the TerminalView in the IDE). It will be false if you launch it via double click from your desktop. Best, Tobias -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From bsteers4 at gmail.com Tue Jun 29 11:18:07 2021 From: bsteers4 at gmail.com (Bruce Steers) Date: Tue, 29 Jun 2021 10:18:07 +0100 Subject: [Gambas-user] Finding if app is launched from terminal or not In-Reply-To: <20210629090922.GA769054@highrise.localdomain> References: <20210629090922.GA769054@highrise.localdomain> Message-ID: On Tue, 29 Jun 2021 at 10:10, Tobias Boege via User < user at lists.gambas-basic.org> wrote: > On Tue, 29 Jun 2021, Bruce Steers wrote: > > Hi all, I have an app that uses lame to make mp3s from wav files and lame > > puts info out to stdout as it works. > > > > It's primary use is going to be either drag-n-drop files onto a launcher > or > > right clicking files and choosing open with app. > > Both those cases will not have a terminal so the app opens up it's own > > terminalview form and runs the command in it. > > > > but the app could also be run from terminal in which case it would not > need > > the terminalview and could just output to stdout. > > > > But i do not know of a good way to detect if the app has been run from a > > terminal or i need to open it's own one. > > > > File.In.IsTerm is true if and only if the standard input of your program > is connected to a (pseudo) terminal. This will be the case when you launch > the program in a terminal emulator. It will also be the case if you launch > it in the IDE (because it is connected to the TerminalView in the IDE). > It will be false if you launch it via double click from your desktop. > > Best, > Tobias > > Fantastic , Thank you very muchly Tobias :) Wishing well BruceS -------------- next part -------------- An HTML attachment was scrubbed... URL: From g4mba5 at gmail.com Tue Jun 29 20:42:25 2021 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Tue, 29 Jun 2021 20:42:25 +0200 Subject: [Gambas-user] KeyPress event is fired twice In-Reply-To: References: Message-ID: <45ade6d0-411b-2165-a361-e3f4a17b5cfd@gmail.com> Le 23/06/2021 ? 15:59, martin p cristia a ?crit?: > To reproduce, click on the GLArea and then press a key. If the Form has > the focus, it's ok. See output in console. > It's fixed in commit https://gitlab.com/gambas/gambas/-/commit/d8cb1ad28dbcb9feb7094398ae2df0200dd14ae9. Regards, -- Beno?t Minisini From brian at westwoodsvcs.com Tue Jun 29 21:36:00 2021 From: brian at westwoodsvcs.com (Brian G) Date: Tue, 29 Jun 2021 12:36:00 -0700 (PDT) Subject: [Gambas-user] Script object inherits process, Message-ID: <943368112.2773.1624995360900.JavaMail.zimbra@westwoodsvcs.com> Hi Beno?t, It actually seems to makes sense for script to inherit process, but the hitch I have run into is that there seems to be no way to have one process to copy the configuration of another to it's self. if I have a class script that inherits process and the creation looks like: MyScript = new script("~/Scriptfile) as "TheScript" ' this sets up the script and does the compile etc. or Dim MrScriptText as string = "For i as integer = 0 to 10\nPrint \"Hi\"\nnext MyScript = new script("CacheName",MyScriptText) as "TheScript" now call something like MyScript.run(ScriptParm1, .... etc) ' this actually does the exec and gets the real process object is there some way to make Me as in the script object copy all the io, pid etc information to its self from the process object returned from exec in effect becoming equal in stream, pid etc to the process returned from exec? This would be great allowing the removal of the ExecCallBack TheScript_read(), TheScript_kill(), TheScript_error(), and any extended special events for scripts can now be defined directly. and Print #MyScript, "Hello Word" The idea for the badly named called backs for handling pre-process and post process process was to allow an array of plugin scripts as objects each one called to do something to the source code. the ScriptApply Plugin scripts were not in document but available to be called directly for a source buffer. the ScriptSet Plugin scripts, actually tells the reader/tokenizer what plugins to apply to the processed code. This was not really intended to be a user accessible event. Only a way for users to provide plugins to the scripter. Changing the names form ScriptSet...Calback(callbackList) to ScriptSet...Plugins(PluginList as objects[],...) so now we have ScriptSetPreProcessPlugins(PreProgramPlugins as object[], PreLineProcessPlugins as object[]) ScriptSetPostProcessPlugins(PostProgPlugins as object[]) ScriptSetPreProcessPlugins.clear() ScriptSetPostProcessPlugins.clear() "Failure is the key to success; each mistake teaches us something" .. Morihei Ueshiba Brian G -------------- next part -------------- An HTML attachment was scrubbed... URL: From g4mba5 at gmail.com Tue Jun 29 22:30:46 2021 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Tue, 29 Jun 2021 22:30:46 +0200 Subject: [Gambas-user] Script object inherits process, In-Reply-To: <943368112.2773.1624995360900.JavaMail.zimbra@westwoodsvcs.com> References: <943368112.2773.1624995360900.JavaMail.zimbra@westwoodsvcs.com> Message-ID: Le 29/06/2021 ? 21:36, Brian G a ?crit?: > Hi Beno?t, > > It actually seems to makes sense for script to inherit process, but the > hitch I have run into is that there seems to be no way > to have one process to copy the configuration of another to it's self. I don't think so. It's not a process, it's something that creates and run a process, but before there is the compilation, and before your preprocessing. You must encapsulate it, not inherit it. -- Beno?t Minisini From tercoide at hotmail.com Wed Jun 30 00:22:23 2021 From: tercoide at hotmail.com (martin p cristia) Date: Tue, 29 Jun 2021 19:22:23 -0300 Subject: [Gambas-user] KeyPress event is fired twice In-Reply-To: References: Message-ID: It is, thank you. > It should be fixed in master. Regards, > -- Beno?t Minisini -- Saludos Ing. Martin P Cristia From adamnt42 at gmail.com Wed Jun 30 11:03:36 2021 From: adamnt42 at gmail.com (bb) Date: Wed, 30 Jun 2021 18:33:36 +0930 Subject: [Gambas-user] Circular dependencies but not the normal type Message-ID: <121b1aa5f24845a6a7ca4f31171cdfdf23515686.camel@gmail.com> I have got myself into a real mess here. I have two libraries, they both depend on each other. LibA needs LibB and vice versa. If I could compile one of them then the problem "goes away" and I just end up with compile errors in the other. Fine, my problem. But if neither exists in ~/local/share/gambas3/yadayada.../ I can't compile either of them. :-( Is there a way to compile "ignoring library dependencies"? I dont care that the result is a "bad" executable, just that I can compile one of them and break the circle. tia bruce From g4mba5 at gmail.com Wed Jun 30 13:13:05 2021 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Wed, 30 Jun 2021 13:13:05 +0200 Subject: [Gambas-user] Circular dependencies but not the normal type In-Reply-To: <121b1aa5f24845a6a7ca4f31171cdfdf23515686.camel@gmail.com> References: <121b1aa5f24845a6a7ca4f31171cdfdf23515686.camel@gmail.com> Message-ID: <7c9101be-b639-61ef-9fcd-424c4cffe9ef@gmail.com> Le 30/06/2021 ? 11:03, bb a ?crit?: > I have got myself into a real mess here. > > I have two libraries, they both depend on each other. LibA needs LibB > and vice versa. > > If I could compile one of them then the problem "goes away" and I just > end up with compile errors in the other. Fine, my problem. > > But if neither exists in ~/local/share/gambas3/yadayada.../ I can't > compile either of them. :-( > > Is there a way to compile "ignoring library dependencies"? I dont care > that the result is a "bad" executable, just that I can compile one of > them and break the circle. > > tia > bruce > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > How can you make two libraries depends on each other? It's sort of non-sense. Why don't you merge the two libraries into one? -- Beno?t Minisini From adamnt42 at gmail.com Wed Jun 30 13:57:11 2021 From: adamnt42 at gmail.com (bb) Date: Wed, 30 Jun 2021 21:27:11 +0930 Subject: [Gambas-user] Circular dependencies but not the normal type In-Reply-To: <7c9101be-b639-61ef-9fcd-424c4cffe9ef@gmail.com> References: <121b1aa5f24845a6a7ca4f31171cdfdf23515686.camel@gmail.com> <7c9101be-b639-61ef-9fcd-424c4cffe9ef@gmail.com> Message-ID: <80980209ca54e0f97c01bdd202a89647ba34cea4.camel@gmail.com> On Wed, 2021-06-30 at 13:13 +0200, Beno?t Minisini wrote: > Le 30/06/2021 ? 11:03, bb a ?crit : > > I have got myself into a real mess here. > > > > I have two libraries, they both depend on each other. LibA needs > > LibB > > and vice versa. > > > > If I could compile one of them then the problem "goes away" and I > > just > > end up with compile errors in the other. Fine, my problem. > > > > But if neither exists in ~/local/share/gambas3/yadayada.../ I can't > > compile either of them. :-( > > > > Is there a way to compile "ignoring library dependencies"? I dont > > care > > that the result is a "bad" executable, just that I can compile one > > of > > them and break the circle. > > > > tia > > bruce > > > > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > > > > How can you make two libraries depends on each other? It's sort of > non-sense. Why don't you merge the two libraries into one? > Ha, as ususal I cant see the forest for the trees. They arose out of the dim distant times of yore. LibA was a Martin Fowler inspired "business object" library from his Object Database Impedance days. LibB was just a bunch of business domain utilities. In those days LibA (the business object library) had a dependancy on LibB for some calculations. Racently LibB (the utility library) got "expanded" with a new bunch of functions, some of which depend on accessing a related business object. Hence the circle. Funny thing is, we have used and changed both of them for about a year with no problems. It was just now when I am setting up a new software repository that I hit the problem as neither executable exists. And as usual you are correct, it is non-sense. I will have to merge/split the circular functions into a new architecture. Thanks, I obviously need a few kilo-jolts to the cranial area these days to get out of a stuck thinking mode or two.) bruce From rwe-sse at osnanet.de Wed Jun 30 17:41:36 2021 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Wed, 30 Jun 2021 17:41:36 +0200 Subject: [Gambas-user] Question about TextEdit Message-ID: Some day in March I last tried around some features in one of my applications. I do not remember why, but I switched off gb.qt4.ext or gb.qt5.ext and changed it to gb.gui. Here the TextEdit is missing. I would need it in one dialog, so now I changed back to gb.qt5 and gb.qt5.ext. There are a lot of small texts (notes) which have been made with TextEdit, and it would be a shame if it missing in future. Can you imagine why I switched? I cannot remember. Maybe I wanted to try something else, but I vaguely remember there was something about Editor or TextEdit, respectively. If it is that TextEdit is no longer supported in future, how to convert already saved texts from RichText to Text? Thanks so much for your help. Rolf From bsteers4 at gmail.com Wed Jun 30 21:25:15 2021 From: bsteers4 at gmail.com (Bruce Steers) Date: Wed, 30 Jun 2021 20:25:15 +0100 Subject: [Gambas-user] Question about TextEdit In-Reply-To: References: Message-ID: On Wed, 30 Jun 2021 at 16:50, Rolf-Werner Eilert wrote: > Some day in March I last tried around some features in one of my > applications. I do not remember why, but I switched off gb.qt4.ext or > gb.qt5.ext and changed it to gb.gui. > > Here the TextEdit is missing. I would need it in one dialog, so now I > changed back to gb.qt5 and gb.qt5.ext. > > There are a lot of small texts (notes) which have been made with > TextEdit, and it would be a shame if it missing in future. > > Can you imagine why I switched? I cannot remember. Maybe I wanted to try > something else, but I vaguely remember there was something about Editor > or TextEdit, respectively. > > If it is that TextEdit is no longer supported in future, how to convert > already saved texts from RichText to Text? > > Thanks so much for your help. > > Rolf > If you just want to display richtext and not edit it you can use a TextLabel BruceS -------------- next part -------------- An HTML attachment was scrubbed... URL: