From gambas.fr at gmail.com Sat Dec 1 08:42:40 2018 From: gambas.fr at gmail.com (Fabien Bodard) Date: Sat, 1 Dec 2018 08:42:40 +0100 Subject: [Gambas-user] PictureBox and Containers strange behaviour In-Reply-To: References: Message-ID: Hi dear friend This is the same with less work ;-) Regards Fabien Bodard Le ven. 30 nov. 2018 ? 16:30, Gianluigi a ?crit : > Finally it works > See attached file > > Reagards > Gianluigi > > Il giorno ven 30 nov 2018 alle ore 15:39 Gianluigi > ha scritto: > >> This is the correct code (?): >> >> [code]Private Sub Scale(img As Image) >> >> Dim w, h As Integer >> >> w = img.W >> h = img.H >> If h > w Then >> $H = PictureBox1.H >> $W = (PictureBox1.H * w) \ h >> If $W > PictureBox1.W Then >> $W = PictureBox1.W >> $H = (PictureBox1.W * $H) \ $W >> $X = PictureBox1.X >> $Y = PictureBox1.Y + ((PictureBox1.H - $H) \ 2) >> Return >> Endif >> $Y = PictureBox1.Y >> $X = PictureBox1.X + ((PictureBox1.W - $W) \ 2) >> Else >> $W = PictureBox1.W >> $H = (PictureBox1.W * h) \ w >> If $H > PictureBox1.H Then >> $H = PictureBox1.H >> $W = (PictureBox1.H * $W) \ $H >> $Y = PictureBox1.Y >> $X = PictureBox1.X + ((PictureBox1.W - $W) \ 2) >> Return >> Endif >> $X = PictureBox1.X >> $Y = PictureBox1.Y + ((PictureBox1.H - $H) \ 2) >> Endif >> >> End [/code] >> >> Although I would love to be able to create a code capable of scaling >> images on the Form_Resize event >> A task too burdensome for my tired brain. >> >> Regards >> Gianluigi >> >> Il giorno ven 30 nov 2018 alle ore 13:10 Gianluigi >> ha scritto: >> >>> I need to paint an image in a new image and then show it in a picturebox. >>> The thing seems to work correctly only if the picturebox is the only >>> component on the window. >>> If the hbox is present, the image is deformed (stretching) and the lower >>> part of the image is positioned under the hbox. >>> Am I wrong? >>> I attach a project and two explanatory images (with magnifying glass). >>> >>> Regards >>> Gianluigi >>> >> > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -- Fabien Bodard -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: PaintImage-3-0.0.1.tar.gz Type: application/gzip Size: 20888 bytes Desc: not available URL: From bagonergi at gmail.com Sat Dec 1 14:04:34 2018 From: bagonergi at gmail.com (Gianluigi) Date: Sat, 1 Dec 2018 14:04:34 +0100 Subject: [Gambas-user] PictureBox and Containers strange behaviour In-Reply-To: References: Message-ID: Hi Fabien, very interesting, excellent result and little work :-D My problem is to adapt a sequence of images of different format and type in a single film-like image (to be clear). I thought about doing so, this is just the first part of the code (now I use the mouse wheel just to try), I do not think I can adapt your code here. The idea (idiot) came to me from a question on our forum and so I would like to build an image viewer that shows a random image like a slot machine, now I start to study how to give it the movement (I do not know if two images series are enough). You can lose a lot of money by betting us over ;-D Regards Gianluigi Il giorno sab 1 dic 2018 alle ore 08:44 Fabien Bodard ha scritto: > Hi dear friend > > This is the same with less work ;-) > > Regards > > Fabien Bodard > > Le ven. 30 nov. 2018 ? 16:30, Gianluigi a ?crit : > >> Finally it works >> See attached file >> >> Reagards >> Gianluigi >> >> Il giorno ven 30 nov 2018 alle ore 15:39 Gianluigi >> ha scritto: >> >>> This is the correct code (?): >>> >>> [code]Private Sub Scale(img As Image) >>> >>> Dim w, h As Integer >>> >>> w = img.W >>> h = img.H >>> If h > w Then >>> $H = PictureBox1.H >>> $W = (PictureBox1.H * w) \ h >>> If $W > PictureBox1.W Then >>> $W = PictureBox1.W >>> $H = (PictureBox1.W * $H) \ $W >>> $X = PictureBox1.X >>> $Y = PictureBox1.Y + ((PictureBox1.H - $H) \ 2) >>> Return >>> Endif >>> $Y = PictureBox1.Y >>> $X = PictureBox1.X + ((PictureBox1.W - $W) \ 2) >>> Else >>> $W = PictureBox1.W >>> $H = (PictureBox1.W * h) \ w >>> If $H > PictureBox1.H Then >>> $H = PictureBox1.H >>> $W = (PictureBox1.H * $W) \ $H >>> $Y = PictureBox1.Y >>> $X = PictureBox1.X + ((PictureBox1.W - $W) \ 2) >>> Return >>> Endif >>> $X = PictureBox1.X >>> $Y = PictureBox1.Y + ((PictureBox1.H - $H) \ 2) >>> Endif >>> >>> End [/code] >>> >>> Although I would love to be able to create a code capable of scaling >>> images on the Form_Resize event >>> A task too burdensome for my tired brain. >>> >>> Regards >>> Gianluigi >>> >>> Il giorno ven 30 nov 2018 alle ore 13:10 Gianluigi >>> ha scritto: >>> >>>> I need to paint an image in a new image and then show it in a >>>> picturebox. >>>> The thing seems to work correctly only if the picturebox is the only >>>> component on the window. >>>> If the hbox is present, the image is deformed (stretching) and the >>>> lower part of the image is positioned under the hbox. >>>> Am I wrong? >>>> I attach a project and two explanatory images (with magnifying glass). >>>> >>>> Regards >>>> Gianluigi >>>> >>> >> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- >> > > > -- > Fabien Bodard > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SlotImages-test1-0.0.1.tar.gz Type: application/gzip Size: 13747 bytes Desc: not available URL: From gambas.fr at gmail.com Sat Dec 1 15:20:43 2018 From: gambas.fr at gmail.com (Fabien Bodard) Date: Sat, 1 Dec 2018 15:20:43 +0100 Subject: [Gambas-user] PictureBox and Containers strange behaviour In-Reply-To: References: Message-ID: Ok I seen the idea ... For the movement you can take a look in the FAbout of the ide code Le sam. 1 d?c. 2018 ? 14:05, Gianluigi a ?crit : > Hi Fabien, > very interesting, excellent result and little work :-D > > My problem is to adapt a sequence of images of different format and type > in a single film-like image (to be clear). > I thought about doing so, this is just the first part of the code (now I > use the mouse wheel just to try), I do not think I can adapt your code here. > > The idea (idiot) came to me from a question on our forum and so I would > like to build an image viewer that shows a random image like a slot > machine, now I start to study how to give it the movement (I do not know if > two images series are enough). > You can lose a lot of money by betting us over ;-D > > Regards > Gianluigi > > Il giorno sab 1 dic 2018 alle ore 08:44 Fabien Bodard > ha scritto: > >> Hi dear friend >> >> This is the same with less work ;-) >> >> Regards >> >> Fabien Bodard >> >> Le ven. 30 nov. 2018 ? 16:30, Gianluigi a ?crit : >> >>> Finally it works >>> See attached file >>> >>> Reagards >>> Gianluigi >>> >>> Il giorno ven 30 nov 2018 alle ore 15:39 Gianluigi >>> ha scritto: >>> >>>> This is the correct code (?): >>>> >>>> [code]Private Sub Scale(img As Image) >>>> >>>> Dim w, h As Integer >>>> >>>> w = img.W >>>> h = img.H >>>> If h > w Then >>>> $H = PictureBox1.H >>>> $W = (PictureBox1.H * w) \ h >>>> If $W > PictureBox1.W Then >>>> $W = PictureBox1.W >>>> $H = (PictureBox1.W * $H) \ $W >>>> $X = PictureBox1.X >>>> $Y = PictureBox1.Y + ((PictureBox1.H - $H) \ 2) >>>> Return >>>> Endif >>>> $Y = PictureBox1.Y >>>> $X = PictureBox1.X + ((PictureBox1.W - $W) \ 2) >>>> Else >>>> $W = PictureBox1.W >>>> $H = (PictureBox1.W * h) \ w >>>> If $H > PictureBox1.H Then >>>> $H = PictureBox1.H >>>> $W = (PictureBox1.H * $W) \ $H >>>> $Y = PictureBox1.Y >>>> $X = PictureBox1.X + ((PictureBox1.W - $W) \ 2) >>>> Return >>>> Endif >>>> $X = PictureBox1.X >>>> $Y = PictureBox1.Y + ((PictureBox1.H - $H) \ 2) >>>> Endif >>>> >>>> End [/code] >>>> >>>> Although I would love to be able to create a code capable of scaling >>>> images on the Form_Resize event >>>> A task too burdensome for my tired brain. >>>> >>>> Regards >>>> Gianluigi >>>> >>>> Il giorno ven 30 nov 2018 alle ore 13:10 Gianluigi >>>> ha scritto: >>>> >>>>> I need to paint an image in a new image and then show it in a >>>>> picturebox. >>>>> The thing seems to work correctly only if the picturebox is the only >>>>> component on the window. >>>>> If the hbox is present, the image is deformed (stretching) and the >>>>> lower part of the image is positioned under the hbox. >>>>> Am I wrong? >>>>> I attach a project and two explanatory images (with magnifying glass). >>>>> >>>>> Regards >>>>> Gianluigi >>>>> >>>> >>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- >>> >> >> >> -- >> Fabien Bodard >> >> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- >> > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -- Fabien Bodard -------------- next part -------------- An HTML attachment was scrubbed... URL: From rwe-sse at osnanet.de Sat Dec 1 16:22:04 2018 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Sat, 1 Dec 2018 16:22:04 +0100 Subject: [Gambas-user] Date(Now) with time component under Ubuntu? Message-ID: Just found this strange thing: Up to now I was under Suse with KDE. In one of my programs, I use Date(Now) which - as the documentation says - delivers the date component only. It did so under Suse, but under Ubuntu Mate I get a runtime error, and when I search the reason for it I find that Date(Now) delivers a locale date + time of 00:00:00. I found a quick workaround in my program for it, but it's strange, isn't it? Regards Rolf From bagonergi at gmail.com Sat Dec 1 18:27:15 2018 From: bagonergi at gmail.com (Gianluigi) Date: Sat, 1 Dec 2018 18:27:15 +0100 Subject: [Gambas-user] PictureBox and Containers strange behaviour In-Reply-To: References: Message-ID: Hi Fabien, the idea of loading images into one image was silly and I should have understood it right away. Too heavy. Aborted project. Regards Gianluigi Il giorno sab 1 dic 2018 alle ore 15:21 Fabien Bodard ha scritto: > Ok I seen the idea ... > > For the movement you can take a look in the FAbout of the ide code > > Le sam. 1 d?c. 2018 ? 14:05, Gianluigi a ?crit : > >> Hi Fabien, >> very interesting, excellent result and little work :-D >> >> My problem is to adapt a sequence of images of different format and type >> in a single film-like image (to be clear). >> I thought about doing so, this is just the first part of the code (now I >> use the mouse wheel just to try), I do not think I can adapt your code here. >> >> The idea (idiot) came to me from a question on our forum and so I would >> like to build an image viewer that shows a random image like a slot >> machine, now I start to study how to give it the movement (I do not know if >> two images series are enough). >> You can lose a lot of money by betting us over ;-D >> >> Regards >> Gianluigi >> >> Il giorno sab 1 dic 2018 alle ore 08:44 Fabien Bodard < >> gambas.fr at gmail.com> ha scritto: >> >>> Hi dear friend >>> >>> This is the same with less work ;-) >>> >>> Regards >>> >>> Fabien Bodard >>> >>> Le ven. 30 nov. 2018 ? 16:30, Gianluigi a ?crit : >>> >>>> Finally it works >>>> See attached file >>>> >>>> Reagards >>>> Gianluigi >>>> >>>> Il giorno ven 30 nov 2018 alle ore 15:39 Gianluigi >>>> ha scritto: >>>> >>>>> This is the correct code (?): >>>>> >>>>> [code]Private Sub Scale(img As Image) >>>>> >>>>> Dim w, h As Integer >>>>> >>>>> w = img.W >>>>> h = img.H >>>>> If h > w Then >>>>> $H = PictureBox1.H >>>>> $W = (PictureBox1.H * w) \ h >>>>> If $W > PictureBox1.W Then >>>>> $W = PictureBox1.W >>>>> $H = (PictureBox1.W * $H) \ $W >>>>> $X = PictureBox1.X >>>>> $Y = PictureBox1.Y + ((PictureBox1.H - $H) \ 2) >>>>> Return >>>>> Endif >>>>> $Y = PictureBox1.Y >>>>> $X = PictureBox1.X + ((PictureBox1.W - $W) \ 2) >>>>> Else >>>>> $W = PictureBox1.W >>>>> $H = (PictureBox1.W * h) \ w >>>>> If $H > PictureBox1.H Then >>>>> $H = PictureBox1.H >>>>> $W = (PictureBox1.H * $W) \ $H >>>>> $Y = PictureBox1.Y >>>>> $X = PictureBox1.X + ((PictureBox1.W - $W) \ 2) >>>>> Return >>>>> Endif >>>>> $X = PictureBox1.X >>>>> $Y = PictureBox1.Y + ((PictureBox1.H - $H) \ 2) >>>>> Endif >>>>> >>>>> End [/code] >>>>> >>>>> Although I would love to be able to create a code capable of scaling >>>>> images on the Form_Resize event >>>>> A task too burdensome for my tired brain. >>>>> >>>>> Regards >>>>> Gianluigi >>>>> >>>>> Il giorno ven 30 nov 2018 alle ore 13:10 Gianluigi < >>>>> bagonergi at gmail.com> ha scritto: >>>>> >>>>>> I need to paint an image in a new image and then show it in a >>>>>> picturebox. >>>>>> The thing seems to work correctly only if the picturebox is the only >>>>>> component on the window. >>>>>> If the hbox is present, the image is deformed (stretching) and the >>>>>> lower part of the image is positioned under the hbox. >>>>>> Am I wrong? >>>>>> I attach a project and two explanatory images (with magnifying glass). >>>>>> >>>>>> Regards >>>>>> Gianluigi >>>>>> >>>>> >>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >>>> ]---- >>>> >>> >>> >>> -- >>> Fabien Bodard >>> >>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- >>> >> >> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- >> > > > -- > Fabien Bodard > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gambas.fr at gmail.com Sat Dec 1 18:56:37 2018 From: gambas.fr at gmail.com (Fabien Bodard) Date: Sat, 1 Dec 2018 18:56:37 +0100 Subject: [Gambas-user] PictureBox and Containers strange behaviour In-Reply-To: References: Message-ID: you must not load images in one image... in fact you must load each image in a image variable. then you manage the layout during the drawing event. a timer trigger call the drawing area event when needed ... during the move. Le sam. 1 d?c. 2018 ? 18:28, Gianluigi a ?crit : > Hi Fabien, > the idea of loading images into one image was silly and I should have > understood it right away. > Too heavy. > Aborted project. > > Regards > Gianluigi > > Il giorno sab 1 dic 2018 alle ore 15:21 Fabien Bodard > ha scritto: > >> Ok I seen the idea ... >> >> For the movement you can take a look in the FAbout of the ide code >> >> Le sam. 1 d?c. 2018 ? 14:05, Gianluigi a ?crit : >> >>> Hi Fabien, >>> very interesting, excellent result and little work :-D >>> >>> My problem is to adapt a sequence of images of different format and type >>> in a single film-like image (to be clear). >>> I thought about doing so, this is just the first part of the code (now I >>> use the mouse wheel just to try), I do not think I can adapt your code here. >>> >>> The idea (idiot) came to me from a question on our forum and so I would >>> like to build an image viewer that shows a random image like a slot >>> machine, now I start to study how to give it the movement (I do not know if >>> two images series are enough). >>> You can lose a lot of money by betting us over ;-D >>> >>> Regards >>> Gianluigi >>> >>> Il giorno sab 1 dic 2018 alle ore 08:44 Fabien Bodard < >>> gambas.fr at gmail.com> ha scritto: >>> >>>> Hi dear friend >>>> >>>> This is the same with less work ;-) >>>> >>>> Regards >>>> >>>> Fabien Bodard >>>> >>>> Le ven. 30 nov. 2018 ? 16:30, Gianluigi a ?crit : >>>> >>>>> Finally it works >>>>> See attached file >>>>> >>>>> Reagards >>>>> Gianluigi >>>>> >>>>> Il giorno ven 30 nov 2018 alle ore 15:39 Gianluigi < >>>>> bagonergi at gmail.com> ha scritto: >>>>> >>>>>> This is the correct code (?): >>>>>> >>>>>> [code]Private Sub Scale(img As Image) >>>>>> >>>>>> Dim w, h As Integer >>>>>> >>>>>> w = img.W >>>>>> h = img.H >>>>>> If h > w Then >>>>>> $H = PictureBox1.H >>>>>> $W = (PictureBox1.H * w) \ h >>>>>> If $W > PictureBox1.W Then >>>>>> $W = PictureBox1.W >>>>>> $H = (PictureBox1.W * $H) \ $W >>>>>> $X = PictureBox1.X >>>>>> $Y = PictureBox1.Y + ((PictureBox1.H - $H) \ 2) >>>>>> Return >>>>>> Endif >>>>>> $Y = PictureBox1.Y >>>>>> $X = PictureBox1.X + ((PictureBox1.W - $W) \ 2) >>>>>> Else >>>>>> $W = PictureBox1.W >>>>>> $H = (PictureBox1.W * h) \ w >>>>>> If $H > PictureBox1.H Then >>>>>> $H = PictureBox1.H >>>>>> $W = (PictureBox1.H * $W) \ $H >>>>>> $Y = PictureBox1.Y >>>>>> $X = PictureBox1.X + ((PictureBox1.W - $W) \ 2) >>>>>> Return >>>>>> Endif >>>>>> $X = PictureBox1.X >>>>>> $Y = PictureBox1.Y + ((PictureBox1.H - $H) \ 2) >>>>>> Endif >>>>>> >>>>>> End [/code] >>>>>> >>>>>> Although I would love to be able to create a code capable of scaling >>>>>> images on the Form_Resize event >>>>>> A task too burdensome for my tired brain. >>>>>> >>>>>> Regards >>>>>> Gianluigi >>>>>> >>>>>> Il giorno ven 30 nov 2018 alle ore 13:10 Gianluigi < >>>>>> bagonergi at gmail.com> ha scritto: >>>>>> >>>>>>> I need to paint an image in a new image and then show it in a >>>>>>> picturebox. >>>>>>> The thing seems to work correctly only if the picturebox is the only >>>>>>> component on the window. >>>>>>> If the hbox is present, the image is deformed (stretching) and the >>>>>>> lower part of the image is positioned under the hbox. >>>>>>> Am I wrong? >>>>>>> I attach a project and two explanatory images (with magnifying >>>>>>> glass). >>>>>>> >>>>>>> Regards >>>>>>> Gianluigi >>>>>>> >>>>>> >>>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >>>>> ]---- >>>>> >>>> >>>> >>>> -- >>>> Fabien Bodard >>>> >>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >>>> ]---- >>>> >>> >>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- >>> >> >> >> -- >> Fabien Bodard >> >> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- >> > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -- Fabien Bodard -------------- next part -------------- An HTML attachment was scrubbed... URL: From shordi at gmail.com Sat Dec 1 19:13:06 2018 From: shordi at gmail.com (=?UTF-8?Q?Jorge_Carri=C3=B3n?=) Date: Sat, 1 Dec 2018 19:13:06 +0100 Subject: [Gambas-user] Ordering a bi-dimensional string[]...by several columns help wanted. Message-ID: The problem: I need order a bi-dimensional array by several columns following de user's criteria. It is relatively simple to order a two-dimensional array for a column, not long ago we saw several solutions in this mail list, but what I need now is to sort by several columns and that each of them can be ascending or descending. I confess that I have been stuck with the subject for four days, that I have believed more than once that I had solved it and that in the end I have given up doing it alone. Does anyone have any idea how to approach the issue before it drives me crazy? There is a "tricky" solution: grab your two-dimensional array, create with it a sqlite base and let the sqlite engine solve the issue with an SQL statement ... but this is not the case (it would force the project to link with the modules database and it's not always convenient) Waiting for the better minds than mine advice... Best Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From bagonergi at gmail.com Sat Dec 1 19:42:06 2018 From: bagonergi at gmail.com (Gianluigi) Date: Sat, 1 Dec 2018 19:42:06 +0100 Subject: [Gambas-user] PictureBox and Containers strange behaviour In-Reply-To: References: Message-ID: do you mean: Using two pictureboxes, moving and loading them to make a smooth movement appear? Ok, I'll try but not today Regards Il giorno sab 1 dic 2018 alle ore 18:57 Fabien Bodard ha scritto: > you must not load images in one image... in fact you must load each image > in a image variable. > > then you manage the layout during the drawing event. > > a timer trigger call the drawing area event when needed ... during the > move. > > > > Le sam. 1 d?c. 2018 ? 18:28, Gianluigi a ?crit : > >> Hi Fabien, >> the idea of loading images into one image was silly and I should have >> understood it right away. >> Too heavy. >> Aborted project. >> >> Regards >> Gianluigi >> >> Il giorno sab 1 dic 2018 alle ore 15:21 Fabien Bodard < >> gambas.fr at gmail.com> ha scritto: >> >>> Ok I seen the idea ... >>> >>> For the movement you can take a look in the FAbout of the ide code >>> >>> Le sam. 1 d?c. 2018 ? 14:05, Gianluigi a ?crit : >>> >>>> Hi Fabien, >>>> very interesting, excellent result and little work :-D >>>> >>>> My problem is to adapt a sequence of images of different format and >>>> type in a single film-like image (to be clear). >>>> I thought about doing so, this is just the first part of the code (now >>>> I use the mouse wheel just to try), I do not think I can adapt your code >>>> here. >>>> >>>> The idea (idiot) came to me from a question on our forum and so I would >>>> like to build an image viewer that shows a random image like a slot >>>> machine, now I start to study how to give it the movement (I do not know if >>>> two images series are enough). >>>> You can lose a lot of money by betting us over ;-D >>>> >>>> Regards >>>> Gianluigi >>>> >>>> Il giorno sab 1 dic 2018 alle ore 08:44 Fabien Bodard < >>>> gambas.fr at gmail.com> ha scritto: >>>> >>>>> Hi dear friend >>>>> >>>>> This is the same with less work ;-) >>>>> >>>>> Regards >>>>> >>>>> Fabien Bodard >>>>> >>>>> Le ven. 30 nov. 2018 ? 16:30, Gianluigi a >>>>> ?crit : >>>>> >>>>>> Finally it works >>>>>> See attached file >>>>>> >>>>>> Reagards >>>>>> Gianluigi >>>>>> >>>>>> Il giorno ven 30 nov 2018 alle ore 15:39 Gianluigi < >>>>>> bagonergi at gmail.com> ha scritto: >>>>>> >>>>>>> This is the correct code (?): >>>>>>> >>>>>>> [code]Private Sub Scale(img As Image) >>>>>>> >>>>>>> Dim w, h As Integer >>>>>>> >>>>>>> w = img.W >>>>>>> h = img.H >>>>>>> If h > w Then >>>>>>> $H = PictureBox1.H >>>>>>> $W = (PictureBox1.H * w) \ h >>>>>>> If $W > PictureBox1.W Then >>>>>>> $W = PictureBox1.W >>>>>>> $H = (PictureBox1.W * $H) \ $W >>>>>>> $X = PictureBox1.X >>>>>>> $Y = PictureBox1.Y + ((PictureBox1.H - $H) \ 2) >>>>>>> Return >>>>>>> Endif >>>>>>> $Y = PictureBox1.Y >>>>>>> $X = PictureBox1.X + ((PictureBox1.W - $W) \ 2) >>>>>>> Else >>>>>>> $W = PictureBox1.W >>>>>>> $H = (PictureBox1.W * h) \ w >>>>>>> If $H > PictureBox1.H Then >>>>>>> $H = PictureBox1.H >>>>>>> $W = (PictureBox1.H * $W) \ $H >>>>>>> $Y = PictureBox1.Y >>>>>>> $X = PictureBox1.X + ((PictureBox1.W - $W) \ 2) >>>>>>> Return >>>>>>> Endif >>>>>>> $X = PictureBox1.X >>>>>>> $Y = PictureBox1.Y + ((PictureBox1.H - $H) \ 2) >>>>>>> Endif >>>>>>> >>>>>>> End [/code] >>>>>>> >>>>>>> Although I would love to be able to create a code capable of scaling >>>>>>> images on the Form_Resize event >>>>>>> A task too burdensome for my tired brain. >>>>>>> >>>>>>> Regards >>>>>>> Gianluigi >>>>>>> >>>>>>> Il giorno ven 30 nov 2018 alle ore 13:10 Gianluigi < >>>>>>> bagonergi at gmail.com> ha scritto: >>>>>>> >>>>>>>> I need to paint an image in a new image and then show it in a >>>>>>>> picturebox. >>>>>>>> The thing seems to work correctly only if the picturebox is the >>>>>>>> only component on the window. >>>>>>>> If the hbox is present, the image is deformed (stretching) and the >>>>>>>> lower part of the image is positioned under the hbox. >>>>>>>> Am I wrong? >>>>>>>> I attach a project and two explanatory images (with magnifying >>>>>>>> glass). >>>>>>>> >>>>>>>> Regards >>>>>>>> Gianluigi >>>>>>>> >>>>>>> >>>>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >>>>>> ]---- >>>>>> >>>>> >>>>> >>>>> -- >>>>> Fabien Bodard >>>>> >>>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >>>>> ]---- >>>>> >>>> >>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >>>> ]---- >>>> >>> >>> >>> -- >>> Fabien Bodard >>> >>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- >>> >> >> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- >> > > > -- > Fabien Bodard > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bagonergi at gmail.com Sat Dec 1 20:02:11 2018 From: bagonergi at gmail.com (Gianluigi) Date: Sat, 1 Dec 2018 20:02:11 +0100 Subject: [Gambas-user] Ordering a bi-dimensional string[]...by several columns help wanted. In-Reply-To: References: Message-ID: Il giorno sab 1 dic 2018 alle ore 19:14 Jorge Carri?n ha scritto: > The problem: > > I need order a bi-dimensional array by several columns following de user's > criteria. > > It is relatively simple to order a two-dimensional array for a column, not > long ago we saw several solutions in this mail list, but what I need now is > to sort by several columns and that each of them can be ascending or > descending. > > I confess that I have been stuck with the subject for four days, that I > have believed more than once that I had solved it and that in the end I > have given up doing it alone. Does anyone have any idea how to approach the > issue before it drives me crazy? > > There is a "tricky" solution: grab your two-dimensional array, create with > it a sqlite base and let the sqlite engine solve the issue with an SQL > statement ... but this is not the case (it would force the project to link > with the modules database and it's not always convenient) > > Waiting for the better minds than mine advice... > > Best Regards > > Very interesting problem, unfortunately more than my capacity. A suggestion, have you already tried using the special _Compare [0] method? Regards Gianluigi [0] http://gambaswiki.org/wiki/lang/special/compare -------------- next part -------------- An HTML attachment was scrubbed... URL: From taboege at gmail.com Sat Dec 1 20:46:15 2018 From: taboege at gmail.com (Tobias Boege) Date: Sat, 1 Dec 2018 20:46:15 +0100 Subject: [Gambas-user] Ordering a bi-dimensional string[]...by several columns help wanted. In-Reply-To: References: Message-ID: <20181201194513.GA15928@highrise.localdomain> On Sat, 01 Dec 2018, Jorge Carri?n wrote: > The problem: > > I need order a bi-dimensional array by several columns following de user's > criteria. > > It is relatively simple to order a two-dimensional array for a column, not > long ago we saw several solutions in this mail list, but what I need now is > to sort by several columns and that each of them can be ascending or > descending. > > I confess that I have been stuck with the subject for four days, that I > have believed more than once that I had solved it and that in the end I > have given up doing it alone. Does anyone have any idea how to approach the > issue before it drives me crazy? > Speaking generally, *comparison-based sorting algorithms* consist of two parts: 1. a *comparison function*, which is given two objects to compare and decides if the first is less, equal to or greater than the second one, returning an integer < 0, = 0 or > 0, and 2. the *sorting algorithm*, which uses the comparison function as a black-box to decide how to rearrange an entire array to be in ascending order with respect to the comparison function. The method Object[].Sort supports this style of sorting. The algorithm is probably standard Quicksort from the C library and the elements of the array have to implement the special _compare method [1] implementing the comparison function. Without using a dedicated class for your data to define a _compare method, I don't see how you can sort it by custom criteria. So, your two-dimensional array must be turned into a one-dimensional array of record objects, each representing one line in your table. Now, I think your complicated _compare method is supposed to combine many simpler _compare methods for the properties of the record objects *lexicographically* into a single ordering. To do this you run, inside the _compare method, through all the comparison functions of the data members in the order the user specified, inverting each result if the sorting should be descending, until you first encounter a non-zero result. That will be the result of the comparison. If all comparisons turn out zero, well then the two records are equal as far as the comparison can tell, and you also return zero. I've attached a sample project which does this. It's not a nice solution in that it requires a static "sorting specification" variable inside your record class, but that's the best I could come up with -- and I've written several implementations of this table sorting over many years, because the question keeps popping up. The main hindrance in Gambas is that you have to implement the _compare method inside your class, and once you did that, it's immutable. You have to write it in a configurable way if you want to sort by user-defined criteria. All that is not the problem, the problem is that each object does its own comparing to other objects, so each object has to receive your sorting specification. That either works by setting a property on every object in your array prior to sorting which is inefficient and creates problems when an object is inside multiple arrays, or to use a static variable inside the class, which is what I've done here, but has a similar problem when you want to sort multiple arrays of that type at the same time. Other languages where code is a first-class citizen, often allow you to sort any array of objects by providing a code object external to the objects, implementing a user-defined comparison function. That's a better fit for your task. An alternative that you can explore by yourself may be to use qsort in the C library directly with Extern to get rid of the _compare function *inside* the Record class. qsort takes a comparison function with two parameters, it's not bound to any object. Maybe it works. Regards, Tobi [1] http://gambaswiki.org/wiki/lang/special/compare -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk -------------- next part -------------- A non-text attachment was scrubbed... Name: sort-table-0.0.1.tar.gz Type: application/gzip Size: 12589 bytes Desc: not available URL: From gambas.fr at gmail.com Sat Dec 1 22:19:57 2018 From: gambas.fr at gmail.com (Fabien Bodard) Date: Sat, 1 Dec 2018 22:19:57 +0100 Subject: [Gambas-user] PictureBox and Containers strange behaviour In-Reply-To: References: Message-ID: no I will try to show you an example tomorow Le sam. 1 d?c. 2018 ? 19:43, Gianluigi a ?crit : > do you mean: Using two pictureboxes, moving and loading them to make a > smooth movement appear? > Ok, I'll try but not today > > Regards > > Il giorno sab 1 dic 2018 alle ore 18:57 Fabien Bodard > ha scritto: > >> you must not load images in one image... in fact you must load each image >> in a image variable. >> >> then you manage the layout during the drawing event. >> >> a timer trigger call the drawing area event when needed ... during the >> move. >> >> >> >> Le sam. 1 d?c. 2018 ? 18:28, Gianluigi a ?crit : >> >>> Hi Fabien, >>> the idea of loading images into one image was silly and I should have >>> understood it right away. >>> Too heavy. >>> Aborted project. >>> >>> Regards >>> Gianluigi >>> >>> Il giorno sab 1 dic 2018 alle ore 15:21 Fabien Bodard < >>> gambas.fr at gmail.com> ha scritto: >>> >>>> Ok I seen the idea ... >>>> >>>> For the movement you can take a look in the FAbout of the ide code >>>> >>>> Le sam. 1 d?c. 2018 ? 14:05, Gianluigi a ?crit : >>>> >>>>> Hi Fabien, >>>>> very interesting, excellent result and little work :-D >>>>> >>>>> My problem is to adapt a sequence of images of different format and >>>>> type in a single film-like image (to be clear). >>>>> I thought about doing so, this is just the first part of the code (now >>>>> I use the mouse wheel just to try), I do not think I can adapt your code >>>>> here. >>>>> >>>>> The idea (idiot) came to me from a question on our forum and so I >>>>> would like to build an image viewer that shows a random image like a slot >>>>> machine, now I start to study how to give it the movement (I do not know if >>>>> two images series are enough). >>>>> You can lose a lot of money by betting us over ;-D >>>>> >>>>> Regards >>>>> Gianluigi >>>>> >>>>> Il giorno sab 1 dic 2018 alle ore 08:44 Fabien Bodard < >>>>> gambas.fr at gmail.com> ha scritto: >>>>> >>>>>> Hi dear friend >>>>>> >>>>>> This is the same with less work ;-) >>>>>> >>>>>> Regards >>>>>> >>>>>> Fabien Bodard >>>>>> >>>>>> Le ven. 30 nov. 2018 ? 16:30, Gianluigi a >>>>>> ?crit : >>>>>> >>>>>>> Finally it works >>>>>>> See attached file >>>>>>> >>>>>>> Reagards >>>>>>> Gianluigi >>>>>>> >>>>>>> Il giorno ven 30 nov 2018 alle ore 15:39 Gianluigi < >>>>>>> bagonergi at gmail.com> ha scritto: >>>>>>> >>>>>>>> This is the correct code (?): >>>>>>>> >>>>>>>> [code]Private Sub Scale(img As Image) >>>>>>>> >>>>>>>> Dim w, h As Integer >>>>>>>> >>>>>>>> w = img.W >>>>>>>> h = img.H >>>>>>>> If h > w Then >>>>>>>> $H = PictureBox1.H >>>>>>>> $W = (PictureBox1.H * w) \ h >>>>>>>> If $W > PictureBox1.W Then >>>>>>>> $W = PictureBox1.W >>>>>>>> $H = (PictureBox1.W * $H) \ $W >>>>>>>> $X = PictureBox1.X >>>>>>>> $Y = PictureBox1.Y + ((PictureBox1.H - $H) \ 2) >>>>>>>> Return >>>>>>>> Endif >>>>>>>> $Y = PictureBox1.Y >>>>>>>> $X = PictureBox1.X + ((PictureBox1.W - $W) \ 2) >>>>>>>> Else >>>>>>>> $W = PictureBox1.W >>>>>>>> $H = (PictureBox1.W * h) \ w >>>>>>>> If $H > PictureBox1.H Then >>>>>>>> $H = PictureBox1.H >>>>>>>> $W = (PictureBox1.H * $W) \ $H >>>>>>>> $Y = PictureBox1.Y >>>>>>>> $X = PictureBox1.X + ((PictureBox1.W - $W) \ 2) >>>>>>>> Return >>>>>>>> Endif >>>>>>>> $X = PictureBox1.X >>>>>>>> $Y = PictureBox1.Y + ((PictureBox1.H - $H) \ 2) >>>>>>>> Endif >>>>>>>> >>>>>>>> End [/code] >>>>>>>> >>>>>>>> Although I would love to be able to create a code capable of >>>>>>>> scaling images on the Form_Resize event >>>>>>>> A task too burdensome for my tired brain. >>>>>>>> >>>>>>>> Regards >>>>>>>> Gianluigi >>>>>>>> >>>>>>>> Il giorno ven 30 nov 2018 alle ore 13:10 Gianluigi < >>>>>>>> bagonergi at gmail.com> ha scritto: >>>>>>>> >>>>>>>>> I need to paint an image in a new image and then show it in a >>>>>>>>> picturebox. >>>>>>>>> The thing seems to work correctly only if the picturebox is the >>>>>>>>> only component on the window. >>>>>>>>> If the hbox is present, the image is deformed (stretching) and the >>>>>>>>> lower part of the image is positioned under the hbox. >>>>>>>>> Am I wrong? >>>>>>>>> I attach a project and two explanatory images (with magnifying >>>>>>>>> glass). >>>>>>>>> >>>>>>>>> Regards >>>>>>>>> Gianluigi >>>>>>>>> >>>>>>>> >>>>>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >>>>>>> ]---- >>>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Fabien Bodard >>>>>> >>>>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >>>>>> ]---- >>>>>> >>>>> >>>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >>>>> ]---- >>>>> >>>> >>>> >>>> -- >>>> Fabien Bodard >>>> >>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >>>> ]---- >>>> >>> >>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- >>> >> >> >> -- >> Fabien Bodard >> >> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- >> > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -- Fabien Bodard -------------- next part -------------- An HTML attachment was scrubbed... URL: From rwe-sse at osnanet.de Sun Dec 2 13:37:47 2018 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Sun, 2 Dec 2018 13:37:47 +0100 Subject: [Gambas-user] Program to use different group rights In-Reply-To: <6972b482-b88a-ec4a-5f2a-50f03f3dd14c@gmail.com> References: <2af98d27-73d8-5a2d-0f27-c0385fad267a@osnanet.de> <9b4b7f67-1333-2a94-78b5-89683ab61a7f@gmail.com> <689d23c4-19f9-ef3d-4411-8caa656ac172@osnanet.de> <6972b482-b88a-ec4a-5f2a-50f03f3dd14c@gmail.com> Message-ID: <56f09202-c83b-9f66-7c82-0841fce7033a@osnanet.de> Me again, now on another system. When we discussed this, I tried it on a Suse with KDE. Now I am on Ubuntu Mate, and it doesn't run anymore. I get the error message "su: only may be started from a terminal" (or something like that, it's in German). Is there a chance to fake a terminal environment in a shell? Regards Rolf Am 26.11.18 um 17:21 schrieb T Lee Davidson: > How about this: > > Public Sub Main() > > Dim sPass, sOutput As String > > sPass = "wrong" > Shell "echo " & sPass & "|su -c True $USER 2>&1" To sOutput > ' Print sOutput > If InStr(sOutput, "failure") > 0 Then > Print "Fail" > Else > Print "Pass" > Endif > > End > > > ___ > Lee > > > On 11/26/18 7:02 AM, Rolf-Werner Eilert wrote: >> Let?me?add?this: >> >> I?just?found?two?solutions: >> >> 1.?Commandline: >> >> if?su?-c?true?"$USER";?then >> ??echo?"Correct?password" >> fi >> >> How?would?I?read?the?exit?code?if?in?a?Gambas?shell? >> >> 2. PAM call. This example is in Ruby, but very much like Gambas. BUT it needs a Ruby library called rpam, so if there is nothing >> comparable in Gambas... >> >> It?boils?down?to?this?line: >> >> if?Rpam.auth(username,?password,?service:?'system-auth') >> >> So I would prefer the first way, but I need to know how to read exit codes?from?a?shell. >> >> Regards >> Rolf > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > > From taboege at gmail.com Sun Dec 2 14:20:06 2018 From: taboege at gmail.com (Tobias Boege) Date: Sun, 2 Dec 2018 14:20:06 +0100 Subject: [Gambas-user] Program to use different group rights In-Reply-To: <56f09202-c83b-9f66-7c82-0841fce7033a@osnanet.de> References: <2af98d27-73d8-5a2d-0f27-c0385fad267a@osnanet.de> <9b4b7f67-1333-2a94-78b5-89683ab61a7f@gmail.com> <689d23c4-19f9-ef3d-4411-8caa656ac172@osnanet.de> <6972b482-b88a-ec4a-5f2a-50f03f3dd14c@gmail.com> <56f09202-c83b-9f66-7c82-0841fce7033a@osnanet.de> Message-ID: <20181202132006.GA2462@highrise.localdomain> On Sun, 02 Dec 2018, Rolf-Werner Eilert wrote: > Me again, now on another system. > > When we discussed this, I tried it on a Suse with KDE. Now I am on Ubuntu > Mate, and it doesn't run anymore. I get the error message "su: only may be > started from a terminal" (or something like that, it's in German). > You can get the default English output by rerunning the program under the C locale. No need to translate it yourself. E.g. $ LC_ALL=C su ... > Is there a chance to fake a terminal environment in a shell? > You mean from Gambas? Shell For Input Output creates a PTY, which is meant to emulate a terminal. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From charlie at cogier.com Sun Dec 2 18:04:11 2018 From: charlie at cogier.com (Charlie Ogier) Date: Sun, 2 Dec 2018 17:04:11 +0000 Subject: [Gambas-user] Ordering a bi-dimensional string[]...by several columns help wanted. In-Reply-To: References: Message-ID: <3e10f5c3-f023-2814-9afb-e5fc484665ff@cogier.com> Hi Jorge, My solution: - Your data is "Country code", "Town" so: - **Data[0,0] = "US"* *and**Data[1,0] = "New York"** *Data[0,1] = "UK"* and *Data[1,1] = "London" ***Etc **We want to sort by the "Town" (So we put it first) Create a *New String[]* with "Town" "Country Code" "Town" *SortList.Add(Data[1,0] & "`" & Data[0,0] & "`" Data[1,0])** **SortList.Add(Data[1,1] & "`" & Data[0,1] & "`" Data[1,1])** *(use a loop) Sort the list *SortList.Sort()* Now rebuild *Data* with the 2nd and 3rd items *For iLoop = 0 to ?** **??? Data[iLoop,0] = Split(SortList[iLoop],"`")[1]***' "UK"* **??? Data[iLoop,1] = Split(SortList[iLoop],"`")[2] *' "London"* **Next* See example attached. Charlie **** On 01/12/2018 18:13, Jorge Carri?n wrote: > The problem: > > I need order a bi-dimensional array by several columns following de > user's criteria. > > It is relatively simple to order a two-dimensional array for a column, > not long ago we saw several solutions in this mail list, but what I > need now is to sort by several columns and that each of them can be > ascending or descending. > > I confess that I have been stuck with the subject for four days, that > I have believed more than once that I had solved it and that in the > end I have given up doing it alone. Does anyone have any idea how to > approach the issue before it drives me crazy? > > There is a "tricky" solution: grab your two-dimensional array, create > with it a sqlite base and let the sqlite engine solve the issue with > an SQL statement ... but this is not the case (it would force the > project to link with the modules database and it's not always convenient) > > Waiting for the better minds than mine advice... > > Best Regards > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: NewTest.tar.gz Type: application/gzip Size: 14645 bytes Desc: not available URL: From shordi at gmail.com Sun Dec 2 21:23:51 2018 From: shordi at gmail.com (=?UTF-8?Q?Jorge_Carri=C3=B3n?=) Date: Sun, 2 Dec 2018 21:23:51 +0100 Subject: [Gambas-user] Ordering a bi-dimensional string[]...by several columns help wanted. In-Reply-To: <3e10f5c3-f023-2814-9afb-e5fc484665ff@cogier.com> References: <3e10f5c3-f023-2814-9afb-e5fc484665ff@cogier.com> Message-ID: Got it! Thanks everybody for the answers and the advices. After 5 days of thick mind running, I've found a solution that is "perfect" for me. It's only valid for strings and if your language has non-english characters you must adecuate the code to it but it works... And much faster than other solutions I've tried. The trick is a function that "reverses" the characters of the descendent keys. So a = z, b=y,c=x, and so on. Yes, I know is a little tricky, but it works. Attached there is a example. It needs elaboration, but the idea is shown on it. El dom., 2 dic. 2018 a las 18:30, Charlie Ogier () escribi?: > Hi Jorge, > > My solution: - > > Your data is "Country code", "Town" so: - > > *Data[0,0] = "US" *and* Data[1,0] = "New York"* > *Data[0,1] = "UK"* and > *Data[1,1] = "London" * > > *Etc *We want to sort by the "Town" (So we put it first) > > Create a *New String[]* with "Town" "Country Code" > "Town" > > *SortList.Add(Data[1,0] & "`" & Data[0,0] & "`" Data[1,0])* > *SortList.Add(Data[1,1] & "`" & Data[0,1] & "`" Data[1,1])* > (use a loop) > > Sort the list > *SortList.Sort()* > > Now rebuild *Data* with the 2nd and 3rd items > > *For iLoop = 0 to ?* > * Data[iLoop,0] = Split(SortList[iLoop],"`")[1]* ' "UK" > * Data[iLoop,1] = Split(SortList[iLoop],"`")[2] *' "London" > *Next* > > See example attached. > > Charlie > > > On 01/12/2018 18:13, Jorge Carri?n wrote: > > The problem: > > I need order a bi-dimensional array by several columns following de user's > criteria. > > It is relatively simple to order a two-dimensional array for a column, not > long ago we saw several solutions in this mail list, but what I need now is > to sort by several columns and that each of them can be ascending or > descending. > > I confess that I have been stuck with the subject for four days, that I > have believed more than once that I had solved it and that in the end I > have given up doing it alone. Does anyone have any idea how to approach the > issue before it drives me crazy? > > There is a "tricky" solution: grab your two-dimensional array, create with > it a sqlite base and let the sqlite engine solve the issue with an SQL > statement ... but this is not the case (it would force the project to link > with the modules database and it's not always convenient) > > Waiting for the better minds than mine advice... > > Best Regards > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sortTable-0.0.1.tar.gz Type: application/gzip Size: 22984 bytes Desc: not available URL: From t.lee.davidson at gmail.com Mon Dec 3 00:51:38 2018 From: t.lee.davidson at gmail.com (T Lee Davidson) Date: Sun, 2 Dec 2018 18:51:38 -0500 Subject: [Gambas-user] Program to use different group rights In-Reply-To: <56f09202-c83b-9f66-7c82-0841fce7033a@osnanet.de> References: <2af98d27-73d8-5a2d-0f27-c0385fad267a@osnanet.de> <9b4b7f67-1333-2a94-78b5-89683ab61a7f@gmail.com> <689d23c4-19f9-ef3d-4411-8caa656ac172@osnanet.de> <6972b482-b88a-ec4a-5f2a-50f03f3dd14c@gmail.com> <56f09202-c83b-9f66-7c82-0841fce7033a@osnanet.de> Message-ID: <612fa78f-9802-d998-a0f7-3f87e98267ee@gmail.com> As pointed out by Tobi, the solution I suggested previously (quoted below) is insecure. I have tested another solution that works on openSUSE. Whether or not it will work on Ubuntu, I don't know. Perhaps the use of "For Input Output" (again, credit to Tobi) will satisfy su's need for a terminal. ' Gambas module file Public $thePassword As String = "badpass" Public Sub Main() Dim Proc As Process Proc = Shell "su -c true $USER" Wait For Input Output As "Proc" 'Respond based on process exit code Print IIf(Proc.Value = 0, "You passed.", "Not authorized: " & Proc.Value) End Public Sub Proc_Read() Dim sInput As String sInput = Read #Last, -256 If InStr(sInput, "Password:") Then Print "Checking password..." Write #Last, $thePassword & "\n" Endif End ___ Lee On 12/2/18 7:37 AM, Rolf-Werner Eilert wrote: > Me?again,?now?on?another?system. > > When we discussed this, I tried it on a Suse with KDE. Now I am on Ubuntu Mate, and it doesn't run anymore. I get the error > message "su: only may be started from a terminal" (or something like that, it's in German). > > Is?there?a?chance?to?fake?a?terminal?environment?in?a?shell? > > Regards > Rolf > > > Am?26.11.18?um?17:21?schrieb?T?Lee?Davidson: >> How?about?this: >> >> Public?Sub?Main() >> >> ???Dim?sPass,?sOutput?As?String >> >> ???sPass?=?"wrong" >> ???Shell?"echo?"?&?sPass?&?"|su?-c?True?$USER?2>&1"?To?sOutput >> ???'?Print?sOutput >> ???If?InStr(sOutput,?"failure")?>?0?Then >> ?????Print?"Fail" >> ???Else >> ?????Print?"Pass" >> ???Endif >> >> End >> >> >> ___ >> Lee From nando_f at nothingsimple.com Mon Dec 3 00:51:50 2018 From: nando_f at nothingsimple.com (nando_f at nothingsimple.com) Date: Sun, 2 Dec 2018 18:51:50 -0500 Subject: [Gambas-user] Ordering a bi-dimensional string[]...by several columns help wanted. In-Reply-To: <3e10f5c3-f023-2814-9afb-e5fc484665ff@cogier.com> References: <3e10f5c3-f023-2814-9afb-e5fc484665ff@cogier.com> Message-ID: <20181202234100.M24751@nothingsimple.com> Another Suggestion: (1) Where do you get the data when you start the program? IF it is external and not hard coded in Gambas, then store it outside the program sorted and you will load it automatically sorted: Country + Town (2) While you're loading it sorted, create a second string array using that same data but do an Insertion Sort on the way you want it sorted: Town + Country This second step is possible even if you have your data hard-coded in Gambas. Just loop through once and perform an Insertion Sort into this second list. If you are actually doing Countries and Towns, the list is not infinite and we shouldn't care of the doubling of data. If this is something very big, then there is a clever way to keep only one array, but use a different array which points to the data. Such an array is INTEGER[] or LONG[] and point to the row of City+Town combination. And there are other less-obvious ways to do what you want, but this technique I've used many times and no run-time sorting is needed. -Nando -- Open WebMail Project (http://openwebmail.org) ---------- Original Message ----------- From: Charlie Ogier To: user at lists.gambas-basic.org Sent: Sun, 2 Dec 2018 17:04:11 +0000 Subject: Re: [Gambas-user] Ordering a bi-dimensional string[]...by several columns help wanted. > Hi Jorge, > > My solution: - > > Your data is "Country code", "Town" so: - > > **Data[0,0] = "US"* *and**Data[1,0] = "New York"** > *Data[0,1] = "UK"* and *Data[1,1] = "London" > ***Etc > > **We want to sort by the "Town" (So we put it first) > > Create a *New String[]* with "Town" "Country Code" > "Town" > > *SortList.Add(Data[1,0] & "`" & Data[0,0] & "`" Data[1,0])** > **SortList.Add(Data[1,1] & "`" & Data[0,1] & "`" Data[1,1])** > *(use a loop) > > Sort the list > *SortList.Sort()* > > Now rebuild *Data* with the 2nd and 3rd items > > *For iLoop = 0 to ?** > **??? Data[iLoop,0] = Split(SortList[iLoop],"`")[1]***' "UK"* > **??? Data[iLoop,1] = Split(SortList[iLoop],"`")[2] *' "London"* > **Next* > > See example attached. > > Charlie > > **** > On 01/12/2018 18:13, Jorge Carri?n wrote: > > The problem: > > > > I need order a bi-dimensional array by several columns following de > > user's criteria. > > > > It is relatively simple to order a two-dimensional array for a column, > > not long ago we saw several solutions in this mail list, but what I > > need now is to sort by several columns and that each of them can be > > ascending or descending. > > > > I confess that I have been stuck with the subject for four days, that > > I have believed more than once that I had solved it and that in the > > end I have given up doing it alone. Does anyone have any idea how to > > approach the issue before it drives me crazy? > > > > There is a "tricky" solution: grab your two-dimensional array, create > > with it a sqlite base and let the sqlite engine solve the issue with > > an SQL statement ... but this is not the case (it would force the > > project to link with the modules database and it's not always convenient) > > > > Waiting for the better minds than mine advice... > > > > Best Regards > > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- ------- End of Original Message ------- From adamnt42 at gmail.com Mon Dec 3 09:30:33 2018 From: adamnt42 at gmail.com (Bruce) Date: Mon, 3 Dec 2018 19:00:33 +1030 Subject: [Gambas-user] Monday evening thinkies (thought experiments) Message-ID: Just having a think about some ideas and thought I might seek some input from regular readers. I don't want solutions, just readers thoughts. 1) Selecting the database version at runtime. We have several "versions" of our databases. They all reside on a single server. There is "PRODUCTION", "TEST1", "TESTSOMETHING", etc etc. Apart from running the associated applications from the installed i.e. production version of the project which should of course automatically use the "PRODUCTION" database, it would be nice to be able to select one of the other databases at runtime. i.e. when running the application from either within the IDE or from an executable in the user's home. So, I was thinking about some way of allowing the user to select the actual database at runtime. Immediate thoughts are to have "all" the possible connections defined in the project Connections. That has dragons in it. Has anyone thought about this or come up with a good (i.e. simple, elegant and easily transportable between projects) answer to this? If so, could they just share their experience. Was it easy or not? Did you succeed? (Please note, I'm not after a total "Log In" solution here. That thinky's coming!) 2) A way to show the content of a password textbox. One thing I like about recent websites and apps is that you can click and hold on a little "eye" button next to a "password protected" field in a form and while you hold the mouse button down it will show the actual password in plain text. Has anyone had any thoughts or tried this with a Gambas password text box? (Obvious security issues need not be raised yet :-) .) 3) A general "Log In" algorithm and UI and component/library. (Told you) I have several of these. They are all basically a pain in the ****. Has anyone got a good, simple elegant DESIGN for one of these beasts. Again, I don't want a solution, just experiences and ideas. 4) A good "statusbar" control. This time I am looking for actual solutions! I have built several of these over time but I have never been really satisfied with my creations. My ideal status bar would be a bit like the ancient (but soooo easy to use) Borland Turbo pascal one. (If you don't know what that is then you don't know how old I am. :-) Which is good.) Requirements include: multiple "panels" within the bar, ability to show status data graphically as well as textually, runtime hideable/showable (like an expander but only shows while the mouse button on the trigger is held down) and a whole lot more! That was the final one - and that's enough for a Monday. Looking forward to any input. Cheers bruce From rwe-sse at osnanet.de Mon Dec 3 10:41:57 2018 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Mon, 3 Dec 2018 10:41:57 +0100 Subject: [Gambas-user] Monday evening thinkies (thought experiments) In-Reply-To: References: Message-ID: > 2) A way to show the content of a password textbox. > > One thing I like about recent websites and apps is that you can click > and hold on a little "eye" button next to a "password protected" field > in a form and while you hold the mouse button down it will show the > actual password in plain text. > > Has anyone had any thoughts or tried this with a Gambas password text > box? (Obvious security issues need not be raised yet :-) .) > > At least for this one, Bruce, quite spontaneously: There is TextBox.Password which can be activated by setting it to True. Setting it back to False should make the contents visible. Or doesn't it have an effect during runtime? The other question is that of a button which stays activated during mouse key press only. Maybe this could be solved by a timer, with a certain time lapse, but there might be more direct ways via Mouse events... Regards Rolf From charlie at cogier.com Mon Dec 3 16:55:28 2018 From: charlie at cogier.com (Charlie Ogier) Date: Mon, 3 Dec 2018 15:55:28 +0000 Subject: [Gambas-user] Monday evening thinkies (thought experiments) In-Reply-To: References: Message-ID: <8f559cc6-b15e-9b4b-2010-a0716dc1a998@cogier.com> Hi Bruce, Regarding the 'Password' issue have a look at the attached program. Charlie On 03/12/2018 08:30, Bruce wrote: > Just having a think about some ideas and thought I might seek some > input from regular readers.? I don't want solutions, just readers > thoughts. > > > 1) Selecting the database version at runtime. > > We have several "versions" of our databases. They all reside on a > single server. There is "PRODUCTION", "TEST1", "TESTSOMETHING", etc > etc. Apart from running the associated applications from the installed > i.e. production version of the project which should of course > automatically use the "PRODUCTION" database, it would be nice to be > able to select one of the other databases at runtime. i.e. when > running the application from either within the IDE or from an > executable in the user's home. > > So, I was thinking about some way of allowing the user to select the > actual database at runtime. Immediate thoughts are to have "all" the > possible connections defined in the project Connections. That has > dragons in it. > > Has anyone thought about this or come up with a good (i.e. simple, > elegant and easily transportable between projects) answer to this? If > so, could they just share their experience. Was it easy or not? Did > you succeed? (Please note, I'm not after a total "Log In" solution > here. That thinky's coming!) > > > 2) A way to show the content of a password textbox. > > One thing I like about recent websites and apps is that you can click > and hold on a little "eye" button next to a "password protected" field > in a form and while you hold the mouse button down it will show the > actual password in plain text. > > Has anyone had any thoughts or tried this with a Gambas password text > box? (Obvious security issues need not be raised yet :-) .) > > > 3) A general "Log In" algorithm and UI and component/library. > > (Told you) > > I have several of these. They are all basically a pain in the ****. > Has anyone got a good, simple elegant DESIGN for one of these beasts. > Again, I don't want a solution, just experiences and ideas. > > > 4) A good "statusbar" control. > > This time I am looking for actual solutions!? I have built several of > these over time but I have never been really satisfied with my > creations. My ideal status bar would be a bit like the ancient (but > soooo easy to use) Borland Turbo pascal one.? (If you don't know what > that is then you don't know how old I am. :-) Which is good.) > > Requirements include: multiple "panels" within the bar, ability to > show status data graphically as well as textually, runtime > hideable/showable (like an expander but only shows while the mouse > button on the trigger is held down) and a whole lot more! > > That was the final one - and that's enough for a Monday. > > Looking forward to any input. > Cheers > bruce > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- -------------- next part -------------- A non-text attachment was scrubbed... Name: NewTest.tar.gz Type: application/gzip Size: 12410 bytes Desc: not available URL: From rwe-sse at osnanet.de Mon Dec 3 18:12:24 2018 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Mon, 3 Dec 2018 18:12:24 +0100 Subject: [Gambas-user] Program to use different group rights In-Reply-To: <612fa78f-9802-d998-a0f7-3f87e98267ee@gmail.com> References: <2af98d27-73d8-5a2d-0f27-c0385fad267a@osnanet.de> <9b4b7f67-1333-2a94-78b5-89683ab61a7f@gmail.com> <689d23c4-19f9-ef3d-4411-8caa656ac172@osnanet.de> <6972b482-b88a-ec4a-5f2a-50f03f3dd14c@gmail.com> <56f09202-c83b-9f66-7c82-0841fce7033a@osnanet.de> <612fa78f-9802-d998-a0f7-3f87e98267ee@gmail.com> Message-ID: <22c39a46-e629-f948-6fc2-38152f2a8253@osnanet.de> That works great, even under Mate. Thank you T Lee! I could change it so it runs in a graphical application. Regards Rolf Am 03.12.18 um 00:51 schrieb T Lee Davidson: > As pointed out by Tobi, the solution I suggested previously (quoted below) is insecure. > > I have tested another solution that works on openSUSE. Whether or not it will work on Ubuntu, I don't know. Perhaps the use of > "For Input Output" (again, credit to Tobi) will satisfy su's need for a terminal. > > ' Gambas module file > > Public $thePassword As String = "badpass" > > Public Sub Main() > > Dim Proc As Process > > Proc = Shell "su -c true $USER" Wait For Input Output As "Proc" > 'Respond based on process exit code > Print IIf(Proc.Value = 0, "You passed.", "Not authorized: " & Proc.Value) > > End > > Public Sub Proc_Read() > > Dim sInput As String > > sInput = Read #Last, -256 > If InStr(sInput, "Password:") Then > Print "Checking password..." > Write #Last, $thePassword & "\n" > Endif > > End > > > ___ > Lee > > > On 12/2/18 7:37 AM, Rolf-Werner Eilert wrote: >> Me?again,?now?on?another?system. >> >> When we discussed this, I tried it on a Suse with KDE. Now I am on Ubuntu Mate, and it doesn't run anymore. I get the error >> message "su: only may be started from a terminal" (or something like that, it's in German). >> >> Is?there?a?chance?to?fake?a?terminal?environment?in?a?shell? >> >> Regards >> Rolf >> >> >> Am?26.11.18?um?17:21?schrieb?T?Lee?Davidson: >>> How?about?this: >>> >>> Public?Sub?Main() >>> >>> ???Dim?sPass,?sOutput?As?String >>> >>> ???sPass?=?"wrong" >>> ???Shell?"echo?"?&?sPass?&?"|su?-c?True?$USER?2>&1"?To?sOutput >>> ???'?Print?sOutput >>> ???If?InStr(sOutput,?"failure")?>?0?Then >>> ?????Print?"Fail" >>> ???Else >>> ?????Print?"Pass" >>> ???Endif >>> >>> End >>> >>> >>> ___ >>> Lee > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > > From rwe-sse at osnanet.de Mon Dec 3 18:15:36 2018 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Mon, 3 Dec 2018 18:15:36 +0100 Subject: [Gambas-user] Program to use different group rights In-Reply-To: <20181202132006.GA2462@highrise.localdomain> References: <2af98d27-73d8-5a2d-0f27-c0385fad267a@osnanet.de> <9b4b7f67-1333-2a94-78b5-89683ab61a7f@gmail.com> <689d23c4-19f9-ef3d-4411-8caa656ac172@osnanet.de> <6972b482-b88a-ec4a-5f2a-50f03f3dd14c@gmail.com> <56f09202-c83b-9f66-7c82-0841fce7033a@osnanet.de> <20181202132006.GA2462@highrise.localdomain> Message-ID: <3389ca52-5a0e-1947-18ac-d6f55e84d3ec@osnanet.de> Am 02.12.18 um 14:20 schrieb Tobias Boege: > On Sun, 02 Dec 2018, Rolf-Werner Eilert wrote: >> Me again, now on another system. >> >> When we discussed this, I tried it on a Suse with KDE. Now I am on Ubuntu >> Mate, and it doesn't run anymore. I get the error message "su: only may be >> started from a terminal" (or something like that, it's in German). >> > > You can get the default English output by rerunning the program under > the C locale. No need to translate it yourself. E.g. > > $ LC_ALL=C su ... Great! I used that, runs perfectly. As to your security issue: This will be used on fat clients which are rather well isolated from each other. Furthermore, no user here will be able to look behind the technical how-tos. Hackers go somewhere else :) Regards Rolf From karl.reinl at fen-net.de Mon Dec 3 22:56:04 2018 From: karl.reinl at fen-net.de (Karl Reinl) Date: Mon, 03 Dec 2018 22:56:04 +0100 Subject: [Gambas-user] Monday evening thinkies (thought experiments) In-Reply-To: References: Message-ID: <1543874164.4564.38.camel@Scenic.local> Am Montag, den 03.12.2018, 19:00 +1030 schrieb Bruce: > 1) Selecting the database version at runtime. Salut Bruce, https://en.wikipedia.org/wiki/Multitenancy for me that's the base of my solution, in my version. My database projects have this multi-client capability, and TEST is one of them so : - change at runtime - no new Login - with a 'client to TEST' copy function, you can play with real data - at develop time in the IDE, I have an argument called ISIDE. If ISIDE.is found (could never be at runtime, except is passed as argument) I use a special config-file and start with the TEST client DB . When I backup my DB, I delete the TEST clients data first. -- Amicalement Charlie From jussi.lahtinen at gmail.com Mon Dec 3 23:13:49 2018 From: jussi.lahtinen at gmail.com (Jussi Lahtinen) Date: Tue, 4 Dec 2018 00:13:49 +0200 Subject: [Gambas-user] JIT Bug Message-ID: Missing argument causes crash and error message, which incorrectly blame another function. See attachment. Jussi -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: GambasTestercmd-0.10.14.tar.gz Type: application/gzip Size: 27314 bytes Desc: not available URL: From adamnt42 at gmail.com Tue Dec 4 00:05:01 2018 From: adamnt42 at gmail.com (Bruce) Date: Tue, 4 Dec 2018 09:35:01 +1030 Subject: [Gambas-user] Monday evening thinkies (thought experiments) In-Reply-To: <8f559cc6-b15e-9b4b-2010-a0716dc1a998@cogier.com> References: <8f559cc6-b15e-9b4b-2010-a0716dc1a998@cogier.com> Message-ID: <2092c00a-5189-5e36-92e8-c901c8180a4a@gmail.com> Wow! Thanks for that Charlie and Rolf. I was so deep in thought I never imagined it would be so easy! b On 4/12/18 2:25 am, Charlie Ogier wrote: > Hi Bruce, > > Regarding the 'Password' issue have a look at the attached program. > > Charlie > > On 03/12/2018 08:30, Bruce wrote: >> Just having a think about some ideas and thought I might seek some >> input from regular readers.? I don't want solutions, just readers >> thoughts. >> >> >> 2) A way to show the content of a password textbox. >> >> One thing I like about recent websites and apps is that you can click >> and hold on a little "eye" button next to a "password protected" field >> in a form and while you hold the mouse button down it will show the >> actual password in plain text. >> >> Has anyone had any thoughts or tried this with a Gambas password text >> box? (Obvious security issues need not be raised yet :-) .) >> >> Looking forward to any input. >> Cheers >> bruce >> > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > From adamnt42 at gmail.com Tue Dec 4 00:08:32 2018 From: adamnt42 at gmail.com (Bruce) Date: Tue, 4 Dec 2018 09:38:32 +1030 Subject: [Gambas-user] Monday evening thinkies (thought experiments) In-Reply-To: <1543874164.4564.38.camel@Scenic.local> References: <1543874164.4564.38.camel@Scenic.local> Message-ID: Good stuff! That's exactly the issue I am facing and the information I am after. Thanks Karl. b On 4/12/18 8:26 am, Karl Reinl wrote: > Am Montag, den 03.12.2018, 19:00 +1030 schrieb Bruce: >> 1) Selecting the database version at runtime. > > > Salut Bruce, > > https://en.wikipedia.org/wiki/Multitenancy for me that's the base of my > solution, in my version. > > My database projects have this multi-client capability, and TEST is one > of them so : > - change at runtime > - no new Login > - with a 'client to TEST' copy function, you can play with real data > > - at develop time in the IDE, I have an argument called ISIDE. If > ISIDE.is found (could never be at runtime, except is passed as argument) > I use a special config-file and start with the TEST client DB . > When I backup my DB, I delete the TEST clients data first. > From g4mba5 at gmail.com Tue Dec 4 00:31:06 2018 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Tue, 4 Dec 2018 00:31:06 +0100 Subject: [Gambas-user] JIT Bug In-Reply-To: References: Message-ID: <8bc168f6-e1c7-41cf-194b-1dcde7d951ea@gmail.com> Le 03/12/2018 ? 23:13, Jussi Lahtinen a ?crit?: > Missing argument causes crash and error message, which incorrectly blame > another function. > See attachment. > > > Jussi > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > Actually it's an old bug related to object-to-object conversion that is now detected because of a recently added test. -- Beno?t Minisini From g4mba5 at gmail.com Tue Dec 4 00:49:12 2018 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Tue, 4 Dec 2018 00:49:12 +0100 Subject: [Gambas-user] JIT Bug In-Reply-To: <8bc168f6-e1c7-41cf-194b-1dcde7d951ea@gmail.com> References: <8bc168f6-e1c7-41cf-194b-1dcde7d951ea@gmail.com> Message-ID: Le 04/12/2018 ? 00:31, Beno?t Minisini a ?crit?: > Le 03/12/2018 ? 23:13, Jussi Lahtinen a ?crit?: >> Missing argument causes crash and error message, which incorrectly >> blame another function. >> See attachment. >> >> >> Jussi >> >> >> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- >> > > Actually it's an old bug related to object-to-object conversion that is > now detected because of a recently added test. > Fixed in commit https://gitlab.com/gambas/gambas/commit/52c1243c35d613e0d20a9d7026a62dd1abef96d9. Regards, -- Beno?t Minisini From jussi.lahtinen at gmail.com Tue Dec 4 01:58:27 2018 From: jussi.lahtinen at gmail.com (Jussi Lahtinen) Date: Tue, 4 Dec 2018 02:58:27 +0200 Subject: [Gambas-user] JIT Bug In-Reply-To: References: <8bc168f6-e1c7-41cf-194b-1dcde7d951ea@gmail.com> Message-ID: I think the bug is still somewhat kicking. Wrong argument causes crash. See attachment. Jussi On Tue, Dec 4, 2018 at 1:50 AM Beno?t Minisini wrote: > Le 04/12/2018 ? 00:31, Beno?t Minisini a ?crit : > > Le 03/12/2018 ? 23:13, Jussi Lahtinen a ?crit : > >> Missing argument causes crash and error message, which incorrectly > >> blame another function. > >> See attachment. > >> > >> > >> Jussi > >> > >> > >> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net > ]---- > >> > > > > Actually it's an old bug related to object-to-object conversion that is > > now detected because of a recently added test. > > > > Fixed in commit > > https://gitlab.com/gambas/gambas/commit/52c1243c35d613e0d20a9d7026a62dd1abef96d9 > . > > Regards, > > -- > Beno?t Minisini > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: GambasTestercmd-0.10.15.tar.gz Type: application/gzip Size: 27465 bytes Desc: not available URL: From rwe-sse at osnanet.de Tue Dec 4 10:53:59 2018 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Tue, 4 Dec 2018 10:53:59 +0100 Subject: [Gambas-user] Date(Now) with time component under Ubuntu? In-Reply-To: References: Message-ID: <0430a08c-dfc4-7617-1b13-308c1d633979@osnanet.de> This has appeared in another program of mine, and it seems to be a general issue with date strings. Now on a DateChooser, I not only get back a day -1 but also with a time string of 23:00:00. So instead of "12-04-2018" I get "12-03-2018 23:00:00". I would guess it has to do with Gtk vs Qt, but can it be fixed other than waiting for errors and adapting Gambas code? Regards Rolf Am 01.12.18 um 16:22 schrieb Rolf-Werner Eilert: > Just found this strange thing: > > Up to now I was under Suse with KDE. In one of my programs, I use > Date(Now) which - as the documentation says - delivers the date > component only. > > It did so under Suse, but under Ubuntu Mate I get a runtime error, and > when I search the reason for it I find that Date(Now) delivers a locale > date + time of 00:00:00. > > I found a quick workaround in my program for it, but it's strange, isn't > it? > > Regards > Rolf > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > > From taboege at gmail.com Tue Dec 4 11:25:10 2018 From: taboege at gmail.com (Tobias Boege) Date: Tue, 4 Dec 2018 11:25:10 +0100 Subject: [Gambas-user] Date(Now) with time component under Ubuntu? In-Reply-To: <0430a08c-dfc4-7617-1b13-308c1d633979@osnanet.de> References: <0430a08c-dfc4-7617-1b13-308c1d633979@osnanet.de> Message-ID: <20181204102510.GG20497@highrise.localdomain> On Tue, 04 Dec 2018, Rolf-Werner Eilert wrote: > This has appeared in another program of mine, and it seems to be a general > issue with date strings. Now on a DateChooser, I not only get back a day -1 > but also with a time string of 23:00:00. So instead of "12-04-2018" I get > "12-03-2018 23:00:00". > > I would guess it has to do with Gtk vs Qt, but can it be fixed other than > waiting for errors and adapting Gambas code? > I had hoped someone more knowledgeable would have answered by now, but here is what I think: there are actually no time-less dates in Gambas. When you put a normal Date (with time component) through the Date() function, you get a Date back which always has its time component zeroed out. My guess is that the data your program deals with didn't change between the two distros, but something in the way it is displayed has --- Gambas version, toolkit, locale, ...? Disclaimer: not a date specialist. It may be wrong what I said above about time-less dates not existing, but FWIW the GB_DATE structure in main/share/gambas.h has a `date` and a `time` member. You can set one to zero and treat that as a special value, but you can't get rid of it. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From rwe-sse at osnanet.de Tue Dec 4 11:23:20 2018 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Tue, 4 Dec 2018 11:23:20 +0100 Subject: [Gambas-user] Date(Now) with time component under Ubuntu? In-Reply-To: References: Message-ID: To give you an idea of the problem, here is a code snippet from this second application, it is in Form_Open: ----- t$ = Date(Now) heute = String.Mid(t$, 4, 2) & "-" & String.Left(t$, 2) & "-" & String.Mid(t$, 7, 4) DerTag.Tag = Date(Now) DerTag.Text = "heute, " & Wochentag(Date(Now)) & ", " & Replace(heute, "-", ".") ----- Today (4th December) - t$ becomes "12.03.2018 23:00:00" - 'heute' of course becomes "12-03-2018" Now it's curious: - DerTag.Tag becomes "04.12.2018 00:00:00" i. e. day and hour +1 !! And of course, it goes wrong here: - DerTag.Text becomes "heute, Dienstag, 03.12.2018" How to solve this mess??? Regards Rolf Am 01.12.18 um 16:22 schrieb Rolf-Werner Eilert: > Just found this strange thing: > > Up to now I was under Suse with KDE. In one of my programs, I use > Date(Now) which - as the documentation says - delivers the date > component only. > > It did so under Suse, but under Ubuntu Mate I get a runtime error, and > when I search the reason for it I find that Date(Now) delivers a locale > date + time of 00:00:00. > > I found a quick workaround in my program for it, but it's strange, isn't > it? > > Regards > Rolf > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > > From rwe-sse at osnanet.de Tue Dec 4 12:25:27 2018 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Tue, 4 Dec 2018 12:25:27 +0100 Subject: [Gambas-user] Date(Now) with time component under Ubuntu? In-Reply-To: <20181204102510.GG20497@highrise.localdomain> References: <0430a08c-dfc4-7617-1b13-308c1d633979@osnanet.de> <20181204102510.GG20497@highrise.localdomain> Message-ID: <7937489f-eb3d-62a4-0a50-e892c64dcd68@osnanet.de> Am 04.12.18 um 11:25 schrieb Tobias Boege: > On Tue, 04 Dec 2018, Rolf-Werner Eilert wrote: >> This has appeared in another program of mine, and it seems to be a general >> issue with date strings. Now on a DateChooser, I not only get back a day -1 >> but also with a time string of 23:00:00. So instead of "12-04-2018" I get >> "12-03-2018 23:00:00". >> >> I would guess it has to do with Gtk vs Qt, but can it be fixed other than >> waiting for errors and adapting Gambas code? >> > > I had hoped someone more knowledgeable would have answered by now, > but here is what I think: there are actually no time-less dates in > Gambas. When you put a normal Date (with time component) through > the Date() function, you get a Date back which always has its time > component zeroed out. My guess is that the data your program deals > with didn't change between the two distros, but something in the > way it is displayed has --- Gambas version, toolkit, locale, ...? > > Disclaimer: not a date specialist. It may be wrong what I said above > about time-less dates not existing, but FWIW the GB_DATE structure > in main/share/gambas.h has a `date` and a `time` member. You can set > one to zero and treat that as a special value, but you can't get > rid of it. > > Regards, > Tobi > Thank you for this answer, it explains at least part of the hassle. Under my older system, Date(Now) in fact only delivered the date part, no time part. But this could be solved easily. This morning I found another, more severe "issue", described some hours ago. How shall I deal with that? It actually makes a lot of things being messed up here... Regards Rolf From g4mba5 at gmail.com Tue Dec 4 12:56:04 2018 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Tue, 4 Dec 2018 12:56:04 +0100 Subject: [Gambas-user] Date(Now) with time component under Ubuntu? In-Reply-To: References: Message-ID: <83319104-2302-418d-bb99-c49b2b906e9e@gmail.com> Le 04/12/2018 ? 11:23, Rolf-Werner Eilert a ?crit?: > To give you an idea of the problem, here is a code snippet from this > second application, it is in Form_Open: > > ----- > ? t$ = Date(Now) > ? heute = String.Mid(t$, 4, 2) & "-" & String.Left(t$, 2) & "-" & > String.Mid(t$, 7, 4) > ? DerTag.Tag = Date(Now) > ? DerTag.Text = "heute, " & Wochentag(Date(Now)) & ", " & > Replace(heute, "-", ".") > ----- > > > > Today (4th December) > - t$ becomes "12.03.2018 23:00:00" > - 'heute' of course becomes "12-03-2018" > > Now it's curious: > - DerTag.Tag becomes "04.12.2018 00:00:00" i. e. day and hour +1 !! > > And of course, it goes wrong here: > - DerTag.Text becomes "heute, Dienstag, 03.12.2018" > > > How to solve this mess??? > > Regards > Rolf > > Read carefully the documentation about Date(), avoid implicit conversion from Date to String, Read carefully the documentation about Print, CStr() and Str(), and just don't mix local and universal date representations. For example, let's analyze the following expression: t$ = Date(Now) ' Assuming that t$ is a String variable Now -> Return a Date value corrresponding to the current date & time. Date(Now) -> Return the date part, in the current localization (i.e. the current timezone). It means that the time part is set to 00:00:00, but in the current timezone. t$ = Date(Now) -> Assign the previous date value to a string variable, hence applying first the automatic conversion from Date to String. So it actually means... t$ = CStr(Date(Now)) CStr() converts the date into a UTC date representation, not in your local representation. So you won't see a pure date: the time is shifted according to your timezone. For the other expressions, I can't tell you, you don't give any information about the functions and variable you use. And I guess it worked before because you used a Gambas version where you had a bug in date / string conversion. I can't say more without you giving more details. Regards, -- Beno?t Minisini From rwe-sse at osnanet.de Tue Dec 4 13:16:13 2018 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Tue, 4 Dec 2018 13:16:13 +0100 Subject: [Gambas-user] Date(Now) with time component under Ubuntu? In-Reply-To: <83319104-2302-418d-bb99-c49b2b906e9e@gmail.com> References: <83319104-2302-418d-bb99-c49b2b906e9e@gmail.com> Message-ID: <197d4389-a44a-9d45-70ca-52256e0c4fd5@osnanet.de> Am 04.12.18 um 12:56 schrieb Beno?t Minisini: > Le 04/12/2018 ? 11:23, Rolf-Werner Eilert a ?crit?: >> To give you an idea of the problem, here is a code snippet from this >> second application, it is in Form_Open: >> >> ----- >> ?? t$ = Date(Now) >> ?? heute = String.Mid(t$, 4, 2) & "-" & String.Left(t$, 2) & "-" & >> String.Mid(t$, 7, 4) >> ?? DerTag.Tag = Date(Now) >> ?? DerTag.Text = "heute, " & Wochentag(Date(Now)) & ", " & >> Replace(heute, "-", ".") >> ----- >> >> >> >> Today (4th December) >> - t$ becomes "12.03.2018 23:00:00" >> - 'heute' of course becomes "12-03-2018" >> >> Now it's curious: >> - DerTag.Tag becomes "04.12.2018 00:00:00" i. e. day and hour +1 !! >> >> And of course, it goes wrong here: >> - DerTag.Text becomes "heute, Dienstag, 03.12.2018" >> >> >> How to solve this mess??? >> >> Regards >> Rolf >> >> > > Read carefully the documentation about Date(), avoid implicit conversion > from Date to String, Read carefully the documentation about Print, > CStr() and Str(), and just don't mix local and universal date > representations. > > For example, let's analyze the following expression: > > t$ = Date(Now) ' Assuming that t$ is a String variable > > Now -> Return a Date value corrresponding to the current date & time. > > Date(Now) -> Return the date part, in the current localization (i.e. the > current timezone). It means that the time part is set to 00:00:00, but > in the current timezone. > > t$ = Date(Now) -> Assign the previous date value to a string variable, > hence applying first the automatic conversion from Date to String. So it > actually means... > > t$ = CStr(Date(Now)) > > CStr() converts the date into a UTC date representation, not in your > local representation. So you won't see a pure date: the time is shifted > according to your timezone. > > For the other expressions, I can't tell you, you don't give any > information about the functions and variable you use. > > And I guess it worked before because you used a Gambas version where you > had a bug in date / string conversion. I can't say more without you > giving more details. > > Regards, > This explains it perfectly: I used an older Gambas version and programmed based on a buggy date-string conversion. Guess this is exactly what happened. And now I understood how these conversions are really meant to function. Thank you for that explanation! Rolf From gambas.fr at gmail.com Tue Dec 4 22:59:01 2018 From: gambas.fr at gmail.com (Fabien Bodard) Date: Tue, 4 Dec 2018 22:59:01 +0100 Subject: [Gambas-user] PictureBox and Containers strange behaviour In-Reply-To: References: Message-ID: This is a new version ... i have forget to reinit the initial position when the first image reach the view top. Le mar. 4 d?c. 2018 ? 22:38, Fabien Bodard a ?crit : > Sorry for the late :-) > > I think this is what you are looking for :-)... and there is not picture > box any more. > > Le sam. 1 d?c. 2018 ? 22:19, Fabien Bodard a ?crit : > >> no >> I will try to show you an example tomorow >> >> Le sam. 1 d?c. 2018 ? 19:43, Gianluigi a ?crit : >> >>> do you mean: Using two pictureboxes, moving and loading them to make a >>> smooth movement appear? >>> Ok, I'll try but not today >>> >>> Regards >>> >>> Il giorno sab 1 dic 2018 alle ore 18:57 Fabien Bodard < >>> gambas.fr at gmail.com> ha scritto: >>> >>>> you must not load images in one image... in fact you must load each >>>> image in a image variable. >>>> >>>> then you manage the layout during the drawing event. >>>> >>>> a timer trigger call the drawing area event when needed ... during the >>>> move. >>>> >>>> >>>> >>>> Le sam. 1 d?c. 2018 ? 18:28, Gianluigi a ?crit : >>>> >>>>> Hi Fabien, >>>>> the idea of loading images into one image was silly and I should have >>>>> understood it right away. >>>>> Too heavy. >>>>> Aborted project. >>>>> >>>>> Regards >>>>> Gianluigi >>>>> >>>>> Il giorno sab 1 dic 2018 alle ore 15:21 Fabien Bodard < >>>>> gambas.fr at gmail.com> ha scritto: >>>>> >>>>>> Ok I seen the idea ... >>>>>> >>>>>> For the movement you can take a look in the FAbout of the ide code >>>>>> >>>>>> Le sam. 1 d?c. 2018 ? 14:05, Gianluigi a >>>>>> ?crit : >>>>>> >>>>>>> Hi Fabien, >>>>>>> very interesting, excellent result and little work :-D >>>>>>> >>>>>>> My problem is to adapt a sequence of images of different format and >>>>>>> type in a single film-like image (to be clear). >>>>>>> I thought about doing so, this is just the first part of the code >>>>>>> (now I use the mouse wheel just to try), I do not think I can adapt your >>>>>>> code here. >>>>>>> >>>>>>> The idea (idiot) came to me from a question on our forum and so I >>>>>>> would like to build an image viewer that shows a random image like a slot >>>>>>> machine, now I start to study how to give it the movement (I do not know if >>>>>>> two images series are enough). >>>>>>> You can lose a lot of money by betting us over ;-D >>>>>>> >>>>>>> Regards >>>>>>> Gianluigi >>>>>>> >>>>>>> Il giorno sab 1 dic 2018 alle ore 08:44 Fabien Bodard < >>>>>>> gambas.fr at gmail.com> ha scritto: >>>>>>> >>>>>>>> Hi dear friend >>>>>>>> >>>>>>>> This is the same with less work ;-) >>>>>>>> >>>>>>>> Regards >>>>>>>> >>>>>>>> Fabien Bodard >>>>>>>> >>>>>>>> Le ven. 30 nov. 2018 ? 16:30, Gianluigi a >>>>>>>> ?crit : >>>>>>>> >>>>>>>>> Finally it works >>>>>>>>> See attached file >>>>>>>>> >>>>>>>>> Reagards >>>>>>>>> Gianluigi >>>>>>>>> >>>>>>>>> Il giorno ven 30 nov 2018 alle ore 15:39 Gianluigi < >>>>>>>>> bagonergi at gmail.com> ha scritto: >>>>>>>>> >>>>>>>>>> This is the correct code (?): >>>>>>>>>> >>>>>>>>>> [code]Private Sub Scale(img As Image) >>>>>>>>>> >>>>>>>>>> Dim w, h As Integer >>>>>>>>>> >>>>>>>>>> w = img.W >>>>>>>>>> h = img.H >>>>>>>>>> If h > w Then >>>>>>>>>> $H = PictureBox1.H >>>>>>>>>> $W = (PictureBox1.H * w) \ h >>>>>>>>>> If $W > PictureBox1.W Then >>>>>>>>>> $W = PictureBox1.W >>>>>>>>>> $H = (PictureBox1.W * $H) \ $W >>>>>>>>>> $X = PictureBox1.X >>>>>>>>>> $Y = PictureBox1.Y + ((PictureBox1.H - $H) \ 2) >>>>>>>>>> Return >>>>>>>>>> Endif >>>>>>>>>> $Y = PictureBox1.Y >>>>>>>>>> $X = PictureBox1.X + ((PictureBox1.W - $W) \ 2) >>>>>>>>>> Else >>>>>>>>>> $W = PictureBox1.W >>>>>>>>>> $H = (PictureBox1.W * h) \ w >>>>>>>>>> If $H > PictureBox1.H Then >>>>>>>>>> $H = PictureBox1.H >>>>>>>>>> $W = (PictureBox1.H * $W) \ $H >>>>>>>>>> $Y = PictureBox1.Y >>>>>>>>>> $X = PictureBox1.X + ((PictureBox1.W - $W) \ 2) >>>>>>>>>> Return >>>>>>>>>> Endif >>>>>>>>>> $X = PictureBox1.X >>>>>>>>>> $Y = PictureBox1.Y + ((PictureBox1.H - $H) \ 2) >>>>>>>>>> Endif >>>>>>>>>> >>>>>>>>>> End [/code] >>>>>>>>>> >>>>>>>>>> Although I would love to be able to create a code capable of >>>>>>>>>> scaling images on the Form_Resize event >>>>>>>>>> A task too burdensome for my tired brain. >>>>>>>>>> >>>>>>>>>> Regards >>>>>>>>>> Gianluigi >>>>>>>>>> >>>>>>>>>> Il giorno ven 30 nov 2018 alle ore 13:10 Gianluigi < >>>>>>>>>> bagonergi at gmail.com> ha scritto: >>>>>>>>>> >>>>>>>>>>> I need to paint an image in a new image and then show it in a >>>>>>>>>>> picturebox. >>>>>>>>>>> The thing seems to work correctly only if the picturebox is the >>>>>>>>>>> only component on the window. >>>>>>>>>>> If the hbox is present, the image is deformed (stretching) and >>>>>>>>>>> the lower part of the image is positioned under the hbox. >>>>>>>>>>> Am I wrong? >>>>>>>>>>> I attach a project and two explanatory images (with magnifying >>>>>>>>>>> glass). >>>>>>>>>>> >>>>>>>>>>> Regards >>>>>>>>>>> Gianluigi >>>>>>>>>>> >>>>>>>>>> >>>>>>>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >>>>>>>>> ]---- >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> Fabien Bodard >>>>>>>> >>>>>>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >>>>>>>> ]---- >>>>>>>> >>>>>>> >>>>>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >>>>>>> ]---- >>>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Fabien Bodard >>>>>> >>>>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >>>>>> ]---- >>>>>> >>>>> >>>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >>>>> ]---- >>>>> >>>> >>>> >>>> -- >>>> Fabien Bodard >>>> >>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >>>> ]---- >>>> >>> >>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- >>> >> >> >> -- >> Fabien Bodard >> > > > -- > Fabien Bodard > -- Fabien Bodard -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: rotapic-0.0.1.tar.gz Type: application/gzip Size: 152960 bytes Desc: not available URL: From gambas.fr at gmail.com Tue Dec 4 23:03:44 2018 From: gambas.fr at gmail.com (Fabien Bodard) Date: Tue, 4 Dec 2018 23:03:44 +0100 Subject: [Gambas-user] PictureBox and Containers strange behaviour In-Reply-To: References: Message-ID: ouch not Draw.Image ... but Paint.DrawImage... Draw is Obsolete Le mar. 4 d?c. 2018 ? 22:59, Fabien Bodard a ?crit : > This is a new version ... i have forget to reinit the initial position > when the first image reach the view top. > > > > Le mar. 4 d?c. 2018 ? 22:38, Fabien Bodard a ?crit : > >> Sorry for the late :-) >> >> I think this is what you are looking for :-)... and there is not picture >> box any more. >> >> Le sam. 1 d?c. 2018 ? 22:19, Fabien Bodard a >> ?crit : >> >>> no >>> I will try to show you an example tomorow >>> >>> Le sam. 1 d?c. 2018 ? 19:43, Gianluigi a ?crit : >>> >>>> do you mean: Using two pictureboxes, moving and loading them to make a >>>> smooth movement appear? >>>> Ok, I'll try but not today >>>> >>>> Regards >>>> >>>> Il giorno sab 1 dic 2018 alle ore 18:57 Fabien Bodard < >>>> gambas.fr at gmail.com> ha scritto: >>>> >>>>> you must not load images in one image... in fact you must load each >>>>> image in a image variable. >>>>> >>>>> then you manage the layout during the drawing event. >>>>> >>>>> a timer trigger call the drawing area event when needed ... during >>>>> the move. >>>>> >>>>> >>>>> >>>>> Le sam. 1 d?c. 2018 ? 18:28, Gianluigi a ?crit : >>>>> >>>>>> Hi Fabien, >>>>>> the idea of loading images into one image was silly and I should have >>>>>> understood it right away. >>>>>> Too heavy. >>>>>> Aborted project. >>>>>> >>>>>> Regards >>>>>> Gianluigi >>>>>> >>>>>> Il giorno sab 1 dic 2018 alle ore 15:21 Fabien Bodard < >>>>>> gambas.fr at gmail.com> ha scritto: >>>>>> >>>>>>> Ok I seen the idea ... >>>>>>> >>>>>>> For the movement you can take a look in the FAbout of the ide code >>>>>>> >>>>>>> Le sam. 1 d?c. 2018 ? 14:05, Gianluigi a >>>>>>> ?crit : >>>>>>> >>>>>>>> Hi Fabien, >>>>>>>> very interesting, excellent result and little work :-D >>>>>>>> >>>>>>>> My problem is to adapt a sequence of images of different format and >>>>>>>> type in a single film-like image (to be clear). >>>>>>>> I thought about doing so, this is just the first part of the code >>>>>>>> (now I use the mouse wheel just to try), I do not think I can adapt your >>>>>>>> code here. >>>>>>>> >>>>>>>> The idea (idiot) came to me from a question on our forum and so I >>>>>>>> would like to build an image viewer that shows a random image like a slot >>>>>>>> machine, now I start to study how to give it the movement (I do not know if >>>>>>>> two images series are enough). >>>>>>>> You can lose a lot of money by betting us over ;-D >>>>>>>> >>>>>>>> Regards >>>>>>>> Gianluigi >>>>>>>> >>>>>>>> Il giorno sab 1 dic 2018 alle ore 08:44 Fabien Bodard < >>>>>>>> gambas.fr at gmail.com> ha scritto: >>>>>>>> >>>>>>>>> Hi dear friend >>>>>>>>> >>>>>>>>> This is the same with less work ;-) >>>>>>>>> >>>>>>>>> Regards >>>>>>>>> >>>>>>>>> Fabien Bodard >>>>>>>>> >>>>>>>>> Le ven. 30 nov. 2018 ? 16:30, Gianluigi a >>>>>>>>> ?crit : >>>>>>>>> >>>>>>>>>> Finally it works >>>>>>>>>> See attached file >>>>>>>>>> >>>>>>>>>> Reagards >>>>>>>>>> Gianluigi >>>>>>>>>> >>>>>>>>>> Il giorno ven 30 nov 2018 alle ore 15:39 Gianluigi < >>>>>>>>>> bagonergi at gmail.com> ha scritto: >>>>>>>>>> >>>>>>>>>>> This is the correct code (?): >>>>>>>>>>> >>>>>>>>>>> [code]Private Sub Scale(img As Image) >>>>>>>>>>> >>>>>>>>>>> Dim w, h As Integer >>>>>>>>>>> >>>>>>>>>>> w = img.W >>>>>>>>>>> h = img.H >>>>>>>>>>> If h > w Then >>>>>>>>>>> $H = PictureBox1.H >>>>>>>>>>> $W = (PictureBox1.H * w) \ h >>>>>>>>>>> If $W > PictureBox1.W Then >>>>>>>>>>> $W = PictureBox1.W >>>>>>>>>>> $H = (PictureBox1.W * $H) \ $W >>>>>>>>>>> $X = PictureBox1.X >>>>>>>>>>> $Y = PictureBox1.Y + ((PictureBox1.H - $H) \ 2) >>>>>>>>>>> Return >>>>>>>>>>> Endif >>>>>>>>>>> $Y = PictureBox1.Y >>>>>>>>>>> $X = PictureBox1.X + ((PictureBox1.W - $W) \ 2) >>>>>>>>>>> Else >>>>>>>>>>> $W = PictureBox1.W >>>>>>>>>>> $H = (PictureBox1.W * h) \ w >>>>>>>>>>> If $H > PictureBox1.H Then >>>>>>>>>>> $H = PictureBox1.H >>>>>>>>>>> $W = (PictureBox1.H * $W) \ $H >>>>>>>>>>> $Y = PictureBox1.Y >>>>>>>>>>> $X = PictureBox1.X + ((PictureBox1.W - $W) \ 2) >>>>>>>>>>> Return >>>>>>>>>>> Endif >>>>>>>>>>> $X = PictureBox1.X >>>>>>>>>>> $Y = PictureBox1.Y + ((PictureBox1.H - $H) \ 2) >>>>>>>>>>> Endif >>>>>>>>>>> >>>>>>>>>>> End [/code] >>>>>>>>>>> >>>>>>>>>>> Although I would love to be able to create a code capable of >>>>>>>>>>> scaling images on the Form_Resize event >>>>>>>>>>> A task too burdensome for my tired brain. >>>>>>>>>>> >>>>>>>>>>> Regards >>>>>>>>>>> Gianluigi >>>>>>>>>>> >>>>>>>>>>> Il giorno ven 30 nov 2018 alle ore 13:10 Gianluigi < >>>>>>>>>>> bagonergi at gmail.com> ha scritto: >>>>>>>>>>> >>>>>>>>>>>> I need to paint an image in a new image and then show it in a >>>>>>>>>>>> picturebox. >>>>>>>>>>>> The thing seems to work correctly only if the picturebox is the >>>>>>>>>>>> only component on the window. >>>>>>>>>>>> If the hbox is present, the image is deformed (stretching) and >>>>>>>>>>>> the lower part of the image is positioned under the hbox. >>>>>>>>>>>> Am I wrong? >>>>>>>>>>>> I attach a project and two explanatory images (with magnifying >>>>>>>>>>>> glass). >>>>>>>>>>>> >>>>>>>>>>>> Regards >>>>>>>>>>>> Gianluigi >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> ----[ Gambas mailing-list is hosted by >>>>>>>>>> https://www.hostsharing.net ]---- >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> Fabien Bodard >>>>>>>>> >>>>>>>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >>>>>>>>> ]---- >>>>>>>>> >>>>>>>> >>>>>>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >>>>>>>> ]---- >>>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Fabien Bodard >>>>>>> >>>>>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >>>>>>> ]---- >>>>>>> >>>>>> >>>>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >>>>>> ]---- >>>>>> >>>>> >>>>> >>>>> -- >>>>> Fabien Bodard >>>>> >>>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >>>>> ]---- >>>>> >>>> >>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >>>> ]---- >>>> >>> >>> >>> -- >>> Fabien Bodard >>> >> >> >> -- >> Fabien Bodard >> > > > -- > Fabien Bodard > -- Fabien Bodard -------------- next part -------------- An HTML attachment was scrubbed... URL: From gambas.fr at gmail.com Wed Dec 5 10:49:06 2018 From: gambas.fr at gmail.com (Fabien Bodard) Date: Wed, 5 Dec 2018 10:49:06 +0100 Subject: [Gambas-user] Gambas files Message-ID: Hi, Benoit Is it normal to have the ability to add or remove files during the execution ? (Classes, forms , etc...) ? -- Fabien Bodard -------------- next part -------------- An HTML attachment was scrubbed... URL: From bagonergi at gmail.com Wed Dec 5 11:07:03 2018 From: bagonergi at gmail.com (Gianluigi) Date: Wed, 5 Dec 2018 11:07:03 +0100 Subject: [Gambas-user] PictureBox and Containers strange behaviour In-Reply-To: References: Message-ID: Hi Fabien, excellent :-D That's exactly what I was looking for. Thank you very much. (Google had inserted your email into spam, Google is really smart GRRR!) Regards Gianluigi Il giorno mar 4 dic 2018 alle ore 23:08 Fabien Bodard ha scritto: > ouch not Draw.Image ... but Paint.DrawImage... Draw is Obsolete > > Le mar. 4 d?c. 2018 ? 22:59, Fabien Bodard a ?crit : > >> This is a new version ... i have forget to reinit the initial position >> when the first image reach the view top. >> >> >> >> Le mar. 4 d?c. 2018 ? 22:38, Fabien Bodard a >> ?crit : >> >>> Sorry for the late :-) >>> >>> I think this is what you are looking for :-)... and there is not picture >>> box any more. >>> >>> Le sam. 1 d?c. 2018 ? 22:19, Fabien Bodard a >>> ?crit : >>> >>>> no >>>> I will try to show you an example tomorow >>>> >>>> Le sam. 1 d?c. 2018 ? 19:43, Gianluigi a ?crit : >>>> >>>>> do you mean: Using two pictureboxes, moving and loading them to make a >>>>> smooth movement appear? >>>>> Ok, I'll try but not today >>>>> >>>>> Regards >>>>> >>>>> Il giorno sab 1 dic 2018 alle ore 18:57 Fabien Bodard < >>>>> gambas.fr at gmail.com> ha scritto: >>>>> >>>>>> you must not load images in one image... in fact you must load each >>>>>> image in a image variable. >>>>>> >>>>>> then you manage the layout during the drawing event. >>>>>> >>>>>> a timer trigger call the drawing area event when needed ... during >>>>>> the move. >>>>>> >>>>>> >>>>>> >>>>>> Le sam. 1 d?c. 2018 ? 18:28, Gianluigi a >>>>>> ?crit : >>>>>> >>>>>>> Hi Fabien, >>>>>>> the idea of loading images into one image was silly and I should >>>>>>> have understood it right away. >>>>>>> Too heavy. >>>>>>> Aborted project. >>>>>>> >>>>>>> Regards >>>>>>> Gianluigi >>>>>>> >>>>>>> Il giorno sab 1 dic 2018 alle ore 15:21 Fabien Bodard < >>>>>>> gambas.fr at gmail.com> ha scritto: >>>>>>> >>>>>>>> Ok I seen the idea ... >>>>>>>> >>>>>>>> For the movement you can take a look in the FAbout of the ide code >>>>>>>> >>>>>>>> Le sam. 1 d?c. 2018 ? 14:05, Gianluigi a >>>>>>>> ?crit : >>>>>>>> >>>>>>>>> Hi Fabien, >>>>>>>>> very interesting, excellent result and little work :-D >>>>>>>>> >>>>>>>>> My problem is to adapt a sequence of images of different format >>>>>>>>> and type in a single film-like image (to be clear). >>>>>>>>> I thought about doing so, this is just the first part of the code >>>>>>>>> (now I use the mouse wheel just to try), I do not think I can adapt your >>>>>>>>> code here. >>>>>>>>> >>>>>>>>> The idea (idiot) came to me from a question on our forum and so I >>>>>>>>> would like to build an image viewer that shows a random image like a slot >>>>>>>>> machine, now I start to study how to give it the movement (I do not know if >>>>>>>>> two images series are enough). >>>>>>>>> You can lose a lot of money by betting us over ;-D >>>>>>>>> >>>>>>>>> Regards >>>>>>>>> Gianluigi >>>>>>>>> >>>>>>>>> Il giorno sab 1 dic 2018 alle ore 08:44 Fabien Bodard < >>>>>>>>> gambas.fr at gmail.com> ha scritto: >>>>>>>>> >>>>>>>>>> Hi dear friend >>>>>>>>>> >>>>>>>>>> This is the same with less work ;-) >>>>>>>>>> >>>>>>>>>> Regards >>>>>>>>>> >>>>>>>>>> Fabien Bodard >>>>>>>>>> >>>>>>>>>> Le ven. 30 nov. 2018 ? 16:30, Gianluigi a >>>>>>>>>> ?crit : >>>>>>>>>> >>>>>>>>>>> Finally it works >>>>>>>>>>> See attached file >>>>>>>>>>> >>>>>>>>>>> Reagards >>>>>>>>>>> Gianluigi >>>>>>>>>>> >>>>>>>>>>> Il giorno ven 30 nov 2018 alle ore 15:39 Gianluigi < >>>>>>>>>>> bagonergi at gmail.com> ha scritto: >>>>>>>>>>> >>>>>>>>>>>> This is the correct code (?): >>>>>>>>>>>> >>>>>>>>>>>> [code]Private Sub Scale(img As Image) >>>>>>>>>>>> >>>>>>>>>>>> Dim w, h As Integer >>>>>>>>>>>> >>>>>>>>>>>> w = img.W >>>>>>>>>>>> h = img.H >>>>>>>>>>>> If h > w Then >>>>>>>>>>>> $H = PictureBox1.H >>>>>>>>>>>> $W = (PictureBox1.H * w) \ h >>>>>>>>>>>> If $W > PictureBox1.W Then >>>>>>>>>>>> $W = PictureBox1.W >>>>>>>>>>>> $H = (PictureBox1.W * $H) \ $W >>>>>>>>>>>> $X = PictureBox1.X >>>>>>>>>>>> $Y = PictureBox1.Y + ((PictureBox1.H - $H) \ 2) >>>>>>>>>>>> Return >>>>>>>>>>>> Endif >>>>>>>>>>>> $Y = PictureBox1.Y >>>>>>>>>>>> $X = PictureBox1.X + ((PictureBox1.W - $W) \ 2) >>>>>>>>>>>> Else >>>>>>>>>>>> $W = PictureBox1.W >>>>>>>>>>>> $H = (PictureBox1.W * h) \ w >>>>>>>>>>>> If $H > PictureBox1.H Then >>>>>>>>>>>> $H = PictureBox1.H >>>>>>>>>>>> $W = (PictureBox1.H * $W) \ $H >>>>>>>>>>>> $Y = PictureBox1.Y >>>>>>>>>>>> $X = PictureBox1.X + ((PictureBox1.W - $W) \ 2) >>>>>>>>>>>> Return >>>>>>>>>>>> Endif >>>>>>>>>>>> $X = PictureBox1.X >>>>>>>>>>>> $Y = PictureBox1.Y + ((PictureBox1.H - $H) \ 2) >>>>>>>>>>>> Endif >>>>>>>>>>>> >>>>>>>>>>>> End [/code] >>>>>>>>>>>> >>>>>>>>>>>> Although I would love to be able to create a code capable of >>>>>>>>>>>> scaling images on the Form_Resize event >>>>>>>>>>>> A task too burdensome for my tired brain. >>>>>>>>>>>> >>>>>>>>>>>> Regards >>>>>>>>>>>> Gianluigi >>>>>>>>>>>> >>>>>>>>>>>> Il giorno ven 30 nov 2018 alle ore 13:10 Gianluigi < >>>>>>>>>>>> bagonergi at gmail.com> ha scritto: >>>>>>>>>>>> >>>>>>>>>>>>> I need to paint an image in a new image and then show it in a >>>>>>>>>>>>> picturebox. >>>>>>>>>>>>> The thing seems to work correctly only if the picturebox is >>>>>>>>>>>>> the only component on the window. >>>>>>>>>>>>> If the hbox is present, the image is deformed (stretching) and >>>>>>>>>>>>> the lower part of the image is positioned under the hbox. >>>>>>>>>>>>> Am I wrong? >>>>>>>>>>>>> I attach a project and two explanatory images (with magnifying >>>>>>>>>>>>> glass). >>>>>>>>>>>>> >>>>>>>>>>>>> Regards >>>>>>>>>>>>> Gianluigi >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> ----[ Gambas mailing-list is hosted by >>>>>>>>>>> https://www.hostsharing.net ]---- >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> Fabien Bodard >>>>>>>>>> >>>>>>>>>> ----[ Gambas mailing-list is hosted by >>>>>>>>>> https://www.hostsharing.net ]---- >>>>>>>>>> >>>>>>>>> >>>>>>>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >>>>>>>>> ]---- >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> Fabien Bodard >>>>>>>> >>>>>>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >>>>>>>> ]---- >>>>>>>> >>>>>>> >>>>>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >>>>>>> ]---- >>>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Fabien Bodard >>>>>> >>>>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >>>>>> ]---- >>>>>> >>>>> >>>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >>>>> ]---- >>>>> >>>> >>>> >>>> -- >>>> Fabien Bodard >>>> >>> >>> >>> -- >>> Fabien Bodard >>> >> >> >> -- >> Fabien Bodard >> > > > -- > Fabien Bodard > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rwe-sse at osnanet.de Thu Dec 6 12:22:17 2018 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Thu, 6 Dec 2018 12:22:17 +0100 Subject: [Gambas-user] Date(Now) with time component under Ubuntu? In-Reply-To: <83319104-2302-418d-bb99-c49b2b906e9e@gmail.com> References: <83319104-2302-418d-bb99-c49b2b906e9e@gmail.com> Message-ID: <3f5a861c-98d4-f803-290d-828137d28a1c@osnanet.de> Hi Benoit, This is contradictional: > Date(Now) -> Return the date part, in the current localization (i.e. the > current timezone). It means that the time part is set to 00:00:00, but > in the current timezone. The help says: Date Result = Date ( [ Expression ] ) Return the date part of a date & time expression. If the expression is omitted, then the today date is returned. The current localization is used, i.e. the date part in the current timezone is returned. Example Print Now; " -> "; Date(Now) 05/16/2002 15:10:59 -> 05/16/2002 But what I get back is something like 05/16/2002 00:00:00 This should either not be the case, or be corrected in the help. The Day, Month, Year components are delivered correctly of course, as they are only integers. Everything else works like you described, i. e. I have to look for unclear string conversions etc. Regards Rolf From adamnt42 at gmail.com Thu Dec 6 12:51:36 2018 From: adamnt42 at gmail.com (Bruce) Date: Thu, 6 Dec 2018 22:21:36 +1030 Subject: [Gambas-user] Date(Now) with time component under Ubuntu? In-Reply-To: <3f5a861c-98d4-f803-290d-828137d28a1c@osnanet.de> References: <83319104-2302-418d-bb99-c49b2b906e9e@gmail.com> <3f5a861c-98d4-f803-290d-828137d28a1c@osnanet.de> Message-ID: <7b0a31b4-560b-aa87-63d4-5c626c33adfd@gmail.com> Rolf, This is really good. When is Now()? Is it the UTC now, or the local now? Forget the Date() bit. b On 6/12/18 9:52 pm, Rolf-Werner Eilert wrote: > Hi Benoit, > > This is contradictional: > >> Date(Now) -> Return the date part, in the current localization (i.e. >> the current timezone). It means that the time part is set to 00:00:00, >> but in the current timezone. > > The help says: > > Date > > Result = Date ( [ Expression ] ) > > Return the date part of a date & time expression. If the expression is > omitted, then the today date is returned. > > The current localization is used, i.e. the date part in the current > timezone is returned. > > Example > > Print Now; " -> "; Date(Now) > > 05/16/2002 15:10:59 -> 05/16/2002 > > > But what I get back is something like > > 05/16/2002 00:00:00 > > This should either not be the case, or be corrected in the help. The > Day, Month, Year components are delivered correctly of course, as they > are only integers. > > Everything else works like you described, i. e. I have to look for > unclear string conversions etc. > > > > Regards > Rolf > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- From rwe-sse at osnanet.de Thu Dec 6 13:03:52 2018 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Thu, 6 Dec 2018 13:03:52 +0100 Subject: [Gambas-user] Date(Now) with time component under Ubuntu? In-Reply-To: <7b0a31b4-560b-aa87-63d4-5c626c33adfd@gmail.com> References: <83319104-2302-418d-bb99-c49b2b906e9e@gmail.com> <3f5a861c-98d4-f803-290d-828137d28a1c@osnanet.de> <7b0a31b4-560b-aa87-63d4-5c626c33adfd@gmail.com> Message-ID: Yes Bruce, I didn't realize before I ran into this, but as far as I understand now CStr(Now) should be local date + time Str(Now) should be UTC But when you convert implicitly, i. e. without using CStr, you can get yesterday's date. At least I had this strange thing with myStringVar = Date(Now) would deliver 5th December today + time component in UTC. I don't understand why, but I can work around it, as I have to re-write all date operations in that program anyway. Regards Rolf Am 06.12.18 um 12:51 schrieb Bruce: > Rolf, > This is really good. > When is Now()? Is it the UTC now, or the local now? > Forget the Date() bit. > b > > On 6/12/18 9:52 pm, Rolf-Werner Eilert wrote: >> Hi Benoit, >> >> This is contradictional: >> >>> Date(Now) -> Return the date part, in the current localization (i.e. >>> the current timezone). It means that the time part is set to >>> 00:00:00, but in the current timezone. >> >> The help says: >> >> Date >> >> Result = Date ( [ Expression ] ) >> >> Return the date part of a date & time expression. If the expression is >> omitted, then the today date is returned. >> >> The current localization is used, i.e. the date part in the current >> timezone is returned. >> >> Example >> >> Print Now; " -> "; Date(Now) >> >> 05/16/2002 15:10:59 -> 05/16/2002 >> >> >> But what I get back is something like >> >> 05/16/2002 00:00:00 >> >> This should either not be the case, or be corrected in the help. The >> Day, Month, Year components are delivered correctly of course, as they >> are only integers. >> >> Everything else works like you described, i. e. I have to look for >> unclear string conversions etc. >> >> >> >> Regards >> Rolf >> >> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > > From g4mba5 at gmail.com Thu Dec 6 14:22:36 2018 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Thu, 6 Dec 2018 14:22:36 +0100 Subject: [Gambas-user] Date(Now) with time component under Ubuntu? In-Reply-To: References: <83319104-2302-418d-bb99-c49b2b906e9e@gmail.com> <3f5a861c-98d4-f803-290d-828137d28a1c@osnanet.de> <7b0a31b4-560b-aa87-63d4-5c626c33adfd@gmail.com> Message-ID: <46099006-ecb2-7118-7c41-cb7af56aaea7@gmail.com> Le 06/12/2018 ? 13:03, Rolf-Werner Eilert a ?crit?: > Yes Bruce, > > I didn't realize before I ran into this, but as far as I understand now > > CStr(Now) should be local date + time > Str(Now)? should be UTC > No, it's the contrary! -- Beno?t Minisini From bagonergi at gmail.com Thu Dec 6 18:18:23 2018 From: bagonergi at gmail.com (Gianluigi) Date: Thu, 6 Dec 2018 18:18:23 +0100 Subject: [Gambas-user] Unknow control: Spring Message-ID: Someone can explain why sometimes, those who use Debian, report that they can not open project windows due to "Unknow control: Spring" Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From rwe-sse at osnanet.de Thu Dec 6 18:19:36 2018 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Thu, 6 Dec 2018 18:19:36 +0100 Subject: [Gambas-user] Date(Now) with time component under Ubuntu? In-Reply-To: <46099006-ecb2-7118-7c41-cb7af56aaea7@gmail.com> References: <83319104-2302-418d-bb99-c49b2b906e9e@gmail.com> <3f5a861c-98d4-f803-290d-828137d28a1c@osnanet.de> <7b0a31b4-560b-aa87-63d4-5c626c33adfd@gmail.com> <46099006-ecb2-7118-7c41-cb7af56aaea7@gmail.com> Message-ID: <25347302-42af-606a-bc43-ff40b650f0a4@osnanet.de> Am 06.12.18 um 14:22 schrieb Beno?t Minisini: > Le 06/12/2018 ? 13:03, Rolf-Werner Eilert a ?crit?: >> Yes Bruce, >> >> I didn't realize before I ran into this, but as far as I understand now >> >> CStr(Now) should be local date + time >> Str(Now)? should be UTC >> > > No, it's the contrary! > Ah yes, sorry, I see... :) In both cases you get today's date (now 6th December), but if you convert Date(Now) to a string, this is what you get: CStr(Date(Now)) becomes yesterday's date + zero time -1 hour "12/05/2018 23:00:00" Str(Date(Now)) becomes today's date + zero time "06.12.2018 00:00:00" Strange, isn't it? Regards Rolf From bagonergi at gmail.com Thu Dec 6 18:59:06 2018 From: bagonergi at gmail.com (Gianluigi) Date: Thu, 6 Dec 2018 18:59:06 +0100 Subject: [Gambas-user] Date(Now) with time component under Ubuntu? In-Reply-To: <25347302-42af-606a-bc43-ff40b650f0a4@osnanet.de> References: <83319104-2302-418d-bb99-c49b2b906e9e@gmail.com> <3f5a861c-98d4-f803-290d-828137d28a1c@osnanet.de> <7b0a31b4-560b-aa87-63d4-5c626c33adfd@gmail.com> <46099006-ecb2-7118-7c41-cb7af56aaea7@gmail.com> <25347302-42af-606a-bc43-ff40b650f0a4@osnanet.de> Message-ID: You nust not have to mix the functions that locate (Date, Str, Val) with those that do not locate (CDate, CString). "Date" takes away the time part. Regards Gianluigi Il giorno gio 6 dic 2018 alle ore 18:21 Rolf-Werner Eilert < rwe-sse at osnanet.de> ha scritto: > Am 06.12.18 um 14:22 schrieb Beno?t Minisini: > > Le 06/12/2018 ? 13:03, Rolf-Werner Eilert a ?crit : > >> Yes Bruce, > >> > >> I didn't realize before I ran into this, but as far as I understand now > >> > >> CStr(Now) should be local date + time > >> Str(Now) should be UTC > >> > > > > No, it's the contrary! > > > > Ah yes, sorry, I see... :) > > In both cases you get today's date (now 6th December), but if you > convert Date(Now) to a string, this is what you get: > > > CStr(Date(Now)) becomes yesterday's date + zero time -1 hour "12/05/2018 > 23:00:00" > Str(Date(Now)) becomes today's date + zero time "06.12.2018 00:00:00" > > Strange, isn't it? > > Regards > Rolf > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bagonergi at gmail.com Thu Dec 6 22:17:43 2018 From: bagonergi at gmail.com (Gianluigi) Date: Thu, 6 Dec 2018 22:17:43 +0100 Subject: [Gambas-user] Unknow control: Spring In-Reply-To: References: Message-ID: I understand the current version of the repositories is 3.9.1 and spring is the self-expanding panel created later. Regards Il giorno gio 6 dic 2018 alle ore 18:18 Gianluigi ha scritto: > Someone can explain why sometimes, those who use Debian, report that they > can not open project windows due to "Unknow control: Spring" > > Regards > Gianluigi > -------------- next part -------------- An HTML attachment was scrubbed... URL: From g4mba5 at gmail.com Thu Dec 6 22:48:38 2018 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Thu, 6 Dec 2018 22:48:38 +0100 Subject: [Gambas-user] Date(Now) with time component under Ubuntu? In-Reply-To: References: <83319104-2302-418d-bb99-c49b2b906e9e@gmail.com> <3f5a861c-98d4-f803-290d-828137d28a1c@osnanet.de> <7b0a31b4-560b-aa87-63d4-5c626c33adfd@gmail.com> <46099006-ecb2-7118-7c41-cb7af56aaea7@gmail.com> <25347302-42af-606a-bc43-ff40b650f0a4@osnanet.de> Message-ID: Le 06/12/2018 ? 18:59, Gianluigi a ?crit?: > You nust not have to mix the functions that locate (Date, Str, Val) with > those that do not locate (CDate, CString). > "Date" takes away the time part. > Or, if it's clearer for you Rolf, Date() moves the date to midnight in your timezone. -- Beno?t Minisini From bagonergi at gmail.com Fri Dec 7 14:41:32 2018 From: bagonergi at gmail.com (Gianluigi) Date: Fri, 7 Dec 2018 14:41:32 +0100 Subject: [Gambas-user] The fleas deaf Message-ID: The Label with AutoResize = True that does not align, reminded me of the story of the scientist who having removed all the legs from a flea trained to jump on command, since the flea did not jump anymore, he deduced that: "The fleas without legs becomes deaf". Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From bagonergi at gmail.com Sat Dec 8 14:31:04 2018 From: bagonergi at gmail.com (Gianluigi) Date: Sat, 8 Dec 2018 14:31:04 +0100 Subject: [Gambas-user] Warning: Failed to access gitlab, error 503 Message-ID: Warning: Failed to access gitlab, error 503 Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From bagonergi at gmail.com Sat Dec 8 14:49:44 2018 From: bagonergi at gmail.com (Gianluigi) Date: Sat, 8 Dec 2018 14:49:44 +0100 Subject: [Gambas-user] Warning: Failed to access gitlab, error 503 In-Reply-To: References: Message-ID: GitLab is back operating :-) Regards Gianluigi Il giorno sab 8 dic 2018 alle ore 14:31 Gianluigi ha scritto: > Warning: Failed to access gitlab, error 503 > > Regards > Gianluigi > -------------- next part -------------- An HTML attachment was scrubbed... URL: From g4mba5 at gmail.com Sat Dec 8 14:52:34 2018 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Sat, 8 Dec 2018 14:52:34 +0100 Subject: [Gambas-user] Warning: Failed to access gitlab, error 503 In-Reply-To: References: Message-ID: <9572611c-45a6-7eba-4085-52994122b788@gmail.com> Le 08/12/2018 ? 14:49, Gianluigi a ?crit?: > GitLab is back operating :-) > > Regards > Gianluigi > > Il giorno sab 8 dic 2018 alle ore 14:31 Gianluigi > ha scritto: > > Warning: Failed to access gitlab, error 503 > > Regards > Gianluigi > It's the yellow vests! -- Beno?t Minisini From bagonergi at gmail.com Sat Dec 8 14:58:15 2018 From: bagonergi at gmail.com (Gianluigi) Date: Sat, 8 Dec 2018 14:58:15 +0100 Subject: [Gambas-user] Warning: Failed to access gitlab, error 503 In-Reply-To: <9572611c-45a6-7eba-4085-52994122b788@gmail.com> References: <9572611c-45a6-7eba-4085-52994122b788@gmail.com> Message-ID: Il giorno sab 8 dic 2018 alle ore 14:53 Beno?t Minisini ha scritto: > Le 08/12/2018 ? 14:49, Gianluigi a ?crit : > > GitLab is back operating :-) > > > > Regards > > Gianluigi > > > > Il giorno sab 8 dic 2018 alle ore 14:31 Gianluigi > > ha scritto: > > > > Warning: Failed to access gitlab, error 503 > > > > Regards > > Gianluigi > > > > It's the yellow vests! > > -- > Beno?t Minisini > > ? ? ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From buster6seven at gmail.com Sun Dec 9 00:07:03 2018 From: buster6seven at gmail.com (Shane) Date: Sun, 9 Dec 2018 10:07:03 +1100 Subject: [Gambas-user] SDL ui Message-ID: <0bbd2c2e-0aa6-1b36-3476-3cac95da8d03@gmail.com> has any one got a example of a sdl ui for gambas just need very simple text edit box etc cheers Shane From bagonergi at gmail.com Sun Dec 9 18:24:02 2018 From: bagonergi at gmail.com (Gianluigi) Date: Sun, 9 Dec 2018 18:24:02 +0100 Subject: [Gambas-user] PictureBox and Containers strange behaviour In-Reply-To: References: Message-ID: Hi Fabien, I attach the RandomRotaPic little project based on your algorithm. What do you think about it? Regards Gianluigi Il giorno mer 5 dic 2018 alle ore 11:07 Gianluigi ha scritto: > Hi Fabien, > excellent :-D > That's exactly what I was looking for. > Thank you very much. > (Google had inserted your email into spam, Google is really smart GRRR!) > > Regards > Gianluigi > > Il giorno mar 4 dic 2018 alle ore 23:08 Fabien Bodard > ha scritto: > >> ouch not Draw.Image ... but Paint.DrawImage... Draw is Obsolete >> >> Le mar. 4 d?c. 2018 ? 22:59, Fabien Bodard a >> ?crit : >> >>> This is a new version ... i have forget to reinit the initial position >>> when the first image reach the view top. >>> >>> >>> >>> Le mar. 4 d?c. 2018 ? 22:38, Fabien Bodard a >>> ?crit : >>> >>>> Sorry for the late :-) >>>> >>>> I think this is what you are looking for :-)... and there is not >>>> picture box any more. >>>> >>>> Le sam. 1 d?c. 2018 ? 22:19, Fabien Bodard a >>>> ?crit : >>>> >>>>> no >>>>> I will try to show you an example tomorow >>>>> >>>>> Le sam. 1 d?c. 2018 ? 19:43, Gianluigi a ?crit : >>>>> >>>>>> do you mean: Using two pictureboxes, moving and loading them to make >>>>>> a smooth movement appear? >>>>>> Ok, I'll try but not today >>>>>> >>>>>> Regards >>>>>> >>>>>> Il giorno sab 1 dic 2018 alle ore 18:57 Fabien Bodard < >>>>>> gambas.fr at gmail.com> ha scritto: >>>>>> >>>>>>> you must not load images in one image... in fact you must load each >>>>>>> image in a image variable. >>>>>>> >>>>>>> then you manage the layout during the drawing event. >>>>>>> >>>>>>> a timer trigger call the drawing area event when needed ... during >>>>>>> the move. >>>>>>> >>>>>>> >>>>>>> >>>>>>> Le sam. 1 d?c. 2018 ? 18:28, Gianluigi a >>>>>>> ?crit : >>>>>>> >>>>>>>> Hi Fabien, >>>>>>>> the idea of loading images into one image was silly and I should >>>>>>>> have understood it right away. >>>>>>>> Too heavy. >>>>>>>> Aborted project. >>>>>>>> >>>>>>>> Regards >>>>>>>> Gianluigi >>>>>>>> >>>>>>>> Il giorno sab 1 dic 2018 alle ore 15:21 Fabien Bodard < >>>>>>>> gambas.fr at gmail.com> ha scritto: >>>>>>>> >>>>>>>>> Ok I seen the idea ... >>>>>>>>> >>>>>>>>> For the movement you can take a look in the FAbout of the ide code >>>>>>>>> >>>>>>>>> Le sam. 1 d?c. 2018 ? 14:05, Gianluigi a >>>>>>>>> ?crit : >>>>>>>>> >>>>>>>>>> Hi Fabien, >>>>>>>>>> very interesting, excellent result and little work :-D >>>>>>>>>> >>>>>>>>>> My problem is to adapt a sequence of images of different format >>>>>>>>>> and type in a single film-like image (to be clear). >>>>>>>>>> I thought about doing so, this is just the first part of the code >>>>>>>>>> (now I use the mouse wheel just to try), I do not think I can adapt your >>>>>>>>>> code here. >>>>>>>>>> >>>>>>>>>> The idea (idiot) came to me from a question on our forum and so I >>>>>>>>>> would like to build an image viewer that shows a random image like a slot >>>>>>>>>> machine, now I start to study how to give it the movement (I do not know if >>>>>>>>>> two images series are enough). >>>>>>>>>> You can lose a lot of money by betting us over ;-D >>>>>>>>>> >>>>>>>>>> Regards >>>>>>>>>> Gianluigi >>>>>>>>>> >>>>>>>>>> Il giorno sab 1 dic 2018 alle ore 08:44 Fabien Bodard < >>>>>>>>>> gambas.fr at gmail.com> ha scritto: >>>>>>>>>> >>>>>>>>>>> Hi dear friend >>>>>>>>>>> >>>>>>>>>>> This is the same with less work ;-) >>>>>>>>>>> >>>>>>>>>>> Regards >>>>>>>>>>> >>>>>>>>>>> Fabien Bodard >>>>>>>>>>> >>>>>>>>>>> Le ven. 30 nov. 2018 ? 16:30, Gianluigi a >>>>>>>>>>> ?crit : >>>>>>>>>>> >>>>>>>>>>>> Finally it works >>>>>>>>>>>> See attached file >>>>>>>>>>>> >>>>>>>>>>>> Reagards >>>>>>>>>>>> Gianluigi >>>>>>>>>>>> >>>>>>>>>>>> Il giorno ven 30 nov 2018 alle ore 15:39 Gianluigi < >>>>>>>>>>>> bagonergi at gmail.com> ha scritto: >>>>>>>>>>>> >>>>>>>>>>>>> This is the correct code (?): >>>>>>>>>>>>> >>>>>>>>>>>>> [code]Private Sub Scale(img As Image) >>>>>>>>>>>>> >>>>>>>>>>>>> Dim w, h As Integer >>>>>>>>>>>>> >>>>>>>>>>>>> w = img.W >>>>>>>>>>>>> h = img.H >>>>>>>>>>>>> If h > w Then >>>>>>>>>>>>> $H = PictureBox1.H >>>>>>>>>>>>> $W = (PictureBox1.H * w) \ h >>>>>>>>>>>>> If $W > PictureBox1.W Then >>>>>>>>>>>>> $W = PictureBox1.W >>>>>>>>>>>>> $H = (PictureBox1.W * $H) \ $W >>>>>>>>>>>>> $X = PictureBox1.X >>>>>>>>>>>>> $Y = PictureBox1.Y + ((PictureBox1.H - $H) \ 2) >>>>>>>>>>>>> Return >>>>>>>>>>>>> Endif >>>>>>>>>>>>> $Y = PictureBox1.Y >>>>>>>>>>>>> $X = PictureBox1.X + ((PictureBox1.W - $W) \ 2) >>>>>>>>>>>>> Else >>>>>>>>>>>>> $W = PictureBox1.W >>>>>>>>>>>>> $H = (PictureBox1.W * h) \ w >>>>>>>>>>>>> If $H > PictureBox1.H Then >>>>>>>>>>>>> $H = PictureBox1.H >>>>>>>>>>>>> $W = (PictureBox1.H * $W) \ $H >>>>>>>>>>>>> $Y = PictureBox1.Y >>>>>>>>>>>>> $X = PictureBox1.X + ((PictureBox1.W - $W) \ 2) >>>>>>>>>>>>> Return >>>>>>>>>>>>> Endif >>>>>>>>>>>>> $X = PictureBox1.X >>>>>>>>>>>>> $Y = PictureBox1.Y + ((PictureBox1.H - $H) \ 2) >>>>>>>>>>>>> Endif >>>>>>>>>>>>> >>>>>>>>>>>>> End [/code] >>>>>>>>>>>>> >>>>>>>>>>>>> Although I would love to be able to create a code capable of >>>>>>>>>>>>> scaling images on the Form_Resize event >>>>>>>>>>>>> A task too burdensome for my tired brain. >>>>>>>>>>>>> >>>>>>>>>>>>> Regards >>>>>>>>>>>>> Gianluigi >>>>>>>>>>>>> >>>>>>>>>>>>> Il giorno ven 30 nov 2018 alle ore 13:10 Gianluigi < >>>>>>>>>>>>> bagonergi at gmail.com> ha scritto: >>>>>>>>>>>>> >>>>>>>>>>>>>> I need to paint an image in a new image and then show it in a >>>>>>>>>>>>>> picturebox. >>>>>>>>>>>>>> The thing seems to work correctly only if the picturebox is >>>>>>>>>>>>>> the only component on the window. >>>>>>>>>>>>>> If the hbox is present, the image is deformed (stretching) >>>>>>>>>>>>>> and the lower part of the image is positioned under the hbox. >>>>>>>>>>>>>> Am I wrong? >>>>>>>>>>>>>> I attach a project and two explanatory images (with >>>>>>>>>>>>>> magnifying glass). >>>>>>>>>>>>>> >>>>>>>>>>>>>> Regards >>>>>>>>>>>>>> Gianluigi >>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>> ----[ Gambas mailing-list is hosted by >>>>>>>>>>>> https://www.hostsharing.net ]---- >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> -- >>>>>>>>>>> Fabien Bodard >>>>>>>>>>> >>>>>>>>>>> ----[ Gambas mailing-list is hosted by >>>>>>>>>>> https://www.hostsharing.net ]---- >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> ----[ Gambas mailing-list is hosted by >>>>>>>>>> https://www.hostsharing.net ]---- >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> Fabien Bodard >>>>>>>>> >>>>>>>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >>>>>>>>> ]---- >>>>>>>>> >>>>>>>> >>>>>>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >>>>>>>> ]---- >>>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Fabien Bodard >>>>>>> >>>>>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >>>>>>> ]---- >>>>>>> >>>>>> >>>>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >>>>>> ]---- >>>>>> >>>>> >>>>> >>>>> -- >>>>> Fabien Bodard >>>>> >>>> >>>> >>>> -- >>>> Fabien Bodard >>>> >>> >>> >>> -- >>> Fabien Bodard >>> >> >> >> -- >> Fabien Bodard >> >> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: RandomRotaPic-0.0.1.tar.gz Type: application/gzip Size: 13310 bytes Desc: not available URL: From gambas.fr at gmail.com Mon Dec 10 09:00:10 2018 From: gambas.fr at gmail.com (Fabien Bodard) Date: Mon, 10 Dec 2018 09:00:10 +0100 Subject: [Gambas-user] Warning: Failed to access gitlab, error 503 In-Reply-To: References: <9572611c-45a6-7eba-4085-52994122b788@gmail.com> Message-ID: Le sam. 8 d?c. 2018 ? 14:59, Gianluigi a ?crit : > > > Il giorno sab 8 dic 2018 alle ore 14:53 Beno?t Minisini > ha scritto: > >> Le 08/12/2018 ? 14:49, Gianluigi a ?crit : >> > GitLab is back operating :-) >> > >> > Regards >> > Gianluigi >> > >> > Il giorno sab 8 dic 2018 alle ore 14:31 Gianluigi > > > ha scritto: >> > >> > Warning: Failed to access gitlab, error 503 >> > >> > Regards >> > Gianluigi >> > >> >> It's the yellow vests! >> > Who know... > >> -- >> Beno?t Minisini >> >> > ? ? ? > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -- Fabien Bodard -------------- next part -------------- An HTML attachment was scrubbed... URL: From rwe-sse at osnanet.de Mon Dec 10 11:35:26 2018 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Mon, 10 Dec 2018 11:35:26 +0100 Subject: [Gambas-user] Date(Now) with time component under Ubuntu? In-Reply-To: References: <83319104-2302-418d-bb99-c49b2b906e9e@gmail.com> <3f5a861c-98d4-f803-290d-828137d28a1c@osnanet.de> <7b0a31b4-560b-aa87-63d4-5c626c33adfd@gmail.com> <46099006-ecb2-7118-7c41-cb7af56aaea7@gmail.com> <25347302-42af-606a-bc43-ff40b650f0a4@osnanet.de> Message-ID: <0a486f61-8148-82c9-4ea2-1b0c79fc71de@osnanet.de> Am 06.12.18 um 22:48 schrieb Beno?t Minisini: > Le 06/12/2018 ? 18:59, Gianluigi a ?crit?: >> You nust not have to mix the functions that locate (Date, Str, Val) >> with those that do not locate (CDate, CString). >> "Date" takes away the time part. >> > > Or, if it's clearer for you Rolf, Date() moves the date to midnight in > your timezone. > Yes, that means the time part remains in the string and is not cut away - as the help text suggests and as it used to be before. Though I would consider this to be logical: Day(Now) = only the calendar day (as integer) Year(Now) = only the year (as integer) Date(Now) = only the date part Time(Now) = only the time part But anyway, I've adapted my program to it, so there's no more problem right now. I'd only suggest someone adapts the help text to avoid confusion. Regards Rolf From bagonergi at gmail.com Mon Dec 10 12:22:22 2018 From: bagonergi at gmail.com (Gianluigi) Date: Mon, 10 Dec 2018 12:22:22 +0100 Subject: [Gambas-user] Date(Now) with time component under Ubuntu? In-Reply-To: <0a486f61-8148-82c9-4ea2-1b0c79fc71de@osnanet.de> References: <83319104-2302-418d-bb99-c49b2b906e9e@gmail.com> <3f5a861c-98d4-f803-290d-828137d28a1c@osnanet.de> <7b0a31b4-560b-aa87-63d4-5c626c33adfd@gmail.com> <46099006-ecb2-7118-7c41-cb7af56aaea7@gmail.com> <25347302-42af-606a-bc43-ff40b650f0a4@osnanet.de> <0a486f61-8148-82c9-4ea2-1b0c79fc71de@osnanet.de> Message-ID: Il giorno lun 10 dic 2018 alle ore 11:36 Rolf-Werner Eilert < rwe-sse at osnanet.de> ha scritto: > Am 06.12.18 um 22:48 schrieb Beno?t Minisini: > > Le 06/12/2018 ? 18:59, Gianluigi a ?crit : > >> You nust not have to mix the functions that locate (Date, Str, Val) > >> with those that do not locate (CDate, CString). > >> "Date" takes away the time part. > >> > > > > Or, if it's clearer for you Rolf, Date() moves the date to midnight in > > your timezone. > > > > Yes, that means the time part remains in the string and is not cut away > - as the help text suggests and as it used to be before. > > Though I would consider this to be logical: > > Day(Now) = only the calendar day (as integer) > Year(Now) = only the year (as integer) > Date(Now) = only the date part > Time(Now) = only the time part > > But anyway, I've adapted my program to it, so there's no more problem > right now. I'd only suggest someone adapts the help text to avoid > confusion. > > Regards > Rolf > With the dates it's easy to get confused, I think everyone happens, it happens to me often. It is important to remember that when we use Print, Debug but I also think of the Text property, Gambas creates a local conversion of type string (Str$) [0] Regards Gianluigi [0] http://gambaswiki.org/wiki/lang/debug -------------- next part -------------- An HTML attachment was scrubbed... URL: From jussi.lahtinen at gmail.com Mon Dec 10 15:21:12 2018 From: jussi.lahtinen at gmail.com (Jussi Lahtinen) Date: Mon, 10 Dec 2018 16:21:12 +0200 Subject: [Gambas-user] Date(Now) with time component under Ubuntu? In-Reply-To: References: <83319104-2302-418d-bb99-c49b2b906e9e@gmail.com> <3f5a861c-98d4-f803-290d-828137d28a1c@osnanet.de> <7b0a31b4-560b-aa87-63d4-5c626c33adfd@gmail.com> <46099006-ecb2-7118-7c41-cb7af56aaea7@gmail.com> <25347302-42af-606a-bc43-ff40b650f0a4@osnanet.de> <0a486f61-8148-82c9-4ea2-1b0c79fc71de@osnanet.de> Message-ID: I must confess I don't understand the date & time functions, no matter how many times Benoit says it's easy... No matter what I try the timezone cancer bites me two times every year. Jussi On Mon, Dec 10, 2018 at 1:23 PM Gianluigi wrote: > > > Il giorno lun 10 dic 2018 alle ore 11:36 Rolf-Werner Eilert < > rwe-sse at osnanet.de> ha scritto: > >> Am 06.12.18 um 22:48 schrieb Beno?t Minisini: >> > Le 06/12/2018 ? 18:59, Gianluigi a ?crit : >> >> You nust not have to mix the functions that locate (Date, Str, Val) >> >> with those that do not locate (CDate, CString). >> >> "Date" takes away the time part. >> >> >> > >> > Or, if it's clearer for you Rolf, Date() moves the date to midnight in >> > your timezone. >> > >> >> Yes, that means the time part remains in the string and is not cut away >> - as the help text suggests and as it used to be before. >> >> Though I would consider this to be logical: >> >> Day(Now) = only the calendar day (as integer) >> Year(Now) = only the year (as integer) >> Date(Now) = only the date part >> Time(Now) = only the time part >> >> But anyway, I've adapted my program to it, so there's no more problem >> right now. I'd only suggest someone adapts the help text to avoid >> confusion. >> >> Regards >> Rolf >> > > With the dates it's easy to get confused, I think everyone happens, it > happens to me often. > It is important to remember that when we use Print, Debug but I also think > of the Text property, Gambas creates a local conversion of type string > (Str$) [0] > > Regards > Gianluigi > > [0] http://gambaswiki.org/wiki/lang/debug > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gambas.fr at gmail.com Tue Dec 11 09:33:03 2018 From: gambas.fr at gmail.com (Fabien Bodard) Date: Tue, 11 Dec 2018 09:33:03 +0100 Subject: [Gambas-user] variable declaration everywhere ??? Message-ID: Allow local variable declaration anywhere in the function. The local symbol still has a function scope, but can be used after its declaration only. hum.... and now ? {Integer}MyVar = 1+1 ? :-P -- Fabien Bodard From rwe-sse at osnanet.de Tue Dec 11 16:45:47 2018 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Tue, 11 Dec 2018 16:45:47 +0100 Subject: [Gambas-user] Coloured Buttons Message-ID: <90641126-19ee-281f-e9e2-e558c1139b1f@osnanet.de> Is it possible that Gtk+ doesn't know coloured Buttons? I have a form that used to have a range of coloured buttons (simple Buttons with .Background set to a color at runtime). Under KDE they were coloured, but under Ubuntu Mate (Gtk+) they all appear with standard "Background" color. The buttons even cannot be coloured manually via the IDE. Or does it have to do with Mate? Any hint is appreciated. Regards Rolf From bagonergi at gmail.com Tue Dec 11 16:50:26 2018 From: bagonergi at gmail.com (Gianluigi) Date: Tue, 11 Dec 2018 16:50:26 +0100 Subject: [Gambas-user] PictureBox and Containers strange behaviour In-Reply-To: References: Message-ID: Hi Fabien, some small variation and google translations :-) Regards Gianluigi Il giorno dom 9 dic 2018 alle ore 18:24 Gianluigi ha scritto: > Hi Fabien, > I attach the RandomRotaPic little project based on your algorithm. > What do you think about it? > > Regards > Gianluigi > > Il giorno mer 5 dic 2018 alle ore 11:07 Gianluigi > ha scritto: > >> Hi Fabien, >> excellent :-D >> That's exactly what I was looking for. >> Thank you very much. >> (Google had inserted your email into spam, Google is really smart GRRR!) >> >> Regards >> Gianluigi >> >> Il giorno mar 4 dic 2018 alle ore 23:08 Fabien Bodard < >> gambas.fr at gmail.com> ha scritto: >> >>> ouch not Draw.Image ... but Paint.DrawImage... Draw is Obsolete >>> >>> Le mar. 4 d?c. 2018 ? 22:59, Fabien Bodard a >>> ?crit : >>> >>>> This is a new version ... i have forget to reinit the initial position >>>> when the first image reach the view top. >>>> >>>> >>>> >>>> Le mar. 4 d?c. 2018 ? 22:38, Fabien Bodard a >>>> ?crit : >>>> >>>>> Sorry for the late :-) >>>>> >>>>> I think this is what you are looking for :-)... and there is not >>>>> picture box any more. >>>>> >>>>> Le sam. 1 d?c. 2018 ? 22:19, Fabien Bodard a >>>>> ?crit : >>>>> >>>>>> no >>>>>> I will try to show you an example tomorow >>>>>> >>>>>> Le sam. 1 d?c. 2018 ? 19:43, Gianluigi a >>>>>> ?crit : >>>>>> >>>>>>> do you mean: Using two pictureboxes, moving and loading them to make >>>>>>> a smooth movement appear? >>>>>>> Ok, I'll try but not today >>>>>>> >>>>>>> Regards >>>>>>> >>>>>>> Il giorno sab 1 dic 2018 alle ore 18:57 Fabien Bodard < >>>>>>> gambas.fr at gmail.com> ha scritto: >>>>>>> >>>>>>>> you must not load images in one image... in fact you must load each >>>>>>>> image in a image variable. >>>>>>>> >>>>>>>> then you manage the layout during the drawing event. >>>>>>>> >>>>>>>> a timer trigger call the drawing area event when needed ... during >>>>>>>> the move. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Le sam. 1 d?c. 2018 ? 18:28, Gianluigi a >>>>>>>> ?crit : >>>>>>>> >>>>>>>>> Hi Fabien, >>>>>>>>> the idea of loading images into one image was silly and I should >>>>>>>>> have understood it right away. >>>>>>>>> Too heavy. >>>>>>>>> Aborted project. >>>>>>>>> >>>>>>>>> Regards >>>>>>>>> Gianluigi >>>>>>>>> >>>>>>>>> Il giorno sab 1 dic 2018 alle ore 15:21 Fabien Bodard < >>>>>>>>> gambas.fr at gmail.com> ha scritto: >>>>>>>>> >>>>>>>>>> Ok I seen the idea ... >>>>>>>>>> >>>>>>>>>> For the movement you can take a look in the FAbout of the ide code >>>>>>>>>> >>>>>>>>>> Le sam. 1 d?c. 2018 ? 14:05, Gianluigi a >>>>>>>>>> ?crit : >>>>>>>>>> >>>>>>>>>>> Hi Fabien, >>>>>>>>>>> very interesting, excellent result and little work :-D >>>>>>>>>>> >>>>>>>>>>> My problem is to adapt a sequence of images of different format >>>>>>>>>>> and type in a single film-like image (to be clear). >>>>>>>>>>> I thought about doing so, this is just the first part of the >>>>>>>>>>> code (now I use the mouse wheel just to try), I do not think I can adapt >>>>>>>>>>> your code here. >>>>>>>>>>> >>>>>>>>>>> The idea (idiot) came to me from a question on our forum and so >>>>>>>>>>> I would like to build an image viewer that shows a random image like a slot >>>>>>>>>>> machine, now I start to study how to give it the movement (I do not know if >>>>>>>>>>> two images series are enough). >>>>>>>>>>> You can lose a lot of money by betting us over ;-D >>>>>>>>>>> >>>>>>>>>>> Regards >>>>>>>>>>> Gianluigi >>>>>>>>>>> >>>>>>>>>>> Il giorno sab 1 dic 2018 alle ore 08:44 Fabien Bodard < >>>>>>>>>>> gambas.fr at gmail.com> ha scritto: >>>>>>>>>>> >>>>>>>>>>>> Hi dear friend >>>>>>>>>>>> >>>>>>>>>>>> This is the same with less work ;-) >>>>>>>>>>>> >>>>>>>>>>>> Regards >>>>>>>>>>>> >>>>>>>>>>>> Fabien Bodard >>>>>>>>>>>> >>>>>>>>>>>> Le ven. 30 nov. 2018 ? 16:30, Gianluigi >>>>>>>>>>>> a ?crit : >>>>>>>>>>>> >>>>>>>>>>>>> Finally it works >>>>>>>>>>>>> See attached file >>>>>>>>>>>>> >>>>>>>>>>>>> Reagards >>>>>>>>>>>>> Gianluigi >>>>>>>>>>>>> >>>>>>>>>>>>> Il giorno ven 30 nov 2018 alle ore 15:39 Gianluigi < >>>>>>>>>>>>> bagonergi at gmail.com> ha scritto: >>>>>>>>>>>>> >>>>>>>>>>>>>> This is the correct code (?): >>>>>>>>>>>>>> >>>>>>>>>>>>>> [code]Private Sub Scale(img As Image) >>>>>>>>>>>>>> >>>>>>>>>>>>>> Dim w, h As Integer >>>>>>>>>>>>>> >>>>>>>>>>>>>> w = img.W >>>>>>>>>>>>>> h = img.H >>>>>>>>>>>>>> If h > w Then >>>>>>>>>>>>>> $H = PictureBox1.H >>>>>>>>>>>>>> $W = (PictureBox1.H * w) \ h >>>>>>>>>>>>>> If $W > PictureBox1.W Then >>>>>>>>>>>>>> $W = PictureBox1.W >>>>>>>>>>>>>> $H = (PictureBox1.W * $H) \ $W >>>>>>>>>>>>>> $X = PictureBox1.X >>>>>>>>>>>>>> $Y = PictureBox1.Y + ((PictureBox1.H - $H) \ 2) >>>>>>>>>>>>>> Return >>>>>>>>>>>>>> Endif >>>>>>>>>>>>>> $Y = PictureBox1.Y >>>>>>>>>>>>>> $X = PictureBox1.X + ((PictureBox1.W - $W) \ 2) >>>>>>>>>>>>>> Else >>>>>>>>>>>>>> $W = PictureBox1.W >>>>>>>>>>>>>> $H = (PictureBox1.W * h) \ w >>>>>>>>>>>>>> If $H > PictureBox1.H Then >>>>>>>>>>>>>> $H = PictureBox1.H >>>>>>>>>>>>>> $W = (PictureBox1.H * $W) \ $H >>>>>>>>>>>>>> $Y = PictureBox1.Y >>>>>>>>>>>>>> $X = PictureBox1.X + ((PictureBox1.W - $W) \ 2) >>>>>>>>>>>>>> Return >>>>>>>>>>>>>> Endif >>>>>>>>>>>>>> $X = PictureBox1.X >>>>>>>>>>>>>> $Y = PictureBox1.Y + ((PictureBox1.H - $H) \ 2) >>>>>>>>>>>>>> Endif >>>>>>>>>>>>>> >>>>>>>>>>>>>> End [/code] >>>>>>>>>>>>>> >>>>>>>>>>>>>> Although I would love to be able to create a code capable of >>>>>>>>>>>>>> scaling images on the Form_Resize event >>>>>>>>>>>>>> A task too burdensome for my tired brain. >>>>>>>>>>>>>> >>>>>>>>>>>>>> Regards >>>>>>>>>>>>>> Gianluigi >>>>>>>>>>>>>> >>>>>>>>>>>>>> Il giorno ven 30 nov 2018 alle ore 13:10 Gianluigi < >>>>>>>>>>>>>> bagonergi at gmail.com> ha scritto: >>>>>>>>>>>>>> >>>>>>>>>>>>>>> I need to paint an image in a new image and then show it in >>>>>>>>>>>>>>> a picturebox. >>>>>>>>>>>>>>> The thing seems to work correctly only if the picturebox is >>>>>>>>>>>>>>> the only component on the window. >>>>>>>>>>>>>>> If the hbox is present, the image is deformed (stretching) >>>>>>>>>>>>>>> and the lower part of the image is positioned under the hbox. >>>>>>>>>>>>>>> Am I wrong? >>>>>>>>>>>>>>> I attach a project and two explanatory images (with >>>>>>>>>>>>>>> magnifying glass). >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Regards >>>>>>>>>>>>>>> Gianluigi >>>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>> ----[ Gambas mailing-list is hosted by >>>>>>>>>>>>> https://www.hostsharing.net ]---- >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> -- >>>>>>>>>>>> Fabien Bodard >>>>>>>>>>>> >>>>>>>>>>>> ----[ Gambas mailing-list is hosted by >>>>>>>>>>>> https://www.hostsharing.net ]---- >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> ----[ Gambas mailing-list is hosted by >>>>>>>>>>> https://www.hostsharing.net ]---- >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> Fabien Bodard >>>>>>>>>> >>>>>>>>>> ----[ Gambas mailing-list is hosted by >>>>>>>>>> https://www.hostsharing.net ]---- >>>>>>>>>> >>>>>>>>> >>>>>>>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >>>>>>>>> ]---- >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> Fabien Bodard >>>>>>>> >>>>>>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >>>>>>>> ]---- >>>>>>>> >>>>>>> >>>>>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >>>>>>> ]---- >>>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Fabien Bodard >>>>>> >>>>> >>>>> >>>>> -- >>>>> Fabien Bodard >>>>> >>>> >>>> >>>> -- >>>> Fabien Bodard >>>> >>> >>> >>> -- >>> Fabien Bodard >>> >>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: RandomRotaPic-0.0.2.tar.gz Type: application/gzip Size: 14530 bytes Desc: not available URL: From bagonergi at gmail.com Tue Dec 11 17:02:50 2018 From: bagonergi at gmail.com (Gianluigi) Date: Tue, 11 Dec 2018 17:02:50 +0100 Subject: [Gambas-user] PictureBox and Containers strange behaviour In-Reply-To: References: Message-ID: Il giorno mar 11 dic 2018 alle ore 16:50 Gianluigi ha scritto: > Hi Fabien, > some small variation and google translations :-) > > Regards > Gianluigi > I forgot to mention that: Gambling is addictive ;-D -------------- next part -------------- An HTML attachment was scrubbed... URL: From bagonergi at gmail.com Tue Dec 11 17:11:31 2018 From: bagonergi at gmail.com (Gianluigi) Date: Tue, 11 Dec 2018 17:11:31 +0100 Subject: [Gambas-user] Coloured Buttons In-Reply-To: <90641126-19ee-281f-e9e2-e558c1139b1f@osnanet.de> References: <90641126-19ee-281f-e9e2-e558c1139b1f@osnanet.de> Message-ID: Il giorno mar 11 dic 2018 alle ore 16:46 Rolf-Werner Eilert < rwe-sse at osnanet.de> ha scritto: > Is it possible that Gtk+ doesn't know coloured Buttons? > > I have a form that used to have a range of coloured buttons (simple > Buttons with .Background set to a color at runtime). Under KDE they were > coloured, but under Ubuntu Mate (Gtk+) they all appear with standard > "Background" color. > > The buttons even cannot be coloured manually via the IDE. > > Or does it have to do with Mate? > > Any hint is appreciated. > > Regards > Rolf > You need to install QT Configurations, Ctrl+Alt+T and type sudo apt install qt4-qtconfig then choose the Cleanlooks theme... Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From bagonergi at gmail.com Tue Dec 11 18:00:01 2018 From: bagonergi at gmail.com (Gianluigi) Date: Tue, 11 Dec 2018 18:00:01 +0100 Subject: [Gambas-user] variable declaration everywhere ??? In-Reply-To: References: Message-ID: Il giorno mar 11 dic 2018 alle ore 09:34 Fabien Bodard ha scritto: > Allow local variable declaration anywhere in the function. The local > symbol still has a function scope, but can be used after its > declaration only. > > hum.... > > and now ? > > {Integer}MyVar = 1+1 ? > > :-P > > > -- > Fabien Bodard > It is like in other languages, I personally do not like it because it makes more difficult to understand the code of others. :-( Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From g4mba5 at gmail.com Tue Dec 11 18:09:48 2018 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Tue, 11 Dec 2018 18:09:48 +0100 Subject: [Gambas-user] variable declaration everywhere ??? In-Reply-To: References: Message-ID: <454e2808-1484-4e40-cd5d-e2797640fc3e@gmail.com> Le 11/12/2018 ? 18:00, Gianluigi a ?crit?: > > It is like in other languages, I personally do not like it because it > makes more difficult to understand the code of others. :-( > > Regards > Gianluigi > Apparently the debugger does not like it either, it makes it crash. And I do not like it too for the same reason as you. -- Beno?t Minisini From karl.reinl at fen-net.de Tue Dec 11 18:21:44 2018 From: karl.reinl at fen-net.de (Karl Reinl) Date: Tue, 11 Dec 2018 18:21:44 +0100 Subject: [Gambas-user] variable declaration everywhere ??? In-Reply-To: <454e2808-1484-4e40-cd5d-e2797640fc3e@gmail.com> References: <454e2808-1484-4e40-cd5d-e2797640fc3e@gmail.com> Message-ID: <1544548904.493.11.camel@Scenic.local> Am Dienstag, den 11.12.2018, 18:09 +0100 schrieb Beno?t Minisini: > Le 11/12/2018 ? 18:00, Gianluigi a ?crit : > > > > It is like in other languages, I personally do not like it because it > > makes more difficult to understand the code of others. :-( > > > > Regards > > Gianluigi > > > > Apparently the debugger does not like it either, it makes it crash. > > And I do not like it too for the same reason as you. > Salut, it's useful on daily work (every thing has to go quick), but I also think it's real, real bad habit. And as already mentioned it is difficult to understand the code of others and your own much later. -- Amicalement Charlie From jussi.lahtinen at gmail.com Tue Dec 11 21:49:50 2018 From: jussi.lahtinen at gmail.com (Jussi Lahtinen) Date: Tue, 11 Dec 2018 22:49:50 +0200 Subject: [Gambas-user] variable declaration everywhere ??? In-Reply-To: References: Message-ID: Why? It's exactly the same code, but in different place. For me personally, it doesn't matter at all. Jussi On Tue, Dec 11, 2018 at 7:01 PM Gianluigi wrote: > > > Il giorno mar 11 dic 2018 alle ore 09:34 Fabien Bodard < > gambas.fr at gmail.com> ha scritto: > >> Allow local variable declaration anywhere in the function. The local >> symbol still has a function scope, but can be used after its >> declaration only. >> >> hum.... >> >> and now ? >> >> {Integer}MyVar = 1+1 ? >> >> :-P >> >> >> -- >> Fabien Bodard >> > > It is like in other languages, I personally do not like it because it > makes more difficult to understand the code of others. :-( > > Regards > Gianluigi > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gambas.fr at gmail.com Tue Dec 11 22:37:21 2018 From: gambas.fr at gmail.com (Fabien Bodard) Date: Tue, 11 Dec 2018 22:37:21 +0100 Subject: [Gambas-user] PictureBox and Containers strange behaviour In-Reply-To: References: Message-ID: $H = DrawingArea2.H is false because it is not the drawing zone ... it's more DrawingArea2.ClientH As you use it in the _Draw event prefer Paint.H that is the true device area height Modified but yet unperfect Le mar. 11 d?c. 2018 ? 17:04, Gianluigi a ?crit : > > > > Il giorno mar 11 dic 2018 alle ore 16:50 Gianluigi ha scritto: >> >> Hi Fabien, >> some small variation and google translations :-) >> >> Regards >> Gianluigi > > > I forgot to mention that: Gambling is addictive ;-D > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- -- Fabien Bodard -------------- next part -------------- A non-text attachment was scrubbed... Name: RandomRotaPic-0.0.2.tar.gz Type: application/gzip Size: 14442 bytes Desc: not available URL: From dsanroma at gmail.com Tue Dec 11 23:26:35 2018 From: dsanroma at gmail.com (=?UTF-8?Q?David_Sanrom=c3=a1?=) Date: Tue, 11 Dec 2018 23:26:35 +0100 Subject: [Gambas-user] variable declaration everywhere ??? In-Reply-To: References: Message-ID: Hello, I don't mean to start a war ;) but there are cases where it makes perfect sense to declare within code: For I As Integer=1 To 10 Next Makes it very easy to move the code around to another function and/or re-factor. You just worry abut the piece of code. You take the declaration with you Just an idea ;) David El 11/12/18 a las 21:49, Jussi Lahtinen escribi?: > Why? > It's exactly the same code, but in different place. For me personally, > it doesn't matter at all. > > > Jussi > > On Tue, Dec 11, 2018 at 7:01 PM Gianluigi > wrote: > > > > Il giorno mar 11 dic 2018 alle ore 09:34 Fabien Bodard > > ha scritto: > > Allow local variable declaration anywhere in the function. The > local > symbol still has a function scope, but can be used after its > declaration only. > > hum.... > > and now ? > > {Integer}MyVar = 1+1 ? > > :-P > > > -- > Fabien Bodard > > > It is like in other languages, I personally do not like it because > it makes more difficult to understand the code of others. :-( > > Regards > Gianluigi > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net > ]---- > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: From g4mba5 at gmail.com Tue Dec 11 23:47:01 2018 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Tue, 11 Dec 2018 23:47:01 +0100 Subject: [Gambas-user] variable declaration everywhere ??? In-Reply-To: References: Message-ID: Le 11/12/2018 ? 23:26, David Sanrom? a ?crit?: > Hello, > > > I don't mean to start a war ;) but there are cases where it makes > perfect sense to declare within code: > > > For I As Integer=1 To 10 > > Next > > > Makes it very easy to move the code around to another function and/or > re-factor. You just worry abut the piece of code. You take the > declaration with you > > > Just an idea ;) > > David > As far as I am concern, the deal is between "code easier to write" and "code easier to debug", taking into account that the former is 20% of the development time, and the later 80%. -- Beno?t Minisini From jussi.lahtinen at gmail.com Wed Dec 12 00:11:56 2018 From: jussi.lahtinen at gmail.com (Jussi Lahtinen) Date: Wed, 12 Dec 2018 01:11:56 +0200 Subject: [Gambas-user] variable declaration everywhere ??? In-Reply-To: References: Message-ID: Why would it be harder to debug? David gave great example of it usage (pretty much only case where I use it) and I think it only makes code more readable and less scope for the variable. Jussi On Wed, Dec 12, 2018 at 12:48 AM Beno?t Minisini wrote: > Le 11/12/2018 ? 23:26, David Sanrom? a ?crit : > > Hello, > > > > > > I don't mean to start a war ;) but there are cases where it makes > > perfect sense to declare within code: > > > > > > For I As Integer=1 To 10 > > > > Next > > > > > > Makes it very easy to move the code around to another function and/or > > re-factor. You just worry abut the piece of code. You take the > > declaration with you > > > > > > Just an idea ;) > > > > David > > > > As far as I am concern, the deal is between "code easier to write" and > "code easier to debug", taking into account that the former is 20% of > the development time, and the later 80%. > > -- > Beno?t Minisini > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From g4mba5 at gmail.com Wed Dec 12 00:16:33 2018 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Wed, 12 Dec 2018 00:16:33 +0100 Subject: [Gambas-user] variable declaration everywhere ??? In-Reply-To: References: Message-ID: <53cb82fc-c305-b1d2-5a16-44fb9932a667@gmail.com> Le 12/12/2018 ? 00:11, Jussi Lahtinen a ?crit?: > Why would it be harder to debug? > David gave great example of it usage (pretty much only case where I use > it) and I think it only makes code more readable and less scope for the > variable. > > > Jussi > Because as soon as variables can be declared anywhere, people will start to use that for writing ugly code. :-) -- Beno?t Minisini From jussi.lahtinen at gmail.com Wed Dec 12 00:29:10 2018 From: jussi.lahtinen at gmail.com (Jussi Lahtinen) Date: Wed, 12 Dec 2018 01:29:10 +0200 Subject: [Gambas-user] variable declaration everywhere ??? In-Reply-To: <53cb82fc-c305-b1d2-5a16-44fb9932a667@gmail.com> References: <53cb82fc-c305-b1d2-5a16-44fb9932a667@gmail.com> Message-ID: Aesthetics or practical issue? Jussi On Wed, Dec 12, 2018 at 1:17 AM Beno?t Minisini wrote: > Le 12/12/2018 ? 00:11, Jussi Lahtinen a ?crit : > > Why would it be harder to debug? > > David gave great example of it usage (pretty much only case where I use > > it) and I think it only makes code more readable and less scope for the > > variable. > > > > > > Jussi > > > > Because as soon as variables can be declared anywhere, people will start > to use that for writing ugly code. :-) > > -- > Beno?t Minisini > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From adamnt42 at gmail.com Wed Dec 12 00:29:21 2018 From: adamnt42 at gmail.com (Bruce) Date: Wed, 12 Dec 2018 09:59:21 +1030 Subject: [Gambas-user] variable declaration everywhere ??? In-Reply-To: <53cb82fc-c305-b1d2-5a16-44fb9932a667@gmail.com> References: <53cb82fc-c305-b1d2-5a16-44fb9932a667@gmail.com> Message-ID: <6d348a6a-5992-99ee-15ff-990a9650eafe@gmail.com> Well, I haven't tried it yet but a few things pop into my mind. Consider a method that has lots of use of "throw away" indexers/iterators, For idx as integer = 0 to things.max dosomething(thing[idx]) next ... For idx = 0 to others.max dosomthingelse(others[idx]) next ... For each idx as float in floatarray dowhatever(idx) etc Is it going to redefine idx each time? b On 12/12/18 9:46 am, Beno?t Minisini wrote: > Le 12/12/2018 ? 00:11, Jussi Lahtinen a ?crit?: >> Why would it be harder to debug? >> David gave great example of it usage (pretty much only case where I >> use it) and I think it only makes code more readable and less scope >> for the variable. >> >> >> Jussi >> > > Because as soon as variables can be declared anywhere, people will start > to use that for writing ugly code. :-) > From jussi.lahtinen at gmail.com Wed Dec 12 00:38:17 2018 From: jussi.lahtinen at gmail.com (Jussi Lahtinen) Date: Wed, 12 Dec 2018 01:38:17 +0200 Subject: [Gambas-user] variable declaration everywhere ??? In-Reply-To: <6d348a6a-5992-99ee-15ff-990a9650eafe@gmail.com> References: <53cb82fc-c305-b1d2-5a16-44fb9932a667@gmail.com> <6d348a6a-5992-99ee-15ff-990a9650eafe@gmail.com> Message-ID: Every time you redefine it, it is redefined. And depending on implementation the variable could be valid only inside of the loop. If not, then it is what it is defined. For idx as integer = 0 to things.max dosomething(thing[idx]) next Above idx is integer. ... For idx = 0 to others.max dosomthingelse(others[idx]) next Above idx is either undeclared or integer, depending on implementation. ... For each idx as float in floatarray dowhatever(idx) Above idx is float. Jussi On Wed, Dec 12, 2018 at 1:31 AM Bruce wrote: > Well, I haven't tried it yet but a few things pop into my mind. > > Consider a method that has lots of use of "throw away" indexers/iterators, > For idx as integer = 0 to things.max > dosomething(thing[idx]) > next > ... > For idx = 0 to others.max > dosomthingelse(others[idx]) > next > ... > For each idx as float in floatarray > dowhatever(idx) > > etc > Is it going to redefine idx each time? > > b > > On 12/12/18 9:46 am, Beno?t Minisini wrote: > > Le 12/12/2018 ? 00:11, Jussi Lahtinen a ?crit : > >> Why would it be harder to debug? > >> David gave great example of it usage (pretty much only case where I > >> use it) and I think it only makes code more readable and less scope > >> for the variable. > >> > >> > >> Jussi > >> > > > > Because as soon as variables can be declared anywhere, people will start > > to use that for writing ugly code. :-) > > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dsanroma at gmail.com Wed Dec 12 00:39:39 2018 From: dsanroma at gmail.com (=?UTF-8?Q?David_Sanrom=c3=a1?=) Date: Wed, 12 Dec 2018 00:39:39 +0100 Subject: [Gambas-user] variable declaration everywhere ??? In-Reply-To: <53cb82fc-c305-b1d2-5a16-44fb9932a667@gmail.com> References: <53cb82fc-c305-b1d2-5a16-44fb9932a667@gmail.com> Message-ID: <4919bcdb-3243-dcd7-adc6-5da5ca87d43a@gmail.com> El 12/12/18 a las 0:16, Beno?t Minisini escribi?: > Le 12/12/2018 ? 00:11, Jussi Lahtinen a ?crit?: >> Why would it be harder to debug? >> David gave great example of it usage (pretty much only case where I >> use it) and I think it only makes code more readable and less scope >> for the variable. >> >> >> Jussi >> > > Because as soon as variables can be declared anywhere, people will > start to use that for writing ugly code. :-) > Why not a compromise ? Dim i as Integer?? -> anywhere = illegal (just like now) However cases like: For i As Integer = 1 To 10 For Each aString as String in stringArray Could be considered legal. That way we could have both worlds. Variables could "only" be declared with a Dim in the declaration area. ---> Clean Code (like now) Control loop variables "could" be defined in place ---> Practical and also clean code. Just an idea.... David From adamnt42 at gmail.com Wed Dec 12 09:10:18 2018 From: adamnt42 at gmail.com (Bruce) Date: Wed, 12 Dec 2018 18:40:18 +1030 Subject: [Gambas-user] GTK on a non-gtk system Message-ID: <83079977-033d-5f0d-67d9-179138b0b15d@gmail.com> Hoping somebody can help me here. The system gui is Mate. But I do not have gtk development installed. (which is fine by me!) We do not use gb.gui, only gb.gui.qt. This is very important (Benoit, you know what I mean.) But everytime I run a gambas UI app, whether from an executable or in the IDE, I get the following message in the console: Gtk-Message: 18:33:46.642: (for origin information, set GTK_DEBUG): failed to retrieve property `gtk-primary-button-warps-slider' of type `gboolean' from rc file value "((GString*) 0x1ef7660)" of type `gboolean' I just a) care about that, b) ever want to see it again. Any information, really gratefully received. tia Bruce From bagonergi at gmail.com Wed Dec 12 09:32:38 2018 From: bagonergi at gmail.com (Gianluigi) Date: Wed, 12 Dec 2018 09:32:38 +0100 Subject: [Gambas-user] variable declaration everywhere ??? In-Reply-To: <4919bcdb-3243-dcd7-adc6-5da5ca87d43a@gmail.com> References: <53cb82fc-c305-b1d2-5a16-44fb9932a667@gmail.com> <4919bcdb-3243-dcd7-adc6-5da5ca87d43a@gmail.com> Message-ID: Il giorno mer 12 dic 2018 alle ore 00:42 David Sanrom? ha scritto: > > El 12/12/18 a las 0:16, Beno?t Minisini escribi?: > > Le 12/12/2018 ? 00:11, Jussi Lahtinen a ?crit : > >> Why would it be harder to debug? > >> David gave great example of it usage (pretty much only case where I > >> use it) and I think it only makes code more readable and less scope > >> for the variable. > >> > >> > >> Jussi > >> > > > > Because as soon as variables can be declared anywhere, people will > > start to use that for writing ugly code. :-) > > > > Why not a compromise ? > > > Dim i as Integer -> anywhere = illegal (just like now) > > > However cases like: > > For i As Integer = 1 To 10 > > For Each aString as String in stringArray > > > Could be considered legal. That way we could have both worlds. > > Variables could "only" be declared with a Dim in the declaration area. > ---> Clean Code (like now) > > Control loop variables "could" be defined in place ---> Practical and > also clean code. > > > Just an idea.... > > David > When yesterday we discussed on the Italian forum, in addition to what I said here, I also said that the only place where this innovation could be useful were the loops. I see no other possible advantage but I only see the disadvantage of chaotic code. If someone wants to declare variables "on the fly" he can very well use the Editor's split Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From bagonergi at gmail.com Wed Dec 12 10:29:13 2018 From: bagonergi at gmail.com (Gianluigi) Date: Wed, 12 Dec 2018 10:29:13 +0100 Subject: [Gambas-user] PictureBox and Containers strange behaviour In-Reply-To: References: Message-ID: Hi Fabien, why do you say unperfect? It seems to work very well. These days I'm busy, but as soon as I can understand your beautiful code, I'll let you know :-) Regards Gianluigi Il giorno mar 11 dic 2018 alle ore 22:38 Fabien Bodard ha scritto: > $H = DrawingArea2.H > is false because it is not the drawing zone ... it's more > DrawingArea2.ClientH > > As you use it in the _Draw event prefer Paint.H that is the true > device area height > > Modified but yet unperfect > > Le mar. 11 d?c. 2018 ? 17:04, Gianluigi a ?crit : > > > > > > > > Il giorno mar 11 dic 2018 alle ore 16:50 Gianluigi > ha scritto: > >> > >> Hi Fabien, > >> some small variation and google translations :-) > >> > >> Regards > >> Gianluigi > > > > > > I forgot to mention that: Gambling is addictive ;-D > > > > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > > > > -- > Fabien Bodard > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rwe-sse at osnanet.de Wed Dec 12 10:35:29 2018 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Wed, 12 Dec 2018 10:35:29 +0100 Subject: [Gambas-user] variable declaration everywhere ??? In-Reply-To: References: <53cb82fc-c305-b1d2-5a16-44fb9932a667@gmail.com> <6d348a6a-5992-99ee-15ff-990a9650eafe@gmail.com> Message-ID: <45d7d185-6ce9-fe36-1cc3-3bfdf9621329@osnanet.de> Doesn't that slow down a bit? I know, on today's CPUs it may not be an instant drawback, but just consider what happens if such a function is called hundreds or thousand of times whithin a larger scope. Then redefining the variable will quickly grow exponentially. Just image TableView_Data, which rebuilds the whole table whenever the user moves something on the screen. Each time the Data event is called for every single cell of the table. In cases where I need such variables there, I define them globally and just re-use them. In my code, I define counting variables in the function they are used in. But object variables which are used very frequently I define once on module level and reuse them rather than defining them over and over again. It's this feeling that it takes a lot of pushing values forth and back, storing, deleting, garbage collection stuff... I just feel more secure knowing that a variable is redefined 20 times than 20,000 times during runtime. Regards Rolf Am 12.12.18 um 00:38 schrieb Jussi Lahtinen: > Every time you redefine it, it is redefined. And depending on > implementation the variable could be valid only inside of the loop. If > not, then it is what it is defined. > > For idx as integer = 0 to things.max > ? ?dosomething(thing[idx]) > next > > Above idx is integer. > > ... > For idx = 0 to others.max > ? ?dosomthingelse(others[idx]) > next > > Above idx is either undeclared or integer, depending on implementation. > > ... > For each idx as float in floatarray > ? ?dowhatever(idx) > > Above idx is float. > > > Jussi > > > On Wed, Dec 12, 2018 at 1:31 AM Bruce > wrote: > > Well, I haven't tried it yet but a few things pop into my mind. > > Consider a method that has lots of use of "throw away" > indexers/iterators, > For idx as integer = 0 to things.max > ? ?dosomething(thing[idx]) > next > ... > For idx = 0 to others.max > ? ?dosomthingelse(others[idx]) > next > ... > For each idx as float in floatarray > ? ?dowhatever(idx) > > etc > Is it going to redefine idx each time? > > b > > On 12/12/18 9:46 am, Beno?t Minisini wrote: > > Le 12/12/2018 ? 00:11, Jussi Lahtinen a ?crit?: > >> Why would it be harder to debug? > >> David gave great example of it usage (pretty much only case where I > >> use it) and I think it only makes code more readable and less scope > >> for the variable. > >> > >> > >> Jussi > >> > > > > Because as soon as variables can be declared anywhere, people > will start > > to use that for writing ugly code. :-) > > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > From rwe-sse at osnanet.de Wed Dec 12 10:40:20 2018 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Wed, 12 Dec 2018 10:40:20 +0100 Subject: [Gambas-user] Coloured Buttons In-Reply-To: References: <90641126-19ee-281f-e9e2-e558c1139b1f@osnanet.de> Message-ID: <80671d47-ae24-5708-af15-4d50b2c4eb2e@osnanet.de> Am 11.12.18 um 17:11 schrieb Gianluigi: > > > Il giorno mar 11 dic 2018 alle ore 16:46 Rolf-Werner Eilert > > ha scritto: > > Is it possible that Gtk+ doesn't know coloured Buttons? > > I have a form that used to have a range of coloured buttons (simple > Buttons with .Background set to a color at runtime). Under KDE they > were > coloured, but under Ubuntu Mate (Gtk+) they all appear with standard > "Background" color. > > The buttons even cannot be coloured manually via the IDE. > > Or does it have to do with Mate? > > Any hint is appreciated. > > Regards > Rolf > > > You need to install QT Configurations, Ctrl+Alt+T and type > > sudo apt install qt4-qtconfig > > then choose the Cleanlooks theme... > > Regards > Gianluigi > Thank you Gianluigi. That means, it has to do with Mate lacking Qt stuff, do I understand it right? And Cleanlooks is where? Regards Rolf From bagonergi at gmail.com Wed Dec 12 10:53:32 2018 From: bagonergi at gmail.com (Gianluigi) Date: Wed, 12 Dec 2018 10:53:32 +0100 Subject: [Gambas-user] Coloured Buttons In-Reply-To: <80671d47-ae24-5708-af15-4d50b2c4eb2e@osnanet.de> References: <90641126-19ee-281f-e9e2-e558c1139b1f@osnanet.de> <80671d47-ae24-5708-af15-4d50b2c4eb2e@osnanet.de> Message-ID: Il giorno mer 12 dic 2018 alle ore 10:41 Rolf-Werner Eilert < rwe-sse at osnanet.de> ha scritto: > Am 11.12.18 um 17:11 schrieb Gianluigi: > > > > > > Il giorno mar 11 dic 2018 alle ore 16:46 Rolf-Werner Eilert > > > ha scritto: > > > > Is it possible that Gtk+ doesn't know coloured Buttons? > > > > I have a form that used to have a range of coloured buttons (simple > > Buttons with .Background set to a color at runtime). Under KDE they > > were > > coloured, but under Ubuntu Mate (Gtk+) they all appear with standard > > "Background" color. > > > > The buttons even cannot be coloured manually via the IDE. > > > > Or does it have to do with Mate? > > > > Any hint is appreciated. > > > > Regards > > Rolf > > > > > > You need to install QT Configurations, Ctrl+Alt+T and type > > > > sudo apt install qt4-qtconfig > > > > then choose the Cleanlooks theme... > > > > Regards > > Gianluigi > > > > Thank you Gianluigi. > > That means, it has to do with Mate lacking Qt stuff, do I understand it > right? > > And Cleanlooks is where? > > Regards > Rolf > > qt-config adds themes to your gtk desktop. Install it, open it choose the theme (cleanlooks) that makes the qt work well and save. You can also intervene on various aesthetic aspects. Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From johny.provoost at skynet.be Wed Dec 12 11:45:09 2018 From: johny.provoost at skynet.be (Johny Provoost) Date: Wed, 12 Dec 2018 11:45:09 +0100 Subject: [Gambas-user] Trayicon - dbus error Message-ID: <158ee1bb-2b44-50ee-e421-f835851e5e83@skynet.be> hello, Strange dbus error - interpreter crash.? When using Trayicon and the directory has a point in it (exem. the code sits in ~/version1.1 , I get a interpreter crash.? In a normal directory is works OK. When you run the programm with use of a terminal emulator, you see the dbus error. [dbus[2160]: arguments to dbus_bus_request_name() were incorrect, assertion "_dbus_check_is_valid_bus_name (name)" failed in file ../../../dbus/dbus-bus.c line 1122. This is normally a bug in some application using the D-Bus library. ? D-Bus not built with -rdynamic so unable to print a backtrace] I use Kubuntu 18.04 and gambas 3.11.4 I didn't file a bug report because I don't know if it's a bug in Gambas or in dbus. -- ------------------------------------------------------------------------ *Vriendelijke Groeten* *Johny Provoost* *mailto: **johny.provoost at skynet.be* *mailto: **johny.provoost at gmail.com* *Website:*http://www.jepe.be or http://www.johnyprovoost.net -------------- next part -------------- A non-text attachment was scrubbed... Name: TrayIconScroll.0-0.0.1.tar.gz Type: application/gzip Size: 30407 bytes Desc: not available URL: From bagonergi at gmail.com Wed Dec 12 16:32:23 2018 From: bagonergi at gmail.com (Gianluigi) Date: Wed, 12 Dec 2018 16:32:23 +0100 Subject: [Gambas-user] PictureBox and Containers strange behaviour In-Reply-To: References: Message-ID: Hi Fabien, I saw the malfunction. Why do you say that Scale() does not work? Here it seems to work well. I attach ver. 03 Regards Gianluigi Il giorno mer 12 dic 2018 alle ore 10:29 Gianluigi ha scritto: > Hi Fabien, > why do you say unperfect? It seems to work very well. > These days I'm busy, but as soon as I can understand your beautiful code, > I'll let you know :-) > > Regards > Gianluigi > > Il giorno mar 11 dic 2018 alle ore 22:38 Fabien Bodard < > gambas.fr at gmail.com> ha scritto: > >> $H = DrawingArea2.H >> is false because it is not the drawing zone ... it's more >> DrawingArea2.ClientH >> >> As you use it in the _Draw event prefer Paint.H that is the true >> device area height >> >> Modified but yet unperfect >> >> Le mar. 11 d?c. 2018 ? 17:04, Gianluigi a ?crit : >> > >> > >> > >> > Il giorno mar 11 dic 2018 alle ore 16:50 Gianluigi >> ha scritto: >> >> >> >> Hi Fabien, >> >> some small variation and google translations :-) >> >> >> >> Regards >> >> Gianluigi >> > >> > >> > I forgot to mention that: Gambling is addictive ;-D >> > >> > >> > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >> ]---- >> >> >> >> -- >> Fabien Bodard >> >> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: RandomRotaPic-0.0.3.tar.gz Type: application/gzip Size: 14543 bytes Desc: not available URL: From bagonergi at gmail.com Wed Dec 12 19:56:26 2018 From: bagonergi at gmail.com (Gianluigi) Date: Wed, 12 Dec 2018 19:56:26 +0100 Subject: [Gambas-user] Trayicon - dbus error In-Reply-To: <158ee1bb-2b44-50ee-e421-f835851e5e83@skynet.be> References: <158ee1bb-2b44-50ee-e421-f835851e5e83@skynet.be> Message-ID: It seems that Delta does not work, always returns one in both directions. Regards Gianluigi Il giorno mer 12 dic 2018 alle ore 11:46 Johny Provoost < johny.provoost at skynet.be> ha scritto: > hello, > > Strange dbus error - interpreter crash. When using Trayicon and the > directory has a point in it (exem. the code sits in ~/version1.1 , I get > a interpreter crash. In a normal directory is works OK. > > When you run the programm with use of a terminal emulator, you see the > dbus error. > > [dbus[2160]: arguments to dbus_bus_request_name() were incorrect, > assertion "_dbus_check_is_valid_bus_name (name)" failed in file > ../../../dbus/dbus-bus.c line 1122. > This is normally a bug in some application using the D-Bus library. > > D-Bus not built with -rdynamic so unable to print a backtrace] > > > I use Kubuntu 18.04 and gambas 3.11.4 > > I didn't file a bug report because I don't know if it's a bug in Gambas > or in dbus. > > -- > > ------------------------------------------------------------------------ > > *Vriendelijke Groeten* > > *Johny Provoost* > > *mailto: **johny.provoost at skynet.be* > > *mailto: **johny.provoost at gmail.com* > > *Website:*http://www.jepe.be or > http://www.johnyprovoost.net > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jussi.lahtinen at gmail.com Wed Dec 12 20:04:48 2018 From: jussi.lahtinen at gmail.com (Jussi Lahtinen) Date: Wed, 12 Dec 2018 21:04:48 +0200 Subject: [Gambas-user] variable declaration everywhere ??? In-Reply-To: <45d7d185-6ce9-fe36-1cc3-3bfdf9621329@osnanet.de> References: <53cb82fc-c305-b1d2-5a16-44fb9932a667@gmail.com> <6d348a6a-5992-99ee-15ff-990a9650eafe@gmail.com> <45d7d185-6ce9-fe36-1cc3-3bfdf9621329@osnanet.de> Message-ID: I suggest you try how long the declaration takes (I don't think it is significant). But using global/public variables for loops is bad idea. Just think what happens when you call function inside of some loop and they both happen to use the same variable (or the function call something else which do it). This will create bug that can be really hard to debug. Jussi On Wed, Dec 12, 2018 at 11:36 AM Rolf-Werner Eilert wrote: > Doesn't that slow down a bit? > > I know, on today's CPUs it may not be an instant drawback, but just > consider what happens if such a function is called hundreds or thousand > of times whithin a larger scope. Then redefining the variable will > quickly grow exponentially. > > Just image TableView_Data, which rebuilds the whole table whenever the > user moves something on the screen. Each time the Data event is called > for every single cell of the table. In cases where I need such variables > there, I define them globally and just re-use them. > > In my code, I define counting variables in the function they are used > in. But object variables which are used very frequently I define once on > module level and reuse them rather than defining them over and over > again. It's this feeling that it takes a lot of pushing values forth and > back, storing, deleting, garbage collection stuff... I just feel more > secure knowing that a variable is redefined 20 times than 20,000 times > during runtime. > > Regards > Rolf > > > > > Am 12.12.18 um 00:38 schrieb Jussi Lahtinen: > > Every time you redefine it, it is redefined. And depending on > > implementation the variable could be valid only inside of the loop. If > > not, then it is what it is defined. > > > > For idx as integer = 0 to things.max > > dosomething(thing[idx]) > > next > > > > Above idx is integer. > > > > ... > > For idx = 0 to others.max > > dosomthingelse(others[idx]) > > next > > > > Above idx is either undeclared or integer, depending on implementation. > > > > ... > > For each idx as float in floatarray > > dowhatever(idx) > > > > Above idx is float. > > > > > > Jussi > > > > > > On Wed, Dec 12, 2018 at 1:31 AM Bruce > > wrote: > > > > Well, I haven't tried it yet but a few things pop into my mind. > > > > Consider a method that has lots of use of "throw away" > > indexers/iterators, > > For idx as integer = 0 to things.max > > dosomething(thing[idx]) > > next > > ... > > For idx = 0 to others.max > > dosomthingelse(others[idx]) > > next > > ... > > For each idx as float in floatarray > > dowhatever(idx) > > > > etc > > Is it going to redefine idx each time? > > > > b > > > > On 12/12/18 9:46 am, Beno?t Minisini wrote: > > > Le 12/12/2018 ? 00:11, Jussi Lahtinen a ?crit : > > >> Why would it be harder to debug? > > >> David gave great example of it usage (pretty much only case > where I > > >> use it) and I think it only makes code more readable and less > scope > > >> for the variable. > > >> > > >> > > >> Jussi > > >> > > > > > > Because as soon as variables can be declared anywhere, people > > will start > > > to use that for writing ugly code. :-) > > > > > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net > ]---- > > > > > > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > > > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rwe-sse at osnanet.de Thu Dec 13 09:15:21 2018 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Thu, 13 Dec 2018 09:15:21 +0100 Subject: [Gambas-user] variable declaration everywhere ??? In-Reply-To: References: <53cb82fc-c305-b1d2-5a16-44fb9932a667@gmail.com> <6d348a6a-5992-99ee-15ff-990a9650eafe@gmail.com> <45d7d185-6ce9-fe36-1cc3-3bfdf9621329@osnanet.de> Message-ID: Am 12.12.18 um 20:04 schrieb Jussi Lahtinen: > I suggest you try how long the declaration takes (I don't think it is > significant). But using global/public variables for loops is bad idea. > Just think what happens when you call function inside of some loop and > they both happen to use the same variable (or the function call > something else which do it). > This will create bug that can be really hard to debug. > > > Jussi 100 % agreed, and that was not what I meant. What I meant are variables like those for images Dim myImage as Image for ... . . myImage = New Image... . . next I have an Image in a TableView_Data event, and I know how often it is called under runtime... In this case, I would rather choose a general name for the variable and declare it once for all functions that can need it. Public myImage as New Image Public Sub TableView_Data() myImage = ... End (When I looked it up for this mail, I saw I did not declare it that way but directly within the Data event, like above, but without the for...next loop of course. It runs well that way, so maybe the discussion is a bit academical ;) ) Regards Rolf > > On Wed, Dec 12, 2018 at 11:36 AM Rolf-Werner Eilert > wrote: > > Doesn't that slow down a bit? > > I know, on today's CPUs it may not be an instant drawback, but just > consider what happens if such a function is called hundreds or thousand > of times whithin a larger scope. Then redefining the variable will > quickly grow exponentially. > > Just image TableView_Data, which rebuilds the whole table whenever the > user moves something on the screen. Each time the Data event is called > for every single cell of the table. In cases where I need such > variables > there, I define them globally and just re-use them. > > In my code, I define counting variables in the function they are used > in. But object variables which are used very frequently I define > once on > module level and reuse them rather than defining them over and over > again. It's this feeling that it takes a lot of pushing values forth > and > back, storing, deleting, garbage collection stuff... I just feel more > secure knowing that a variable is redefined 20 times than 20,000 times > during runtime. > > Regards > Rolf > > > > > Am 12.12.18 um 00:38 schrieb Jussi Lahtinen: > > Every time you redefine it, it is redefined. And depending on > > implementation the variable could be valid only inside of the > loop. If > > not, then it is what it is defined. > > > > For idx as integer = 0 to things.max > >? ? ?dosomething(thing[idx]) > > next > > > > Above idx is integer. > > > > ... > > For idx = 0 to others.max > >? ? ?dosomthingelse(others[idx]) > > next > > > > Above idx is either undeclared or integer, depending on > implementation. > > > > ... > > For each idx as float in floatarray > >? ? ?dowhatever(idx) > > > > Above idx is float. > > > > > > Jussi > > > > > > On Wed, Dec 12, 2018 at 1:31 AM Bruce > > >> wrote: > > > >? ? ?Well, I haven't tried it yet but a few things pop into my mind. > > > >? ? ?Consider a method that has lots of use of "throw away" > >? ? ?indexers/iterators, > >? ? ?For idx as integer = 0 to things.max > >? ? ? ? ?dosomething(thing[idx]) > >? ? ?next > >? ? ?... > >? ? ?For idx = 0 to others.max > >? ? ? ? ?dosomthingelse(others[idx]) > >? ? ?next > >? ? ?... > >? ? ?For each idx as float in floatarray > >? ? ? ? ?dowhatever(idx) > > > >? ? ?etc > >? ? ?Is it going to redefine idx each time? > > > >? ? ?b > > > >? ? ?On 12/12/18 9:46 am, Beno?t Minisini wrote: > >? ? ? > Le 12/12/2018 ? 00:11, Jussi Lahtinen a ?crit?: > >? ? ? >> Why would it be harder to debug? > >? ? ? >> David gave great example of it usage (pretty much only > case where I > >? ? ? >> use it) and I think it only makes code more readable and > less scope > >? ? ? >> for the variable. > >? ? ? >> > >? ? ? >> > >? ? ? >> Jussi > >? ? ? >> > >? ? ? > > >? ? ? > Because as soon as variables can be declared anywhere, people > >? ? ?will start > >? ? ? > to use that for writing ugly code. :-) > >? ? ? > > > > >? ? ?----[ Gambas mailing-list is hosted by > https://www.hostsharing.net ]---- > > > > > > > > ----[ Gambas mailing-list is hosted by > https://www.hostsharing.net ]---- > > > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > From gambas.fr at gmail.com Thu Dec 13 09:59:53 2018 From: gambas.fr at gmail.com (Fabien Bodard) Date: Thu, 13 Dec 2018 09:59:53 +0100 Subject: [Gambas-user] variable declaration everywhere ??? In-Reply-To: References: <53cb82fc-c305-b1d2-5a16-44fb9932a667@gmail.com> <6d348a6a-5992-99ee-15ff-990a9650eafe@gmail.com> <45d7d185-6ce9-fe36-1cc3-3bfdf9621329@osnanet.de> Message-ID: For some long piece of code having to memorize the long list of declared variable sometime is more harder than reading a var just declared above. And yes ... only for things like loop or var swaping. But like many things is it matter of language limitation or convention ? What is the better ... limiting using by constaint or by convention ? Limiting by constraint can make us lose some users (It's the same for namespace). Maybe for some case allowing to not use explicit declaration can be interesting... like for script for exemple. In this case we can imagine that default can be variant. But this must be an option in header (NOEXPLICIT). WIth that gbs can automatiquely add this option in background. From bagonergi at gmail.com Thu Dec 13 15:57:56 2018 From: bagonergi at gmail.com (Gianluigi) Date: Thu, 13 Dec 2018 15:57:56 +0100 Subject: [Gambas-user] Unable to compile gb.mysql in Gamba3 Message-ID: ... to ---> final sudo make install part make[1]: Leaving directory '/home/gian/gambasdevel/gb.openal' Making install in comp make[1]: Entering directory '/home/gian/gambasdevel/comp' make[2]: Entering directory '/home/gian/gambasdevel/comp' Installing the components... Compiling gb.eval.highlight... OK Installing gb.eval.highlight... Compiling gb.args... OK Installing gb.args... Compiling gb.settings... OK Installing gb.settings... Compiling gb.gui.base... OK Installing gb.gui.base... Compiling gb.form... OK Installing gb.form... Compiling gb.form.stock... OK Installing gb.form.stock... Compiling gb.form.dialog... OK Installing gb.form.dialog... Compiling gb.form.mdi... OK Installing gb.form.mdi... Compiling gb.db.form... OK Installing gb.db.form... Compiling gb.desktop... OK Installing gb.desktop... Compiling gb.web... OK Installing gb.web... Compiling gb.report... OK Installing gb.report... Compiling gb.report2... OK Installing gb.report2... Compiling gb.chart... OK Installing gb.chart... Compiling gb.mysql... _MySQL.class:70: error: Unknown local variable: $sTmp Compiling gb.net.smtp... OK Installing gb.net.smtp... Compiling gb.net.pop3... OK Installing gb.net.pop3... Compiling gb.memcached... OK Installing gb.memcached... Compiling gb.map... OK Installing gb.map... Compiling gb.logging... OK Installing gb.logging... Compiling gb.markdown... OK Installing gb.markdown... Compiling gb.media.form... OK Installing gb.media.form... Compiling gb.scanner... OK Installing gb.scanner... Compiling gb.util... OK Installing gb.util... Compiling gb.util.web... OK Installing gb.util.web... Compiling gb.form.editor... OK Installing gb.form.editor... Compiling gb.dbus.trayicon... OK Installing gb.dbus.trayicon... Compiling gb.web.form... OK Installing gb.web.form... Compiling gb.form.terminal... OK Installing gb.form.terminal... Compiling gb.term.form... OK Installing gb.term.form... Compiling gb.web.feed... OK Installing gb.web.feed... make[2]: Nothing to be done for 'install-data-am'. make[2]: Leaving directory '/home/gian/gambasdevel/comp' make[1]: Leaving directory '/home/gian/gambasdevel/comp' Making install in app make[1]: Entering directory '/home/gian/gambasdevel/app' make[2]: Entering directory '/home/gian/gambasdevel/app' Installing the development environment... Compiling gambas3... OK Installing gambas3... Compiling gbs3... OK Installing gbs3... Installing the scripter... Registering Gambas script mimetype... Registering Gambas server page mimetype... Installing the Gambas appdata file... Installing the Gambas template projects... make[2]: Nothing to be done for 'install-data-am'. make[2]: Leaving directory '/home/gian/gambasdevel/app' make[1]: Leaving directory '/home/gian/gambasdevel/app' Making install in . make[1]: Entering directory '/home/gian/gambasdevel' make[2]: Entering directory '/home/gian/gambasdevel' || || Unable to compile gb.mysql || make[2]: Nothing to be done for 'install-data-am'. make[2]: Leaving directory '/home/gian/gambasdevel' make[1]: Leaving directory '/home/gian/gambasdevel' Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From gambas.fr at gmail.com Thu Dec 13 23:32:06 2018 From: gambas.fr at gmail.com (Fabien Bodard) Date: Thu, 13 Dec 2018 23:32:06 +0100 Subject: [Gambas-user] variable declaration everywhere ??? In-Reply-To: References: <53cb82fc-c305-b1d2-5a16-44fb9932a667@gmail.com> <6d348a6a-5992-99ee-15ff-990a9650eafe@gmail.com> <45d7d185-6ce9-fe36-1cc3-3bfdf9621329@osnanet.de> Message-ID: Public Sub main() For i As Integer = 0 To 100 Print i Next For Each hClass As Class In Classes Print hClass.Name Next End this not look so bad... just miss the autocompletion then.. Le jeu. 13 d?c. 2018 ? 09:59, Fabien Bodard a ?crit : > > For some long piece of code having to memorize the long list of > declared variable sometime is more harder than reading a var just > declared above. And yes ... only for things like loop or var swaping. > > > But like many things is it matter of language limitation or convention > ? What is the better ... limiting using by constaint or by convention > ? > > Limiting by constraint can make us lose some users (It's the same for > namespace). > Maybe for some case allowing to not use explicit declaration can be > interesting... like for script for exemple. > In this case we can imagine that default can be variant. But this must > be an option in header (NOEXPLICIT). > WIth that gbs can automatiquely add this option in background. -- Fabien Bodard From chrisml at deganius.de Fri Dec 14 00:02:47 2018 From: chrisml at deganius.de (Christof Thalhofer) Date: Fri, 14 Dec 2018 00:02:47 +0100 Subject: [Gambas-user] variable declaration everywhere ??? In-Reply-To: <53cb82fc-c305-b1d2-5a16-44fb9932a667@gmail.com> References: <53cb82fc-c305-b1d2-5a16-44fb9932a667@gmail.com> Message-ID: <9d413697-9385-3d25-6bc2-00953381185f@deganius.de> Am 12.12.18 um 00:16 schrieb Beno?t Minisini: > Because as soon as variables can be declared anywhere, people will start > to use that for writing ugly code. :-) Exactly. I know it because I had a hard work with my own code which was more than ten years old (VBA). If we have to declare variables only at the beginning we tend to write shorter methods which is much easier to understand. Especially if the code is a couple of weeks/months/years old. Since I program in Gambas my methods are smaller. Every time I see that I had to declare many variables at the beginning I feel a kind of shame. Because I know that the number of variables correlates with the incomprehensibility of my own code. Alles Gute Christof Thalhofer -- Dies ist keine Signatur -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From g4mba5 at gmail.com Fri Dec 14 00:51:30 2018 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Fri, 14 Dec 2018 00:51:30 +0100 Subject: [Gambas-user] variable declaration everywhere ??? In-Reply-To: <9d413697-9385-3d25-6bc2-00953381185f@deganius.de> References: <53cb82fc-c305-b1d2-5a16-44fb9932a667@gmail.com> <9d413697-9385-3d25-6bc2-00953381185f@deganius.de> Message-ID: <753309a0-8048-3437-74f3-663d5959d128@gmail.com> Le 14/12/2018 ? 00:02, Christof Thalhofer a ?crit?: > Am 12.12.18 um 00:16 schrieb Beno?t Minisini: > >> Because as soon as variables can be declared anywhere, people will start >> to use that for writing ugly code. :-) > > Exactly. I know it because I had a hard work with my own code which was > more than ten years old (VBA). > > If we have to declare variables only at the beginning we tend to write > shorter methods which is much easier to understand. Especially if the > code is a couple of weeks/months/years old. > > Since I program in Gambas my methods are smaller. Every time I see that > I had to declare many variables at the beginning I feel a kind of shame. > Because I know that the number of variables correlates with the > incomprehensibility of my own code. > > Alles Gute > > Christof Thalhofer > Since last commit: - Local variables can be declared anywhere in the function, but they always have a function scope. - Loop variables can be declared directly in the loop opening syntax. And they too have a function scope. - Loop variables can be redeclared as soon as it keeps its type. Now maybe I could start thinking releasing Gambas 3.12? Or should I remove the possibility of declaring variables anywhere before? -- Beno?t Minisini From chrisml at deganius.de Fri Dec 14 09:56:49 2018 From: chrisml at deganius.de (Christof Thalhofer) Date: Fri, 14 Dec 2018 09:56:49 +0100 Subject: [Gambas-user] variable declaration everywhere ??? In-Reply-To: <753309a0-8048-3437-74f3-663d5959d128@gmail.com> References: <53cb82fc-c305-b1d2-5a16-44fb9932a667@gmail.com> <9d413697-9385-3d25-6bc2-00953381185f@deganius.de> <753309a0-8048-3437-74f3-663d5959d128@gmail.com> Message-ID: <8a2169e7-beb8-9ce8-e9dc-3944ee208922@deganius.de> Am 14.12.18 um 00:51 schrieb Beno?t Minisini: > Or should I remove the possibility of declaring variables anywhere before? I would remove that. Option explicit and the decision to allow the declaration of variables only at top in my eyes are the main advantages of Gambas vs VB(A) concerning cleaner code. Basic seems to be an easy language for beginners, but ? as always ? allows a lot of very ugly code constructions. Because at the end code is always procedural, it can be distributed either over one long method or several different methods. The latter is usually much better, because small functions can be understood and debugged more easily. Also functions can be held stateless and so much more secure. Long method bodies for me are a clear sign for bad code. As I started programming long ago I did not understand the advantages of declaration of variables, and later ? as I understood ? I declared a lot of variables within the body of my methods. As I had to refactor that code mess later I found out that I packed a lot of functionality in loooong methods which were quite hard to understand. As I switched over to Gambas all these things did not work any more as the Gambas compiler complained about declarations within the body of these long methods. I had to refactor (bring all the variables to top) and found out that I did a lot of senseless things with variables: Often I packed content of one variable in a new one just because the name of the first variable did not fit into the current environment (scope) inside a long method. I did this, because I could declare the new variable within the body. I also tended to pack a lot of different functionality in one long method and I also had many headlines in my comments, each of which referred to a new section of the body that contained new functionality and new variables. Long Methods with a lot of functionality inside are bad. Really bad! You will find this out if you want to understand what you have written two weeks later. Or a year later. If variable declaration inside the body would be needed it is much better to think about it a while and then export the functionality to another method. If the declaration is at the top, at first it may be a bit inconvenient, but it will always remind you that it is much better to outsource functionality. And you will, simply because it will be more convenient. So this decision of Gambas leads to better code! I've put a lot of work into a lot of code and the older I get the smaller and clearer my methods become. I'm against making it easier for programmers to create huge functions full of spaghetti. 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 rwe-sse at osnanet.de Fri Dec 14 11:49:10 2018 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Fri, 14 Dec 2018 11:49:10 +0100 Subject: [Gambas-user] variable declaration everywhere ??? In-Reply-To: <8a2169e7-beb8-9ce8-e9dc-3944ee208922@deganius.de> References: <53cb82fc-c305-b1d2-5a16-44fb9932a667@gmail.com> <9d413697-9385-3d25-6bc2-00953381185f@deganius.de> <753309a0-8048-3437-74f3-663d5959d128@gmail.com> <8a2169e7-beb8-9ce8-e9dc-3944ee208922@deganius.de> Message-ID: <72cf364e-cf20-c43b-7560-9d732d83eed1@osnanet.de> Am 14.12.18 um 09:56 schrieb Christof Thalhofer: > Am 14.12.18 um 00:51 schrieb Beno?t Minisini: > >> Or should I remove the possibility of declaring variables anywhere before? > > I would remove that. I would not. At least not if it has to be explicitly declared with its type. > > Option explicit and the decision to allow the declaration of variables > only at top in my eyes are the main advantages of Gambas vs VB(A) > concerning cleaner code. > > Basic seems to be an easy language for beginners, but ? as always ? > allows a lot of very ugly code constructions. That's true - but it's in the programmer's hands. > > Long method bodies for me are a clear sign for bad code. Mostly it can be - sometimes it's not. But basically I agree. > > As I started programming long ago I did not understand the advantages of > declaration of variables, and later ? as I understood ? I declared a lot > of variables within the body of my methods. As I had to refactor that > code mess later I found out that I packed a lot of functionality in > loooong methods which were quite hard to understand. Was the same in my case. As I said, I agree, basically, but > So this decision of Gambas leads to better code! this CAN have the effect you mention, but it doesn't need to. You still can produce ugly code, even in Gambas, even without the possibility to create a variable on the spot. > > I've put a lot of work into a lot of code and the older I get the > smaller and clearer my methods become. I'm against making it easier for > programmers to create huge functions full of spaghetti. If you confine the use of declaring a variable to certain cases, like loops, it's ok. I wouldn't use it, but others might like it. They will find out for themselves that their code becomes unmanageable if they use this too frequently, but it can also become unmanageable through other (bad) habits. A bad programmer will produce bad code, you cannot keep him doing from it just by forbidding some kind of variable declaration. In VB you can declare a variable by just mentioning it within the code. That can be pretty handy if you need a counting variable on the fly but it can as well become tedious. Here we are talking about declaring it with a declaration keyword for the variable type, so a kind of formal declaration is still needed, and someone reading the code can see "this variable was declared at this point". Just my 2 cents... Regards Rolf From bagonergi at gmail.com Fri Dec 14 12:38:33 2018 From: bagonergi at gmail.com (Gianluigi) Date: Fri, 14 Dec 2018 12:38:33 +0100 Subject: [Gambas-user] variable declaration everywhere ??? In-Reply-To: <753309a0-8048-3437-74f3-663d5959d128@gmail.com> References: <53cb82fc-c305-b1d2-5a16-44fb9932a667@gmail.com> <9d413697-9385-3d25-6bc2-00953381185f@deganius.de> <753309a0-8048-3437-74f3-663d5959d128@gmail.com> Message-ID: Il giorno ven 14 dic 2018 alle ore 00:52 Beno?t Minisini ha scritto: > Le 14/12/2018 ? 00:02, Christof Thalhofer a ?crit : > > Am 12.12.18 um 00:16 schrieb Beno?t Minisini: > > > >> Because as soon as variables can be declared anywhere, people will start > >> to use that for writing ugly code. :-) > > > > Exactly. I know it because I had a hard work with my own code which was > > more than ten years old (VBA). > > > > If we have to declare variables only at the beginning we tend to write > > shorter methods which is much easier to understand. Especially if the > > code is a couple of weeks/months/years old. > > > > Since I program in Gambas my methods are smaller. Every time I see that > > I had to declare many variables at the beginning I feel a kind of shame. > > Because I know that the number of variables correlates with the > > incomprehensibility of my own code. > > > > Alles Gute > > > > Christof Thalhofer > > > > Since last commit: > > - Local variables can be declared anywhere in the function, but they > always have a function scope. > > - Loop variables can be declared directly in the loop opening syntax. > And they too have a function scope. > > - Loop variables can be redeclared as soon as it keeps its type. > > Now maybe I could start thinking releasing Gambas 3.12? > > Or should I remove the possibility of declaring variables anywhere before? > > -- > Beno?t Minisini > Hi Benoit, Public Sub Main() For n As Byte = 0 To 9 Dim v As Byte Print v Inc v Print v Print n Next Print "===========================" Dim sStr As String[] = Split("Any phrase of this book", " ") For Each s As String In sStr Print s Next Print "---------------------------" Print n Print v Print s If sStr Then Print "sStr exist" End Would not it be more logical to expect that only sStr existed after the For blocks? Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From adamnt42 at gmail.com Fri Dec 14 13:04:33 2018 From: adamnt42 at gmail.com (Bruce) Date: Fri, 14 Dec 2018 22:34:33 +1030 Subject: [Gambas-user] variable declaration everywhere ??? In-Reply-To: References: <53cb82fc-c305-b1d2-5a16-44fb9932a667@gmail.com> Message-ID: <398965f3-4d22-0268-a9e6-213e6231ab5d@gmail.com> Well, lets just get out of the box here (or outside the nine dots, if you get my idea) On 12/12/18 9:59 am, Jussi Lahtinen wrote: > Aesthetics or practical issue? (BTW, I just picked this as a rational point in the thread.) The only cogent argument that has been presented by the entire brains trust here is that it would be handy, really handy, to be able to "declare indexers for an array loop on the fly". So, here's a couple of (possibly stupid) ideas. 1) For Each do something Next ' No indexer, no garbage, the implied indexer would only have scope inside the loop. 2) Less personally favored but possibly useful: For idx as Integer = -Infinity To Infinity ' or some other bounds that are meaningful. [idx] 'do something Next ' idx survives, but only until it is next proposed as an indexer I mean, just because "some other language" proffers the opportunity to create gibberish code, it doesn't mean that Gambas has to. In fact, further, why not create something new and useful? Anyway, just my thoughts. (Thanks Rolf! You crystalised what I was trying to think about.) best regards Bruce From clhamilto at gmail.com Fri Dec 14 14:25:08 2018 From: clhamilto at gmail.com (Curtis Hamilton) Date: Fri, 14 Dec 2018 08:25:08 -0500 Subject: [Gambas-user] Error in Master Code Message-ID: I encountered an error when compiling the latest master. There seems to be an error on line 34 in gb.db.postgresql/src/main.c. Should be: #include vice #include -Regards From chrisml at deganius.de Fri Dec 14 14:35:15 2018 From: chrisml at deganius.de (Christof Thalhofer) Date: Fri, 14 Dec 2018 14:35:15 +0100 Subject: [Gambas-user] variable declaration everywhere ??? In-Reply-To: <72cf364e-cf20-c43b-7560-9d732d83eed1@osnanet.de> References: <53cb82fc-c305-b1d2-5a16-44fb9932a667@gmail.com> <9d413697-9385-3d25-6bc2-00953381185f@deganius.de> <753309a0-8048-3437-74f3-663d5959d128@gmail.com> <8a2169e7-beb8-9ce8-e9dc-3944ee208922@deganius.de> <72cf364e-cf20-c43b-7560-9d732d83eed1@osnanet.de> Message-ID: Hi Rolf, Am 14.12.18 um 11:49 schrieb Rolf-Werner Eilert: >> Basic seems to be an easy language for beginners, but ? as always ? >> allows a lot of very ugly code constructions. > > That's true - but it's in the programmer's hands. Not really ? if the programmer is a beginner. As I was a beginner I wrote a lot of i = 2 name = "Rolf" ' anywhere and then ... '... lots of code later dim firstname firstname = name '.... Afterwards I had a lot of work with that. Ok, I also had a lot of work with other silly stuff I wrote. But exactly here Gambas helped me a lot showing me bad habits of me as a (young) programmer. >> So this decision of Gambas leads to better code! > > this CAN have the effect you mention, but it doesn't need to. You still > can produce ugly code, even in Gambas, even without the possibility to > create a variable on the spot. For sure there are a lot of other possibilities to create ugly code. But is that really a good argument for creating extra ones? > If you confine the use of declaring a variable to certain cases, like > loops, it's ok. I wouldn't use it, but others might like it. They will > find out for themselves that their code becomes unmanageable if they use > this too frequently, but it can also become unmanageable through other > (bad) habits. A bad programmer will produce bad code, you cannot keep > him doing from it just by forbidding some kind of variable declaration. For example loops ... now: If I see in the declaration of foreign code: Dim i, j, k as Integer This is a warning for me, that the programmer could have done something nasty. Either too much functionality in the code or too deep iteration. It doesn't have to be, but it could be ... But if these declarations are not immediately visible to me but I would have to think about that these informations could be "hidden" in the code I'd find that a pity. Alles Gute Christof Thalhofer -- [x] nail here for new monitor From jussi.lahtinen at gmail.com Fri Dec 14 14:43:15 2018 From: jussi.lahtinen at gmail.com (Jussi Lahtinen) Date: Fri, 14 Dec 2018 15:43:15 +0200 Subject: [Gambas-user] variable declaration everywhere ??? In-Reply-To: <8a2169e7-beb8-9ce8-e9dc-3944ee208922@deganius.de> References: <53cb82fc-c305-b1d2-5a16-44fb9932a667@gmail.com> <9d413697-9385-3d25-6bc2-00953381185f@deganius.de> <753309a0-8048-3437-74f3-663d5959d128@gmail.com> <8a2169e7-beb8-9ce8-e9dc-3944ee208922@deganius.de> Message-ID: I'm quite skeptical about designing language so that it support only good code. In my opinion inclusions / exclusions of features in the language should be based solely on their usefulness, regardless of their role in bad code. Otherwise you end up crippling the language. Just think about it, no goto, restrictions on method length, forced indention / whitespace part of syntax, etc. All very bad decisions, and do they work? No! Just show me one language, which do not have bad code! Language is like any tool, more versatile the better, and the product made with it comes from the skills of the craftsman. Jussi On Fri, Dec 14, 2018 at 10:57 AM Christof Thalhofer wrote: > Am 14.12.18 um 00:51 schrieb Beno?t Minisini: > > > Or should I remove the possibility of declaring variables anywhere > before? > > I would remove that. > > Option explicit and the decision to allow the declaration of variables > only at top in my eyes are the main advantages of Gambas vs VB(A) > concerning cleaner code. > > Basic seems to be an easy language for beginners, but ? as always ? > allows a lot of very ugly code constructions. > > Because at the end code is always procedural, it can be distributed > either over one long method or several different methods. The latter is > usually much better, because small functions can be understood and > debugged more easily. Also functions can be held stateless and so much > more secure. > > Long method bodies for me are a clear sign for bad code. > > As I started programming long ago I did not understand the advantages of > declaration of variables, and later ? as I understood ? I declared a lot > of variables within the body of my methods. As I had to refactor that > code mess later I found out that I packed a lot of functionality in > loooong methods which were quite hard to understand. > > As I switched over to Gambas all these things did not work any more as > the Gambas compiler complained about declarations within the body of > these long methods. I had to refactor (bring all the variables to top) > and found out that I did a lot of senseless things with variables: > > Often I packed content of one variable in a new one just because the > name of the first variable did not fit into the current environment > (scope) inside a long method. I did this, because I could declare the > new variable within the body. > > I also tended to pack a lot of different functionality in one long > method and I also had many headlines in my comments, each of which > referred to a new section of the body that contained new functionality > and new variables. > > Long Methods with a lot of functionality inside are bad. Really bad! You > will find this out if you want to understand what you have written two > weeks later. Or a year later. > > If variable declaration inside the body would be needed it is much > better to think about it a while and then export the functionality to > another method. > > If the declaration is at the top, at first it may be a bit inconvenient, > but it will always remind you that it is much better to outsource > functionality. And you will, simply because it will be more convenient. > > So this decision of Gambas leads to better code! > > I've put a lot of work into a lot of code and the older I get the > smaller and clearer my methods become. I'm against making it easier for > programmers to create huge functions full of spaghetti. > > > Alles Gute > > Christof Thalhofer > > -- > Dies ist keine Signatur > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bagonergi at gmail.com Fri Dec 14 14:51:10 2018 From: bagonergi at gmail.com (Gianluigi) Date: Fri, 14 Dec 2018 14:51:10 +0100 Subject: [Gambas-user] variable declaration everywhere ??? In-Reply-To: References: <53cb82fc-c305-b1d2-5a16-44fb9932a667@gmail.com> <9d413697-9385-3d25-6bc2-00953381185f@deganius.de> <753309a0-8048-3437-74f3-663d5959d128@gmail.com> <8a2169e7-beb8-9ce8-e9dc-3944ee208922@deganius.de> Message-ID: Il giorno ven 14 dic 2018 alle ore 14:44 Jussi Lahtinen < jussi.lahtinen at gmail.com> ha scritto: > > Language is like any tool, more versatile the better, and the product made > with it comes from the skills of the craftsman. > > Jussi > I really like this thought :-) +1 Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From chrisml at deganius.de Fri Dec 14 15:00:13 2018 From: chrisml at deganius.de (Christof Thalhofer) Date: Fri, 14 Dec 2018 15:00:13 +0100 Subject: [Gambas-user] variable declaration everywhere ??? In-Reply-To: References: <53cb82fc-c305-b1d2-5a16-44fb9932a667@gmail.com> <9d413697-9385-3d25-6bc2-00953381185f@deganius.de> <753309a0-8048-3437-74f3-663d5959d128@gmail.com> <8a2169e7-beb8-9ce8-e9dc-3944ee208922@deganius.de> Message-ID: <12d4ac95-bc91-349e-06e0-905650b89faa@deganius.de> Hi Jussi, Am 14.12.18 um 14:43 schrieb Jussi Lahtinen: > I'm quite skeptical about designing language so that it support only > good code. In my opinion inclusions / exclusions of features in the > language should be based solely on their usefulness, > regardless of their role in bad code. Otherwise you end up crippling the > language. Just think about it, no goto, restrictions on method length, > forced indention / whitespace part of syntax, etc. I like Goto very much, if soemone argues against it I always send this: https://lkml.org/lkml/2003/1/12/128 But I also like the decision of Gambas to keep the declarations at the top. Both (can) make the code more clean and readable. There is no crippling of functionality in my mentions. Alles Gute Christof Thalhofer -- [x] nail here for new monitor From charlie at cogier.com Fri Dec 14 14:24:52 2018 From: charlie at cogier.com (Charlie Ogier) Date: Fri, 14 Dec 2018 13:24:52 +0000 Subject: [Gambas-user] variable declaration everywhere ??? In-Reply-To: <398965f3-4d22-0268-a9e6-213e6231ab5d@gmail.com> References: <53cb82fc-c305-b1d2-5a16-44fb9932a667@gmail.com> <398965f3-4d22-0268-a9e6-213e6231ab5d@gmail.com> Message-ID: <18c3b3d9-e90c-0446-a8b7-d40ace7dbd73@cogier.com> Hi All, To satisfy everybody why not have 'Option Explicit'. Personally I think it should stay as it is, I see danger in this. Charlie On 14/12/2018 12:04, Bruce wrote: > Well, lets just get out of the box here (or outside the nine dots, if > you get my idea) > > On 12/12/18 9:59 am, Jussi Lahtinen wrote: >> Aesthetics or practical issue? > > (BTW, I just picked this as a rational point in the thread.) > > The only cogent argument that has been presented by the entire brains > trust here is that it would be handy, really handy, to be able to > "declare indexers for an array loop on the fly". > > So, here's a couple of (possibly stupid) ideas. > > 1) For Each > ???? do something > ?? Next > ? ' No indexer, no garbage, the implied indexer would only have scope > inside the loop. > > 2) Less personally favored but possibly useful: > ? For idx as Integer = -Infinity To Infinity ' or some other bounds > that are meaningful. > ??? [idx] 'do something > ? Next > ? ' idx survives, but only until it is next proposed as an indexer > > I mean, just because "some other language" proffers the opportunity to > create gibberish code, it doesn't mean that Gambas has to.? In fact, > further, why not create something new and useful? > > Anyway, just my thoughts. (Thanks Rolf! You crystalised what I was > trying to think about.) > > best regards > Bruce > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- From bagonergi at gmail.com Fri Dec 14 17:02:02 2018 From: bagonergi at gmail.com (Gianluigi) Date: Fri, 14 Dec 2018 17:02:02 +0100 Subject: [Gambas-user] Trayicon - dbus error In-Reply-To: References: <158ee1bb-2b44-50ee-e421-f835851e5e83@skynet.be> Message-ID: Sorry, I don't know what I saw but Delta works, in the sense that it correctly returns 1 or -1. Before, this code worked well [0], I don't know what Benoit Minisini has changed since then. Regards Gianluigi [0] https://lists.gambas-basic.org/pipermail/user/2018-February/062998.html Il giorno mer 12 dic 2018 alle ore 19:56 Gianluigi ha scritto: > It seems that Delta does not work, always returns one in both directions. > > Regards > Gianluigi > > Il giorno mer 12 dic 2018 alle ore 11:46 Johny Provoost < > johny.provoost at skynet.be> ha scritto: > >> hello, >> >> Strange dbus error - interpreter crash. When using Trayicon and the >> directory has a point in it (exem. the code sits in ~/version1.1 , I get >> a interpreter crash. In a normal directory is works OK. >> >> When you run the programm with use of a terminal emulator, you see the >> dbus error. >> >> [dbus[2160]: arguments to dbus_bus_request_name() were incorrect, >> assertion "_dbus_check_is_valid_bus_name (name)" failed in file >> ../../../dbus/dbus-bus.c line 1122. >> This is normally a bug in some application using the D-Bus library. >> >> D-Bus not built with -rdynamic so unable to print a backtrace] >> >> >> I use Kubuntu 18.04 and gambas 3.11.4 >> >> I didn't file a bug report because I don't know if it's a bug in Gambas >> or in dbus. >> >> -- >> >> ------------------------------------------------------------------------ >> >> *Vriendelijke Groeten* >> >> *Johny Provoost* >> >> *mailto: **johny.provoost at skynet.be* >> >> *mailto: **johny.provoost at gmail.com* >> >> *Website:*http://www.jepe.be or >> http://www.johnyprovoost.net >> >> >> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jussi.lahtinen at gmail.com Fri Dec 14 20:46:27 2018 From: jussi.lahtinen at gmail.com (Jussi Lahtinen) Date: Fri, 14 Dec 2018 21:46:27 +0200 Subject: [Gambas-user] variable declaration everywhere ??? In-Reply-To: <12d4ac95-bc91-349e-06e0-905650b89faa@deganius.de> References: <53cb82fc-c305-b1d2-5a16-44fb9932a667@gmail.com> <9d413697-9385-3d25-6bc2-00953381185f@deganius.de> <753309a0-8048-3437-74f3-663d5959d128@gmail.com> <8a2169e7-beb8-9ce8-e9dc-3944ee208922@deganius.de> <12d4ac95-bc91-349e-06e0-905650b89faa@deganius.de> Message-ID: I must say that I personally don't have use for making the declarations everywhere. But I can well see how it can be used without any problems. Thus I'm not against it. Jussi On Fri, Dec 14, 2018 at 4:01 PM Christof Thalhofer wrote: > Hi Jussi, > > Am 14.12.18 um 14:43 schrieb Jussi Lahtinen: > > I'm quite skeptical about designing language so that it support only > > good code. In my opinion inclusions / exclusions of features in the > > language should be based solely on their usefulness, > > regardless of their role in bad code. Otherwise you end up crippling the > > language. Just think about it, no goto, restrictions on method length, > > forced indention / whitespace part of syntax, etc. > > I like Goto very much, if soemone argues against it I always send this: > https://lkml.org/lkml/2003/1/12/128 > > But I also like the decision of Gambas to keep the declarations at the > top. Both (can) make the code more clean and readable. > > There is no crippling of functionality in my mentions. > > Alles Gute > > Christof Thalhofer > > -- > [x] nail here for new monitor > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From taboege at gmail.com Fri Dec 14 21:24:49 2018 From: taboege at gmail.com (Tobias Boege) Date: Fri, 14 Dec 2018 21:24:49 +0100 Subject: [Gambas-user] variable declaration everywhere ??? In-Reply-To: References: <53cb82fc-c305-b1d2-5a16-44fb9932a667@gmail.com> <9d413697-9385-3d25-6bc2-00953381185f@deganius.de> <753309a0-8048-3437-74f3-663d5959d128@gmail.com> <8a2169e7-beb8-9ce8-e9dc-3944ee208922@deganius.de> <72cf364e-cf20-c43b-7560-9d732d83eed1@osnanet.de> Message-ID: <20181214202449.GD30781@highrise.localdomain> On Fri, 14 Dec 2018, Christof Thalhofer wrote: > Hi Rolf, > > Am 14.12.18 um 11:49 schrieb Rolf-Werner Eilert: > > >> Basic seems to be an easy language for beginners, but ? as always ? > >> allows a lot of very ugly code constructions. > > > > That's true - but it's in the programmer's hands. > > Not really ? if the programmer is a beginner. > So maybe it's time to introduce compiler pragmas to Gambas, to be able to switch between the default "beginner mode" and "expert mode" (caution: voids warranty) where you can declare variables anywhere, even inside method invocations, and where we can finally have self- modifying code. Just kidding. What I actually want to do is ping back to Bug #1361 which proposes what is being discussed here but didn't get any discussion itself. [ Maybe I should have RFC'd it to the mailing list, but this one time I thought it would be more appropriate to submit it as a real feature request to the real bugtracker. ] I don't know if Beno?t is working on that bug specifically (it was Accepted) or was inspired otherwise to implement that now. In case I'm the one indirectly responsible for the discussion (the exact performance of which seems to be a staple among programmers), let me say this: I for one prefer a language which gives me "enough rope to hang myself", but I totally support the best practices advice given in this thread. It's just that sometimes when you work on something inherently ugly in Gambas, like parsing text efficiently, you genuinely want to hang yourself. And it gets worse if the language doesn't let you. If your function is longer and complex, some variables tend to live shortly, are more temporary, than others. The original drive behind Bug #1361 was to be able to declare those variables closer to where they become relevant, instead of making new functions for the tasks these temporaries belong to, and then having to pass all the state shared by these functions as ByRef's (yuck!). [ Yes, I will admit that parsing can often be done in a cleaner way which the JSON module demonstrates: if you turn the parser into a separate module, you get to keep the parser state in class-global variables and the parser rules can be relatively small self-contained functions, each driving the global read head further. But even that module has its fair share of GoSub, for example. ] If you ask me now, I like the compromise that David Sanrom? and Beno?t earlier today somewhat suggested: 1. Loop variables can be declared directly in the loop opening syntax. And they have a function scope. This is a nicely controlled and useful special case of "let's declare variables anywhere". About the function scope: is that just because real nested lexical scopes aren't implemented yet and are not coming? And I guess you occasionally need to refer to a loop variable right after the loop to see how far you got, so you'd get that with the function scope. The pollution of the outer scope is nicely caught by 2. Loop variables can be redeclared as soon as it keeps its type. so I have actually nothing against the function scope. I just felt that the decision wasn't justified loudly enough. I don't think you can make much spaghetti out of these two rules. In addition, concerning Bug #1361: 3. Declaration of local variables can happen at the beginning of every lexical scope. This means that you can't declare variables just anywhere, but only at the beginning of blocks which should usually have a distinct indentation. Example: ' Not OK Dim i As Integer Print i Dim j As Integer = i ^ 2 Print j ' OK Dim i As Integer For j As Integer = 0 To Rand() Dim k As Integer = i ^ 2 + j Print k Next If you have any shame, this might increase the amount you feel of it even more when you do that because "hey, this loop body looks just like a new function of its own!". In my opinion, this forces the code to still look Gambas-y organized while serving the need of declaring variables in multiple places. But to be honest, I won't be sad if this controversial feature is cancelled. Whatever made me write something as demanding as "I want the ability to Dim local variables anywhere in a function" in that bug, I don't remember it anymore. There are plenty other languages to make a merry mess with. ? propos, I think the If and Select Case statements feel left out by all the discussion of *loop* variables. Now, how often did you want to do If (Dim i As Integer = InStr(sStr, sNeedle)) <> 0 Then Mid$(sStr, i, 1)... Endif I do that all the time in other languages, which support it, and my neck is alright still :-) Regards, Tobi PS(A): I missed a good deal of this thread because google decided it was spam, along with some other mails I've been receiving, and liking to receive, for years. If you use gmail, maybe check in and look at what you are missing. -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From chrisml at deganius.de Sat Dec 15 14:07:32 2018 From: chrisml at deganius.de (Christof Thalhofer) Date: Sat, 15 Dec 2018 14:07:32 +0100 Subject: [Gambas-user] variable declaration everywhere ??? In-Reply-To: <20181214202449.GD30781@highrise.localdomain> References: <53cb82fc-c305-b1d2-5a16-44fb9932a667@gmail.com> <9d413697-9385-3d25-6bc2-00953381185f@deganius.de> <753309a0-8048-3437-74f3-663d5959d128@gmail.com> <8a2169e7-beb8-9ce8-e9dc-3944ee208922@deganius.de> <72cf364e-cf20-c43b-7560-9d732d83eed1@osnanet.de> <20181214202449.GD30781@highrise.localdomain> Message-ID: Hi Tobi, my current bed lecture is a German book with the title "Weniger schlecht Programmieren" which translates to "Less Bad Programming". Maybe this is why I am so upset concerning the place of variables. As I switched over from VBA to Gambas the first thing I thought was: "Declaration only at the top? That's a really cool idea!!11!" Ok. I think I am too rigid. After reading again, I think what you mentioned is ok for all who want the rope. But I think I would regulate the usage of variables in an own coding style inhouse. Yes and I would like a compiler switch. Especially if I had to read my own code I want to see the variables at the beginning. And I personally would like to be forced to do like so. One of the main reasons for my own bad coding style was the declaration of variables here and there. I wrote that. If the question is performance vs readability and performance is crucial then readability has to suffer. But here it is not a question of performance. For me it seems to be a question of comfort for the programmer (or better laziness of the programmer) vs comfort for the reader. And for me it also seems to be a question of security. Because code which is shorter and easier to understand mostly is more secure. Ok, so ... now as you told me, "I like the compromise that David Sanrom? and Beno?t suggested" about variable declaration in loops, I agree to that, but then sth like that: > ? propos, I think the If and Select Case statements feel left out by > all the discussion of *loop* variables. Now, how often did you want > to do > > If (Dim i As Integer = InStr(sStr, sNeedle)) <> 0 Then Mid$(sStr, i, > 1)... Endif > > I do that all the time in other languages, which support it, and my > neck is alright still ... should also be possible. But what you wrote about "scope", "pollution" and locality of variables inside a function I think: Variables have to live (r/w) function-wide. No exception. Btw: Gosub, Label and Return define inline functions, that's not bad nor ugly but good for speed. > PS(A): I missed a good deal of this thread because google decided it> was spam, along with some other mails I've been receiving, and liking> to receive, for years. If you use gmail, maybe check in and look at> what you are missing. I don't like Gmail. Maybe you should use a provider which respects your privacy and does not drop mail. In Germany Posteo or mailbox.org seem to be quite good. Hostsharing is also not bad, but only makes sense if you need (very good) webspace. Alles Gute Christof Thalhofer -- Dies ist keine Signatur -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From bagonergi at gmail.com Sat Dec 15 15:21:49 2018 From: bagonergi at gmail.com (Gianluigi) Date: Sat, 15 Dec 2018 15:21:49 +0100 Subject: [Gambas-user] variable declaration everywhere ??? In-Reply-To: References: <53cb82fc-c305-b1d2-5a16-44fb9932a667@gmail.com> <9d413697-9385-3d25-6bc2-00953381185f@deganius.de> <753309a0-8048-3437-74f3-663d5959d128@gmail.com> <8a2169e7-beb8-9ce8-e9dc-3944ee208922@deganius.de> <72cf364e-cf20-c43b-7560-9d732d83eed1@osnanet.de> <20181214202449.GD30781@highrise.localdomain> Message-ID: hi all, I wonder if this my mail will be received by the community or will be discarded as spam, however it is only my humble thought. I have already said this but I would like to repeat it. Why, if I write this code: For n As Byte = 0 To 9 Dim v As Byte ... Next Or: Dim sStr As String[] = Split("Every word of this phrase", " ") For Each s As String In sStr Print s Next n, v and s must also exist outside the For blocks? The only one that should remain is sStr. P.S. (Spam) I had no GMail I had Libero.it I had to change because GMail interpreted my emails as spam. I have occasionally received from more than one of you mail that gmail has put in the spam folder. Lately, the emails of Fabien Bodard. To be able to make Google understand that those mails were lawful I had to mark them as not spam several times. To be sure to receive all the mail, in addition to checking the spam folder also check The User Archives [0] I can not understand how it is possible that those who write me regularly in the mailing list can suddenly become spam without my report. Tobias has complained about the same thing, we should notify who is the victim of this abuse so that he can complain to Google (or other operator) and ask the reason for this behavior. I do not know why I feel like I'm often a victim of it. :-( [0] https://lists.gambas-basic.org/pipermail/user/ Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From taboege at gmail.com Sat Dec 15 15:45:17 2018 From: taboege at gmail.com (Tobias Boege) Date: Sat, 15 Dec 2018 15:45:17 +0100 Subject: [Gambas-user] GMail declination everywhere ??? In-Reply-To: References: <53cb82fc-c305-b1d2-5a16-44fb9932a667@gmail.com> <9d413697-9385-3d25-6bc2-00953381185f@deganius.de> <753309a0-8048-3437-74f3-663d5959d128@gmail.com> <8a2169e7-beb8-9ce8-e9dc-3944ee208922@deganius.de> <72cf364e-cf20-c43b-7560-9d732d83eed1@osnanet.de> <20181214202449.GD30781@highrise.localdomain> Message-ID: <20181215144517.GA8865@highrise.localdomain> On Sat, 15 Dec 2018, Gianluigi wrote: > P.S. (Spam) > I had no GMail I had Libero.it I had to change because GMail interpreted my > emails as spam. > I have occasionally received from more than one of you mail that gmail has > put in the spam folder. > Lately, the emails of Fabien Bodard. > To be able to make Google understand that those mails were lawful I had to > mark them as not spam several times. > To be sure to receive all the mail, in addition to checking the spam folder > also check The User Archives [0] > I can not understand how it is possible that those who write me regularly > in the mailing list can suddenly become spam without my report. > Tobias has complained about the same thing, we should notify who is the > victim of this abuse so that he can complain to Google (or other operator) > and ask the reason for this behavior. > I do not know why I feel like I'm often a victim of it. :-( > FWIW, most of the "spam" messages were yours in my case, also Fabien's, but the above-quoted mail I received normally like many before from you. The real solution (for me) is given by Christof: ditch GMail and look for something "closer to the people". False-positive spam is actually the least of my troubles. Their servers routinely reject me for using "less secure" clients (i.e. not theirs) and changing my IP address, until I prove to them that it's me, using my telephone(!) for example. It is like with many things I (at least) do with computers: there is a certain suboptimal situation but you get used to it in the name of immediate productivity. With a bit of distance though, you realise that it has exaggerated and become completely unacceptable over time. It's just that it is quite an undertaking to phase out one of your email addresses, and one with such a large inbox, too. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From jussi.lahtinen at gmail.com Sat Dec 15 15:55:08 2018 From: jussi.lahtinen at gmail.com (Jussi Lahtinen) Date: Sat, 15 Dec 2018 16:55:08 +0200 Subject: [Gambas-user] variable declaration everywhere ??? In-Reply-To: References: <53cb82fc-c305-b1d2-5a16-44fb9932a667@gmail.com> <9d413697-9385-3d25-6bc2-00953381185f@deganius.de> <753309a0-8048-3437-74f3-663d5959d128@gmail.com> <8a2169e7-beb8-9ce8-e9dc-3944ee208922@deganius.de> <72cf364e-cf20-c43b-7560-9d732d83eed1@osnanet.de> <20181214202449.GD30781@highrise.localdomain> Message-ID: Gmail doesn't put Gambas mails in spam, if you have set own folder for them (via label). I use gmail and I never had any problems. Jussi On Sat, Dec 15, 2018 at 4:23 PM Gianluigi wrote: > hi all, > I wonder if this my mail will be received by the community or will be > discarded as spam, however it is only my humble thought. > I have already said this but I would like to repeat it. > Why, if I write this code: > > For n As Byte = 0 To 9 > Dim v As Byte > ... > Next > > Or: > > Dim sStr As String[] = Split("Every word of this phrase", " ") > For Each s As String In sStr > Print s > Next > > n, v and s must also exist outside the For blocks? > > The only one that should remain is sStr. > > P.S. (Spam) > I had no GMail I had Libero.it I had to change because GMail interpreted > my emails as spam. > I have occasionally received from more than one of you mail that gmail has > put in the spam folder. > Lately, the emails of Fabien Bodard. > To be able to make Google understand that those mails were lawful I had to > mark them as not spam several times. > To be sure to receive all the mail, in addition to checking the spam > folder also check The User Archives [0] > I can not understand how it is possible that those who write me regularly > in the mailing list can suddenly become spam without my report. > Tobias has complained about the same thing, we should notify who is the > victim of this abuse so that he can complain to Google (or other operator) > and ask the reason for this behavior. > I do not know why I feel like I'm often a victim of it. :-( > > [0] https://lists.gambas-basic.org/pipermail/user/ > > Regards > Gianluigi > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jussi.lahtinen at gmail.com Sat Dec 15 15:59:34 2018 From: jussi.lahtinen at gmail.com (Jussi Lahtinen) Date: Sat, 15 Dec 2018 16:59:34 +0200 Subject: [Gambas-user] variable declaration everywhere ??? In-Reply-To: References: <53cb82fc-c305-b1d2-5a16-44fb9932a667@gmail.com> <9d413697-9385-3d25-6bc2-00953381185f@deganius.de> <753309a0-8048-3437-74f3-663d5959d128@gmail.com> <8a2169e7-beb8-9ce8-e9dc-3944ee208922@deganius.de> <72cf364e-cf20-c43b-7560-9d732d83eed1@osnanet.de> <20181214202449.GD30781@highrise.localdomain> Message-ID: Here is my filter rule for people who use gmail: Matches: subject:([Gambas-user]) Do this: Skip Inbox, Apply label "Gambas", Never send it to Spam This way you have own inbox for Gambas mails. Jussi On Sat, Dec 15, 2018 at 4:55 PM Jussi Lahtinen wrote: > Gmail doesn't put Gambas mails in spam, if you have set own folder for > them (via label). I use gmail and I never had any problems. > > > Jussi > > On Sat, Dec 15, 2018 at 4:23 PM Gianluigi wrote: > >> hi all, >> I wonder if this my mail will be received by the community or will be >> discarded as spam, however it is only my humble thought. >> I have already said this but I would like to repeat it. >> Why, if I write this code: >> >> For n As Byte = 0 To 9 >> Dim v As Byte >> ... >> Next >> >> Or: >> >> Dim sStr As String[] = Split("Every word of this phrase", " ") >> For Each s As String In sStr >> Print s >> Next >> >> n, v and s must also exist outside the For blocks? >> >> The only one that should remain is sStr. >> >> P.S. (Spam) >> I had no GMail I had Libero.it I had to change because GMail interpreted >> my emails as spam. >> I have occasionally received from more than one of you mail that gmail >> has put in the spam folder. >> Lately, the emails of Fabien Bodard. >> To be able to make Google understand that those mails were lawful I had >> to mark them as not spam several times. >> To be sure to receive all the mail, in addition to checking the spam >> folder also check The User Archives [0] >> I can not understand how it is possible that those who write me regularly >> in the mailing list can suddenly become spam without my report. >> Tobias has complained about the same thing, we should notify who is the >> victim of this abuse so that he can complain to Google (or other operator) >> and ask the reason for this behavior. >> I do not know why I feel like I'm often a victim of it. :-( >> >> [0] https://lists.gambas-basic.org/pipermail/user/ >> >> Regards >> Gianluigi >> >> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bagonergi at gmail.com Sat Dec 15 16:23:27 2018 From: bagonergi at gmail.com (Gianluigi) Date: Sat, 15 Dec 2018 16:23:27 +0100 Subject: [Gambas-user] GMail declination everywhere ??? In-Reply-To: <20181215144517.GA8865@highrise.localdomain> References: <53cb82fc-c305-b1d2-5a16-44fb9932a667@gmail.com> <9d413697-9385-3d25-6bc2-00953381185f@deganius.de> <753309a0-8048-3437-74f3-663d5959d128@gmail.com> <8a2169e7-beb8-9ce8-e9dc-3944ee208922@deganius.de> <72cf364e-cf20-c43b-7560-9d732d83eed1@osnanet.de> <20181214202449.GD30781@highrise.localdomain> <20181215144517.GA8865@highrise.localdomain> Message-ID: Il giorno sab 15 dic 2018 alle ore 15:43 Tobias Boege ha scritto: > On Sat, 15 Dec 2018, Gianluigi wrote: > > P.S. (Spam) > > I had no GMail I had Libero.it I had to change because GMail interpreted > my > > emails as spam. > > I have occasionally received from more than one of you mail that gmail > has > > put in the spam folder. > > Lately, the emails of Fabien Bodard. > > To be able to make Google understand that those mails were lawful I had > to > > mark them as not spam several times. > > To be sure to receive all the mail, in addition to checking the spam > folder > > also check The User Archives [0] > > I can not understand how it is possible that those who write me regularly > > in the mailing list can suddenly become spam without my report. > > Tobias has complained about the same thing, we should notify who is the > > victim of this abuse so that he can complain to Google (or other > operator) > > and ask the reason for this behavior. > > I do not know why I feel like I'm often a victim of it. :-( > > > > FWIW, most of the "spam" messages were yours in my case, also Fabien's, > but the above-quoted mail I received normally like many before from you. > > The real solution (for me) is given by Christof: ditch GMail and look > for something "closer to the people". False-positive spam is actually > the least of my troubles. Their servers routinely reject me for using > "less secure" clients (i.e. not theirs) and changing my IP address, > until I prove to them that it's me, using my telephone(!) for example. > > It is like with many things I (at least) do with computers: there is > a certain suboptimal situation but you get used to it in the name of > immediate productivity. With a bit of distance though, you realise that > it has exaggerated and become completely unacceptable over time. > > It's just that it is quite an undertaking to phase out one of your email > addresses, and one with such a large inbox, too. > > Regards, > Tobi > > -- > "There's an old saying: Don't change anything... ever!" -- Mr. Monk > Hi Tobias, You're absolutely right, Google is the monster that will devour us. But how can we do without it if we Europeans are incapable? As I said it did not depend on my operator is always gmail that decides for those who use gmail. I was hoping that using it would treat me better and instead ... But it seems that Jussi has a remedy, unfortunately I did not understand how and where to insert the filter. Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From bagonergi at gmail.com Sat Dec 15 16:25:05 2018 From: bagonergi at gmail.com (Gianluigi) Date: Sat, 15 Dec 2018 16:25:05 +0100 Subject: [Gambas-user] variable declaration everywhere ??? In-Reply-To: References: <53cb82fc-c305-b1d2-5a16-44fb9932a667@gmail.com> <9d413697-9385-3d25-6bc2-00953381185f@deganius.de> <753309a0-8048-3437-74f3-663d5959d128@gmail.com> <8a2169e7-beb8-9ce8-e9dc-3944ee208922@deganius.de> <72cf364e-cf20-c43b-7560-9d732d83eed1@osnanet.de> <20181214202449.GD30781@highrise.localdomain> Message-ID: Hi Jussi, have mercy on an old man, please explained better, if possible step by step :-) Regards Gianluigi Il giorno sab 15 dic 2018 alle ore 16:00 Jussi Lahtinen < jussi.lahtinen at gmail.com> ha scritto: > Here is my filter rule for people who use gmail: > > Matches: subject:([Gambas-user]) > Do this: Skip Inbox, Apply label "Gambas", Never send it to Spam > > This way you have own inbox for Gambas mails. > > > Jussi > > On Sat, Dec 15, 2018 at 4:55 PM Jussi Lahtinen > wrote: > >> Gmail doesn't put Gambas mails in spam, if you have set own folder for >> them (via label). I use gmail and I never had any problems. >> >> >> Jussi >> >> On Sat, Dec 15, 2018 at 4:23 PM Gianluigi wrote: >> >>> hi all, >>> I wonder if this my mail will be received by the community or will be >>> discarded as spam, however it is only my humble thought. >>> I have already said this but I would like to repeat it. >>> Why, if I write this code: >>> >>> For n As Byte = 0 To 9 >>> Dim v As Byte >>> ... >>> Next >>> >>> Or: >>> >>> Dim sStr As String[] = Split("Every word of this phrase", " ") >>> For Each s As String In sStr >>> Print s >>> Next >>> >>> n, v and s must also exist outside the For blocks? >>> >>> The only one that should remain is sStr. >>> >>> P.S. (Spam) >>> I had no GMail I had Libero.it I had to change because GMail interpreted >>> my emails as spam. >>> I have occasionally received from more than one of you mail that gmail >>> has put in the spam folder. >>> Lately, the emails of Fabien Bodard. >>> To be able to make Google understand that those mails were lawful I had >>> to mark them as not spam several times. >>> To be sure to receive all the mail, in addition to checking the spam >>> folder also check The User Archives [0] >>> I can not understand how it is possible that those who write me >>> regularly in the mailing list can suddenly become spam without my report. >>> Tobias has complained about the same thing, we should notify who is the >>> victim of this abuse so that he can complain to Google (or other operator) >>> and ask the reason for this behavior. >>> I do not know why I feel like I'm often a victim of it. :-( >>> >>> [0] https://lists.gambas-basic.org/pipermail/user/ >>> >>> Regards >>> Gianluigi >>> >>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- >>> >> > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gambas.fr at gmail.com Sat Dec 15 17:05:34 2018 From: gambas.fr at gmail.com (Fabien Bodard) Date: Sat, 15 Dec 2018 17:05:34 +0100 Subject: [Gambas-user] GMail declination everywhere ??? In-Reply-To: References: <53cb82fc-c305-b1d2-5a16-44fb9932a667@gmail.com> <9d413697-9385-3d25-6bc2-00953381185f@deganius.de> <753309a0-8048-3437-74f3-663d5959d128@gmail.com> <8a2169e7-beb8-9ce8-e9dc-3944ee208922@deganius.de> <72cf364e-cf20-c43b-7560-9d732d83eed1@osnanet.de> <20181214202449.GD30781@highrise.localdomain> <20181215144517.GA8865@highrise.localdomain> Message-ID: just tell one time that my mail is not a spam and it will correct the fact Le sam. 15 d?c. 2018 ? 16:24, Gianluigi a ?crit : > > > > Il giorno sab 15 dic 2018 alle ore 15:43 Tobias Boege ha scritto: >> >> On Sat, 15 Dec 2018, Gianluigi wrote: >> > P.S. (Spam) >> > I had no GMail I had Libero.it I had to change because GMail interpreted my >> > emails as spam. >> > I have occasionally received from more than one of you mail that gmail has >> > put in the spam folder. >> > Lately, the emails of Fabien Bodard. >> > To be able to make Google understand that those mails were lawful I had to >> > mark them as not spam several times. >> > To be sure to receive all the mail, in addition to checking the spam folder >> > also check The User Archives [0] >> > I can not understand how it is possible that those who write me regularly >> > in the mailing list can suddenly become spam without my report. >> > Tobias has complained about the same thing, we should notify who is the >> > victim of this abuse so that he can complain to Google (or other operator) >> > and ask the reason for this behavior. >> > I do not know why I feel like I'm often a victim of it. :-( >> > >> >> FWIW, most of the "spam" messages were yours in my case, also Fabien's, >> but the above-quoted mail I received normally like many before from you. >> >> The real solution (for me) is given by Christof: ditch GMail and look >> for something "closer to the people". False-positive spam is actually >> the least of my troubles. Their servers routinely reject me for using >> "less secure" clients (i.e. not theirs) and changing my IP address, >> until I prove to them that it's me, using my telephone(!) for example. >> >> It is like with many things I (at least) do with computers: there is >> a certain suboptimal situation but you get used to it in the name of >> immediate productivity. With a bit of distance though, you realise that >> it has exaggerated and become completely unacceptable over time. >> >> It's just that it is quite an undertaking to phase out one of your email >> addresses, and one with such a large inbox, too. >> >> Regards, >> Tobi >> >> -- >> "There's an old saying: Don't change anything... ever!" -- Mr. Monk > > > Hi Tobias, > You're absolutely right, Google is the monster that will devour us. > But how can we do without it if we Europeans are incapable? > As I said it did not depend on my operator is always gmail that decides for those who use gmail. > I was hoping that using it would treat me better and instead ... > But it seems that Jussi has a remedy, unfortunately I did not understand how and where to insert the filter. > > Regards > Gianluigi > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- -- Fabien Bodard From t.lee.davidson at gmail.com Sat Dec 15 17:13:42 2018 From: t.lee.davidson at gmail.com (T Lee Davidson) Date: Sat, 15 Dec 2018 11:13:42 -0500 Subject: [Gambas-user] variable declaration everywhere ??? In-Reply-To: References: <53cb82fc-c305-b1d2-5a16-44fb9932a667@gmail.com> <9d413697-9385-3d25-6bc2-00953381185f@deganius.de> <753309a0-8048-3437-74f3-663d5959d128@gmail.com> <8a2169e7-beb8-9ce8-e9dc-3944ee208922@deganius.de> <72cf364e-cf20-c43b-7560-9d732d83eed1@osnanet.de> <20181214202449.GD30781@highrise.localdomain> Message-ID: <4d8bbd4a-1117-6e54-ed00-b1699d672991@gmail.com> Gianluigi, I don't care to have a special inbox for Gambas mails on Gmail. So, here it is step-by-step for how I did it. While logged in to Gmail account: Click the 'gear' ("Settings) icon. Go to the "Filters and Blocked Addresses" tab. Create a new filter. Enter "[Gambas-user]" in the Subject line. Click "Create filter". Check "Never send it to Spam" and Save it. This was just now done, so whether or not it will actually do as I want remains to be seen. ___ Lee On 12/15/18 10:25 AM, Gianluigi wrote: > Hi Jussi, > have mercy on an old man, please explained better, if possible step by step :-) > > Regards > Gianluigi > > Il giorno sab 15 dic 2018 alle ore 16:00 Jussi Lahtinen > ha scritto: > > Here is my filter rule for people who use gmail: > > Matches: subject:([Gambas-user]) > Do this: Skip Inbox, Apply label "Gambas", Never send it to Spam > > This way you have own inbox for Gambas mails. > > > Jussi From bagonergi at gmail.com Sat Dec 15 17:46:09 2018 From: bagonergi at gmail.com (Gianluigi) Date: Sat, 15 Dec 2018 17:46:09 +0100 Subject: [Gambas-user] variable declaration everywhere ??? In-Reply-To: <4d8bbd4a-1117-6e54-ed00-b1699d672991@gmail.com> References: <53cb82fc-c305-b1d2-5a16-44fb9932a667@gmail.com> <9d413697-9385-3d25-6bc2-00953381185f@deganius.de> <753309a0-8048-3437-74f3-663d5959d128@gmail.com> <8a2169e7-beb8-9ce8-e9dc-3944ee208922@deganius.de> <72cf364e-cf20-c43b-7560-9d732d83eed1@osnanet.de> <20181214202449.GD30781@highrise.localdomain> <4d8bbd4a-1117-6e54-ed00-b1699d672991@gmail.com> Message-ID: Hi Lee, I did exactly as you suggested, thank you. Maybe you need to add label: inbox? Maybe Jussi tells us. Regards Gianluigi Il giorno sab 15 dic 2018 alle ore 17:14 T Lee Davidson < t.lee.davidson at gmail.com> ha scritto: > Gianluigi, > > I don't care to have a special inbox for Gambas mails on Gmail. So, here > it is step-by-step for how I did it. > > While logged in to Gmail account: > > Click the 'gear' ("Settings) icon. > Go to the "Filters and Blocked Addresses" tab. > Create a new filter. > Enter "[Gambas-user]" in the Subject line. > Click "Create filter". > Check "Never send it to Spam" and Save it. > > This was just now done, so whether or not it will actually do as I want > remains to be seen. > > > ___ > Lee > > > On 12/15/18 10:25 AM, Gianluigi wrote: > > Hi Jussi, > > have mercy on an old man, please explained better, if possible step by > step :-) > > > > Regards > > Gianluigi > > > > Il giorno sab 15 dic 2018 alle ore 16:00 Jussi Lahtinen < > jussi.lahtinen at gmail.com > ha scritto: > > > > Here is my filter rule for people who use gmail: > > > > Matches: subject:([Gambas-user]) > > Do this: Skip Inbox, Apply label "Gambas", Never send it to Spam > > > > This way you have own inbox for Gambas mails. > > > > > > Jussi > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bagonergi at gmail.com Sat Dec 15 18:12:15 2018 From: bagonergi at gmail.com (Gianluigi) Date: Sat, 15 Dec 2018 18:12:15 +0100 Subject: [Gambas-user] GMail declination everywhere ??? In-Reply-To: References: <53cb82fc-c305-b1d2-5a16-44fb9932a667@gmail.com> <9d413697-9385-3d25-6bc2-00953381185f@deganius.de> <753309a0-8048-3437-74f3-663d5959d128@gmail.com> <8a2169e7-beb8-9ce8-e9dc-3944ee208922@deganius.de> <72cf364e-cf20-c43b-7560-9d732d83eed1@osnanet.de> <20181214202449.GD30781@highrise.localdomain> <20181215144517.GA8865@highrise.localdomain> Message-ID: Hi Fabien, Unfortunately it was not enough for me once. But with the help of Jussi and Lee I hope it is solved forever. :-) Regards Gianluigi Il giorno sab 15 dic 2018 alle ore 17:06 Fabien Bodard ha scritto: > just tell one time that my mail is not a spam and it will correct the fact > > Le sam. 15 d?c. 2018 ? 16:24, Gianluigi a ?crit : > > > > > > > > Il giorno sab 15 dic 2018 alle ore 15:43 Tobias Boege > ha scritto: > >> > >> On Sat, 15 Dec 2018, Gianluigi wrote: > >> > P.S. (Spam) > >> > I had no GMail I had Libero.it I had to change because GMail > interpreted my > >> > emails as spam. > >> > I have occasionally received from more than one of you mail that > gmail has > >> > put in the spam folder. > >> > Lately, the emails of Fabien Bodard. > >> > To be able to make Google understand that those mails were lawful I > had to > >> > mark them as not spam several times. > >> > To be sure to receive all the mail, in addition to checking the spam > folder > >> > also check The User Archives [0] > >> > I can not understand how it is possible that those who write me > regularly > >> > in the mailing list can suddenly become spam without my report. > >> > Tobias has complained about the same thing, we should notify who is > the > >> > victim of this abuse so that he can complain to Google (or other > operator) > >> > and ask the reason for this behavior. > >> > I do not know why I feel like I'm often a victim of it. :-( > >> > > >> > >> FWIW, most of the "spam" messages were yours in my case, also Fabien's, > >> but the above-quoted mail I received normally like many before from you. > >> > >> The real solution (for me) is given by Christof: ditch GMail and look > >> for something "closer to the people". False-positive spam is actually > >> the least of my troubles. Their servers routinely reject me for using > >> "less secure" clients (i.e. not theirs) and changing my IP address, > >> until I prove to them that it's me, using my telephone(!) for example. > >> > >> It is like with many things I (at least) do with computers: there is > >> a certain suboptimal situation but you get used to it in the name of > >> immediate productivity. With a bit of distance though, you realise that > >> it has exaggerated and become completely unacceptable over time. > >> > >> It's just that it is quite an undertaking to phase out one of your email > >> addresses, and one with such a large inbox, too. > >> > >> Regards, > >> Tobi > >> > >> -- > >> "There's an old saying: Don't change anything... ever!" -- Mr. Monk > > > > > > Hi Tobias, > > You're absolutely right, Google is the monster that will devour us. > > But how can we do without it if we Europeans are incapable? > > As I said it did not depend on my operator is always gmail that decides > for those who use gmail. > > I was hoping that using it would treat me better and instead ... > > But it seems that Jussi has a remedy, unfortunately I did not understand > how and where to insert the filter. > > > > Regards > > Gianluigi > > > > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > > > > -- > Fabien Bodard > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jussi.lahtinen at gmail.com Sat Dec 15 20:13:48 2018 From: jussi.lahtinen at gmail.com (Jussi Lahtinen) Date: Sat, 15 Dec 2018 21:13:48 +0200 Subject: [Gambas-user] variable declaration everywhere ??? In-Reply-To: References: <53cb82fc-c305-b1d2-5a16-44fb9932a667@gmail.com> <9d413697-9385-3d25-6bc2-00953381185f@deganius.de> <753309a0-8048-3437-74f3-663d5959d128@gmail.com> <8a2169e7-beb8-9ce8-e9dc-3944ee208922@deganius.de> <72cf364e-cf20-c43b-7560-9d732d83eed1@osnanet.de> <20181214202449.GD30781@highrise.localdomain> <4d8bbd4a-1117-6e54-ed00-b1699d672991@gmail.com> Message-ID: Yeah, Lee got it right. But if you also want own inbox for Gambas mails, then you need to create label "Gambas". You can find it from settings also. Then add to the filter rules "skip inbox" and "apply label 'Gambas'", in addition to what Lee told. Jussi On Sat, Dec 15, 2018 at 6:47 PM Gianluigi wrote: > Hi Lee, > I did exactly as you suggested, thank you. > Maybe you need to add label: inbox? > Maybe Jussi tells us. > > Regards > Gianluigi > > Il giorno sab 15 dic 2018 alle ore 17:14 T Lee Davidson < > t.lee.davidson at gmail.com> ha scritto: > >> Gianluigi, >> >> I don't care to have a special inbox for Gambas mails on Gmail. So, here >> it is step-by-step for how I did it. >> >> While logged in to Gmail account: >> >> Click the 'gear' ("Settings) icon. >> Go to the "Filters and Blocked Addresses" tab. >> Create a new filter. >> Enter "[Gambas-user]" in the Subject line. >> Click "Create filter". >> Check "Never send it to Spam" and Save it. >> >> This was just now done, so whether or not it will actually do as I want >> remains to be seen. >> >> >> ___ >> Lee >> >> >> On 12/15/18 10:25 AM, Gianluigi wrote: >> > Hi Jussi, >> > have mercy on an old man, please explained better, if possible step by >> step :-) >> > >> > Regards >> > Gianluigi >> > >> > Il giorno sab 15 dic 2018 alle ore 16:00 Jussi Lahtinen < >> jussi.lahtinen at gmail.com > ha scritto: >> > >> > Here is my filter rule for people who use gmail: >> > >> > Matches: subject:([Gambas-user]) >> > Do this: Skip Inbox, Apply label "Gambas", Never send it to Spam >> > >> > This way you have own inbox for Gambas mails. >> > >> > >> > Jussi >> >> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- >> > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bagonergi at gmail.com Sat Dec 15 21:56:40 2018 From: bagonergi at gmail.com (Gianluigi) Date: Sat, 15 Dec 2018 21:56:40 +0100 Subject: [Gambas-user] variable declaration everywhere ??? In-Reply-To: References: <53cb82fc-c305-b1d2-5a16-44fb9932a667@gmail.com> <9d413697-9385-3d25-6bc2-00953381185f@deganius.de> <753309a0-8048-3437-74f3-663d5959d128@gmail.com> <8a2169e7-beb8-9ce8-e9dc-3944ee208922@deganius.de> <72cf364e-cf20-c43b-7560-9d732d83eed1@osnanet.de> <20181214202449.GD30781@highrise.localdomain> <4d8bbd4a-1117-6e54-ed00-b1699d672991@gmail.com> Message-ID: Hi Jussi, OK done. Thanks again Regards Gianluigi Il giorno sab 15 dic 2018 alle ore 20:15 Jussi Lahtinen < jussi.lahtinen at gmail.com> ha scritto: > Yeah, Lee got it right. But if you also want own inbox for Gambas mails, > then you need to create label "Gambas". You can find it from settings also. > Then add to the filter rules "skip inbox" and "apply label 'Gambas'", in > addition to what Lee told. > > > Jussi > > On Sat, Dec 15, 2018 at 6:47 PM Gianluigi wrote: > >> Hi Lee, >> I did exactly as you suggested, thank you. >> Maybe you need to add label: inbox? >> Maybe Jussi tells us. >> >> Regards >> Gianluigi >> >> Il giorno sab 15 dic 2018 alle ore 17:14 T Lee Davidson < >> t.lee.davidson at gmail.com> ha scritto: >> >>> Gianluigi, >>> >>> I don't care to have a special inbox for Gambas mails on Gmail. So, here >>> it is step-by-step for how I did it. >>> >>> While logged in to Gmail account: >>> >>> Click the 'gear' ("Settings) icon. >>> Go to the "Filters and Blocked Addresses" tab. >>> Create a new filter. >>> Enter "[Gambas-user]" in the Subject line. >>> Click "Create filter". >>> Check "Never send it to Spam" and Save it. >>> >>> This was just now done, so whether or not it will actually do as I want >>> remains to be seen. >>> >>> >>> ___ >>> Lee >>> >>> >>> On 12/15/18 10:25 AM, Gianluigi wrote: >>> > Hi Jussi, >>> > have mercy on an old man, please explained better, if possible step by >>> step :-) >>> > >>> > Regards >>> > Gianluigi >>> > >>> > Il giorno sab 15 dic 2018 alle ore 16:00 Jussi Lahtinen < >>> jussi.lahtinen at gmail.com > ha scritto: >>> > >>> > Here is my filter rule for people who use gmail: >>> > >>> > Matches: subject:([Gambas-user]) >>> > Do this: Skip Inbox, Apply label "Gambas", Never send it to Spam >>> > >>> > This way you have own inbox for Gambas mails. >>> > >>> > >>> > Jussi >>> >>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- >>> >> >> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- >> > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bagonergi at gmail.com Sun Dec 16 15:16:32 2018 From: bagonergi at gmail.com (Gianluigi) Date: Sun, 16 Dec 2018 15:16:32 +0100 Subject: [Gambas-user] Nothing to be done Message-ID: A curiosity, does anyone know what this means: "make[2]: Nothing to be done for 'install-data-am'" in the Gambas compilation? Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From taboege at gmail.com Sun Dec 16 18:27:01 2018 From: taboege at gmail.com (Tobias Boege) Date: Sun, 16 Dec 2018 18:27:01 +0100 Subject: [Gambas-user] Nothing to be done In-Reply-To: References: Message-ID: <20181216172701.GB8865@highrise.localdomain> On Sun, 16 Dec 2018, Gianluigi wrote: > A curiosity, does anyone know what this means: > "make[2]: Nothing to be done for 'install-data-am'" > in the Gambas compilation? > This message comes from `make`, which is the utility driving Gambas compilation. It takes a Makefile as input which describes *targets* of the build or installation process, together with *rules* for how to reach a target and *dependencies* for each target, which can be other targets. make tries to reach its top target (e.g. a completely compiled Gambas), by, recursively, reaching all the necessary dependenies and then executing the rule to combine the dependencies to the top target. But it does that parsimoniously: if all dependencies of a target are up-to-date (e.g. source code was not modified since the last build), then the target itself must be up-to-date. In that case there is "nothing to be done" for the target. make is proud to tell you that, because it just saved you a potential lot time by computing that no actions are necessary instead of blindly executing them. In your case that target is install-data-am, a target which installs data files (judging by its name). It must have been determined that the files have already been installed before and don't need to be updated -- or there are no data files to insall in the first place. How can that happen? Our Makefiles are not written by hand, but autogenerated from simpler files. It's actually a multi-stage process and quite a mess. The targets produced often contain redundancies[*]. As a result of that, you sometimes get targets which are just empty for some subdirectories. I think there was once an attempt to build Gambas with cmake instead of autoconf and co., which resulted in a fraction of build times if I remember correctly. I don't know if that work was lost -- I don't have a copy of it anymore I think. Maybe it was on a svn branch? Regards, Tobi [*] The -am suffix hints at this target coming from automake, which, to tell you the cold hard truth generates the files that are read by the program (which is also autogenerated, by the way) that generates the final Makefile... used to compile Gambas. See here for a hands-on explanation at a smaller scale than Gambas: http://mij.oltrelinux.com/devel/autoconf-automake/ -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From bagonergi at gmail.com Sun Dec 16 19:54:15 2018 From: bagonergi at gmail.com (Gianluigi) Date: Sun, 16 Dec 2018 19:54:15 +0100 Subject: [Gambas-user] Nothing to be done In-Reply-To: <20181216172701.GB8865@highrise.localdomain> References: <20181216172701.GB8865@highrise.localdomain> Message-ID: Il giorno dom 16 dic 2018 alle ore 18:25 Tobias Boege ha scritto: > On Sun, 16 Dec 2018, Gianluigi wrote: > > A curiosity, does anyone know what this means: > > "make[2]: Nothing to be done for 'install-data-am'" > > in the Gambas compilation? > > > > This message comes from `make`, which is the utility driving Gambas > compilation. It takes a Makefile as input which describes *targets* > of the build or installation process, together with *rules* for how > to reach a target and *dependencies* for each target, which can be > other targets. > > make tries to reach its top target (e.g. a completely compiled Gambas), > by, recursively, reaching all the necessary dependenies and then > executing the rule to combine the dependencies to the top target. > But it does that parsimoniously: if all dependencies of a target are > up-to-date (e.g. source code was not modified since the last build), > then the target itself must be up-to-date. In that case there is > "nothing to be done" for the target. make is proud to tell you that, > because it just saved you a potential lot time by computing that > no actions are necessary instead of blindly executing them. > > In your case that target is install-data-am, a target which installs > data files (judging by its name). It must have been determined that > the files have already been installed before and don't need to be > updated -- or there are no data files to insall in the first place. > > How can that happen? Our Makefiles are not written by hand, but > autogenerated from simpler files. It's actually a multi-stage process > and quite a mess. The targets produced often contain redundancies[*]. > As a result of that, you sometimes get targets which are just empty > for some subdirectories. > > I think there was once an attempt to build Gambas with cmake instead > of autoconf and co., which resulted in a fraction of build times > if I remember correctly. I don't know if that work was lost -- I don't > have a copy of it anymore I think. Maybe it was on a svn branch? > > Regards, > Tobi > > [*] The -am suffix hints at this target coming from automake, > which, to tell you the cold hard truth generates the files that > are read by the program (which is also autogenerated, by the way) > that generates the final Makefile... used to compile Gambas. > See here for a hands-on explanation at a smaller scale than > Gambas: http://mij.oltrelinux.com/devel/autoconf-automake/ > > -- > "There's an old saying: Don't change anything... ever!" -- Mr. Monk > Hi Tobias, as usual for you, a really interesting lesson. As usual for me, a big thank you :-) (Useful and nice hands-on explanation) Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From rwe-sse at osnanet.de Mon Dec 17 08:53:16 2018 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Mon, 17 Dec 2018 08:53:16 +0100 Subject: [Gambas-user] Scripter gives useless error message Message-ID: <9db63934-fb38-b0ff-ee72-cdc41fb370db@osnanet.de> In a little Gambas script which is called with root rights, I got an error message as a mail for root saying that in line 32 error #38 (File already exists) occurred. This is useless, as the script is exactly 32 lines long, with some empty lines at the end. Is there a debug option somehow which would enable for an error message with a precise line? Regards Rolf From rwe-sse at osnanet.de Tue Dec 18 16:56:38 2018 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Tue, 18 Dec 2018 16:56:38 +0100 Subject: [Gambas-user] Landscape printing in PDF goes wrong Message-ID: In one of my programs which ran flawlessly under Suse Leap (KDE and Qt), I have a serious fault of printing functionality under my new Ubuntu Mate. Instead of printing Landscape, it prints Portrait, but landscape-wise on the paper, i. e. upright. If I would print it, it would be ok, but the positions on the sheet are wrong. It looks like being measured for A5 instead of A4. This is Gambas 3.11.4. Have you changed anything in the printing part which would influence measuring positions etc.? Something during the few last versions; on the Suse system I had a bit older version. Or is there something wrong here? drucker = New Printer As "drucker" drucker.Orientation = Printer.Landscape drucker.Paper = Printer.A4 drucker.OutputFile = druckPlanDatei drucker.FullPage = True drucker.Print() ' -> drucker_Begin() Thank you for any input! Regards Rolf From rwe-sse at osnanet.de Wed Dec 19 11:42:10 2018 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Wed, 19 Dec 2018 11:42:10 +0100 Subject: [Gambas-user] Landscape printing in PDF goes wrong In-Reply-To: References: Message-ID: Am 18.12.18 um 16:56 schrieb Rolf-Werner Eilert: > In one of my programs which ran flawlessly under Suse Leap (KDE and Qt), > I have a serious fault of printing functionality under my new Ubuntu Mate. > > Instead of printing Landscape, it prints Portrait, but landscape-wise on > the paper, i. e. upright. If I would print it, it would be ok, but the > positions on the sheet are wrong. It looks like being measured for A5 > instead of A4. > > This is Gambas 3.11.4. Have you changed anything in the printing part > which would influence measuring positions etc.? Something during the few > last versions; on the Suse system I had a bit older version. > > Or is there something wrong here? > > ? drucker = New Printer As "drucker" > > ? drucker.Orientation = Printer.Landscape > ? drucker.Paper = Printer.A4 > > ? drucker.OutputFile = druckPlanDatei > > ? drucker.FullPage = True > > ? drucker.Print() ' -> drucker_Begin() > > Thank you for any input! > > Regards > Rolf > I have to answer myself as I have found a way to work around the wrong measurement. Sizes are ok now, but the print is still not turned by 90? for Landscape. The whole thing is somewhat strange as I use the same code in another program to compute the positions for printing. How do you calculate mm to printing pixels? Regards Rolf From bagonergi at gmail.com Wed Dec 19 15:03:34 2018 From: bagonergi at gmail.com (Gianluigi) Date: Wed, 19 Dec 2018 15:03:34 +0100 Subject: [Gambas-user] Landscape printing in PDF goes wrong In-Reply-To: References: Message-ID: Il giorno mer 19 dic 2018 alle ore 11:43 Rolf-Werner Eilert < rwe-sse at osnanet.de> ha scritto: > Am 18.12.18 um 16:56 schrieb Rolf-Werner Eilert: > > In one of my programs which ran flawlessly under Suse Leap (KDE and Qt), > > I have a serious fault of printing functionality under my new Ubuntu > Mate. > > > > Instead of printing Landscape, it prints Portrait, but landscape-wise on > > the paper, i. e. upright. If I would print it, it would be ok, but the > > positions on the sheet are wrong. It looks like being measured for A5 > > instead of A4. > > > > This is Gambas 3.11.4. Have you changed anything in the printing part > > which would influence measuring positions etc.? Something during the few > > last versions; on the Suse system I had a bit older version. > > > > Or is there something wrong here? > > > > drucker = New Printer As "drucker" > > > > drucker.Orientation = Printer.Landscape > > drucker.Paper = Printer.A4 > > > > drucker.OutputFile = druckPlanDatei > > > > drucker.FullPage = True > > > > drucker.Print() ' -> drucker_Begin() > > > > Thank you for any input! > > > > Regards > > Rolf > > > > > I have to answer myself as I have found a way to work around the wrong > measurement. Sizes are ok now, but the print is still not turned by 90? > for Landscape. > > The whole thing is somewhat strange as I use the same code in another > program to compute the positions for printing. > > How do you calculate mm to printing pixels? > > Regards > Rolf > > Sorry but now I have no time, it's something I had done years ago is in Italian, I hope can help you. Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: PrintTest-0.0.1.tar.gz Type: application/gzip Size: 6099 bytes Desc: not available URL: From chrisml at deganius.de Mon Dec 24 12:02:45 2018 From: chrisml at deganius.de (Christof Thalhofer) Date: Mon, 24 Dec 2018 12:02:45 +0100 Subject: [Gambas-user] Merry Christmas! Message-ID: <8f316769-7a9d-9f54-c785-8141074374f3@deganius.de> Hey boys and girls in the Gambas community, I wish you a merry christmas! :-) Alles Gute Christof Thalhofer -- Dies ist keine Signatur -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From bagonergi at gmail.com Mon Dec 24 13:20:38 2018 From: bagonergi at gmail.com (Gianluigi Gradaschi) Date: Mon, 24 Dec 2018 13:20:38 +0100 Subject: [Gambas-user] Merry Christmas! In-Reply-To: <8f316769-7a9d-9f54-c785-8141074374f3@deganius.de> References: <8f316769-7a9d-9f54-c785-8141074374f3@deganius.de> Message-ID: Il 24/12/18 12:02, Christof Thalhofer ha scritto: > Hey boys and girls in the Gambas community, > > I wish you a merry christmas! > > :-) > > Alles Gute > > Christof Thalhofer > > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > Quite right :-) Merry Christmas and Happy New Year to all Gianluigi From franka at iway.na Mon Dec 24 15:27:33 2018 From: franka at iway.na (franka) Date: Mon, 24 Dec 2018 16:27:33 +0200 Subject: [Gambas-user] Merry Christmas! In-Reply-To: Message-ID: Although you guys are all way above me in Gambas I enjoy reading your emails and trying to understand them. I wish all of you a very joyful Xmas and much happiness and good programming in 2019.Kind regards Frank.? Sent from Samsung tablet. -------- Original message --------From: Gianluigi Gradaschi Date: 24/12/2018 14:20 (GMT+02:00) To: user at lists.gambas-basic.org Subject: Re: [Gambas-user] Merry Christmas! Il 24/12/18 12:02, Christof Thalhofer ha scritto: > Hey boys and girls in the Gambas community, > > I wish you a merry christmas! > > :-) > > Alles Gute > > Christof Thalhofer > > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > Quite right :-) Merry Christmas and Happy New Year to all Gianluigi ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: From g4mba5 at gmail.com Mon Dec 24 18:09:03 2018 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Mon, 24 Dec 2018 18:09:03 +0100 Subject: [Gambas-user] ~o~o~o~ MERRY CHRISTMAS! ~o~o~o~ Message-ID: <83665039-91cd-530d-9edf-855a55bbed0a@gmail.com> To whose who know, To whose who do not know, And especially to whose who forgot, I wish a merry Christmas! P.S. I added a bit of snow in the last commit for the occasion. P.S. #2: I have just fixed a pointer leak bug in observers that was there for a *very* long time. P.S. #3: I will try to release Gambas 3.12 before next year. -- Beno?t Minisini From olivier.cruilles at yahoo.fr Mon Dec 24 20:07:53 2018 From: olivier.cruilles at yahoo.fr (Linus) Date: Mon, 24 Dec 2018 14:07:53 -0500 Subject: [Gambas-user] ~o~o~o~ MERRY CHRISTMAS! ~o~o~o~ In-Reply-To: <83665039-91cd-530d-9edf-855a55bbed0a@gmail.com> References: <83665039-91cd-530d-9edf-855a55bbed0a@gmail.com> Message-ID: <68C80EFF-28CC-433C-84BB-6034F36231AF@yahoo.fr> Merry Christmas and Happy New Year Benoit, And Merry Christmas and Happy New Year to all Gambas users Olivier Cruilles > Le 24 d?c. 2018 ? 12:09, Beno?t Minisini a ?crit : > > To whose who know, > To whose who do not know, > And especially to whose who forgot, > > I wish a merry Christmas! > > P.S. I added a bit of snow in the last commit for the occasion. > > P.S. #2: I have just fixed a pointer leak bug in observers that was there for a *very* long time. > > P.S. #3: I will try to release Gambas 3.12 before next year. > > -- > Beno?t Minisini > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: From karl.reinl at fen-net.de Mon Dec 24 22:36:49 2018 From: karl.reinl at fen-net.de (Karl Reinl) Date: Mon, 24 Dec 2018 22:36:49 +0100 Subject: [Gambas-user] ~o~o~o~ MERRY CHRISTMAS! ~o~o~o~ In-Reply-To: <83665039-91cd-530d-9edf-855a55bbed0a@gmail.com> References: <83665039-91cd-530d-9edf-855a55bbed0a@gmail.com> Message-ID: <1545687409.27304.29.camel@Scenic.local> Am Montag, den 24.12.2018, 18:09 +0100 schrieb Beno?t Minisini: > To whose who know, > To whose who do not know, > And especially to whose who forgot, > > I wish a merry Christmas! > > P.S. I added a bit of snow in the last commit for the occasion. very nice, but don't that harm the shrimp? And I couldn't find the tree! merry christmas > > P.S. #2: I have just fixed a pointer leak bug in observers that was > there for a *very* long time. > > P.S. #3: I will try to release Gambas 3.12 before next year. > -- Amicalement Charlie From matthew.charles.collins.75 at gmail.com Tue Dec 25 00:06:35 2018 From: matthew.charles.collins.75 at gmail.com (Matthew Collins) Date: Mon, 24 Dec 2018 23:06:35 +0000 Subject: [Gambas-user] ~o~o~o~ MERRY CHRISTMAS! ~o~o~o~ In-Reply-To: <1545687409.27304.29.camel@Scenic.local> References: <83665039-91cd-530d-9edf-855a55bbed0a@gmail.com> <1545687409.27304.29.camel@Scenic.local> Message-ID: Dear ?Santa? Beno?t For Christmas I would like: ?Namespaces?. GPIO Component i2c Component Thank You and Merry Christmas and a happy new year!! Matt On Mon, 24 Dec 2018 at 21:52, Karl Reinl wrote: > Am Montag, den 24.12.2018, 18:09 +0100 schrieb Beno?t Minisini: > > To whose who know, > > To whose who do not know, > > And especially to whose who forgot, > > > > I wish a merry Christmas! > > > > P.S. I added a bit of snow in the last commit for the occasion. > > very nice, but don't that harm the shrimp? And I couldn't find the tree! > merry christmas > > > > P.S. #2: I have just fixed a pointer leak bug in observers that was > > there for a *very* long time. > > > > P.S. #3: I will try to release Gambas 3.12 before next year. > > > > > -- > Amicalement > Charlie > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gambas.fr at gmail.com Wed Dec 26 16:10:21 2018 From: gambas.fr at gmail.com (Fabien Bodard) Date: Wed, 26 Dec 2018 16:10:21 +0100 Subject: [Gambas-user] ~o~o~o~ MERRY CHRISTMAS! ~o~o~o~ In-Reply-To: <83665039-91cd-530d-9edf-855a55bbed0a@gmail.com> References: <83665039-91cd-530d-9edf-855a55bbed0a@gmail.com> Message-ID: Le lun. 24 d?c. 2018 18:10, Beno?t Minisini a ?crit : > To whose who know, > To whose who do not know, > And especially to whose who forgot, > > I wish a merry Christmas! > > P.S. I added a bit of snow in the last commit for the occasion. > > P.S. #2: I have just fixed a pointer leak bug in observers that was > there for a *very* long time. > > P.S. #3: I will try to release Gambas 3.12 before next year. > > -- > Beno?t Minisini > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > I'm late but I wish a merry Christmas to all of you... and the best for the next ? > -------------- next part -------------- An HTML attachment was scrubbed... URL: From shordi at gmail.com Wed Dec 26 16:17:27 2018 From: shordi at gmail.com (=?UTF-8?Q?Jorge_Carri=C3=B3n?=) Date: Wed, 26 Dec 2018 16:17:27 +0100 Subject: [Gambas-user] ~o~o~o~ MERRY CHRISTMAS! ~o~o~o~ In-Reply-To: References: <83665039-91cd-530d-9edf-855a55bbed0a@gmail.com> Message-ID: Late for Christmas, but wishing a wonderful year for all gambers in the world. Jorge. El mi?., 26 dic. 2018 16:11, Fabien Bodard escribi?: > > > Le lun. 24 d?c. 2018 18:10, Beno?t Minisini a ?crit : > >> To whose who know, >> To whose who do not know, >> And especially to whose who forgot, >> >> I wish a merry Christmas! >> >> P.S. I added a bit of snow in the last commit for the occasion. >> >> P.S. #2: I have just fixed a pointer leak bug in observers that was >> there for a *very* long time. >> >> P.S. #3: I will try to release Gambas 3.12 before next year. >> >> -- >> Beno?t Minisini >> >> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- >> > > I'm late but I wish a merry Christmas to all of you... and the best for > the next ? > >> > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.lee.davidson at gmail.com Wed Dec 26 22:47:39 2018 From: t.lee.davidson at gmail.com (T Lee Davidson) Date: Wed, 26 Dec 2018 16:47:39 -0500 Subject: [Gambas-user] gb.web.feed not stable yet? Message-ID: <62244d2c-2cb8-5e26-9570-eb0815d7a17d@gmail.com> I am wondering why gb.web.feed is considered to be not yet stable. Are we waiting for anything specific before it is considered stable (other than perhaps its developer to have more free time)? ___ Lee From ilmitekno at gmail.com Fri Dec 28 02:58:56 2018 From: ilmitekno at gmail.com (Zainudin Ahmad) Date: Fri, 28 Dec 2018 08:58:56 +0700 Subject: [Gambas-user] Scripter gives useless error message In-Reply-To: <9db63934-fb38-b0ff-ee72-cdc41fb370db@osnanet.de> References: <9db63934-fb38-b0ff-ee72-cdc41fb370db@osnanet.de> Message-ID: > In a little Gambas script which is called with root rights, I got an > error message as a mail for root saying that in line 32 error #38 (File > already exists) occurred. > Before quit from application you can remove cache file before , not sure this will work for you (I have this code in my script) : Public Sub Main() ... ResetCache End Private Sub ResetCache() Dim sBinFile As String sBinFile = Application.Path &/ Application.Name If Exist(sBinFile) Then Kill sBinFile End -------------- next part -------------- An HTML attachment was scrubbed... URL: From g4mba5 at gmail.com Sat Dec 29 11:53:20 2018 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Sat, 29 Dec 2018 11:53:20 +0100 Subject: [Gambas-user] Release of Gambas 3.12.0 Message-ID: <963710ac-7e89-c1c4-7d37-b27872e9f70c@gmail.com> Hi, Here is a new version of Gambas for the new year. The main feature of this release is the new Just-In-Time compiler, that replaces the old one based on a deprecated version of LLVM. For the detailed changelog, look at http://gambaswiki.org/wiki/doc/release/3.12.0. And download the source archive at https://gitlab.com/gambas/gambas/-/archive/3.12.0/gambas-3.12.0.tar.bz2. Enjoy it! -- Beno?t Minisini From gambas.fr at gmail.com Sat Dec 29 12:09:12 2018 From: gambas.fr at gmail.com (Fabien Bodard) Date: Sat, 29 Dec 2018 12:09:12 +0100 Subject: [Gambas-user] Release of Gambas 3.12.0 In-Reply-To: <963710ac-7e89-c1c4-7d37-b27872e9f70c@gmail.com> References: <963710ac-7e89-c1c4-7d37-b27872e9f70c@gmail.com> Message-ID: Thank you :-) Le sam. 29 d?c. 2018 ? 11:54, Beno?t Minisini a ?crit : > > Hi, > > Here is a new version of Gambas for the new year. > > The main feature of this release is the new Just-In-Time compiler, that > replaces the old one based on a deprecated version of LLVM. > > For the detailed changelog, look at > http://gambaswiki.org/wiki/doc/release/3.12.0. > > And download the source archive at > https://gitlab.com/gambas/gambas/-/archive/3.12.0/gambas-3.12.0.tar.bz2. > > Enjoy it! > > -- > Beno?t Minisini > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- -- Fabien Bodard From shordi at gmail.com Sun Dec 30 10:31:23 2018 From: shordi at gmail.com (=?UTF-8?Q?Jorge_Carri=C3=B3n?=) Date: Sun, 30 Dec 2018 10:31:23 +0100 Subject: [Gambas-user] Release of Gambas 3.12.0 In-Reply-To: References: <963710ac-7e89-c1c4-7d37-b27872e9f70c@gmail.com> Message-ID: Fine! Like always. Good work. Thank You El s?b., 29 dic. 2018 a las 12:10, Fabien Bodard () escribi?: > Thank you :-) > > Le sam. 29 d?c. 2018 ? 11:54, Beno?t Minisini a ?crit : > > > > Hi, > > > > Here is a new version of Gambas for the new year. > > > > The main feature of this release is the new Just-In-Time compiler, that > > replaces the old one based on a deprecated version of LLVM. > > > > For the detailed changelog, look at > > http://gambaswiki.org/wiki/doc/release/3.12.0. > > > > And download the source archive at > > https://gitlab.com/gambas/gambas/-/archive/3.12.0/gambas-3.12.0.tar.bz2. > > > > Enjoy it! > > > > -- > > Beno?t Minisini > > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > > > > -- > Fabien Bodard > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From chrisml at deganius.de Sun Dec 30 15:33:50 2018 From: chrisml at deganius.de (Christof Thalhofer) Date: Sun, 30 Dec 2018 15:33:50 +0100 Subject: [Gambas-user] Release of Gambas 3.12.0 In-Reply-To: <963710ac-7e89-c1c4-7d37-b27872e9f70c@gmail.com> References: <963710ac-7e89-c1c4-7d37-b27872e9f70c@gmail.com> Message-ID: <7b88abde-d087-2c3c-2a01-7f88206ed06a@deganius.de> Am 29.12.18 um 11:53 schrieb Beno?t Minisini: > Here is a new version of Gambas for the new year. Thank you! Alles Gute Christof Thalhofer -- Dies ist keine Signatur -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From charlie at cogier.com Mon Dec 31 11:33:51 2018 From: charlie at cogier.com (Charlie Ogier) Date: Mon, 31 Dec 2018 10:33:51 +0000 Subject: [Gambas-user] Mint 17 ppa update problem Message-ID: <1546252431.10389.5.camel@jtg> Hi, I did a standard update and Gambas 3.12.0 was one of them and Gambas is now not usable. This is on Mint 17 (Ubuntu 14:04). I did an 'sudo apt-get -f install' to try and fix the broken packages that occurred and I got the response below. Nothing I have tried fixes it. Any help appreciated. Charlie jtg at jtg ~ $ sudo apt-get -f install [sudo] password for jtg: Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following package was automatically installed and is no longer required: gambas3-gb-jit Use 'apt-get autoremove' to remove it. The following extra packages will be installed: gambas3-runtime The following packages will be upgraded: gambas3-runtime 1 to upgrade, 0 to newly install, 0 to remove and 35 not to upgrade. 45 not fully installed or removed. Need to get 0 B/387 kB of archives. After this operation, 284 kB of additional disk space will be used. Do you want to continue? [Y/n] y (Reading database ... 208461 files and directories currently installed.) Preparing to unpack .../gambas3-runtime_3.12.0+git6007.ad70c7e +build2.42a62c5.7.f3e2526~ubuntu14.04.1_amd64.deb ... Unpacking gambas3-runtime (3.12.0+git6007.ad70c7e +build2.42a62c5.7.f3e2526~ubuntu14.04.1) over (3.11.4+git6006.c199130 +build1.023b398.5.93b81c7~ubuntu14.04.1) ... dpkg: error processing archive /var/cache/apt/archives/gambas3-runtime_3.12.0+git6007.ad70c7e +build2.42a62c5.7.f3e2526~ubuntu14.04.1_amd64.deb (--unpack): trying to overwrite '/usr/share/gambas3/info/gb.jit.info', which is also in package gambas3-gb-jit 3.11.4+git6006.c199130 +build1.023b398.5.93b81c7~ubuntu14.04.1 dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) Processing triggers for man-db (2.6.7.1-1ubuntu1) ... Errors were encountered while processing: /var/cache/apt/archives/gambas3-runtime_3.12.0+git6007.ad70c7e +build2.42a62c5.7.f3e2526~ubuntu14.04.1_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1) jtg at jtg ~ $ From sebikul at gmail.com Mon Dec 31 16:00:46 2018 From: sebikul at gmail.com (=?UTF-8?Q?Sebasti=C3=A1n_Kulesz?=) Date: Mon, 31 Dec 2018 12:00:46 -0300 Subject: [Gambas-user] Mint 17 ppa update problem In-Reply-To: <1546252431.10389.5.camel@jtg> References: <1546252431.10389.5.camel@jtg> Message-ID: Hi! Thanks for letting me know of the issue. It is a conflict for those upgrading that used the old gb.jit component. A new build is being deployed which should request you to remove the old component before updating the Gambas Runtime (which now includes it) Please update your repositories in a few hours, and try to run the upgrade again. If any new issues arise please let me know. Regards, Sebastian On Mon, Dec 31, 2018 at 8:22 AM Charlie Ogier wrote: > Hi, > > I did a standard update and Gambas 3.12.0 was one of them and Gambas is > now not usable. This is on Mint 17 (Ubuntu 14:04). > > I did an 'sudo apt-get -f install' to try and fix the broken packages > that occurred and I got the response below. Nothing I have tried fixes > it. Any help appreciated. > > Charlie > > jtg at jtg ~ $ sudo apt-get -f install > [sudo] password for jtg: > Reading package lists... Done > Building dependency tree > Reading state information... Done > Correcting dependencies... Done > The following package was automatically installed and is no longer > required: > gambas3-gb-jit > Use 'apt-get autoremove' to remove it. > The following extra packages will be installed: > gambas3-runtime > The following packages will be upgraded: > gambas3-runtime > 1 to upgrade, 0 to newly install, 0 to remove and 35 not to upgrade. > 45 not fully installed or removed. > Need to get 0 B/387 kB of archives. > After this operation, 284 kB of additional disk space will be used. > Do you want to continue? [Y/n] y > (Reading database ... 208461 files and directories currently installed.) > Preparing to unpack .../gambas3-runtime_3.12.0+git6007.ad70c7e > +build2.42a62c5.7.f3e2526~ubuntu14.04.1_amd64.deb ... > Unpacking gambas3-runtime (3.12.0+git6007.ad70c7e > +build2.42a62c5.7.f3e2526~ubuntu14.04.1) over (3.11.4+git6006.c199130 > +build1.023b398.5.93b81c7~ubuntu14.04.1) ... > dpkg: error processing > archive /var/cache/apt/archives/gambas3-runtime_3.12.0+git6007.ad70c7e > +build2.42a62c5.7.f3e2526~ubuntu14.04.1_amd64.deb (--unpack): > trying to overwrite '/usr/share/gambas3/info/gb.jit.info', which is > also in package gambas3-gb-jit 3.11.4+git6006.c199130 > +build1.023b398.5.93b81c7~ubuntu14.04.1 > dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) > Processing triggers for man-db (2.6.7.1-1ubuntu1) ... > Errors were encountered while processing: > /var/cache/apt/archives/gambas3-runtime_3.12.0+git6007.ad70c7e > +build2.42a62c5.7.f3e2526~ubuntu14.04.1_amd64.deb > E: Sub-process /usr/bin/dpkg returned an error code (1) > jtg at jtg ~ $ > > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From g4mba5 at gmail.com Mon Dec 31 16:07:08 2018 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Mon, 31 Dec 2018 16:07:08 +0100 Subject: [Gambas-user] Publishing an article about Gambas Message-ID: Hi, Do people know good english Linux / free software news site where I can freely publish an article about the release of Gambas ? Thanks in advance for your suggestions! -- Beno?t Minisini From sebikul at gmail.com Mon Dec 31 16:16:36 2018 From: sebikul at gmail.com (=?UTF-8?Q?Sebasti=C3=A1n_Kulesz?=) Date: Mon, 31 Dec 2018 12:16:36 -0300 Subject: [Gambas-user] Publishing an article about Gambas In-Reply-To: References: Message-ID: Try contacting lwn.net and phoronix.com. Two of the best news sources about linux and OS software. On Mon, Dec 31, 2018 at 12:08 PM Beno?t Minisini wrote: > Hi, > > Do people know good english Linux / free software news site where I can > freely publish an article about the release of Gambas ? > > Thanks in advance for your suggestions! > > -- > Beno?t Minisini > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From charlie at cogier.com Mon Dec 31 18:21:38 2018 From: charlie at cogier.com (Charlie Ogier) Date: Mon, 31 Dec 2018 17:21:38 +0000 Subject: [Gambas-user] Publishing an article about Gambas In-Reply-To: References: Message-ID: <389cefe9-e01f-93a8-6a88-d87ac8801975@cogier.com> Hi Beno?t, I get most of my news from LXER. You can add a story here http://lxer.com/module/newswire/stories/ I have never done this so I am not sure of the procedure but I see you will need to create an account. If you let me have a copy I will publish it on Gambas.one if that helps. Charlie. On 31/12/2018 15:07, Beno?t Minisini wrote: > Hi, > > Do people know good english Linux / free software news site where I > can freely publish an article about the release of Gambas ? > > Thanks in advance for your suggestions! > -------------- next part -------------- An HTML attachment was scrubbed... URL: From charlie at cogier.com Mon Dec 31 18:07:56 2018 From: charlie at cogier.com (Charlie Ogier) Date: Mon, 31 Dec 2018 17:07:56 +0000 Subject: [Gambas-user] Mint 17 ppa update problem In-Reply-To: References: <1546252431.10389.5.camel@jtg> Message-ID: Hi Sebastian, Thanks for this. I wont be at work until Wednesday now so I will check it out then. Happy New Year! Charlie On 31/12/2018 15:00, Sebasti?n Kulesz wrote: > Hi! > > Thanks for letting me know of the issue. It is a conflict for those > upgrading that used the old gb.jit component. A new build is being > deployed which should request you to remove the old component before > updating the Gambas Runtime (which now includes it) > > Please update your repositories in a few hours, and try to run the > upgrade again. If any new issues arise please let me know. > > Regards, > Sebastian > > On Mon, Dec 31, 2018 at 8:22 AM Charlie Ogier > wrote: > > Hi, > > I did a standard update and Gambas 3.12.0 was one of them and > Gambas is > now not usable. This is on Mint 17 (Ubuntu 14:04). > > I did an 'sudo apt-get -f install' to try and fix the broken packages > that occurred and I got the response below. Nothing I have tried fixes > it. Any help appreciated. > > Charlie > > jtg at jtg ~ $ sudo apt-get -f install > [sudo] password for jtg: > Reading package lists... Done > Building dependency tree > Reading state information... Done > Correcting dependencies... Done > The following package was automatically installed and is no longer > required: > ? gambas3-gb-jit > Use 'apt-get autoremove' to remove it. > The following extra packages will be installed: > ? gambas3-runtime > The following packages will be upgraded: > ? gambas3-runtime > 1 to upgrade, 0 to newly install, 0 to remove and 35 not to upgrade. > 45 not fully installed or removed. > Need to get 0 B/387 kB of archives. > After this operation, 284 kB of additional disk space will be used. > Do you want to continue? [Y/n] y > (Reading database ... 208461 files and directories currently > installed.) > Preparing to unpack .../gambas3-runtime_3.12.0+git6007.ad70c7e > +build2.42a62c5.7.f3e2526~ubuntu14.04.1_amd64.deb ... > Unpacking gambas3-runtime (3.12.0+git6007.ad70c7e > +build2.42a62c5.7.f3e2526~ubuntu14.04.1) over (3.11.4+git6006.c199130 > +build1.023b398.5.93b81c7~ubuntu14.04.1) ... > dpkg: error processing > archive /var/cache/apt/archives/gambas3-runtime_3.12.0+git6007.ad70c7e > +build2.42a62c5.7.f3e2526~ubuntu14.04.1_amd64.deb (--unpack): > ?trying to overwrite '/usr/share/gambas3/info/gb.jit.info > ', which is > also in package gambas3-gb-jit 3.11.4+git6006.c199130 > +build1.023b398.5.93b81c7~ubuntu14.04.1 > dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) > Processing triggers for man-db (2.6.7.1-1ubuntu1) ... > Errors were encountered while processing: > ?/var/cache/apt/archives/gambas3-runtime_3.12.0+git6007.ad70c7e > +build2.42a62c5.7.f3e2526~ubuntu14.04.1_amd64.deb > E: Sub-process /usr/bin/dpkg returned an error code (1) > jtg at jtg ~ $ > > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net > ]---- > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.lee.davidson at gmail.com Mon Dec 31 20:59:50 2018 From: t.lee.davidson at gmail.com (T Lee Davidson) Date: Mon, 31 Dec 2018 14:59:50 -0500 Subject: [Gambas-user] Publishing an article about Gambas In-Reply-To: References: Message-ID: <5bf918e0-7e9b-3ac7-9b33-723192b89fb3@gmail.com> On 12/31/18 10:07 AM, Beno?t Minisini wrote: > Hi, > > Do people know good english Linux / free software news site where I can freely publish an article about the release of Gambas ? > > Thanks in advance for your suggestions! > I'm not sure exactly what you mean by, "freely publish". I would imagine you would likely have to submit your article as a guest post. If your main focus is exposure, here is the Alexa global rank of sites already mentioned, plus one more: lxer.com - 448150 lwn.net - 49473 phoronix.com - 38985 tecmint.com - 6031 In the vein of public awareness, I thought it would be helpful if Gambas had a mention on Wikipedia. I discovered that there already is a nice article on Gambas there. That page references articles from: fosswire.com pclosmag.com osnews.com linuxpromagazine.com awce.com Of course some of the articles are rather dated. And, BTW, some of the references still link to gambasdoc.org. ___ Lee From t.lee.davidson at gmail.com Mon Dec 31 23:08:48 2018 From: t.lee.davidson at gmail.com (T Lee Davidson) Date: Mon, 31 Dec 2018 17:08:48 -0500 Subject: [Gambas-user] Publishing an article about Gambas In-Reply-To: <5bf918e0-7e9b-3ac7-9b33-723192b89fb3@gmail.com> References: <5bf918e0-7e9b-3ac7-9b33-723192b89fb3@gmail.com> Message-ID: <21f228dc-95b0-e345-fb15-78fbc93027a5@gmail.com> I ran across another FOSS site. It has Alexa global rank of 11,412 and invites guest posts. https://itsfoss.com/contact-us ___ Lee