From zachsmith022 at ...626... Sat May 1 00:52:12 2010 From: zachsmith022 at ...626... (Zach Smith) Date: Fri, 30 Apr 2010 17:52:12 -0500 Subject: [Gambas-user] User-defined format characters for dates (AM/PM) Message-ID: Is there any way to use the format command to get "05:32 PM"? Format (Now, "hh:nn") gives me the 24 hour format: 17:32 From gambas at ...1... Sat May 1 01:04:27 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sat, 1 May 2010 01:04:27 +0200 Subject: [Gambas-user] User-defined format characters for dates (AM/PM) In-Reply-To: References: Message-ID: <201005010104.27594.gambas@...1...> > Is there any way to use the format command to get "05:32 PM"? > > Format (Now, "hh:nn") gives me the 24 hour format: 17:32 > Format(Now, "hh:nn AM/PM") will give you what you want, provided that your current language use AM/PM notation. Regards, -- Beno?t Minisini From zachsmith022 at ...626... Sat May 1 17:20:04 2010 From: zachsmith022 at ...626... (Zach Smith) Date: Sat, 1 May 2010 10:20:04 -0500 Subject: [Gambas-user] User-defined format characters for dates (AM/PM) In-Reply-To: <201005010104.27594.gambas@...1...> References: <201005010104.27594.gambas@...1...> Message-ID: 2010/4/30 Beno?t Minisini : >> Is there any way to use the format command to get "05:32 PM"? >> >> Format (Now, "hh:nn") gives me the 24 hour format: ?17:32 >> > > Format(Now, "hh:nn AM/PM") will give you what you want, provided that your > current language use AM/PM notation. > Thanks Beno?t. I didn't see that in the documentation. Should it be mentioned here: http://gambasdoc.org/help/lang/format - that was where I looked first. From prog at ...2177... Sun May 2 00:12:31 2010 From: prog at ...2177... (craf) Date: Sat, 01 May 2010 18:12:31 -0400 Subject: [Gambas-user] Cannot load class 'Balloon' In-Reply-To: References: <28375384.post@...1379...> <28379147.post@...1379...> Message-ID: <1272751951.1993.0.camel@...2406...> Hi. To me it gives me the error: ERROR: #2: Cannot load class 'Balloon': Unable to load class file I compiled Gambas3 on Kubuntu 9.10 without error messages. What could be the cause?. Regards -----Mensaje original----- De: Fabien Bodard Reply-to: mailing list for gambas users Para: mailing list for gambas users Asunto: Re: [Gambas-user] Cannot load class 'Balloon' Fecha: Tue, 27 Apr 2010 18:59:31 +0200 >odd? >why ? 2010/4/27 charlesg : > > Fabien > > Thank you for that. Gambas 3 used to compile on Ubuntu 10.04 (lucid) using > the list of dependencies for 9.10 (Karmic) in the Gambas installation pages. > It now also needs intltool (or part of it?) as in sudo apt-get install > intltool. > > Gambas 3 now runs but looks odd. I am way out of my comfort zone. :confused: > > rgds > -- > View this message in context: http://old.nabble.com/Cannot-load-class-%27Balloon%27-tp28375384p28379147.html > Sent from the gambas-user mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > ------------------------------------------------------------------------------ _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From gambas at ...1... Sun May 2 16:21:48 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sun, 2 May 2010 16:21:48 +0200 Subject: [Gambas-user] User-defined format characters for dates (AM/PM) In-Reply-To: References: <201005010104.27594.gambas@...1...> Message-ID: <201005021621.48725.gambas@...1...> > 2010/4/30 Beno?t Minisini : > >> Is there any way to use the format command to get "05:32 PM"? > >> > >> Format (Now, "hh:nn") gives me the 24 hour format: 17:32 > > > > Format(Now, "hh:nn AM/PM") will give you what you want, provided that > > your current language use AM/PM notation. > > Thanks Beno?t. I didn't see that in the documentation. Should it be > mentioned here: http://gambasdoc.org/help/lang/format - that was where > I looked first. > Indeed. It should be fixed now. -- Beno?t Minisini From ea7dfh at ...2382... Mon May 3 11:04:58 2010 From: ea7dfh at ...2382... (EA7DFH) Date: Mon, 03 May 2010 11:04:58 +0200 Subject: [Gambas-user] Cannot load class 'Balloon' In-Reply-To: References: <28375384.post@...1379...> <4BD85AF5.6030803@...626...> <28391396.post@...1379...> <4BD86D30.8070209@...626...> Message-ID: <4BDE91BA.7010700@...2382...> Fabien Bodard escribi?: > on ubuntu 10.04 work fine for me too > > have you tryed to remove the all the svn and start from scratch ? > > 2010/4/28 Matteo Pasotti : > >> Il 28/04/2010 19:04, charlesg ha scritto: >> >>> Hi >>> >>> I fixed the balloon error by loading Ubuntu package intltool (don't know the >>> Arch equivalent). Now it loads but still does not run so there must be other >>> unsatisfied dependencies. Somebody on the Ubuntu forum has got it working >>> (Gambas 2.99 on ub10.04 64bit) but has not spilled the beans yet. >>> >>> rgds >>> >>> I got the same error in Ubuntu 9.10. No warnings during the whole proccess of reconf, conf , make; of course, with clean SVN each time. I agree with Mateo, could it be dependencies related? Regards, Jesus jesus at ...2151...:~$ gambas3 ERROR: #2: Cannot load class 'Balloon': Unable to load class file [OperatingSystem] OperatingSystem=Linux KernelRelease=2.6.31-20-generic-pae DistributionVendor=ubuntu DistributionRelease="Ubuntu 9.10" [System] CPUArchitecture=i686 TotalRam=4118776 kB [Gambas] Gambas1=Not Installed Gambas2=2.20.2 Gambas2Path=/usr/local/bin/gbx2 Gambas3=2.99.0 Gambas3Path=/usr/local/bin/gbx3 From gambas at ...1... Mon May 3 11:08:50 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 3 May 2010 11:08:50 +0200 Subject: [Gambas-user] Cannot load class 'Balloon' In-Reply-To: <4BDE91BA.7010700@...2382...> References: <28375384.post@...1379...> <4BDE91BA.7010700@...2382...> Message-ID: <201005031108.50555.gambas@...1...> > Fabien Bodard escribi?: > > on ubuntu 10.04 work fine for me too > > > > have you tryed to remove the all the svn and start from scratch ? > > > > 2010/4/28 Matteo Pasotti : > >> Il 28/04/2010 19:04, charlesg ha scritto: > >>> Hi > >>> > >>> I fixed the balloon error by loading Ubuntu package intltool (don't > >>> know the Arch equivalent). Now it loads but still does not run so > >>> there must be other unsatisfied dependencies. Somebody on the Ubuntu > >>> forum has got it working (Gambas 2.99 on ub10.04 64bit) but has not > >>> spilled the beans yet. > >>> > >>> rgds > > I got the same error in Ubuntu 9.10. No warnings during the whole > proccess of reconf, conf , make; of course, with clean SVN each time. > I agree with Mateo, could it be dependencies related? > > Regards, > Jesus > As usual, please provide the full output of the configuration, compilation and installation process, otherwise I can't guess what happens. Regards, -- Beno?t Minisini From ea7dfh at ...2382... Mon May 3 11:57:09 2010 From: ea7dfh at ...2382... (EA7DFH) Date: Mon, 03 May 2010 11:57:09 +0200 Subject: [Gambas-user] Cannot load class 'Balloon' In-Reply-To: <201005031108.50555.gambas@...1...> References: <28375384.post@...1379...> <4BDE91BA.7010700@...2382...> <201005031108.50555.gambas@...1...> Message-ID: <4BDE9DF5.4040900@...2382...> Beno?t Minisini escribi?: >> Fabien Bodard escribi?: >>> on ubuntu 10.04 work fine for me too >>> >>> have you tryed to remove the all the svn and start from scratch ? >>> >>> 2010/4/28 Matteo Pasotti : >>>> Il 28/04/2010 19:04, charlesg ha scritto: >>>>> Hi >>>>> >>>>> I fixed the balloon error by loading Ubuntu package intltool (don't >>>>> know the Arch equivalent). Now it loads but still does not run so >>>>> there must be other unsatisfied dependencies. Somebody on the Ubuntu >>>>> forum has got it working (Gambas 2.99 on ub10.04 64bit) but has not >>>>> spilled the beans yet. >>>>> >>>>> rgds >> I got the same error in Ubuntu 9.10. No warnings during the whole >> proccess of reconf, conf , make; of course, with clean SVN each time. >> I agree with Mateo, could it be dependencies related? >> >> Regards, >> Jesus >> > > As usual, please provide the full output of the configuration, compilation and > installation process, otherwise I can't guess what happens. > > Regards, > Here there are. Also included a custom bash script I made to automate this task. Regards, Jesus -------------- next part -------------- A non-text attachment was scrubbed... Name: rcmi_gambas3.tar.gz Type: application/x-gzip Size: 44063 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: install_gambas3_script.tar.gz Type: application/x-gzip Size: 1738 bytes Desc: not available URL: From gambas at ...1... Mon May 3 12:19:39 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 3 May 2010 12:19:39 +0200 Subject: [Gambas-user] Cannot load class 'Balloon' In-Reply-To: <4BDE9DF5.4040900@...2382...> References: <28375384.post@...1379...> <201005031108.50555.gambas@...1...> <4BDE9DF5.4040900@...2382...> Message-ID: <201005031219.39882.gambas@...1...> > > Here there are. Also included a custom bash script I made to automate > this task. > > Regards, > Jesus OK, I think I got it. The problem should be fixed in revision #2928. Regards, -- Beno?t Minisini From igsteele at ...2429... Mon May 3 12:40:07 2010 From: igsteele at ...2429... (igsteele at ...2429...) Date: Mon, 3 May 2010 10:40:07 +0000 Subject: [Gambas-user] Gambas-user Digest, Vol 48, Issue 1 In-Reply-To: References: Message-ID: <653142397-1272883182-cardhu_decombobulator_blackberry.rim.net-2066890451-@...2428...> R0xxxxxxrxXxzDzXxrrZRxRxrDXrrerRx ------------------ -----Original Message----- From: gambas-user-request at lists.sourceforge.net Date: Mon, 03 May 2010 09:05:09 To: Subject: Gambas-user Digest, Vol 48, Issue 1 Send Gambas-user mailing list submissions to gambas-user at lists.sourceforge.net To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/gambas-user or, via email, send a message with subject or body 'help' to gambas-user-request at lists.sourceforge.net You can reach the person managing the list at gambas-user-owner at lists.sourceforge.net When replying, please edit your Subject line so it is more specific than "Re: Contents of Gambas-user digest..." Today's Topics: 1. Re: 10.04 issue (Beno?t Minisini) 2. Ubuntu 10.04 LTS (andreas m?ller) 3. Re: Ubuntu 10.04 LTS (charlesg) 4. Re: Ubuntu 10.04 LTS (charlesg) 5. User-defined format characters for dates (AM/PM) (Zach Smith) 6. Re: User-defined format characters for dates (AM/PM) (Beno?t Minisini) 7. Re: User-defined format characters for dates (AM/PM) (Zach Smith) 8. Re: Cannot load class 'Balloon' (craf) 9. Re: User-defined format characters for dates (AM/PM) (Beno?t Minisini) 10. Re: Cannot load class 'Balloon' (EA7DFH) ---------------------------------------------------------------------- Message: 1 Date: Fri, 30 Apr 2010 11:39:35 +0200 From: Beno?t Minisini Subject: Re: [Gambas-user] 10.04 issue To: mailing list for gambas users Message-ID: <201004301139.35803.gambas at ...1...> Content-Type: Text/Plain; charset="utf-8" > Gambas was installed as described for karmic on the link bellow: > > http://www.domotiga.nl/wiki/Gambas/Install > > I did it 1 month ago and the version is the latest one: 2.20 > It worked perfectly under karmic from the IDE and also the executables > generated by Gambas. > > Robi > So you installed it from sources. According to your error message, I think you have to recompile and reinstall gambas, because apparently the libmysqlclient shared library was upgraded to a new version. On Linux, an executable stores the shared libraries it needs with their version. Note that is a "compatibility" version, not necessarily the development version number of the library. For example, the KDE 4 core shared library is "libkdecore.so.5"! When you upgrade a distribution, the shared libraries are upgraded too, but the old versions are not kept, they are removed. So the gambas interpreter that was linked with old shared libraries do not find them anymore! By recompiling it, you will fix the problem. Of course, it could happen that the new shared library is so incompatible, that gambas will not compile anymore. But then it is my problem, and I will fix it for sure! Regards, -- Beno?t Minisini ------------------------------ Message: 2 Date: Fri, 30 Apr 2010 15:11:17 +0200 From: andreas m?ller Subject: [Gambas-user] Ubuntu 10.04 LTS To: gambas-user at lists.sourceforge.net Message-ID: <1272633077.4844.20.camel at ...2426...> Content-Type: text/plain; charset="UTF-8" Hello all, today I installed Ubuntu 10.04 LTS (lucid lynx). Unfortunatelly Gambas was not part of its repository. Did anybody install it manually on that platform already? best regards andreas ------------------------------ Message: 3 Date: Fri, 30 Apr 2010 07:30:47 -0700 (PDT) From: charlesg Subject: Re: [Gambas-user] Ubuntu 10.04 LTS To: gambas-user at lists.sourceforge.net Message-ID: <28412886.post at ...1379...> Content-Type: text/plain; charset=us-ascii Hi Gambas 2.20.2 works fine on a raw install (i.e. not upgraded) 10.04 using Karmic (9.10) dependency list. I think there is a problem with Gambas 3 but am sure it will be sorted soon (as ever!) rgds -- View this message in context: http://old.nabble.com/Ubuntu-10.04-LTS-tp28412230p28412886.html Sent from the gambas-user mailing list archive at Nabble.com. ------------------------------ Message: 4 Date: Fri, 30 Apr 2010 08:03:20 -0700 (PDT) From: charlesg Subject: Re: [Gambas-user] Ubuntu 10.04 LTS To: gambas-user at lists.sourceforge.net Message-ID: <28413293.post at ...1379...> Content-Type: text/plain; charset=us-ascii Hi Gambas 2.19.0 is in UB10.04 software centre but last time I tried it gave an incomplete installation. If you don't want to compile rather do sudo apt-get install gambas2 from the terminal and even then check in synaptic by searching on gambas and making sure all the boxes are ticked. rgds -- View this message in context: http://old.nabble.com/Ubuntu-10.04-LTS-tp28412230p28413293.html Sent from the gambas-user mailing list archive at Nabble.com. ------------------------------ Message: 5 Date: Fri, 30 Apr 2010 17:52:12 -0500 From: Zach Smith Subject: [Gambas-user] User-defined format characters for dates (AM/PM) To: gambas-user at lists.sourceforge.net Message-ID: Content-Type: text/plain; charset=ISO-8859-1 Is there any way to use the format command to get "05:32 PM"? Format (Now, "hh:nn") gives me the 24 hour format: 17:32 ------------------------------ Message: 6 Date: Sat, 1 May 2010 01:04:27 +0200 From: Beno?t Minisini Subject: Re: [Gambas-user] User-defined format characters for dates (AM/PM) To: mailing list for gambas users Message-ID: <201005010104.27594.gambas at ...1...> Content-Type: Text/Plain; charset="utf-8" > Is there any way to use the format command to get "05:32 PM"? > > Format (Now, "hh:nn") gives me the 24 hour format: 17:32 > Format(Now, "hh:nn AM/PM") will give you what you want, provided that your current language use AM/PM notation. Regards, -- Beno?t Minisini ------------------------------ Message: 7 Date: Sat, 1 May 2010 10:20:04 -0500 From: Zach Smith Subject: Re: [Gambas-user] User-defined format characters for dates (AM/PM) To: mailing list for gambas users Message-ID: Content-Type: text/plain; charset=ISO-8859-1 2010/4/30 Beno?t Minisini : >> Is there any way to use the format command to get "05:32 PM"? >> >> Format (Now, "hh:nn") gives me the 24 hour format: ?17:32 >> > > Format(Now, "hh:nn AM/PM") will give you what you want, provided that your > current language use AM/PM notation. > Thanks Beno?t. I didn't see that in the documentation. Should it be mentioned here: http://gambasdoc.org/help/lang/format - that was where I looked first. ------------------------------ Message: 8 Date: Sat, 01 May 2010 18:12:31 -0400 From: craf Subject: Re: [Gambas-user] Cannot load class 'Balloon' To: mailing list for gambas users Message-ID: <1272751951.1993.0.camel at ...2406...> Content-Type: text/plain; charset="UTF-8" Hi. To me it gives me the error: ERROR: #2: Cannot load class 'Balloon': Unable to load class file I compiled Gambas3 on Kubuntu 9.10 without error messages. What could be the cause?. Regards -----Mensaje original----- De: Fabien Bodard Reply-to: mailing list for gambas users Para: mailing list for gambas users Asunto: Re: [Gambas-user] Cannot load class 'Balloon' Fecha: Tue, 27 Apr 2010 18:59:31 +0200 >odd? >why ? 2010/4/27 charlesg : > > Fabien > > Thank you for that. Gambas 3 used to compile on Ubuntu 10.04 (lucid) using > the list of dependencies for 9.10 (Karmic) in the Gambas installation pages. > It now also needs intltool (or part of it?) as in sudo apt-get install > intltool. > > Gambas 3 now runs but looks odd. I am way out of my comfort zone. :confused: > > rgds > -- > View this message in context: http://old.nabble.com/Cannot-load-class-%27Balloon%27-tp28375384p28379147.html > Sent from the gambas-user mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > ------------------------------------------------------------------------------ _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user ------------------------------ Message: 9 Date: Sun, 2 May 2010 16:21:48 +0200 From: Beno?t Minisini Subject: Re: [Gambas-user] User-defined format characters for dates (AM/PM) To: mailing list for gambas users Message-ID: <201005021621.48725.gambas at ...1...> Content-Type: Text/Plain; charset="utf-8" > 2010/4/30 Beno?t Minisini : > >> Is there any way to use the format command to get "05:32 PM"? > >> > >> Format (Now, "hh:nn") gives me the 24 hour format: 17:32 > > > > Format(Now, "hh:nn AM/PM") will give you what you want, provided that > > your current language use AM/PM notation. > > Thanks Beno?t. I didn't see that in the documentation. Should it be > mentioned here: http://gambasdoc.org/help/lang/format - that was where > I looked first. > Indeed. It should be fixed now. -- Beno?t Minisini ------------------------------ Message: 10 Date: Mon, 03 May 2010 11:04:58 +0200 From: EA7DFH Subject: Re: [Gambas-user] Cannot load class 'Balloon' To: mailing list for gambas users Message-ID: <4BDE91BA.7010700 at ...2382...> Content-Type: text/plain; charset=ISO-8859-1 Fabien Bodard escribi?: > on ubuntu 10.04 work fine for me too > > have you tryed to remove the all the svn and start from scratch ? > > 2010/4/28 Matteo Pasotti : > >> Il 28/04/2010 19:04, charlesg ha scritto: >> >>> Hi >>> >>> I fixed the balloon error by loading Ubuntu package intltool (don't know the >>> Arch equivalent). Now it loads but still does not run so there must be other >>> unsatisfied dependencies. Somebody on the Ubuntu forum has got it working >>> (Gambas 2.99 on ub10.04 64bit) but has not spilled the beans yet. >>> >>> rgds >>> >>> I got the same error in Ubuntu 9.10. No warnings during the whole proccess of reconf, conf , make; of course, with clean SVN each time. I agree with Mateo, could it be dependencies related? Regards, Jesus jesus at ...2151...:~$ gambas3 ERROR: #2: Cannot load class 'Balloon': Unable to load class file [OperatingSystem] OperatingSystem=Linux KernelRelease=2.6.31-20-generic-pae DistributionVendor=ubuntu DistributionRelease="Ubuntu 9.10" [System] CPUArchitecture=i686 TotalRam=4118776 kB [Gambas] Gambas1=Not Installed Gambas2=2.20.2 Gambas2Path=/usr/local/bin/gbx2 Gambas3=2.99.0 Gambas3Path=/usr/local/bin/gbx3 ------------------------------ ------------------------------------------------------------------------------ ------------------------------ _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user End of Gambas-user Digest, Vol 48, Issue 1 ****************************************** From ea7dfh at ...2382... Mon May 3 13:31:26 2010 From: ea7dfh at ...2382... (EA7DFH) Date: Mon, 03 May 2010 13:31:26 +0200 Subject: [Gambas-user] Cannot load class 'Balloon' In-Reply-To: <201005031219.39882.gambas@...1...> References: <28375384.post@...1379...> <201005031108.50555.gambas@...1...> <4BDE9DF5.4040900@...2382...> <201005031219.39882.gambas@...1...> Message-ID: <4BDEB40E.2090206@...2382...> Beno?t Minisini escribi?: >> Here there are. Also included a custom bash script I made to automate >> this task. >> >> Regards, >> Jesus > > OK, I think I got it. The problem should be fixed in revision #2928. > > Regards, > #2928 Not for me, at least in Gnome. (I have not KDE). Now I get: jesus at ...2151...:~$ gambas3 *** glibc detected *** /usr/local/bin/gambas3: corrupted double-linked list: 0x0a1cced8 *** and gbx3 does nothing, hangs there... Terminated with Ctrl+C. Attached again log files In conf.txt: line #133: configure: WARNING: Unable to find file: libintl.so line #137: configure: WARNING: Unable to find file: libiconv.so line #2812: configure: WARNING: *** Gnome desktop routines is disabled jesus at ...2151...:~$ locate glibc /usr/lib/glib-2.0/include/glibconfig.h /usr/share/aclocal/glibc2.m4 /usr/share/aclocal/glibc21.m4 /usr/share/libtool/libltdl/libltdl/lt__glibc.h /usr/share/man/man7/glibc.7.gz /usr/share/qt4/mkspecs/glibc-g++ /usr/share/qt4/mkspecs/glibc-g++/qmake.conf /usr/share/qt4/mkspecs/glibc-g++/qplatformdefs.h jesus at ...2151...:~$ locate libintl /usr/include/libintl.h /usr/lib/preloadable_libintl.so <-- ? /usr/share/awk/libintl.awk /usr/share/gettext/intl/libintl.rc /usr/share/java/libintl.jar libiconv.so not foun in my system. -------------- next part -------------- A non-text attachment was scrubbed... Name: log.tar.gz Type: application/x-gzip Size: 44124 bytes Desc: not available URL: From jussi.lahtinen at ...626... Mon May 3 16:07:04 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Mon, 3 May 2010 17:07:04 +0300 Subject: [Gambas-user] Wrong error message Message-ID: Hi! There's minor bug. Overflow with concatenate operator causes wrong error message. You can reproduce the bug with this code: Dim ii As Integer Dim jj As Integer For ii = 9 To 0 Step -1 jj &= ii <--- Wanted Integer got String instead. Next Gambas 3 rev 2879 @ Ubuntu 9.10 64bit Jussi From gambas at ...1... Mon May 3 16:22:43 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 3 May 2010 16:22:43 +0200 Subject: [Gambas-user] Wrong error message In-Reply-To: References: Message-ID: <201005031622.43506.gambas@...1...> > Hi! > There's minor bug. > Overflow with concatenate operator causes wrong error message. > You can reproduce the bug with this code: > > Dim ii As Integer > Dim jj As Integer > > For ii = 9 To 0 Step -1 > jj &= ii <--- Wanted Integer got String instead. > Next > > Gambas 3 rev 2879 @ Ubuntu 9.10 64bit > > Jussi > I'd like to know what you expected exactly from that code, and what you think the error message should be! For information, the previous code is equivalent to: Dim ii As Integer Dim jj As Integer For ii = 9 To 0 Step -1 jj = CInt(CStr(jj) & CStr(ii)) Next The error message comes from CInt(). When its argument cannot be converted to an integer, it just says that there is a type mismatch (you forgot to tell that) and that its argument is not an integer. Regards, -- Beno?t Minisini From doriano.blengino at ...1909... Mon May 3 20:01:39 2010 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Mon, 03 May 2010 20:01:39 +0200 Subject: [Gambas-user] Wrong error message In-Reply-To: <201005031622.43506.gambas@...1...> References: <201005031622.43506.gambas@...1...> Message-ID: <4BDF0F83.6020201@...1909...> Beno?t Minisini ha scritto: >> Hi! >> There's minor bug. >> Overflow with concatenate operator causes wrong error message. >> You can reproduce the bug with this code: >> >> Dim ii As Integer >> Dim jj As Integer >> >> For ii = 9 To 0 Step -1 >> jj&= ii<--- Wanted Integer got String instead. >> Next >> >> Gambas 3 rev 2879 @ Ubuntu 9.10 64bit >> >> Jussi >> >> > I'd like to know what you expected exactly from that code, and what you think > the error message should be! > > For information, the previous code is equivalent to: > > Dim ii As Integer > Dim jj As Integer > > For ii = 9 To 0 Step -1 > jj = CInt(CStr(jj)& CStr(ii)) > Next > > The error message comes from CInt(). When its argument cannot be converted to > an integer, it just says that there is a type mismatch (you forgot to tell > that) and that its argument is not an integer. > I think that Jussi is right. Even the form you are using shows that the "&" operator is used with an integer to the left, and so, the "&" is meaningless. This is even more true with the C-style operator "&=" which, by definition, must not cast the operand to the left. In other words, I would say that automatic type conversion must be performed only when reading values, and never when writing. Regards, Doriano From gambas at ...1... Mon May 3 20:14:35 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 3 May 2010 20:14:35 +0200 Subject: [Gambas-user] Wrong error message In-Reply-To: <4BDF0F83.6020201@...1909...> References: <201005031622.43506.gambas@...1...> <4BDF0F83.6020201@...1909...> Message-ID: <201005032014.36021.gambas@...1...> > Beno?t Minisini ha scritto: > >> Hi! > >> There's minor bug. > >> Overflow with concatenate operator causes wrong error message. > >> You can reproduce the bug with this code: > >> > >> Dim ii As Integer > >> Dim jj As Integer > >> > >> For ii = 9 To 0 Step -1 > >> jj&= ii<--- Wanted Integer got String instead. > >> Next > >> > >> Gambas 3 rev 2879 @ Ubuntu 9.10 64bit > >> > >> Jussi > > > > I'd like to know what you expected exactly from that code, and what you > > think the error message should be! > > > > For information, the previous code is equivalent to: > > > > Dim ii As Integer > > Dim jj As Integer > > > > For ii = 9 To 0 Step -1 > > > > jj = CInt(CStr(jj)& CStr(ii)) > > > > Next > > > > The error message comes from CInt(). When its argument cannot be > > converted to an integer, it just says that there is a type mismatch (you > > forgot to tell that) and that its argument is not an integer. > > I think that Jussi is right. Even the form you are using shows that the > "&" operator is used with an integer to the left, and so, the "&" is > meaningless. This is even more true with the C-style operator "&=" > which, by definition, must not cast the operand to the left. > > In other words, I would say that automatic type conversion must be > performed only when reading values, and never when writing. > > Regards, > Doriano > I admit that the error message is misleading. It is a generic error message raised by the internal interpreter conversion that converts anything to anything. I could have made more detailed error messages, but: - They are many many possible fail cases, so many many possible error messages, and I'm not sure I can guess them all. - When you convert something, you usually just want the conversion to succeed. In the few cases you want to know exactly why the conversion has failed, you can do the analyze by yourself. And for your remark about casting: why not converting when writing? Do you want the interpreter to raise an error instead? As in both cases you have to check the datatype you are processing, and that usually what you want is automatic conversion (otherwise, why using a string operator like '&' with integer arguments?), I decided to automatically convert datatypes as much as possible. Regards, -- Beno?t Minisini From jussi.lahtinen at ...626... Mon May 3 21:39:52 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Mon, 3 May 2010 22:39:52 +0300 Subject: [Gambas-user] Wrong error message In-Reply-To: <201005031622.43506.gambas@...1...> References: <201005031622.43506.gambas@...1...> Message-ID: > For information, the previous code is equivalent to: > > Dim ii As Integer > Dim jj As Integer > > For ii = 9 To 0 Step -1 > ?jj = CInt(CStr(jj) & CStr(ii)) > Next Yes, exactly. Sometimes it is convenient to "add" numbers this way. I just didn't see the trouble to write conversion functions CInt and CStr. > The error message comes from CInt(). When its argument cannot be converted to > an integer, it just says that there is a type mismatch (you forgot to tell > that) and that its argument is not an integer. I didn't understand why I got error message "Type mismatch: Wanted Integer got String instead.", because I was using only Integer variables. Also error was unexpected as I didn't guess overflow to be possible... my bad. Basically error message confused me more. I think better error message would be "Overflow" or "Internal conversion error to Integer value", but as I said this is just minor bug. Jussi From doriano.blengino at ...1909... Tue May 4 08:25:32 2010 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Tue, 04 May 2010 08:25:32 +0200 Subject: [Gambas-user] Wrong error message In-Reply-To: <201005032014.36021.gambas@...1...> References: <201005031622.43506.gambas@...1...> <4BDF0F83.6020201@...1909...> <201005032014.36021.gambas@...1...> Message-ID: <4BDFBDDC.20405@...1909...> Beno?t Minisini ha scritto: >> Beno?t Minisini ha scritto: >> >>>> Hi! >>>> There's minor bug. >>>> Overflow with concatenate operator causes wrong error message. >>>> You can reproduce the bug with this code: >>>> >>>> Dim ii As Integer >>>> Dim jj As Integer >>>> >>>> For ii = 9 To 0 Step -1 >>>> jj&= ii<--- Wanted Integer got String instead. >>>> Next >>>> >>>> Gambas 3 rev 2879 @ Ubuntu 9.10 64bit >>>> >>>> Jussi >>>> >>> I'd like to know what you expected exactly from that code, and what you >>> think the error message should be! >>> >>> For information, the previous code is equivalent to: >>> >>> Dim ii As Integer >>> Dim jj As Integer >>> >>> For ii = 9 To 0 Step -1 >>> >>> jj = CInt(CStr(jj)& CStr(ii)) >>> >>> Next >>> >>> The error message comes from CInt(). When its argument cannot be >>> converted to an integer, it just says that there is a type mismatch (you >>> forgot to tell that) and that its argument is not an integer. >>> >> I think that Jussi is right. Even the form you are using shows that the >> "&" operator is used with an integer to the left, and so, the "&" is >> meaningless. This is even more true with the C-style operator "&=" >> which, by definition, must not cast the operand to the left. >> >> In other words, I would say that automatic type conversion must be >> performed only when reading values, and never when writing. >> >> Regards, >> Doriano >> >> > > I admit that the error message is misleading. It is a generic error message > raised by the internal interpreter conversion that converts anything to > anything. > > I could have made more detailed error messages, but: > > - They are many many possible fail cases, so many many possible error > messages, and I'm not sure I can guess them all. > > - When you convert something, you usually just want the conversion to succeed. > In the few cases you want to know exactly why the conversion has failed, you > can do the analyze by yourself. > > And for your remark about casting: why not converting when writing? Do you > want the interpreter to raise an error instead? As in both cases you have to > check the datatype you are processing, and that usually what you want is > automatic conversion (otherwise, why using a string operator like '&' with > integer arguments?), I decided to automatically convert datatypes as much as > possible. > The problem is not very clear to me, but the following should be right: gambas uses operators to cast its operands; if it was not so, then why use "&" instead "+" to concatenate strings? But, when you use notations like "+=", you have a variable on the left (an L-Value), not a value you can cast... now, if the user writes something that can not work, like: sString$ /= 3 the compiler should detect this. As Jussi says, this is a minor issue, because even if the compiler does not notice, the interpreter will - as soon the user checks the program. But this kind of check would be responsibility of the compiler, not the interpreter. About the "why not converting while writing"... it could be a good idea, but "sString$ /= 3" what should do? Probably take the integer value stored in sString$, divide by three, convert again in string, and store the result back in sString$... but then why the code from Jussi raises an error? Shouldn't it work instead? Regards, Doriano From doriano.blengino at ...1909... Tue May 4 10:13:43 2010 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Tue, 04 May 2010 10:13:43 +0200 Subject: [Gambas-user] Wrong error message In-Reply-To: <4BDFBDDC.20405@...1909...> References: <201005031622.43506.gambas@...1...> <4BDF0F83.6020201@...1909...> <201005032014.36021.gambas@...1...> <4BDFBDDC.20405@...1909...> Message-ID: <4BDFD737.5020706@...1909...> Doriano Blengino ha scritto: > Beno?t Minisini ha scritto: > >>> Beno?t Minisini ha scritto: >>> >>> >>>>> Hi! >>>>> There's minor bug. >>>>> Overflow with concatenate operator causes wrong error message. >>>>> You can reproduce the bug with this code: >>>>> >>>>> Dim ii As Integer >>>>> Dim jj As Integer >>>>> >>>>> For ii = 9 To 0 Step -1 >>>>> jj&= ii<--- Wanted Integer got String instead. >>>>> Next >>>>> >>>>> Gambas 3 rev 2879 @ Ubuntu 9.10 64bit >>>>> >>>>> Jussi >>>>> >>>>> >>>> I'd like to know what you expected exactly from that code, and what you >>>> think the error message should be! >>>> >>>> For information, the previous code is equivalent to: >>>> >>>> Dim ii As Integer >>>> Dim jj As Integer >>>> >>>> For ii = 9 To 0 Step -1 >>>> >>>> jj = CInt(CStr(jj)& CStr(ii)) >>>> >>>> Next >>>> >>>> The error message comes from CInt(). When its argument cannot be >>>> converted to an integer, it just says that there is a type mismatch (you >>>> forgot to tell that) and that its argument is not an integer. >>>> >>>> >>> I think that Jussi is right. Even the form you are using shows that the >>> "&" operator is used with an integer to the left, and so, the "&" is >>> meaningless. This is even more true with the C-style operator "&=" >>> which, by definition, must not cast the operand to the left. >>> Errata corrige. It seems I must drive my car to better understand gambas... interesting... Ok, now I understand the two code snippets above. The net result should be an integer having value 9876543210. Apart from the fact that a simple assignment does the same work, which leads me to think that Jussi wanted something else, I am still not convinced about the casting (or, better, conversion) while writing to variables. I feel something weird in using an integer variable as if it was a string, and the above snippet does that. I wrote the same code and tried it - "wanted integer got string instead". Then I traced the code, and discovered that the conversion fails because an overflow, but the resulting error says something else (I can understand why). Well, what to say? I don't like the automatic conversion while writing, but I am not sure. The more the language does things by its own, the more you can get confused - anyway we don't want a stupid language you must say everything to, right?. The routine I tested is: PUBLIC SUB Form_Open() DIM i, k AS Integer k = 9876543210 k = 0 FOR i = 9 TO 0 STEP -1 ' k &= i PRINT "k="; k, "i="; i k = CInt(CStr(k) & CStr(i)) NEXT END The first assignment "k = 9876543210" is silently accepted by both the compiler and the interpreter, and is wrong. Apparently, gambas does two different things while parsing a source and converting a string to an integer at runtime; at last, I see two things that could be corrected (incorrect constants and "not a string" instead of overflow). Regards, Doriano From leonardo at ...1237... Tue May 4 10:39:52 2010 From: leonardo at ...1237... (Leonardo Miliani) Date: Tue, 04 May 2010 10:39:52 +0200 Subject: [Gambas-user] Error compiling Gambas3 Message-ID: <1272962392.4321.1.camel@"hp_host"> I get this error while trying to compile Gambas3 from SVN on my Arch Linux: In file included from /usr/include/QtCore/qatomic.h:46:0, from /usr/include/QtCore/qbytearray.h:45, from /usr/include/QtCore/qstring.h:46, from /usr/include/QtCore/QString:1, from gview.h:26, from gview_moc.cpp:10: /usr/include/QtCore/qbasicatomic.h:131:7: error: ?#?? $?XI??1???[?? $?HI??? $?p?????[????D? not supported by dump_type#? referred to as ?class? /usr/include/QtCore/qstring.h:6:17: error: ?#?? $?XI??1???[?? $?HI??? $?p?????[????D? not supported by dump_type#? has a previous declaration here /usr/include/QtCore/qatomic_i386.h:84: confused by earlier errors, bailing out make[5]: *** [gview_moc.lo] Error 1 make[5]: Leaving directory `/home/leo/gambas3.0/trunk/gb.qt4/src/ext' make[4]: *** [all-recursive] Error 1 make[4]: Leaving directory `/home/leo/gambas3.0/trunk/gb.qt4/src' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/home/leo/gambas3.0/trunk/gb.qt4' make[2]: *** [all] Error 2 make[2]: Leaving directory `/home/leo/gambas3.0/trunk/gb.qt4' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/leo/gambas3.0/trunk' make: *** [all] Error 2 -- Leonardo Miliani www.leonardomiliani.com Webmaster e co-fondatore di www.gambas-it.org Il portale di riferimento per i programmatori Gambas italiani From lordheavym at ...626... Tue May 4 11:54:44 2010 From: lordheavym at ...626... (Laurent Carlier) Date: Tue, 4 May 2010 11:54:44 +0200 Subject: [Gambas-user] Error compiling Gambas3 In-Reply-To: <1272962392.4321.1.camel@"hp_host"> References: <1272962392.4321.1.camel@"hp_host"> Message-ID: <201005041154.44588.lordheavym@...626...> Le mardi 04 mai 2010 10:39:52, Leonardo Miliani a ?crit : > I get this error while trying to compile Gambas3 from SVN on my Arch > Linux: > > In file included from /usr/include/QtCore/qatomic.h:46:0, > from /usr/include/QtCore/qbytearray.h:45, > from /usr/include/QtCore/qstring.h:46, > from /usr/include/QtCore/QString:1, > from gview.h:26, > from gview_moc.cpp:10: > /usr/include/QtCore/qbasicatomic.h:131:7: error: ?#?? $?XI??1???[?? > $?HI??? $?p?????[????D? not supported by dump_type#? > referred to as ?class? > /usr/include/QtCore/qstring.h:6:17: error: ?#?? $?XI??1???[?? $?HI??? > $?p?????[????D? not supported by dump_type#? has a previous > declaration here > /usr/include/QtCore/qatomic_i386.h:84: confused by earlier errors, > bailing out > make[5]: *** [gview_moc.lo] Error 1 > make[5]: Leaving directory `/home/leo/gambas3.0/trunk/gb.qt4/src/ext' > make[4]: *** [all-recursive] Error 1 > make[4]: Leaving directory `/home/leo/gambas3.0/trunk/gb.qt4/src' > make[3]: *** [all-recursive] Error 1 > make[3]: Leaving directory `/home/leo/gambas3.0/trunk/gb.qt4' > make[2]: *** [all] Error 2 > make[2]: Leaving directory `/home/leo/gambas3.0/trunk/gb.qt4' > make[1]: *** [all-recursive] Error 1 > make[1]: Leaving directory `/home/leo/gambas3.0/trunk' > make: *** [all] Error 2 Just built it fine here (arch64) Looking at the error, i guess something is rotten with your Qt4 installation, or got some corrupted memory/disk. Regards, From rterry at ...1946... Tue May 4 13:08:21 2010 From: rterry at ...1946... (richard terry) Date: Tue, 4 May 2010 21:08:21 +1000 Subject: [Gambas-user] Too many open files error message Message-ID: <201005042108.21421.rterry@...1946...> This routine is called by my program, consecutively a large number of times during an automated process: Public Sub Display_HTML(sHTML As String, wb As WebView, Optional prefix As String = "html") Dim wFile As File Dim sFilename As String sFilename = Temp$(prefix) & ".html" wfile = Open sFilename For Write Create Print #wfile, sHTML Close #wfile wb.url = sFilename End the temp file is opened-closed. Yet at a certain point gambas comes up with an error 24: too many opened files. Does this mean the temp-file quota has somehow been exceeded? It makes no difference if I put in a fixed name like this: sfilename = "/home/richard/temp.html" Same result > it eventually bugs out. and complains Regards Richard From dosida at ...626... Tue May 4 13:44:48 2010 From: dosida at ...626... (Dimitris Anogiatis) Date: Tue, 4 May 2010 12:44:48 +0100 Subject: [Gambas-user] Too many open files error message In-Reply-To: <201005042108.21421.rterry@...1946...> References: <201005042108.21421.rterry@...1946...> Message-ID: Hey Ricard, just as a quick workaround try replacing the Open - Close code with File.Save(sFilename, sHTML) You might circumvent the "Too many files open" error, which I am unsure why it comes up. Perhaps the total number of open files within your project is too much or the opening and closing of your files happens too fast and some of the files don't get the chance to close properly... just guessing here... I hope this helps Dimitris On Tue, May 4, 2010 at 12:08 PM, richard terry wrote: > > This routine is called by my program, consecutively a large number of times > during an automated process: > > Public Sub Display_HTML(sHTML As String, wb As WebView, Optional prefix As > String = "html") > > Dim wFile As File > Dim sFilename As String > > sFilename = Temp$(prefix) & ".html" > wfile = Open sFilename For Write Create > Print #wfile, sHTML > Close #wfile > wb.url = sFilename > End > > the temp file is opened-closed. > > Yet at a certain point gambas comes up with an error 24: too many opened > files. > Does this mean the temp-file quota has somehow been exceeded? > > It makes no difference if I put in a fixed name like this: > > sfilename = "/home/richard/temp.html" > > Same result > it eventually bugs out. and complains > Regards > > Richard > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From rolf.frogs at ...221... Tue May 4 14:25:49 2010 From: rolf.frogs at ...221... (Rolf Schmidt) Date: Tue, 4 May 2010 14:25:49 +0200 Subject: [Gambas-user] Too many open files error message In-Reply-To: <201005042108.21421.rterry@...1946...> References: <201005042108.21421.rterry@...1946...> Message-ID: <201005041425.53679.rolf.frogs@...221...> Hi Richard > This routine is called by my program, consecutively a large number of times > during an automated process: > > Public Sub Display_HTML(sHTML As String, wb As WebView, Optional prefix As > String = "html") > > Dim wFile As File > Dim sFilename As String > > sFilename = Temp$(prefix) & ".html" > wfile = Open sFilename For Write Create > Print #wfile, sHTML > Close #wfile > wb.url = sFilename > End > > the temp file is opened-closed. > > Yet at a certain point gambas comes up with an error 24: too many opened > files. Does this mean the temp-file quota has somehow been exceeded? The amount of file handles is (also) limited by the kernel. But - if you compile your own kernel, you can increase the number of files which can be open -or keep a more clean open/close strategie. Hope that helps Rolf -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part. URL: From jussi.lahtinen at ...626... Tue May 4 18:11:56 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Tue, 4 May 2010 19:11:56 +0300 Subject: [Gambas-user] Wrong error message In-Reply-To: <4BDFD737.5020706@...1909...> References: <201005031622.43506.gambas@...1...> <4BDF0F83.6020201@...1909...> <201005032014.36021.gambas@...1...> <4BDFBDDC.20405@...1909...> <4BDFD737.5020706@...1909...> Message-ID: > Ok, now I understand the two code snippets above. The net result should > be an integer having value 9876543210. Apart from the fact that a simple > assignment does the same work, which leads me to think that Jussi wanted > something else, I am still not convinced about the casting (or, better, > conversion) while writing to variables. It was not part of my actual code, it was result of problem isolation for demonstration purpose. > I feel something weird in using an integer variable as if it was a > string, and the above snippet does that. As I said earlier, it is sometimes useful. Datatype is integer because all other usage of that variable is mundane math. But of course there are many other ways to do same thing. Example; n += i * exp10(i) Or using temporarily string variable for concatenate and then convert back to integer. But I'm accustomed to use most simplest expression n &= i. BTW. 5*exp10(5) gives 500000.000000001 weird? Gambas 3 rev 2879 @ Ubuntu 10.04 64bit Jussi From gambas at ...1... Tue May 4 19:50:25 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 4 May 2010 19:50:25 +0200 Subject: [Gambas-user] Too many open files error message In-Reply-To: <201005042108.21421.rterry@...1946...> References: <201005042108.21421.rterry@...1946...> Message-ID: <201005041950.25346.gambas@...1...> > This routine is called by my program, consecutively a large number of times > during an automated process: > > Public Sub Display_HTML(sHTML As String, wb As WebView, Optional prefix As > String = "html") > > Dim wFile As File > Dim sFilename As String > > sFilename = Temp$(prefix) & ".html" > wfile = Open sFilename For Write Create > Print #wfile, sHTML > Close #wfile > wb.url = sFilename > End > > the temp file is opened-closed. > > Yet at a certain point gambas comes up with an error 24: too many opened > files. Does this mean the temp-file quota has somehow been exceeded? > > It makes no difference if I put in a fixed name like this: > > sfilename = "/home/richard/temp.html" > > Same result > it eventually bugs out. and complains > Regards > > Richard > Apparently you close the file you wrote, so maybe the problem comes from elsewhere. You can check which files you are really open by using "strace". Enter the directory of your project, and type "strace gbx2" (or "strace gbx3" if you use Gambas 3). All system calls will be printed, and you can analyze the output to see when the open() and close() system calls are used. You can check too your project, by printing a debugging message when you open a file and when you close it, to see if you didn't forget to do that. Note that a file is automatically closed when the File object is released. I can't say more at the moment without more information. I'm not sure it is a Gambas bug. Regards, -- Beno?t Minisini From gambas at ...1... Tue May 4 19:57:14 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 4 May 2010 19:57:14 +0200 Subject: [Gambas-user] Wrong error message In-Reply-To: <4BDFBDDC.20405@...1909...> References: <201005032014.36021.gambas@...1...> <4BDFBDDC.20405@...1909...> Message-ID: <201005041957.14847.gambas@...1...> > > The problem is not very clear to me, but the following should be right: > gambas uses operators to cast its operands; if it was not so, then why > use "&" instead "+" to concatenate strings? But, when you use notations > like "+=", you have a variable on the left (an L-Value), not a value you > can cast... now, if the user writes something that can not work, like: > > sString$ /= 3 > > the compiler should detect this. As Jussi says, this is a minor issue, > because even if the compiler does not notice, the interpreter will - as > soon the user checks the program. But this kind of check would be > responsibility of the compiler, not the interpreter. The "?=" operators are just syntactic sugar. "A ?= B" is replaced by "A = A ? B" at compilation time. So the effect of reading values (as you said) depends on how the "?" operator works. And the effect of writing the value back always use automatic conversion > > About the "why not converting while writing"... it could be a good idea, > but "sString$ /= 3" what should do? Probably take the integer value > stored in sString$, divide by three, convert again in string, and store > the result back in sString$... 'sString$ /= 3' is equivalent to 'sString$ = sString$ / 3'. So sString$ is put on the stack, and the "/" automatically converts that string to a number (if it can). Then, once the division is done, the resulting floating point number is assigned to sString$, and so automatically converted to a string first. Regards, -- Beno?t Minisini From gambas at ...1... Tue May 4 20:00:10 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 4 May 2010 20:00:10 +0200 Subject: [Gambas-user] Wrong error message In-Reply-To: <4BDFD737.5020706@...1909...> References: <4BDFBDDC.20405@...1909...> <4BDFD737.5020706@...1909...> Message-ID: <201005042000.10702.gambas@...1...> > > Ok, now I understand the two code snippets above. The net result should > be an integer having value 9876543210. Apart from the fact that a simple > assignment does the same work, which leads me to think that Jussi wanted > something else, I am still not convinced about the casting (or, better, > conversion) while writing to variables. > > I feel something weird in using an integer variable as if it was a > string, and the above snippet does that. > > I wrote the same code and tried it - "wanted integer got string > instead". Then I traced the code, and discovered that the conversion > fails because an overflow, but the resulting error says something else > (I can understand why). > > Well, what to say? I don't like the automatic conversion while writing, > but I am not sure. The more the language does things by its own, the > more you can get confused - anyway we don't want a stupid language you > must say everything to, right?. The routine I tested is: > > PUBLIC SUB Form_Open() > DIM i, k AS Integer > > k = 9876543210 > k = 0 > > FOR i = 9 TO 0 STEP -1 > ' k &= i > PRINT "k="; k, "i="; i > k = CInt(CStr(k) & CStr(i)) > NEXT > END > > The first assignment "k = 9876543210" is silently accepted by both the > compiler and the interpreter, and is wrong. Yep, it is more vicious there. The 9876543210 is too large for an Integer, so the compiler uses a Long constant instead. Then the Long value is assigned to the 'k' Integer variable, and so is automatically converted to an integer. Alas, overflow during arithmetic conversion is not detected by the C language (whereas internally the CPU can), and doing that detection by code will slow down things *a lot*. So the value is just truncated: you can print 'k' just after the assignment to get the value. Regards, -- Beno?t Minisini From gambas at ...1... Tue May 4 20:03:15 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 4 May 2010 20:03:15 +0200 Subject: [Gambas-user] Wrong error message In-Reply-To: References: <4BDFD737.5020706@...1909...> Message-ID: <201005042003.15262.gambas@...1...> > > I feel something weird in using an integer variable as if it was a > > string, and the above snippet does that. > > As I said earlier, it is sometimes useful. Datatype is integer because > all other usage of that variable is mundane math. > But of course there are many other ways to do same thing. > Example; > n += i * exp10(i) > Or using temporarily string variable for concatenate and then convert > back to integer. > But I'm accustomed to use most simplest expression n &= i. > > BTW. 5*exp10(5) gives 500000.000000001 weird? On my 32 bits Mandriva, I get 500000, both with Gambas 2 and Gambas 3. Could other 64 bits users confirm that? -- Beno?t Minisini From wdahn at ...1000... Tue May 4 21:00:38 2010 From: wdahn at ...1000... (Werner) Date: Wed, 05 May 2010 03:00:38 +0800 Subject: [Gambas-user] Wrong error message In-Reply-To: <201005042003.15262.gambas@...1...> References: <4BDFD737.5020706@...1909...> <201005042003.15262.gambas@...1...> Message-ID: <4BE06ED6.3050908@...1000...> On 05/05/10 02:03, Beno?t Minisini wrote: >>> I feel something weird in using an integer variable as if it was a >>> string, and the above snippet does that. >>> >> As I said earlier, it is sometimes useful. Datatype is integer because >> all other usage of that variable is mundane math. >> But of course there are many other ways to do same thing. >> Example; >> n += i * exp10(i) >> Or using temporarily string variable for concatenate and then convert >> back to integer. >> But I'm accustomed to use most simplest expression n &= i. >> >> BTW. 5*exp10(5) gives 500000.000000001 weird? >> > On my 32 bits Mandriva, I get 500000, both with Gambas 2 and Gambas 3. Could > other 64 bits users confirm that? > > openSuse 11.2/64 Gambas 2.19 gets also 500000 From jussi.lahtinen at ...626... Tue May 4 21:19:48 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Tue, 4 May 2010 22:19:48 +0300 Subject: [Gambas-user] Wrong error message In-Reply-To: <201005042003.15262.gambas@...1...> References: <4BDFD737.5020706@...1909...> <201005042003.15262.gambas@...1...> Message-ID: Same result with Gambas 2.20 @ Ubuntu 10.04 64bit. I haven't recompile after upgrade from Ubuntu 9.10, can this be reason for bug? I'll try recompile later. Jussi 2010/5/4 Beno?t Minisini : >> > I feel something weird in using an integer variable as if it was a >> > string, and the above snippet does that. >> >> ?As I said earlier, it is sometimes useful. Datatype is integer because >> ?all other usage of that variable is mundane math. >> ?But of course there are many other ways to do same thing. >> ?Example; >> ?n += i * exp10(i) >> ?Or using temporarily string variable for concatenate and then convert >> back to integer. >> ?But I'm accustomed to use most simplest expression n &= i. >> >> ?BTW. 5*exp10(5) gives 500000.000000001 weird? > > On my 32 bits Mandriva, I get 500000, both with Gambas 2 and Gambas 3. Could > other 64 bits users confirm that? > > -- > Beno?t Minisini > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas at ...1... Tue May 4 21:22:31 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 4 May 2010 21:22:31 +0200 Subject: [Gambas-user] Wrong error message In-Reply-To: References: <201005042003.15262.gambas@...1...> Message-ID: <201005042122.31351.gambas@...1...> > Same result with Gambas 2.20 @ Ubuntu 10.04 64bit. > I haven't recompile after upgrade from Ubuntu 9.10, can this be reason for > bug? I'll try recompile later. > > Jussi > What's your CPU? -- Beno?t Minisini From jussi.lahtinen at ...626... Tue May 4 21:35:47 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Tue, 4 May 2010 22:35:47 +0300 Subject: [Gambas-user] Wrong error message In-Reply-To: <201005042122.31351.gambas@...1...> References: <201005042003.15262.gambas@...1...> <201005042122.31351.gambas@...1...> Message-ID: Intel Core2 Quad Q9550 Jussi 2010/5/4 Beno?t Minisini : >> Same result with Gambas 2.20 @ Ubuntu 10.04 64bit. >> I haven't recompile after upgrade from Ubuntu 9.10, can this be reason for >> bug? I'll try recompile later. >> >> Jussi >> > > What's your CPU? > > -- > Beno?t Minisini > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From doriano.blengino at ...1909... Tue May 4 22:26:01 2010 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Tue, 04 May 2010 22:26:01 +0200 Subject: [Gambas-user] Too many open files error message In-Reply-To: <201005041950.25346.gambas@...1...> References: <201005042108.21421.rterry@...1946...> <201005041950.25346.gambas@...1...> Message-ID: <4BE082D9.1000208@...1909...> Beno?t Minisini ha scritto: >> This routine is called by my program, consecutively a large number of times >> during an automated process: >> >> Public Sub Display_HTML(sHTML As String, wb As WebView, Optional prefix As >> String = "html") >> >> Dim wFile As File >> Dim sFilename As String >> >> sFilename = Temp$(prefix) & ".html" >> wfile = Open sFilename For Write Create >> Print #wfile, sHTML >> Close #wfile >> wb.url = sFilename >> End >> >> the temp file is opened-closed. >> >> Yet at a certain point gambas comes up with an error 24: too many opened >> files. Does this mean the temp-file quota has somehow been exceeded? >> >> It makes no difference if I put in a fixed name like this: >> >> sfilename = "/home/richard/temp.html" >> >> Same result > it eventually bugs out. and complains >> Regards >> >> Richard >> >> > > Apparently you close the file you wrote, so maybe the problem comes from > elsewhere. > > You can check which files you are really open by using "strace". Enter the > directory of your project, and type "strace gbx2" (or "strace gbx3" if you use > Gambas 3). All system calls will be printed, and you can analyze the output to > see when the open() and close() system calls are used. > > You can check too your project, by printing a debugging message when you open > a file and when you close it, to see if you didn't forget to do that. Note > that a file is automatically closed when the File object is released. > > I can't say more at the moment without more information. I'm not sure it is a > Gambas bug. > > You can also go with lsof(1) - perhaps it is simpler: when your program complains, do a ps ax, and note the PID of the program, then do a lsof -p PID to see all the open files of your program. Regards, Doriano From rterry at ...1946... Tue May 4 23:26:53 2010 From: rterry at ...1946... (richard terry) Date: Wed, 5 May 2010 07:26:53 +1000 Subject: [Gambas-user] Too many open files error message In-Reply-To: References: <201005042108.21421.rterry@...1946...> Message-ID: <201005050726.53666.rterry@...1946...> On Tuesday 04 May 2010 21:44:48 Dimitris Anogiatis wrote: > Hey Ricard, > > just as a quick workaround try replacing the Open - Close code with > > File.Save(sFilename, sHTML) > > You might circumvent the "Too many files open" error, which I am unsure why > it comes up. > > Perhaps the total number of open files within your project is too much or > the opening and closing > of your files happens too fast and some of the files don't get the chance > to close properly... > just guessing here... That sounds more like it because the code definately closes them, however I've found a workaround - the webview has a .html poperty so I just write direct to that and bypass the file which was really old code back when I used the konqueror control. Thanks. > > I hope this helps > Dimitris > > On Tue, May 4, 2010 at 12:08 PM, richard terry wrote: > > This routine is called by my program, consecutively a large number of > > times during an automated process: > > > > Public Sub Display_HTML(sHTML As String, wb As WebView, Optional prefix > > As String = "html") > > > > Dim wFile As File > > Dim sFilename As String > > > > sFilename = Temp$(prefix) & ".html" > > wfile = Open sFilename For Write Create > > Print #wfile, sHTML > > Close #wfile > > wb.url = sFilename > > End > > > > the temp file is opened-closed. > > > > Yet at a certain point gambas comes up with an error 24: too many opened > > files. > > Does this mean the temp-file quota has somehow been exceeded? > > > > It makes no difference if I put in a fixed name like this: > > > > sfilename = "/home/richard/temp.html" > > > > Same result > it eventually bugs out. and complains > > Regards > > > > Richard > > > > > > > > ------------------------------------------------------------------------- > >----- _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > --------------------------------------------------------------------------- > --- _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From leonardo at ...1237... Wed May 5 01:13:01 2010 From: leonardo at ...1237... (Leonardo Miliani) Date: Wed, 05 May 2010 01:13:01 +0200 Subject: [Gambas-user] WHILE and AND: please explain me.... Message-ID: <1273014781.6912.5.camel@"hp_host"> I'm working with this little piece of code, it's the Insertion Sort: PUBLIC SUB InsertionSort(matrix AS String[]) DIM i, j AS Integer DIM x AS String FOR i = 1 TO (matrix.Count - 1) x = matrix[i] j = i - 1 WHILE j >= 0 AND matrix[j] > x matrix[j + 1] = matrix[j] j -= 1 WEND matrix[j + 1] = x NEXT END But I get an "Out of bound" error in the WHILE test, because j begins -1. Usually (in other languages this is the behavior) the AND test checks the first condition, and if it is false then it checks the second one. OK... but shouldn't Gambas bypass the WHILE statement because j is negative? -- Leonardo Miliani www.leonardomiliani.com Webmaster e co-fondatore di www.gambas-it.org Il portale di riferimento per i programmatori Gambas italiani From gambas at ...1... Wed May 5 01:20:23 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 5 May 2010 01:20:23 +0200 Subject: [Gambas-user] WHILE and AND: please explain me.... In-Reply-To: <1273014781.6912.5.camel@"hp_host"> References: <1273014781.6912.5.camel@"hp_host"> Message-ID: <201005050120.23044.gambas@...1...> > I'm working with this little piece of code, it's the Insertion Sort: > > PUBLIC SUB InsertionSort(matrix AS String[]) > DIM i, j AS Integer > DIM x AS String > > FOR i = 1 TO (matrix.Count - 1) > x = matrix[i] > j = i - 1 > WHILE j >= 0 AND matrix[j] > x > matrix[j + 1] = matrix[j] > j -= 1 > WEND > matrix[j + 1] = x > NEXT > END > > But I get an "Out of bound" error in the WHILE test, because j begins > -1. > > Usually (in other languages this is the behavior) the AND test checks > the first condition, and if it is false then it checks the second one. > OK... but shouldn't Gambas bypass the WHILE statement because j is > negative? AND is a logical operator in Gambas, and it evaluates both of its arguments. You must write it this way: DO IF j < 0 OR IF matrix[j] <= x THEN BREAK matrix[j + 1] = matrix[j] j -= 1 LOOP Regards, -- Beno?t Minisini From euph1 at ...734... Wed May 5 03:52:15 2010 From: euph1 at ...734... (mike) Date: Tue, 04 May 2010 21:52:15 -0400 Subject: [Gambas-user] Wrong error message In-Reply-To: <201005042003.15262.gambas@...1...> References: <4BDFD737.5020706@...1909...> <201005042003.15262.gambas@...1...> Message-ID: <4BE0CF4F.4000309@...734...> On 05/04/2010 02:03 PM, Beno?t Minisini wrote: >>> I feel something weird in using an integer variable as if it was a >>> string, and the above snippet does that. >>> >> As I said earlier, it is sometimes useful. Datatype is integer because >> all other usage of that variable is mundane math. >> But of course there are many other ways to do same thing. >> Example; >> n += i * exp10(i) >> Or using temporarily string variable for concatenate and then convert >> back to integer. >> But I'm accustomed to use most simplest expression n&= i. >> >> BTW. 5*exp10(5) gives 500000.000000001 weird? >> > On my 32 bits Mandriva, I get 500000, both with Gambas 2 and Gambas 3. Could > other 64 bits users confirm that? > > Fedora 11 Kernel 2.6.30.10-105.2.23.fc11.x86_64 Intel Core2 Quad Q6700 Gambas 2.19 ? 5*exp10(5) 500000.000000001 From leonardo at ...1237... Wed May 5 16:07:17 2010 From: leonardo at ...1237... (Leonardo Miliani) Date: Wed, 05 May 2010 16:07:17 +0200 Subject: [Gambas-user] Error compiling Gambas3 In-Reply-To: <201005041154.44588.lordheavym@...626...> References: <1272962392.4321.1.camel@"hp_host"> <201005041154.44588.lordheavym@...626...> Message-ID: <1273068437.7554.2.camel@"hp_host"> Il giorno mar, 04/05/2010 alle 11.54 +0200, Laurent Carlier ha scritto: > Just built it fine here (arch64) > > Looking at the error, i guess something is rotten with your Qt4 installation, > or got some corrupted memory/disk. > > Regards, > No, nothing was broken... simply, there was some glitchies in the code but made Gambas3 unable to compile on 32 bit systems :-) Now with revision 2933 I am able to compile Gambas again.... but! If I try to create a new porject I get this error: *** glibc detected *** /usr/bin/gambas3: corrupted double-linked list: 0x0a082e08 *** ======= Backtrace: ========= /lib/libc.so.6(+0x6c4f1)[0xb77234f1] /lib/libc.so.6(+0x6fae3)[0xb7726ae3] /lib/libc.so.6(realloc+0xe9)[0xb7728059] /usr/lib/libQtCore.so.4(+0xc90f5)[0xb631f0f5] /usr/lib/libQtCore.so.4(+0xccb38)[0xb6322b38] /usr/lib/libQtCore.so.4(+0xcd954)[0xb6323954] /usr/lib/libQtCore.so.4(_Z10qShapeItemP14HB_ShaperItem_ +0x1d)[0xb6323d3d] /usr/lib/libQtGui.so.4(_ZNK11QTextEngine21shapeTextWithHarfbuzzEi +0x911)[0xb6842801] /usr/lib/libQtGui.so.4(_ZNK11QTextEngine9shapeTextEi+0x65)[0xb6842e15] /usr/lib/libQtGui.so.4(_ZNK11QTextEngine5shapeEi+0x84)[0xb6843254] /usr/lib/libQtGui.so.4(_ZN9QTextLine13layout_helperEi +0x1312)[0xb684dbe2] /usr/lib/libQtGui.so.4(_ZN9QTextLine12setLineWidthEd+0xc4)[0xb684e7b4] /usr/lib/libQtGui.so.4(+0x27b476)[0xb673e476] /usr/lib/libQtGui.so.4(+0x27c081)[0xb673f081] /usr/lib/libQtGui.so.4(_ZNK12QFontMetrics12boundingRectERK5QRectiRK7QStringiPi+0xd3)[0xb681eeb3] /usr/lib/libQtGui.so.4(_ZNK6QStyle12itemTextRectERK12QFontMetricsRK5QRectibRK7QString+0xde)[0xb68e8bae] /usr/lib/libkdeui.so.5(_ZNK6KStyle12itemTextRectERK12QFontMetricsRK5QRectibRK7QString+0x4d)[0xb3e9a7ed] /usr/lib/libQtGui.so.4(_ZNK9QCheckBox8sizeHintEv+0x12f)[0xb69ecbcf] /usr/lib/gambas3/gb.qt4.so(+0x43ed7)[0xb73d4ed7] /usr/lib/gambas3/gb.qt4.so(+0x43ff9)[0xb73d4ff9] /usr/bin/gambas3[0x804f029] /usr/bin/gambas3[0x80514db] /usr/bin/gambas3[0x806f285] /usr/bin/gambas3[0x804ebdc] /usr/bin/gambas3[0x804ef60] /usr/bin/gambas3[0x804fd10] /usr/bin/gambas3[0x8064dda] /usr/bin/gambas3[0x8052a16] /usr/bin/gambas3[0x804fab8] /usr/bin/gambas3[0x80507c3] /usr/bin/gambas3[0x806f638] /usr/bin/gambas3[0x804ebdc] /usr/bin/gambas3[0x804ef60] /usr/bin/gambas3[0x805f020] /usr/lib/gambas3/gb.qt4.so(+0x31e78)[0xb73c2e78] /usr/lib/gambas3/gb.qt4.so(+0x3a3e5)[0xb73cb3e5] /usr/lib/gambas3/gb.qt4.so(+0x397a0)[0xb73ca7a0] /usr/lib/libQtCore.so.4(_ZN11QMetaObject8metacallEP7QObjectNS_4CallEiPPv +0x3a)[0xb63ac6ea] /usr/lib/libQtCore.so.4(_ZN11QMetaObject8activateEP7QObjectPKS_iPPv +0x275)[0xb63bb715] /usr/lib/libQtGui.so.4(_ZN15QAbstractButton7clickedEb+0x49)[0xb6cb92a9] /usr/lib/libQtGui.so.4(+0x512f79)[0xb69d5f79] /usr/lib/libQtGui.so.4(+0x514614)[0xb69d7614] /usr/lib/libQtGui.so.4(_ZN15QAbstractButton17mouseReleaseEventEP11QMouseEvent+0x9e)[0xb69d78ce] /usr/lib/libQtGui.so.4(_ZN11QToolButton17mouseReleaseEventEP11QMouseEvent+0x2c)[0xb6aa678c] /usr/lib/libQtGui.so.4(_ZN7QWidget5eventEP6QEvent+0x62a)[0xb663e82a] /usr/lib/libQtGui.so.4(_ZN15QAbstractButton5eventEP6QEvent +0x3e)[0xb69d6b2e] /usr/lib/libQtGui.so.4(_ZN11QToolButton5eventEP6QEvent+0x4a)[0xb6aa7eca] /usr/lib/libQtGui.so.4(_ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent+0xb4)[0xb65e75f4] /usr/lib/libQtGui.so.4(_ZN12QApplication6notifyEP7QObjectP6QEvent +0xb09)[0xb65ec1a9] /usr/lib/libQtCore.so.4(_ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent+0x7b)[0xb63a67db] /usr/lib/libQtGui.so.4(_ZN19QApplicationPrivate14sendMouseEventEP7QWidgetP11QMouseEventS1_S1_PS1_R8QPointerIS0_Eb+0xf7)[0xb65e84a7] /usr/lib/libQtGui.so.4(+0x1aa16c)[0xb666d16c] /usr/lib/libQtGui.so.4(_ZN12QApplication15x11ProcessEventEP7_XEvent +0x16d9)[0xb666c2b9] /usr/lib/libQtGui.so.4(+0x1d10fb)[0xb66940fb] /usr/lib/libQtCore.so.4(_ZN10QEventLoop13processEventsE6QFlagsINS_17ProcessEventsFlagEE+0x49)[0xb63a5a29] /usr/lib/libQtCore.so.4(_ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE+0xfa)[0xb63a5c9a] /usr/lib/libQtCore.so.4(_ZN16QCoreApplication4execEv+0xaf)[0xb63aa4cf] /usr/lib/libQtGui.so.4(_ZN12QApplication4execEv+0x27)[0xb65e4d17] /usr/lib/gambas3/gb.qt4.so(+0x2eb73)[0xb73bfb73] /usr/bin/gambas3[0x8063e83] /lib/libc.so.6(__libc_start_main+0xe6)[0xb76cdb96] /usr/bin/gambas3[0x804a8b1] ======= Memory map: ======== 08048000-08076000 r-xp 00000000 08:03 1450398 /usr/bin/gbx3 08076000-0807b000 rw-p 0002e000 08:03 1450398 /usr/bin/gbx3 0807b000-0807d000 rw-p 00000000 00:00 0 09540000-0a143000 rw-p 00000000 00:00 0 [heap] b0d00000-b0d21000 rw-p 00000000 00:00 0 b0d21000-b0e00000 ---p 00000000 00:00 0 b0edf000-b0f17000 r--p 00000000 08:03 596861 /usr/share/fonts/TTF/DejaVuSansMono-Oblique.ttf b0f17000-b0f19000 r--p 00000000 08:03 1530418 /usr/share/fonts/100dpi/courR10-ISO8859-1.pcf.gz b0f19000-b0f31000 r--p 00000000 08:03 1668071 /usr/share/fonts/Type1/n022003l.pfb b0f31000-b0f7b000 r--p 00000000 08:03 1545373 /usr/share/fonts/TTF/cour.ttf b0f7b000-b0f95000 r--p 00000000 08:03 1545365 /usr/share/fonts/TTF/andalemo.ttf b0f95000-b0fa2000 r--p 00000000 08:03 1545427 /usr/share/fonts/TTF/VeraMono.ttf b0fa2000-b0fec000 r--p 00000000 08:03 596869 /usr/share/fonts/TTF/DejaVuSansMono-Bold.ttf b0fec000-b0fed000 r--p 00000000 08:03 2929365 /tmp/gambas.1000/7528/tr/it/LC_MESSAGES/gb.form.mo b0fed000-b106d000 r--p 00000000 08:03 596855 /usr/share/fonts/TTF/DejaVuSans-BoldOblique.ttf b106d000-b106f000 r-xp 00000000 08:03 1229808 /usr/lib/libssp.so.0.0.0 b106f000-b1070000 rw-p 00001000 08:03 1229808 /usr/lib/libssp.so.0.0.0 b1070000-b1073000 r-xp 00000000 08:03 1450497 /usr/lib/libgpg-error.so.0.5.0 b1073000-b1074000 rw-p 00002000 08:03 1450497 /usr/lib/libgpg-error.so.0.5.0 b1074000-b10e4000 r-xp 00000000 08:03 1226490 /usr/lib/libgcrypt.so.11.5.3 b10e4000-b10e7000 rw-p 0006f000 08:03 1226490 /usr/lib/libgcrypt.so.11.5.3 b10e7000-b10f6000 r-xp 00000000 08:03 1472087 /usr/lib/libtasn1.so.3.1.8 b10f6000-b10f7000 rw-p 0000e000 08:03 1472087 /usr/lib/libtasn1.so.3.1.8 b10f7000-b1105000 r-xp 00000000 08:03 1227092 /usr/lib/libavahi-client.so.3.2.5 b1105000-b1106000 rw-p 0000d000 08:03 1227092 /usr/lib/libavahi-client.so.3.2.5 b1106000-b1110000 r-xp 00000000 08:03 1226870 /usr/lib/libavahi-common.so.3.5.1 b1110000-b1111000 rw-p 00009000 08:03 1226870 /usr/lib/libavahi-common.so.3.5.1 b1111000-b11a4000 r-xp 00000000 08:03 1226418 /usr/lib/libgnutls.so.26.14.12 b11a4000-b11a8000 rw-p 00092000 08:03 1226418 /usr/lib/libgnutls.so.26.14.12 b11a8000-b11b9000 r-xp 00000000 08:03 2848416 /lib/libresolv-2.11.1.so b11b9000-b11ba000 r--p 00010000 08:03 2848416 /lib/libresolv-2.11.1.so b11ba000-b11bb000 rw-p 00011000 08:03 2848416 /lib/libresolv-2.11.1.so b11bb000-b11bd000 rw-p 00000000 00:00 0 b11bd000-b11c5000 r-xp 00000000 08:03 2848321 /lib/libcrypt-2.11.1.so b11c5000-b11c6000 r--p 00007000 08:03 2848321 /lib/libcrypt-2.11.1.so b11c6000-b11c7000 rw-p 00008000 08:03 2848321 /lib/libcrypt-2.11.1.so b11c7000-b11ee000 rw-p 00000000 00:00 0 b11ee000-b11ff000 r-xp 00000000 08:03 1227855 /usr/lib/libroken.so.18.1.0 b11ff000-b1200000 rw-p 00010000 08:03 1227855 /usr/lib/libroken.so.18.1.0 b1200000-b1227000 r-xp 00000000 08:03 1227102 /usr/lib/libwind.so.0.0.0 b1227000-b1228000 rw-p 00026000 08:03 1227102 /usr/lib/libwind.so.0.0.0 b1228000-b12a9000 r-xp 00000000 08:03 1227552 /usr/lib/libasn1.so.8.0.0 b12a9000-b12ac000 rw-p 00081000 08:03 1227552 /usr/lib/libasn1.so.8.0.0 b12ac000-b12e6000 r-xp 00000000 08:03 1226928 /usr/lib/libhx509.so.5.0.0 b12e6000-b12e8000 rw-p 0003a000 08:03 1226928 /usr/lib/libhx509.so.5.0.0 b12e8000-b134e000 r-xp 00000000 08:03 1227113 /usr/lib/libkrb5.so.26.0.0 b134e000-b1351000 rw-p 00065000 08:03 1227113 /usr/lib/libkrb5.so.26.0.0 b1351000-b137d000 r-xp 00000000 08:03 1226790 /usr/lib/libgssapi.so.2.0.0 b137d000-b137f000 rw-p 0002b000 08:03 1226790 /usr/lib/libgssapi.so.2.0.0 b137f000-b13c0000 r-xp 00000000 08:03 1229638 /usr/lib/libcups.so.2 b13c0000-b13c3000 rw-p 00040000 08:03 1229638 /usr/lib/libcups.so.2 b13ec000-b1416000 r-xp 00000000 08:03 2003452 /usr/lib/qt/plugins/codecs/libqjpcodecs.so b1416000-b1417000 rw-p 0002a000 08:03 2003452 /usr/lib/qt/plugins/codecs/libqjpcodecs.so b1417000-b143a000 r-xp 00000000 08:03 2003451 /usr/lib/qt/plugins/codecs/libqcncodecs.so b143a000-b143b000 rw-p 00022000 08:03 2003451 /usr/lib/qt/plugins/codecs/libqcncodecs.so b143b000-b1563000 rw-p 00000000 00:00 0 b1563000-b1564000 ---p 00000000 00:00 0 b1564000-b1d6c000 rw-p 00000000 00:00 0 b1d6c000-b1df8000 r--p 00000000 08:03 596865 /usr/share/fonts/TTF/DejaVuSans-Bold.ttf b1df8000-b1e90000 r--p 00000000 08:03 596852 /usr/share/fonts/TTF/DejaVuSans.ttf b1e90000-b2e0d000 rw-s 00000000 08:03 777389 /var/tmp/kdecache-leo/kpc/kde-icon-cache.data b2e0d000-b3226000 rw-s 00000000 08:03 777388 /var/tmp/kdecache-leo/kpc/kde-icon-cache.index b3226000-b327d000 r-xp 00000000 08:03 1226698 /usr/lib/libtiff.so.3.9.2 b327d000-b327f000 rw-p 00057000 08:03 1226698 /usr/lib/libtiff.so.3.9.2 b3281000-b32a7000 r-xp 00000000 08:03 2003453 /usr/lib/qt/plugins/codecs/libqtwcodecs.so b32a7000-b32a8000 rw-p 00025000 08:03 2003453 /usr/lib/qt/plugins/codecs/libqtwcodecs.so b32a8000-b3307000 r-xp 00000000 08:03 1227555 /usr/lib/libmng.so.1.0.0 b3307000-b330a000 rw-p 0005e000 08:03 1227555 /usr/lib/libmng.so.1.0.0 b330c000-b330e000 r-xp 00000000 08:03 2845258 /lib/libcom_err.so.2.1 b330e000-b330f000 rw-p 00001000 08:03 2845258 /lib/libcom_err.so.2.1 b330f000-b3313000 r-xp 00000000 08:03 1227557 /usr/lib/libheimntlm.so.0.1.0 b3313000-b3314000 rw-p 00003000 08:03 1227557 /usr/lib/libheimntlm.so.0.1.0 b3314000-b3326000 r-xp 00000000 08:03 2003454 /usr/lib/qt/plugins/codecs/libqkrcodecs.so b3326000-b3327000 rw-p 00012000 08:03 2003454 /usr/lib/qt/plugins/codecs/libqkrcodecs.so b3327000-b332e000 r-xp 00000000 08:03 2003460 /usr/lib/qt/plugins/imageformats/libqtiff.soAbortito That I don't if I open an example of those who come with Gambas. -- Leonardo Miliani www.leonardomiliani.com Webmaster e co-fondatore di www.gambas-it.org Il portale di riferimento per i programmatori Gambas italiani From gambas at ...1... Wed May 5 16:26:19 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 5 May 2010 16:26:19 +0200 Subject: [Gambas-user] Error compiling Gambas3 In-Reply-To: <1273068437.7554.2.camel@"hp_host"> References: <1272962392.4321.1.camel@"hp_host"> <201005041154.44588.lordheavym@...626...> <1273068437.7554.2.camel@"hp_host"> Message-ID: <201005051626.19693.gambas@...1...> > Il giorno mar, 04/05/2010 alle 11.54 +0200, Laurent Carlier ha scritto: > > Just built it fine here (arch64) > > > > Looking at the error, i guess something is rotten with your Qt4 > > installation, or got some corrupted memory/disk. > > > > Regards, > > No, nothing was broken... simply, there was some glitchies in the code > but made Gambas3 unable to compile on 32 bit systems :-) > > Now with revision 2933 I am able to compile Gambas again.... but! > If I try to create a new porject I get this error: > > *** glibc detected *** /usr/bin/gambas3: corrupted double-linked list: > 0x0a082e08 *** > ======= Backtrace: ========= > /lib/libc.so.6(+0x6c4f1)[0xb77234f1] > ... It should be fixed in revision #2934. Regards, -- Beno?t Minisini From ea7dfh at ...2382... Wed May 5 17:02:51 2010 From: ea7dfh at ...2382... (EA7DFH) Date: Wed, 05 May 2010 17:02:51 +0200 Subject: [Gambas-user] Error compiling Gambas3 In-Reply-To: <201005051626.19693.gambas@...1...> References: <1272962392.4321.1.camel@"hp_host"> <201005041154.44588.lordheavym@...626...> <1273068437.7554.2.camel@"hp_host"> <201005051626.19693.gambas@...1...> Message-ID: <4BE1889B.30206@...2382...> On 05/05/10 16:26, Beno?t Minisini wrote: >> Il giorno mar, 04/05/2010 alle 11.54 +0200, Laurent Carlier ha scritto: >>> Just built it fine here (arch64) >>> >>> Looking at the error, i guess something is rotten with your Qt4 >>> installation, or got some corrupted memory/disk. >>> >>> Regards, >> >> No, nothing was broken... simply, there was some glitchies in the code >> but made Gambas3 unable to compile on 32 bit systems :-) >> >> Now with revision 2933 I am able to compile Gambas again.... but! >> If I try to create a new porject I get this error: >> >> *** glibc detected *** /usr/bin/gambas3: corrupted double-linked list: >> 0x0a082e08 *** >> ======= Backtrace: ========= >> /lib/libc.so.6(+0x6c4f1)[0xb77234f1] >> ... > > It should be fixed in revision #2934. > > Regards, > #2934 Working flawlessly here (Ubuntu 10.04 32bit). Many thanks, Benoit Jes?s From eilert-sprachen at ...221... Wed May 5 17:32:23 2010 From: eilert-sprachen at ...221... (Rolf-Werner Eilert) Date: Wed, 05 May 2010 17:32:23 +0200 Subject: [Gambas-user] Toggle Button values Message-ID: <4BE18F87.9000603@...221...> Hi all, In Gambas 2 I used some ToggleButtons and found it difficult to make out what are the correct values to be set/returned. It turned out that only 0 for "not pressed" is reliable. I can set TRUE and FALSE to switch it on/off from code, but it will not return these but 1/0. I cannot set 1, however, so I got somewhat confused :-) There is no indication in the documentation yet. So, how is it supposed to be used? Regards Rolf From leonardo at ...1237... Wed May 5 18:23:48 2010 From: leonardo at ...1237... (Leonardo Miliani) Date: Wed, 05 May 2010 18:23:48 +0200 Subject: [Gambas-user] Error compiling Gambas3 In-Reply-To: <4BE1889B.30206@...2382...> References: <1272962392.4321.1.camel@"hp_host"> <201005041154.44588.lordheavym@...626...> <1273068437.7554.2.camel@"hp_host"> <201005051626.19693.gambas@...1...> <4BE1889B.30206@...2382...> Message-ID: <1273076628.32461.1.camel@"hp_host"> Il giorno mer, 05/05/2010 alle 17.02 +0200, EA7DFH ha scritto: > #2934 Working flawlessly here (Ubuntu 10.04 32bit). Same for me on Arch 32 bit: Gambas 3 DOES compile and DOES create new projects XD Now it's almost perfect... the only annoying thing is that icons of the IDE seem not to respect the choice in the preferences: if I choose the "gnome look" they continue to appear KDE-ish... -- Leonardo Miliani www.leonardomiliani.com Webmaster e co-fondatore di www.gambas-it.org Il portale di riferimento per i programmatori Gambas italiani From gambas at ...1... Wed May 5 19:11:25 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 5 May 2010 19:11:25 +0200 Subject: [Gambas-user] Error compiling Gambas3 In-Reply-To: <1273076628.32461.1.camel@"hp_host"> References: <1272962392.4321.1.camel@"hp_host"> <4BE1889B.30206@...2382...> <1273076628.32461.1.camel@"hp_host"> Message-ID: <201005051911.25782.gambas@...1...> > Il giorno mer, 05/05/2010 alle 17.02 +0200, EA7DFH ha scritto: > > #2934 Working flawlessly here (Ubuntu 10.04 32bit). > > Same for me on Arch 32 bit: > Gambas 3 DOES compile and DOES create new projects XD > > Now it's almost perfect... the only annoying thing is that icons of the > IDE seem not to respect the choice in the preferences: if I choose the > "gnome look" they continue to appear KDE-ish... Are gnome icons installed on your system? -- Beno?t Minisini From gambas.fr at ...626... Wed May 5 21:03:29 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Wed, 5 May 2010 21:03:29 +0200 Subject: [Gambas-user] Toggle Button values In-Reply-To: <4BE18F87.9000603@...221...> References: <4BE18F87.9000603@...221...> Message-ID: ok, in gambas and others language True and false are not true value but two choiced value togglebutton.value = true set the toogle pressed if togglebutton.value then print "pressed" try this too :) print cint(true) print cint(false) 2010/5/5 Rolf-Werner Eilert : > Hi all, > > In Gambas 2 I used some ToggleButtons and found it difficult to make out > what are the correct values to be set/returned. > > It turned out that only 0 for "not pressed" is reliable. I can set TRUE > and FALSE to switch it on/off from code, but it will not return these > but 1/0. I cannot set 1, however, so I got somewhat confused :-) > > There is no indication in the documentation yet. So, how is it supposed > to be used? > > Regards > > Rolf > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From leonardo at ...1237... Wed May 5 22:43:15 2010 From: leonardo at ...1237... (Leonardo Miliani) Date: Wed, 05 May 2010 22:43:15 +0200 Subject: [Gambas-user] Error compiling Gambas3 In-Reply-To: <201005051911.25782.gambas@...1...> References: <1272962392.4321.1.camel@"hp_host"> <4BE1889B.30206@...2382...> <1273076628.32461.1.camel@"hp_host"> <201005051911.25782.gambas@...1...> Message-ID: <1273092195.21365.1.camel@"hp_host"> Il giorno mer, 05/05/2010 alle 19.11 +0200, Beno?t Minisini ha scritto: > > Il giorno mer, 05/05/2010 alle 17.02 +0200, EA7DFH ha scritto: > > > #2934 Working flawlessly here (Ubuntu 10.04 32bit). > > > > Same for me on Arch 32 bit: > > Gambas 3 DOES compile and DOES create new projects XD > > > > Now it's almost perfect... the only annoying thing is that icons of the > > IDE seem not to respect the choice in the preferences: if I choose the > > "gnome look" they continue to appear KDE-ish... > > Are gnome icons installed on your system? > Of course, they are: /usr/share/icons/gnome -- Leonardo Miliani www.leonardomiliani.com Webmaster e co-fondatore di www.gambas-it.org Il portale di riferimento per i programmatori Gambas italiani From prog at ...2177... Thu May 6 19:29:09 2010 From: prog at ...2177... (craf) Date: Thu, 06 May 2010 13:29:09 -0400 Subject: [Gambas-user] Installer in KDE Message-ID: <1273166949.2043.5.camel@...2406...> Hi Benoit. I am now testing an installation of a project in Gambas KDE Desktop. For this I have tested it on Kubuntu, 8.04 - 8.10 - 9.04 - 9.10 versions (on 10.4 that I failed to recognize the usb virtualbox). The project is a simple form, which I believe a version of Gambas 2.20 on Kubuntu 8.04 distribution and I'm trying it in other versions. the results are: 1) For projects Gambas KDE apparently the library is only needed libffi. (Not using other components, but only gb.qt - qb.qt.ext - gb.draw - gb.form - gb.so) 2) If you install Gambas on Kubuntu for example sudo aptitude install gambas2, to create the project and bring it to another distribution, this does not work. Analyzing why not create libraries with extension .la 3) I have not managed to take applications for the KDE desktop appearance, must be missing some library that can do this. In gnome there are no problems. Any ideas on this? Regards, Cristian From fabianfloresvadell at ...626... Fri May 7 04:35:53 2010 From: fabianfloresvadell at ...626... (=?ISO-8859-1?Q?Fabi=E1n_Flores_Vadell?=) Date: Thu, 6 May 2010 23:35:53 -0300 Subject: [Gambas-user] WHILE and AND: please explain me.... In-Reply-To: <7186615864330717319@...714...> References: <7186615864330717319@...714...> Message-ID: 2010/5/4, Leonardo Miliani : > I'm working with this little piece of code, it's the Insertion Sort: > > PUBLIC SUB InsertionSort(matrix AS String[]) > DIM i, j AS Integer > DIM x AS String > > FOR i = 1 TO (matrix.Count - 1) > x = matrix[i] > j = i - 1 > WHILE j >= 0 AND matrix[j] > x > matrix[j + 1] = matrix[j] > j -= 1 > WEND > matrix[j + 1] = x > NEXT > END > > But I get an "Out of bound" error in the WHILE test, because j begins > -1. > > Usually (in other languages this is the behavior) the AND test checks > the first condition, and if it is false then it checks the second one. > OK... but shouldn't Gambas bypass the WHILE statement because j is > negative? > > -- > Leonardo Miliani > www.leonardomiliani.com Hi Leonardo. You have to avoid than j can become negative when you use it like index on the "matrix" array. So, I think that you can do it, modifying the matrix index in the logical test, using the IF() function: WHILE j >= 0 AND matrix[IF(j>0, j, 0)] > x -- Fabi?n Flores Vadell www.speedbooksargentina.blogspot.com From rterry at ...1946... Fri May 7 06:29:55 2010 From: rterry at ...1946... (richard terry) Date: Fri, 7 May 2010 14:29:55 +1000 Subject: [Gambas-user] Wait statements > stack overflow (gb3) Message-ID: <201005071429.55204.rterry@...1946...> Hi LIst, I'm automatically parsing many many thousands of pages of documents, the patients are in a listbox, and the documents in another. (with underlying collections of course). The basic code looks like this: If cvwInboxDocuments.count = 0 Then '.... do a whole lot of stuff Wait 'make the gui refresh Else '.... do a whole lot of stuff Wait 'make the gui refresh Wait End If When this runs, it looks at each of the some 1800 pages of documents, generated from hl7 files which were previously parsed into the table by an automated process and converts the essential info to html for display, which it resaves and and does the appropriate linking it needs to do to patient names, provider names, test names etc. Though this could all run 'under the hood -automaed', I put the Wait statements in so I could see the lists updating on the screen to watch what was happening. If I run the code, after doing about 1/4 of the work it dies on the Wait statement with a 'Stack Overflow' error. If I comment out the Wait statements > it all runs without a problem. Anyone know what's happening?? Regards Richard From rterry at ...1946... Fri May 7 06:41:52 2010 From: rterry at ...1946... (richard terry) Date: Fri, 7 May 2010 14:41:52 +1000 Subject: [Gambas-user] Wait statements > stack overflow (gb3) (oops -typo) In-Reply-To: <201005071429.55204.rterry@...1946...> References: <201005071429.55204.rterry@...1946...> Message-ID: <201005071441.52490.rterry@...1946...> On Friday 07 May 2010 14:29:55 richard terry wrote: sorry, misleading code the second Wait was a typo, it should read this: > Hi LIst, > > I'm automatically parsing many many thousands of pages of documents, the > patients are in a listbox, and the documents in another. (with underlying > collections of course). > > The basic code looks like this: > If cvwInboxDocuments.count = 0 Then '.... do a whole lot of stuff Wait 'make the gui refresh Else '.... do a whole lot of stuff Wait 'make the gui refresh End If > > When this runs, it looks at each of the some 1800 pages of documents, > generated from hl7 files which were previously parsed into the table by an > automated process and converts the essential info to html for display, > which it resaves and and does the appropriate linking it needs to do to > patient names, provider names, test names etc. > > Though this could all run 'under the hood -automaed', I put the Wait > statements in so I could see the lists updating on the screen to watch what > was happening. > > If I run the code, after doing about 1/4 of the work it dies on the Wait > statement with a 'Stack Overflow' error. > > If I comment out the Wait statements > it all runs without a problem. > > Anyone know what's happening?? > > Regards > > Richard > > --------------------------------------------------------------------------- > --- > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From eilert-sprachen at ...221... Fri May 7 09:12:40 2010 From: eilert-sprachen at ...221... (Rolf-Werner Eilert) Date: Fri, 07 May 2010 09:12:40 +0200 Subject: [Gambas-user] Console questions Message-ID: <4BE3BD68.3060706@...221...> Good morning folks, Just playing around with console applications. Opened a new project and made a "Hello world". There are some questions... About the GUI: When I press the Play button, I can't see anything (of course). But isn't this somewhat unlogical, I mean, I have to make a binary and start the binary from the command line in some terminal. Play should open a terminal, shouldn't it? Or should it simply be disabled? Is there something like CLS in a commandline app? How do other programs - like "top" for instance - handle this? If the application is opened in a terminal window within the GUI, the window can be changed during operation. Clever commandline applications will adapt their row/height ratio to this. How can I read the number of rows and columns? Thanks for your help. Rolf From eilert-sprachen at ...221... Fri May 7 09:51:27 2010 From: eilert-sprachen at ...221... (Rolf-Werner Eilert) Date: Fri, 07 May 2010 09:51:27 +0200 Subject: [Gambas-user] Pipe doesn't receive contents Message-ID: <4BE3C67F.8040906@...221...> Trying the example code for pipes, I only get a waiting prompt, and then it jumps out of the loop. I added two little statements to have some output: DIM hFile AS File DIM sLine AS String hFile = PIPE "/tmp/FIFO1" FOR INPUT PRINT "Now let's start:" WHILE NOT Eof(hFile) LINE INPUT #hFile, sLine PRINT sLine WEND PRINT "That's it." When I start this, it prints the start message and waits. It's in a Konsole window within KDE. I open another terminal and type ls > /tmp/FIFO1 Instead of giving the file list, it just prints the finish message and quits. Did I do something wrong? Rolf From doriano.blengino at ...1909... Fri May 7 09:58:44 2010 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Fri, 07 May 2010 09:58:44 +0200 Subject: [Gambas-user] Wait statements > stack overflow (gb3) (oops -typo) In-Reply-To: <201005071441.52490.rterry@...1946...> References: <201005071429.55204.rterry@...1946...> <201005071441.52490.rterry@...1946...> Message-ID: <4BE3C834.1080603@...1909...> richard terry ha scritto: > On Friday 07 May 2010 14:29:55 richard terry wrote: > sorry, misleading code the second Wait was a typo, it should read this: > > > >> Hi LIst, >> >> I'm automatically parsing many many thousands of pages of documents, the >> patients are in a listbox, and the documents in another. (with underlying >> collections of course). >> >> The basic code looks like this: >> >> > If cvwInboxDocuments.count = 0 Then > '.... do a whole lot of stuff > Wait 'make the gui refresh > Else > '.... do a whole lot of stuff > Wait 'make the gui refresh > > End If > >> When this runs, it looks at each of the some 1800 pages of documents, >> generated from hl7 files which were previously parsed into the table by an >> automated process and converts the essential info to html for display, >> which it resaves and and does the appropriate linking it needs to do to >> patient names, provider names, test names etc. >> >> Though this could all run 'under the hood -automaed', I put the Wait >> statements in so I could see the lists updating on the screen to watch what >> was happening. >> >> If I run the code, after doing about 1/4 of the work it dies on the Wait >> statement with a 'Stack Overflow' error. >> >> If I comment out the Wait statements> it all runs without a problem. >> I think it is a problem of re-entrancy. When you do a WAIT, other events can fire; if one of this events enters again your subroutine, the whole thing restarts, and the stack grows more and more. You can put a PRINT or a message.xxx at the beginning of your routine, to see if, as supposed, it is executed only once. If, during the work, you see two messages, then you've found the problem. If this is the case, you must use a global variable to avoid to reenter the same routine. If you see only one message, then the problem is elsewhere. May be that the reentering is somewhere else, though - there is this nice convintions that events should be fired even when modifications came from code... Hope this helps - regards, Doriano From eilert-sprachen at ...221... Fri May 7 11:03:48 2010 From: eilert-sprachen at ...221... (Rolf-Werner Eilert) Date: Fri, 07 May 2010 11:03:48 +0200 Subject: [Gambas-user] Waiting for keystrokes in a console Message-ID: <4BE3D774.8070201@...221...> When I am in a console application, I merely have a PUBLIC SUB Main() END which will once go through and stop. So I guess when the program has to wait for the user to press a key, I would have to monitor keystrokes like in good old BASIC times such as while not instat(): wend a$ = keystr$ (Was it keystr, or what? Don't remember, it was something like that... :-) ) In Gambas, there is no instat() and stuff, so I thought maybe I can do that with something like PUBLIC SUB MMain_KeyPress() END But when would this be activated? It wouldn't actually wait for a keystroke but Main would just run through and quit. I know there is the Console example, but it requires a bash opened background and catching its events via Process and so on - isn't that a bit too much? You see, I don't get on with this. Probably I'm watching the problem from the wrong direction ;-) so thanks for your help. Regards Rolf From gambas at ...1... Fri May 7 11:15:30 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Fri, 7 May 2010 11:15:30 +0200 Subject: [Gambas-user] Console questions In-Reply-To: <4BE3BD68.3060706@...221...> References: <4BE3BD68.3060706@...221...> Message-ID: <201005071115.30724.gambas@...1...> > Good morning folks, > > Just playing around with console applications. Opened a new project and > made a "Hello world". There are some questions... > > About the GUI: When I press the Play button, I can't see anything (of > course). But isn't this somewhat unlogical, I mean, I have to make a > binary and start the binary from the command line in some terminal. Play > should open a terminal, shouldn't it? Or should it simply be disabled? > The output of your program goes to the IDE console. In Gambas 3, you can use a true terminal emulator for that instead, if you need. > Is there something like CLS in a commandline app? How do other programs > - like "top" for instance - handle this? Special terminal commands like that are handled by special character sequences that depends on the type of the terminal. There is a library on Unix named NCurses that abstracts that (with it you will have a "CLS" command for any kind of terminal), but there is no support for it in Gambas at the moment. So you have to send the special character sequences by yourself. If someone wants to make a useful component in C/C++, NCurses is a good start! > > If the application is opened in a terminal window within the GUI, the > window can be changed during operation. Clever commandline applications > will adapt their row/height ratio to this. How can I read the number of > rows and columns? This is handled by the ncurses library too. Regards, -- Beno?t Minisini From gambas at ...1... Fri May 7 11:23:15 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Fri, 7 May 2010 11:23:15 +0200 Subject: [Gambas-user] Waiting for keystrokes in a console In-Reply-To: <4BE3D774.8070201@...221...> References: <4BE3D774.8070201@...221...> Message-ID: <201005071123.15152.gambas@...1...> > When I am in a console application, I merely have a > > PUBLIC SUB Main() > > END > > which will once go through and stop. So I guess when the program has to > wait for the user to press a key, I would have to monitor keystrokes > like in good old BASIC times such as > > while not instat(): wend > a$ = keystr$ > > (Was it keystr, or what? Don't remember, it was something like that... :-) > ) > > In Gambas, there is no instat() and stuff, so I thought maybe I can do > that with something like > > PUBLIC SUB MMain_KeyPress() > > END > > But when would this be activated? It wouldn't actually wait for a > keystroke but Main would just run through and quit. > > I know there is the Console example, but it requires a bash opened > background and catching its events via Process and so on - isn't that a > bit too much? > > You see, I don't get on with this. Probably I'm watching the problem > from the wrong direction ;-) so thanks for your help. > > Regards > > Rolf > Catching the standard input is automatically done if you create a static public event handler "Application_Read" in your startup class. But catching keystrokes easily is not possible, unless implementing a component based on ncurses. Regards, -- Beno?t Minisini From gambas at ...1... Fri May 7 11:24:13 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Fri, 7 May 2010 11:24:13 +0200 Subject: [Gambas-user] Console questions In-Reply-To: <201005071115.30724.gambas@...1...> References: <4BE3BD68.3060706@...221...> <201005071115.30724.gambas@...1...> Message-ID: <201005071124.13261.gambas@...1...> For more details on how works ncurses: http://www.linux.org/docs/ldp/howto/NCURSES-Programming-HOWTO/ -- Beno?t Minisini From rolf.frogs at ...221... Fri May 7 11:33:38 2010 From: rolf.frogs at ...221... (Rolf Schmidt) Date: Fri, 7 May 2010 11:33:38 +0200 Subject: [Gambas-user] Pipe doesn't receive contents In-Reply-To: <4BE3C67F.8040906@...221...> References: <4BE3C67F.8040906@...221...> Message-ID: <201005071133.42001.rolf.frogs@...221...> Hello Rolf-Werner > DIM hFile AS File > DIM sLine AS String > > hFile = PIPE "/tmp/FIFO1" FOR INPUT > > PRINT "Now let's start:" > > WHILE NOT Eof(hFile) > LINE INPUT #hFile, sLine > PRINT sLine > WEND > > PRINT "That's it." > You can't wait until EOF on a named pipe! Also a 'tail' on a named pipe will never give you some data - but 'cat' do! Just read and find another mechanism to stop reading. Hope that helps Rolf -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part. URL: From eilert-sprachen at ...221... Fri May 7 12:01:42 2010 From: eilert-sprachen at ...221... (Rolf-Werner Eilert) Date: Fri, 07 May 2010 12:01:42 +0200 Subject: [Gambas-user] Console questions In-Reply-To: <201005071115.30724.gambas@...1...> References: <4BE3BD68.3060706@...221...> <201005071115.30724.gambas@...1...> Message-ID: <4BE3E506.2090005@...221...> Am 07.05.2010 11:15, schrieb Beno?t Minisini: >> Good morning folks, >> >> Just playing around with console applications. Opened a new project and >> made a "Hello world". There are some questions... >> >> About the GUI: When I press the Play button, I can't see anything (of >> course). But isn't this somewhat unlogical, I mean, I have to make a >> binary and start the binary from the command line in some terminal. Play >> should open a terminal, shouldn't it? Or should it simply be disabled? >> > > The output of your program goes to the IDE console. In Gambas 3, you can use a > true terminal emulator for that instead, if you need. Unfortunately, due to my too old Linux server here I can neither compile nor use Gambas3 yet. > >> Is there something like CLS in a commandline app? How do other programs >> - like "top" for instance - handle this? > > Special terminal commands like that are handled by special character sequences > that depends on the type of the terminal. > > There is a library on Unix named NCurses that abstracts that (with it you will > have a "CLS" command for any kind of terminal), but there is no support for it > in Gambas at the moment. So you have to send the special character sequences > by yourself. Aaah - I remember vaguely I ran into this a long time ago. > > If someone wants to make a useful component in C/C++, NCurses is a good start! > >> >> If the application is opened in a terminal window within the GUI, the >> window can be changed during operation. Clever commandline applications >> will adapt their row/height ratio to this. How can I read the number of >> rows and columns? > > This is handled by the ncurses library too. > > Regards, > Anyway, thanks a lot for the information. At least now I know where to look for the details :-) Regards Rolf From eilert-sprachen at ...221... Fri May 7 12:03:03 2010 From: eilert-sprachen at ...221... (Rolf-Werner Eilert) Date: Fri, 07 May 2010 12:03:03 +0200 Subject: [Gambas-user] Waiting for keystrokes in a console In-Reply-To: <201005071123.15152.gambas@...1...> References: <4BE3D774.8070201@...221...> <201005071123.15152.gambas@...1...> Message-ID: <4BE3E557.9090303@...221...> Am 07.05.2010 11:23, schrieb Beno?t Minisini: >> When I am in a console application, I merely have a >> >> PUBLIC SUB Main() >> >> END >> >> which will once go through and stop. So I guess when the program has to >> wait for the user to press a key, I would have to monitor keystrokes >> like in good old BASIC times such as >> >> while not instat(): wend >> a$ = keystr$ >> >> (Was it keystr, or what? Don't remember, it was something like that... :-) >> ) >> >> In Gambas, there is no instat() and stuff, so I thought maybe I can do >> that with something like >> >> PUBLIC SUB MMain_KeyPress() >> >> END >> >> But when would this be activated? It wouldn't actually wait for a >> keystroke but Main would just run through and quit. >> >> I know there is the Console example, but it requires a bash opened >> background and catching its events via Process and so on - isn't that a >> bit too much? >> >> You see, I don't get on with this. Probably I'm watching the problem >> from the wrong direction ;-) so thanks for your help. >> >> Regards >> >> Rolf >> > > Catching the standard input is automatically done if you create a static > public event handler "Application_Read" in your startup class. > > But catching keystrokes easily is not possible, unless implementing a > component based on ncurses. > > Regards, > So I'll try Application_Read. Thanks for that tip, too! Regards Rolf From eilert-sprachen at ...221... Fri May 7 12:12:57 2010 From: eilert-sprachen at ...221... (Rolf-Werner Eilert) Date: Fri, 07 May 2010 12:12:57 +0200 Subject: [Gambas-user] Console questions In-Reply-To: <201005071124.13261.gambas@...1...> References: <4BE3BD68.3060706@...221...> <201005071115.30724.gambas@...1...> <201005071124.13261.gambas@...1...> Message-ID: <4BE3E7A9.4040606@...221...> Am 07.05.2010 11:24, schrieb Beno?t Minisini: > For more details on how works ncurses: > > http://www.linux.org/docs/ldp/howto/NCURSES-Programming-HOWTO/ > Very interesting document - got a favourite place in my bookmarks :-) Thanks again Rolf From doriano.blengino at ...1909... Fri May 7 12:14:12 2010 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Fri, 07 May 2010 12:14:12 +0200 Subject: [Gambas-user] Pipe doesn't receive contents In-Reply-To: <201005071133.42001.rolf.frogs@...221...> References: <4BE3C67F.8040906@...221...> <201005071133.42001.rolf.frogs@...221...> Message-ID: <4BE3E7F4.3020002@...1909...> Rolf Schmidt ha scritto: > Hello Rolf-Werner > >> DIM hFile AS File >> DIM sLine AS String >> >> hFile = PIPE "/tmp/FIFO1" FOR INPUT >> >> PRINT "Now let's start:" >> >> WHILE NOT Eof(hFile) >> LINE INPUT #hFile, sLine >> PRINT sLine >> WEND >> >> PRINT "That's it." >> >> > You can't wait until EOF on a named pipe! Also a 'tail' on a named pipe will > never give you some data - but 'cat' do! > > Just read and find another mechanism to stop reading. > I tried cat and tail on named fifo, and both work. You can start first either of the two sides, and they work. I did it with: mkfifo /tmp/fifo ls >/tmp/fifo then, in another terminal: tail -3 /tmp/fifo I also tried to start first the tail command, and then the cat >... Rolf-Werner: you can try to first start "ls >/tmp.FIFO" and then your gambas app; you can also try to open /tmp/FIFO from gambas using a normal syntax instead of PIPE special one. Just a try... Regards, Doriano From eilert-sprachen at ...221... Fri May 7 12:17:00 2010 From: eilert-sprachen at ...221... (Rolf-Werner Eilert) Date: Fri, 07 May 2010 12:17:00 +0200 Subject: [Gambas-user] Pipe doesn't receive contents In-Reply-To: <201005071133.42001.rolf.frogs@...221...> References: <4BE3C67F.8040906@...221...> <201005071133.42001.rolf.frogs@...221...> Message-ID: <4BE3E89C.9050309@...221...> Am 07.05.2010 11:33, schrieb Rolf Schmidt: > Hello Rolf-Werner > >> DIM hFile AS File >> DIM sLine AS String >> >> hFile = PIPE "/tmp/FIFO1" FOR INPUT >> >> PRINT "Now let's start:" >> >> WHILE NOT Eof(hFile) >> LINE INPUT #hFile, sLine >> PRINT sLine >> WEND >> >> PRINT "That's it." >> > > You can't wait until EOF on a named pipe! Also a 'tail' on a named pipe will > never give you some data - but 'cat' do! > > Just read and find another mechanism to stop reading. > > Hope that helps > Rolf > Errr - but this is exactly the proposal from the documentation. It should be updated if it's wrong Ok, I'll try to find another way... Rolf-Werner ;-) From gambas.fr at ...626... Fri May 7 14:02:36 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Fri, 7 May 2010 14:02:36 +0200 Subject: [Gambas-user] Wait statements > stack overflow (gb3) In-Reply-To: <201005071429.55204.rterry@...1946...> References: <201005071429.55204.rterry@...1946...> Message-ID: are you in a timer event ?? look at the doc about this problem it's explained : http://gambasdoc.org/help/lang/wait 2010/5/7 richard terry : > Hi LIst, > > I'm automatically parsing many many thousands of pages of documents, the > patients are in a listbox, and the documents in another. (with underlying > collections of course). > > The basic code looks like this: > > If cvwInboxDocuments.count = 0 Then > ? ? ? ? ? ? ? ? ?'.... do a whole lot of stuff > ? ? ?Wait ? ? ?'make the gui refresh > ?Else > ? ? ? ? ? ? ? ? ? '.... do a whole lot of stuff > ? ? ?Wait ? ? ?'make the gui refresh > > ? ? Wait > ?End If > > When this runs, it looks at each of the some 1800 pages of documents, > generated from hl7 files which were previously ?parsed into the table by an > automated process and converts the essential info to html ?for display, which > it resaves and ?and does the appropriate linking it needs to do to patient > names, provider names, test names etc. > > Though this could all run 'under the hood -automaed', I put the Wait > statements in so I could see the lists updating on the screen to watch what > was happening. > > If I run the code, after doing about 1/4 of the work it dies on the Wait > statement with a 'Stack Overflow' error. > > If I comment out the Wait statements > it all runs without a problem. > > Anyone know what's happening?? > > Regards > > Richard > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas.fr at ...626... Fri May 7 14:05:12 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Fri, 7 May 2010 14:05:12 +0200 Subject: [Gambas-user] WHILE and AND: please explain me.... In-Reply-To: References: <7186615864330717319@...714...> Message-ID: and a tips : FOR i = 1 TO (matrix.Count - 1) you can do : FOR i = 1 TO matrix.Max 2010/5/7 Fabi?n Flores Vadell : > 2010/5/4, Leonardo Miliani : >> I'm working with this little piece of code, it's the Insertion Sort: >> >> PUBLIC SUB InsertionSort(matrix AS String[]) >> DIM i, j AS Integer >> DIM x AS String >> >> ? FOR i = 1 TO (matrix.Count - 1) >> ? ? x = matrix[i] >> ? ? j = i - 1 >> ? ? WHILE j >= 0 AND matrix[j] > x >> ? ? ? matrix[j + 1] = matrix[j] >> ? ? ? j -= 1 >> ? ? WEND >> ? ? matrix[j + 1] = x >> ? NEXT >> END >> >> But I get an "Out of bound" error in the WHILE test, because j begins >> -1. >> >> Usually (in other languages this is the behavior) the AND test checks >> the first condition, and if it is false then it checks the second one. >> OK... but shouldn't Gambas bypass the WHILE statement because j is >> negative? >> >> -- >> Leonardo Miliani >> www.leonardomiliani.com > > Hi Leonardo. You have to avoid than j can become negative when you use > it like index on the "matrix" array. So, I think that you can do it, > modifying the matrix index in the logical test, using the IF() > function: > > WHILE j >= 0 AND matrix[IF(j>0, j, 0)] > x > > > -- > Fabi?n Flores Vadell > www.speedbooksargentina.blogspot.com > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From rolf.frogs at ...221... Fri May 7 16:32:15 2010 From: rolf.frogs at ...221... (Rolf Schmidt) Date: Fri, 7 May 2010 16:32:15 +0200 Subject: [Gambas-user] Pipe doesn't receive contents In-Reply-To: <4BE3E7F4.3020002@...1909...> References: <4BE3C67F.8040906@...221...> <201005071133.42001.rolf.frogs@...221...> <4BE3E7F4.3020002@...1909...> Message-ID: <201005071632.19388.rolf.frogs@...221...> Hi Doriano > > You can't wait until EOF on a named pipe! Also a 'tail' on a named pipe > > will never give you some data - but 'cat' do! > > > > Just read and find another mechanism to stop reading. > > I tried cat and tail on named fifo, and both work. You can start first > either of the two sides, and they work. > I did it with: > > mkfifo /tmp/fifo > ls >/tmp/fifo ls sends a termiated data stream! > > then, in another terminal: > > tail -3 /tmp/fifo Of course you can read it, because ls stops when the content is in the pipe. > I also tried to start first the tail command, and then the cat >... > See a server which sends data via named pipe, then you will recognice, that 'cat' can show the data while 'tail' waits for an end of file, which will only come when the server stops! Hope it becomes more clear. Rolf -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part. URL: From richard.j.walker at ...247... Fri May 7 19:02:52 2010 From: richard.j.walker at ...247... (Richard) Date: Fri, 7 May 2010 18:02:52 +0100 Subject: [Gambas-user] Runaway memory consumption not released until program exit Message-ID: <201005071802.52675.richard.j.walker@...247...> Hi everybody, I am using Gambas 2.20.0 on Mandriva 2010.0. The desktop is LXDE and the gui toolkit might possibly be GTK. I have written a button event handler to process hundreds or thousands of .png images in a directory. The main memory available when the program starts is around 1.8 GBytes. After processing just 744 images (in testing) this falls to about 74 MBytes. The memory is not freed on exit from the event handler, only when I exit from the program. I use only 1 Image object; a variable called "frame". I have tried declaring this as a local in the event handler and as a class-visible variable with no apparent change in the way memory is eaten and never disgorged. I do three things with my frame variable in a loop which iterates for all frames in a directory; 1. I load it from an image on disc 2. I "stretch" it to make its width smaller(!) 3. I save the altered frame to a different directory Specifically the significant lines of code look like; frame = Image.Load(SourceImage) frame.Stretch(NewWidth, NewHeight) frame.Save(DestinationImage) Outside the loop I now do frame = NULL, but this has no effect. Is it possible that my code is allocating multiple "anonymous" frame objects and not releasing them? I have read Benoit's explanation in this list of Gambas memory management (Re: [Gambas-user] Memory Management, on 08/09/2007 09:19). I turned to Gambas to program this function because my first choice, imagemagick, would always run out of memory without processing a single frame. The Gambas solution works, but no more work can be done without killing the program and restarting it - not very convenient. I anticipate that typical uses of the program will have to handle 10-30 thousand png images at a time. Can anyone suggest how I find out what is so hungry for my memory, and hopefully how to suppress its appetite? Richard From doriano.blengino at ...1909... Fri May 7 19:59:03 2010 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Fri, 07 May 2010 19:59:03 +0200 Subject: [Gambas-user] Pipe doesn't receive contents In-Reply-To: <201005071632.19388.rolf.frogs@...221...> References: <4BE3C67F.8040906@...221...> <201005071133.42001.rolf.frogs@...221...> <4BE3E7F4.3020002@...1909...> <201005071632.19388.rolf.frogs@...221...> Message-ID: <4BE454E7.9010901@...1909...> Rolf Schmidt ha scritto: > Hi Doriano > > >>> You can't wait until EOF on a named pipe! Also a 'tail' on a named pipe >>> will never give you some data - but 'cat' do! >>> >>> Just read and find another mechanism to stop reading. >>> >> I tried cat and tail on named fifo, and both work. You can start first >> either of the two sides, and they work. >> I did it with: >> >> mkfifo /tmp/fifo >> ls>/tmp/fifo >> > ls sends a termiated data stream! > >> then, in another terminal: >> >> tail -3 /tmp/fifo >> > Of course you can read it, because ls stops when the content is in the pipe. > > >> I also tried to start first the tail command, and then the cat>... >> >> > See a server which sends data via named pipe, then you will recognice, > that 'cat' can show the data while 'tail' waits for an end of file, which > will only come when the server stops! > > Hope it becomes more clear. > Yes, it is clear, perhaps more for me than for you... Our friend Rolf-Werner tried to read a fifo from gambas. The outputting source was an "ls >...": When I start this, it prints the start message and waits. It's in a Konsole window within KDE. I open another terminal and type ls> /tmp/FIFO1 Instead of giving the file list, it just prints the finish message and quits. This is exactly the same thing I tried after you said that FIFOs don't carry any EOF. It works - so FIFOs do carry EOF - in fact, I already use them in real world, but I didn't want to say it. You are saying another thing: if the server does not close its outputting channel, then the FIFO will not transmit an EOF. Clearly, a FIFO can not invent non-existent EOFs! In fact, I tried: mkfifo /tmp/fifo cat /tmp/fifo then, in another terminal: cat > /tmp/fifo At this point, *both* the programs wait until I terminate one of them; unsing tail(1) gives the expected results: it hangs waiting for an eof from the source - if you don't terminate the outputting source, this eof will never come. Now, for me everything is clear - is it clear for you too? :-) Perhaps you are referring to other problems, at kernel level, but this is a very simple situation. Regards, Doriano From gambas.fr at ...626... Fri May 7 20:08:49 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Fri, 7 May 2010 20:08:49 +0200 Subject: [Gambas-user] Runaway memory consumption not released until program exit In-Reply-To: <201005071802.52675.richard.j.walker@...247...> References: <201005071802.52675.richard.j.walker@...247...> Message-ID: frame = frame.Stretch(NewWidth, NewHeight) if you do not re assign frame stretching returned image ... the image will not be changed http://gambasdoc.org/help/comp/gb.image.imlib/image/stretch?v3 2010/5/7 Richard : > Hi everybody, > > I am using Gambas 2.20.0 on Mandriva 2010.0. The desktop is LXDE and the gui > toolkit might possibly be GTK. > > I have written a button event handler to process hundreds or thousands of .png > images in a directory. The main memory available when the program starts is > around 1.8 GBytes. After processing just 744 images (in testing) this falls > to about 74 MBytes. The memory is not freed on exit from the event handler, > only when I exit from the program. > > I use only 1 Image object; a variable called "frame". I have tried declaring > this as a local in the event handler and as a class-visible variable with no > apparent change in the way memory is eaten and never disgorged. > > I do three things with my frame variable in a loop which iterates for all > frames in a directory; > > 1. I load it from an image on disc > 2. I "stretch" it to make its width smaller(!) > 3. I save the altered frame to a different directory > > Specifically the significant lines of code look like; > > frame = Image.Load(SourceImage) > frame.Stretch(NewWidth, NewHeight) > frame.Save(DestinationImage) > > Outside the loop I now do frame = NULL, but this has no effect. > > Is it possible that my code is allocating multiple "anonymous" frame objects > and not releasing them? I have read Benoit's explanation in this list of > Gambas memory management (Re: [Gambas-user] Memory Management, on > 08/09/2007 09:19). > > I turned to Gambas to program this function because my first choice, > imagemagick, would always run out of memory without processing a single > frame. The Gambas solution works, but no more work can be done without > killing the program and restarting it - not very convenient. I anticipate > that typical uses of the program will have to handle 10-30 thousand png > images at a time. > > Can anyone suggest how I find out what is so hungry for my memory, and > hopefully how to suppress its appetite? > > Richard > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From richard.j.walker at ...247... Fri May 7 21:10:54 2010 From: richard.j.walker at ...247... (Richard) Date: Fri, 7 May 2010 20:10:54 +0100 Subject: [Gambas-user] Runaway memory consumption not released until program exit In-Reply-To: References: <201005071802.52675.richard.j.walker@...247...> Message-ID: <201005072010.54737.richard.j.walker@...247...> On Friday 07 May 2010 19:08:49 Fabien Bodard wrote: > frame = frame.Stretch(NewWidth, NewHeight) > > if you do not re assign frame stretching returned image ... the image > will not be changed > > http://gambasdoc.org/help/comp/gb.image.imlib/image/stretch?v3 > > 2010/5/7 Richard : > > Hi everybody, > > > > I am using Gambas 2.20.0 on Mandriva 2010.0. The desktop is LXDE and the > > gui toolkit might possibly be GTK. > > > > I have written a button event handler to process hundreds or thousands of > > .png images in a directory. The main memory available when the program > > starts is around 1.8 GBytes. After processing just 744 images (in > > testing) this falls to about 74 MBytes. The memory is not freed on exit > > from the event handler, only when I exit from the program. > > > > I use only 1 Image object; a variable called "frame". I have tried > > declaring this as a local in the event handler and as a class-visible > > variable with no apparent change in the way memory is eaten and never > > disgorged. > > > > I do three things with my frame variable in a loop which iterates for all > > frames in a directory; > > > > 1. I load it from an image on disc > > 2. I "stretch" it to make its width smaller(!) > > 3. I save the altered frame to a different directory > > > > Specifically the significant lines of code look like; > > > > frame = Image.Load(SourceImage) > > frame.Stretch(NewWidth, NewHeight) > > frame.Save(DestinationImage) > > > > Outside the loop I now do frame = NULL, but this has no effect. > > > > Is it possible that my code is allocating multiple "anonymous" frame > > objects and not releasing them? I have read Benoit's explanation in this > > list of Gambas memory management (Re: [Gambas-user] Memory Management, on > > 08/09/2007 09:19). > > > > I turned to Gambas to program this function because my first choice, > > imagemagick, would always run out of memory without processing a single > > frame. The Gambas solution works, but no more work can be done without > > killing the program and restarting it - not very convenient. I anticipate > > that typical uses of the program will have to handle 10-30 thousand png > > images at a time. > > > > Can anyone suggest how I find out what is so hungry for my memory, and > > hopefully how to suppress its appetite? > > > > Richard > > > > ------------------------------------------------------------------------- > >----- > > > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > --------------------------------------------------------------------------- >--- > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user Thanks for reminding me, Fabien, about a fascinating side issue. Originally I had tried frame.Resize(NewWidth, NewHeight) but I was disappointed to discover it doesn't resize the image at all; it just re-frames it by cropping the right hand side. I changed to Stretch by just typing over Resize and was quite a bit surprised when that didn't seem to work either! That was when I realised that while Resize(W,H) is a procedure, Stretch(W,H) is, as you said, a function! I was a bit hasty in providing my example code lines so I repeated the mistake which I had corrected in my event handler and which you have corrected above. The code which I copied for my example does not assign the result of the Stretch function, but immediately writes it back to disc. It reads: frame.Stretch(NewWidth,NewHeight).Save(DestinationImage) It works. This is what I do now, although I had originally used the version you suggested and assigned the "stretched" image to my frame variable before saving. I have been trying to nail down the greedy memory culprit and the frame.Stretch().Save() version made no difference, but I was too lazy to change it back to frame=frame.Stretch() followed by frame.Save(). I have since discovered that it is the frame=Image.Load() step which is to blame. Each png is at most 1MiB, though most are much less. 740 of these when loaded in turn by frame=Image.Load() uses 1.8GiB of main memory and nearly 2GiB of swap. This seems excessive to me, especially since I don't seem able to get it back without quitting from the program. Any ideas about that? Richard From gambas.fr at ...626... Fri May 7 21:31:25 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Fri, 7 May 2010 21:31:25 +0200 Subject: [Gambas-user] Runaway memory consumption not released until program exit In-Reply-To: <201005072010.54737.richard.j.walker@...247...> References: <201005071802.52675.richard.j.walker@...247...> <201005072010.54737.richard.j.walker@...247...> Message-ID: frame.Load(SourceImage).Stretch(NewWidth, NewHeight).Save(DestinationImage) 2010/5/7 Richard : > On Friday 07 May 2010 19:08:49 Fabien Bodard wrote: >> frame = frame.Stretch(NewWidth, NewHeight) >> >> if you do not re assign frame stretching returned image ... the image >> will not be changed >> >> http://gambasdoc.org/help/comp/gb.image.imlib/image/stretch?v3 >> >> 2010/5/7 Richard : >> > Hi everybody, >> > >> > I am using Gambas 2.20.0 on Mandriva 2010.0. The desktop is LXDE and the >> > gui toolkit might possibly be GTK. >> > >> > I have written a button event handler to process hundreds or thousands of >> > .png images in a directory. The main memory available when the program >> > starts is around 1.8 GBytes. After processing just 744 images (in >> > testing) this falls to about 74 MBytes. The memory is not freed on exit >> > from the event handler, only when I exit from the program. >> > >> > I use only 1 Image object; a variable called "frame". I have tried >> > declaring this as a local in the event handler and as a class-visible >> > variable with no apparent change in the way memory is eaten and never >> > disgorged. >> > >> > I do three things with my frame variable in a loop which iterates for all >> > frames in a directory; >> > >> > 1. I load it from an image on disc >> > 2. I "stretch" it to make its width smaller(!) >> > 3. I save the altered frame to a different directory >> > >> > Specifically the significant lines of code look like; >> > >> > frame = Image.Load(SourceImage) >> > frame.Stretch(NewWidth, NewHeight) >> > frame.Save(DestinationImage) >> > >> > Outside the loop I now do frame = NULL, but this has no effect. >> > >> > Is it possible that my code is allocating multiple "anonymous" frame >> > objects and not releasing them? I have read Benoit's explanation in this >> > list of Gambas memory management (Re: [Gambas-user] Memory Management, on >> > 08/09/2007 09:19). >> > >> > I turned to Gambas to program this function because my first choice, >> > imagemagick, would always run out of memory without processing a single >> > frame. The Gambas solution works, but no more work can be done without >> > killing the program and restarting it - not very convenient. I anticipate >> > that typical uses of the program will have to handle 10-30 thousand png >> > images at a time. >> > >> > Can anyone suggest how I find out what is so hungry for my memory, and >> > hopefully how to suppress its appetite? >> > >> > Richard >> > >> > ------------------------------------------------------------------------- >> >----- >> > >> > _______________________________________________ >> > Gambas-user mailing list >> > Gambas-user at lists.sourceforge.net >> > https://lists.sourceforge.net/lists/listinfo/gambas-user >> >> --------------------------------------------------------------------------- >>--- >> >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user > > Thanks for reminding me, Fabien, about a fascinating side issue. Originally I > had tried frame.Resize(NewWidth, NewHeight) but I was disappointed to > discover it doesn't resize the image at all; it just re-frames it by cropping > the right hand side. > > I changed to Stretch by just typing over Resize and was quite a bit surprised > when that didn't seem to work either! That was when I realised that while > Resize(W,H) is a procedure, Stretch(W,H) is, as you said, a function! I was a > bit hasty in providing my example code lines so I repeated the mistake which > I had corrected in my event handler and which you have corrected above. > > The code which I copied for my example does not assign the result of the > Stretch function, but immediately writes it back to disc. It reads: > > frame.Stretch(NewWidth,NewHeight).Save(DestinationImage) > > It works. This is what I do now, although I had originally used the version > you suggested and assigned the "stretched" image to my frame variable before > saving. I have been trying to nail down the greedy memory culprit and the > frame.Stretch().Save() version made no difference, but I was too lazy to > change it back to frame=frame.Stretch() followed by frame.Save(). > > I have since discovered that it is the frame=Image.Load() step which is to > blame. Each png is at most 1MiB, though most are much less. 740 of these when > loaded in turn by ?frame=Image.Load() uses 1.8GiB of main memory and nearly > 2GiB of swap. This seems excessive to me, especially since I don't seem able > to get it back without quitting from the program. Any ideas about that? frame=null ? > > Richard > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From richard.j.walker at ...247... Fri May 7 22:05:10 2010 From: richard.j.walker at ...247... (Richard) Date: Fri, 7 May 2010 21:05:10 +0100 Subject: [Gambas-user] Runaway memory consumption not released until program exit In-Reply-To: References: <201005071802.52675.richard.j.walker@...247...> <201005072010.54737.richard.j.walker@...247...> Message-ID: <201005072105.10639.richard.j.walker@...247...> On Friday 07 May 2010 20:31:25 Fabien Bodard wrote: > frame.Load(SourceImage).Stretch(NewWidth, NewHeight).Save(DestinationImage) > > 2010/5/7 Richard : > > On Friday 07 May 2010 19:08:49 Fabien Bodard wrote: > >> frame = frame.Stretch(NewWidth, NewHeight) > >> > >> if you do not re assign frame stretching returned image ... the image > >> will not be changed > >> > >> http://gambasdoc.org/help/comp/gb.image.imlib/image/stretch?v3 > >> > >> 2010/5/7 Richard : > >> > Hi everybody, > >> > > >> > I am using Gambas 2.20.0 on Mandriva 2010.0. The desktop is LXDE and > >> > the gui toolkit might possibly be GTK. > >> > > >> > I have written a button event handler to process hundreds or thousands > >> > of .png images in a directory. The main memory available when the > >> > program starts is around 1.8 GBytes. After processing just 744 images > >> > (in testing) this falls to about 74 MBytes. The memory is not freed on > >> > exit from the event handler, only when I exit from the program. > >> > > >> > I use only 1 Image object; a variable called "frame". I have tried > >> > declaring this as a local in the event handler and as a class-visible > >> > variable with no apparent change in the way memory is eaten and never > >> > disgorged. > >> > > >> > I do three things with my frame variable in a loop which iterates for > >> > all frames in a directory; > >> > > >> > 1. I load it from an image on disc > >> > 2. I "stretch" it to make its width smaller(!) > >> > 3. I save the altered frame to a different directory > >> > > >> > Specifically the significant lines of code look like; > >> > > >> > frame = Image.Load(SourceImage) > >> > frame.Stretch(NewWidth, NewHeight) > >> > frame.Save(DestinationImage) > >> > > >> > Outside the loop I now do frame = NULL, but this has no effect. > >> > > >> > Is it possible that my code is allocating multiple "anonymous" frame > >> > objects and not releasing them? I have read Benoit's explanation in > >> > this list of Gambas memory management (Re: [Gambas-user] Memory > >> > Management, on 08/09/2007 09:19). > >> > > >> > I turned to Gambas to program this function because my first choice, > >> > imagemagick, would always run out of memory without processing a > >> > single frame. The Gambas solution works, but no more work can be done > >> > without killing the program and restarting it - not very convenient. I > >> > anticipate that typical uses of the program will have to handle 10-30 > >> > thousand png images at a time. > >> > > >> > Can anyone suggest how I find out what is so hungry for my memory, and > >> > hopefully how to suppress its appetite? > >> > > >> > Richard > >> > > >> > ---------------------------------------------------------------------- > >> >--- ----- > >> > > >> > _______________________________________________ > >> > Gambas-user mailing list > >> > Gambas-user at lists.sourceforge.net > >> > https://lists.sourceforge.net/lists/listinfo/gambas-user > >> > >> ------------------------------------------------------------------------ > >>--- --- > >> > >> _______________________________________________ > >> Gambas-user mailing list > >> Gambas-user at lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > Thanks for reminding me, Fabien, about a fascinating side issue. > > Originally I had tried frame.Resize(NewWidth, NewHeight) but I was > > disappointed to discover it doesn't resize the image at all; it just > > re-frames it by cropping the right hand side. > > > > I changed to Stretch by just typing over Resize and was quite a bit > > surprised when that didn't seem to work either! That was when I realised > > that while Resize(W,H) is a procedure, Stretch(W,H) is, as you said, a > > function! I was a bit hasty in providing my example code lines so I > > repeated the mistake which I had corrected in my event handler and which > > you have corrected above. > > > > The code which I copied for my example does not assign the result of the > > Stretch function, but immediately writes it back to disc. It reads: > > > > frame.Stretch(NewWidth,NewHeight).Save(DestinationImage) > > > > It works. This is what I do now, although I had originally used the > > version you suggested and assigned the "stretched" image to my frame > > variable before saving. I have been trying to nail down the greedy memory > > culprit and the frame.Stretch().Save() version made no difference, but I > > was too lazy to change it back to frame=frame.Stretch() followed by > > frame.Save(). > > > > I have since discovered that it is the frame=Image.Load() step which is > > to blame. Each png is at most 1MiB, though most are much less. 740 of > > these when loaded in turn by ?frame=Image.Load() uses 1.8GiB of main > > memory and nearly 2GiB of swap. This seems excessive to me, especially > > since I don't seem able to get it back without quitting from the program. > > Any ideas about that? > > frame=null ? > > > Richard > > > > ------------------------------------------------------------------------- > >----- > > > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > --------------------------------------------------------------------------- >--- > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user Yes. Right after the FOR loop which iterates through all the frames for loading and processing. That is one of the reasons I thought I would ask for help on this. As far as I can tell I have complied with all of Benoit's hints and tips on managing memory. The frame variable is declared local to the event handler: DIM frame AS NEW Image The event handler is the only code which uses this variable. There is a WAIT statement in the FOR loop so that the ProgressBar works, but the memory is eaten up at the same ferocious rate either with or without the WAIT. What I can tell for certain is that the memory is only allocated while my code is executing the FOR loop. The frame variable is created and destroyed outside this loop which strongly suggests that I have not programmed the code which is using the memory. By deleting all code within the loop EXCEPT the frame = Image.Load() line I can run the code and watch as it runs through my memory at an estimated rate of something like 4MiB per sub-1MiB frame. This just doesn't look right. If it is then I cannot use Gambas to apply simple changes to very large numbers of PNG images. That can't be right either. For completeness I should also mention that I have run the FOR loop with both Image handling lines removed (load/stretch and save) and there is no sign of memory loss; just blindness 'cos there are no pictures:-) Richard From gambas at ...1... Sat May 8 00:11:02 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sat, 8 May 2010 00:11:02 +0200 Subject: [Gambas-user] Runaway memory consumption not released until program exit In-Reply-To: <201005072105.10639.richard.j.walker@...247...> References: <201005071802.52675.richard.j.walker@...247...> <201005072105.10639.richard.j.walker@...247...> Message-ID: <201005080011.02858.gambas@...1...> > On Friday 07 May 2010 20:31:25 Fabien Bodard wrote: > > frame.Load(SourceImage).Stretch(NewWidth, > > NewHeight).Save(DestinationImage) > > > > 2010/5/7 Richard : > > > On Friday 07 May 2010 19:08:49 Fabien Bodard wrote: > > >> frame = frame.Stretch(NewWidth, NewHeight) > > >> > > >> if you do not re assign frame stretching returned image ... the image > > >> will not be changed > > >> > > >> http://gambasdoc.org/help/comp/gb.image.imlib/image/stretch?v3 > > >> > > >> 2010/5/7 Richard : > > >> > Hi everybody, > > >> > > > >> > I am using Gambas 2.20.0 on Mandriva 2010.0. The desktop is LXDE and > > >> > the gui toolkit might possibly be GTK. > > >> > > > >> > I have written a button event handler to process hundreds or > > >> > thousands of .png images in a directory. The main memory available > > >> > when the program starts is around 1.8 GBytes. After processing just > > >> > 744 images (in testing) this falls to about 74 MBytes. The memory > > >> > is not freed on exit from the event handler, only when I exit from > > >> > the program. > > >> > > > >> > I use only 1 Image object; a variable called "frame". I have tried > > >> > declaring this as a local in the event handler and as a > > >> > class-visible variable with no apparent change in the way memory is > > >> > eaten and never disgorged. > > >> > > > >> > I do three things with my frame variable in a loop which iterates > > >> > for all frames in a directory; > > >> > > > >> > 1. I load it from an image on disc > > >> > 2. I "stretch" it to make its width smaller(!) > > >> > 3. I save the altered frame to a different directory > > >> > > > >> > Specifically the significant lines of code look like; > > >> > > > >> > frame = Image.Load(SourceImage) > > >> > frame.Stretch(NewWidth, NewHeight) > > >> > frame.Save(DestinationImage) > > >> > > > >> > Outside the loop I now do frame = NULL, but this has no effect. > > >> > > > >> > Is it possible that my code is allocating multiple "anonymous" frame > > >> > objects and not releasing them? I have read Benoit's explanation in > > >> > this list of Gambas memory management (Re: [Gambas-user] Memory > > >> > Management, on 08/09/2007 09:19). > > >> > > > >> > I turned to Gambas to program this function because my first choice, > > >> > imagemagick, would always run out of memory without processing a > > >> > single frame. The Gambas solution works, but no more work can be > > >> > done without killing the program and restarting it - not very > > >> > convenient. I anticipate that typical uses of the program will have > > >> > to handle 10-30 thousand png images at a time. > > >> > > > >> > Can anyone suggest how I find out what is so hungry for my memory, > > >> > and hopefully how to suppress its appetite? > > >> > > > >> > Richard > > >> > > > >> > -------------------------------------------------------------------- > > >> > -- > > >> > > > >> >--- ----- > > >> > > > >> > _______________________________________________ > > >> > Gambas-user mailing list > > >> > Gambas-user at lists.sourceforge.net > > >> > https://lists.sourceforge.net/lists/listinfo/gambas-user > > >> > > >> ---------------------------------------------------------------------- > > >> -- > > >> > > >>--- --- > > >> > > >> _______________________________________________ > > >> Gambas-user mailing list > > >> Gambas-user at lists.sourceforge.net > > >> https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > Thanks for reminding me, Fabien, about a fascinating side issue. > > > Originally I had tried frame.Resize(NewWidth, NewHeight) but I was > > > disappointed to discover it doesn't resize the image at all; it just > > > re-frames it by cropping the right hand side. > > > > > > I changed to Stretch by just typing over Resize and was quite a bit > > > surprised when that didn't seem to work either! That was when I > > > realised that while Resize(W,H) is a procedure, Stretch(W,H) is, as > > > you said, a function! I was a bit hasty in providing my example code > > > lines so I repeated the mistake which I had corrected in my event > > > handler and which you have corrected above. > > > > > > The code which I copied for my example does not assign the result of > > > the Stretch function, but immediately writes it back to disc. It > > > reads: > > > > > > frame.Stretch(NewWidth,NewHeight).Save(DestinationImage) > > > > > > It works. This is what I do now, although I had originally used the > > > version you suggested and assigned the "stretched" image to my frame > > > variable before saving. I have been trying to nail down the greedy > > > memory culprit and the frame.Stretch().Save() version made no > > > difference, but I was too lazy to change it back to > > > frame=frame.Stretch() followed by frame.Save(). > > > > > > I have since discovered that it is the frame=Image.Load() step which is > > > to blame. Each png is at most 1MiB, though most are much less. 740 of > > > these when loaded in turn by frame=Image.Load() uses 1.8GiB of main > > > memory and nearly 2GiB of swap. This seems excessive to me, especially > > > since I don't seem able to get it back without quitting from the > > > program. Any ideas about that? > > > > frame=null ? > > > > > Richard > > > > > > ----------------------------------------------------------------------- > > > -- > > > > > >----- > > > > > > _______________________________________________ > > > Gambas-user mailing list > > > Gambas-user at lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > ------------------------------------------------------------------------- > > -- > > > >--- > > > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > Yes. Right after the FOR loop which iterates through all the frames for > loading and processing. > > That is one of the reasons I thought I would ask for help on this. As far > as I can tell I have complied with all of Benoit's hints and tips on > managing memory. The frame variable is declared local to the event > handler: DIM frame AS NEW Image > The event handler is the only code which uses this variable. There is a > WAIT statement in the FOR loop so that the ProgressBar works, but the > memory is eaten up at the same ferocious rate either with or without the > WAIT. > > What I can tell for certain is that the memory is only allocated while my > code is executing the FOR loop. The frame variable is created and > destroyed outside this loop which strongly suggests that I have not > programmed the code which is using the memory. By deleting all code within > the loop EXCEPT the frame = Image.Load() line I can run the code and watch > as it runs through my memory at an estimated rate of something like 4MiB > per sub-1MiB frame. This just doesn't look right. If it is then I cannot > use Gambas to apply simple changes to very large numbers of PNG images. > That can't be right either. > > For completeness I should also mention that I have run the FOR loop with > both Image handling lines removed (load/stretch and save) and there is no > sign of memory loss; just blindness 'cos there are no pictures:-) > > Richard > Can you send your project, or better isolate the image processing that burns your memory in a little project? Regards, -- Beno?t Minisini From gambas at ...1... Sat May 8 00:16:53 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sat, 8 May 2010 00:16:53 +0200 Subject: [Gambas-user] Pipe doesn't receive contents In-Reply-To: <4BE3C67F.8040906@...221...> References: <4BE3C67F.8040906@...221...> Message-ID: <201005080016.53305.gambas@...1...> > Trying the example code for pipes, I only get a waiting prompt, and then > it jumps out of the loop. > > I added two little statements to have some output: > > DIM hFile AS File > DIM sLine AS String > > hFile = PIPE "/tmp/FIFO1" FOR INPUT > > PRINT "Now let's start:" > > WHILE NOT Eof(hFile) > LINE INPUT #hFile, sLine > PRINT sLine > WEND > > PRINT "That's it." > > When I start this, it prints the start message and waits. It's in a > Konsole window within KDE. I open another terminal and type > > ls > /tmp/FIFO1 > > Instead of giving the file list, it just prints the finish message and > quits. > > Did I do something wrong? > > Rolf > I just tried, and it works with "ls -la > /tmp/FIFO1", but not with "ls > /tmp/FIFO1", as you described. Very strange... -- Beno?t Minisini From gambas at ...1... Sat May 8 00:23:37 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sat, 8 May 2010 00:23:37 +0200 Subject: [Gambas-user] Pipe doesn't receive contents In-Reply-To: <201005080016.53305.gambas@...1...> References: <4BE3C67F.8040906@...221...> <201005080016.53305.gambas@...1...> Message-ID: <201005080023.37341.gambas@...1...> > > Trying the example code for pipes, I only get a waiting prompt, and then > > it jumps out of the loop. > > > > I added two little statements to have some output: > > > > DIM hFile AS File > > DIM sLine AS String > > > > hFile = PIPE "/tmp/FIFO1" FOR INPUT > > > > PRINT "Now let's start:" > > > > WHILE NOT Eof(hFile) > > > > LINE INPUT #hFile, sLine > > PRINT sLine > > > > WEND > > > > PRINT "That's it." > > > > When I start this, it prints the start message and waits. It's in a > > Konsole window within KDE. I open another terminal and type > > > > ls > /tmp/FIFO1 > > > > Instead of giving the file list, it just prints the finish message and > > quits. > > > > Did I do something wrong? > > > > Rolf > > I just tried, and it works with "ls -la > /tmp/FIFO1", but not with "ls > > /tmp/FIFO1", as you described. Very strange... It is actually random: sometimes it works as expected, sometimes Eof(hFile) returns True the first time it is called, and the pipe is not read. Very strange yet! -- Beno?t Minisini From gambas at ...1... Sat May 8 01:05:36 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sat, 8 May 2010 01:05:36 +0200 Subject: [Gambas-user] Pipe doesn't receive contents In-Reply-To: <201005080023.37341.gambas@...1...> References: <4BE3C67F.8040906@...221...> <201005080016.53305.gambas@...1...> <201005080023.37341.gambas@...1...> Message-ID: <201005080105.36585.gambas@...1...> > > > Trying the example code for pipes, I only get a waiting prompt, and > > > then it jumps out of the loop. > > > > > > I added two little statements to have some output: > > > > > > DIM hFile AS File > > > DIM sLine AS String > > > > > > hFile = PIPE "/tmp/FIFO1" FOR INPUT > > > > > > PRINT "Now let's start:" > > > > > > WHILE NOT Eof(hFile) > > > > > > LINE INPUT #hFile, sLine > > > PRINT sLine > > > > > > WEND > > > > > > PRINT "That's it." > > > > > > When I start this, it prints the start message and waits. It's in a > > > Konsole window within KDE. I open another terminal and type > > > > > > ls > /tmp/FIFO1 > > > > > > Instead of giving the file list, it just prints the finish message and > > > quits. > > > > > > Did I do something wrong? > > > > > > Rolf > > > > I just tried, and it works with "ls -la > /tmp/FIFO1", but not with "ls > > > /tmp/FIFO1", as you described. Very strange... > > It is actually random: sometimes it works as expected, sometimes Eof(hFile) > returns True the first time it is called, and the pipe is not read. Very > strange yet! OK, I'm stupid. It's just silly to use Eof() with a pipe, because it just tell you that the pipe is void, and can't know that some data may come in the future. So if the program is too fast for the data to come, the first Eof() returns TRUE. Regards, -- Beno?t Minisini From richard.j.walker at ...247... Sat May 8 01:38:18 2010 From: richard.j.walker at ...247... (Richard) Date: Sat, 8 May 2010 00:38:18 +0100 Subject: [Gambas-user] Runaway memory consumption not released until program exit In-Reply-To: <201005080011.02858.gambas@...1...> References: <201005071802.52675.richard.j.walker@...247...> <201005072105.10639.richard.j.walker@...247...> <201005080011.02858.gambas@...1...> Message-ID: <201005080038.18407.richard.j.walker@...247...> On Friday 07 May 2010 23:11:02 Beno?t Minisini wrote: > > On Friday 07 May 2010 20:31:25 Fabien Bodard wrote: > > > frame.Load(SourceImage).Stretch(NewWidth, > > > NewHeight).Save(DestinationImage) > > > > > > 2010/5/7 Richard : > > > > On Friday 07 May 2010 19:08:49 Fabien Bodard wrote: > > > >> frame = frame.Stretch(NewWidth, NewHeight) > > > >> > > > >> if you do not re assign frame stretching returned image ... the > > > >> image will not be changed > > > >> > > > >> http://gambasdoc.org/help/comp/gb.image.imlib/image/stretch?v3 > > > >> > > > >> 2010/5/7 Richard : > > > >> > Hi everybody, > > > >> > > > > >> > I am using Gambas 2.20.0 on Mandriva 2010.0. The desktop is LXDE > > > >> > and the gui toolkit might possibly be GTK. > > > >> > > > > >> > I have written a button event handler to process hundreds or > > > >> > thousands of .png images in a directory. The main memory available > > > >> > when the program starts is around 1.8 GBytes. After processing > > > >> > just 744 images (in testing) this falls to about 74 MBytes. The > > > >> > memory is not freed on exit from the event handler, only when I > > > >> > exit from the program. > > > >> > > > > >> > I use only 1 Image object; a variable called "frame". I have tried > > > >> > declaring this as a local in the event handler and as a > > > >> > class-visible variable with no apparent change in the way memory > > > >> > is eaten and never disgorged. > > > >> > > > > >> > I do three things with my frame variable in a loop which iterates > > > >> > for all frames in a directory; > > > >> > > > > >> > 1. I load it from an image on disc > > > >> > 2. I "stretch" it to make its width smaller(!) > > > >> > 3. I save the altered frame to a different directory > > > >> > > > > >> > Specifically the significant lines of code look like; > > > >> > > > > >> > frame = Image.Load(SourceImage) > > > >> > frame.Stretch(NewWidth, NewHeight) > > > >> > frame.Save(DestinationImage) > > > >> > > > > >> > Outside the loop I now do frame = NULL, but this has no effect. > > > >> > > > > >> > Is it possible that my code is allocating multiple "anonymous" > > > >> > frame objects and not releasing them? I have read Benoit's > > > >> > explanation in this list of Gambas memory management (Re: > > > >> > [Gambas-user] Memory Management, on 08/09/2007 09:19). > > > >> > > > > >> > I turned to Gambas to program this function because my first > > > >> > choice, imagemagick, would always run out of memory without > > > >> > processing a single frame. The Gambas solution works, but no more > > > >> > work can be done without killing the program and restarting it - > > > >> > not very convenient. I anticipate that typical uses of the program > > > >> > will have to handle 10-30 thousand png images at a time. > > > >> > > > > >> > Can anyone suggest how I find out what is so hungry for my memory, > > > >> > and hopefully how to suppress its appetite? > > > >> > > > > >> > Richard > > > >> > > > > >> > ------------------------------------------------------------------ > > > >> >-- -- > > > >> > > > > >> >--- ----- > > > >> > > > > >> > _______________________________________________ > > > >> > Gambas-user mailing list > > > >> > Gambas-user at lists.sourceforge.net > > > >> > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > >> > > > >> -------------------------------------------------------------------- > > > >>-- -- > > > >> > > > >>--- --- > > > >> > > > >> _______________________________________________ > > > >> Gambas-user mailing list > > > >> Gambas-user at lists.sourceforge.net > > > >> https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > > > Thanks for reminding me, Fabien, about a fascinating side issue. > > > > Originally I had tried frame.Resize(NewWidth, NewHeight) but I was > > > > disappointed to discover it doesn't resize the image at all; it just > > > > re-frames it by cropping the right hand side. > > > > > > > > I changed to Stretch by just typing over Resize and was quite a bit > > > > surprised when that didn't seem to work either! That was when I > > > > realised that while Resize(W,H) is a procedure, Stretch(W,H) is, as > > > > you said, a function! I was a bit hasty in providing my example code > > > > lines so I repeated the mistake which I had corrected in my event > > > > handler and which you have corrected above. > > > > > > > > The code which I copied for my example does not assign the result of > > > > the Stretch function, but immediately writes it back to disc. It > > > > reads: > > > > > > > > frame.Stretch(NewWidth,NewHeight).Save(DestinationImage) > > > > > > > > It works. This is what I do now, although I had originally used the > > > > version you suggested and assigned the "stretched" image to my frame > > > > variable before saving. I have been trying to nail down the greedy > > > > memory culprit and the frame.Stretch().Save() version made no > > > > difference, but I was too lazy to change it back to > > > > frame=frame.Stretch() followed by frame.Save(). > > > > > > > > I have since discovered that it is the frame=Image.Load() step which > > > > is to blame. Each png is at most 1MiB, though most are much less. 740 > > > > of these when loaded in turn by frame=Image.Load() uses 1.8GiB of > > > > main memory and nearly 2GiB of swap. This seems excessive to me, > > > > especially since I don't seem able to get it back without quitting > > > > from the program. Any ideas about that? > > > > > > frame=null ? > > > > > > > Richard > > > > > > > > --------------------------------------------------------------------- > > > >-- -- > > > > > > > >----- > > > > > > > > _______________________________________________ > > > > Gambas-user mailing list > > > > Gambas-user at lists.sourceforge.net > > > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > ----------------------------------------------------------------------- > > >-- -- > > > > > >--- > > > > > > _______________________________________________ > > > Gambas-user mailing list > > > Gambas-user at lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > Yes. Right after the FOR loop which iterates through all the frames for > > loading and processing. > > > > That is one of the reasons I thought I would ask for help on this. As far > > as I can tell I have complied with all of Benoit's hints and tips on > > managing memory. The frame variable is declared local to the event > > handler: DIM frame AS NEW Image > > The event handler is the only code which uses this variable. There is a > > WAIT statement in the FOR loop so that the ProgressBar works, but the > > memory is eaten up at the same ferocious rate either with or without the > > WAIT. > > > > What I can tell for certain is that the memory is only allocated while my > > code is executing the FOR loop. The frame variable is created and > > destroyed outside this loop which strongly suggests that I have not > > programmed the code which is using the memory. By deleting all code > > within the loop EXCEPT the frame = Image.Load() line I can run the code > > and watch as it runs through my memory at an estimated rate of something > > like 4MiB per sub-1MiB frame. This just doesn't look right. If it is then > > I cannot use Gambas to apply simple changes to very large numbers of PNG > > images. That can't be right either. > > > > For completeness I should also mention that I have run the FOR loop with > > both Image handling lines removed (load/stretch and save) and there is no > > sign of memory loss; just blindness 'cos there are no pictures:-) > > > > Richard > > Can you send your project, or better isolate the image processing that > burns your memory in a little project? > > Regards, Glad to; I have been running a simple test project which reveals what I now believe to be a bug of some long standing. I have only been able to test 2.4, 2,16 and 2.20 so far. 2.4 works without consuming memory, 2.16.and 2.20 have the bug. I put together a simple form with a progress bar and two buttons. I observe memory and swap consumption while the progress bar moves towards 100% using gkrellm - 'cos it's always there. The test program merely reloads a single image file many times so it is quicker to run than the "real thing" where there may be hundreds of different files. Nevertheless its behaviour is just the same, suggesting to me that there may be a problem in the Image.Load() method. The same memory consumption problem occurs if the object is of type Picture and Picture.Load() is used. Hope it's easy to find because I would really like to get this working for my brother. Richard ' Gambas class file PUBLIC SUB _new() END PUBLIC SUB Form_Open() END PUBLIC SUB Quit_Click() ME.Close END PUBLIC SUB Test_Click() DIM n AS Integer DIM Frame AS NEW Image ProgressBar1.Visible = TRUE FOR n = 0 TO 799 Frame = Image.Load("/home/richard/1024x576.png") ProgressBar1.Value = n / 499 WAIT NEXT ProgressBar1.Visible = FALSE END From gambas at ...1... Sat May 8 01:50:04 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sat, 8 May 2010 01:50:04 +0200 Subject: [Gambas-user] Runaway memory consumption not released until program exit In-Reply-To: <201005080038.18407.richard.j.walker@...247...> References: <201005071802.52675.richard.j.walker@...247...> <201005080011.02858.gambas@...1...> <201005080038.18407.richard.j.walker@...247...> Message-ID: <201005080150.04542.gambas@...1...> > On Friday 07 May 2010 23:11:02 Beno?t Minisini wrote: > > > On Friday 07 May 2010 20:31:25 Fabien Bodard wrote: > > > > frame.Load(SourceImage).Stretch(NewWidth, > > > > NewHeight).Save(DestinationImage) > > > > > > > > 2010/5/7 Richard : > > > > > On Friday 07 May 2010 19:08:49 Fabien Bodard wrote: > > > > >> frame = frame.Stretch(NewWidth, NewHeight) > > > > >> > > > > >> if you do not re assign frame stretching returned image ... the > > > > >> image will not be changed > > > > >> > > > > >> http://gambasdoc.org/help/comp/gb.image.imlib/image/stretch?v3 > > > > >> > > > > >> 2010/5/7 Richard : > > > > >> > Hi everybody, > > > > >> > > > > > >> > I am using Gambas 2.20.0 on Mandriva 2010.0. The desktop is LXDE > > > > >> > and the gui toolkit might possibly be GTK. > > > > >> > > > > > >> > I have written a button event handler to process hundreds or > > > > >> > thousands of .png images in a directory. The main memory > > > > >> > available when the program starts is around 1.8 GBytes. After > > > > >> > processing just 744 images (in testing) this falls to about 74 > > > > >> > MBytes. The memory is not freed on exit from the event handler, > > > > >> > only when I exit from the program. > > > > >> > > > > > >> > I use only 1 Image object; a variable called "frame". I have > > > > >> > tried declaring this as a local in the event handler and as a > > > > >> > class-visible variable with no apparent change in the way > > > > >> > memory is eaten and never disgorged. > > > > >> > > > > > >> > I do three things with my frame variable in a loop which > > > > >> > iterates for all frames in a directory; > > > > >> > > > > > >> > 1. I load it from an image on disc > > > > >> > 2. I "stretch" it to make its width smaller(!) > > > > >> > 3. I save the altered frame to a different directory > > > > >> > > > > > >> > Specifically the significant lines of code look like; > > > > >> > > > > > >> > frame = Image.Load(SourceImage) > > > > >> > frame.Stretch(NewWidth, NewHeight) > > > > >> > frame.Save(DestinationImage) > > > > >> > > > > > >> > Outside the loop I now do frame = NULL, but this has no effect. > > > > >> > > > > > >> > Is it possible that my code is allocating multiple "anonymous" > > > > >> > frame objects and not releasing them? I have read Benoit's > > > > >> > explanation in this list of Gambas memory management (Re: > > > > >> > [Gambas-user] Memory Management, on 08/09/2007 09:19). > > > > >> > > > > > >> > I turned to Gambas to program this function because my first > > > > >> > choice, imagemagick, would always run out of memory without > > > > >> > processing a single frame. The Gambas solution works, but no > > > > >> > more work can be done without killing the program and > > > > >> > restarting it - not very convenient. I anticipate that typical > > > > >> > uses of the program will have to handle 10-30 thousand png > > > > >> > images at a time. > > > > >> > > > > > >> > Can anyone suggest how I find out what is so hungry for my > > > > >> > memory, and hopefully how to suppress its appetite? > > > > >> > > > > > >> > Richard > > > > >> > > > > > >> > ---------------------------------------------------------------- > > > > >> > -- > > > > >> > > > > > >> >-- -- > > > > >> > > > > > >> >--- ----- > > > > >> > > > > > >> > _______________________________________________ > > > > >> > Gambas-user mailing list > > > > >> > Gambas-user at lists.sourceforge.net > > > > >> > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > >> > > > > >> ------------------------------------------------------------------ > > > > >> -- > > > > >> > > > > >>-- -- > > > > >> > > > > >>--- --- > > > > >> > > > > >> _______________________________________________ > > > > >> Gambas-user mailing list > > > > >> Gambas-user at lists.sourceforge.net > > > > >> https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > > > > > Thanks for reminding me, Fabien, about a fascinating side issue. > > > > > Originally I had tried frame.Resize(NewWidth, NewHeight) but I was > > > > > disappointed to discover it doesn't resize the image at all; it > > > > > just re-frames it by cropping the right hand side. > > > > > > > > > > I changed to Stretch by just typing over Resize and was quite a bit > > > > > surprised when that didn't seem to work either! That was when I > > > > > realised that while Resize(W,H) is a procedure, Stretch(W,H) is, as > > > > > you said, a function! I was a bit hasty in providing my example > > > > > code lines so I repeated the mistake which I had corrected in my > > > > > event handler and which you have corrected above. > > > > > > > > > > The code which I copied for my example does not assign the result > > > > > of the Stretch function, but immediately writes it back to disc. > > > > > It reads: > > > > > > > > > > frame.Stretch(NewWidth,NewHeight).Save(DestinationImage) > > > > > > > > > > It works. This is what I do now, although I had originally used the > > > > > version you suggested and assigned the "stretched" image to my > > > > > frame variable before saving. I have been trying to nail down the > > > > > greedy memory culprit and the frame.Stretch().Save() version made > > > > > no difference, but I was too lazy to change it back to > > > > > frame=frame.Stretch() followed by frame.Save(). > > > > > > > > > > I have since discovered that it is the frame=Image.Load() step > > > > > which is to blame. Each png is at most 1MiB, though most are much > > > > > less. 740 of these when loaded in turn by frame=Image.Load() uses > > > > > 1.8GiB of main memory and nearly 2GiB of swap. This seems > > > > > excessive to me, especially since I don't seem able to get it back > > > > > without quitting from the program. Any ideas about that? > > > > > > > > frame=null ? > > > > > > > > > Richard > > > > > > > > > > ------------------------------------------------------------------- > > > > > -- > > > > > > > > > >-- -- > > > > > > > > > >----- > > > > > > > > > > _______________________________________________ > > > > > Gambas-user mailing list > > > > > Gambas-user at lists.sourceforge.net > > > > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > > > --------------------------------------------------------------------- > > > > -- > > > > > > > >-- -- > > > > > > > >--- > > > > > > > > _______________________________________________ > > > > Gambas-user mailing list > > > > Gambas-user at lists.sourceforge.net > > > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > Yes. Right after the FOR loop which iterates through all the frames for > > > loading and processing. > > > > > > That is one of the reasons I thought I would ask for help on this. As > > > far as I can tell I have complied with all of Benoit's hints and tips > > > on managing memory. The frame variable is declared local to the event > > > handler: DIM frame AS NEW Image > > > The event handler is the only code which uses this variable. There is a > > > WAIT statement in the FOR loop so that the ProgressBar works, but the > > > memory is eaten up at the same ferocious rate either with or without > > > the WAIT. > > > > > > What I can tell for certain is that the memory is only allocated while > > > my code is executing the FOR loop. The frame variable is created and > > > destroyed outside this loop which strongly suggests that I have not > > > programmed the code which is using the memory. By deleting all code > > > within the loop EXCEPT the frame = Image.Load() line I can run the > > > code and watch as it runs through my memory at an estimated rate of > > > something like 4MiB per sub-1MiB frame. This just doesn't look right. > > > If it is then I cannot use Gambas to apply simple changes to very > > > large numbers of PNG images. That can't be right either. > > > > > > For completeness I should also mention that I have run the FOR loop > > > with both Image handling lines removed (load/stretch and save) and > > > there is no sign of memory loss; just blindness 'cos there are no > > > pictures:-) > > > > > > Richard > > > > Can you send your project, or better isolate the image processing that > > burns your memory in a little project? > > > > Regards, > > Glad to; I have been running a simple test project which reveals what I now > believe to be a bug of some long standing. I have only been able to test > 2.4, 2,16 and 2.20 so far. 2.4 works without consuming memory, 2.16.and > 2.20 have the bug. > > I put together a simple form with a progress bar and two buttons. I observe > memory and swap consumption while the progress bar moves towards 100% using > gkrellm - 'cos it's always there. > > The test program merely reloads a single image file many times so it is > quicker to run than the "real thing" where there may be hundreds of > different files. Nevertheless its behaviour is just the same, suggesting to > me that there may be a problem in the Image.Load() method. The same memory > consumption problem occurs if the object is of type Picture and > Picture.Load() is used. > > Hope it's easy to find because I would really like to get this working for > my brother. > > Richard > > ' Gambas class file > > PUBLIC SUB _new() > > END > > PUBLIC SUB Form_Open() > > END > > PUBLIC SUB Quit_Click() > > ME.Close > > END > > PUBLIC SUB Test_Click() > DIM n AS Integer > DIM Frame AS NEW Image > > ProgressBar1.Visible = TRUE > FOR n = 0 TO 799 > Frame = Image.Load("/home/richard/1024x576.png") > ProgressBar1.Value = n / 499 > WAIT > NEXT > ProgressBar1.Visible = FALSE > > END > Do you use gb.qt or gb.gtk? -- Beno?t Minisini From richard.j.walker at ...247... Sat May 8 02:39:16 2010 From: richard.j.walker at ...247... (Richard) Date: Sat, 8 May 2010 01:39:16 +0100 Subject: [Gambas-user] Runaway memory consumption not released until program exit In-Reply-To: <201005080150.04542.gambas@...1...> References: <201005071802.52675.richard.j.walker@...247...> <201005080038.18407.richard.j.walker@...247...> <201005080150.04542.gambas@...1...> Message-ID: <201005080139.16793.richard.j.walker@...247...> On Saturday 08 May 2010 00:50:04 Beno?t Minisini wrote: > > On Friday 07 May 2010 23:11:02 Beno?t Minisini wrote: > > > > On Friday 07 May 2010 20:31:25 Fabien Bodard wrote: > > > > > frame.Load(SourceImage).Stretch(NewWidth, > > > > > NewHeight).Save(DestinationImage) > > > > > > > > > > 2010/5/7 Richard : > > > > > > On Friday 07 May 2010 19:08:49 Fabien Bodard wrote: > > > > > >> frame = frame.Stretch(NewWidth, NewHeight) > > > > > >> > > > > > >> if you do not re assign frame stretching returned image ... the > > > > > >> image will not be changed > > > > > >> > > > > > >> http://gambasdoc.org/help/comp/gb.image.imlib/image/stretch?v3 > > > > > >> > > > > > >> 2010/5/7 Richard : > > > > > >> > Hi everybody, > > > > > >> > > > > > > >> > I am using Gambas 2.20.0 on Mandriva 2010.0. The desktop is > > > > > >> > LXDE and the gui toolkit might possibly be GTK. > > > > > >> > > > > > > >> > I have written a button event handler to process hundreds or > > > > > >> > thousands of .png images in a directory. The main memory > > > > > >> > available when the program starts is around 1.8 GBytes. After > > > > > >> > processing just 744 images (in testing) this falls to about 74 > > > > > >> > MBytes. The memory is not freed on exit from the event > > > > > >> > handler, only when I exit from the program. > > > > > >> > > > > > > >> > I use only 1 Image object; a variable called "frame". I have > > > > > >> > tried declaring this as a local in the event handler and as a > > > > > >> > class-visible variable with no apparent change in the way > > > > > >> > memory is eaten and never disgorged. > > > > > >> > > > > > > >> > I do three things with my frame variable in a loop which > > > > > >> > iterates for all frames in a directory; > > > > > >> > > > > > > >> > 1. I load it from an image on disc > > > > > >> > 2. I "stretch" it to make its width smaller(!) > > > > > >> > 3. I save the altered frame to a different directory > > > > > >> > > > > > > >> > Specifically the significant lines of code look like; > > > > > >> > > > > > > >> > frame = Image.Load(SourceImage) > > > > > >> > frame.Stretch(NewWidth, NewHeight) > > > > > >> > frame.Save(DestinationImage) > > > > > >> > > > > > > >> > Outside the loop I now do frame = NULL, but this has no > > > > > >> > effect. > > > > > >> > > > > > > >> > Is it possible that my code is allocating multiple "anonymous" > > > > > >> > frame objects and not releasing them? I have read Benoit's > > > > > >> > explanation in this list of Gambas memory management (Re: > > > > > >> > [Gambas-user] Memory Management, on 08/09/2007 09:19). > > > > > >> > > > > > > >> > I turned to Gambas to program this function because my first > > > > > >> > choice, imagemagick, would always run out of memory without > > > > > >> > processing a single frame. The Gambas solution works, but no > > > > > >> > more work can be done without killing the program and > > > > > >> > restarting it - not very convenient. I anticipate that typical > > > > > >> > uses of the program will have to handle 10-30 thousand png > > > > > >> > images at a time. > > > > > >> > > > > > > >> > Can anyone suggest how I find out what is so hungry for my > > > > > >> > memory, and hopefully how to suppress its appetite? > > > > > >> > > > > > > >> > Richard > > > > > >> > > > > > > >> > -------------------------------------------------------------- > > > > > >> >-- -- > > > > > >> > > > > > > >> >-- -- > > > > > >> > > > > > > >> >--- ----- > > > > > >> > > > > > > >> > _______________________________________________ > > > > > >> > Gambas-user mailing list > > > > > >> > Gambas-user at lists.sourceforge.net > > > > > >> > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > >> > > > > > >> ---------------------------------------------------------------- > > > > > >>-- -- > > > > > >> > > > > > >>-- -- > > > > > >> > > > > > >>--- --- > > > > > >> > > > > > >> _______________________________________________ > > > > > >> Gambas-user mailing list > > > > > >> Gambas-user at lists.sourceforge.net > > > > > >> https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > > > > > > > Thanks for reminding me, Fabien, about a fascinating side issue. > > > > > > Originally I had tried frame.Resize(NewWidth, NewHeight) but I > > > > > > was disappointed to discover it doesn't resize the image at all; > > > > > > it just re-frames it by cropping the right hand side. > > > > > > > > > > > > I changed to Stretch by just typing over Resize and was quite a > > > > > > bit surprised when that didn't seem to work either! That was when > > > > > > I realised that while Resize(W,H) is a procedure, Stretch(W,H) > > > > > > is, as you said, a function! I was a bit hasty in providing my > > > > > > example code lines so I repeated the mistake which I had > > > > > > corrected in my event handler and which you have corrected above. > > > > > > > > > > > > The code which I copied for my example does not assign the result > > > > > > of the Stretch function, but immediately writes it back to disc. > > > > > > It reads: > > > > > > > > > > > > frame.Stretch(NewWidth,NewHeight).Save(DestinationImage) > > > > > > > > > > > > It works. This is what I do now, although I had originally used > > > > > > the version you suggested and assigned the "stretched" image to > > > > > > my frame variable before saving. I have been trying to nail down > > > > > > the greedy memory culprit and the frame.Stretch().Save() version > > > > > > made no difference, but I was too lazy to change it back to > > > > > > frame=frame.Stretch() followed by frame.Save(). > > > > > > > > > > > > I have since discovered that it is the frame=Image.Load() step > > > > > > which is to blame. Each png is at most 1MiB, though most are much > > > > > > less. 740 of these when loaded in turn by frame=Image.Load() > > > > > > uses 1.8GiB of main memory and nearly 2GiB of swap. This seems > > > > > > excessive to me, especially since I don't seem able to get it > > > > > > back without quitting from the program. Any ideas about that? > > > > > > > > > > frame=null ? > > > > > > > > > > > Richard > > > > > > > > > > > > ----------------------------------------------------------------- > > > > > >-- -- > > > > > > > > > > > >-- -- > > > > > > > > > > > >----- > > > > > > > > > > > > _______________________________________________ > > > > > > Gambas-user mailing list > > > > > > Gambas-user at lists.sourceforge.net > > > > > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > > > > > ------------------------------------------------------------------- > > > > >-- -- > > > > > > > > > >-- -- > > > > > > > > > >--- > > > > > > > > > > _______________________________________________ > > > > > Gambas-user mailing list > > > > > Gambas-user at lists.sourceforge.net > > > > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > > > Yes. Right after the FOR loop which iterates through all the frames > > > > for loading and processing. > > > > > > > > That is one of the reasons I thought I would ask for help on this. As > > > > far as I can tell I have complied with all of Benoit's hints and tips > > > > on managing memory. The frame variable is declared local to the event > > > > handler: DIM frame AS NEW Image > > > > The event handler is the only code which uses this variable. There is > > > > a WAIT statement in the FOR loop so that the ProgressBar works, but > > > > the memory is eaten up at the same ferocious rate either with or > > > > without the WAIT. > > > > > > > > What I can tell for certain is that the memory is only allocated > > > > while my code is executing the FOR loop. The frame variable is > > > > created and destroyed outside this loop which strongly suggests that > > > > I have not programmed the code which is using the memory. By deleting > > > > all code within the loop EXCEPT the frame = Image.Load() line I can > > > > run the code and watch as it runs through my memory at an estimated > > > > rate of something like 4MiB per sub-1MiB frame. This just doesn't > > > > look right. If it is then I cannot use Gambas to apply simple changes > > > > to very large numbers of PNG images. That can't be right either. > > > > > > > > For completeness I should also mention that I have run the FOR loop > > > > with both Image handling lines removed (load/stretch and save) and > > > > there is no sign of memory loss; just blindness 'cos there are no > > > > pictures:-) > > > > > > > > Richard > > > > > > Can you send your project, or better isolate the image processing that > > > burns your memory in a little project? > > > > > > Regards, > > > > Glad to; I have been running a simple test project which reveals what I > > now believe to be a bug of some long standing. I have only been able to > > test 2.4, 2,16 and 2.20 so far. 2.4 works without consuming memory, > > 2.16.and 2.20 have the bug. > > > > I put together a simple form with a progress bar and two buttons. I > > observe memory and swap consumption while the progress bar moves towards > > 100% using gkrellm - 'cos it's always there. > > > > The test program merely reloads a single image file many times so it is > > quicker to run than the "real thing" where there may be hundreds of > > different files. Nevertheless its behaviour is just the same, suggesting > > to me that there may be a problem in the Image.Load() method. The same > > memory consumption problem occurs if the object is of type Picture and > > Picture.Load() is used. > > > > Hope it's easy to find because I would really like to get this working > > for my brother. > > > > Richard > > > > ' Gambas class file > > > > PUBLIC SUB _new() > > > > END > > > > PUBLIC SUB Form_Open() > > > > END > > > > PUBLIC SUB Quit_Click() > > > > ME.Close > > > > END > > > > PUBLIC SUB Test_Click() > > DIM n AS Integer > > DIM Frame AS NEW Image > > > > ProgressBar1.Visible = TRUE > > FOR n = 0 TO 799 > > Frame = Image.Load("/home/richard/1024x576.png") > > ProgressBar1.Value = n / 499 > > WAIT > > NEXT > > ProgressBar1.Visible = FALSE > > > > END > > Do you use gb.qt or gb.gtk? Ah Benoit! Always the difficult questions :-p) According to the test project's components list it uses gb, gb.form, gb.gui and gb.image. The desktop/window manager is LXDE for the 2.16 and 2.20 tests. The 2.4 test was carried out in KDE. I have just tried to select gb.qt for the test project but it said that gb.qt is incompatible with gb.gui. So I de-selected gb.gui and wasn't prevented from now selecting gb.qt. Recompiled and re-run and the test works perfectly. Thank you thank you thank you! I have never given any thought in the past about which toolkit I was using. Being a devotee of KDE, up to v3.5, I suppose I have always used gb.qt etc. Now since Mandriva 2010 I am forced to seek an alternative to KDE as 4.3 is too much like Windows for my liking, certainly in terms of its poor performance. I have been using LXDE without realising that it might be using the gtk toolkit. Now I have a solution I can easily deploy to my brother's PC (a clone of the one I develop on for him). Ooops, spoke too soon. The working project compiles ok but breaks now where I test the presence of an object in a collection. Looks like the place I get the collection key is not initialising. It is a ComboBox which I fill in one splash with DIr(path, pattern, gb.File). Must be a difference in qt and gtk combo boxes. Shouldn't take too long to fix though. Thanks again for your help with this. Richard From richard.j.walker at ...247... Sat May 8 03:27:54 2010 From: richard.j.walker at ...247... (Richard) Date: Sat, 8 May 2010 02:27:54 +0100 Subject: [Gambas-user] Runaway memory consumption not released until program exit In-Reply-To: <201005080139.16793.richard.j.walker@...247...> References: <201005071802.52675.richard.j.walker@...247...> <201005080150.04542.gambas@...1...> <201005080139.16793.richard.j.walker@...247...> Message-ID: <201005080227.54878.richard.j.walker@...247...> > Ooops, spoke too soon. The working project > compiles ok but breaks now where I test the presence of an object in a > collection. Looks like the place I get the collection key is not > initialising. It is a ComboBox which I fill in one splash with DIr(path, > pattern, gb.File). Must be a difference in qt and gtk combo boxes. > Shouldn't take too long to fix though. > Just for completeness.... The original combo box (gtk?) fires its change event when its List is set by a string array after all of the elements of the list have been properly put in place, counted and indexed. I can then use the change event to see if the now current list item has been seen before, and if not I add it and its associated object to a collection. The qt combo box I am now using will also be quite happy to be initialised by a string array and it duly fires off its change event. This time, however, the count and index are not yet correct in the change event handler. They are of course correct by the time the event returns. My horrible kludge of a fix is to have a class boolean property called RE_RUN which I set false before I set up the combo box and then set to true afterwards. I re-trigger the change event with a couple of harmless index number flips. (At worst this will add an extra object to the collection before it is needed, but I can live with that). The combo change event has its event analysis code wrapped in an IF statement which tests the RE_RUN property to see if it should be executed. There are other obvious glitches, like items hidden by overlaid widgets on the gtk form which are now plainly visible (and in the way) on the qt version, but that just means I was relying too much on the gui behaviour. I can fix it be being more explicit about what should be hidden and revealed. Is there a reference somewhere to the differences of behaviour in Gambas which depend on the underlying gui toolkit? Time for bed now... Richard From doriano.blengino at ...1909... Sat May 8 07:41:20 2010 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Sat, 08 May 2010 07:41:20 +0200 Subject: [Gambas-user] Pipe doesn't receive contents In-Reply-To: <201005080105.36585.gambas@...1...> References: <4BE3C67F.8040906@...221...> <201005080016.53305.gambas@...1...> <201005080023.37341.gambas@...1...> <201005080105.36585.gambas@...1...> Message-ID: <4BE4F980.4090904@...1909...> Beno?t Minisini ha scritto: >>>> Trying the example code for pipes, I only get a waiting prompt, and >>>> then it jumps out of the loop. >>>> >>>> I added two little statements to have some output: >>>> >>>> DIM hFile AS File >>>> DIM sLine AS String >>>> >>>> hFile = PIPE "/tmp/FIFO1" FOR INPUT >>>> >>>> PRINT "Now let's start:" >>>> >>>> WHILE NOT Eof(hFile) >>>> >>>> LINE INPUT #hFile, sLine >>>> PRINT sLine >>>> >>>> WEND >>>> >>>> PRINT "That's it." >>>> >>>> When I start this, it prints the start message and waits. It's in a >>>> Konsole window within KDE. I open another terminal and type >>>> >>>> ls > /tmp/FIFO1 >>>> >>>> Instead of giving the file list, it just prints the finish message and >>>> quits. >>>> >>>> Did I do something wrong? >>>> >>>> Rolf >>>> >>> I just tried, and it works with "ls -la > /tmp/FIFO1", but not with "ls > >>> /tmp/FIFO1", as you described. Very strange... >>> >> It is actually random: sometimes it works as expected, sometimes Eof(hFile) >> returns True the first time it is called, and the pipe is not read. Very >> strange yet! >> > > OK, I'm stupid. It's just silly to use Eof() with a pipe, because it just tell > you that the pipe is void, and can't know that some data may come in the > future. So if the program is too fast for the data to come, the first Eof() > returns TRUE. > No, you are not stupid - but it is false that it is stupid to use EOF with pipes. Just to show, I wrote a stupid short program in C (the word stupid used three times...): #include int main(argc, argv) { FILE* f; int c; f = fopen("/tmp/fifo", "r"); do { c = fgetc(f); if (c == EOF) break; putchar(c); } while (1); fclose(f); } This is the simplest (yet clear) program to test how to read and check for EOF in a pipe. Compiled, ran ./a.out, and seen that it works perfectly, both with "ls >..." and "ls -la >...". After that, I tried even with "cat >/tmp/fifo", to be sure (I am far slower than /bin/ls). Unsurprisingly, it works; after all, it is a strong point of unix to have a uniform interface to files, sockets, pipes and fifos (and more), and a simple test using two cat(1) in two different terminal would be enough. But as I never looked at the cat.c source, I wanted to see by myself what you was saying. I don't know what the problem is with gambas, so I can't help; but I do know that EOF with pipes and FIFOs work - I use both to control gdb in one of my freepascal projects; so, when I see someone on this list saying that it is a nonsense to check EOF in pipes, because all depends on speed, I must note that this is wrong. Of course, I may be wrong - if you do know something that I do not, please let me know: I am happy to learn more. Regards, Doriano From gambas at ...1... Sat May 8 14:30:43 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sat, 8 May 2010 14:30:43 +0200 Subject: [Gambas-user] Pipe doesn't receive contents In-Reply-To: <4BE4F980.4090904@...1909...> References: <4BE3C67F.8040906@...221...> <201005080105.36585.gambas@...1...> <4BE4F980.4090904@...1909...> Message-ID: <201005081430.43886.gambas@...1...> > > No, you are not stupid - but it is false that it is stupid to use EOF > with pipes. > Just to show, I wrote a stupid short program in C (the word stupid used > three times...): > > #include > > int main(argc, argv) { > FILE* f; > int c; > > f = fopen("/tmp/fifo", "r"); > do { > c = fgetc(f); > if (c == EOF) break; > putchar(c); > } while (1); > fclose(f); > } > > This is the simplest (yet clear) program to test how to read and check > for EOF in a pipe. > Compiled, ran ./a.out, and seen that it works perfectly, both with "ls > > >..." and "ls -la >...". > > After that, I tried even with "cat >/tmp/fifo", to be sure (I am far > slower than /bin/ls). Unsurprisingly, it works; after all, it is a > strong point of unix to have a uniform interface to files, sockets, > pipes and fifos (and more), and a simple test using two cat(1) in two > different terminal would be enough. But as I never looked at the cat.c > source, I wanted to see by myself what you was saying. > > I don't know what the problem is with gambas, so I can't help; but I do > know that EOF with pipes and FIFOs work - I use both to control gdb in > one of my freepascal projects; so, when I see someone on this list > saying that it is a nonsense to check EOF in pipes, because all depends > on speed, I must note that this is wrong. Of course, I may be wrong - if > you do know something that I do not, please let me know: I am happy to > learn more. > > Regards, > Doriano > First you used buffered I/O, whereas PIPE in Gambas use non-buffered I/O. Then you use fgetc(), which reads one character, whereas in Gambas the code uses LINE INPUT, which is far more complex. So you are not comparing the two same programs... Regards, -- Beno?t Minisini From gambas at ...1... Sat May 8 14:36:07 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sat, 8 May 2010 14:36:07 +0200 Subject: [Gambas-user] Pipe doesn't receive contents In-Reply-To: <201005081430.43886.gambas@...1...> References: <4BE3C67F.8040906@...221...> <4BE4F980.4090904@...1909...> <201005081430.43886.gambas@...1...> Message-ID: <201005081436.07371.gambas@...1...> > > First you used buffered I/O, whereas PIPE in Gambas use non-buffered I/O. > Then you use fgetc(), which reads one character, whereas in Gambas the > code uses LINE INPUT, which is far more complex. So you are not comparing > the two same programs... > > Regards, And the same program as you written in Gambas works too: Dim hFile As File Dim iChar As Byte hFile = Pipe "/tmp/FIFO1" For Input Print "Now let's start:";; Eof(hFile) Do Try iChar = Read #hFile As Byte If Error Then ' Normally the error is "End of file" Print Error.Text Break Endif Print Chr$(iChar); Loop Print "That's it." -- Beno?t Minisini From gambas at ...1... Sat May 8 17:37:27 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sat, 8 May 2010 17:37:27 +0200 Subject: [Gambas-user] Runaway memory consumption not released until program exit In-Reply-To: <201005080139.16793.richard.j.walker@...247...> References: <201005071802.52675.richard.j.walker@...247...> <201005080150.04542.gambas@...1...> <201005080139.16793.richard.j.walker@...247...> Message-ID: <201005081737.27121.gambas@...1...> > > Do you use gb.qt or gb.gtk? > > Ah Benoit! Always the difficult questions :-p) According to the test > project's components list it uses gb, gb.form, gb.gui and gb.image. The > desktop/window manager is LXDE for the 2.16 and 2.20 tests. The 2.4 test > was carried out in KDE. > > I have just tried to select gb.qt for the test project but it said that > gb.qt is incompatible with gb.gui. So I de-selected gb.gui and wasn't > prevented from now selecting gb.qt. > > Recompiled and re-run and the test works perfectly. Thank you thank you > thank you! I have never given any thought in the past about which toolkit > I was using. Being a devotee of KDE, up to v3.5, I suppose I have always > used gb.qt etc. Now since Mandriva 2010 I am forced to seek an alternative > to KDE as 4.3 is too much like Windows for my liking, certainly in terms > of its poor performance. I have been using LXDE without realising that it > might be using the gtk toolkit. > > Now I have a solution I can easily deploy to my brother's PC (a clone of > the one I develop on for him). Ooops, spoke too soon. The working project > compiles ok but breaks now where I test the presence of an object in a > collection. Looks like the place I get the collection key is not > initialising. It is a ComboBox which I fill in one splash with DIr(path, > pattern, gb.File). Must be a difference in qt and gtk combo boxes. > Shouldn't take too long to fix though. > > Thanks again for your help with this. > > Richard > I fixed the memory leak in revision #2937 for Gambas 2 and revision #2938 for Gambas 3. So, if you need, you can use gb.gtk again! Regards, -- Beno?t Minisini From gambas at ...1... Sat May 8 17:39:00 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sat, 8 May 2010 17:39:00 +0200 Subject: [Gambas-user] Runaway memory consumption not released until program exit In-Reply-To: <201005080227.54878.richard.j.walker@...247...> References: <201005071802.52675.richard.j.walker@...247...> <201005080139.16793.richard.j.walker@...247...> <201005080227.54878.richard.j.walker@...247...> Message-ID: <201005081739.00562.gambas@...1...> > > Ooops, spoke too soon. The working project > > compiles ok but breaks now where I test the presence of an object in a > > collection. Looks like the place I get the collection key is not > > initialising. It is a ComboBox which I fill in one splash with DIr(path, > > pattern, gb.File). Must be a difference in qt and gtk combo boxes. > > Shouldn't take too long to fix though. > > Just for completeness.... > > The original combo box (gtk?) fires its change event when its List is set > by a string array after all of the elements of the list have been properly > put in place, counted and indexed. I can then use the change event to see > if the now current list item has been seen before, and if not I add it and > its associated object to a collection. > > The qt combo box I am now using will also be quite happy to be initialised > by a string array and it duly fires off its change event. This time, > however, the count and index are not yet correct in the change event > handler. They are of course correct by the time the event returns. My > horrible kludge of a fix is to have a class boolean property called RE_RUN > which I set false before I set up the combo box and then set to true > afterwards. > > I re-trigger the change event with a couple of harmless index number flips. > (At worst this will add an extra object to the collection before it is > needed, but I can live with that). > > The combo change event has its event analysis code wrapped in an IF > statement which tests the RE_RUN property to see if it should be executed. > > There are other obvious glitches, like items hidden by overlaid widgets on > the gtk form which are now plainly visible (and in the way) on the qt > version, but that just means I was relying too much on the gui behaviour. > I can fix it be being more explicit about what should be hidden and > revealed. > > Is there a reference somewhere to the differences of behaviour in Gambas > which depend on the underlying gui toolkit? > > Time for bed now... > > Richard > The combo box behaviour should have been cleaned up in Gambas 3. Anyway, don't use the change event while setting the List property. You can't be sure that Qt and GTK+ behave the same when filling the list. Regards, -- Beno?t Minisini From richard.j.walker at ...247... Sat May 8 18:13:59 2010 From: richard.j.walker at ...247... (Richard) Date: Sat, 8 May 2010 17:13:59 +0100 Subject: [Gambas-user] Runaway memory consumption not released until program exit In-Reply-To: <201005081737.27121.gambas@...1...> References: <201005071802.52675.richard.j.walker@...247...> <201005080139.16793.richard.j.walker@...247...> <201005081737.27121.gambas@...1...> Message-ID: <201005081714.00101.richard.j.walker@...247...> On Saturday 08 May 2010 16:37:27 Beno?t Minisini wrote: > > > Do you use gb.qt or gb.gtk? > > > > Ah Benoit! Always the difficult questions :-p) According to the test > > project's components list it uses gb, gb.form, gb.gui and gb.image. The > > desktop/window manager is LXDE for the 2.16 and 2.20 tests. The 2.4 test > > was carried out in KDE. > > > > I have just tried to select gb.qt for the test project but it said that > > gb.qt is incompatible with gb.gui. So I de-selected gb.gui and wasn't > > prevented from now selecting gb.qt. > > > > Recompiled and re-run and the test works perfectly. Thank you thank you > > thank you! I have never given any thought in the past about which toolkit > > I was using. Being a devotee of KDE, up to v3.5, I suppose I have always > > used gb.qt etc. Now since Mandriva 2010 I am forced to seek an > > alternative to KDE as 4.3 is too much like Windows for my liking, > > certainly in terms of its poor performance. I have been using LXDE > > without realising that it might be using the gtk toolkit. > > > > Now I have a solution I can easily deploy to my brother's PC (a clone of > > the one I develop on for him). Ooops, spoke too soon. The working project > > compiles ok but breaks now where I test the presence of an object in a > > collection. Looks like the place I get the collection key is not > > initialising. It is a ComboBox which I fill in one splash with DIr(path, > > pattern, gb.File). Must be a difference in qt and gtk combo boxes. > > Shouldn't take too long to fix though. > > > > Thanks again for your help with this. > > > > Richard > > I fixed the memory leak in revision #2937 for Gambas 2 and revision #2938 > for Gambas 3. So, if you need, you can use gb.gtk again! > > Regards, Thank you Beno?t, I am preparing a system right now so I can build revision #2937. Hopefully it won't be too difficult to transfer to my brother's PC. I am trying to keep it as clean and minimal as possible as he is far away on a slow internet connection and remote updates can be ... problematical. I was hoping to avoid the change by using the qt component but it just looks too ugly! I cannot see why it looks so completely different on the LXDE desktop as most of the other qt-based programs (qjackctl for instance) look very similar to the gtk-based Gambas programs. As I said, I've never really given much thought to the topic of themes and different gui toolkits. Richard From doriano.blengino at ...1909... Sat May 8 18:41:28 2010 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Sat, 08 May 2010 18:41:28 +0200 Subject: [Gambas-user] Pipe doesn't receive contents In-Reply-To: <201005081436.07371.gambas@...1...> References: <4BE3C67F.8040906@...221...> <4BE4F980.4090904@...1909...> <201005081430.43886.gambas@...1...> <201005081436.07371.gambas@...1...> Message-ID: <4BE59438.30006@...1909...> Beno?t Minisini ha scritto: >> First you used buffered I/O, whereas PIPE in Gambas use non-buffered I/O. >> Then you use fgetc(), which reads one character, whereas in Gambas the >> code uses LINE INPUT, which is far more complex. So you are not comparing >> the two same programs... >> >> Regards, >> > > And the same program as you written in Gambas works too: > > Dim hFile As File > Dim iChar As Byte > > hFile = Pipe "/tmp/FIFO1" For Input > > Print "Now let's start:";; Eof(hFile) > > Do > Try iChar = Read #hFile As Byte > If Error Then > ' Normally the error is "End of file" > Print Error.Text > Break > Endif > Print Chr$(iChar); > Loop > > Print "That's it." > I promise that this is my last email on this subject. I did some research about eof() & pipes just because not only one, but two persons on this list said that eof() has no sense with pipes. It was not to say that gambas has glitches. Now, you are saying that the gambas code above runs just fine - and this, together with previous proofs, shows that eof works even with pipes. About comparing two different programs: I chose to make a test in C because that way I was closer to the system, not knowing what cat(1) does, and not knowing what gambas does. Remember, I wanted to demonstrate that eof works. I find a little surprising that you start to talk about buffered and unbuffered I/O, or things like reading one char at a time. Do you really think that this does matter? If so, thousands of unix program should be revised - but I don't think. It is also strange that in this last program you don't test for eof(), but for an error. Eof and errors are different. If you really want to demonstrate that your program works, use the normal eof(), like I did. Lastly, your explanation about eof in a previous email was misleading: "eof checks if the pipe is empty"; EOF should not do that, pipes and sockets can be empty (no data ready), but this is not an eof condition. Even when reading in unblocking mode, the return code for an eof is different from an EAGAIN. Anyway, I am happy that the above program works: our friend Rolf can rely on it. Regards, Doriano From gambas at ...1... Sat May 8 19:21:16 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sat, 8 May 2010 19:21:16 +0200 Subject: [Gambas-user] Pipe doesn't receive contents In-Reply-To: <4BE59438.30006@...1909...> References: <4BE3C67F.8040906@...221...> <201005081436.07371.gambas@...1...> <4BE59438.30006@...1909...> Message-ID: <201005081921.17030.gambas@...1...> > Beno?t Minisini ha scritto: > >> First you used buffered I/O, whereas PIPE in Gambas use non-buffered > >> I/O. Then you use fgetc(), which reads one character, whereas in Gambas > >> the code uses LINE INPUT, which is far more complex. So you are not > >> comparing the two same programs... > >> > >> Regards, > > > > And the same program as you written in Gambas works too: > > Dim hFile As File > > Dim iChar As Byte > > > > hFile = Pipe "/tmp/FIFO1" For Input > > > > Print "Now let's start:";; Eof(hFile) > > > > Do > > > > Try iChar = Read #hFile As Byte > > If Error Then > > > > ' Normally the error is "End of file" > > Print Error.Text > > Break > > > > Endif > > Print Chr$(iChar); > > > > Loop > > > > Print "That's it." > > I promise that this is my last email on this subject. > > I did some research about eof() & pipes just because not only one, but > two persons on this list said that eof() has no sense with pipes. It was > not to say that gambas has glitches. Now, you are saying that the gambas > code above runs just fine - and this, together with previous proofs, > shows that eof works even with pipes. > > About comparing two different programs: I chose to make a test in C > because that way I was closer to the system, not knowing what cat(1) > does, and not knowing what gambas does. Remember, I wanted to > demonstrate that eof works. > > I find a little surprising that you start to talk about buffered and > unbuffered I/O, or things like reading one char at a time. Do you really > think that this does matter? If so, thousands of unix program should be > revised - but I don't think. It is also strange that in this last > program you don't test for eof(), but for an error. Eof and errors are > different. If you really want to demonstrate that your program works, > use the normal eof(), like I did. Lastly, your explanation about eof in > a previous email was misleading: "eof checks if the pipe is empty"; EOF > should not do that, pipes and sockets can be empty (no data ready), but > this is not an eof condition. Even when reading in unblocking mode, the > return code for an eof is different from an EAGAIN. > > Anyway, I am happy that the above program works: our friend Rolf can > rely on it. > > Regards, > Doriano > The Gambas Eof() function has nothing related to the feof() C library function, even if they have almost the same name. So you can't make comparison. To simulate what feof() does, I have to check if reading a byte on the stream raises an error on Gambas. This what happens when you use fgetc(): it finally reads a byte on the file descriptor associated with the C buffered stream, and set an internal flag on end of file, this flag being returned by feof(). In Gambas, Eof() really checks if something can be read on the internal file descriptor at the moment you call it. So you cannot use it to read a pipe. You have to explicitely read it in blocking mode (this is the default for a pipe in Gambas). Then either the read will wait for the data, either it will fail as soon as the pipe is closed. Well, in a few words, don't mix the behaviour of Gambas, the C library and the Linux kernel! Regards, -- Beno?t Minisini From doriano.blengino at ...1909... Sat May 8 20:38:13 2010 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Sat, 08 May 2010 20:38:13 +0200 Subject: [Gambas-user] Pipe doesn't receive contents In-Reply-To: <201005081921.17030.gambas@...1...> References: <4BE3C67F.8040906@...221...> <201005081436.07371.gambas@...1...> <4BE59438.30006@...1909...> <201005081921.17030.gambas@...1...> Message-ID: <4BE5AF95.907@...1909...> Beno?t Minisini ha scritto: > > Well, in a few words, don't mix the behaviour of Gambas, the C library and the > Linux kernel! > So you are true. If someone says that tail(1) does not work with pipes, because eof has no meaning, he is right. If someone else demonstrates that it works, is wrong. Eof ("End-Of-File": E.nd O.f F.ile) in gambas does not mean the same thing as the rest of the world - in gambas it means "I can not read right now, you fool!". Who cares about C library and kernel, gambas does not use them, right? Anyway, in the system (and I bet in most languages), Eof means the same thing, always, no matter if coping with files, pipes, sockets, serial terminals and so on. This is the beauty of unix. In Gambas, Eof is good for true files; but not for pipes. For sockets, let me see a moment. For stdin, it depends: if it is a file, one thing; if it is a pipe, another thing; if it is a terminal, let me take a look (just a moment, you see, I use buffered non-blocking asynchronous sparse multi-line I/O and this is a complicated matter, it is not so simple like those stupid unix commands which, I don't know how, can run every aspect of a big unix system). Sorry for the irony - take it with a smile (just a little english humor). I see your point, but perhaps you should explain better at first, without misleading phrases, and not at the end, after arguing to someone (me) which, unfortunately, has often different ideas than you. After all, gambas is not the only thing in the world - if it does some thing differently than what one expects, or differently from other, important systems, some explanation can be useful. Our friend Rolf did the most common sense thing everyone would do: use eof() to catch the end of a stream. Then, two different persons said that the problem was the pipe. It is not the pipe. It is that gambas treats pipes differently than regular files. This is the thing to point out. You are also entitled to say that it is a unix fault, that pipes are not files, you can say whatever you want. But as long as gambas runs on unix, and uses the C library, you must point out the differences about the underlying system. Or not? It's your choice. Regards, Doriano From gambas at ...1... Sat May 8 21:06:56 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sat, 8 May 2010 21:06:56 +0200 Subject: [Gambas-user] Pipe doesn't receive contents In-Reply-To: <4BE5AF95.907@...1909...> References: <4BE3C67F.8040906@...221...> <201005081921.17030.gambas@...1...> <4BE5AF95.907@...1909...> Message-ID: <201005082106.56865.gambas@...1...> > Beno?t Minisini ha scritto: > > Well, in a few words, don't mix the behaviour of Gambas, the C library > > and the Linux kernel! > > So you are true. If someone says that tail(1) does not work with pipes, > because eof has no meaning, he is right. If someone else demonstrates > that it works, is wrong. Eof ("End-Of-File": E.nd O.f F.ile) in gambas > does not mean the same thing as the rest of the world - in gambas it > means "I can not read right now, you fool!". Who cares about C library > and kernel, gambas does not use them, right? Anyway, in the system (and > I bet in most languages), Eof means the same thing, always, no matter if > coping with files, pipes, sockets, serial terminals and so on. This is > the beauty of unix. > In Gambas, Eof is good for true files; but not for > pipes. For sockets, let me see a moment. For stdin, it depends: if it is > a file, one thing; if it is a pipe, another thing; if it is a terminal, > let me take a look (just a moment, you see, I use buffered non-blocking > asynchronous sparse multi-line I/O and this is a complicated matter, it > is not so simple like those stupid unix commands which, I don't know > how, can run every aspect of a big unix system). > > Sorry for the irony - Actually the irony is that you are writing the truth without noticing. The beauty of unix is that everything is a file. Cool, but that really works only with files. For every other kind of file descriptor, the semantic is different. So don't expect Gambas to be more coherent that the underlying OS. In Unix, there is no system call that tells you that are you are at the end of a file. But you have a system error instead, and that error really means "end of file" for files. For every other kind of file descriptor, it does not mean that. It depends. For example, for pipes, that error is returned when the other end of the pipe is closed. "End of file" in Gambas means "I cannot read right now", because I didn't find a better meaning that is coherent between all different kind of file descriptors. As we can't read the future, there is no way to know that we are at the end of file for descriptor that are not true files. I told you not to mix the behaviour of Gambas, the C library and the Linux kernel, because by using feof() from the C library, you thought that you are doing the same thing than using Eof() in Gambas. Then I admit that Eof() is not useful for pipes (and other special streams), so maybe I should make Eof() more clever: - If the stream is in non-blocking mode, do as before, i.e. check that something can be read. - If the stream is in blocking mode, try to just read a byte, and remember it. That way, if we were really at the "end of file" (or pipe closed for pipes, etc.), we get a system error that we can transform in gambas "end of file". Otherwise we block until a character arrives. I will try that and see if then Eof() will behave a bit like feof(). Regards, -- Beno?t Minisini From richard.j.walker at ...247... Sat May 8 21:59:08 2010 From: richard.j.walker at ...247... (Richard) Date: Sat, 8 May 2010 20:59:08 +0100 Subject: [Gambas-user] Gambas2 #2939 - Compile/Install OK, Run Not OK - FIXED Message-ID: <201005082059.09103.richard.j.walker@...247...> Hi everyone, and a special hello to anyone who has recently compiled and run Gambas2 on Mandriva 2010,0! The system is a freshly updated x86_64 Mandriva 2010.0 from which I removed the Gambas 2.19.0 which was installed and working. I have built, installed and tried to run today's #2939 revision but every time I type in gambas2 in a console I get the error: ERROR #27: Cannot load component 'gb.qt': cannot find library file When I execute locate gb.qt I get /usr/lib/gambas2/gb.qt.so /usr/lib/gambas2/gb.qt.so.0 /usr/lib/gambas2/gb.qt.so.0.0.0 I have also verified it is the right type of library (it is in /usr/lib rather than /usr/lib64 where I thought it might be) file /usr/lib/gambas2/qb.qt.so.0.0.0 /usr/lib/gambas2/gb.qt.so.0.0.0: ELF 64-bit LSB shared object, x86_64, version 1 (SYSV), dynamically linked, not stripped .... OK - I have solved it. The CLUE was in the name:-) it should be lib64 and not lib. The solution? Just copy it over. The empty /usr/lib/64/gambas2 directory was a dead giveaway. Left over from the Mandriva packaged gambas2 install it clearly should not have been empty, and now it isn't and Gambas 2 works again. Richard From gambas at ...1... Sat May 8 22:33:06 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sat, 8 May 2010 22:33:06 +0200 Subject: [Gambas-user] Pipe doesn't receive contents In-Reply-To: <201005082106.56865.gambas@...1...> References: <4BE3C67F.8040906@...221...> <4BE5AF95.907@...1909...> <201005082106.56865.gambas@...1...> Message-ID: <201005082233.06663.gambas@...1...> > > Then I admit that Eof() is not useful for pipes (and other special > streams), so maybe I should make Eof() more clever: > > - If the stream is in non-blocking mode, do as before, i.e. check that > something can be read. > > - If the stream is in blocking mode, try to just read a byte, and remember > it. That way, if we were really at the "end of file" (or pipe closed for > pipes, etc.), we get a system error that we can transform in gambas "end > of file". Otherwise we block until a character arrives. > > I will try that and see if then Eof() will behave a bit like feof(). > Hi, I have modified the behaviour of Eof() that way in revision #2940. Now it should work as intelligently as feof(), even more. (for example, if you open a void file, feof() will return FALSE, where Eof() will return TRUE). If anybody using processes, sockets, or other non-file streams get unexpected behaviours, please tell me! Regards, -- Beno?t Minisini From richard.j.walker at ...247... Sun May 9 01:23:13 2010 From: richard.j.walker at ...247... (Richard) Date: Sun, 9 May 2010 00:23:13 +0100 Subject: [Gambas-user] Another memory leak in gb.gtk Image Message-ID: <201005090023.13820.richard.j.walker@...247...> (The previously mentioned memory leak was in the thread "Runaway memory consumption not released until program exit". That has been identified as a memory leak by Beno?t and fixed today.) Hi Beno?t, I have found another leak in my image processing program. I double-checked it by adding the suspect line to the previous test module which now looks like this: ' Gambas class file PUBLIC SUB _new() END PUBLIC SUB Form_Open() END PUBLIC SUB Quit_Click() ME.Close END PUBLIC SUB Test_Click() DIM n AS Integer DIM Frame AS NEW Image ProgressBar1.Visible = TRUE FOR n = 0 TO 799 Frame = Image.Load("/home/richard/Pictures/snapshot1.png") Frame = Frame.Stretch(720, 576) ProgressBar1.Value = n / 799 WAIT NEXT ProgressBar1.Visible = FALSE END The two "Frame = " lines may be replaced with the single line: Frame = Image.Load("/home/richard/Pictures/snapshot1.png").Stretch(720, 576) with no change to the result. Both versions of the test work perfectly using gb.qt. Sorry to take so long to discover this. It took me ages to get a working development environment and your bug-fixed revision running and then some more time to accommodate the changes (over 2.20.0) to combo box change event handling. Richard From gambas at ...1... Sun May 9 12:12:13 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sun, 9 May 2010 12:12:13 +0200 Subject: [Gambas-user] Another memory leak in gb.gtk Image In-Reply-To: <201005090023.13820.richard.j.walker@...247...> References: <201005090023.13820.richard.j.walker@...247...> Message-ID: <201005091212.13102.gambas@...1...> > (The previously mentioned memory leak was in the thread "Runaway memory > consumption not released until program exit". That has been identified as a > memory leak by Beno?t and fixed today.) > > Hi Beno?t, > I have found another leak in my image processing program. I double-checked > it by adding the suspect line to the previous test module which now looks > like this: > ' Gambas class file > > PUBLIC SUB _new() > > END > > PUBLIC SUB Form_Open() > > END > > PUBLIC SUB Quit_Click() > > ME.Close > > END > > PUBLIC SUB Test_Click() > DIM n AS Integer > DIM Frame AS NEW Image > > ProgressBar1.Visible = TRUE > FOR n = 0 TO 799 > Frame = Image.Load("/home/richard/Pictures/snapshot1.png") > Frame = Frame.Stretch(720, 576) > ProgressBar1.Value = n / 799 > WAIT > NEXT > ProgressBar1.Visible = FALSE > > END > > The two "Frame = " lines may be replaced with the single line: > Frame = Image.Load("/home/richard/Pictures/snapshot1.png").Stretch(720, > 576) with no change to the result. > > Both versions of the test work perfectly using gb.qt. > > Sorry to take so long to discover this. It took me ages to get a working > development environment and your bug-fixed revision running and then some > more time to accommodate the changes (over 2.20.0) to combo box change > event handling. > > Richard > Hi, This is fixed in revision #2941. Regards, -- Beno?t Minisini From lang at ...1938... Sun May 9 12:57:47 2010 From: lang at ...1938... (Stevie) Date: Sun, 9 May 2010 12:57:47 +0200 Subject: [Gambas-user] Translation of IDE to german language Message-ID: <201005091257.47633.lang@...1938...> Hi List, the last to days I've translated the Gambas3-IDE to german. Benoit got the po- File and I think, meanwhile he commited it to svn. Could someone of the german Gambas-gurus check the translation, please? There are some translations missing or may be not perfect. ...so let me know and I will fix it. TIA Stevie From tobiasboe at ...221... Sun May 9 13:35:36 2010 From: tobiasboe at ...221... (tobiasboe at ...221...) Date: Sun, 09 May 2010 13:35:36 +0200 Subject: [Gambas-user] Component gb.debug Message-ID: <1OB4nI-1XIGp60@...2430...> Hello Mailing list, this time i have some questions about the gb.debug component, I really never worked with it and I just pass these questions to you. If I call a Debug.Begin() in Form_Open() event, there is no error. But with the following Debug.Start() instruction there raises a "Unable to open fifo" error. What is to do now? Regards, Tobias From gambas at ...1... Sun May 9 19:34:45 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sun, 9 May 2010 19:34:45 +0200 Subject: [Gambas-user] Component gb.debug In-Reply-To: <1OB4nI-1XIGp60@...2430...> References: <1OB4nI-1XIGp60@...2430...> Message-ID: <201005091934.45621.gambas@...1...> > Hello Mailing list, > this time i have some questions about the gb.debug component, I really > never worked with it and I just pass these questions to you. > If I call a Debug.Begin() in Form_Open() event, there is no error. But > with the following Debug.Start() instruction there raises a "Unable to > open fifo" error. What is to do now? > Regards, > Tobias Why do you want to use this component? It is just for allowing the IDE to debug Gambas programs. You should have no use of that! -- Beno?t Minisini From nando_f at ...951... Mon May 10 04:17:22 2010 From: nando_f at ...951... (nando) Date: Sun, 9 May 2010 22:17:22 -0400 Subject: [Gambas-user] Wait statements > stack overflow (gb3) In-Reply-To: <201005071429.55204.rterry@...1946...> References: <201005071429.55204.rterry@...1946...> Message-ID: <20100510013442.M58524@...951...> If I understand correctly from my Gambas programming experience and Benoit's comments over the years... A WAIT inside an event may allow the event to recursively retrigger if there are new events for that event. For example: A button click that does a lot of work. If you click the button while the work is being performed, the WAIT 0.1 causes the the Button1_click to happen again (ie recursively). I've seen this happen in VB too with DOEVENTS sub Button1_click ... FOR ... WAIT 0.1 ... NEXT ... What I do to prevent this is: I use the TAG property of Button1 as protection sub Button1_click IF LEN(Button1.TAG) <> 0 THEN RETURN Button1.TAG = "1" ... ... perform work ... Button1.TAG = "" END SUB This makes Button1_click a singleton. You can do this also by making Button1.Enable=FALSE but the button will look disabled...and you may not want that. You can also do this by using a public boolean PUBLIC Button1Protect 'false Sub Button1_click IF Button1Protect = true THEN RETURN Button1Protect=true ..do work Button1Protect = False END SUB -Fernando ---------- Original Message ----------- From: richard terry To: mailing list for gambas users Sent: Fri, 7 May 2010 14:29:55 +1000 Subject: [Gambas-user] Wait statements > stack overflow (gb3) > Hi LIst, > > I'm automatically parsing many many thousands of pages of documents, the > patients are in a listbox, and the documents in another. (with underlying > collections of course). > > The basic code looks like this: > > If cvwInboxDocuments.count = 0 Then > '.... do a whole lot of stuff > Wait 'make the gui refresh > Else > '.... do a whole lot of stuff > Wait 'make the gui refresh > > Wait > End If > > When this runs, it looks at each of the some 1800 pages of documents, > generated from hl7 files which were previously parsed into the table by an > automated process and converts the essential info to html for display, which > it resaves and and does the appropriate linking it needs to do to patient > names, provider names, test names etc. > > Though this could all run 'under the hood -automaed', I put the Wait > statements in so I could see the lists updating on the screen to watch what > was happening. > > If I run the code, after doing about 1/4 of the work it dies on the Wait > statement with a 'Stack Overflow' error. > > If I comment out the Wait statements > it all runs without a problem. > > Anyone know what's happening?? > > Regards > > Richard > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user ------- End of Original Message ------- From lang at ...1938... Mon May 10 20:39:51 2010 From: lang at ...1938... (Stevie) Date: Mon, 10 May 2010 20:39:51 +0200 Subject: [Gambas-user] How to create component written in Gambas Message-ID: <201005102039.51951.lang@...1938...> Hello List, two years ago, I've written a component in Gambas. Last week I leeched the latest Gambas3 from SVN and recompiled the component and the application which depends on this component, too. Something in creating a component must have changed. I can't see my component in the list of available components and my app complains about this missing component, too. 2 hours of google-ing ended in no result. Coul'd someone lend me hand and explain me (the whole way) how to create and register a component? TIA Stevie From Karl.Reinl at ...2345... Mon May 10 21:24:17 2010 From: Karl.Reinl at ...2345... (Charlie Reinl) Date: Mon, 10 May 2010 21:24:17 +0200 Subject: [Gambas-user] How to create component written in Gambas In-Reply-To: <201005102039.51951.lang@...1938...> References: <201005102039.51951.lang@...1938...> Message-ID: <1273519457.6624.13.camel@...40...> Am Montag, den 10.05.2010, 20:39 +0200 schrieb Stevie: > Hello List, > > two years ago, I've written a component in Gambas. > Last week I leeched the latest Gambas3 from SVN and recompiled the component > and the application which depends on this component, too. > Something in creating a component must have changed. I can't see my component > in the list of available components and my app complains about this missing > component, too. > > 2 hours of google-ing ended in no result. Coul'd someone lend me hand and > explain me (the whole way) how to create and register a component? > > TIA > Stevie Not google-ing, list-ing "User components" replaced by "Libraries" in Gambas 3 in the list around 25.04.2010 -- Amicalement Charlie From lang at ...1938... Mon May 10 22:44:21 2010 From: lang at ...1938... (Stevie) Date: Mon, 10 May 2010 22:44:21 +0200 Subject: [Gambas-user] How to create component written in Gambas In-Reply-To: <1273519457.6624.13.camel@...40...> References: <201005102039.51951.lang@...1938...> <1273519457.6624.13.camel@...40...> Message-ID: <201005102244.21728.lang@...1938...> Am Montag, 10. Mai 2010 21:24:17 schrieb Charlie Reinl: > Am Montag, den 10.05.2010, 20:39 +0200 schrieb Stevie: > > Hello List, > > > > two years ago, I've written a component in Gambas. > > Last week I leeched the latest Gambas3 from SVN and recompiled the > > component and the application which depends on this component, too. > > Something in creating a component must have changed. I can't see my > > component in the list of available components and my app complains about > > this missing component, too. > > > > 2 hours of google-ing ended in no result. Coul'd someone lend me hand and > > explain me (the whole way) how to create and register a component? > > > > TIA > > Stevie > > Not google-ing, list-ing > > "User components" replaced by "Libraries" in Gambas 3 > > in the list around 25.04.2010 > Tahnks! Made my day! ...it works! :-) Stevie From lang at ...1938... Mon May 10 23:27:16 2010 From: lang at ...1938... (Stevie) Date: Mon, 10 May 2010 23:27:16 +0200 Subject: [Gambas-user] How to create component written in Gambas In-Reply-To: <1273519457.6624.13.camel@...40...> References: <201005102039.51951.lang@...1938...> <1273519457.6624.13.camel@...40...> Message-ID: <201005102327.16947.lang@...1938...> Am Montag, 10. Mai 2010 21:24:17 schrieb Charlie Reinl: > Am Montag, den 10.05.2010, 20:39 +0200 schrieb Stevie: > > Hello List, > > > > two years ago, I've written a component in Gambas. > > Last week I leeched the latest Gambas3 from SVN and recompiled the > > component and the application which depends on this component, too. > > Something in creating a component must have changed. I can't see my > > component in the list of available components and my app complains about > > this missing component, too. > > > > 2 hours of google-ing ended in no result. Coul'd someone lend me hand and > > explain me (the whole way) how to create and register a component? > > > > TIA > > Stevie > > Not google-ing, list-ing > > "User components" replaced by "Libraries" in Gambas 3 > > in the list around 25.04.2010 > Once question remains: - I'm developing a non-GUI-app on my notebook with kubuntu. - The app, and its component, shall run on debian server without X. - grep-ing through the app's project directory spits nothing out, regarding the path of my library (former component). - Where and how can I set the suitable path in my app, for loading the library? - I know, I have (and I want to) recompile my app and (if necassary) my library on the X-less server, because I want to see unmet depandencies (due to different versions of gambas or on system library level) at compile time - But for this szenario, I need a way to tell my app (X-less) where to find its library. How??? TIA Stevie From gambas at ...1... Mon May 10 23:40:28 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 10 May 2010 23:40:28 +0200 Subject: [Gambas-user] How to create component written in Gambas In-Reply-To: <201005102327.16947.lang@...1938...> References: <201005102039.51951.lang@...1938...> <1273519457.6624.13.camel@...40...> <201005102327.16947.lang@...1938...> Message-ID: <201005102340.28930.gambas@...1...> > Am Montag, 10. Mai 2010 21:24:17 schrieb Charlie Reinl: > > Am Montag, den 10.05.2010, 20:39 +0200 schrieb Stevie: > > > Hello List, > > > > > > two years ago, I've written a component in Gambas. > > > Last week I leeched the latest Gambas3 from SVN and recompiled the > > > component and the application which depends on this component, too. > > > Something in creating a component must have changed. I can't see my > > > component in the list of available components and my app complains > > > about this missing component, too. > > > > > > 2 hours of google-ing ended in no result. Coul'd someone lend me hand > > > and explain me (the whole way) how to create and register a component? > > > > > > TIA > > > Stevie > > > > Not google-ing, list-ing > > > > "User components" replaced by "Libraries" in Gambas 3 > > > > in the list around 25.04.2010 > > Once question remains: > - I'm developing a non-GUI-app on my notebook with kubuntu. > - The app, and its component, shall run on debian server without X. > - grep-ing through the app's project directory spits nothing out, regarding > the path of my library (former component). > - Where and how can I set the suitable path in my app, for loading the > library? > - I know, I have (and I want to) recompile my app and (if necassary) my > library on the X-less server, because I want to see unmet depandencies (due > to different versions of gambas or on system library level) at compile > time - But for this szenario, I need a way to tell my app (X-less) where > to find its library. > > How??? > > TIA > Stevie > At the moment, the library is searched in the same path as the executable, or in /usr/bin, or in /bin. Regards, -- Beno?t Minisini From lang at ...1938... Mon May 10 23:56:55 2010 From: lang at ...1938... (Stevie) Date: Mon, 10 May 2010 23:56:55 +0200 Subject: [Gambas-user] How to create component written in Gambas In-Reply-To: <201005102340.28930.gambas@...1...> References: <201005102039.51951.lang@...1938...> <201005102327.16947.lang@...1938...> <201005102340.28930.gambas@...1...> Message-ID: <201005102356.55766.lang@...1938...> Am Montag, 10. Mai 2010 23:40:28 schrieb Beno?t Minisini: > > Am Montag, 10. Mai 2010 21:24:17 schrieb Charlie Reinl: > > > Am Montag, den 10.05.2010, 20:39 +0200 schrieb Stevie: > > > > Hello List, > > > > > > > > two years ago, I've written a component in Gambas. > > > > Last week I leeched the latest Gambas3 from SVN and recompiled the > > > > component and the application which depends on this component, too. > > > > Something in creating a component must have changed. I can't see my > > > > component in the list of available components and my app complains > > > > about this missing component, too. > > > > > > > > 2 hours of google-ing ended in no result. Coul'd someone lend me hand > > > > and explain me (the whole way) how to create and register a > > > > component? > > > > > > > > TIA > > > > Stevie > > > > > > Not google-ing, list-ing > > > > > > "User components" replaced by "Libraries" in Gambas 3 > > > > > > in the list around 25.04.2010 > > > > Once question remains: > > - I'm developing a non-GUI-app on my notebook with kubuntu. > > - The app, and its component, shall run on debian server without X. > > - grep-ing through the app's project directory spits nothing out, > > regarding the path of my library (former component). > > - Where and how can I set the suitable path in my app, for loading the > > library? > > - I know, I have (and I want to) recompile my app and (if necassary) my > > library on the X-less server, because I want to see unmet depandencies > > (due to different versions of gambas or on system library level) at > > compile time - But for this szenario, I need a way to tell my app > > (X-less) where to find its library. > > > > How??? > > > > TIA > > Stevie > > At the moment, the library is searched in the same path as the executable, > or in /usr/bin, or in /bin. > > Regards, > Oh...that's easier than before! ...so, on the server, I can have one single directory where I have all my apps and libraries?! :-)))) Thanks! Stevie From gambas at ...1... Mon May 10 23:59:45 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 10 May 2010 23:59:45 +0200 Subject: [Gambas-user] How to create component written in Gambas In-Reply-To: <201005102356.55766.lang@...1938...> References: <201005102039.51951.lang@...1938...> <201005102340.28930.gambas@...1...> <201005102356.55766.lang@...1938...> Message-ID: <201005102359.45982.gambas@...1...> > Am Montag, 10. Mai 2010 23:40:28 schrieb Beno?t Minisini: > > > Am Montag, 10. Mai 2010 21:24:17 schrieb Charlie Reinl: > > > > Am Montag, den 10.05.2010, 20:39 +0200 schrieb Stevie: > > > > > Hello List, > > > > > > > > > > two years ago, I've written a component in Gambas. > > > > > Last week I leeched the latest Gambas3 from SVN and recompiled the > > > > > component and the application which depends on this component, too. > > > > > Something in creating a component must have changed. I can't see my > > > > > component in the list of available components and my app complains > > > > > about this missing component, too. > > > > > > > > > > 2 hours of google-ing ended in no result. Coul'd someone lend me > > > > > hand and explain me (the whole way) how to create and register a > > > > > component? > > > > > > > > > > TIA > > > > > Stevie > > > > > > > > Not google-ing, list-ing > > > > > > > > "User components" replaced by "Libraries" in Gambas 3 > > > > > > > > in the list around 25.04.2010 > > > > > > Once question remains: > > > - I'm developing a non-GUI-app on my notebook with kubuntu. > > > - The app, and its component, shall run on debian server without X. > > > - grep-ing through the app's project directory spits nothing out, > > > regarding the path of my library (former component). > > > - Where and how can I set the suitable path in my app, for loading the > > > library? > > > - I know, I have (and I want to) recompile my app and (if necassary) my > > > library on the X-less server, because I want to see unmet depandencies > > > (due to different versions of gambas or on system library level) at > > > compile time - But for this szenario, I need a way to tell my app > > > (X-less) where to find its library. > > > > > > How??? > > > > > > TIA > > > Stevie > > > > At the moment, the library is searched in the same path as the > > executable, > > > > or in /usr/bin, or in /bin. > > > > Regards, > > Oh...that's easier than before! ...so, on the server, I can have one single > directory where I have all my apps and libraries?! :-)))) > > Thanks! > Stevie > Yes. Maybe in the future the library will be searched inside the PATH environmental variable, which is logical I think. Regards, -- Beno?t Minisini From lang at ...1938... Tue May 11 00:47:10 2010 From: lang at ...1938... (Stevie) Date: Tue, 11 May 2010 00:47:10 +0200 Subject: [Gambas-user] How to create component written in Gambas In-Reply-To: <201005102359.45982.gambas@...1...> References: <201005102039.51951.lang@...1938...> <201005102356.55766.lang@...1938...> <201005102359.45982.gambas@...1...> Message-ID: <201005110047.10086.lang@...1938...> Am Montag, 10. Mai 2010 23:59:45 schrieb Beno?t Minisini: > > Am Montag, 10. Mai 2010 23:40:28 schrieb Beno?t Minisini: > > > > Am Montag, 10. Mai 2010 21:24:17 schrieb Charlie Reinl: > > > > > Am Montag, den 10.05.2010, 20:39 +0200 schrieb Stevie: > > > > > > Hello List, > > > > > > > > > > > > two years ago, I've written a component in Gambas. > > > > > > Last week I leeched the latest Gambas3 from SVN and recompiled > > > > > > the component and the application which depends on this > > > > > > component, too. Something in creating a component must have > > > > > > changed. I can't see my component in the list of available > > > > > > components and my app complains about this missing component, > > > > > > too. > > > > > > > > > > > > 2 hours of google-ing ended in no result. Coul'd someone lend me > > > > > > hand and explain me (the whole way) how to create and register a > > > > > > component? > > > > > > > > > > > > TIA > > > > > > Stevie > > > > > > > > > > Not google-ing, list-ing > > > > > > > > > > "User components" replaced by "Libraries" in Gambas 3 > > > > > > > > > > in the list around 25.04.2010 > > > > > > > > Once question remains: > > > > - I'm developing a non-GUI-app on my notebook with kubuntu. > > > > - The app, and its component, shall run on debian server without X. > > > > - grep-ing through the app's project directory spits nothing out, > > > > regarding the path of my library (former component). > > > > - Where and how can I set the suitable path in my app, for loading > > > > the library? > > > > - I know, I have (and I want to) recompile my app and (if necassary) > > > > my library on the X-less server, because I want to see unmet > > > > depandencies (due to different versions of gambas or on system > > > > library level) at compile time - But for this szenario, I need a way > > > > to tell my app (X-less) where to find its library. > > > > > > > > How??? > > > > > > > > TIA > > > > Stevie > > > > > > At the moment, the library is searched in the same path as the > > > executable, > > > > > > or in /usr/bin, or in /bin. > > > > > > Regards, > > > > Oh...that's easier than before! ...so, on the server, I can have one > > single directory where I have all my apps and libraries?! :-)))) > > > > Thanks! > > Stevie > > Yes. Maybe in the future the library will be searched inside the PATH > environmental variable, which is logical I think. > > Regards, > Yes! ..but the working directory should always be in PATH! ;-) But...what's up, with a special PATH vor Gambas-libraries? ...and.... Hey! There are many many nice improvements in the latest Gambas3-version in comparsion to my last SVN-download "some" time ago! ;-) Thanks for that!!!! Regards Stevie From richard.j.walker at ...247... Tue May 11 20:29:08 2010 From: richard.j.walker at ...247... (Richard) Date: Tue, 11 May 2010 19:29:08 +0100 Subject: [Gambas-user] Message.Info... etc.; screen position Message-ID: <201005111929.08764.richard.j.walker@...247...> Hi everybody, This one has troubled me for quite a while and it has recently got worse since my purchase of a wide screen monitor to replace the right hand screen of a twin-screen stretched desktop setup. How can I control where a Message pop-up might be displayed? When I am working on the left hand screen it is possible for a message window to appear on the right hand screen well beyond my peripheral range of vision. Twice already this evening I have been left wondering why my program has stopped responding only to discover an unexpected pop-up message box three feet away to my right. This does not seem to happen with "Dialog" which has a much more natural habit of appearing under the mouse. I'm guessing it is actually centred on the main form window. Is it possible, does anyone think, to create a new container object in a project which inherits Message but adds the capability of adjusting its position? Richard From prog at ...2177... Wed May 12 17:18:24 2010 From: prog at ...2177... (craf) Date: Wed, 12 May 2010 11:18:24 -0400 Subject: [Gambas-user] How to create event to control created at runtime Message-ID: <1273677504.2012.2.camel@...2406...> Hi. I would like to know how to associate a click event to a button control created at runtime. I know the code to create the button is: Dim myButton as new Button (Fmain) but what I need is to create the click event for this button and the button to call the click event. Regards From simonart.dominique at ...11... Wed May 12 17:33:48 2010 From: simonart.dominique at ...11... (Simonart Dominique) Date: Wed, 12 May 2010 17:33:48 +0200 Subject: [Gambas-user] How to create event to control created at runtime In-Reply-To: <1273677504.2012.2.camel@...2406...> References: <1273677504.2012.2.camel@...2406...> Message-ID: <4BEACA5C.8030405@...11...> Hi, Just add "As ClickEventName" regards Le 12/05/2010 17:18, craf a ?crit : > > Hi. > > I would like to know how to associate a click event to a button control > created at runtime. > I know the code to create the button is: > > Dim myButton as new Button (Fmain) > > but what I need is to create the click event for this button and the > button to call the click event. > > Regards > > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > From prog at ...2177... Wed May 12 17:43:56 2010 From: prog at ...2177... (craf) Date: Wed, 12 May 2010 11:43:56 -0400 Subject: [Gambas-user] How to create event to control created at runtime In-Reply-To: <4BEACA5C.8030405@...11...> References: <1273677504.2012.2.camel@...2406...> <4BEACA5C.8030405@...11...> Message-ID: <1273679036.2012.4.camel@...2406...> -----Mensaje original----- De: Simonart Dominique Reply-to: mailing list for gambas users Para: mailing list for gambas users Asunto: Re: [Gambas-user] How to create event to control created at runtime Fecha: Wed, 12 May 2010 17:33:48 +0200 Hi. So? Dim myButton as new Button (Fmain) as clickeventname Regards >Hi, >Just add "As ClickEventName" >regards >Le 12/05/2010 17:18, craf a ?crit : > > Hi. > > I would like to know how to associate a click event to a button control > created at runtime. > I know the code to create the button is: > > Dim myButton as new Button (Fmain) > > but what I need is to create the click event for this button and the > button to call the click event. > > Regards > > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > ------------------------------------------------------------------------------ _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From prog at ...2177... Wed May 12 17:57:53 2010 From: prog at ...2177... (craf) Date: Wed, 12 May 2010 11:57:53 -0400 Subject: [Gambas-user] How to create event to control created at runtime In-Reply-To: <1273679036.2012.4.camel@...2406...> References: <1273677504.2012.2.camel@...2406...> <4BEACA5C.8030405@...11...> <1273679036.2012.4.camel@...2406...> Message-ID: <1273679873.2012.5.camel@...2406...> -----Mensaje original----- De: craf Reply-to: mailing list for gambas users Para: mailing list for gambas users Asunto: Re: [Gambas-user] How to create event to control created at runtime Fecha: Wed, 12 May 2010 11:43:56 -0400 -----Mensaje original----- De: Simonart Dominique Reply-to: mailing list for gambas users Para: mailing list for gambas users Asunto: Re: [Gambas-user] How to create event to control created at runtime Fecha: Wed, 12 May 2010 17:33:48 +0200 Thanks? Works. Regards >Hi. >So? >Dim myButton as new Button (Fmain) as clickeventname >Regards >Hi, >Just add "As ClickEventName" >regards >Le 12/05/2010 17:18, craf a ?crit : > > Hi. > > I would like to know how to associate a click event to a button control > created at runtime. > I know the code to create the button is: > > Dim myButton as new Button (Fmain) > > but what I need is to create the click event for this button and the > button to call the click event. > > Regards > > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > ------------------------------------------------------------------------------ _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user ------------------------------------------------------------------------------ _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From jpga at ...402... Wed May 12 21:33:50 2010 From: jpga at ...402... (jpga) Date: Wed, 12 May 2010 21:33:50 +0200 Subject: [Gambas-user] Fonction Val ne fonctionne pas ? Message-ID: <1273692830.4875.3.camel@...1008...> Bonjour, Je cherche ? d?velopper une suite de logiciels pour l'?ducation nationale ... Pouvez-vous me dire pourquoi la fonction Val ne fonctionne pas sous gambas 20.2: Val($Resultat3!NOTE) Je cherche ? convertir la variable $Resultat3!NOTE de type string en variable de type integer afin de faire des comparaisons de chiffres. Merci pour votre aide. JPGA. From gambas at ...1... Wed May 12 21:36:17 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 12 May 2010 21:36:17 +0200 Subject: [Gambas-user] Fonction Val ne fonctionne pas ? In-Reply-To: <1273692830.4875.3.camel@...1008...> References: <1273692830.4875.3.camel@...1008...> Message-ID: <201005122136.18027.gambas@...1...> > Bonjour, > > Je cherche ? d?velopper une suite de logiciels pour l'?ducation > nationale ... > > Pouvez-vous me dire pourquoi la fonction Val ne fonctionne pas sous > gambas 20.2: > > Val($Resultat3!NOTE) > > Je cherche ? convertir la variable $Resultat3!NOTE de type string en > variable de type integer afin de faire des comparaisons de chiffres. > > Merci pour votre aide. > > JPGA. > Et c'est quoi qui ne fonctionne pas donc ? -- Beno?t Minisini From prog at ...2177... Wed May 12 22:13:14 2010 From: prog at ...2177... (craf) Date: Wed, 12 May 2010 16:13:14 -0400 Subject: [Gambas-user] Several lines from a string in the code Message-ID: <1273695194.1959.2.camel@...2406...> Hi. There is a way to display a string in the code by several lines?, ex textarea1.text ="bla,bla, bla, bla, bla, bla bla,bla,bla,bla,bla,bla,bla, blab,bla" Regards From ea7dfh at ...2382... Wed May 12 23:05:25 2010 From: ea7dfh at ...2382... (EA7DFH) Date: Wed, 12 May 2010 23:05:25 +0200 Subject: [Gambas-user] Several lines from a string in the code In-Reply-To: <1273695194.1959.2.camel@...2406...> References: <1273695194.1959.2.camel@...2406...> Message-ID: <4BEB1815.60902@...2382...> Try this: textarea1.text ="bla,bla, bla, bla, bla, bla" & "bla,bla,bla,bla,bla,bla,bla" & "blab,bla" Regards Jesus El 12/05/10 22:13, craf escribi?: > Hi. > > There is a way to display a string in the code by several lines?, ex > > textarea1.text ="bla,bla, bla, bla, bla, bla > bla,bla,bla,bla,bla,bla,bla, > blab,bla" > > Regards > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas at ...1... Wed May 12 23:11:58 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 12 May 2010 23:11:58 +0200 Subject: [Gambas-user] Several lines from a string in the code In-Reply-To: <4BEB1815.60902@...2382...> References: <1273695194.1959.2.camel@...2406...> <4BEB1815.60902@...2382...> Message-ID: <201005122311.58253.gambas@...1...> > Try this: > > textarea1.text ="bla,bla, bla, bla, bla, bla" & > "bla,bla,bla,bla,bla,bla,bla" & > "blab,bla" > > > Regards > > Jesus > Or, better: textarea1.text ="bla,bla, bla, bla, bla, bla" "bla,bla,bla,bla,bla,bla,bla" "blab,bla" -- Beno?t Minisini From prog at ...2177... Wed May 12 23:12:23 2010 From: prog at ...2177... (craf) Date: Wed, 12 May 2010 17:12:23 -0400 Subject: [Gambas-user] Several lines from a string in the code In-Reply-To: <4BEB1815.60902@...2382...> References: <1273695194.1959.2.camel@...2406...> <4BEB1815.60902@...2382...> Message-ID: <1273698743.1959.5.camel@...2406...> ?Hi Jes?s! What happens is that I need to ident the strings within the code so I would not write them out so long and off the screen. Regards. >Try this: >textarea1.text ="bla,bla, bla, bla, bla, bla" & "bla,bla,bla,bla,bla,bla,bla" & "blab,bla" >Regards >Jesus El 12/05/10 22:13, craf escribi?: > Hi. > > There is a way to display a string in the code by several lines?, ex > > textarea1.text ="bla,bla, bla, bla, bla, bla > bla,bla,bla,bla,bla,bla,bla, > blab,bla" > > Regards > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > ------------------------------------------------------------------------------ _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From prog at ...2177... Wed May 12 23:19:27 2010 From: prog at ...2177... (craf) Date: Wed, 12 May 2010 17:19:27 -0400 Subject: [Gambas-user] Several lines from a string in the code In-Reply-To: <201005122311.58253.gambas@...1...> References: <1273695194.1959.2.camel@...2406...> <4BEB1815.60902@...2382...> <201005122311.58253.gambas@...1...> Message-ID: <1273699167.1959.6.camel@...2406...> -----Mensaje original----- De: Beno?t Minisini Reply-to: mailing list for gambas users Para: mailing list for gambas users Asunto: Re: [Gambas-user] Several lines from a string in the code Fecha: Wed, 12 May 2010 23:11:58 +0200 > Try this: > > textarea1.text ="bla,bla, bla, bla, bla, bla" & > "bla,bla,bla,bla,bla,bla,bla" & > "blab,bla" > > > Regards > > Jesus > >Or, better: >textarea1.text ="bla,bla, bla, bla, bla, bla" > "bla,bla,bla,bla,bla,bla,bla" > "blab,bla" Thanks Benoit! It was what I needed. regards. From prog at ...2177... Wed May 12 23:45:51 2010 From: prog at ...2177... (craf) Date: Wed, 12 May 2010 17:45:51 -0400 Subject: [Gambas-user] Call control from one module Message-ID: <1273700751.1959.10.camel@...2406...> Hi. I need to call a control that is located on the main form from a module, for this I have dealt with the following code: 'in module public sub proc_add() Fmain.control.text= "Hello" end sub But this form of call control does not work. Regards From jussi.lahtinen at ...626... Thu May 13 00:08:12 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Thu, 13 May 2010 01:08:12 +0300 Subject: [Gambas-user] Call control from one module In-Reply-To: <1273700751.1959.10.camel@...2406...> References: <1273700751.1959.10.camel@...2406...> Message-ID: Project properties --> Check: Form controls are public. Jussi On Thu, May 13, 2010 at 00:45, craf wrote: > Hi. > > I need to call a control that is located on the main form from a module, > for this I have dealt with the following code: > > 'in module > > public sub proc_add() > > Fmain.control.text= "Hello" > > end sub > > But this form of call control does not work. > > Regards > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From prog at ...2177... Thu May 13 00:15:26 2010 From: prog at ...2177... (craf) Date: Wed, 12 May 2010 18:15:26 -0400 Subject: [Gambas-user] Call control from one module In-Reply-To: References: <1273700751.1959.10.camel@...2406...> Message-ID: <1273702526.1959.13.camel@...2406...> Thanks ! My fault. By spending some time with Python, and I forget everything. Regards >Project properties --> Check: Form controls are public. >Jussi On Thu, May 13, 2010 at 00:45, craf wrote: > Hi. > > I need to call a control that is located on the main form from a module, > for this I have dealt with the following code: > > 'in module > > public sub proc_add() > > Fmain.control.text= "Hello" > > end sub > > But this form of call control does not work. > > Regards > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > ------------------------------------------------------------------------------ _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From ea7dfh at ...2382... Thu May 13 00:29:20 2010 From: ea7dfh at ...2382... (EA7DFH) Date: Thu, 13 May 2010 00:29:20 +0200 Subject: [Gambas-user] Call control from one module In-Reply-To: References: <1273700751.1959.10.camel@...2406...> Message-ID: <4BEB2BC0.4030903@...2382...> El 13/05/10 00:08, Jussi Lahtinen escribi?: > Project properties --> Check: Form controls are public. > > Jussi > > > On Thu, May 13, 2010 at 00:45, craf wrote: >> Hi. >> >> I need to call a control that is located on the main form from a module, >> for this I have dealt with the following code: >> >> 'in module >> >> public sub proc_add() >> >> Fmain.control.text= "Hello" >> >> end sub >> >> But this form of call control does not work. >> >> Regards >> If you wont your controls to be public, use Properties instead. (I think it is not a good idea to make public controls) In your form: PROPERTY myText as String ' then two functions will be created automagically: PRIVATE SUB myText_Write(value as String) textarea.Text = value END PRIVATE FUNCTION myText_Read() as String RETURN textArea.Text END Then you could call your property from within a module or another class MyForm.myText = whatevertext 'or whatsmytext = MyForm.myText Hope this helps Jesus From prog at ...2177... Thu May 13 00:45:00 2010 From: prog at ...2177... (craf) Date: Wed, 12 May 2010 18:45:00 -0400 Subject: [Gambas-user] Call control from one module In-Reply-To: <4BEB2BC0.4030903@...2382...> References: <1273700751.1959.10.camel@...2406...> <4BEB2BC0.4030903@...2382...> Message-ID: <1273704300.1959.15.camel@...2406...> -----Mensaje original----- De: EA7DFH Reply-to: mailing list for gambas users Para: mailing list for gambas users Asunto: Re: [Gambas-user] Call control from one module Fecha: Thu, 13 May 2010 00:29:20 +0200 El 13/05/10 00:08, Jussi Lahtinen escribi?: > Project properties --> Check: Form controls are public. > > Jussi > > > On Thu, May 13, 2010 at 00:45, craf wrote: >> Hi. >> >> I need to call a control that is located on the main form from a module, >> for this I have dealt with the following code: >> >> 'in module >> >> public sub proc_add() >> >> Fmain.control.text= "Hello" >> >> end sub >> >> But this form of call control does not work. >> >> Regards >> >If you wont your controls to be public, use Properties instead. >(I think it is not a good idea to make public controls) >In your form: >PROPERTY myText as String >' then two functions will be created automagically: >PRIVATE SUB myText_Write(value as String) textarea.Text = value >END >PRIVATE FUNCTION myText_Read() as String > RETURN textArea.Text >END >Then you could call your property from within a module or another class >MyForm.myText = whatevertext >'or >whatsmytext = MyForm.myText >Hope this helps >Jesus Thanks Jesus!. I had no idea of this utility, would comment on the forum. Regards ------------------------------------------------------------------------------ _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From prog at ...2177... Thu May 13 01:44:50 2010 From: prog at ...2177... (craf) Date: Wed, 12 May 2010 19:44:50 -0400 Subject: [Gambas-user] Several lines from a string in the code In-Reply-To: <201005122311.58253.gambas@...1...> References: <1273695194.1959.2.camel@...2406...> <4BEB1815.60902@...2382...> <201005122311.58253.gambas@...1...> Message-ID: <1273707890.1959.22.camel@...2406...> -----Mensaje original----- De: Beno?t Minisini Reply-to: mailing list for gambas users Para: mailing list for gambas users Asunto: Re: [Gambas-user] Several lines from a string in the code Fecha: Wed, 12 May 2010 23:11:58 +0200 > Try this: > > textarea1.text ="bla,bla, bla, bla, bla, bla" & > "bla,bla,bla,bla,bla,bla,bla" & > "blab,bla" > > > Regards > > Jesus > >Or, better: >textarea1.text ="bla,bla, bla, bla, bla, bla" > "bla,bla,bla,bla,bla,bla,bla" > "blab,bla" Hi. I have a textarea control with the following text: textarea1.text = "Moon\n" "The Moon is the only natural satellite of Earth.\n" "It is the nearest body and the best known." Now, let me point out that the strings are translated, but none of the two methods work for me: Method 1: textarea1.text = ("Moon\n") ("The Moon is the only natural satellite of Earth.\n") ("It is the nearest body and the best known.") error: This expresion cannot be a statement in line ... Method 2: textarea1.text = ("Moon\n" "The Moon is the only natural satellite of Earth.\n" "It is the nearest body and the best known.") error: Missing ')' in line .... Regards From prog at ...2177... Thu May 13 02:36:47 2010 From: prog at ...2177... (craf) Date: Wed, 12 May 2010 20:36:47 -0400 Subject: [Gambas-user] Translate text from a textarea control Message-ID: <1273711007.1959.31.camel@...2406...> Hi. I have the following strings of text within a textarea control and would like to translate. As stated in the Gambas wiki, if you translate strings concatenated to use SUBST. 'code textarea1.text = subst("Moon\n &1 &2","The Moon is the only natural satellite of Earth.\n","is the nearest body and the best known.") This code does not fail, but not shown in the translator, to be translated. Regards. -- Cristian Abarz?a From gambas.fr at ...626... Thu May 13 11:41:15 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Thu, 13 May 2010 11:41:15 +0200 Subject: [Gambas-user] Several lines from a string in the code In-Reply-To: <1273707890.1959.22.camel@...2406...> References: <1273695194.1959.2.camel@...2406...> <4BEB1815.60902@...2382...> <201005122311.58253.gambas@...1...> <1273707890.1959.22.camel@...2406...> Message-ID: textarea1.text = ("Moon\n") & ("The Moon is the only natural satellite of Earth.\n") & ("It is the nearest body and the best known.") 2010/5/13 craf : > -----Mensaje original----- > De: Beno?t Minisini > Reply-to: mailing list for gambas users > > Para: mailing list for gambas users > Asunto: Re: [Gambas-user] Several lines from a string in the code > Fecha: Wed, 12 May 2010 23:11:58 +0200 > >> Try this: >> >> textarea1.text ="bla,bla, bla, bla, bla, bla" & >> ? ? ? ? ? ? ? ? "bla,bla,bla,bla,bla,bla,bla" & >> ? ? ? ? ? ? ? ? "blab,bla" >> >> >> Regards >> >> Jesus >> > >>Or, better: > >>textarea1.text ="bla,bla, bla, bla, bla, bla" > ?> ? ? ? ? ? ? ? "bla,bla,bla,bla,bla,bla,bla" > ?> ? ? ? ? ? ? ? "blab,bla" > > Hi. > > I have a textarea control with the following text: > > textarea1.text = "Moon\n" > ? ? ? ? ? ? ? ? "The Moon is the only natural satellite of Earth.\n" > ? ? ? ? ? ? ? ? "It is the nearest body and the best known." > > Now, let me point out that the strings are translated, but none of the > two methods work for me: > > Method 1: > ? ? ? ? textarea1.text = ("Moon\n") > ? ? ? ? ? ? ? ? ? ? ? ? ?("The Moon is the only natural satellite of Earth.\n") > ? ? ? ? ? ? ? ? ? ? ? ? ("It is the nearest body and the best known.") > > error: This expresion cannot be a statement in line ... > > Method 2: > ? ? ? ?textarea1.text = ("Moon\n" > ? ? ? ? ? ? ? ? ? ? ? ? ?"The Moon is the only natural satellite of Earth.\n" > ? ? ? ? ? ? ? ? ? ? ? ? "It is the nearest body and the best known.") > > error: Missing ')' in line .... > > Regards > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas.fr at ...626... Thu May 13 11:42:55 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Thu, 13 May 2010 11:42:55 +0200 Subject: [Gambas-user] Translate text from a textarea control In-Reply-To: <1273711007.1959.31.camel@...2406...> References: <1273711007.1959.31.camel@...2406...> Message-ID: textarea1.text = subst("Moon\n &1 &2","The Moon is the only natural satellite of Earth.\n","is the nearest body and the best known.") you need to add comma each side of the text textarea1.text = subst(("Moon\n &1 &2"),("The Moon is the only natural satellite of Earth.\n"),("is the nearest body and the best known.")) Fabien 2010/5/13 craf : > Hi. > > I have the following strings of text within a textarea control and would > like to translate. > As stated in the Gambas wiki, if you translate strings concatenated to > use SUBST. > > 'code > > textarea1.text = subst("Moon\n &1 &2","The Moon is the only natural > satellite of Earth.\n","is the nearest body and the best known.") > > This code does not fail, but not shown in the translator, to be > translated. > > Regards. > > -- > Cristian Abarz?a > > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From camaro.c96 at ...626... Thu May 13 12:58:01 2010 From: camaro.c96 at ...626... (C. Amaro) Date: Thu, 13 May 2010 12:58:01 +0200 Subject: [Gambas-user] Disable option Message-ID: Hello, I am trying to disable options (gambas2-2.20.2): ./configure --disable-odbc --disable-kde --host=mipsel-linux --build=mipsel-linux .. THESE COMPONENTS ARE DISABLED: - gb.corba - gb.db.firebird - gb.desktop - gb.opengl - gb.qt.kde - gb.qte - gb.sdl In config.log I can see configure:1995: WARNING: odbc component is disabled configure:2331: WARNING: kde component is disabled What does this mean? Are this options disabled or not? Thank you for helping me out with this.. C.A. From jussi.lahtinen at ...626... Thu May 13 14:24:55 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Thu, 13 May 2010 15:24:55 +0300 Subject: [Gambas-user] Call control from one module In-Reply-To: <4BEB2BC0.4030903@...2382...> References: <1273700751.1959.10.camel@...2406...> <4BEB2BC0.4030903@...2382...> Message-ID: > (I think it is not a good idea to make public controls) Just for interest, why? What is the downside? Maybe it is easier to write not so nicely structured code with public controls, but in this case I may prefer way that creates less code. I think they are both fine... Jussi From Karl.Reinl at ...2345... Thu May 13 14:42:30 2010 From: Karl.Reinl at ...2345... (Charlie Reinl) Date: Thu, 13 May 2010 14:42:30 +0200 Subject: [Gambas-user] Disable option In-Reply-To: References: Message-ID: <1273754550.6554.9.camel@...40...> Am Donnerstag, den 13.05.2010, 12:58 +0200 schrieb C. Amaro: > Hello, > > I am trying to disable options (gambas2-2.20.2): > > ./configure --disable-odbc --disable-kde --host=mipsel-linux > --build=mipsel-linux > .. > THESE COMPONENTS ARE DISABLED: > > - gb.corba > - gb.db.firebird > - gb.desktop > - gb.opengl > - gb.qt.kde > - gb.qte > - gb.sdl > > In config.log I can see > configure:1995: WARNING: odbc component is disabled > configure:2331: WARNING: kde component is disabled > > What does this mean? Are this options disabled or not? > > Thank you for helping me out with this.. > > C.A. > ------------------------------------------------------------------------------ Salut, to install gambas, you need the libraries from the included components. At least the devel part from the library. If gambas don't find one of the libraries during config, the component which belongs to, will be disabled. The disable options is for the case, that a library is installed but you don't want to use it, or you (library) version makes troubles while compiling gambas. -- Amicalement Charlie From admhardsoft at ...253... Thu May 13 14:46:05 2010 From: admhardsoft at ...253... (admhardsoft at ...253...) Date: Thu, 13 May 2010 12:46:05 +0000 Subject: [Gambas-user] Gambas for windows, how? In-Reply-To: <1273754550.6554.9.camel@...40...> References: <1273754550.6554.9.camel@...40...> Message-ID: <325768041-1273754767-cardhu_decombobulator_blackberry.rim.net-1883005232-@...2405...> Hi I was wondering if I could find a gambas for windows. Somebody know something about gambas for windows. Thanks Tomas orta Sent on the TELUS Mobility network with BlackBerry -----Original Message----- From: Charlie Reinl Date: Thu, 13 May 2010 14:42:30 To: mailing list for gambas users Subject: Re: [Gambas-user] Disable option Am Donnerstag, den 13.05.2010, 12:58 +0200 schrieb C. Amaro: > Hello, > > I am trying to disable options (gambas2-2.20.2): > > ./configure --disable-odbc --disable-kde --host=mipsel-linux > --build=mipsel-linux > .. > THESE COMPONENTS ARE DISABLED: > > - gb.corba > - gb.db.firebird > - gb.desktop > - gb.opengl > - gb.qt.kde > - gb.qte > - gb.sdl > > In config.log I can see > configure:1995: WARNING: odbc component is disabled > configure:2331: WARNING: kde component is disabled > > What does this mean? Are this options disabled or not? > > Thank you for helping me out with this.. > > C.A. > ------------------------------------------------------------------------------ Salut, to install gambas, you need the libraries from the included components. At least the devel part from the library. If gambas don't find one of the libraries during config, the component which belongs to, will be disabled. The disable options is for the case, that a library is installed but you don't want to use it, or you (library) version makes troubles while compiling gambas. -- Amicalement Charlie ------------------------------------------------------------------------------ _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From ea7dfh at ...2382... Thu May 13 14:59:23 2010 From: ea7dfh at ...2382... (EA7DFH) Date: Thu, 13 May 2010 14:59:23 +0200 Subject: [Gambas-user] Call control from one module In-Reply-To: References: <1273700751.1959.10.camel@...2406...> <4BEB2BC0.4030903@...2382...> Message-ID: <4BEBF7AB.9030703@...2382...> I may be wrong, but generally it is considered a bad practice mixing GUI code with "service" code. It is a matter of encapsulation, and in OOP it is one of the most important feature. Yes, less code not always means easy code..., it's just my opinion and I'm not criticizing. Regards, Jesus l 13/05/10 14:24, Jussi Lahtinen escribi?: >> (I think it is not a good idea to make public controls) > > Just for interest, why? What is the downside? > Maybe it is easier to write not so nicely structured code with public controls, > but in this case I may prefer way that creates less code. > I think they are both fine... > > Jussi > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From wdahn at ...1000... Thu May 13 15:46:46 2010 From: wdahn at ...1000... (Werner) Date: Thu, 13 May 2010 21:46:46 +0800 Subject: [Gambas-user] Gambas for windows, how? In-Reply-To: <325768041-1273754767-cardhu_decombobulator_blackberry.rim.net-1883005232-@...2405...> References: <1273754550.6554.9.camel@...40...> <325768041-1273754767-cardhu_decombobulator_blackberry.rim.net-1883005232-@...2405...> Message-ID: <4BEC02C6.7000304@...1000...> On 13/05/10 20:46, admhardsoft at ...253... wrote: > Hi > I was wondering if I could find a gambas for windows. Somebody know something about gambas for windows. > Thanks > Tomas orta > Sent on the TELUS Mobility network with BlackBerry > There is no such thing. Gambas is meant to facilitate porting VB applications from Windows to Linux. Best Regards Werner From admhardsoft at ...253... Thu May 13 15:59:27 2010 From: admhardsoft at ...253... (admhardsoft at ...253...) Date: Thu, 13 May 2010 13:59:27 +0000 Subject: [Gambas-user] Gambas for windows, how? In-Reply-To: <4BEC02C6.7000304@...1000...> References: <1273754550.6554.9.camel@...40...><325768041-1273754767-cardhu_decombobulator_blackberry.rim.net-1883005232-@...2405...><4BEC02C6.7000304@...1000...> Message-ID: <2009826709-1273759169-cardhu_decombobulator_blackberry.rim.net-1272103203-@...2405...> Ok but, how can I install gambaas for windows , what should I do? Thanks Tomas Sent on the TELUS Mobility network with BlackBerry -----Original Message----- From: Werner Date: Thu, 13 May 2010 21:46:46 To: Subject: Re: [Gambas-user] Gambas for windows, how? On 13/05/10 20:46, admhardsoft at ...253... wrote: > Hi > I was wondering if I could find a gambas for windows. Somebody know something about gambas for windows. > Thanks > Tomas orta > Sent on the TELUS Mobility network with BlackBerry > There is no such thing. Gambas is meant to facilitate porting VB applications from Windows to Linux. Best Regards Werner ------------------------------------------------------------------------------ _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From wdahn at ...1000... Thu May 13 16:45:30 2010 From: wdahn at ...1000... (Werner) Date: Thu, 13 May 2010 22:45:30 +0800 Subject: [Gambas-user] Gambas for windows, how? In-Reply-To: <2009826709-1273759169-cardhu_decombobulator_blackberry.rim.net-1272103203-@...2405...> References: <1273754550.6554.9.camel@...40...><325768041-1273754767-cardhu_decombobulator_blackberry.rim.net-1883005232-@...2405...><4BEC02C6.7000304@...1000...> <2009826709-1273759169-cardhu_decombobulator_blackberry.rim.net-1272103203-@...2405...> Message-ID: <4BEC108A.6080406@...1000...> On 13/05/10 21:59, admhardsoft at ...253... wrote: > Ok but, how can I install gambaas for windows , what should I do? > > Thanks > Tomas > Sent on the TELUS Mobility network with BlackBerry > > -----Original Message----- > From: Werner > Date: Thu, 13 May 2010 21:46:46 > To: > Subject: Re: [Gambas-user] Gambas for windows, how? > > On 13/05/10 20:46, admhardsoft at ...253... wrote: > >> Hi >> I was wondering if I could find a gambas for windows. Somebody know something about gambas for windows. >> Thanks >> Tomas orta >> Sent on the TELUS Mobility network with BlackBerry >> >> > There is no such thing. Gambas is meant to facilitate porting VB > applications from Windows to Linux. > > Best Regards > Werner > > I was trying to explain that there is no Gambas for Windows. It only runs on the Linux operating system. BTW, Gambas is very nice! Best Regards Werner From arosa at ...2015... Thu May 13 16:54:15 2010 From: arosa at ...2015... (Toni Rosa) Date: Thu, 13 May 2010 16:54:15 +0200 Subject: [Gambas-user] Gambas for windows, how? In-Reply-To: <4BEC108A.6080406@...1000...> References: <1273754550.6554.9.camel@...40...><325768041-1273754767-cardhu_decombobulator_blackberry.rim.net-1883005232-@...2405...><4BEC02C6.7000304@...1000...> <2009826709-1273759169-cardhu_decombobulator_blackberry.rim.net-1272103203-@...2405...> <4BEC108A.6080406@...1000...> Message-ID: <4BEC1297.9080208@...2015...> I think that someone ported a version of Gambas to windows using "cygwin", but I have just performed a quick search on google and couldn't find anything else but references to that someone did it, not the real stuff. On 13/05/10 16:45, Werner wrote: > On 13/05/10 21:59, admhardsoft at ...253... wrote: > >> Ok but, how can I install gambaas for windows , what should I do? >> >> Thanks >> Tomas >> Sent on the TELUS Mobility network with BlackBerry >> >> -----Original Message----- >> From: Werner >> Date: Thu, 13 May 2010 21:46:46 >> To: >> Subject: Re: [Gambas-user] Gambas for windows, how? >> >> On 13/05/10 20:46, admhardsoft at ...253... wrote: >> >> >>> Hi >>> I was wondering if I could find a gambas for windows. Somebody know something about gambas for windows. >>> Thanks >>> Tomas orta >>> Sent on the TELUS Mobility network with BlackBerry >>> >>> >>> >> There is no such thing. Gambas is meant to facilitate porting VB >> applications from Windows to Linux. >> >> Best Regards >> Werner >> >> >> > I was trying to explain that there is no Gambas for Windows. It only > runs on the Linux operating system. > BTW, Gambas is very nice! > > Best Regards > Werner > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From prog at ...2177... Thu May 13 17:11:17 2010 From: prog at ...2177... (craf) Date: Thu, 13 May 2010 11:11:17 -0400 Subject: [Gambas-user] Translate text from a textarea control In-Reply-To: References: <1273711007.1959.31.camel@...2406...> Message-ID: <1273763477.2021.1.camel@...2406...> Thank you Fabian. it worked perfect! Regards. -- Cristian Abarz?a >textarea1.text = subst("Moon\n &1 &2","The Moon is the only natural >satellite of Earth.\n","is the nearest body and the best known.") >you need to add comma each side of the text >textarea1.text = subst(("Moon\n &1 &2"),("The Moon is the only natural >satellite of Earth.\n"),("is the nearest body and the best known.")) >Fabien 2010/5/13 craf : > Hi. > > I have the following strings of text within a textarea control and would > like to translate. > As stated in the Gambas wiki, if you translate strings concatenated to > use SUBST. > > 'code > > textarea1.text = subst("Moon\n &1 &2","The Moon is the only natural > satellite of Earth.\n","is the nearest body and the best known.") > > This code does not fail, but not shown in the translator, to be > translated. > > Regards. > > -- > Cristian Abarz?a > > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > ------------------------------------------------------------------------------ _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From fabianfloresvadell at ...626... Thu May 13 17:19:17 2010 From: fabianfloresvadell at ...626... (=?ISO-8859-1?Q?Fabi=E1n_Flores_Vadell?=) Date: Thu, 13 May 2010 12:19:17 -0300 Subject: [Gambas-user] Call control from one module In-Reply-To: <1273704300.1959.15.camel@...2406...> References: <1273700751.1959.10.camel@...2406...> <4BEB2BC0.4030903@...2382...> <1273704300.1959.15.camel@...2406...> Message-ID: > I had no idea of this utility, would comment on the forum. > > Regards > Hi Craf, note than "properties" is a OOP feature. So, if you write your programs according to OOP, that's ok (and I fully agree with the criteria of Jes?s), but if you write your programs according to the paradigm modular/structured, the technique that you should use is different: you should use a parameter in your routine. ' In the FMain PUBLIC SUB proc_add(pString AS String) control.text= pString END 'In the Module proc_add("Hola") How you can see, in this case, that's almost the same than using a property. In fact, if you use this routine instead a property, is perfectly valid not only to the paradigm modular/structured, but to OOP paradigm too: I mean, in OOP you can use procedures or functions instead properties (but not allways) to set data members of a class. This seems just a theorical disquisition, but the message is than is better working with one paradigm, unless you have enough knowledge about the paradigms that you merge. Regards. -- Fabi?n Flores Vadell www.speedbooksargentina.blogspot.com From gambas.fr at ...626... Thu May 13 17:33:32 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Thu, 13 May 2010 17:33:32 +0200 Subject: [Gambas-user] Call control from one module In-Reply-To: References: <1273700751.1959.10.camel@...2406...> <4BEB2BC0.4030903@...2382...> <1273704300.1959.15.camel@...2406...> Message-ID: And in gambas, please don't use too often underScore to name the procedure??? they are reserved for two things : MyObject_EventHandler() and _HiddenProperty or _HiddenVariable At the place you can use UpperCase : Public Sub ProcAdd () Dim sText As String sText = MMain.GetText() Endif 'in MMain Public Function GetText() As String Return TextArea1.Text End Fabien 2010/5/13 Fabi?n Flores Vadell : >> I had no idea of this utility, would comment on the forum. >> >> Regards >> > > Hi Craf, note than "properties" is a OOP feature. So, if you write > your programs according to OOP, that's ok (and I fully agree with the > criteria of Jes?s), but if you write your programs according to the > paradigm modular/structured, the technique that you should use is > different: you should use a parameter in your routine. > > ' In the FMain > > PUBLIC SUB proc_add(pString AS String) > > ?control.text= pString > > END > > 'In the Module > > proc_add("Hola") > > How you can see, in this case, that's almost the same than using a > property. In fact, if you use this routine instead a property, is > perfectly valid not only to the paradigm modular/structured, but to > OOP paradigm too: I mean, in OOP you can use procedures or functions > instead properties (but not allways) to set data members of a class. > > This seems just a theorical disquisition, but the message is than is > better working with one paradigm, unless you have enough knowledge > about the paradigms that you merge. > > Regards. > > -- > Fabi?n Flores Vadell > www.speedbooksargentina.blogspot.com > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas.fr at ...626... Thu May 13 17:37:03 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Thu, 13 May 2010 17:37:03 +0200 Subject: [Gambas-user] Disable option In-Reply-To: <1273754550.6554.9.camel@...40...> References: <1273754550.6554.9.camel@...40...> Message-ID: > configure:1995: WARNING: odbc component is disabled > configure:2331: WARNING: kde component is disabled for the lib you have desabled yourself >> THESE COMPONENTS ARE DISABLED: >> >> - gb.corba >> - gb.db.firebird >> - gb.desktop >> - gb.opengl >> - gb.qt.kde >> - gb.qte >> - gb.sdl for theses libs some system libraries are missing so they are deasabled too... Here the libs needed to activate them : http://gambasdoc.org/help/install Fabien 2010/5/13 Charlie Reinl : > Am Donnerstag, den 13.05.2010, 12:58 +0200 schrieb C. Amaro: >> Hello, >> >> I am trying to disable options (gambas2-2.20.2): >> >> ./configure --disable-odbc --disable-kde --host=mipsel-linux >> --build=mipsel-linux >> .. >> THESE COMPONENTS ARE DISABLED: >> >> - gb.corba >> - gb.db.firebird >> - gb.desktop >> - gb.opengl >> - gb.qt.kde >> - gb.qte >> - gb.sdl >> >> In config.log I can see >> configure:1995: WARNING: odbc component is disabled >> configure:2331: WARNING: kde component is disabled >> >> What does this mean? Are this options disabled or not? >> >> Thank you for helping me out with this.. >> >> C.A. >> ------------------------------------------------------------------------------ > > Salut, > > to install gambas, you need the libraries from the included components. > At least the devel part from the library. > If gambas don't find one of the libraries during config, the component > which belongs to, will be disabled. > > The disable options is for the case, that a library is installed but you > don't want to use it, or you (library) version makes troubles while > compiling gambas. > > > -- > Amicalement > Charlie > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From prog at ...2177... Thu May 13 17:36:57 2010 From: prog at ...2177... (craf) Date: Thu, 13 May 2010 11:36:57 -0400 Subject: [Gambas-user] Call control from one module In-Reply-To: References: <1273700751.1959.10.camel@...2406...> <4BEB2BC0.4030903@...2382...> <1273704300.1959.15.camel@...2406...> Message-ID: <1273765017.2021.4.camel@...2406...> -----Mensaje original----- De: Fabi?n Flores Vadell Reply-to: mailing list for gambas users Para: mailing list for gambas users Asunto: Re: [Gambas-user] Call control from one module Fecha: Thu, 13 May 2010 12:19:17 -0300 > I had no idea of this utility, would comment on the forum. > > Regards > >Hi Craf, note than "properties" is a OOP feature. So, if you write >your programs according to OOP, that's ok (and I fully agree with the >criteria of Jes?s), but if you write your programs according to the >paradigm modular/structured, the technique that you should use is >different: you should use a parameter in your routine. >' In the FMain >PUBLIC SUB proc_add(pString AS String) > control.text= pString >END >'In the Module >proc_add("Hola") >How you can see, in this case, that's almost the same than using a >property. In fact, if you use this routine instead a property, is >perfectly valid not only to the paradigm modular/structured, but to >OOP paradigm too: I mean, in OOP you can use procedures or functions >instead properties (but not allways) to set data members of a class. >This seems just a theorical disquisition, but the message is than is >better working with one paradigm, unless you have enough knowledge >about the paradigms that you merge. >Regards. Thanks for the clarification, is something that did not take into account. Regards. -- Cristian Abarz?a From prog at ...2177... Thu May 13 17:43:59 2010 From: prog at ...2177... (craf) Date: Thu, 13 May 2010 11:43:59 -0400 Subject: [Gambas-user] Call control from one module In-Reply-To: References: <1273700751.1959.10.camel@...2406...> <4BEB2BC0.4030903@...2382...> <1273704300.1959.15.camel@...2406...> Message-ID: <1273765439.2021.6.camel@...2406...> Ok, Registration ;=) Regards. -- Cristian Abarz?a >And in gambas, please don't use too often underScore to name the >procedure??? they are reserved for two things : >MyObject_EventHandler() >and >_HiddenProperty or _HiddenVariable >At the place you can use UpperCase : >Public Sub ProcAdd () > Dim sText As String > sText = MMain.GetText() >Endif >'in MMain >Public Function GetText() As String > Return TextArea1.Text >End >Fabien 2010/5/13 Fabi?n Flores Vadell : >> I had no idea of this utility, would comment on the forum. >> >> Regards >> > > Hi Craf, note than "properties" is a OOP feature. So, if you write > your programs according to OOP, that's ok (and I fully agree with the > criteria of Jes?s), but if you write your programs according to the > paradigm modular/structured, the technique that you should use is > different: you should use a parameter in your routine. > > ' In the FMain > > PUBLIC SUB proc_add(pString AS String) > > control.text= pString > > END > > 'In the Module > > proc_add("Hola") > > How you can see, in this case, that's almost the same than using a > property. In fact, if you use this routine instead a property, is > perfectly valid not only to the paradigm modular/structured, but to > OOP paradigm too: I mean, in OOP you can use procedures or functions > instead properties (but not allways) to set data members of a class. > > This seems just a theorical disquisition, but the message is than is > better working with one paradigm, unless you have enough knowledge > about the paradigms that you merge. > > Regards. > > -- > Fabi?n Flores Vadell > www.speedbooksargentina.blogspot.com > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > ------------------------------------------------------------------------------ _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From alerinaldi at ...2334... Thu May 13 18:06:27 2010 From: alerinaldi at ...2334... (Alessandro Rinaldi) Date: Thu, 13 May 2010 18:06:27 +0200 Subject: [Gambas-user] Gambas for windows, how? In-Reply-To: <4BEC1297.9080208@...2015...> References: <1273754550.6554.9.camel@...40...> <325768041-1273754767-cardhu_decombobulator_blackberry.rim.net-1883005232-@...2405...> <4BEC02C6.7000304@...1000...> <2009826709-1273759169-cardhu_decombobulator_blackberry.rim.net-1272103203-@...2405...> <4BEC108A.6080406@...1000...> <4BEC1297.9080208@...2015...> Message-ID: I can't understand why you want to use a so good software on a so ugly OS ;) From prog at ...2177... Thu May 13 18:43:53 2010 From: prog at ...2177... (craf) Date: Thu, 13 May 2010 12:43:53 -0400 Subject: [Gambas-user] Program version numbers Message-ID: <1273769033.2021.10.camel@...2406...> Hi. I'm trying to make my first program Gambas and let me know as I have to number the release version, 0.0.1 had thought. Version more = 0 Minor version = 0 Bugs = 1 Is it a good idea?, or take other number is greater? I appreciate any suggestions. Regards -- Cristian Abarz?a From linuxos at ...1896... Thu May 13 18:52:05 2010 From: linuxos at ...1896... (Olivier Cruilles) Date: Thu, 13 May 2010 18:52:05 +0200 Subject: [Gambas-user] Gambas for windows, how? In-Reply-To: References: <1273754550.6554.9.camel@...40...> <325768041-1273754767-cardhu_decombobulator_blackberry.rim.net-1883005232-@...2405...> <4BEC02C6.7000304@...1000...> <2009826709-1273759169-cardhu_decombobulator_blackberry.rim.net-1272103203-@...2405...> <4BEC108A.6080406@...1000...> <4BEC1297.9080208@...2015...> Message-ID: <9122BB16-DC70-4CF5-9664-ED2ECFB90D0F@...1896...> I agree with this answer ... there is a very good software on windows to develop in basic: Micro$oft Visual Basic... Good luck... Le 13 mai 2010 ? 18:06, Alessandro Rinaldi a ?crit : > > I can't understand why you want to use a so good software on a so ugly OS ;) > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > Olivier Cruilles Mail: linuxos at ...1896... From admhardsoft at ...253... Thu May 13 18:41:50 2010 From: admhardsoft at ...253... (admhardsoft at ...253...) Date: Thu, 13 May 2010 16:41:50 +0000 Subject: [Gambas-user] Gambas for windows, how? In-Reply-To: References: <1273754550.6554.9.camel@...40...><325768041-1273754767-cardhu_decombobulator_blackberry.rim.net-1883005232-@...2405...><4BEC02C6.7000304@...1000...><2009826709-1273759169-cardhu_decombobulator_blackberry.rim.net-1272103203-@...2405...><4BEC108A.6080406@...1000...> <4BEC1297.9080208@...2015...> Message-ID: <1588905289-1273768912-cardhu_decombobulator_blackberry.rim.net-234644523-@...2405...> Ok you are right but I wanna developer an app for a customer in windows, because he doesn't know any debian, ubuntu, just windows Do you undestood me? Tomas Sent on the TELUS Mobility network with BlackBerry -----Original Message----- From: Alessandro Rinaldi Date: Thu, 13 May 2010 18:06:27 To: mailing list for gambas users Subject: Re: [Gambas-user] Gambas for windows, how? I can't understand why you want to use a so good software on a so ugly OS ;) ------------------------------------------------------------------------------ _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From linuxos at ...1896... Thu May 13 19:17:18 2010 From: linuxos at ...1896... (Olivier Cruilles) Date: Thu, 13 May 2010 19:17:18 +0200 Subject: [Gambas-user] Gambas for windows, how? In-Reply-To: <1588905289-1273768912-cardhu_decombobulator_blackberry.rim.net-234644523-@...2405...> References: <1273754550.6554.9.camel@...40...><325768041-1273754767-cardhu_decombobulator_blackberry.rim.net-1883005232-@...2405...><4BEC02C6.7000304@...1000...><2009826709-1273759169-cardhu_decombobulator_blackberry.rim.net-1272103203-@...2405...><4BEC108A.6080406@...1000...> <4BEC1297.9080208@...2015...> <1588905289-1273768912-cardhu_decombobulator_blackberry.rim.net-234644523-@...2405...> Message-ID: Ok... but for the moment... no really portage of Gambas was made on windows and the only one way to execute it, is over cygwin ... and not all works as the IDE for example ... only console mode of Gambas. So, if you really want to use Gambas... you must use Linux too .... sorry.. Le 13 mai 2010 ? 18:41, admhardsoft at ...253... a ?crit : > > Ok you are right but I wanna developer an app for a customer in windows, because he doesn't know any debian, ubuntu, just windows > Do you undestood me? > Tomas > Sent on the TELUS Mobility network with BlackBerry > > -----Original Message----- > From: Alessandro Rinaldi > Date: Thu, 13 May 2010 18:06:27 > To: mailing list for gambas users > Subject: Re: [Gambas-user] Gambas for windows, how? > > I can't understand why you want to use a so good software on a so ugly OS ;) > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > Olivier Cruilles Mail: linuxos at ...1896... From camaro.c96 at ...626... Thu May 13 19:20:22 2010 From: camaro.c96 at ...626... (C. Amaro) Date: Thu, 13 May 2010 19:20:22 +0200 Subject: [Gambas-user] Disable option In-Reply-To: References: <1273754550.6554.9.camel@...40...> Message-ID: What I am asking is why does not "THESE COMPONENTS ARE DISABLED" show ODBC and KDE as disable components if I set --disable-odbc and --disable-kde as configure options. So are this two disabled and the "THESE COMPONENTS ARE DISABLED" lies or they are not disabled? Other disabled options are obvious, I do not have installed headers. Regards, Amaro On Thu, May 13, 2010 at 5:37 PM, Fabien Bodard wrote: > > configure:1995: WARNING: odbc component is disabled > > configure:2331: WARNING: kde component is disabled > > for the lib you have desabled yourself > > >> THESE COMPONENTS ARE DISABLED: > >> > >> - gb.corba > >> - gb.db.firebird > >> - gb.desktop > >> - gb.opengl > >> - gb.qt.kde > >> - gb.qte > >> - gb.sdl > > for theses libs some system libraries are missing so they are deasabled > too... > > Here the libs needed to activate them : > http://gambasdoc.org/help/install > > Fabien > > > 2010/5/13 Charlie Reinl : > > Am Donnerstag, den 13.05.2010, 12:58 +0200 schrieb C. Amaro: > >> Hello, > >> > >> I am trying to disable options (gambas2-2.20.2): > >> > >> ./configure --disable-odbc --disable-kde --host=mipsel-linux > >> --build=mipsel-linux > >> .. > >> THESE COMPONENTS ARE DISABLED: > >> > >> - gb.corba > >> - gb.db.firebird > >> - gb.desktop > >> - gb.opengl > >> - gb.qt.kde > >> - gb.qte > >> - gb.sdl > >> > >> In config.log I can see > >> configure:1995: WARNING: odbc component is disabled > >> configure:2331: WARNING: kde component is disabled > >> > >> What does this mean? Are this options disabled or not? > >> > >> Thank you for helping me out with this.. > >> > >> C.A. > >> > ------------------------------------------------------------------------------ > > > > Salut, > > > > to install gambas, you need the libraries from the included components. > > At least the devel part from the library. > > If gambas don't find one of the libraries during config, the component > > which belongs to, will be disabled. > > > > The disable options is for the case, that a library is installed but you > > don't want to use it, or you (library) version makes troubles while > > compiling gambas. > > > > > > -- > > Amicalement > > Charlie > > > > > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From ea7dfh at ...2382... Thu May 13 19:23:54 2010 From: ea7dfh at ...2382... (EA7DFH) Date: Thu, 13 May 2010 19:23:54 +0200 Subject: [Gambas-user] Gambas for windows, how? In-Reply-To: <1588905289-1273768912-cardhu_decombobulator_blackberry.rim.net-234644523-@...2405...> References: <1273754550.6554.9.camel@...40...><325768041-1273754767-cardhu_decombobulator_blackberry.rim.net-1883005232-@...2405...><4BEC02C6.7000304@...1000...><2009826709-1273759169-cardhu_decombobulator_blackberry.rim.net-1272103203-@...2405...><4BEC108A.6080406@...1000...> <4BEC1297.9080208@...2015...> <1588905289-1273768912-cardhu_decombobulator_blackberry.rim.net-234644523-@...2405...> Message-ID: <4BEC35AA.4000502@...2382...> El 13/05/10 18:41, admhardsoft at ...253... escribi?: > Ok you are right but I wanna developer an app for a customer in windows, because he doesn't know any debian, ubuntu, just windows > Do you undestood me? > Tomas > Sent on the TELUS Mobility network with BlackBerry > > -----Original Message----- > From: Alessandro Rinaldi > Date: Thu, 13 May 2010 18:06:27 > To: mailing list for gambas users > Subject: Re: [Gambas-user] Gambas for windows, how? > > I can't understand why you want to use a so good software on a so ugly OS ;) > It seems it is YOU who didn'n understand... If you want to develop for Windows, you MUST search other programming language, other than Gambas. Try Python, Haskell or C/C++... they are all multi-plattform, or if you don't need linux at all, Visual Basic is your choice, as someone said to you in previous post. Good luck! Jesus From dosida at ...626... Thu May 13 19:24:35 2010 From: dosida at ...626... (Dimitris Anogiatis) Date: Thu, 13 May 2010 11:24:35 -0600 Subject: [Gambas-user] Gambas for windows, how? In-Reply-To: References: <1273754550.6554.9.camel@...40...> <325768041-1273754767-cardhu_decombobulator_blackberry.rim.net-1883005232-@...2405...> <4BEC02C6.7000304@...1000...> <2009826709-1273759169-cardhu_decombobulator_blackberry.rim.net-1272103203-@...2405...> <4BEC108A.6080406@...1000...> <4BEC1297.9080208@...2015...> <1588905289-1273768912-cardhu_decombobulator_blackberry.rim.net-234644523-@...2405...> Message-ID: Tomas, What you could do in this case, is setup a machine with Debian or Ubuntu on the customer's premises, (It doesn't have to be a top notch machine) and setup x2go and he can use the application from Windows by logging in to the debian machine using SSH and x2go which is a terminal server (kinda like RDP for windows). Another solution is to create a Virtual Machine (I usually use Virtualbox) of Ubuntu or debian on the customer's fastest machine enable RDP and login with Windows Remote Desktop client and use Gambas that way. I hope this helps Regards Dimitris On Thu, May 13, 2010 at 11:17 AM, Olivier Cruilles wrote: > Ok... but for the moment... no really portage of Gambas was made on windows > and the only one > way to execute it, is over cygwin ... and not all works as the IDE for > example ... only console mode of Gambas. > > So, if you really want to use Gambas... you must use Linux too .... sorry.. > > > Le 13 mai 2010 ? 18:41, admhardsoft at ...253... a ?crit : > > > > > Ok you are right but I wanna developer an app for a customer in windows, > because he doesn't know any debian, ubuntu, just windows > > Do you undestood me? > > Tomas > > Sent on the TELUS Mobility network with BlackBerry > > > > -----Original Message----- > > From: Alessandro Rinaldi > > Date: Thu, 13 May 2010 18:06:27 > > To: mailing list for gambas users > > Subject: Re: [Gambas-user] Gambas for windows, how? > > > > I can't understand why you want to use a so good software on a so ugly OS > ;) > > > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > Olivier Cruilles > Mail: linuxos at ...1896... > > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From doriano.blengino at ...1909... Thu May 13 19:46:44 2010 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Thu, 13 May 2010 19:46:44 +0200 Subject: [Gambas-user] Gambas for windows, how? In-Reply-To: References: <1273754550.6554.9.camel@...40...> <325768041-1273754767-cardhu_decombobulator_blackberry.rim.net-1883005232-@...2405...> <4BEC02C6.7000304@...1000...> <2009826709-1273759169-cardhu_decombobulator_blackberry.rim.net-1272103203-@...2405...> <4BEC108A.6080406@...1000...> <4BEC1297.9080208@...2015...> <1588905289-1273768912-cardhu_decombobulator_blackberry.rim.net-234644523-@...2405...> Message-ID: <4BEC3B04.6030805@...1909...> Dimitris Anogiatis ha scritto: > Tomas, > What you could do in this case, is setup a machine with Debian or Ubuntu on > the customer's premises, (It doesn't have to be a top notch machine) and > setup x2go and he can use the application from Windows by logging in to the > debian machine using SSH and x2go which is a terminal server (kinda like RDP > for windows). > > Another solution is to create a Virtual Machine (I usually use Virtualbox) > of Ubuntu or debian on the customer's fastest machine enable RDP and login > with Windows Remote Desktop client and use Gambas that way. > There is also AndLinux: http://www.andlinux.org/ It is not an emulator - it is a kernel which runs as a windows service. I use it on one of my machines and it is amazing: stable, fast, not memory hungry, sees everything windows sees (usb sticks, CDs, samba shares). You only need to add an X server (I use Xming). I use it to develop with gambas, and it works well. Salutations, Doriano From wdahn at ...1000... Thu May 13 20:28:16 2010 From: wdahn at ...1000... (Werner) Date: Fri, 14 May 2010 02:28:16 +0800 Subject: [Gambas-user] Gambas for windows, how? In-Reply-To: <1588905289-1273768912-cardhu_decombobulator_blackberry.rim.net-234644523-@...2405...> References: <1273754550.6554.9.camel@...40...><325768041-1273754767-cardhu_decombobulator_blackberry.rim.net-1883005232-@...2405...><4BEC02C6.7000304@...1000...><2009826709-1273759169-cardhu_decombobulator_blackberry.rim.net-1272103203-@...2405...><4BEC108A.6080406@...1000...> <4BEC1297.9080208@...2015...> <1588905289-1273768912-cardhu_decombobulator_blackberry.rim.net-234644523-@...2405...> Message-ID: <4BEC44C0.5090400@...1000...> On 14/05/10 00:41, admhardsoft at ...253... wrote: > Ok you are right but I wanna developer an app for a customer in windows, because he doesn't know any debian, ubuntu, just windows > Do you undestood me? > Tomas > If we are talking about a typical scenario in an office where the user is using the internet for browsing and email, accessing a database with a specially written tool (i.e. Gambas) then then there is no problem at all replacing a Windows machine with a Linux distribution such as openSUSE or Ubuntu. I have done this many times since 10 years ago with excellent results; some of the users are in the lower income bracket, some are approaching retirement age. The only complaint I ever received about the Linux user interface was that it takes only one click instead of two (like in Windows) to open something but that is configurable to suit the taste. Otherwise the user experience transition was as smooth as silk. No viruses, no virus checkers. Gambas is excellent as a user interface to databases. It is also very good for rapid prototyping software on Linux. For me it is the fastest way to write a program on Linux. Yes I understand you. But why not just sit back for a moment and think. Do you want Windows or do you want a solution? It has been a reflex for many years just to think "which Windows Operating System to install?" The times are a-changing, and fast. Linux is a winner! Why would the CEO of Microsoft do something like this? From prog at ...2177... Thu May 13 21:29:37 2010 From: prog at ...2177... (craf) Date: Thu, 13 May 2010 15:29:37 -0400 Subject: [Gambas-user] Gambas for windows, how? In-Reply-To: <4BEC44C0.5090400@...1000...> References: <1273754550.6554.9.camel@...40...> <325768041-1273754767-cardhu_decombobulator_blackberry.rim.net-1883005232-@...2405...> <4BEC02C6.7000304@...1000...> <2009826709-1273759169-cardhu_decombobulator_blackberry.rim.net-1272103203-@...2405...> <4BEC108A.6080406@...1000...> <4BEC1297.9080208@...2015...> <1588905289-1273768912-cardhu_decombobulator_blackberry.rim.net-234644523-@...2405...> <4BEC44C0.5090400@...1000...> Message-ID: <1273778977.1984.1.camel@...2406...> -----Mensaje original----- De: Werner Reply-to: mailing list for gambas users Para: gambas-user at lists.sourceforge.net Asunto: Re: [Gambas-user] Gambas for windows, how? Fecha: Fri, 14 May 2010 02:28:16 +0800 On 14/05/10 00:41, admhardsoft at ...253... wrote: > Ok you are right but I wanna developer an app for a customer in windows, because he doesn't know any debian, ubuntu, just windows > Do you undestood me? > Tomas > >If we are talking about a typical scenario in an office where the user >is using the internet for browsing and email, accessing a database with >a specially written tool (i.e. Gambas) then then there is no problem at >all replacing a Windows machine with a Linux distribution such as >openSUSE or Ubuntu. >I have done this many times since 10 years ago with excellent results; >some of the users are in the lower income bracket, some are approaching >retirement age. The only complaint I ever received about the Linux user >interface was that it takes only one click instead of two (like in >Windows) to open something but that is configurable to suit the taste. >Otherwise the user experience transition was as smooth as silk. No >viruses, no virus checkers. >Gambas is excellent as a user interface to databases. It is also very >good for rapid prototyping software on Linux. For me it is the fastest >way to write a program on Linux. >Yes I understand you. But why not just sit back for a moment and think. >Do you want Windows or do you want a solution? It has been a reflex for >many years just to think "which Windows Operating System to install?" >The times are a-changing, and fast. Linux is a winner! >Why would the CEO of Microsoft do something like this? > ja,ja. God video. Ritalin emergency. ------------------------------------------------------------------------------ _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From gambas.fr at ...626... Thu May 13 22:00:23 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Thu, 13 May 2010 22:00:23 +0200 Subject: [Gambas-user] Program version numbers In-Reply-To: <1273769033.2021.10.camel@...2406...> References: <1273769033.2021.10.camel@...2406...> Message-ID: it depend of your development plan 2010/5/13 craf : > Hi. > > I'm trying to make my first program Gambas and let me know as I have to > number the release version, 0.0.1 had thought. > > Version more = 0 > Minor version = 0 > Bugs = 1 > > Is it a good idea?, or take other number is greater? > > I appreciate any suggestions. > > Regards > > -- > Cristian Abarz?a > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas.fr at ...626... Thu May 13 22:02:29 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Thu, 13 May 2010 22:02:29 +0200 Subject: [Gambas-user] Disable option In-Reply-To: References: <1273754550.6554.9.camel@...40...> Message-ID: they are desabled .. in fact it's each libs that fill the array of desabled components , but if you are desabled some libs by hand , they are not controled so not present in the array 2010/5/13 C. Amaro : > What I am asking is why does not "THESE COMPONENTS ARE DISABLED" show ODBC > and KDE as disable components if I set --disable-odbc and --disable-kde as > configure options. So are this two disabled and the "THESE COMPONENTS ARE > DISABLED" lies or they are not disabled? > > Other disabled options are obvious, I do not have installed headers. > > Regards, > > Amaro > > > > On Thu, May 13, 2010 at 5:37 PM, Fabien Bodard wrote: > >> > configure:1995: WARNING: odbc component is disabled >> > configure:2331: WARNING: kde component is disabled >> >> for the lib you have desabled yourself >> >> >> THESE COMPONENTS ARE DISABLED: >> >> >> >> - gb.corba >> >> - gb.db.firebird >> >> - gb.desktop >> >> - gb.opengl >> >> - gb.qt.kde >> >> - gb.qte >> >> - gb.sdl >> >> for theses libs some system libraries are missing so they are deasabled >> too... >> >> Here the libs needed to activate them : >> http://gambasdoc.org/help/install >> >> Fabien >> >> >> 2010/5/13 Charlie Reinl : >> > Am Donnerstag, den 13.05.2010, 12:58 +0200 schrieb C. Amaro: >> >> Hello, >> >> >> >> I am trying to disable options (gambas2-2.20.2): >> >> >> >> ./configure --disable-odbc --disable-kde --host=mipsel-linux >> >> --build=mipsel-linux >> >> .. >> >> THESE COMPONENTS ARE DISABLED: >> >> >> >> - gb.corba >> >> - gb.db.firebird >> >> - gb.desktop >> >> - gb.opengl >> >> - gb.qt.kde >> >> - gb.qte >> >> - gb.sdl >> >> >> >> In config.log I can see >> >> configure:1995: WARNING: odbc component is disabled >> >> configure:2331: WARNING: kde component is disabled >> >> >> >> What does this mean? Are this options disabled or not? >> >> >> >> Thank you for helping me out with this.. >> >> >> >> C.A. >> >> >> ------------------------------------------------------------------------------ >> > >> > Salut, >> > >> > to install gambas, you need the libraries from the included components. >> > At least the devel part from the library. >> > If gambas don't find one of the libraries during config, the component >> > which belongs to, will be disabled. >> > >> > The disable options is for the case, that a library is installed but you >> > don't want to use it, or you (library) version makes troubles while >> > compiling gambas. >> > >> > >> > -- >> > Amicalement >> > Charlie >> > >> > >> > >> ------------------------------------------------------------------------------ >> > >> > _______________________________________________ >> > Gambas-user mailing list >> > Gambas-user at lists.sourceforge.net >> > https://lists.sourceforge.net/lists/listinfo/gambas-user >> > >> >> >> ------------------------------------------------------------------------------ >> >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas.fr at ...626... Thu May 13 22:07:46 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Thu, 13 May 2010 22:07:46 +0200 Subject: [Gambas-user] Gambas for windows, how? In-Reply-To: <1273778977.1984.1.camel@...2406...> References: <325768041-1273754767-cardhu_decombobulator_blackberry.rim.net-1883005232-@...2405...> <4BEC02C6.7000304@...1000...> <2009826709-1273759169-cardhu_decombobulator_blackberry.rim.net-1272103203-@...2405...> <4BEC108A.6080406@...1000...> <4BEC1297.9080208@...2015...> <1588905289-1273768912-cardhu_decombobulator_blackberry.rim.net-234644523-@...2405...> <4BEC44C0.5090400@...1000...> <1273778977.1984.1.camel@...2406...> Message-ID: many thank for the andlinux info ... good... really good :) 2010/5/13 craf : > -----Mensaje original----- > De: Werner > Reply-to: mailing list for gambas users > > Para: gambas-user at lists.sourceforge.net > Asunto: Re: [Gambas-user] Gambas for windows, how? > Fecha: Fri, 14 May 2010 02:28:16 +0800 > > > On 14/05/10 00:41, admhardsoft at ...253... wrote: >> Ok you are right but I wanna developer an app for a customer ?in windows, because he doesn't know any debian, ubuntu, just windows >> Do you undestood me? >> Tomas >> >>If we are talking about a typical scenario in an office where the user >>is using the internet for browsing and email, accessing a database with >>a specially written tool (i.e. Gambas) then then there is no problem at >>all replacing a Windows machine with a Linux distribution such as >>openSUSE or Ubuntu. > >>I have done this many times since 10 years ago with excellent results; >>some of the users are in the lower income bracket, some are approaching >>retirement age. The only complaint I ever received about the Linux user >>interface was that it takes only one click instead of two (like in >>Windows) to open something but that is configurable to suit the taste. >>Otherwise the user experience transition was as smooth as silk. No >>viruses, no virus checkers. > >>Gambas is excellent as a user interface to databases. It is also very >>good for rapid prototyping software on Linux. For me it is the fastest >>way to write a program on Linux. > >>Yes I understand you. But why not just sit back for a moment and think. >>Do you want Windows or do you want a solution? It has been a reflex for >>many years just to think "which Windows Operating System to install?" > >>The times are a-changing, and fast. Linux is a winner! > >>Why would the CEO of Microsoft do something like this? >> > > ja,ja. God video. Ritalin emergency. > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From leonardo at ...1237... Fri May 14 00:40:06 2010 From: leonardo at ...1237... (Leonardo Miliani) Date: Fri, 14 May 2010 00:40:06 +0200 Subject: [Gambas-user] Gambas3: error with ODBC Message-ID: <1273790406.9887.2.camel@"hp_host"> Gambas 3, 64 bit version. During the connection setup with an ODBC database everything goes right, but when I try to exec a query with Connectin.Exec, Gambas crashes with #11 error. -- Leonardo Miliani www.leonardomiliani.com Webmaster e co-fondatore di www.gambas-it.org Il portale di riferimento per i programmatori Gambas italiani From gambas at ...1... Fri May 14 01:16:08 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Fri, 14 May 2010 01:16:08 +0200 Subject: [Gambas-user] Several lines from a string in the code In-Reply-To: <1273707890.1959.22.camel@...2406...> References: <1273695194.1959.2.camel@...2406...> <201005122311.58253.gambas@...1...> <1273707890.1959.22.camel@...2406...> Message-ID: <201005140116.08850.gambas@...1...> > > Method 2: > textarea1.text = ("Moon\n" > "The Moon is the only natural satellite of Earth.\n" > "It is the nearest body and the best known.") > > error: Missing ')' in line .... > This method should be possible, but because of a implementation problem - not really a bug :-) - you get an error. I will try to fix the compiler to allow that! Regards, -- Beno?t Minisini From prog at ...2177... Fri May 14 02:29:37 2010 From: prog at ...2177... (craf) Date: Thu, 13 May 2010 20:29:37 -0400 Subject: [Gambas-user] Several lines from a string in the code In-Reply-To: <201005140116.08850.gambas@...1...> References: <1273695194.1959.2.camel@...2406...> <201005122311.58253.gambas@...1...> <1273707890.1959.22.camel@...2406...> <201005140116.08850.gambas@...1...> Message-ID: <1273796977.1984.7.camel@...2406...> -----Mensaje original----- De: Beno?t Minisini Reply-to: mailing list for gambas users Para: mailing list for gambas users Asunto: Re: [Gambas-user] Several lines from a string in the code Fecha: Fri, 14 May 2010 01:16:08 +0200 > > Method 2: > textarea1.text = ("Moon\n" > "The Moon is the only natural satellite of Earth.\n" > "It is the nearest body and the best known.") > > error: Missing ')' in line .... > >This method should be possible, but because of a implementation problem - not >really a bug :-) - you get an error. >I will try to fix the compiler to allow that! >Regards, Hi Benoit As Mr Burns would say, "Excellent" (The Simpsons) Regards. -- Cristian Abarz?a From gambas at ...1... Fri May 14 14:24:08 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Fri, 14 May 2010 14:24:08 +0200 Subject: [Gambas-user] form_resize issue In-Reply-To: References: <201004181019.07388.gambas@...1...> Message-ID: <201005141424.08722.gambas@...1...> > Hi Benoit, > > I put together the small project with 2 level of TabStrip controls and with > tableview controls on some of them. > First it seemed to work perfectly... but finally I could reproduce the > effect on my computer. > > When the app starts up then (normally) the controls resize correctly. Just > after keep your eyes on one of the tableviews and resize the form (I just > change from maximized to normal window and back). > The tableview I look at behaves normally. But when I check the others they > have the size corresponds to the normal window size. > > Will be interesting to see if the same happens for you or if you find a > silly mistake in the code. > > For the moment I didn't put any refreshing - I did it in the project I work > on but didn't help. > > Regards, > Robi > Hi, I saw the problem now, and noticed that I don't get it with Qt 4 in Gambas 3. I will see if I can find a workaround for Gambas 2... -- Beno?t Minisini From gambas at ...1... Fri May 14 14:50:26 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Fri, 14 May 2010 14:50:26 +0200 Subject: [Gambas-user] form_resize issue In-Reply-To: <201005141424.08722.gambas@...1...> References: <201005141424.08722.gambas@...1...> Message-ID: <201005141450.26450.gambas@...1...> > > Hi Benoit, > > > > I put together the small project with 2 level of TabStrip controls and > > with tableview controls on some of them. > > First it seemed to work perfectly... but finally I could reproduce the > > effect on my computer. > > > > When the app starts up then (normally) the controls resize correctly. > > Just after keep your eyes on one of the tableviews and resize the form > > (I just change from maximized to normal window and back). > > The tableview I look at behaves normally. But when I check the others > > they have the size corresponds to the normal window size. > > > > Will be interesting to see if the same happens for you or if you find a > > silly mistake in the code. > > > > For the moment I didn't put any refreshing - I did it in the project I > > work on but didn't help. > > > > Regards, > > Robi > > Hi, > > I saw the problem now, and noticed that I don't get it with Qt 4 in Gambas > 3. I will see if I can find a workaround for Gambas 2... As an immediate workaround, do not use the TabStrip ClientW and ClientH properties during the Form_Resize event. Use the Arrangement property to layout your controls. Regards, -- Beno?t Minisini From lang at ...1938... Fri May 14 19:08:24 2010 From: lang at ...1938... (Stevie) Date: Fri, 14 May 2010 19:08:24 +0200 Subject: [Gambas-user] Gambas for windows, how? In-Reply-To: <4BEC35AA.4000502@...2382...> References: <1588905289-1273768912-cardhu_decombobulator_blackberry.rim.net-234644523-@...2405...> <4BEC35AA.4000502@...2382...> Message-ID: <201005141908.24778.lang@...1938...> Am Donnerstag, 13. Mai 2010 19:23:54 schrieb EA7DFH: > El 13/05/10 18:41, admhardsoft at ...253... escribi?: > > Ok you are right but I wanna developer an app for a customer in windows, > > because he doesn't know any debian, ubuntu, just windows Do you undestood > > me? > > Tomas > > Sent on the TELUS Mobility network with BlackBerry > > > > -----Original Message----- > > From: Alessandro Rinaldi > > Date: Thu, 13 May 2010 18:06:27 > > To: mailing list for gambas users > > Subject: Re: [Gambas-user] Gambas for windows, how? > > > > I can't understand why you want to use a so good software on a so ugly OS > > ;) > > It seems it is YOU who didn'n understand... > > If you want to develop for Windows, you MUST search other programming > language, other than Gambas. > > Try Python, Haskell or C/C++... they are all multi-plattform, or if you > don't need linux at all, Visual Basic is your choice, as someone said to > you in previous post. > > Good luck! Although it's an old disussion I don't know, if there is room for the big picture....but.... - Windoze is on it's best way to become somthing like an incompatible componentware (C#, VB.Net etc.) - There is no crossplattform RAD-tool at the moment. - Only the Qt-framework....which is far away of being a RAD-tool. - Java is still crap (sorry....my personal opinion) - ...and Gambas, relaying on Qt, could be the PITA of M$ - Benoit said, he will not port Gambas to Windoze...but he would help, if there is someone willing to do the job. :-)))))) - aside of this...developing once, compiling twice is the right way to serve both platforms. I've developed some nice tiny tools with Gambas...I can't count the requests of windoze- friends and -customers, to have this apps on their M$-machines. - Remote-X is, for most of them, rocket sience. :-/ - migrating their Windoze-mules to a Linux-F1-racer in one go? ...no way! - German saying: salami-tactic...means "slice-wise"! ;-) Never give your customer what he needs! ....always give him what he wants! ...with an option! ;-) There IS a market for Gambas on other plattforms!!! Regards....awaiting friendly fire! ;-) Stevie From lang at ...1938... Fri May 14 19:42:18 2010 From: lang at ...1938... (Stevie) Date: Fri, 14 May 2010 19:42:18 +0200 Subject: [Gambas-user] Gambas for windows, how? Message-ID: <201005141942.18715.lang@...1938...> Am Donnerstag, 13. Mai 2010 19:23:54 schrieb EA7DFH: > El 13/05/10 18:41, admhardsoft at ...253... escribi?: > > Ok you are right but I wanna developer an app for a customer in windows, > > because he doesn't know any debian, ubuntu, just windows Do you undestood > > me? > > Tomas > > Sent on the TELUS Mobility network with BlackBerry > > > > -----Original Message----- > > From: Alessandro Rinaldi > > Date: Thu, 13 May 2010 18:06:27 > > To: mailing list for gambas users > > Subject: Re: [Gambas-user] Gambas for windows, how? > > > > I can't understand why you want to use a so good software on a so ugly OS > > ;) > > It seems it is YOU who didn'n understand... > > If you want to develop for Windows, you MUST search other programming > language, other than Gambas. > > Try Python, Haskell or C/C++... they are all multi-plattform, or if you > don't need linux at all, Visual Basic is your choice, as someone said to > you in previous post. > > Good luck! Although it's an old disussion I don't know, if there is room for the big picture....but.... - Windoze is on it's best way to become somthing like an incompatible componentware (C#, VB.Net etc.) - There is no crossplattform RAD-tool at the moment. - Only the Qt-framework....which is far away of being a RAD-tool. - Java is still crap (sorry....my personal opinion) - ...and Gambas, relaying on Qt, could be the PITA of M$ - Benoit said, he will not port Gambas to Windoze...but he would help, if there is someone willing to do the job. :-)))))) - aside of this...developing once, compiling twice is the right way to serve both platforms. I've developed some nice tiny tools with Gambas...I can't count the requests of windoze- friends and -customers, to have this apps on their M$-machines. - Remote-X is, for most of them, rocket sience. :-/ - migrating their Windoze-mules to a Linux-F1-racer in one go? ...no way! - German saying: salami-tactic...means "slice-wise"! ;-) Never give your customer what he needs! ....always give him what he wants! ...with an option! ;-) There IS a market for Gambas on other plattforms!!! Regards....awaiting friendly fire! ;-) Stevie From zerkowski at ...395... Fri May 14 19:31:28 2010 From: zerkowski at ...395... (zerkowski sur bouquiniste.biz) Date: Fri, 14 May 2010 19:31:28 +0200 Subject: [Gambas-user] Gambas for windows, how? In-Reply-To: <201005141908.24778.lang@...1938...> References: <1588905289-1273768912-cardhu_decombobulator_blackberry.rim.net-234644523-@...2405...> <4BEC35AA.4000502@...2382...> <201005141908.24778.lang@...1938...> Message-ID: <4BED88F0.10307@...395...> Stevie a ??crit : Am Donnerstag, 13. Mai 2010 19:23:54 schrieb EA7DFH: El 13/05/10 18:41, [1]admhardsoft at ...253... escribi??: Ok you are right but I wanna developer an app for a customer in windows, because he doesn't know any debian, ubuntu, just windows Do you undestood me? Tomas Sent on the TELUS Mobility network with BlackBerry -----Original Message----- From: Alessandro Rinaldi [2] Date: Thu, 13 May 2010 18:06:27 To: mailing list for gambas users[3] Subject: Re: [Gambas-user] Gambas for windows, how? I can't understand why you want to use a so good software on a so ugly OS ;) It seems it is YOU who didn'n understand... If you want to develop for Windows, you MUST search other programming language, other than Gambas. Try Python, Haskell or C/C++... they are all multi-plattform, or if you don't need linux at all, Visual Basic is your choice, as someone said to you in previous post. Good luck! Although it's an old disussion I don't know, if there is room for the big picture....but.... - Windoze is on it's best way to become somthing like an incompatible componentware (C#, VB.Net etc.) - There is no crossplattform RAD-tool at the moment. Lazarus ? - Only the Qt-framework....which is far away of being a RAD-tool. - Java is still crap (sorry....my personal opinion) - ...and Gambas, relaying on Qt, could be the PITA of M$ - Benoit said, he will not port Gambas to Windoze...but he would help, if there is someone willing to do the job. :-)))))) - aside of this...developing once, compiling twice is the right way to serve both platforms. I've developed some nice tiny tools with Gambas...I can't count the requests of windoze- friends and -customers, to have this apps on their M$-machines. - Remote-X is, for most of them, rocket sience. :-/ - migrating their Windoze-mules to a Linux-F1-racer in one go? ...no way! - German saying: salami-tactic...means "slice-wise"! ;-) Never give your customer what he needs! ....always give him what he wants! ...with an option! ;-) There IS a market for Gambas on other plattforms!!! Regards....awaiting friendly fire! ;-) Stevie ------------------------------------------------------------------------------ _______________________________________________ Gambas-user mailing list [4]Gambas-user at lists.sourceforge.net [5]https://lists.sourceforge.net/lists/listinfo/gambas-user References 1. mailto:admhardsoft at ...253... 2. mailto:alerinaldi at ...2334... 3. mailto:gambas-user at lists.sourceforge.net 4. mailto:Gambas-user at lists.sourceforge.net 5. https://lists.sourceforge.net/lists/listinfo/gambas-user From gambas at ...1... Fri May 14 23:35:44 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Fri, 14 May 2010 23:35:44 +0200 Subject: [Gambas-user] Support for "static" arrays has been removed Message-ID: <201005142335.44404.gambas@...1...> Hi, There was a warning in the documentation for a long time, and now it is effective: the support for static arrays has been removed. Moreover, the New keyword is now mandatory if you want to instanciate an array at the same time you declare it. Concretely, the following syntaxes are not possible anymore: Private MyStaticArray[16] As MyClass ' #1 Private MyArray As MyClass[16] ' #2 The syntax #2 must be written that way: Private MyArray As New MyClass[16] Static arrays will come back in the future (with structure support maybe, who knows?), but they will use the syntax #2, not the syntax #1. So don't be mixed up! Regards, -- Beno?t Minisini From gambas.fr at ...626... Sat May 15 11:05:03 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Sat, 15 May 2010 11:05:03 +0200 Subject: [Gambas-user] Support for "static" arrays has been removed In-Reply-To: <201005142335.44404.gambas@...1...> References: <201005142335.44404.gambas@...1...> Message-ID: ok :-) Le 14 mai 2010 23:35, Beno?t Minisini a ?crit : > Hi, > > There was a warning in the documentation for a long time, and now it is > effective: the support for static arrays has been removed. > > Moreover, the New keyword is now mandatory if you want to instanciate an array > at the same time you declare it. > > Concretely, the following syntaxes are not possible anymore: > > ? ? ? ?Private MyStaticArray[16] As MyClass ' #1 > ? ? ? ?Private MyArray As MyClass[16] ' #2 > > The syntax #2 must be written that way: > > ? ? ? ?Private MyArray As New MyClass[16] > > Static arrays will come back in the future (with structure support maybe, who > knows?), but they will use the syntax #2, not the syntax #1. So don't be mixed > up! > > Regards, > > -- > Beno?t Minisini > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From rospolosco at ...152... Sat May 15 12:51:24 2010 From: rospolosco at ...152... (Stefano Palmeri) Date: Sat, 15 May 2010 12:51:24 +0200 Subject: [Gambas-user] Support for "static" arrays has been removed In-Reply-To: <201005142335.44404.gambas@...1...> References: <201005142335.44404.gambas@...1...> Message-ID: <201005151251.24894.rospolosco@...152...> Il venerd? 14 maggio 2010 23:35:44 Beno?t Minisini ha scritto: > Hi, > > There was a warning in the documentation for a long time, and now it is > effective: the support for static arrays has been removed. > > Moreover, the New keyword is now mandatory if you want to instanciate an > array at the same time you declare it. > > Concretely, the following syntaxes are not possible anymore: > > Private MyStaticArray[16] As MyClass ' #1 > Private MyArray As MyClass[16] ' #2 > > The syntax #2 must be written that way: > > Private MyArray As New MyClass[16] > > Static arrays will come back in the future (with structure support maybe, > who knows?), but they will use the syntax #2, not the syntax #1. So don't > be mixed up! > > Regards, You mean in Gambas 3, or in next stable release of Gambas 2. Thanks. Saluti, Stefano From gambas.fr at ...626... Sat May 15 14:35:32 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Sat, 15 May 2010 14:35:32 +0200 Subject: [Gambas-user] Support for "static" arrays has been removed In-Reply-To: <201005151251.24894.rospolosco@...152...> References: <201005142335.44404.gambas@...1...> <201005151251.24894.rospolosco@...152...> Message-ID: > You mean in Gambas 3, or in next stable release of Gambas 2. > Thanks. In Gambas3 as Gambas2 is in the end of its life All the change in the language can only be for gb3 (for compatibilities problems) > > Saluti, > > Stefano > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From a.baudrez at ...626... Sat May 15 20:01:15 2010 From: a.baudrez at ...626... (Alain Baudrez) Date: Sat, 15 May 2010 20:01:15 +0200 Subject: [Gambas-user] I am new and am just saying hello Message-ID: Hello, Bonjour, I am Alain Baudrez from Brugge (Belgium). I am a retired professional MS SysAdmin / ICT Teacher / VB programmer from the Belgian Navy for over more than 20 years. My last job from 1096 to beginning this year was at the Belgian-Netherlands MineWarfare School at Ostend - http://www.eguermin.org - where I worked on the front-ends and network of the Naval Mine Warfare Simulator, a tactical simulator for Senior Navy Officers in the anti naval mine warfare. Eguermin stands for 'Ecole de GUERre de MINes' I am now an admin on the Dutch PCLinuxOS site - http://www.pclinuxos.nl - as well as on the Dutch Linux Mint site - http://linuxmint-nl.org/index.php I've only started programming in Gambas a few weeks ago, but already I am writing a small Dutch tutorial for Gambas2. You can follow it on the (Dutch of course) PCLinuxOS.NL forum - http://www.pclinuxos.nl/Forum/index.php?board=61.0 I don't know if there is a Gambas Documentation Team but if there is I would like to join, as I have some experience in writing tutorials too, due to my function as ICT Teacher. Greetings, Alain From gambas at ...1... Sat May 15 23:12:46 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sat, 15 May 2010 23:12:46 +0200 Subject: [Gambas-user] I am new and am just saying hello In-Reply-To: References: Message-ID: <201005152312.46597.gambas@...1...> > Hello, > Bonjour, > > > I am Alain Baudrez from Brugge (Belgium). I am a retired professional > MS SysAdmin / ICT Teacher / VB programmer from the Belgian Navy for > over more than 20 years. My last job from 1096 to beginning this year > was at the Belgian-Netherlands MineWarfare School at Ostend - > http://www.eguermin.org - where I worked on the front-ends and network > of the Naval Mine Warfare Simulator, a tactical simulator for Senior > Navy Officers in the anti naval mine warfare. > > Eguermin stands for 'Ecole de GUERre de MINes' > > I am now an admin on the Dutch PCLinuxOS site - > http://www.pclinuxos.nl - as well as on the Dutch Linux Mint site - > http://linuxmint-nl.org/index.php > > I've only started programming in Gambas a few weeks ago, but already I > am writing a small Dutch tutorial for Gambas2. You can follow it on > the (Dutch of course) PCLinuxOS.NL forum - > http://www.pclinuxos.nl/Forum/index.php?board=61.0 > > I don't know if there is a Gambas Documentation Team but if there is I > would like to join, as I have some experience in writing tutorials > too, due to my function as ICT Teacher. > > Greetings, > > Alain > Welcome to Gambas! There is no "team", but there is a wiki at http://gambasdoc.org. Regards, -- Beno?t Minisini From gambas at ...1... Sat May 15 23:13:55 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sat, 15 May 2010 23:13:55 +0200 Subject: [Gambas-user] Gambas3: error with ODBC In-Reply-To: <1273790406.9887.2.camel@"hp_host"> References: <1273790406.9887.2.camel@"hp_host"> Message-ID: <201005152313.55207.gambas@...1...> > Gambas 3, 64 bit version. > During the connection setup with an ODBC database everything goes right, > but when I try to exec a query with Connectin.Exec, Gambas crashes with > #11 error. Can you get a backtrace with gdb? And better get an output of running your project inside valgrind? -- Beno?t Minisini From gambas at ...1... Sat May 15 23:14:46 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sat, 15 May 2010 23:14:46 +0200 Subject: [Gambas-user] Several lines from a string in the code In-Reply-To: <201005140116.08850.gambas@...1...> References: <1273695194.1959.2.camel@...2406...> <1273707890.1959.22.camel@...2406...> <201005140116.08850.gambas@...1...> Message-ID: <201005152314.46454.gambas@...1...> > > Method 2: > > textarea1.text = ("Moon\n" > > > > "The Moon is the only natural satellite of Earth.\n" > > > > "It is the nearest body and the best known.") > > > > error: Missing ')' in line .... > > This method should be possible, but because of a implementation problem - > not really a bug :-) - you get an error. > > I will try to fix the compiler to allow that! > > Regards, Compiler fixed in Gambas 3 since revision #2943! Regards, -- Beno?t Minisini From tobiasboe at ...221... Sun May 16 14:55:50 2010 From: tobiasboe at ...221... (tobiasboe at ...221...) Date: Sun, 16 May 2010 14:55:50 +0200 Subject: [Gambas-user] =?iso-8859-15?q?gb=2Edebug?= Message-ID: <1ODdNm-1obnl20@...2432...> Hello again, refering to my question about the gb.debug component, I have to say, that it will be used to have a clearer view on bugs. While the callto Debug.Begin in Form_Open() doesn't raise any error, there is at the following Debug.Start() the error message "Unable to open fifo". All neccessary files are at /tmp/gambas.${UID} and the read/write permissions exist too. Regards, Tobias From gambas at ...1... Mon May 17 00:19:58 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 17 May 2010 00:19:58 +0200 Subject: [Gambas-user] gb.debug In-Reply-To: <1ODdNm-1obnl20@...2432...> References: <1ODdNm-1obnl20@...2432...> Message-ID: <201005170019.58156.gambas@...1...> > Hello again, > refering to my question about the gb.debug component, I have to say, > that it will be used to have a clearer view on bugs. > While the callto Debug.Begin in Form_Open() doesn't raise any error, > there is at the following Debug.Start() the error message "Unable to open > fifo". All neccessary files are at /tmp/gambas.${UID} and the > read/write permissions exist too. > Regards, > Tobias > --------------------------------------------------------------------------- > --- > Can you elaborate please? There is no need to use the gb.debug component at all if you don't want to implement an IDE or something similar. What do you want to do exactly? -- Beno?t Minisini From girardhenri at ...67... Tue May 18 09:17:46 2010 From: girardhenri at ...67... (girardhenri at ...67...) Date: Tue, 18 May 2010 09:17:46 +0200 Subject: [Gambas-user] I am new and am just saying hello In-Reply-To: References: Message-ID: Salut, Joyeux retrait?, je pense que tu l'as bien gagn? (1096) : lol Moi j'y suis depuis 2005 et je ne m'en plaints pas (m?me si elle est mal pay?e ici) J'aime bien gambas et des tutoriels (anglais, fran?ais) seront le bienvenus, (d?sol? je ne connais pas le dutch) En fait il commence ? y avoir une superbe litt?rature ? propos de gambas. Je suis en train de penser ? r?crire le livre de gambas pour la version 3. bienvenue (je ne suis qu'un utilisateur de gambas depuis de nombreuses ann?es mais je n'ai pas beaucoup avanc? comme d?veloppeur ! lol) cordialement Henri -------------------------------------------------- From: "Alain Baudrez" Sent: Saturday, May 15, 2010 8:01 PM To: "mailing list for gambas users" Subject: [Gambas-user] I am new and am just saying hello > Hello, > Bonjour, > > > I am Alain Baudrez from Brugge (Belgium). I am a retired professional > MS SysAdmin / ICT Teacher / VB programmer from the Belgian Navy for > over more than 20 years. My last job from 1096 to beginning this year > was at the Belgian-Netherlands MineWarfare School at Ostend - > http://www.eguermin.org - where I worked on the front-ends and network > of the Naval Mine Warfare Simulator, a tactical simulator for Senior > Navy Officers in the anti naval mine warfare. > > Eguermin stands for 'Ecole de GUERre de MINes' > > I am now an admin on the Dutch PCLinuxOS site - > http://www.pclinuxos.nl - as well as on the Dutch Linux Mint site - > http://linuxmint-nl.org/index.php > > I've only started programming in Gambas a few weeks ago, but already I > am writing a small Dutch tutorial for Gambas2. You can follow it on > the (Dutch of course) PCLinuxOS.NL forum - > http://www.pclinuxos.nl/Forum/index.php?board=61.0 > > I don't know if there is a Gambas Documentation Team but if there is I > would like to join, as I have some experience in writing tutorials > too, due to my function as ICT Teacher. > > Greetings, > > Alain > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From rospolosco at ...152... Tue May 18 09:30:09 2010 From: rospolosco at ...152... (Stefano Palmeri) Date: Tue, 18 May 2010 09:30:09 +0200 Subject: [Gambas-user] I am new and am just saying hello In-Reply-To: References: Message-ID: <201005180930.09748.rospolosco@...152...> Il marted? 18 maggio 2010 09:17:46 girardhenri at ...67... ha scritto: > Salut, > Joyeux retrait?, je pense que tu l'as bien gagn? (1096) : lol > Moi j'y suis depuis 2005 et je ne m'en plaints pas (m?me si elle est mal > pay?e ici) > J'aime bien gambas et des tutoriels (anglais, fran?ais) seront le > bienvenus, (d?sol? je ne connais pas le dutch) > En fait il commence ? y avoir une superbe litt?rature ? propos de gambas. > Je suis en train de penser ? r?crire le livre de gambas pour la version 3. > bienvenue (je ne suis qu'un utilisateur de gambas depuis de nombreuses > ann?es mais je n'ai pas beaucoup avanc? comme d?veloppeur ! lol) > cordialement > Henri Google translated for not french speakers: (prawns = gambas) Hello, Happy retirement, I think you've earned it (1096): lol Me, I'm since 2005 and I do not complain (even if it is poorly paid here) I like prawns and tutorials (English, French) will be the welcome, (Sorry I do not know the Dutch) In fact it begins to have a great literature about prawns. I'm thinking to rewrite the book of prawns for version 3. Welcome (I'm a user of prawns for many years but I have not made much progress as a developer! lol) cordially Henry From rterry at ...1946... Mon May 17 23:32:04 2010 From: rterry at ...1946... (richard terry) Date: Tue, 18 May 2010 07:32:04 +1000 Subject: [Gambas-user] Feature request Message-ID: <201005180732.04941.rterry@...1946...> I wondered if there was any easy way to find a file (class/form/module) in ones code tree. Maybe this feature already exists in gambas3 As I've hundreds of forms, classes and modules, I've got to the point where I occasinally 'mislay' one. Yes I know I can search my HDD easily with locate, but it would be a nice feature to be able to type in a name > jump to that subdir with the file. Regards Richard From eilert-sprachen at ...221... Tue May 18 12:46:42 2010 From: eilert-sprachen at ...221... (Rolf-Werner Eilert) Date: Tue, 18 May 2010 12:46:42 +0200 Subject: [Gambas-user] Saving integer array into file Message-ID: <4BF27012.2000305@...221...> Just had this idea: DIM myArray AS NEW Integer[] 'code filling myArray with integer values File.Save(myArray) Well, this won't be possible: File.Save only saves strings. Or is there another way by somehow copying the integer array into a string and saving that instead? Anyway, this would make you a direct copy of the array's binary structure in a file (instead of having to Cstr() and save each value as separated strings). Is there a way to do this in Gambas2? Regards Rolf From gambas.fr at ...626... Tue May 18 13:03:42 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Tue, 18 May 2010 13:03:42 +0200 Subject: [Gambas-user] Feature request In-Reply-To: <201005180732.04941.rterry@...1946...> References: <201005180732.04941.rterry@...1946...> Message-ID: like kopete does ? Le 17 mai 2010 23:32, richard terry a ?crit : > I wondered if there was any easy way to find a file (class/form/module) in ones > code tree. Maybe this feature already exists in gambas3 > > As I've hundreds of forms, classes and modules, I've got to the point where I > occasinally 'mislay' one. > > Yes I know I can search my HDD easily with locate, but it would be a nice > feature to be able to type in a name > jump to that subdir with the file. > > Regards > > Richard > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas.fr at ...626... Tue May 18 13:09:08 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Tue, 18 May 2010 13:09:08 +0200 Subject: [Gambas-user] Saving integer array into file In-Reply-To: <4BF27012.2000305@...221...> References: <4BF27012.2000305@...221...> Message-ID: 2010/5/18 Rolf-Werner Eilert : > Just had this idea: > > DIM myArray AS NEW Integer[] > > 'code filling myArray with integer values > > File.Save(myArray) > > Well, this won't be possible: File.Save only saves strings. Or is there > another way by somehow copying the integer array into a string and > saving that instead? > > Anyway, this would make you a direct copy of the array's binary > structure in a file (instead of having to Cstr() and save each value as > separated strings). > > Is there a way to do this in Gambas2? > > Regards > > Rolf > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > well there is the gb.stetting that is able to save data structure or simply that : dim aMyArray as new Integer[] 'do what you want to fill it file.save("myfile", aMyArray.Join()) to load the array line : aMyArray=split(file.load("myfile")) From eilert-sprachen at ...221... Tue May 18 13:26:32 2010 From: eilert-sprachen at ...221... (Rolf-Werner Eilert) Date: Tue, 18 May 2010 13:26:32 +0200 Subject: [Gambas-user] Saving integer array into file In-Reply-To: References: <4BF27012.2000305@...221...> Message-ID: <4BF27968.5070406@...221...> Am 18.05.2010 13:09, schrieb Fabien Bodard: > 2010/5/18 Rolf-Werner Eilert: >> Just had this idea: >> >> DIM myArray AS NEW Integer[] >> >> 'code filling myArray with integer values >> >> File.Save(myArray) >> >> Well, this won't be possible: File.Save only saves strings. Or is there >> another way by somehow copying the integer array into a string and >> saving that instead? >> >> Anyway, this would make you a direct copy of the array's binary >> structure in a file (instead of having to Cstr() and save each value as >> separated strings). >> >> Is there a way to do this in Gambas2? >> >> Regards >> >> Rolf >> >> ------------------------------------------------------------------------------ >> >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > well there is the gb.stetting that is able to save data structure or > simply that : > > > dim aMyArray as new Integer[] > > 'do what you want to fill it > > file.save("myfile", aMyArray.Join()) > > > > to load the array line : > > aMyArray=split(file.load("myfile")) > Ok, but for this function the work is the same: stuff everything into a string by converting each single element into a string and adding separators / reading the string back, splitting the elements by their separators and converting each element into an integer. It's C but it's not as fast as it could be. My idea was mainly about speed. Rolf From gambas at ...1... Tue May 18 13:30:05 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 18 May 2010 13:30:05 +0200 Subject: [Gambas-user] Saving integer array into file In-Reply-To: <4BF27968.5070406@...221...> References: <4BF27012.2000305@...221...> <4BF27968.5070406@...221...> Message-ID: <201005181330.05744.gambas@...1...> > Am 18.05.2010 13:09, schrieb Fabien Bodard: > > 2010/5/18 Rolf-Werner Eilert: > >> Just had this idea: > >> > >> DIM myArray AS NEW Integer[] > >> > >> 'code filling myArray with integer values > >> > >> File.Save(myArray) > >> > >> Well, this won't be possible: File.Save only saves strings. Or is there > >> another way by somehow copying the integer array into a string and > >> saving that instead? > >> > >> Anyway, this would make you a direct copy of the array's binary > >> structure in a file (instead of having to Cstr() and save each value as > >> separated strings). > >> > >> Is there a way to do this in Gambas2? > >> > >> Regards > >> > >> Rolf > >> > >> ------------------------------------------------------------------------ > >> ------ > >> > >> _______________________________________________ > >> Gambas-user mailing list > >> Gambas-user at lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > well there is the gb.stetting that is able to save data structure or > > simply that : > > > > > > dim aMyArray as new Integer[] > > > > 'do what you want to fill it > > > > file.save("myfile", aMyArray.Join()) > > > > > > > > to load the array line : > > > > aMyArray=split(file.load("myfile")) > > Ok, but for this function the work is the same: stuff everything into a > string by converting each single element into a string and adding > separators / reading the string back, splitting the elements by their > separators and converting each element into an integer. > > It's C but it's not as fast as it could be. My idea was mainly about speed. > > Rolf > Look at the Read() and Write() methods of the Array classes. Regards, -- Beno?t Minisini From gambas.fr at ...626... Tue May 18 15:06:21 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Tue, 18 May 2010 15:06:21 +0200 Subject: [Gambas-user] Saving integer array into file In-Reply-To: <201005181330.05744.gambas@...1...> References: <4BF27012.2000305@...221...> <4BF27968.5070406@...221...> <201005181330.05744.gambas@...1...> Message-ID: Le 18 mai 2010 13:30, Beno?t Minisini a ?crit : >> Am 18.05.2010 13:09, schrieb Fabien Bodard: >> > 2010/5/18 Rolf-Werner Eilert: >> >> Just had this idea: >> >> >> >> DIM myArray AS NEW Integer[] >> >> >> >> 'code filling myArray with integer values >> >> >> >> File.Save(myArray) >> >> >> >> Well, this won't be possible: File.Save only saves strings. Or is there >> >> another way by somehow copying the integer array into a string and >> >> saving that instead? >> >> >> >> Anyway, this would make you a direct copy of the array's binary >> >> structure in a file (instead of having to Cstr() and save each value as >> >> separated strings). >> >> >> >> Is there a way to do this in Gambas2? >> >> >> >> Regards >> >> >> >> Rolf >> >> >> >> ------------------------------------------------------------------------ >> >> ------ >> >> >> >> _______________________________________________ >> >> Gambas-user mailing list >> >> Gambas-user at lists.sourceforge.net >> >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > >> > well there is the gb.stetting that is able to save data structure or >> > simply that : >> > >> > >> > dim aMyArray as new Integer[] >> > >> > 'do what you want to fill it >> > >> > file.save("myfile", aMyArray.Join()) >> > >> > >> > >> > to load the array line : >> > >> > aMyArray=split(file.load("myfile")) >> >> Ok, but for this function the work is the same: stuff everything into a >> string by converting each single element into a string and adding >> separators / reading the string back, splitting the elements by their >> separators and converting each element into an integer. >> >> It's C but it's not as fast as it could be. My idea was mainly about speed. >> >> Rolf >> > > Look at the Read() and Write() methods of the Array classes. > > Regards, > > -- > Beno?t Minisini Benoit, is there something about that in the help ?.... i don't see anything about a read or a wirte method :/ and what is array.bounds exactly ? (i know i'm late for that) > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From eilert-sprachen at ...221... Tue May 18 15:43:13 2010 From: eilert-sprachen at ...221... (Rolf-Werner Eilert) Date: Tue, 18 May 2010 15:43:13 +0200 Subject: [Gambas-user] Saving integer array into file In-Reply-To: References: <4BF27012.2000305@...221...> <4BF27968.5070406@...221...> <201005181330.05744.gambas@...1...> Message-ID: <4BF29971.3060102@...221...> Am 18.05.2010 15:06, schrieb Fabien Bodard: > Le 18 mai 2010 13:30, Beno?t Minisini a ?crit : >>> Am 18.05.2010 13:09, schrieb Fabien Bodard: >>>> 2010/5/18 Rolf-Werner Eilert: >>>>> Just had this idea: >>>>> >>>>> DIM myArray AS NEW Integer[] >>>>> >>>>> 'code filling myArray with integer values >>>>> >>>>> File.Save(myArray) >>>>> >>>>> Well, this won't be possible: File.Save only saves strings. Or is there >>>>> another way by somehow copying the integer array into a string and >>>>> saving that instead? >>>>> >>>>> Anyway, this would make you a direct copy of the array's binary >>>>> structure in a file (instead of having to Cstr() and save each value as >>>>> separated strings). >>>>> >>>>> Is there a way to do this in Gambas2? >>>>> >>>>> Regards >>>>> >>>>> Rolf >>>>> >>>>> ------------------------------------------------------------------------ >>>>> ------ >>>>> >>>>> _______________________________________________ >>>>> Gambas-user mailing list >>>>> Gambas-user at lists.sourceforge.net >>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>> >>>> well there is the gb.stetting that is able to save data structure or >>>> simply that : >>>> >>>> >>>> dim aMyArray as new Integer[] >>>> >>>> 'do what you want to fill it >>>> >>>> file.save("myfile", aMyArray.Join()) >>>> >>>> >>>> >>>> to load the array line : >>>> >>>> aMyArray=split(file.load("myfile")) >>> >>> Ok, but for this function the work is the same: stuff everything into a >>> string by converting each single element into a string and adding >>> separators / reading the string back, splitting the elements by their >>> separators and converting each element into an integer. >>> >>> It's C but it's not as fast as it could be. My idea was mainly about speed. >>> >>> Rolf >>> >> >> Look at the Read() and Write() methods of the Array classes. >> >> Regards, >> >> -- >> Beno?t Minisini > > Benoit, is there something about that in the help ?.... i don't see > anything about a read or a wirte method :/ I found it: Make DIM myArray as Integer[] and try myArray.Read moving the cursor on Read, press F2 and up comes: Integer[].Read (gb) Syntax SUB Read ( Stream AS Stream [ , Start AS Integer, Length AS Integer ] ) Fills an array by reading the data directly from a stream. Start specifies where the data are stored in the array. By default, data are stored from the beginning. Length is the number of elements that will be read from the file. By default, data are read until the end of the array is reached. There's no example given, so let us invent one: DIM myArray AS Integer[] DIM myFile AS Stream DIM i AS Integer for i = 0 to 100 myArray.Add(i) next myFile = OPEN "foo.file" FOR WRITE myArray.Write(myFile) CLOSE myFile myArray.Clear myFile = Open "foo.file" FOR READ myArray.Read(myFile) CLOSE myFile Would it run this way? Was just a guess... I never used READ and WRITE. It would mean, I could add several such arrays to one stream/file and read them back if I know their numbers of elements, right? Remains one question: do I have to know the number of elements and dimensionate the array before, or does this go by itself? (The question would be: are the dimensions saved to the stream or only the naked data?) From what the help text says, I would guess the latter... > > and what is array.bounds exactly ? (i know i'm late for that) > > Never heard of it. No idea, the help doesn't help me here, either, but you asked Benoit anyway :-) Rolf From eilert-sprachen at ...221... Tue May 18 15:44:15 2010 From: eilert-sprachen at ...221... (Rolf-Werner Eilert) Date: Tue, 18 May 2010 15:44:15 +0200 Subject: [Gambas-user] Saving integer array into file In-Reply-To: <201005181330.05744.gambas@...1...> References: <4BF27012.2000305@...221...> <4BF27968.5070406@...221...> <201005181330.05744.gambas@...1...> Message-ID: <4BF299AF.7070102@...221...> Am 18.05.2010 13:30, schrieb Beno?t Minisini: >> Am 18.05.2010 13:09, schrieb Fabien Bodard: >>> 2010/5/18 Rolf-Werner Eilert: >>>> Just had this idea: >>>> >>>> DIM myArray AS NEW Integer[] >>>> >>>> 'code filling myArray with integer values >>>> >>>> File.Save(myArray) >>>> >>>> Well, this won't be possible: File.Save only saves strings. Or is there >>>> another way by somehow copying the integer array into a string and >>>> saving that instead? >>>> >>>> Anyway, this would make you a direct copy of the array's binary >>>> structure in a file (instead of having to Cstr() and save each value as >>>> separated strings). >>>> >>>> Is there a way to do this in Gambas2? >>>> >>>> Regards >>>> >>>> Rolf >>>> >>>> ------------------------------------------------------------------------ >>>> ------ >>>> >>>> _______________________________________________ >>>> Gambas-user mailing list >>>> Gambas-user at lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>> >>> well there is the gb.stetting that is able to save data structure or >>> simply that : >>> >>> >>> dim aMyArray as new Integer[] >>> >>> 'do what you want to fill it >>> >>> file.save("myfile", aMyArray.Join()) >>> >>> >>> >>> to load the array line : >>> >>> aMyArray=split(file.load("myfile")) >> >> Ok, but for this function the work is the same: stuff everything into a >> string by converting each single element into a string and adding >> separators / reading the string back, splitting the elements by their >> separators and converting each element into an integer. >> >> It's C but it's not as fast as it could be. My idea was mainly about speed. >> >> Rolf >> > > Look at the Read() and Write() methods of the Array classes. > > Regards, > Yes, that was it :-) Thank you, and see what I just wrote to Fabien Rolf From gambas at ...1... Tue May 18 18:03:55 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 18 May 2010 18:03:55 +0200 Subject: [Gambas-user] Saving integer array into file In-Reply-To: References: <4BF27012.2000305@...221...> <201005181330.05744.gambas@...1...> Message-ID: <201005181803.55999.gambas@...1...> > Le 18 mai 2010 13:30, Beno?t Minisini a ?crit : > >> Am 18.05.2010 13:09, schrieb Fabien Bodard: > >> > 2010/5/18 Rolf-Werner Eilert: > >> >> Just had this idea: > >> >> > >> >> DIM myArray AS NEW Integer[] > >> >> > >> >> 'code filling myArray with integer values > >> >> > >> >> File.Save(myArray) > >> >> > >> >> Well, this won't be possible: File.Save only saves strings. Or is > >> >> there another way by somehow copying the integer array into a string > >> >> and saving that instead? > >> >> > >> >> Anyway, this would make you a direct copy of the array's binary > >> >> structure in a file (instead of having to Cstr() and save each value > >> >> as separated strings). > >> >> > >> >> Is there a way to do this in Gambas2? > >> >> > >> >> Regards > >> >> > >> >> Rolf > >> >> > >> >> --------------------------------------------------------------------- > >> >> --- ------ > >> >> > >> >> _______________________________________________ > >> >> Gambas-user mailing list > >> >> Gambas-user at lists.sourceforge.net > >> >> https://lists.sourceforge.net/lists/listinfo/gambas-user > >> > > >> > well there is the gb.stetting that is able to save data structure or > >> > simply that : > >> > > >> > > >> > dim aMyArray as new Integer[] > >> > > >> > 'do what you want to fill it > >> > > >> > file.save("myfile", aMyArray.Join()) > >> > > >> > > >> > > >> > to load the array line : > >> > > >> > aMyArray=split(file.load("myfile")) > >> > >> Ok, but for this function the work is the same: stuff everything into a > >> string by converting each single element into a string and adding > >> separators / reading the string back, splitting the elements by their > >> separators and converting each element into an integer. > >> > >> It's C but it's not as fast as it could be. My idea was mainly about > >> speed. > >> > >> Rolf > > > > Look at the Read() and Write() methods of the Array classes. > > > > Regards, > > > > -- > > Beno?t Minisini > > Benoit, is there something about that in the help ?.... i don't see > anything about a read or a wirte method :/ Yes, for a long time! > > and what is array.bounds exactly ? (i know i'm late for that) > The sizes of the array dimensions. It is useful only if you are at least two dimensions. Otherwise, Length is enough. -- Beno?t Minisini From gambas.fr at ...626... Tue May 18 20:34:11 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Tue, 18 May 2010 20:34:11 +0200 Subject: [Gambas-user] Saving integer array into file In-Reply-To: <201005181803.55999.gambas@...1...> References: <4BF27012.2000305@...221...> <201005181330.05744.gambas@...1...> <201005181803.55999.gambas@...1...> Message-ID: >> Benoit, is there something about that in the help ?.... i don't see >> anything about a read or a wirte method :/ > > Yes, for a long time! I've never have to use that function :)... but if i've known its exixtance before, for sur, i used it. >> >> and what is array.bounds exactly ? (i know i'm late for that) >> > > The sizes of the array dimensions. It is useful only if you are at least two > dimensions. Otherwise, Length is enough. what does it return ... an integer[] ? the help doesn't say that > -- > Beno?t Minisini > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From vuott at ...325... Tue May 18 22:54:55 2010 From: vuott at ...325... (Ru Vuott) Date: Tue, 18 May 2010 13:54:55 -0700 (PDT) Subject: [Gambas-user] Gambas, Midi and Timidity Message-ID: <306794.17609.qm@...2433...> Hello, I'ld like to build a program for playing and handling MIDI data. I have this first problem. I suppose I must use Timidity (as an interface between my program and sound card). How can I send MIDI data to Timidity ? Thanks Paolo From rterry at ...1946... Tue May 18 23:23:00 2010 From: rterry at ...1946... (richard terry) Date: Wed, 19 May 2010 07:23:00 +1000 Subject: [Gambas-user] Feature request In-Reply-To: References: <201005180732.04941.rterry@...1946...> Message-ID: <201005190723.00910.rterry@...1946...> On Tuesday 18 May 2010 21:03:42 Fabien Bodard wrote: > like kopete does ? Don't user Kopete, but something would be great, rather than going to a shell, typing locate filename, seeing it is in .src/dir/ wheverever and then going looking via the IDE. REgard Richard > > Le 17 mai 2010 23:32, richard terry a ?crit : > > I wondered if there was any easy way to find a file (class/form/module) > > in ones code tree. Maybe this feature already exists in gambas3 > > > > As I've hundreds of forms, classes and modules, I've got to the point > > where I occasinally 'mislay' one. > > > > Yes I know I can search my HDD easily with locate, but it would be a nice > > feature to be able to type in a name > jump to that subdir with the file. > > > > Regards > > > > Richard > > > > > > > > ------------------------------------------------------------------------- > >----- > > > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > --------------------------------------------------------------------------- > --- > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From rterry at ...1946... Wed May 19 01:02:05 2010 From: rterry at ...1946... (richard terry) Date: Wed, 19 May 2010 09:02:05 +1000 Subject: [Gambas-user] combo.find case sensitivity Message-ID: <201005190902.05552.rterry@...1946...> Hi List, I wondered if there was a way to over come case sensitivity in the combo.find property, the help dosn't indicate anything. cmbTitle.index = cmbTitle.Find(unmatched_staff[cvwUnmatchedStaff.item.key]!title) eg if Title = "Dr" and my comb o entry = "Dr" then all is well, but if title = "DR", then no match is found. Regards Richard. From gambas at ...1... Wed May 19 01:09:31 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 19 May 2010 01:09:31 +0200 Subject: [Gambas-user] combo.find case sensitivity In-Reply-To: <201005190902.05552.rterry@...1946...> References: <201005190902.05552.rterry@...1946...> Message-ID: <201005190109.31159.gambas@...1...> > Hi List, > > I wondered if there was a way to over come case sensitivity in the > combo.find property, the help dosn't indicate anything. > > cmbTitle.index = > cmbTitle.Find(unmatched_staff[cvwUnmatchedStaff.item.key]!title) > > eg if Title = "Dr" and my comb o entry = "Dr" then all is well, but if > title = "DR", then no match is found. > > Regards > > Richard. > No, you have to do that by yourself (less than ten lines of code). Regards, -- Beno?t Minisini From rterry at ...1946... Wed May 19 08:25:01 2010 From: rterry at ...1946... (richard terry) Date: Wed, 19 May 2010 16:25:01 +1000 Subject: [Gambas-user] combo.find case sensitivity In-Reply-To: <201005190109.31159.gambas@...1...> References: <201005190902.05552.rterry@...1946...> <201005190109.31159.gambas@...1...> Message-ID: <201005191625.01966.rterry@...1946...> On Wednesday 19 May 2010 09:09:31 Beno?t Minisini wrote: > > Hi List, > > > > I wondered if there was a way to over come case sensitivity in the > > combo.find property, the help dosn't indicate anything. > > > > cmbTitle.index = > > cmbTitle.Find(unmatched_staff[cvwUnmatchedStaff.item.key]!title) > > > > eg if Title = "Dr" and my comb o entry = "Dr" then all is well, but if > > title = "DR", then no match is found. > > > > Regards > > > > Richard. > > No, you have to do that by yourself (less than ten lines of code). > > Regards, > I take it that's a hint. Maybe an optional flag for a future release? Regards Richard From joscub68 at ...67... Wed May 19 21:18:59 2010 From: joscub68 at ...67... (Jose Cubillo) Date: Wed, 19 May 2010 13:18:59 -0600 Subject: [Gambas-user] Gambas for windows, how? In-Reply-To: References: , <325768041-1273754767-cardhu_decombobulator_blackberry.rim.net-1883005232-@...2405...>, <4BEC02C6.7000304@...1000...>, <2009826709-1273759169-cardhu_decombobulator_blackberry.rim.net-1272103203-@...2405...>, <4BEC108A.6080406@...1000...> <4BEC1297.9080208@...2015...>, , <1588905289-1273768912-cardhu_decombobulator_blackberry.rim.net-234644523-@...2405...>, <4BEC44C0.5090400@...1000...>, <1273778977.1984.1.camel@...2406...>, Message-ID: Hi, i am Latino, in my bad english. in my work , i has enable run gambas application in Microsoft windows with xming, looking for in http://sourceforge.net/projects/xming. I has run server with Debian, Postgresql and Gambas application. xming can run a one application or make a conection with xdmcp. is easy, if somebody need help, i can make how to step by step. thanks Hola, he tenido que correr aplicaciones de gambas en Microsoft Windows con xming, lo pueden bajar desde http://sourceforge.net/projects/xming. Tengo un servidor corriendo con Debian, Postgresql, Gambas, con xming puedes hacer un acceso directo a una aplicacion y ejecutarla en Windows en una ventana o ejecutar por medio de xdmcp y tener la pantalla de logeo de gdm y todo el escritorio remoto. Si alguien esta interesado, entonces sacare tiempo y hare un manual paso a paso. Gracias. _________________________________________________________________ Almacenamiento ilimitado, m?s cerca de lo que pensabas. Hotmail te 25 GB gratis. Reg?strate ahora http://mail.live.com/ From asherlm at ...626... Thu May 20 00:30:32 2010 From: asherlm at ...626... (Michael Asher) Date: Wed, 19 May 2010 17:30:32 -0500 Subject: [Gambas-user] Embedded XTerm Message-ID: To preface this, I'm not a developer by any stretch of the imagination I'm looking to use the embedder class to embed a xterm into a form. My main purpose for my project is to have something for managing my SSH/telnet/serial sessions from a single application, similar to SecureCRT or Putty. Xterm allows me to specify the WM_CLASS item as it is opened (xterm -class ...). I would like to provide a 'random' class value for each xterm, should I get to the point where I have multiple forms/xterms, etc. I am able to launch the xterm, but the Desktop.FindWindow always provides me with a zero count. Can I use a variable as the "Application as String" portion in Desktop.FindWindow? Below is from the module that is supposed to take the user input and make the SSH or telnet connection. I've included the part that is giving me issues. Public Sub quickConnect_Click() Dim XtermClass As Integer Dim XTermClassStr As String Dim DoEmbedIntArray As Integer[] Dim DoEmbedInt As Integer Randomize 123 ' Not sure I need this, but it provides class name consistency for now. If chooseProtocol.Index = 1 Then XtermClass = Int(Rnd(10000, 100000)) XTermClassStr = Str(XtermClass) Debug XtermClass Debug XTermClassStr Shell "xterm -class " & XtermClass & " -e ssh " & ipAddress.Text & " -p " & choosePort.Text ' Provide XTERM with a CLASS Value so that we can then find it and embed into the application. Wait 1 Me.Delete DoEmbedIntArray = Desktop.FindWindow("", XTermClassStr, "") Debug DoEmbedIntArray.Count Endif If chooseProtocol.Index = 2 Then Shell "xterm -e telnet " & ipAddress.Text & ":" & choosePort.Text Me.Delete Endif End I appreciate any pointers or help you can provide. Thanks! -Michael From leonardo at ...1237... Thu May 20 10:20:31 2010 From: leonardo at ...1237... (Leonardo Miliani) Date: Thu, 20 May 2010 10:20:31 +0200 Subject: [Gambas-user] Gambas3: error with ODBC In-Reply-To: <201005152313.55207.gambas@...1...> References: <1273790406.9887.2.camel@"hp_host"> <201005152313.55207.gambas@...1...> Message-ID: <1274343631.3205.0.camel@"hp_host"> Il giorno sab, 15/05/2010 alle 23.13 +0200, Beno?t Minisini ha scritto: > > Gambas 3, 64 bit version. > > During the connection setup with an ODBC database everything goes right, > > but when I try to exec a query with Connectin.Exec, Gambas crashes with > > #11 error. > > Can you get a backtrace with gdb? And better get an output of running your > project inside valgrind? > Program received signal SIGSEGV, Segmentation fault. 0x00007ffff722cdfd in free () from /lib/libc.so.6 -- Leonardo Miliani www.leonardomiliani.com Webmaster e co-fondatore di www.gambas-it.org Il portale di riferimento per i programmatori Gambas italiani From gambas at ...1... Fri May 21 13:23:37 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Fri, 21 May 2010 13:23:37 +0200 Subject: [Gambas-user] Gambas3: error with ODBC In-Reply-To: <1274343631.3205.0.camel@"hp_host"> References: <1273790406.9887.2.camel@"hp_host"> <201005152313.55207.gambas@...1...> <1274343631.3205.0.camel@"hp_host"> Message-ID: <201005211323.37877.gambas@...1...> > Il giorno sab, 15/05/2010 alle 23.13 +0200, Beno?t Minisini ha scritto: > > > Gambas 3, 64 bit version. > > > During the connection setup with an ODBC database everything goes > > > right, but when I try to exec a query with Connectin.Exec, Gambas > > > crashes with #11 error. > > > > Can you get a backtrace with gdb? And better get an output of running > > your project inside valgrind? > > Program received signal SIGSEGV, Segmentation fault. > 0x00007ffff722cdfd in free () from /lib/libc.so.6 That is not very useful! Read the "Reporting a problem" page on the web site to see how to get a backtrage. Regards, -- Beno?t Minisini From gambas at ...1... Fri May 21 13:34:38 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Fri, 21 May 2010 13:34:38 +0200 Subject: [Gambas-user] Gambas3: error with ODBC In-Reply-To: <201005211323.37877.gambas@...1...> References: <1273790406.9887.2.camel@"hp_host"> <1274343631.3205.0.camel@"hp_host"> <201005211323.37877.gambas@...1...> Message-ID: <201005211334.38932.gambas@...1...> > > Il giorno sab, 15/05/2010 alle 23.13 +0200, Beno?t Minisini ha scritto: > > > > Gambas 3, 64 bit version. > > > > During the connection setup with an ODBC database everything goes > > > > right, but when I try to exec a query with Connectin.Exec, Gambas > > > > crashes with #11 error. > > > > > > Can you get a backtrace with gdb? And better get an output of running > > > your project inside valgrind? > > > > Program received signal SIGSEGV, Segmentation fault. > > 0x00007ffff722cdfd in free () from /lib/libc.so.6 > > That is not very useful! > > Read the "Reporting a problem" page on the web site to see how to get a > backtrage. > > Regards, "backtrage"? Backtrace! -- Beno?t Minisini From vuott at ...325... Sun May 23 23:57:22 2010 From: vuott at ...325... (Ru Vuott) Date: Sun, 23 May 2010 14:57:22 -0700 (PDT) Subject: [Gambas-user] Gambas & API of ALSA Message-ID: <982106.58400.qm@...2434...> Hello, I'ld like to make a midi sequencer by using the API of ALSA. The question is: in Gambas can I call the API of ALSA ? In positive case, how I can do it ? From gambas at ...1... Mon May 24 00:18:59 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 24 May 2010 00:18:59 +0200 Subject: [Gambas-user] Gambas & API of ALSA In-Reply-To: <982106.58400.qm@...2434...> References: <982106.58400.qm@...2434...> Message-ID: <201005240018.59728.gambas@...1...> > Hello, > > I'ld like to make a midi sequencer by using the API of ALSA. > The question is: in Gambas can I call the API of ALSA ? In positive case, > how I can do it ? > Not directly, but you can use EXTERN to call functions directly in the ALSA library. But why do you need ALSA to write a midi sequencer? Can't you just use the midi port device file? -- Beno?t Minisini From vuott at ...325... Mon May 24 13:44:53 2010 From: vuott at ...325... (Ru Vuott) Date: Mon, 24 May 2010 04:44:53 -0700 (PDT) Subject: [Gambas-user] Gambas & API of ALSA In-Reply-To: <201005240018.59728.gambas@...1...> Message-ID: <468386.25378.qm@...2435...> Hello, you said I can use not ALSA, but use the "midi port device file". Well, the new questions are: 1) must I to send the midi-values to /dev/midi for playing midi ? Is that enough ? 2) on /dev I see a name port: "sequencer". Is this the port I must use ? In short, ...what's name of port that I can-must use for my project ? Thanks --- Lun 24/5/10, Beno?t Minisini ha scritto: > Da: Beno?t Minisini > Oggetto: Re: [Gambas-user] Gambas & API of ALSA > A: "mailing list for gambas users" > Data: Luned? 24 maggio 2010, 00:18 > > Hello, > > > > I'ld like to make a midi sequencer by using the API of > ALSA. > > The question is: in Gambas can I call the API of ALSA > ? In positive case, > > how I can do it ? > > > > Not directly, but you can use EXTERN to call functions > directly in the ALSA > library. > > But why do you need ALSA to write a midi sequencer? Can't > you just use the > midi port device file? > > -- > Beno?t Minisini > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From lordheavym at ...626... Mon May 24 13:59:45 2010 From: lordheavym at ...626... (Laurent Carlier) Date: Mon, 24 May 2010 13:59:45 +0200 Subject: [Gambas-user] Gambas & API of ALSA In-Reply-To: <468386.25378.qm@...2435...> References: <468386.25378.qm@...2435...> Message-ID: <201005241359.46077.lordheavym@...626...> Le lundi 24 mai 2010 13:44:53, Ru Vuott a ?crit : > Hello, > > you said I can use not ALSA, but use the "midi port device file". Well, the > new questions are: > > 1) must I to send the midi-values to /dev/midi for playing midi ? Is that > enough ? > > 2) on /dev I see a name port: "sequencer". Is this the port I must use ? > In short, ...what's name of port that I can-must use for my project ? > > Thanks > I guess you can find some answers here, thanks google! https://ccrma.stanford.edu/~craig/articles/linuxmidi/ From marcobra.ubuntu at ...626... Mon May 24 14:07:27 2010 From: marcobra.ubuntu at ...626... (marco bra) Date: Mon, 24 May 2010 14:07:27 +0200 Subject: [Gambas-user] smtp mail with gambas 2.20 sent mail body message and/or attached file not sowhon/opened by client Message-ID: Hi all, with with gambas 2.20 cannot create useful mail body message if i have also attach a file to a message all work fine if i sent only the body message or the attached file. I supposed there must be a bug about this... Do you have a working full tested example code to play with... ? Many thanks Marco -- Linux Infinite Freedom From karl.reinl at ...9... Mon May 24 14:24:59 2010 From: karl.reinl at ...9... (Karl Reinl) Date: Mon, 24 May 2010 14:24:59 +0200 Subject: [Gambas-user] not very important but I do not understand why Message-ID: <1274703899.6879.10.camel@...40...> Salut, I have that module modBaseCalcs which includes 2 public functions. You can call modBaseCalcs.BussUndBettag(Jahr) or modBaseCalcs.Ostersonntag(Jahr), from other modules,forms. That works like expected, but the "automatic completion window" shows only "Ostersonntag" This happens on gambas2 -- Amicalement Charlie [OperatingSystem] OperatingSystem=Linux KernelRelease=2.6.24-27-generic DistributionVendor=Ubuntu DistributionRelease="Ubuntu 8.04.4 LTS" [System] CPUArchitecture=i686 TotalRam=506932 kB [Gambas] Gambas1=gbx-1.0.17 Gambas1Path=/usr/bin/gbx Gambas2=2.20.1 Revision: 2771 Gambas2Path=/usr/local/bin/gbx2 Gambas3=2.99.0 Revision: 2735 (can't compile actually) Gambas3Path=/usr/local/bin/gbx3 -------------- next part -------------- A non-text attachment was scrubbed... Name: german-moveable-feasts-0.0.4.tar.gz Type: application/x-compressed-tar Size: 16022 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Bildschirmfoto-german-moveable-feasts - Gambas 2.png Type: image/png Size: 78868 bytes Desc: not available URL: From leonardo at ...1237... Mon May 24 15:07:36 2010 From: leonardo at ...1237... (Leonardo Miliani) Date: Mon, 24 May 2010 15:07:36 +0200 Subject: [Gambas-user] Gambas3: error with ODBC In-Reply-To: <201005211323.37877.gambas@...1...> References: <1273790406.9887.2.camel@"hp_host"> <201005152313.55207.gambas@...1...> <1274343631.3205.0.camel@"hp_host"> <201005211323.37877.gambas@...1...> Message-ID: <1274706456.3191.0.camel@"hp_host"> Il giorno ven, 21/05/2010 alle 13.23 +0200, Beno?t Minisini ha scritto: > > Il giorno sab, 15/05/2010 alle 23.13 +0200, Beno?t Minisini ha scritto: > > > > Gambas 3, 64 bit version. > > > > During the connection setup with an ODBC database everything goes > > > > right, but when I try to exec a query with Connectin.Exec, Gambas > > > > crashes with #11 error. > > > > > > Can you get a backtrace with gdb? And better get an output of running > > > your project inside valgrind? > > > > Program received signal SIGSEGV, Segmentation fault. > > 0x00007ffff722cdfd in free () from /lib/libc.so.6 > > That is not very useful! > > Read the "Reporting a problem" page on the web site to see how to get a > backtrage. > > Regards, > Sorry but I'm an intermediate.... I am not the person who has the error. I'm making the report so I write what I receive ;-) Here is the complete (I hope...) report: GNU gdb (GDB) 7.1-ubuntu Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". For bug reporting instructions, please see: ... Reading symbols from /usr/local/bin/gbx3...done. (gdb) set args -p (gdb) run Starting program: /usr/local/bin/gbx3 -p [Thread debugging using libthread_db enabled] QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: Nessun file o directory [New Thread 0x7fffe9c98710 (LWP 1859)] QFileSystemWatcher: failed to add paths: /home/paolo/.config/ibus/bus Bus::open: Can not get ibus-daemon's address. IBusInputContext::createInputContext: no connection to ibus-daemon Program received signal SIGSEGV, Segmentation fault. 0x00007ffff722cdfd in free () from /lib/libc.so.6 (gdb) bt #0 0x00007ffff722cdfd in free () from /lib/libc.so.6 #1 0x0000000000419187 in GB_Free (addr=0x7fffffffc4ec) at gbx_api.c:1444 #2 0x00007ffff12cefba in my_free (desc=0x9a4510, db=0x9a44c8) at main.c:117 #3 open_database (desc=0x9a4510, db=0x9a44c8) at main.c:532 #4 0x00007ffff14d75bc in DB_Open (desc=0x9a4510, driver=0x9a44c0, db=0x9a44c8) at main.c:209 #5 0x00007ffff14d7b45 in open_connection (_object=0x9a44b0) at CConnection.c:81 #6 check_opened (_object=0x9a44b0) at CConnection.c:89 #7 0x00007ffff14d826d in CCONNECTION_exec (_object=0x9a44b0, _param=0x651db0) at CConnection.c:432 #8 0x0000000000407d7d in EXEC_call_native (exec=0xa56370, object=0x9a451000a08230, type=140737239627200, param=0x422f0) at gbx_exec.c:979 #9 0x00000000004089cd in EXEC_native () at gbx_exec.c:1185 #10 0x0000000000429fc1 in EXEC_loop () at gbx_exec_loop.c:982 #11 0x0000000000409521 in EXEC_function_loop () at gbx_exec.c:795 #12 0x00000000004098db in EXEC_function_real () at gbx_exec.c:782 #13 0x0000000000419839 in raise_event (observer=, object=, func_id=, nparam=271088) at gbx_api.c:483 #14 0x0000000000419fc2 in GB_Raise (object=0x96c9b0, event_id=, nparam=0) at gbx_api.c:585 #15 0x00007ffff6d4400d in CButton::clicked (this=) at CButton.cpp:692 #16 0x00007ffff6d43cf2 in CButton::qt_metacall (this=0x7ffff6fa5910, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=) at CButton_moc.cpp:173 #17 0x00007ffff5082e3f in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4 #18 0x00007ffff5bde5f2 in QAbstractButton::clicked(bool) () from /usr/lib/libQtGui.so.4 ---Type to continue, or q to quit--- #19 0x00007ffff58f886b in ?? () from /usr/lib/libQtGui.so.4 #20 0x00007ffff58f970b in ?? () from /usr/lib/libQtGui.so.4 #21 0x00007ffff58f997c in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/libQtGui.so.4 #22 0x00007ffff5599582 in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4 #23 0x00007ffff554322c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4 #24 0x00007ffff5549ecb in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4 #25 0x00007ffff507006c in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4 #26 0x00007ffff55490ae in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer&, bool) () from /usr/lib/libQtGui.so.4 #27 0x00007ffff55c8f65 in ?? () from /usr/lib/libQtGui.so.4 #28 0x00007ffff55c78ac in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/libQtGui.so.4 #29 0x00007ffff55f4199 in ?? () from /usr/lib/libQtGui.so.4 #30 0x00007ffff506e992 in QEventLoop::processEvents(QFlags) () from /usr/lib/libQtCore.so.4 #31 0x00007ffff506ed6c in QEventLoop::exec(QFlags) () from /usr/lib/libQtCore.so.4 #32 0x00007ffff5072aab in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4 #33 0x00007ffff6d3a1cc in hook_loop () at main.cpp:673 #34 0x000000000041ee78 in main (argc=1, argv=) at gbx.c:356 (gdb) -- Leonardo Miliani www.leonardomiliani.com Webmaster e co-fondatore di www.gambas-it.org Il portale di riferimento per i programmatori Gambas italiani From gambas at ...1... Mon May 24 15:20:40 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 24 May 2010 15:20:40 +0200 Subject: [Gambas-user] Gambas3: error with ODBC In-Reply-To: <1274706456.3191.0.camel@"hp_host"> References: <1273790406.9887.2.camel@"hp_host"> <201005211323.37877.gambas@...1...> <1274706456.3191.0.camel@"hp_host"> Message-ID: <201005241520.40268.gambas@...1...> > Il giorno ven, 21/05/2010 alle 13.23 +0200, Beno?t Minisini ha scritto: > > > Il giorno sab, 15/05/2010 alle 23.13 +0200, Beno?t Minisini ha scritto: > > > > > Gambas 3, 64 bit version. > > > > > During the connection setup with an ODBC database everything goes > > > > > right, but when I try to exec a query with Connectin.Exec, Gambas > > > > > crashes with #11 error. > > > > > > > > Can you get a backtrace with gdb? And better get an output of running > > > > your project inside valgrind? > > > > > > Program received signal SIGSEGV, Segmentation fault. > > > 0x00007ffff722cdfd in free () from /lib/libc.so.6 > > > > That is not very useful! > > > > Read the "Reporting a problem" page on the web site to see how to get a > > backtrage. > > > > Regards, > > Sorry but I'm an intermediate.... I am not the person who has the error. > I'm making the report so I write what I receive ;-) > > Here is the complete (I hope...) report: > GNU gdb (GDB) 7.1-ubuntu > Copyright (C) 2010 Free Software Foundation, Inc. > License GPLv3+: GNU GPL version 3 or later > > This is free software: you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. Type "show > copying" > and "show warranty" for details. > This GDB was configured as "x86_64-linux-gnu". > For bug reporting instructions, please see: > ... > Reading symbols from /usr/local/bin/gbx3...done. > (gdb) set args -p > (gdb) run > Starting program: /usr/local/bin/gbx3 -p > [Thread debugging using libthread_db enabled] > QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: > Nessun file o directory > [New Thread 0x7fffe9c98710 (LWP 1859)] > QFileSystemWatcher: failed to add paths: /home/paolo/.config/ibus/bus > Bus::open: Can not get ibus-daemon's address. > IBusInputContext::createInputContext: no connection to ibus-daemon > > Program received signal SIGSEGV, Segmentation fault. > 0x00007ffff722cdfd in free () from /lib/libc.so.6 > (gdb) bt > #0 0x00007ffff722cdfd in free () from /lib/libc.so.6 > #1 0x0000000000419187 in GB_Free (addr=0x7fffffffc4ec) at > gbx_api.c:1444 > #2 0x00007ffff12cefba in my_free (desc=0x9a4510, db=0x9a44c8) at > main.c:117 > #3 open_database (desc=0x9a4510, db=0x9a44c8) at main.c:532 > #4 0x00007ffff14d75bc in DB_Open (desc=0x9a4510, driver=0x9a44c0, > db=0x9a44c8) > at main.c:209 > #5 0x00007ffff14d7b45 in open_connection (_object=0x9a44b0) > at CConnection.c:81 > #6 check_opened (_object=0x9a44b0) at CConnection.c:89 > #7 0x00007ffff14d826d in CCONNECTION_exec (_object=0x9a44b0, > _param=0x651db0) > at CConnection.c:432 > #8 0x0000000000407d7d in EXEC_call_native (exec=0xa56370, > object=0x9a451000a08230, type=140737239627200, param=0x422f0) > at gbx_exec.c:979 > #9 0x00000000004089cd in EXEC_native () at gbx_exec.c:1185 > #10 0x0000000000429fc1 in EXEC_loop () at gbx_exec_loop.c:982 > #11 0x0000000000409521 in EXEC_function_loop () at gbx_exec.c:795 > #12 0x00000000004098db in EXEC_function_real () at gbx_exec.c:782 > #13 0x0000000000419839 in raise_event (observer=, > object=, func_id=, > nparam=271088) > at gbx_api.c:483 > #14 0x0000000000419fc2 in GB_Raise (object=0x96c9b0, > event_id=, nparam=0) at gbx_api.c:585 > #15 0x00007ffff6d4400d in CButton::clicked (this=) > at CButton.cpp:692 > #16 0x00007ffff6d43cf2 in CButton::qt_metacall (this=0x7ffff6fa5910, > _c=QMetaObject::InvokeMetaMethod, _id=0, _a=) > at CButton_moc.cpp:173 > #17 0x00007ffff5082e3f in QMetaObject::activate(QObject*, QMetaObject > const*, int, void**) () from /usr/lib/libQtCore.so.4 > #18 0x00007ffff5bde5f2 in QAbstractButton::clicked(bool) () > from /usr/lib/libQtGui.so.4 > ---Type to continue, or q to quit--- > #19 0x00007ffff58f886b in ?? () from /usr/lib/libQtGui.so.4 > #20 0x00007ffff58f970b in ?? () from /usr/lib/libQtGui.so.4 > #21 0x00007ffff58f997c in > QAbstractButton::mouseReleaseEvent(QMouseEvent*) () > from /usr/lib/libQtGui.so.4 > #22 0x00007ffff5599582 in QWidget::event(QEvent*) () > from /usr/lib/libQtGui.so.4 > #23 0x00007ffff554322c in QApplicationPrivate::notify_helper(QObject*, > QEvent*) > () from /usr/lib/libQtGui.so.4 > #24 0x00007ffff5549ecb in QApplication::notify(QObject*, QEvent*) () > from /usr/lib/libQtGui.so.4 > #25 0x00007ffff507006c in QCoreApplication::notifyInternal(QObject*, > QEvent*) > () from /usr/lib/libQtCore.so.4 > #26 0x00007ffff55490ae in QApplicationPrivate::sendMouseEvent(QWidget*, > QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer&, bool) > () > from /usr/lib/libQtGui.so.4 > #27 0x00007ffff55c8f65 in ?? () from /usr/lib/libQtGui.so.4 > #28 0x00007ffff55c78ac in QApplication::x11ProcessEvent(_XEvent*) () > from /usr/lib/libQtGui.so.4 > #29 0x00007ffff55f4199 in ?? () from /usr/lib/libQtGui.so.4 > #30 0x00007ffff506e992 in > QEventLoop::processEvents(QFlags) () > from /usr/lib/libQtCore.so.4 > #31 0x00007ffff506ed6c in > QEventLoop::exec(QFlags) () > from /usr/lib/libQtCore.so.4 > #32 0x00007ffff5072aab in QCoreApplication::exec() () > from /usr/lib/libQtCore.so.4 > #33 0x00007ffff6d3a1cc in hook_loop () at main.cpp:673 > #34 0x000000000041ee78 in main (argc=1, argv=) > at gbx.c:356 > (gdb) The database could not be opened, and the crash actually occurs while releasing an ODBC handle before returning the error. At the moment, I don't know why releasing the handle crashes: I don't know ODBC and didn't write that code. I need the full project source code: I need to know what database code is executed, in order, to see what has been executed because the offended Exec() call. Regards, -- Beno?t Minisini From jussi.lahtinen at ...626... Mon May 24 16:36:22 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Mon, 24 May 2010 17:36:22 +0300 Subject: [Gambas-user] not very important but I do not understand why In-Reply-To: <1274703899.6879.10.camel@...40...> References: <1274703899.6879.10.camel@...40...> Message-ID: Way to reproduce bug on Gambas 3 rev 2945 @ Ubuntu 10.04 64bit; 1. Create class. 2. Add two public variables to it, and do NOT press enter after last line of code (Public VarName2 as Something). Auto completion works with VarName2 only if you have pressed enter after last line, otherwise VarName1 is only showing. Jussi On Mon, May 24, 2010 at 15:24, Karl Reinl wrote: > Salut, > > I have that module modBaseCalcs which includes 2 public functions. > You can call modBaseCalcs.BussUndBettag(Jahr) or > modBaseCalcs.Ostersonntag(Jahr), from other modules,forms. > > That works like expected, but the "automatic completion window" shows > only "Ostersonntag" > > This happens on gambas2 > > -- > Amicalement > Charlie > > [OperatingSystem] > OperatingSystem=Linux > KernelRelease=2.6.24-27-generic > DistributionVendor=Ubuntu > DistributionRelease="Ubuntu 8.04.4 LTS" > > [System] > CPUArchitecture=i686 > TotalRam=506932 kB > > [Gambas] > Gambas1=gbx-1.0.17 > Gambas1Path=/usr/bin/gbx > > Gambas2=2.20.1 ? ? ? ? ? ? ? ?Revision: ?2771 > Gambas2Path=/usr/local/bin/gbx2 > > Gambas3=2.99.0 ? ? ? ? ? ? ? ?Revision: 2735 (can't compile actually) > Gambas3Path=/usr/local/bin/gbx3 > > ------------------------------------------------------------------------------ > > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > From Karl.Reinl at ...2345... Mon May 24 17:31:14 2010 From: Karl.Reinl at ...2345... (Charlie Reinl) Date: Mon, 24 May 2010 17:31:14 +0200 Subject: [Gambas-user] not very important but I do not understand why In-Reply-To: References: <1274703899.6879.10.camel@...40...> Message-ID: <1274715074.9300.7.camel@...40...> Salut, found additional: - when I move the function BussUndBettag to first function in the file, BussUndBettag is the only in Auto completion. - set a dummy function between Ostersonntag and BussUndBettag and I saw both, but not the one in the middle. - when I move the dummy to the end, I see only the first function. Amicalement Charlie Am Montag, den 24.05.2010, 17:36 +0300 schrieb Jussi Lahtinen: > Way to reproduce bug on Gambas 3 rev 2945 @ Ubuntu 10.04 64bit; > > 1. Create class. > 2. Add two public variables to it, and do NOT press enter after last > line of code (Public VarName2 as Something). > > Auto completion works with VarName2 only if you have pressed enter > after last line, otherwise VarName1 is only showing. > > Jussi > > > On Mon, May 24, 2010 at 15:24, Karl Reinl wrote: > > Salut, > > > > I have that module modBaseCalcs which includes 2 public functions. > > You can call modBaseCalcs.BussUndBettag(Jahr) or > > modBaseCalcs.Ostersonntag(Jahr), from other modules,forms. > > > > That works like expected, but the "automatic completion window" shows > > only "Ostersonntag" > > > > This happens on gambas2 > > > > -- > > Amicalement > > Charlie > > > > [OperatingSystem] > > OperatingSystem=Linux > > KernelRelease=2.6.24-27-generic > > DistributionVendor=Ubuntu > > DistributionRelease="Ubuntu 8.04.4 LTS" > > > > [System] > > CPUArchitecture=i686 > > TotalRam=506932 kB > > > > [Gambas] > > Gambas1=gbx-1.0.17 > > Gambas1Path=/usr/bin/gbx > > > > Gambas2=2.20.1 Revision: 2771 > > Gambas2Path=/usr/local/bin/gbx2 > > > > Gambas3=2.99.0 Revision: 2735 (can't compile actually) > > Gambas3Path=/usr/local/bin/gbx3 > > > > ------------------------------------------------------------------------------ > > > > > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From Karl.Reinl at ...2345... Mon May 24 17:44:10 2010 From: Karl.Reinl at ...2345... (Charlie Reinl) Date: Mon, 24 May 2010 17:44:10 +0200 Subject: [Gambas-user] SOLVED Re: not very important but I do not understand why In-Reply-To: <1274715074.9300.7.camel@...40...> References: <1274703899.6879.10.camel@...40...> <1274715074.9300.7.camel@...40...> Message-ID: <1274715850.9300.19.camel@...40...> Salut, playing around a bit more, I found out/saw the disturber. The "FUNCTION" behind END (that closes the function), that works well in gambas3, don't throw an error on gambas2 but is disturbing the Auto completion Amicalement Charlie Am Montag, den 24.05.2010, 17:31 +0200 schrieb Charlie Reinl: > Salut, > > found additional: > - when I move the function BussUndBettag to first function in the file, > BussUndBettag is the only in Auto completion. > > - set a dummy function between Ostersonntag and BussUndBettag and I saw > both, but not the one in the middle. > > - when I move the dummy to the end, I see only the first function. > > Amicalement > Charlie > > Am Montag, den 24.05.2010, 17:36 +0300 schrieb Jussi Lahtinen: > > Way to reproduce bug on Gambas 3 rev 2945 @ Ubuntu 10.04 64bit; > > > > 1. Create class. > > 2. Add two public variables to it, and do NOT press enter after last > > line of code (Public VarName2 as Something). > > > > Auto completion works with VarName2 only if you have pressed enter > > after last line, otherwise VarName1 is only showing. > > > > Jussi > > > > > > On Mon, May 24, 2010 at 15:24, Karl Reinl wrote: > > > Salut, > > > > > > I have that module modBaseCalcs which includes 2 public functions. > > > You can call modBaseCalcs.BussUndBettag(Jahr) or > > > modBaseCalcs.Ostersonntag(Jahr), from other modules,forms. > > > > > > That works like expected, but the "automatic completion window" shows > > > only "Ostersonntag" > > > > > > This happens on gambas2 > > > > > > -- > > > Amicalement > > > Charlie > > > > > > [OperatingSystem] > > > OperatingSystem=Linux > > > KernelRelease=2.6.24-27-generic > > > DistributionVendor=Ubuntu > > > DistributionRelease="Ubuntu 8.04.4 LTS" > > > > > > [System] > > > CPUArchitecture=i686 > > > TotalRam=506932 kB > > > > > > [Gambas] > > > Gambas1=gbx-1.0.17 > > > Gambas1Path=/usr/bin/gbx > > > > > > Gambas2=2.20.1 Revision: 2771 > > > Gambas2Path=/usr/local/bin/gbx2 > > > > > > Gambas3=2.99.0 Revision: 2735 (can't compile actually) > > > Gambas3Path=/usr/local/bin/gbx3 From vuott at ...325... Mon May 24 19:15:57 2010 From: vuott at ...325... (Ru Vuott) Date: Mon, 24 May 2010 10:15:57 -0700 (PDT) Subject: [Gambas-user] Gambas & API of ALSA In-Reply-To: <201005241359.46077.lordheavym@...626...> Message-ID: <502232.45755.qm@...2433...> Thank you very much. Now the problem is how I can use those information with Gambas !!! :-( Bye Paolo --- Lun 24/5/10, Laurent Carlier ha scritto: > Da: Laurent Carlier > Oggetto: Re: [Gambas-user] Gambas & API of ALSA > A: "mailing list for gambas users" > Data: Luned? 24 maggio 2010, 13:59 > Le lundi 24 mai 2010 13:44:53, Ru > Vuott a ?crit : > > Hello, > > > > you said I can use not ALSA, but use the "midi port > device file". Well, the > > new questions are: > > > > 1) must I to send the midi-values to? /dev/midi > for playing midi ? Is that > > enough ? > > > > 2) on? /dev I see a name port: "sequencer". Is > this the port I must use ? > > In short, ...what's name of port that I can-must use > for my project ? > > > > Thanks > > > > I guess you can find some answers here, thanks google! > > https://ccrma.stanford.edu/~craig/articles/linuxmidi/ > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From jamarilla at ...626... Mon May 24 23:19:48 2010 From: jamarilla at ...626... (Jorge Amarilla) Date: Mon, 24 May 2010 17:19:48 -0400 Subject: [Gambas-user] DataSource component - Is it works with postgresql's schemas? - Gambas2 Message-ID: I wish to know, if the DataSource component works with postgresql's schema, because I try to use it and don't work. I modificated DataBase Example, changed in the DataSource2 property, table : color => test.color, test is the schema's name and in the other DataSource1 I changed Table :test => test.test. I get this error => Unknown table test.color Regards Jorge Amarilla From doriano.blengino at ...1909... Tue May 25 09:36:46 2010 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Tue, 25 May 2010 09:36:46 +0200 Subject: [Gambas-user] Gambas & API of ALSA In-Reply-To: <502232.45755.qm@...2433...> References: <502232.45755.qm@...2433...> Message-ID: <4BFB7E0E.1000803@...1909...> Ru Vuott ha scritto: > Thank you very much. > > Now the problem is how I can use those information with Gambas !!! :-( > I would interested too in writing a midi librarian for my keyboard, but leaved this idea behind because I am too busy these days. I wrote a working one under windows, but now I would need a linux version. So, if you succeed in doing something, let me know. If I well understand, you want to send data to a midi device. It seems that you can do it in two ways - using the filesystem, or using the alsa library. In the documentation from: >> I guess you can find some answers here, thanks google! >> >> https://ccrma.stanford.edu/~craig/articles/linuxmidi/ >> there are several C sources, which can be translated more or less to gambas. The simplest of them is: int main(void) { char* device = "/dev/midi" ; unsigned char data[3] = {0x90, 60, 127}; // step 1: open the OSS device for writing int fd = open(device, O_WRONLY, 0); if (fd < 0) { printf("Error: cannot open %s\n", device); exit(1); } // step 2: write the MIDI information to the OSS device write(fd, data, sizeof(data)); // step 3: (optional) close the OSS device close(fd); return 0; } This code (output/method1.c) does something very simple - it write three bytes to the file /dev/midi. You can try from console using something like: cat myfile >/dev/midi where "myfile" has a suitable content, like 0x90, 60, 127, which in gambas translate to &h90, 60, 127. If you only want to send out some midi data, this approach seems to be effective and easy: just open a file for output, and write some bytes to it (you must know what to write - this is a different problem). If you want to make your device play, you will have to output several "0x90 0xXX 0xXX" (note on event) followed by "0x80 0xXX 0xXX"; accurate timing will be an issue. The device /dev/sequencer does similar things, but is more intelligent and can do good timing. Alternatively, you can use a library like alsa. You must use "External function declaration" in gambas, and you will have access to the power of alsa. This is not easy, but possible; in this case, you must know a little the C language. To summarize, think at what you want to do and choose one of the three methods: /dev/midi is poor and simple; /dev/sequencer is more complicated but still easy in gambas; using alsa (OSS is older) is the way to go if you want to do a complicated but powerful program. Let me know if you have more doubts. I have no time to write a program myself, but I can find some time to give you some hint. Please specify more precisely what you want to do. Regards, Doriano From vuott at ...325... Tue May 25 09:55:06 2010 From: vuott at ...325... (Ru Vuott) Date: Tue, 25 May 2010 07:55:06 +0000 (GMT) Subject: [Gambas-user] Gambas & API of ALSA In-Reply-To: <4BFB7E0E.1000803@...1909...> Message-ID: <171241.5563.qm@...2436...> Ciao, da quel che vedo sei italiano, e ti scrivo nella nostra comune lingua. Ti ringrazio MOLTISSIMO del tuo suggerimento. Gli ho dato ora una lettura molto veloce, ma mi riservo di leggere con maggior attenzione oggi pomeriggio. Avevo trovato qualche esempio, appunto, (c'? anche un sito in italiano relativo alla programmazione Midi in Linux) per? gli esempi sono in linguaggio C. Ti ringrazio per la tua disponibilit? ad offrirmi aiuto, se sar? proprio necessario mi permetter? di contattarti per fugare gli eventuali dubbi. Ancora grazie molte. Ciao Paolo --- Mar 25/5/10, Doriano Blengino ha scritto: > Da: Doriano Blengino > Oggetto: Re: [Gambas-user] Gambas & API of ALSA > A: "mailing list for gambas users" > Data: Marted? 25 maggio 2010, 09:36 > Ru Vuott ha scritto: > > Thank you very much. > > > > Now the problem is how I can use those information > with Gambas !!! :-( > >??? > I would interested too in writing a midi librarian for my > keyboard, but > leaved this idea behind because I am too busy these days. I > wrote a > working one under windows, but now I would need a linux > version. So, if > you succeed in doing something, let me know. > > If I well understand, you want to send data to a midi > device. It seems > that you can do it in two ways - using the filesystem, or > using the alsa > library. > > In the documentation from: > > >> I guess you can find some answers here, thanks > google! > >> > >> https://ccrma.stanford.edu/~craig/articles/linuxmidi/ > >>? ??? > there are several C sources, which can be translated more > or less to > gambas. The simplest of them is: > > ? ? int main(void) { > ? ? ???char* device =? > "/dev/midi" ; > ? ? ???unsigned char data[3] = > {0x90, 60, 127}; > > ? ? ???// step 1: open the OSS > device for writing > ? ? ???int fd = open(device, > O_WRONLY, 0); > ? ? ???if (fd < 0) { > ? ? ? ? ? printf("Error: cannot > open %s\n", device); > ? ? ? ? ? exit(1); > ? ? ???} > > ? ? ???// step 2: write the MIDI > information to the OSS device > ? ? ???write(fd, data, > sizeof(data)); > > ? ? ???// step 3: (optional) close > the OSS device > ? ? ???close(fd); > > ? ? ???return 0; > ? ? } > > This code (output/method1.c) does something very simple - > it write three > bytes to the file /dev/midi. You can try from console using > something like: > ? ? cat myfile >/dev/midi > where "myfile" has a suitable content, like 0x90, 60, 127, > which in > gambas translate to &h90, 60, 127. > > If you only want to send out some midi data, this approach > seems to be > effective and easy: just open a file for output, and write > some bytes to > it (you must know what to write - this is a different > problem). If you > want to make your device play, you will have to output > several "0x90 > 0xXX 0xXX" (note on event) followed by "0x80 0xXX 0xXX"; > accurate timing > will be an issue. > > The device /dev/sequencer does similar things, but is more > intelligent > and can do good timing. > > Alternatively, you can use a library like alsa. You must > use "External > function declaration" in gambas, and you will have access > to the power > of alsa. This is not easy, but possible; in this case, you > must know a > little the C language. > > To summarize, think at what you want to do and choose one > of the three > methods: /dev/midi is poor and simple; /dev/sequencer is > more > complicated but still easy in gambas; using alsa (OSS is > older) is the > way to go if you want to do a complicated but powerful > program. > > Let me know if you have more doubts. I have no time to > write a program > myself, but I can find some time to give you some hint. > Please specify > more precisely what you want to do. > > Regards, > Doriano > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From marcobra.ubuntu at ...626... Tue May 25 10:11:22 2010 From: marcobra.ubuntu at ...626... (marco bra) Date: Tue, 25 May 2010 10:11:22 +0200 Subject: [Gambas-user] smtp mail with gambas 2.20 sent mail body message and/or attached file not sowhon/opened by client In-Reply-To: References: Message-ID: Using gambas 2.20.2-1~ppa~karmic1 on Ubuntu 9.10 Below the code i test. PUBLIC SUB pbinviaposta_Click() DIM smtp AS NEW SmtpClient WITH smtp IF NOT IsNull(smtp) THEN ' .Alternative = FALSE .From = "myinternalmailname at ...2437..." .Subject = "My subject" .Host = "192.168.100.18" .Port = 25 .To.Add("myinternalmailname at ...2437...") .Add("Body message never shown on client if there is also an attachment") .Add(File.Load("/usr/share/doc/texlive-base-bin-doc/dvipdfm/something.pdf"), "application/pdf", "test.pdf") TRY .Send() IF ERROR THEN Message.Error("Send mail failed") ENDIF END WITH END Testing send message: if i put body and attachement all is sent and using a mail client as Thunderbird the attached file is in the mail message source but i cannot view it, it seems a malformed multipart message the attacched file is not shown or cannot save it to my system, Thunderbird give me a message that the attachement is not good also tested with Outlook on Win. All goes fine if i put only body mail message or attachment, below my test: A) .Add("Body message never shown on client if there is also an attachment") .Add(File.Load("/usr/share/doc/texlive-base-bin-doc/dvipdfm/something.pdf"), "application/pdf", "test.pdf") from client i can see the body message but i got invalid attached file B) .Add(File.Load("/usr/share/doc/texlive-base-bin-doc/dvipdfm/something.pdf"), "application/pdf", "test.pdf") .Add("Body message never shown on client if there is also an attachment") from client i can ope the attached file but i cannot see the mail body message All goes fine if i send C or D: C) .Add("Body message never shown on client if there is also an attachment") D) .Add(File.Load("/usr/share/doc/texlive-base-bin-doc/dvipdfm/something.pdf"), "application/pdf", "test.pdf") Thank you Marco From gambas at ...1... Tue May 25 12:00:18 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 25 May 2010 12:00:18 +0200 Subject: [Gambas-user] =?utf-8?q?SOLVED_Re=3A_not_very_important_but_I_do_?= =?utf-8?q?not=09understand_why?= In-Reply-To: <1274715850.9300.19.camel@...40...> References: <1274703899.6879.10.camel@...40...> <1274715074.9300.7.camel@...40...> <1274715850.9300.19.camel@...40...> Message-ID: <201005251200.18951.gambas@...1...> > Salut, > > playing around a bit more, I found out/saw the disturber. > The "FUNCTION" behind END (that closes the function), > that works well in gambas3, > don't throw an error on gambas2 but is disturbing the Auto completion > > Amicalement > Charlie > That bug is just fixed in revision #2963. Regards, -- Beno?t Minisini From gambas at ...1... Tue May 25 12:06:43 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 25 May 2010 12:06:43 +0200 Subject: [Gambas-user] smtp mail with gambas 2.20 sent mail body message and/or attached file not sowhon/opened by client In-Reply-To: References: Message-ID: <201005251206.43305.gambas@...1...> > Using gambas 2.20.2-1~ppa~karmic1 on Ubuntu 9.10 > > Below the code i test. > > PUBLIC SUB pbinviaposta_Click() > DIM smtp AS NEW SmtpClient > > WITH smtp > IF NOT IsNull(smtp) THEN > ' .Alternative = FALSE > .From = "myinternalmailname at ...2437..." > .Subject = "My subject" > .Host = "192.168.100.18" > .Port = 25 > .To.Add("myinternalmailname at ...2437...") > > .Add("Body message never shown on client if there is also > an attachment") > > > .Add(File.Load("/usr/share/doc/texlive-base-bin-doc/dvipdfm/something.pdf" > ), "application/pdf", "test.pdf") > > TRY .Send() > IF ERROR THEN Message.Error("Send mail failed") > ENDIF > END WITH > END > > Testing send message: if i put body and attachement all is sent and > using a mail client as Thunderbird the attached file is in the mail > message source but i cannot view it, it seems a malformed multipart > message the attacched file is not shown or cannot save it to my > system, Thunderbird give me a message that the attachement is not good > also tested with Outlook on Win. > All goes fine if i put only body mail message or attachment, below my test: > > A) > .Add("Body message never shown on client if there is also an attachment") > .Add(File.Load("/usr/share/doc/texlive-base-bin-doc/dvipdfm/something.pdf") > , "application/pdf", "test.pdf") > from client i can see the body message but i got invalid attached file > > B) > .Add(File.Load("/usr/share/doc/texlive-base-bin-doc/dvipdfm/something.pdf") > , "application/pdf", "test.pdf") > .Add("Body message never shown on client if there is also an attachment") > from client i can ope the attached file but i cannot see the mail body > message > > All goes fine if i send C or D: > > C) > .Add("Body message never shown on client if there is also an attachment") > > D) > .Add(File.Load("/usr/share/doc/texlive-base-bin-doc/dvipdfm/something.pdf") > , "application/pdf", "test.pdf") > > > Thank you > Marco > Can you send me the source of a mail that is malformed? I can't tell you how, I don't use Thunderbird. Which may explain why it works fine there. Regards, -- Beno?t Minisini From gambas at ...1... Tue May 25 12:07:26 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 25 May 2010 12:07:26 +0200 Subject: [Gambas-user] DataSource component - Is it works with postgresql's schemas? - Gambas2 In-Reply-To: References: Message-ID: <201005251207.27010.gambas@...1...> > I wish to know, if the DataSource component works with postgresql's schema, > because I try to use it and don't work. > I modificated DataBase Example, changed in the DataSource2 property, table > : color => test.color, test is the schema's name and in the other > DataSource1 I changed Table :test => test.test. > I get this error => Unknown table test.color > > Regards > > Jorge Amarilla Postgresql schemas are supported in Gambas 3 only! Regards, -- Beno?t Minisini From gambas at ...1... Tue May 25 12:07:50 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 25 May 2010 12:07:50 +0200 Subject: [Gambas-user] Feature request In-Reply-To: <201005180732.04941.rterry@...1946...> References: <201005180732.04941.rterry@...1946...> Message-ID: <201005251207.50089.gambas@...1...> > I wondered if there was any easy way to find a file (class/form/module) in > ones code tree. Maybe this feature already exists in gambas3 > > As I've hundreds of forms, classes and modules, I've got to the point where > I occasinally 'mislay' one. > > Yes I know I can search my HDD easily with locate, but it would be a nice > feature to be able to type in a name > jump to that subdir with the file. > > Regards > > Richard I note that in the TODO file! -- Beno?t Minisini From Karl.Reinl at ...2345... Tue May 25 13:28:02 2010 From: Karl.Reinl at ...2345... (Charlie Reinl) Date: Tue, 25 May 2010 13:28:02 +0200 Subject: [Gambas-user] [Gambas-devel-svn] SF.net SVN: gambas:[2963] gambas/branches/2.0/app/src/gambas2 In-Reply-To: References: Message-ID: <1274786882.9343.3.camel@...40...> Am Dienstag, den 25.05.2010, 09:59 +0000 schrieb gambas at ...1...: > Revision: 2963 > http://gambas.svn.sourceforge.net/gambas/?rev=2963&view=rev > Author: gambas > Date: 2010-05-25 09:59:44 +0000 (Tue, 25 May 2010) > > Log Message: > ----------- > [DEVELOPMENT ENVIRONMENT] > * BUG: Understand "END FUNCTION" when scanning a class. > > Modified Paths: > -------------- > gambas/branches/2.0/app/src/gambas2/CComponent.class > gambas/branches/2.0/app/src/gambas2/authors.txt > gambas/branches/2.0/app/src/gambas2/support.txt > > > This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. > Salut Beno?t, got an error now, send you the logs -- Amicalement Charlie [OperatingSystem] OperatingSystem=Linux KernelRelease=2.6.24-27-generic DistributionVendor=Ubuntu DistributionRelease="Ubuntu 8.04.4 LTS" [System] CPUArchitecture=i686------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-devel-svn mailing list > Gambas-devel-svn at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-devel-svn TotalRam=506932 kB [Gambas] Gambas1=gbx-1.0.17 Gambas1Path=/usr/bin/gbx Gambas2=2.20.1 Revision: 2771 Gambas2Path=/usr/local/bin/gbx2 Gambas3=2.99.0 Revision: 2735 (can't compile actually) Gambas3Path=/usr/local/bin/gbx3 -------------- next part -------------- A non-text attachment was scrubbed... Name: configure.log Type: text/x-log Size: 194614 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: make.log Type: text/x-log Size: 5182 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: make_install.log Type: text/x-log Size: 2573 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: reconf-all.log Type: text/x-log Size: 12193 bytes Desc: not available URL: From gambas at ...1... Tue May 25 15:16:15 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 25 May 2010 15:16:15 +0200 Subject: [Gambas-user] =?utf-8?q?=5BGambas-devel-svn=5D_SF=2Enet_SVN=3A_ga?= =?utf-8?q?mbas=3A=5B2963=5D=09gambas/branches/2=2E0/app/src/gambas2?= In-Reply-To: <1274786882.9343.3.camel@...40...> References: <1274786882.9343.3.camel@...40...> Message-ID: <201005251516.15509.gambas@...1...> > > Salut Beno?t, > > got an error now, send you the logs > This is a libtool problem apparently. Which version of libtool do you use? -- Beno?t Minisini From Karl.Reinl at ...2345... Tue May 25 15:24:41 2010 From: Karl.Reinl at ...2345... (Charlie Reinl) Date: Tue, 25 May 2010 15:24:41 +0200 Subject: [Gambas-user] [Gambas-devel-svn] SF.net SVN: gambas:[2963] gambas/branches/2.0/app/src/gambas2 In-Reply-To: <201005251516.15509.gambas@...1...> References: <1274786882.9343.3.camel@...40...> <201005251516.15509.gambas@...1...> Message-ID: <1274793881.9343.5.camel@...40...> Am Dienstag, den 25.05.2010, 15:16 +0200 schrieb Beno?t Minisini: > > > > Salut Beno?t, > > > > got an error now, send you the logs > > > > This is a libtool problem apparently. Which version of libtool do you use? > [libtool] ltmain.sh (GNU libtool) 1.5.26 Debian 1.5.26-1ubuntu1 (1.1220.2.493 2008/02/01 16:58:18) -- Amicalement Charlie [OperatingSystem] OperatingSystem=Linux KernelRelease=2.6.24-27-generic DistributionVendor=Ubuntu DistributionRelease="Ubuntu 8.04.4 LTS" [System] CPUArchitecture=i686 TotalRam=506932 kB [Gambas] Gambas1=gbx-1.0.17 Gambas1Path=/usr/bin/gbx Gambas2=2.20.1 Revision: 2771 Gambas2Path=/usr/local/bin/gbx2 Gambas3=2.99.0 Revision: 2735 (can't compile actually) Gambas3Path=/usr/local/bin/gbx3 From gambas at ...1... Tue May 25 15:31:49 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 25 May 2010 15:31:49 +0200 Subject: [Gambas-user] =?utf-8?q?=5BGambas-devel-svn=5D_SF=2Enet_SVN=3A=09?= =?utf-8?q?gambas=3A=5B2963=5D=09gambas/branches/2=2E0/app/src/gambas2?= In-Reply-To: <1274793881.9343.5.camel@...40...> References: <201005251516.15509.gambas@...1...> <1274793881.9343.5.camel@...40...> Message-ID: <201005251531.49177.gambas@...1...> > Am Dienstag, den 25.05.2010, 15:16 +0200 schrieb Beno?t Minisini: > > > Salut Beno?t, > > > > > > got an error now, send you the logs > > > > This is a libtool problem apparently. Which version of libtool do you > > use? > > [libtool] > ltmain.sh (GNU libtool) 1.5.26 Debian 1.5.26-1ubuntu1 (1.1220.2.493 > 2008/02/01 16:58:18) Now you have to use libtool 2 to compile Gambas! I didn't find how to make a package source that works with both versions. Maybe this is not possible. Regards, -- Beno?t Minisini From jamarilla at ...626... Tue May 25 21:28:45 2010 From: jamarilla at ...626... (Jorge Amarilla) Date: Tue, 25 May 2010 15:28:45 -0400 Subject: [Gambas-user] DataSource component - Is it works with postgresql's schemas? - Gambas2 In-Reply-To: <201005251207.27010.gambas@...1...> References: <201005251207.27010.gambas@...1...> Message-ID: Thanks for the reply. Regards Jorge Amarilla ---------- Forwarded message ---------- From: Beno?t Minisini Date: 2010/5/25 Subject: Re: [Gambas-user] DataSource component - Is it works with postgresql's schemas? - Gambas2 To: mailing list for gambas users > I wish to know, if the DataSource component works with postgresql's schema, > because I try to use it and don't work. > I modificated DataBase Example, changed in the DataSource2 property, table > : color => test.color, test is the schema's name and in the other > DataSource1 I changed Table :test => test.test. > I get this error => Unknown table test.color > > Regards > > Jorge Amarilla Postgresql schemas are supported in Gambas 3 only! Regards, -- Beno?t Minisini ------------------------------------------------------------------------------ _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From austinium at ...43... Wed May 26 07:05:47 2010 From: austinium at ...43... (vikram) Date: Tue, 25 May 2010 22:05:47 -0700 (PDT) Subject: [Gambas-user] Help with redirecting stdout of the GNU shred command (SHELL/EXEC) Message-ID: <410335.82633.qm@...2439...> Hi, I am new to Gambas and this is my first application. I have been working with C/VC++ and Gambas has been fun so far except for this little problem i've run into... ? I am trying to make a GUI front end for the GNU shred command. I have got to the stage where the user can select a file via GUI and shred(using SHELL). I am trying to make it more interactive by reading stdout from shred -v into the Gambas application. I have followed http://www.gambasforum.com/index.php?topic=120.0;wap2 and tried to use EXEC to read stdout, haven't had much luck with it so far :( Heres the code: 'global variables PRIVATE filename AS String?? PRIVATE delfile AS Boolean PRIVATE shredprocess AS Process PRIVATE shredcommanddel AS String[3] PRIVATE shredcommandnodel AS String[3] 'this is where i initialize the command arrays for EXEC 'the last element is replaced later by the filepath PUBLIC SUB Form_Open() ? 'tbx_filename ? shredcommanddel = ["shred ", "-uv ", " "] ? shredcommandnodel = ["shred ", "-v ", " "] END 'Display a file open dialog and save the path of the file selected to filepath PUBLIC SUB btn_fileselect_Click() ? IF Dialog.OpenFile() THEN RETURN ??? filename = Dialog.Path ??? tbx_filename.Text = filename END 'the actual shredding happens here, the code with EXEC is ineffective at the moment it doesnt shred the file 'SHELL works, but i dont know how to redirect stdout with either of these PUBLIC SUB btn_shred_Click() ? 'DIM shellcommand AS String[] ? 'Message(filename) ? IF delfile THEN ??? 'shellcommand = "shred --remove --verbose " & filename? ??? shredcommanddel[2] = filename ??? shredprocess = EXEC shredcommanddel 'FOR READ ? SHELL "shred -uv " & filename ? ELSE ??? 'shellcommand = "shred --verbose " & filename ??? shredcommandnodel[2] = filename ??? shredprocess = EXEC shredcommandnodel 'FOR READ ??? SHELL "shred -v " & filename ? ENDIF ? 'SHELL shellcommand FOR READ AS "Process" ? END ? 'Execution never gets here? PUBLIC SUB Process_Read() ? DIM resultline AS String ? LINE INPUT #shredprocess, resultline ? Message("HERE WE ARE!") ? resultline = resultline & GB.NewLine END PUBLIC SUB CheckBox1_Click() ? delfile = TRUE END I am looking for a way to redirect output from the shred to my Gambas application. Appreciate your help in this. Thanks, Vikram From gregor at ...2441... Wed May 26 09:03:42 2010 From: gregor at ...2441... (gregor) Date: Wed, 26 May 2010 09:03:42 +0200 Subject: [Gambas-user] Blanks in filename and path, problems with shell Message-ID: <9f80d47f5b6880e103f1180250462f93@...2442...> Hi, I create a little GUI to merge several pdfs with a background. The syntx for pdftk is 'pdftk [inputpath/inputfile] background [backgroundfile] output [outputpath/outputfile]' With no blanks in [*] there is no problems, with blanks the shell need a quote for the blank. No I use the variant 'pdftk REPLACE([inputfile]," ",CHR(92)&" ") background REPLACE([backgroundfile]," ",CHR(92)&" ") output REPLACE([outputfile]," ",CHR(92)&" ")' It work but is a little bit ugly,... Maybe there is a better way? When I tried it so: inputpath = REPLACE(DirChooser1.Value," ",CHR(92)&" ") I got a String wich seems right, but the function DIR(inputpath) had a problem with it,... Bye Gregor From leonardo at ...1237... Wed May 26 10:49:32 2010 From: leonardo at ...1237... (Leonardo Miliani) Date: Wed, 26 May 2010 10:49:32 +0200 Subject: [Gambas-user] Gambas3: error with ODBC In-Reply-To: <201005241520.40268.gambas@...1...> References: <1273790406.9887.2.camel@"hp_host"> <201005211323.37877.gambas@...1...> <1274706456.3191.0.camel@"hp_host"> <201005241520.40268.gambas@...1...> Message-ID: <1274863772.12836.4.camel@"hp_host"> Il giorno lun, 24/05/2010 alle 15.20 +0200, Beno?t Minisini ha scritto: > > Il giorno ven, 21/05/2010 alle 13.23 +0200, Beno?t Minisini ha scritto: > > > > Il giorno sab, 15/05/2010 alle 23.13 +0200, Beno?t Minisini ha scritto: > > > > > > Gambas 3, 64 bit version. > > > > > > During the connection setup with an ODBC database everything goes > > > > > > right, but when I try to exec a query with Connectin.Exec, Gambas > > > > > > crashes with #11 error. > > > > > > > > > > Can you get a backtrace with gdb? And better get an output of running > > > > > your project inside valgrind? > > > > > > > > Program received signal SIGSEGV, Segmentation fault. > > > > 0x00007ffff722cdfd in free () from /lib/libc.so.6 > > > > > > That is not very useful! > > > > > > Read the "Reporting a problem" page on the web site to see how to get a > > > backtrage. > > > > > > Regards, > > > > Sorry but I'm an intermediate.... I am not the person who has the error. > > I'm making the report so I write what I receive ;-) > > > > Here is the complete (I hope...) report: > > GNU gdb (GDB) 7.1-ubuntu > > Copyright (C) 2010 Free Software Foundation, Inc. > > License GPLv3+: GNU GPL version 3 or later > > > > This is free software: you are free to change and redistribute it. > > There is NO WARRANTY, to the extent permitted by law. Type "show > > copying" > > and "show warranty" for details. > > This GDB was configured as "x86_64-linux-gnu". > > For bug reporting instructions, please see: > > ... > > Reading symbols from /usr/local/bin/gbx3...done. > > (gdb) set args -p > > (gdb) run > > Starting program: /usr/local/bin/gbx3 -p > > [Thread debugging using libthread_db enabled] > > QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: > > Nessun file o directory > > [New Thread 0x7fffe9c98710 (LWP 1859)] > > QFileSystemWatcher: failed to add paths: /home/paolo/.config/ibus/bus > > Bus::open: Can not get ibus-daemon's address. > > IBusInputContext::createInputContext: no connection to ibus-daemon > > > > Program received signal SIGSEGV, Segmentation fault. > > 0x00007ffff722cdfd in free () from /lib/libc.so.6 > > (gdb) bt > > #0 0x00007ffff722cdfd in free () from /lib/libc.so.6 > > #1 0x0000000000419187 in GB_Free (addr=0x7fffffffc4ec) at > > gbx_api.c:1444 > > #2 0x00007ffff12cefba in my_free (desc=0x9a4510, db=0x9a44c8) at > > main.c:117 > > #3 open_database (desc=0x9a4510, db=0x9a44c8) at main.c:532 > > #4 0x00007ffff14d75bc in DB_Open (desc=0x9a4510, driver=0x9a44c0, > > db=0x9a44c8) > > at main.c:209 > > #5 0x00007ffff14d7b45 in open_connection (_object=0x9a44b0) > > at CConnection.c:81 > > #6 check_opened (_object=0x9a44b0) at CConnection.c:89 > > #7 0x00007ffff14d826d in CCONNECTION_exec (_object=0x9a44b0, > > _param=0x651db0) > > at CConnection.c:432 > > #8 0x0000000000407d7d in EXEC_call_native (exec=0xa56370, > > object=0x9a451000a08230, type=140737239627200, param=0x422f0) > > at gbx_exec.c:979 > > #9 0x00000000004089cd in EXEC_native () at gbx_exec.c:1185 > > #10 0x0000000000429fc1 in EXEC_loop () at gbx_exec_loop.c:982 > > #11 0x0000000000409521 in EXEC_function_loop () at gbx_exec.c:795 > > #12 0x00000000004098db in EXEC_function_real () at gbx_exec.c:782 > > #13 0x0000000000419839 in raise_event (observer=, > > object=, func_id=, > > nparam=271088) > > at gbx_api.c:483 > > #14 0x0000000000419fc2 in GB_Raise (object=0x96c9b0, > > event_id=, nparam=0) at gbx_api.c:585 > > #15 0x00007ffff6d4400d in CButton::clicked (this=) > > at CButton.cpp:692 > > #16 0x00007ffff6d43cf2 in CButton::qt_metacall (this=0x7ffff6fa5910, > > _c=QMetaObject::InvokeMetaMethod, _id=0, _a=) > > at CButton_moc.cpp:173 > > #17 0x00007ffff5082e3f in QMetaObject::activate(QObject*, QMetaObject > > const*, int, void**) () from /usr/lib/libQtCore.so.4 > > #18 0x00007ffff5bde5f2 in QAbstractButton::clicked(bool) () > > from /usr/lib/libQtGui.so.4 > > ---Type to continue, or q to quit--- > > #19 0x00007ffff58f886b in ?? () from /usr/lib/libQtGui.so.4 > > #20 0x00007ffff58f970b in ?? () from /usr/lib/libQtGui.so.4 > > #21 0x00007ffff58f997c in > > QAbstractButton::mouseReleaseEvent(QMouseEvent*) () > > from /usr/lib/libQtGui.so.4 > > #22 0x00007ffff5599582 in QWidget::event(QEvent*) () > > from /usr/lib/libQtGui.so.4 > > #23 0x00007ffff554322c in QApplicationPrivate::notify_helper(QObject*, > > QEvent*) > > () from /usr/lib/libQtGui.so.4 > > #24 0x00007ffff5549ecb in QApplication::notify(QObject*, QEvent*) () > > from /usr/lib/libQtGui.so.4 > > #25 0x00007ffff507006c in QCoreApplication::notifyInternal(QObject*, > > QEvent*) > > () from /usr/lib/libQtCore.so.4 > > #26 0x00007ffff55490ae in QApplicationPrivate::sendMouseEvent(QWidget*, > > QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer&, bool) > > () > > from /usr/lib/libQtGui.so.4 > > #27 0x00007ffff55c8f65 in ?? () from /usr/lib/libQtGui.so.4 > > #28 0x00007ffff55c78ac in QApplication::x11ProcessEvent(_XEvent*) () > > from /usr/lib/libQtGui.so.4 > > #29 0x00007ffff55f4199 in ?? () from /usr/lib/libQtGui.so.4 > > #30 0x00007ffff506e992 in > > QEventLoop::processEvents(QFlags) () > > from /usr/lib/libQtCore.so.4 > > #31 0x00007ffff506ed6c in > > QEventLoop::exec(QFlags) () > > from /usr/lib/libQtCore.so.4 > > #32 0x00007ffff5072aab in QCoreApplication::exec() () > > from /usr/lib/libQtCore.so.4 > > #33 0x00007ffff6d3a1cc in hook_loop () at main.cpp:673 > > #34 0x000000000041ee78 in main (argc=1, argv=) > > at gbx.c:356 > > (gdb) > > The database could not be opened, and the crash actually occurs while > releasing an ODBC handle before returning the error. > > At the moment, I don't know why releasing the handle crashes: I don't know > ODBC and didn't write that code. > > I need the full project source code: I need to know what database code is > executed, in order, to see what has been executed because the offended Exec() > call. > > Regards, > My contact said me that it is a little big difficult.... The code itself is very simple: With Connection .Type = "odbc" .Host = "odbc connection name" .User .Password End With Connectio.Exec("my query") '<-- here is the point where the error is raised' But using ODBC he should also post a DB (any of the DBs that uses ODBC driver) and the configuration files (odbc.ini & odbcinst.ini)... and he said me that it is not so easy... Does anyone else has tried to connect to a MS-SQL database with Gambas? If yes, how does he have resolved such problem? -- Leonardo Miliani www.leonardomiliani.com Webmaster e co-fondatore di www.gambas-it.org Il portale di riferimento per i programmatori Gambas italiani From jussi.lahtinen at ...626... Wed May 26 16:28:51 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Wed, 26 May 2010 17:28:51 +0300 Subject: [Gambas-user] Help with redirecting stdout of the GNU shred command (SHELL/EXEC) In-Reply-To: <410335.82633.qm@...2439...> References: <410335.82633.qm@...2439...> Message-ID: Link to documentation http://gambasdoc.org/help/lang/exec . I think you should do it like; EXEC [ "ls", "-la", "/tmp" ] FOR READ AS "Contents" PUBLIC SUB Contents_Read() DIM sLine AS String READ #LAST, sLine, -256 sOutput &= sLine END Jussi On Wed, May 26, 2010 at 08:05, vikram wrote: > Hi, > > I am new to > Gambas and this is my first application. I have been working with > C/VC++ and Gambas has been fun so far except for this little problem > i've run into... > > I am trying to make a GUI front end for the > GNU shred command. I have got to the stage where the user can select a > file via GUI and shred(using SHELL). I am trying to make it more > interactive by reading stdout from shred -v into the Gambas > application. I have followed > http://www.gambasforum.com/index.php?topic=120.0;wap2 and tried to use > EXEC to read stdout, haven't had much luck with it so far :( > > > > Heres the code: > > 'global variables > > PRIVATE filename AS String > > PRIVATE delfile AS Boolean > > PRIVATE shredprocess AS Process > > PRIVATE shredcommanddel AS String[3] > > PRIVATE shredcommandnodel AS String[3] > > > > 'this is where i initialize the command arrays for EXEC > > 'the last element is replaced later by the filepath > > PUBLIC SUB Form_Open() > > ? 'tbx_filename > > ? shredcommanddel = ["shred ", "-uv ", " "] > > ? shredcommandnodel = ["shred ", "-v ", " "] > > END > > > > 'Display a file open dialog and save the path of the file selected to filepath > > PUBLIC SUB btn_fileselect_Click() > > ? IF Dialog.OpenFile() THEN RETURN > > ??? filename = Dialog.Path > > ??? tbx_filename.Text = filename > > END > > > > 'the actual shredding happens here, the code with EXEC is ineffective at the moment it doesnt shred the file > > 'SHELL works, but i dont know how to redirect stdout with either of these > > PUBLIC SUB btn_shred_Click() > > ? 'DIM shellcommand AS String[] > > ? 'Message(filename) > > ? IF delfile THEN > > ??? 'shellcommand = "shred --remove --verbose " & filename > > ??? shredcommanddel[2] = filename > > ??? shredprocess = EXEC shredcommanddel 'FOR READ > > ? SHELL "shred -uv " & filename > > ? ELSE > > ??? 'shellcommand = "shred --verbose " & filename > > ??? shredcommandnodel[2] = filename > > ??? shredprocess = EXEC shredcommandnodel 'FOR READ > > ??? SHELL "shred -v " & filename > > ? ENDIF > > ? 'SHELL shellcommand FOR READ AS "Process" > > > > END > > > > 'Execution never gets here > > PUBLIC SUB Process_Read() > > ? DIM resultline AS String > > ? LINE INPUT #shredprocess, resultline > > ? Message("HERE WE ARE!") > > ? resultline = resultline & GB.NewLine > > END > > > > PUBLIC SUB CheckBox1_Click() > > ? delfile = TRUE > > END > > > > I am looking for a way to redirect output from the shred to my Gambas application. > > Appreciate your help in this. > > Thanks, > Vikram > > > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From eilert-sprachen at ...221... Wed May 26 16:49:10 2010 From: eilert-sprachen at ...221... (Rolf-Werner Eilert) Date: Wed, 26 May 2010 16:49:10 +0200 Subject: [Gambas-user] File dates Message-ID: <4BFD34E6.1000402@...221...> Hi folks, Do you know an easy way to pick the date of a file? I thought there might be something like File.Date but no way ;-) Guess I just miss something here... Regards Rolf From rospolosco at ...152... Wed May 26 17:47:39 2010 From: rospolosco at ...152... (Stefano Palmeri) Date: Wed, 26 May 2010 17:47:39 +0200 Subject: [Gambas-user] Blanks in filename and path, problems with shell Message-ID: <201005261747.40309.rospolosco@...152...> Il mercoled? 26 maggio 2010 09:03:42 gregor ha scritto: > Hi, > > I create a little GUI to merge several pdfs with a background. > The syntx for pdftk is 'pdftk [inputpath/inputfile] background > [backgroundfile] output [outputpath/outputfile]' > > With no blanks in [*] there is no problems, with blanks the shell need a > quote for the blank. > > No I use the variant 'pdftk REPLACE([inputfile]," ",CHR(92)&" ") background > REPLACE([backgroundfile]," ",CHR(92)&" ") output REPLACE([outputfile]," > ",CHR(92)&" ")' > > It work but is a little bit ugly,... > > Maybe there is a better way? > > When I tried it so: > inputpath = REPLACE(DirChooser1.Value," ",CHR(92)&" ") I got a String wich > seems right, but the function DIR(inputpath) had a problem with it,... > > Bye > > Gregor > > > > --------------------------------------------------------------------------- >--- > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user Hi. Try SHELL Quote.Shell("command_here") Bye From rospolosco at ...152... Wed May 26 17:51:34 2010 From: rospolosco at ...152... (Stefano Palmeri) Date: Wed, 26 May 2010 17:51:34 +0200 Subject: [Gambas-user] File dates In-Reply-To: <4BFD34E6.1000402@...221...> References: <4BFD34E6.1000402@...221...> Message-ID: <201005261751.35011.rospolosco@...152...> Il mercoled? 26 maggio 2010 16:49:10 Rolf-Werner Eilert ha scritto: > Hi folks, > > Do you know an easy way to pick the date of a file? I thought there > might be something like File.Date but no way ;-) > > Guess I just miss something here... > > Regards > > Rolf > > --------------------------------------------------------------------------- >--- > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user See Stat class. Bye From gregor at ...2441... Wed May 26 18:41:06 2010 From: gregor at ...2441... (gregor at ...2441...) Date: Wed, 26 May 2010 18:41:06 +0200 Subject: [Gambas-user] Blanks in filename and path, problems with shell In-Reply-To: <201005261747.40309.rospolosco@...152...> References: <201005261747.40309.rospolosco@...152...> Message-ID: <201005261841.06332.gregor@...2441...> > Try SHELL Quote.Shell("command_here") OK this do the same as REPLACE(STRING," ",CHR(92)&" ") but i can't do Quote.shell("pdftk input pdf.pdf background bg.pdf output out put .pdf") in that case I got 'pdftk\ input\ pdf.pdf\ background\ bg.pdf\ output\ out\ put.pdf' So the function is a little bit senseless? Gregor From shordi at ...626... Wed May 26 19:32:04 2010 From: shordi at ...626... (=?ISO-8859-1?Q?Jorge_Carri=F3n?=) Date: Wed, 26 May 2010 19:32:04 +0200 Subject: [Gambas-user] Blanks in filename and path, problems with shell In-Reply-To: <201005261841.06332.gregor@...2441...> References: <201005261747.40309.rospolosco@...152...> <201005261841.06332.gregor@...2441...> Message-ID: Hi Gregor. Pehaps you want take a look to this aplication . It's a little interface for pdftk that I made for my job. It not explore all pdftk posibilities, but only the most used (It is in spanish language, sorry). In the code I've solved what you are asking for. Hope it'll be usefull. Regards 2010/5/26 > > Try SHELL Quote.Shell("command_here") > OK this do the same as REPLACE(STRING," ",CHR(92)&" ") > > but i can't do > Quote.shell("pdftk input pdf.pdf background bg.pdf output out put .pdf") > in that case I got > 'pdftk\ input\ pdf.pdf\ background\ bg.pdf\ output\ out\ put.pdf' > > So the function is a little bit senseless? > > Gregor > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gregor at ...2441... Wed May 26 19:46:55 2010 From: gregor at ...2441... (gregor at ...2441...) Date: Wed, 26 May 2010 19:46:55 +0200 Subject: [Gambas-user] Blanks in filename and path, problems with shell In-Reply-To: References: <201005261747.40309.rospolosco@...152...> <201005261841.06332.gregor@...2441...> Message-ID: <201005261946.55836.gregor@...2441...> Hi Jorge, I got it, maybe I ask my wife for help, she speak spanish a little bit. Maybee she have time to translate,... in german and russian,... But your projekt isn't set as multilanguage project, Gregor From shordi at ...626... Wed May 26 20:25:01 2010 From: shordi at ...626... (=?ISO-8859-1?Q?Jorge_Carri=F3n?=) Date: Wed, 26 May 2010 20:25:01 +0200 Subject: [Gambas-user] Blanks in filename and path, problems with shell In-Reply-To: <201005261946.55836.gregor@...2441...> References: <201005261747.40309.rospolosco@...152...> <201005261841.06332.gregor@...2441...> <201005261946.55836.gregor@...2441...> Message-ID: Yes, sorry, but I made it for my job and the only language used there is spanish. If there is something interested in it, I can make it multilenguage. By the way. I remember that there is a web page where upload gambas project for the community. Can someone tell me the web address? I find a link to a wiki in gambas home, but I'm asked for a user and password that I ignore... Regards 2010/5/26 > Hi Jorge, > > I got it, maybe I ask my wife for help, she speak spanish a little bit. > Maybee she have time to translate,... in german and russian,... > > But your projekt isn't set as multilanguage project, > > Gregor > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From shordi at ...626... Wed May 26 20:35:31 2010 From: shordi at ...626... (=?ISO-8859-1?Q?Jorge_Carri=F3n?=) Date: Wed, 26 May 2010 20:35:31 +0200 Subject: [Gambas-user] Blanks in filename and path, problems with shell In-Reply-To: References: <201005261747.40309.rospolosco@...152...> <201005261841.06332.gregor@...2441...> <201005261946.55836.gregor@...2441...> Message-ID: Excuse me. I've found the solution for my last question in the link "wiki Encyclopaedia" of the gambas page... Regards El 26 de mayo de 2010 20:25, Jorge Carri?n escribi?: > Yes, sorry, but I made it for my job and the only language used there is > spanish. > If there is something interested in it, I can make it multilenguage. > By the way. I remember that there is a web page where upload gambas project > for the community. Can someone tell me the web address? I find a link to a > wiki in gambas home, but I'm asked for a user and password that I ignore... > > Regards > > > 2010/5/26 > >> Hi Jorge, >> >> >> I got it, maybe I ask my wife for help, she speak spanish a little bit. >> Maybee she have time to translate,... in german and russian,... >> >> But your projekt isn't set as multilanguage project, >> >> Gregor >> >> >> ------------------------------------------------------------------------------ >> >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > From Karl.Reinl at ...2345... Wed May 26 20:39:15 2010 From: Karl.Reinl at ...2345... (Charlie Reinl) Date: Wed, 26 May 2010 20:39:15 +0200 Subject: [Gambas-user] Blanks in filename and path, problems with shell In-Reply-To: <201005261946.55836.gregor@...2441...> References: <201005261747.40309.rospolosco@...152...> <201005261841.06332.gregor@...2441...> <201005261946.55836.gregor@...2441...> Message-ID: <1274899155.6502.4.camel@...40...> Am Mittwoch, den 26.05.2010, 19:46 +0200 schrieb gregor at ...2441...: > Hi Jorge, > > I got it, maybe I ask my wife for help, she speak spanish a little bit. > Maybee she have time to translate,... in german and russian,... > > But your projekt isn't set as multilanguage project, > > Gregor > Salut Gregor, you can set it by Ctrl+P , open Optionen and set "Projekt enth?lt ?bersetzungen" to YES and Default Language to Spanisch. That's all -- Cordialement Charlie From gregor at ...2441... Wed May 26 21:15:32 2010 From: gregor at ...2441... (gregor at ...2441...) Date: Wed, 26 May 2010 21:15:32 +0200 Subject: [Gambas-user] Blanks in filename and path, problems with shell In-Reply-To: <1274899155.6502.4.camel@...40...> References: <201005261747.40309.rospolosco@...152...> <201005261946.55836.gregor@...2441...> <1274899155.6502.4.camel@...40...> Message-ID: <201005262115.33044.gregor@...2441...> Hi charlie, I found it, set Spanish as default language. I translate something to german, when I start the application I get the german translation, but how i get the spanish orginal text? Have I add a spanish translation, or for what language will the untranslated text used? I try to change the KDE enviroment language but I still get the german text,... questions over questions,... Bye Gregor From Karl.Reinl at ...2345... Wed May 26 22:54:05 2010 From: Karl.Reinl at ...2345... (Charlie Reinl) Date: Wed, 26 May 2010 22:54:05 +0200 Subject: [Gambas-user] Blanks in filename and path, problems with shell In-Reply-To: <201005262115.33044.gregor@...2441...> References: <201005261747.40309.rospolosco@...152...> <201005261946.55836.gregor@...2441...> <1274899155.6502.4.camel@...40...> <201005262115.33044.gregor@...2441...> Message-ID: <1274907245.6502.14.camel@...40...> Am Mittwoch, den 26.05.2010, 21:15 +0200 schrieb gregor at ...2441...: > Hi charlie, > > I found it, set Spanish as default language. > > I translate something to german, when I start the application I get the german > translation, but how i get the spanish orginal text? Have I add a spanish > translation, or for what language will the untranslated text used? > > I try to change the KDE enviroment language but I still get the german > text,... > > questions over questions,... > > Bye > > Gregor > > ------------------------------------------------------------------------------ Hello Gregor, when pressing CTRL+T you should have something like the attached screen shot, there you have the spanisch text on the left side. If you want to start the hole app with spanisch text, you have to have a look to Toni Rosa agendaxml project at http://agendaxml.sourceforge.net he made it running. Good luck Charlie -------------- next part -------------- A non-text attachment was scrubbed... Name: Bildschirmfoto-Project translation.png Type: image/png Size: 43472 bytes Desc: not available URL: From franklinsolutions at ...2340... Wed May 26 21:47:11 2010 From: franklinsolutions at ...2340... (Franklin Solutions Limited) Date: Wed, 26 May 2010 20:47:11 +0100 Subject: [Gambas-user] Re ODBC and MS SQL Message-ID: <000801cafd0c$3b9277d0$b2b76770$@net> Good evening I also tried connecting to a MS SQL server using the ODBC connection. I installed the TDS driver and tested the connection from a terminal using both TSQL and ISQL, to return the results of a query. Both worked. When I then tried using ODBC in the Database example, the connection opened and the connection status returned true. However when I tried to execute the query i got a signal #11 error. I posted the results of the gdb trace as well as the packets captured using Wireshark for both the connection and execution using both TSQL and the Gambas database example. In both instances the packets were identical with the exception of an additional packet in one of them. The packets shown from the Gambas database example showed that the query was sent to the server and the results returned. Gambas however just returned a signal #11 rather than assigning the results to the result variable. I really would like to find a solution for this. https://sourceforge.net/mailarchive/message.php?msg_name=000701ca7cca%2487a1 3ed0%2496e3bc70%24%40net Tony Oliver From gambas at ...1... Thu May 27 00:51:42 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Thu, 27 May 2010 00:51:42 +0200 Subject: [Gambas-user] Structure support in Gambas 3 Message-ID: <201005270051.42159.gambas@...1...> Hi, I have just committed a new big internal change for Gambas 3 in revision #2970: structure support. It is not 100% finished, must most of the useful parts are there. If that crashes your program - I will be amazed if it won't :-) - you know where to knock. How does it work? To define a structure, you must declare it inside a class or a module that way: Public Struct As As End Struct A structure is always public (at the moment). A structure is a class, with only public members that are actually variables. You can embed a structure inside an object that way: Private As Struct Note the 'Struct' keyword inserted before . An embedded structure is not an object on its own. Its data is allocated inside the object where it is declared. Like a "static array" (that should be named "embedded array" actually). Note that you cannot make an "embedded array" of static structures. You can embed a structure inside another structure (logical, as a structure is a class). That way, you can create russian dolls if you like. Here is a stupid example: Public Struct Car Model As String Registration As String MaxSpeed As Float End Struct Public Struct Person Name As String Age As Integer BirthDate As Date FirstCar As Struct Car SecondCar As Struct Car End Struct Passing structures to extern functions is not correctly supported at the moment, but it will. That revision has another change: objects that do not raise events do not allocate an internal event management structure for nothing anymore. That saves 4 pointers (16 bytes on a 32 bits system) on each object, but I'm not 100% sure I didn't do that misuse of memory ressources for nothing, so you may have a crash. Now Fabien has just gb.report to finish, and I we will be able to release an alpha version of Gambas 3. :-) But don't panic, there are a dozen of little things to do yet before the final release... The main thing are the package manager (I want it to be sure that it works correctly for the release, and I will need help for that), and the ability to release incremental versions of Gambas (3.1, 3.2...) that won't be just bug fixes like in the 2.x versions. Enjoy it. -- Beno?t Minisini From joe1962 at ...626... Thu May 27 07:14:56 2010 From: joe1962 at ...626... (Jose J. Rodriguez) Date: Thu, 27 May 2010 01:14:56 -0400 Subject: [Gambas-user] Structure support in Gambas 3 In-Reply-To: <201005270051.42159.gambas@...1...> References: <201005270051.42159.gambas@...1...> Message-ID: On 5/26/10, Beno?t Minisini wrote: > Hi, > > I have just committed a new big internal change for Gambas 3 in revision > #2970: structure support. > Wow! That's cool! And I was just thinking this week that it might be about time for me to move up to G3... :D Regards, Joe1962 From ron at ...1740... Thu May 27 08:15:13 2010 From: ron at ...1740... (Ron) Date: Thu, 27 May 2010 08:15:13 +0200 Subject: [Gambas-user] Structure support in Gambas 3 In-Reply-To: <201005270051.42159.gambas@...1...> References: <201005270051.42159.gambas@...1...> Message-ID: <4BFE0DF1.5030806@...1740...> Beno?t Minisini wrote: > Hi, > > I have just committed a new big internal change for Gambas 3 in revision > #2970: structure support. > > It is not 100% finished, must most of the useful parts are there. If that > crashes your program - I will be amazed if it won't :-) - you know where to > knock. > > > Now Fabien has just gb.report to finish, and I we will be able to release an > alpha version of Gambas 3. :-) > > But don't panic, there are a dozen of little things to do yet before the final > release... The main thing are the package manager (I want it to be sure that > it works correctly for the release, and I will need help for that), and the > ability to release incremental versions of Gambas (3.1, 3.2...) that won't be > just bug fixes like in the 2.x versions. > > Enjoy it. > Structures seem perfect for storing temp database table data, and there is a lot of it in my project, so I'm thinking about how to implement this. What is also great news is the fact that the major work is almost done and Gambas3 is growing to a more stable version now. Thanks. Regards, Ron_2nd. From eilert-sprachen at ...221... Thu May 27 09:12:03 2010 From: eilert-sprachen at ...221... (Rolf-Werner Eilert) Date: Thu, 27 May 2010 09:12:03 +0200 Subject: [Gambas-user] Structure support in Gambas 3 In-Reply-To: <201005270051.42159.gambas@...1...> References: <201005270051.42159.gambas@...1...> Message-ID: <4BFE1B43.5090402@...221...> > To define a structure, you must declare it inside a class or a module that > way: > > Public Struct > As > As > End Struct > This means you cannot define the struct itself at runtime like an object, right? You must know the struct's composition of variables in advance? So the program could not react freely to a change in the database? (Don't know how to express it more clearly...) But it's great, I find this practical as well when you include external functions from the system. > ability to release incremental versions of Gambas (3.1, 3.2...) that won't be > just bug fixes like in the 2.x versions. > I don't quite see what you mean by that. Do you intend to create an update mechanism that loads new libraries? Regards Rolf From shordi at ...626... Thu May 27 09:52:22 2010 From: shordi at ...626... (=?ISO-8859-1?Q?Jorge_Carri=F3n?=) Date: Thu, 27 May 2010 09:52:22 +0200 Subject: [Gambas-user] Blanks in filename and path, problems with shell In-Reply-To: <1274907245.6502.14.camel@...40...> References: <201005261747.40309.rospolosco@...152...> <201005261946.55836.gregor@...2441...> <1274899155.6502.4.camel@...40...> <201005262115.33044.gregor@...2441...> <1274907245.6502.14.camel@...40...> Message-ID: Gregor: Don't waste your time translating it. I've made the translation to English yesterday. I upload it this evening to my domain and you will should download without problems. (If you want translate to german o russian I'm afraid that you have by your own...) 2010/5/26 Charlie Reinl > Am Mittwoch, den 26.05.2010, 21:15 +0200 schrieb gregor at ...2441...: > > Hi charlie, > > > > I found it, set Spanish as default language. > > > > I translate something to german, when I start the application I get the > german > > translation, but how i get the spanish orginal text? Have I add a spanish > > translation, or for what language will the untranslated text used? > > > > I try to change the KDE enviroment language but I still get the german > > text,... > > > > questions over questions,... > > > > Bye > > > > Gregor > > > > > ------------------------------------------------------------------------------ > Hello Gregor, > > when pressing CTRL+T you should have something like the attached screen > shot, there you have the spanisch text on the left side. > > If you want to start the hole app with spanisch text, you have to have a > look to Toni Rosa agendaxml project at > http://agendaxml.sourceforge.net > he made it running. > > Good luck > Charlie > > > ------------------------------------------------------------------------------ > > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > From gambas.fr at ...626... Thu May 27 12:33:11 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Thu, 27 May 2010 12:33:11 +0200 Subject: [Gambas-user] Structure support in Gambas 3 In-Reply-To: <201005270051.42159.gambas@...1...> References: <201005270051.42159.gambas@...1...> Message-ID: Le 27 mai 2010 00:51, Beno?t Minisini a ?crit : > Hi, > > I have just committed a new big internal change for Gambas 3 in revision > #2970: structure support. > > It is not 100% finished, must most of the useful parts are there. If that > crashes your program - I will be amazed if it won't :-) - you know where to > knock. > > How does it work? > > To define a structure, you must declare it inside a class or a module that > way: > > ? ? ? ?Public Struct > ? ? ? ? ? As > ? ? ? ? ? As > ? ? ? ?End Struct > > A structure is always public (at the moment). > > A structure is a class, with only public members that are actually variables. > > You can embed a structure inside an object that way: > > ? ? ? ?Private As Struct > > Note the 'Struct' keyword inserted before . > > An embedded structure is not an object on its own. Its data is allocated > inside the object where it is declared. Like a "static array" (that should be > named "embedded array" actually). Note that you cannot make an "embedded > array" of static structures. > > You can embed a structure inside another structure (logical, as a structure is > a class). That way, you can create russian dolls if you like. Here is a stupid > example: > > ? ? ? ?Public Struct Car > ? ? ? ? ? ? ? ?Model As String > ? ? ? ? ? ? ? ?Registration As String > ? ? ? ? ? ? ? ?MaxSpeed As Float > ? ? ? ?End Struct > > ? ? ? ?Public Struct Person > ? ? ? ? ? ? ? ?Name As String > ? ? ? ? ? ? ? ?Age As Integer > ? ? ? ? ? ? ? ?BirthDate As Date > ? ? ? ? ? ? ? ?FirstCar As Struct Car > ? ? ? ? ? ? ? ?SecondCar As Struct Car > ? ? ? ?End Struct > > Passing structures to extern functions is not correctly supported at the > moment, but it will. > > That revision has another change: objects that do not raise events do not > allocate an internal event management structure for nothing anymore. That > saves 4 pointers (16 bytes on a 32 bits system) on each object, but I'm not > 100% sure I didn't do that misuse of memory ressources for nothing, so you may > have a crash. > > Now Fabien has just gb.report to finish, and I we will be able to release an > alpha version of Gambas 3. :-) > i need users test it to say me what are there needs.. > But don't panic, there are a dozen of little things to do yet before the final > release... The main thing are the package manager (I want it to be sure that > it works correctly for the release, and I will need help for that), and the > ability to release incremental versions of Gambas (3.1, 3.2...) that won't be > just bug fixes like in the 2.x versions. > > Enjoy it. > > -- > Beno?t Minisini > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From marcobra.ubuntu at ...626... Thu May 27 14:46:32 2010 From: marcobra.ubuntu at ...626... (marco bra) Date: Thu, 27 May 2010 14:46:32 +0200 Subject: [Gambas-user] smtp mail with gambas 2.20 sent mail body message and/or attached file not sowhon/opened by client In-Reply-To: <201005251206.43305.gambas@...1...> References: <201005251206.43305.gambas@...1...> Message-ID: Ok i have posted all tests to you. As you can see also Evolution ( and also Outlook) loose attached file (the file is in the message source ) but it isn't able to open attachment. When smtp class generated message have body message and attachment. Only kmail can open and read all the message parts. Best Regards Marco From leonardo at ...1237... Thu May 27 14:49:29 2010 From: leonardo at ...1237... (Leonardo Miliani) Date: Thu, 27 May 2010 14:49:29 +0200 Subject: [Gambas-user] Re ODBC and MS SQL In-Reply-To: <000801cafd0c$3b9277d0$b2b76770$@net> References: <000801cafd0c$3b9277d0$b2b76770$@net> Message-ID: <1274964569.8399.2.camel@"hp_host"> Il giorno mer, 26/05/2010 alle 20.47 +0100, Franklin Solutions Limited ha scritto: > > Good evening > > > > I also tried connecting to a MS SQL server using the ODBC connection. I (...) Thank you for your reply.... I will contact my friend that has this problem and I will forward him your message. -- Leonardo Miliani www.leonardomiliani.com Webmaster e co-fondatore di www.gambas-it.org Il portale di riferimento per i programmatori Gambas italiani From gambas at ...1... Thu May 27 15:06:14 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Thu, 27 May 2010 15:06:14 +0200 Subject: [Gambas-user] Structure support in Gambas 3 In-Reply-To: <4BFE1B43.5090402@...221...> References: <201005270051.42159.gambas@...1...> <4BFE1B43.5090402@...221...> Message-ID: <201005271506.14136.gambas@...1...> > > To define a structure, you must declare it inside a class or a module > > that > > > > way: > > Public Struct > > As > > As > > End Struct > > This means you cannot define the struct itself at runtime like an > object, right? You must know the struct's composition of variables in > advance? So the program could not react freely to a change in the > database? (Don't know how to express it more clearly...) Of course, as for the other classes. If you don't know the structure of your data at compile time, you must use something else like a collection. Maybe there will be a trick (not possible at the moment), like creating a gambas project at runtime, compile it, and loads it as a component. But it would be weird to do that. > > But it's great, I find this practical as well when you include external > functions from the system. > > > ability to release incremental versions of Gambas (3.1, 3.2...) that > > won't be just bug fixes like in the 2.x versions. > > I don't quite see what you mean by that. Do you intend to create an > update mechanism that loads new libraries? > No. I just want to be able to release new features faster in Gambas 3. But that will mean that: - If X > Y, 3.X must be able to run programs in 3.Y, maybe with a recompilation. - But not the contrary. 3.Y may not be able to run 3.X programs. Users will have to upgrade. - You won't be able to install 3.X and 3.Y on the same machine. Package dependencies must be more precise ("depends on 3.1 gambas runtime" instead of "depends on any 3.x gambas runtime"). Only the 4.0 will be able to break the backward compatibility, by removing instructions, features, changing the meaning of them... Regards, -- Beno?t Minisini From gambas at ...1... Thu May 27 15:07:17 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Thu, 27 May 2010 15:07:17 +0200 Subject: [Gambas-user] Structure support in Gambas 3 In-Reply-To: References: <201005270051.42159.gambas@...1...> Message-ID: <201005271507.17681.gambas@...1...> > > > > Now Fabien has just gb.report to finish, and I we will be able to release > > an alpha version of Gambas 3. :-) > > i need users test it to say me what are there needs.. Just finish what must be finished, or tell me what is needed (I can draw the missing icons). When users will test it! Regards, -- Beno?t Minisini From dosida at ...626... Thu May 27 16:09:05 2010 From: dosida at ...626... (Dimitris Anogiatis) Date: Thu, 27 May 2010 08:09:05 -0600 Subject: [Gambas-user] Structure support in Gambas 3 In-Reply-To: <201005271506.14136.gambas@...1...> References: <201005270051.42159.gambas@...1...> <4BFE1B43.5090402@...221...> <201005271506.14136.gambas@...1...> Message-ID: Beno?t, What would happen if there was a case you had program A with 3.x dependencies and Program B running 3.y dependencies? Or are you only referring to complete Gambas 3.x and 3.y installations on the same machine? Regards, Dimitris 2010/5/27 Beno?t Minisini > > > To define a structure, you must declare it inside a class or a module > > > that > > > > > > way: > > > Public Struct > > > As > > > As > > > End Struct > > > > This means you cannot define the struct itself at runtime like an > > object, right? You must know the struct's composition of variables in > > advance? So the program could not react freely to a change in the > > database? (Don't know how to express it more clearly...) > > Of course, as for the other classes. If you don't know the structure of > your > data at compile time, you must use something else like a collection. > > Maybe there will be a trick (not possible at the moment), like creating a > gambas project at runtime, compile it, and loads it as a component. But it > would be weird to do that. > > > > > But it's great, I find this practical as well when you include external > > functions from the system. > > > > > ability to release incremental versions of Gambas (3.1, 3.2...) that > > > won't be just bug fixes like in the 2.x versions. > > > > I don't quite see what you mean by that. Do you intend to create an > > update mechanism that loads new libraries? > > > > No. I just want to be able to release new features faster in Gambas 3. But > that will mean that: > > - If X > Y, 3.X must be able to run programs in 3.Y, maybe with a > recompilation. > - But not the contrary. 3.Y may not be able to run 3.X programs. Users will > have to upgrade. > - You won't be able to install 3.X and 3.Y on the same machine. > > Package dependencies must be more precise ("depends on 3.1 gambas runtime" > instead of "depends on any 3.x gambas runtime"). > > Only the 4.0 will be able to break the backward compatibility, by removing > instructions, features, changing the meaning of them... > > Regards, > > -- > Beno?t Minisini > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas at ...1... Thu May 27 16:16:05 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Thu, 27 May 2010 16:16:05 +0200 Subject: [Gambas-user] Structure support in Gambas 3 In-Reply-To: References: <201005270051.42159.gambas@...1...> <201005271506.14136.gambas@...1...> Message-ID: <201005271616.05288.gambas@...1...> > Beno?t, > What would happen if there was a case you had program A with 3.x > dependencies and Program B running 3.y dependencies? > Or are you only referring to complete Gambas 3.x and 3.y installations on > the same machine? > > Regards, > Dimitris > If you upgrade from Gambas 3.X to Gambas 3.Y, with Y > X, then all your old projects should continue to run. A recompilation may be needed if the bytecode version change. But I will try to avoid that as much as possible, and will emit a big warning otherwise. The requirement is that Gambas 3.Y must be backward compatible with Gambas 3.X. But a program that needs Gambas 3.Y will not be able to run with Gambas 3.X. Regards, -- Beno?t Minisini From jussi.lahtinen at ...626... Thu May 27 16:22:08 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Thu, 27 May 2010 17:22:08 +0300 Subject: [Gambas-user] Structure support in Gambas 3 In-Reply-To: <201005270051.42159.gambas@...1...> References: <201005270051.42159.gambas@...1...> Message-ID: > Passing structures to extern functions is not correctly supported at the > moment, but it will. Nice! Does that mean objects are also passable in future? Jussi From shordi at ...626... Thu May 27 20:43:17 2010 From: shordi at ...626... (=?ISO-8859-1?Q?Jorge_Carri=F3n?=) Date: Thu, 27 May 2010 20:43:17 +0200 Subject: [Gambas-user] Blanks in filename and path, problems with shell In-Reply-To: References: <201005261747.40309.rospolosco@...152...> <201005261946.55836.gregor@...2441...> <1274899155.6502.4.camel@...40...> <201005262115.33044.gregor@...2441...> <1274907245.6502.14.camel@...40...> Message-ID: Gregor: Here you have the pdf manipulator in multilingual version: Spanish and English. Please tell me if it works in English, I can't test it yet. Regards El 27 de mayo de 2010 09:52, Jorge Carri?n escribi?: > Gregor: > Don't waste your time translating it. I've made the translation to English > yesterday. I upload it this evening to my domain and you will should > download without problems. (If you want translate to german o russian I'm > afraid that you have by your own...) > > 2010/5/26 Charlie Reinl > >> Am Mittwoch, den 26.05.2010, 21:15 +0200 schrieb gregor at ...2441...: >> > Hi charlie, >> > >> > I found it, set Spanish as default language. >> > >> > I translate something to german, when I start the application I get the >> german >> > translation, but how i get the spanish orginal text? Have I add a >> spanish >> > translation, or for what language will the untranslated text used? >> > >> > I try to change the KDE enviroment language but I still get the german >> > text,... >> > >> > questions over questions,... >> > >> > Bye >> > >> > Gregor >> > >> > >> ------------------------------------------------------------------------------ >> Hello Gregor, >> >> when pressing CTRL+T you should have something like the attached screen >> shot, there you have the spanisch text on the left side. >> >> If you want to start the hole app with spanisch text, you have to have a >> look to Toni Rosa agendaxml project at >> http://agendaxml.sourceforge.net >> he made it running. >> >> Good luck >> Charlie >> >> >> ------------------------------------------------------------------------------ >> >> >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> >> > From ea7dfh at ...2382... Thu May 27 21:08:21 2010 From: ea7dfh at ...2382... (EA7DFH) Date: Thu, 27 May 2010 21:08:21 +0200 Subject: [Gambas-user] Structure support in Gambas 3 In-Reply-To: <201005270051.42159.gambas@...1...> References: <201005270051.42159.gambas@...1...> Message-ID: <4BFEC325.2000009@...2382...> El 27/05/10 00:51, Beno?t Minisini escribi?: > Hi, > > I have just committed a new big internal change for Gambas 3 in revision > #2970: structure support. > > It is not 100% finished, must most of the useful parts are there. If that > crashes your program - I will be amazed if it won't :-) - you know where to > knock. > > How does it work? > > To define a structure, you must declare it inside a class or a module that > way: > > Public Struct > As > As > End Struct > > A structure is always public (at the moment). > > A structure is a class, with only public members that are actually variables. > > You can embed a structure inside an object that way: > > Private As Struct > > Note the 'Struct' keyword inserted before . > > An embedded structure is not an object on its own. Its data is allocated > inside the object where it is declared. Like a "static array" (that should be > named "embedded array" actually). Note that you cannot make an "embedded > array" of static structures. > > You can embed a structure inside another structure (logical, as a structure is > a class). That way, you can create russian dolls if you like. Here is a stupid > example: > > Public Struct Car > Model As String > Registration As String > MaxSpeed As Float > End Struct > > Public Struct Person > Name As String > Age As Integer > BirthDate As Date > FirstCar As Struct Car > SecondCar As Struct Car > End Struct > Enjoy it. > Hi Thanks for this new amazing feature. I've noted that while writing code, autocompleter still isn't able to manage/display Struct members. Is it planned to do so? Everything else works as expected so far, although I didn't tested it deeply. Regards -- Jesus, EA7DFH From ea7dfh at ...2382... Thu May 27 21:20:00 2010 From: ea7dfh at ...2382... (EA7DFH) Date: Thu, 27 May 2010 21:20:00 +0200 Subject: [Gambas-user] Gambas 3 Autocompleter - Slight issue Message-ID: <4BFEC5E0.2020902@...2382...> Hi all In Gambas2, when I accept an autocomplete suggestion, it writes the suggested code (property, methot or whatever) *plus* a trailing space to continue writing code, which is pretty handy. However Gambas3 doesn't behave the same way. Is it a bug or a feature? Not a big issue, but I prefer the Gambas2 way :-) -- Jesus, EA7DFH From gambas at ...1... Thu May 27 23:26:45 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Thu, 27 May 2010 23:26:45 +0200 Subject: [Gambas-user] Structure support in Gambas 3 In-Reply-To: <4BFEC325.2000009@...2382...> References: <201005270051.42159.gambas@...1...> <4BFEC325.2000009@...2382...> Message-ID: <201005272326.45797.gambas@...1...> > > Hi > > Thanks for this new amazing feature. > > I've noted that while writing code, autocompleter still isn't able to > manage/display Struct members. Is it planned to do so? Yes, even I have no idea how to do that yet. Regards, -- Beno?t Minisini From admhardsoft at ...253... Fri May 28 05:52:29 2010 From: admhardsoft at ...253... (Tomas Rodriguez) Date: Thu, 27 May 2010 23:52:29 -0400 Subject: [Gambas-user] Gambas for windows, how? In-Reply-To: <4BEC3B04.6030805@...1909...> References: <1273754550.6554.9.camel@...40...><325768041-1273754767-cardhu_decombobulator_blackberry.rim.net-1883005232-@...2405...><4BEC02C6.7000304@...1000...><2009826709-1273759169-cardhu_decombobulator_blackberry.rim.net-1272103203-@...2405...><4BEC108A.6080406@...1000...> <4BEC1297.9080208@...2015...><1588905289-1273768912-cardhu_decombobulator_blackberry.rim.net-234644523-@...2405...> <4BEC3B04.6030805@...1909...> Message-ID: I like that solution, actually I installed already the andlinux, and xming(andlinux installation ask me if I wanna install too), but what should I do now? after the installation, how can I install gambas and how can I have access to gambas since windows. thanks for your help tomas -------------------------------------------------- From: "Doriano Blengino" Sent: Thursday, May 13, 2010 1:46 PM To: "mailing list for gambas users" Subject: Re: [Gambas-user] Gambas for windows, how? > Dimitris Anogiatis ha scritto: >> Tomas, >> What you could do in this case, is setup a machine with Debian or Ubuntu >> on >> the customer's premises, (It doesn't have to be a top notch machine) and >> setup x2go and he can use the application from Windows by logging in to >> the >> debian machine using SSH and x2go which is a terminal server (kinda like >> RDP >> for windows). >> >> Another solution is to create a Virtual Machine (I usually use >> Virtualbox) >> of Ubuntu or debian on the customer's fastest machine enable RDP and >> login >> with Windows Remote Desktop client and use Gambas that way. >> > There is also AndLinux: http://www.andlinux.org/ > > It is not an emulator - it is a kernel which runs as a windows service. > > I use it on one of my machines and it is amazing: stable, fast, not > memory hungry, sees everything windows sees (usb sticks, CDs, samba > shares). You only need to add an X server (I use Xming). > > I use it to develop with gambas, and it works well. > > Salutations, > Doriano > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From doriano.blengino at ...1909... Fri May 28 08:46:24 2010 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Fri, 28 May 2010 08:46:24 +0200 Subject: [Gambas-user] Gambas for windows, how? In-Reply-To: References: <1273754550.6554.9.camel@...40...><325768041-1273754767-cardhu_decombobulator_blackberry.rim.net-1883005232-@...2405...><4BEC02C6.7000304@...1000...><2009826709-1273759169-cardhu_decombobulator_blackberry.rim.net-1272103203-@...2405...><4BEC108A.6080406@...1000...> <4BEC1297.9080208@...2015...><1588905289-1273768912-cardhu_decombobulator_blackberry.rim.net-234644523-@...2405...> <4BEC3B04.6030805@...1909...> Message-ID: <4BFF66C0.9060804@...1909...> Tomas Rodriguez ha scritto: > I like that solution, actually I installed already the andlinux, and > xming(andlinux installation ask me if I wanna install too), but what should > I do now? after the installation, how can I install gambas and how can I > have access to gambas since windows. > Question one: how to install gambas. The (now old) AndLinux I installed was an Ubuntu distribution. I used synaptic to install everything I needed. To be sincere, I poked it in many ways and used debian repositories, and now it is more a debian than an ubuntu; to install gambas I copied the whole bunch of its files to the file system, instead of using a package manager. Anyway, the final reply to the question is: use any method you prefer: source compilation or package install. I would prefer the second - easier and faster. Question two: how to access your gambas application from windows. When you start andlinux, it normally ends up with showing a nice xfce panel which you can customize - delete the unwanted icons and add as many you need. You can instead modify (as I did) the start-up sequence of the system: in file /etc/inittab, a call to /usr/bin/X11/startwindowsterminalsession is made in file /usr/bin/X11/startwindowsterminalsession, the command specified by /etc/winterm is launched The file /etc/winterm contained the xfce panel - I replaced it with: /usr/local/bin/rxvt -title AndLinux "rxvt" is a small script which launches an mrxvt (multitab X terminal - it does *exactly* what I need and nothing more...). As you can see, you can modify things at different points. I would choose to modify /etc/winterm to launch my gambas application. Even if you modify the startup sequence, restricting access to the final programs only, you can always enter the system if you need to do some maintenance - the andlinux software installs some links in the windoze start menu: in my case, there is a couple of terminal sessions where you can log in and do everything you want. So you can leave your customer with an easy icon to launch, still keeping a way for you (under password) to do administration. The only thing to add is that, giving you only edit /etc/winterm, that the command there specified will be re-started again and again, because of the way it is called (from inittab). The simplest way to solve is to include in your script a "shutdown" command in the last line; I mean, /etc/winterm should contain the name of a script, like /usr/local/bin/userapplication, which contains something like /somepath/someapplication.gambas halt # shutdown andlinux, not the computer! Anyway, you can do other kinds of modifications - the andlinux system is a normal unix system, so it gives you full control on every aspect. This is why I reported the whole startup sequence, starting from /etc/inittab. Hope this helps - ask more if in need, cheers, Doriano. > thanks for your help > tomas > > > >> There is also AndLinux: http://www.andlinux.org/ >> >> It is not an emulator - it is a kernel which runs as a windows service. >> From dr.diesel at ...626... Fri May 28 15:24:51 2010 From: dr.diesel at ...626... (Dr.Diesel) Date: Fri, 28 May 2010 06:24:51 -0700 (PDT) Subject: [Gambas-user] gbr3: no project file in '/usr/local/bin/gambas3'. Message-ID: <28706873.post@...1379...> FYI, caused by Today's SVN pull, 2975, everything was fine 2 days ago. [andy at ...2444... ~]$ gambas3 gbr3: no project file in '/usr/local/bin/gambas3'. [andy at ...2444... ~]$ Happy to provide more info if needed. Thanks -- View this message in context: http://old.nabble.com/gbr3%3A-no-project-file-in-%27-usr-local-bin-gambas3%27.-tp28706873p28706873.html Sent from the gambas-user mailing list archive at Nabble.com. From ea7dfh at ...2382... Fri May 28 15:59:03 2010 From: ea7dfh at ...2382... (EA7DFH) Date: Fri, 28 May 2010 15:59:03 +0200 Subject: [Gambas-user] Gambas 3 Autocompleter - Slight issue In-Reply-To: <4BFEC5E0.2020902@...2382...> References: <4BFEC5E0.2020902@...2382...> Message-ID: <4BFFCC27.8050606@...2382...> El 27/05/10 21:20, EA7DFH escribi?: > Hi all > > In Gambas2, when I accept an autocomplete suggestion, it writes the > suggested code (property, methot or whatever) *plus* a trailing space to > continue writing code, which is pretty handy. > > However Gambas3 doesn't behave the same way. Is it a bug or a feature? > > Not a big issue, but I prefer the Gambas2 way :-) > Reading my own post, it seems I was not very precise. What I meant is that Gambas 3 doesn't insert an space after autocompletion, needing to do so manually. Hope this is clearer now. Regards -- Jesus, EA7DFH From gambas.fr at ...626... Fri May 28 21:47:51 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Fri, 28 May 2010 21:47:51 +0200 Subject: [Gambas-user] gbr3: no project file in '/usr/local/bin/gambas3'. In-Reply-To: <28706873.post@...1379...> References: <28706873.post@...1379...> Message-ID: it's corrected in the last revision 2010/5/28 Dr.Diesel : > > FYI, caused by Today's SVN pull, 2975, everything was fine 2 days ago. > > [andy at ...2444... ~]$ gambas3 > gbr3: no project file in '/usr/local/bin/gambas3'. > [andy at ...2444... ~]$ > > Happy to provide more info if needed. > > Thanks > -- > View this message in context: http://old.nabble.com/gbr3%3A-no-project-file-in-%27-usr-local-bin-gambas3%27.-tp28706873p28706873.html > Sent from the gambas-user mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From dr.diesel at ...626... Fri May 28 22:45:46 2010 From: dr.diesel at ...626... (Dr.Diesel) Date: Fri, 28 May 2010 13:45:46 -0700 (PDT) Subject: [Gambas-user] gbr3: no project file in '/usr/local/bin/gambas3'. In-Reply-To: References: <28706873.post@...1379...> Message-ID: <28711742.post@...1379...> Fabien Bodard-4 wrote: > > it's corrected in the last revision > Thank you, I confirm it is now fixed! -- View this message in context: http://old.nabble.com/gbr3%3A-no-project-file-in-%27-usr-local-bin-gambas3%27.-tp28706873p28711742.html Sent from the gambas-user mailing list archive at Nabble.com. From leonardo at ...1237... Sun May 30 11:21:22 2010 From: leonardo at ...1237... (Leonardo Miliani) Date: Sun, 30 May 2010 11:21:22 +0200 Subject: [Gambas-user] smtp mail with gambas 2.20 sent mail body message and/or attached file not sowhon/opened by client In-Reply-To: References: <201005251206.43305.gambas@...1...> Message-ID: <1275211282.3172.10.camel@"hp_host"> Il giorno gio, 27/05/2010 alle 14.46 +0200, marco bra ha scritto: > Ok i have posted all tests to you. > > As you can see also Evolution ( and also Outlook) loose attached file > (the file is in the message source ) but it isn't able to open > attachment. > When smtp class generated message have body message and attachment. > Only kmail can open and read all the message parts. > > Best Regards > > Marco > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user I had in the past similar problems using SMTP module. I agreed that it is a problem of the module that doesn't keep care of the MIME types of the attachments, so if you include only the message body or 1 file, it works correctly. But if you include a file, the module mixes the MIMEs so that mail clients cannot undestand where the body finishes and the attachment begins. The only solution I found to send a mail from Gambas is using an external mail prog like mutt and a server mail like procmail or similars. -- Leonardo Miliani www.leonardomiliani.com Webmaster e co-fondatore di www.gambas-it.org Il portale di riferimento per i programmatori Gambas italiani From gambas at ...1... Sun May 30 13:22:40 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sun, 30 May 2010 13:22:40 +0200 Subject: [Gambas-user] smtp mail with gambas 2.20 sent mail body message and/or attached file not sowhon/opened by client In-Reply-To: <1275211282.3172.10.camel@"hp_host"> References: <1275211282.3172.10.camel@"hp_host"> Message-ID: <201005301322.40115.gambas@...1...> > Il giorno gio, 27/05/2010 alle 14.46 +0200, marco bra ha scritto: > > Ok i have posted all tests to you. > > > > As you can see also Evolution ( and also Outlook) loose attached file > > (the file is in the message source ) but it isn't able to open > > attachment. > > When smtp class generated message have body message and attachment. > > Only kmail can open and read all the message parts. > > > > Best Regards > > > > Marco > > > > ------------------------------------------------------------------------- > > ----- > > > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > I had in the past similar problems using SMTP module. > I agreed that it is a problem of the module that doesn't keep care of > the MIME types of the attachments, so if you include only the message > body or 1 file, it works correctly. But if you include a file, the > module mixes the MIMEs so that mail clients cannot undestand where the > body finishes and the attachment begins. > > The only solution I found to send a mail from Gambas is using an > external mail prog like mutt and a server mail like procmail or > similars. I think that the problem comes form a missing newline: can anyone try with revision #2982 to confirm or not? Thanks in advance. -- Beno?t Minisini From gambas at ...1... Sun May 30 13:25:17 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sun, 30 May 2010 13:25:17 +0200 Subject: [Gambas-user] Gambas3: error with ODBC In-Reply-To: <1274863772.12836.4.camel@"hp_host"> References: <1273790406.9887.2.camel@"hp_host"> <201005241520.40268.gambas@...1...> <1274863772.12836.4.camel@"hp_host"> Message-ID: <201005301325.17087.gambas@...1...> > Il giorno lun, 24/05/2010 alle 15.20 +0200, Beno?t Minisini ha scritto: > > > Il giorno ven, 21/05/2010 alle 13.23 +0200, Beno?t Minisini ha scritto: > > > > > Il giorno sab, 15/05/2010 alle 23.13 +0200, Beno?t Minisini ha scritto: > > > > > > > Gambas 3, 64 bit version. > > > > > > > During the connection setup with an ODBC database everything > > > > > > > goes right, but when I try to exec a query with > > > > > > > Connectin.Exec, Gambas crashes with #11 error. > > > > > > > > > > > > Can you get a backtrace with gdb? And better get an output of > > > > > > running your project inside valgrind? > > > > > > > > > > Program received signal SIGSEGV, Segmentation fault. > > > > > 0x00007ffff722cdfd in free () from /lib/libc.so.6 > > > > > > > > That is not very useful! > > > > > > > > Read the "Reporting a problem" page on the web site to see how to get > > > > a backtrage. > > > > > > > > Regards, > > > > > > Sorry but I'm an intermediate.... I am not the person who has the > > > error. I'm making the report so I write what I receive ;-) > > > > > > Here is the complete (I hope...) report: > > > GNU gdb (GDB) 7.1-ubuntu > > > Copyright (C) 2010 Free Software Foundation, Inc. > > > License GPLv3+: GNU GPL version 3 or later > > > > > > This is free software: you are free to change and redistribute it. > > > There is NO WARRANTY, to the extent permitted by law. Type "show > > > copying" > > > and "show warranty" for details. > > > This GDB was configured as "x86_64-linux-gnu". > > > For bug reporting instructions, please see: > > > ... > > > Reading symbols from /usr/local/bin/gbx3...done. > > > (gdb) set args -p > > > (gdb) run > > > Starting program: /usr/local/bin/gbx3 -p > > > [Thread debugging using libthread_db enabled] > > > QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: > > > Nessun file o directory > > > [New Thread 0x7fffe9c98710 (LWP 1859)] > > > QFileSystemWatcher: failed to add paths: /home/paolo/.config/ibus/bus > > > Bus::open: Can not get ibus-daemon's address. > > > IBusInputContext::createInputContext: no connection to ibus-daemon > > > > > > Program received signal SIGSEGV, Segmentation fault. > > > 0x00007ffff722cdfd in free () from /lib/libc.so.6 > > > (gdb) bt > > > #0 0x00007ffff722cdfd in free () from /lib/libc.so.6 > > > #1 0x0000000000419187 in GB_Free (addr=0x7fffffffc4ec) at > > > gbx_api.c:1444 > > > #2 0x00007ffff12cefba in my_free (desc=0x9a4510, db=0x9a44c8) at > > > main.c:117 > > > #3 open_database (desc=0x9a4510, db=0x9a44c8) at main.c:532 > > > #4 0x00007ffff14d75bc in DB_Open (desc=0x9a4510, driver=0x9a44c0, > > > db=0x9a44c8) > > > > > > at main.c:209 > > > > > > #5 0x00007ffff14d7b45 in open_connection (_object=0x9a44b0) > > > > > > at CConnection.c:81 > > > > > > #6 check_opened (_object=0x9a44b0) at CConnection.c:89 > > > #7 0x00007ffff14d826d in CCONNECTION_exec (_object=0x9a44b0, > > > _param=0x651db0) > > > > > > at CConnection.c:432 > > > > > > #8 0x0000000000407d7d in EXEC_call_native (exec=0xa56370, > > > > > > object=0x9a451000a08230, type=140737239627200, param=0x422f0) > > > at gbx_exec.c:979 > > > > > > #9 0x00000000004089cd in EXEC_native () at gbx_exec.c:1185 > > > #10 0x0000000000429fc1 in EXEC_loop () at gbx_exec_loop.c:982 > > > #11 0x0000000000409521 in EXEC_function_loop () at gbx_exec.c:795 > > > #12 0x00000000004098db in EXEC_function_real () at gbx_exec.c:782 > > > #13 0x0000000000419839 in raise_event (observer=, > > > > > > object=, func_id=, > > > > > > nparam=271088) > > > > > > at gbx_api.c:483 > > > > > > #14 0x0000000000419fc2 in GB_Raise (object=0x96c9b0, > > > > > > event_id=, nparam=0) at gbx_api.c:585 > > > > > > #15 0x00007ffff6d4400d in CButton::clicked (this=) > > > > > > at CButton.cpp:692 > > > > > > #16 0x00007ffff6d43cf2 in CButton::qt_metacall (this=0x7ffff6fa5910, > > > > > > _c=QMetaObject::InvokeMetaMethod, _id=0, _a=) > > > at CButton_moc.cpp:173 > > > > > > #17 0x00007ffff5082e3f in QMetaObject::activate(QObject*, QMetaObject > > > const*, int, void**) () from /usr/lib/libQtCore.so.4 > > > #18 0x00007ffff5bde5f2 in QAbstractButton::clicked(bool) () > > > > > > from /usr/lib/libQtGui.so.4 > > > > > > ---Type to continue, or q to quit--- > > > #19 0x00007ffff58f886b in ?? () from /usr/lib/libQtGui.so.4 > > > #20 0x00007ffff58f970b in ?? () from /usr/lib/libQtGui.so.4 > > > #21 0x00007ffff58f997c in > > > QAbstractButton::mouseReleaseEvent(QMouseEvent*) () > > > > > > from /usr/lib/libQtGui.so.4 > > > > > > #22 0x00007ffff5599582 in QWidget::event(QEvent*) () > > > > > > from /usr/lib/libQtGui.so.4 > > > > > > #23 0x00007ffff554322c in QApplicationPrivate::notify_helper(QObject*, > > > QEvent*) > > > > > > () from /usr/lib/libQtGui.so.4 > > > > > > #24 0x00007ffff5549ecb in QApplication::notify(QObject*, QEvent*) () > > > > > > from /usr/lib/libQtGui.so.4 > > > > > > #25 0x00007ffff507006c in QCoreApplication::notifyInternal(QObject*, > > > QEvent*) > > > > > > () from /usr/lib/libQtCore.so.4 > > > > > > #26 0x00007ffff55490ae in QApplicationPrivate::sendMouseEvent(QWidget*, > > > QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer&, bool) > > > () > > > > > > from /usr/lib/libQtGui.so.4 > > > > > > #27 0x00007ffff55c8f65 in ?? () from /usr/lib/libQtGui.so.4 > > > #28 0x00007ffff55c78ac in QApplication::x11ProcessEvent(_XEvent*) () > > > > > > from /usr/lib/libQtGui.so.4 > > > > > > #29 0x00007ffff55f4199 in ?? () from /usr/lib/libQtGui.so.4 > > > #30 0x00007ffff506e992 in > > > QEventLoop::processEvents(QFlags) () > > > from /usr/lib/libQtCore.so.4 > > > #31 0x00007ffff506ed6c in > > > QEventLoop::exec(QFlags) () > > > from /usr/lib/libQtCore.so.4 > > > #32 0x00007ffff5072aab in QCoreApplication::exec() () > > > > > > from /usr/lib/libQtCore.so.4 > > > > > > #33 0x00007ffff6d3a1cc in hook_loop () at main.cpp:673 > > > #34 0x000000000041ee78 in main (argc=1, argv=) > > > > > > at gbx.c:356 > > > > > > (gdb) > > > > The database could not be opened, and the crash actually occurs while > > releasing an ODBC handle before returning the error. > > > > At the moment, I don't know why releasing the handle crashes: I don't > > know ODBC and didn't write that code. > > > > I need the full project source code: I need to know what database code is > > executed, in order, to see what has been executed because the offended > > Exec() call. > > > > Regards, > > My contact said me that it is a little big difficult.... > The code itself is very simple: > > With Connection > .Type = "odbc" > .Host = "odbc connection name" > .User > .Password > End With > > Connectio.Exec("my query") '<-- here is the point where the error is > raised' > > But using ODBC he should also post a DB (any of the DBs that uses ODBC > driver) and the configuration files (odbc.ini & odbcinst.ini)... and he > said me that it is not so easy... > > Does anyone else has tried to connect to a MS-SQL database with Gambas? > If yes, how does he have resolved such problem? Can he run his program with valgrind and send me the output? That way: $ cd /my/gambas/project $ valgrind --tool=memcheck --num-callers=50 gbx3 ... He can redirect the valgrind output to a file if needed. Thanks in advance. Regards, -- Beno?t Minisini From marcobra.ubuntu at ...626... Sun May 30 21:50:19 2010 From: marcobra.ubuntu at ...626... (marco bra) Date: Sun, 30 May 2010 21:50:19 +0200 Subject: [Gambas-user] smtp mail with gambas 2.20 sent mail body message and/or attached file not sowhon/opened by client In-Reply-To: <201005301322.40115.gambas@...1...> References: <201005301322.40115.gambas@...1...> Message-ID: > I think that the problem comes form a missing newline: can anyone try with > revision #2982 to confirm or not? Tested on Ubuntu with Thunderbird Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.3a5pre) Gecko/20100530 Shredder/3.2a1pre Now it works...! Many thanks Marco -- Linux Infinite Freedom From ea7dfh at ...2382... Sun May 30 23:04:48 2010 From: ea7dfh at ...2382... (EA7DFH) Date: Sun, 30 May 2010 23:04:48 +0200 Subject: [Gambas-user] Bug in Gambas2 packager Message-ID: <4C02D2F0.4070409@...2382...> Hi Gambas2 SVN #2972, Ubuntu 10.04 I think this is an old bug, or perhaps a regression? When a project which uses the gb.db.sqlite3 component, generated deb packages (at least the Ubuntu ones) has a typo in such dependency in the "control" file: gambas2-gb-db-sqlite3 (>= 1.9.48), gambas2-gb-db-sqlite3 (<< 2.90) Of course, when trying to install it fails because there is not such package. The correct name must be gambas2-gb-db-sqlite, without the trailing "3". I don't know if other packages (tar, rpm, etc) are also affected. Beno?t, is there a chance to fix it? Thanks in advance -- Jesus, EA7DFH From gambas.fr at ...626... Sun May 30 23:17:51 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Sun, 30 May 2010 23:17:51 +0200 Subject: [Gambas-user] Bug in Gambas2 packager In-Reply-To: <4C02D2F0.4070409@...2382...> References: <4C02D2F0.4070409@...2382...> Message-ID: ouch old bug from the ubuntu staff... tell them 2010/5/30 EA7DFH : > Hi > > Gambas2 SVN #2972, Ubuntu 10.04 > > I think this is an old bug, or perhaps a regression? > > When a project which uses the gb.db.sqlite3 component, generated deb > packages (at least the Ubuntu ones) has a typo in such dependency in the > "control" file: > > gambas2-gb-db-sqlite3 (>= 1.9.48), gambas2-gb-db-sqlite3 (<< 2.90) > > > Of course, when trying to install it fails because there is not such > package. > > The correct name must be gambas2-gb-db-sqlite, without the trailing "3". > > I don't know if other packages (tar, rpm, etc) are also affected. > > Beno?t, is there a chance to fix it? > > Thanks in advance > > -- > Jesus, EA7DFH > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From kevinfishburne at ...1887... Mon May 31 00:07:47 2010 From: kevinfishburne at ...1887... (kevinfishburne) Date: Sun, 30 May 2010 15:07:47 -0700 (PDT) Subject: [Gambas-user] Licensing programs created with GAMBAS Message-ID: <28725178.post@...1379...> I'm working on a GAMBAS program and want to allow it to be distributed freely but not used for commercial purposes without paying a licensing fee. The program uses GTK, not Qt, so the usual Qt licensing issues shouldn't apply here. Is this possible, or do all GAMBAS programs (source or compiled) need to be under the same license as GAMBAS? ----- Kevin Fishburne, Eight Virtues www: http://sales.eightvirtues.com http://sales.eightvirtues.com e-mail: mailto:sales at ...1887... sales at ...1887... phone: (770) 853-6271 -- View this message in context: http://old.nabble.com/Licensing-programs-created-with-GAMBAS-tp28725178p28725178.html Sent from the gambas-user mailing list archive at Nabble.com. From gambas at ...1... Mon May 31 00:11:26 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 31 May 2010 00:11:26 +0200 Subject: [Gambas-user] Bug in Gambas2 packager In-Reply-To: References: <4C02D2F0.4070409@...2382...> Message-ID: <201005310011.26280.gambas@...1...> > ouch old bug from the ubuntu staff... tell them > Yes. The name of a package is "gambas2" followed by the name of the component, the points being replaced by dashes. So: gb.db.sqlite3 => gambas2-gb-db-sqlite3. Without following that scheme, the IDE packager cannot work. The names must match between the IDE and the package repository! And, for once, everything is clearly documented at http://gambasdoc.org/help/howto/package for packagers with a link on the wiki main page. So I don't know why the Ubuntu packager made that mistake. Gambas Ubuntu packages have never been correct until now, and you or another Ubuntu user must report the bug. Maybe it is more important for us to move the Metacity window close button between each version and make that an important feature. :-) Regards, -- Beno?t Minisini From gambas at ...1... Mon May 31 00:20:34 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 31 May 2010 00:20:34 +0200 Subject: [Gambas-user] Licensing programs created with GAMBAS In-Reply-To: <28725178.post@...1379...> References: <28725178.post@...1379...> Message-ID: <201005310020.34896.gambas@...1...> > I'm working on a GAMBAS program and want to allow it to be distributed > freely but not used for commercial purposes without paying a licensing > fee. The program uses GTK, not Qt, so the usual Qt licensing issues > shouldn't apply here. Is this possible, or do all GAMBAS programs (source > or compiled) need to be under the same license as GAMBAS? > > ----- > Kevin Fishburne, Eight Virtues > www: http://sales.eightvirtues.com http://sales.eightvirtues.com > e-mail: mailto:sales at ...1887... sales at ...1887... > phone: (770) 853-6271 No, you can give your program the licence you want, provided that you respect the licence of Gambas itself (GPLv2+) and all the libraries you are using. Gambas does not force any licence to the programs it runs, but some libraries like Qt3 may. Outside of Qt3 and Firebird component, nothing is a problem I think. Regards, -- Beno?t Minisini From steven at ...2097... Mon May 31 02:24:32 2010 From: steven at ...2097... (Steven James Drinnan) Date: Mon, 31 May 2010 08:24:32 +0800 Subject: [Gambas-user] Blanks in filename and path, problems with shell In-Reply-To: <9f80d47f5b6880e103f1180250462f93@...2442...> References: <9f80d47f5b6880e103f1180250462f93@...2442...> Message-ID: <1275265472.7343.8.camel@...2273...> I just make each file name encapsulated with ' eg if i would like to use /home/steven/My Documents/some.txt as a location I would do path = "'/home/steven/My Documents/some.txt'" and the the shell cmd will work correctly like this cmd = "gedit " & path shell cmd .... remember shell is just like using bash, so put ' around the paths you need to use. Sorry I can not give an example with pdftk, but you should be able to modify the example to suit you needs. Steven On Wed, 2010-05-26 at 09:03 +0200, gregor wrote: > Hi, > > I create a little GUI to merge several pdfs with a background. > The syntx for pdftk is 'pdftk [inputpath/inputfile] background > [backgroundfile] output [outputpath/outputfile]' > > With no blanks in [*] there is no problems, with blanks the shell need a > quote for the blank. > > No I use the variant 'pdftk REPLACE([inputfile]," ",CHR(92)&" ") background > REPLACE([backgroundfile]," ",CHR(92)&" ") output REPLACE([outputfile]," > ",CHR(92)&" ")' > > It work but is a little bit ugly,... > > Maybe there is a better way? > > When I tried it so: > inputpath = REPLACE(DirChooser1.Value," ",CHR(92)&" ") I got a String wich > seems right, but the function DIR(inputpath) had a problem with it,... > > Bye > > Gregor > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas at ...1... Mon May 31 02:55:57 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 31 May 2010 02:55:57 +0200 Subject: [Gambas-user] Blanks in filename and path, problems with shell In-Reply-To: <1275265472.7343.8.camel@...2273...> References: <9f80d47f5b6880e103f1180250462f93@...2442...> <1275265472.7343.8.camel@...2273...> Message-ID: <201005310255.57734.gambas@...1...> > I just make each file name encapsulated with ' eg if i would like to > use > > /home/steven/My Documents/some.txt > > as a location I would do > > path = "'/home/steven/My Documents/some.txt'" > > and the > the shell cmd will work correctly like this > > cmd = "gedit " & path > shell cmd .... > > remember shell is just like using bash, so put ' around the paths you > need to use. > > Sorry I can not give an example with pdftk, but you should be able to > modify the example to suit you needs. > > > Steven > Once again, to send a file path to Shell, you just have to use Shell$() to quote it (or Quote.Shell in Gambas 2): SHELL cmd & " " & Shell$(FirstPath) & " " & Shell$(SecondPath) ...etc. Regards, -- Beno?t Minisini From ea7dfh at ...2382... Mon May 31 17:19:30 2010 From: ea7dfh at ...2382... (EA7DFH) Date: Mon, 31 May 2010 17:19:30 +0200 Subject: [Gambas-user] Bug in Gambas2 packager In-Reply-To: <201005310011.26280.gambas@...1...> References: <4C02D2F0.4070409@...2382...> <201005310011.26280.gambas@...1...> Message-ID: <4C03D382.8080501@...2382...> El 31/05/10 00:11, Beno?t Minisini escribi?: >> ouch old bug from the ubuntu staff... tell them >> > > Yes. The name of a package is "gambas2" followed by the name of the component, > the points being replaced by dashes. > > So: gb.db.sqlite3 => gambas2-gb-db-sqlite3. > > Without following that scheme, the IDE packager cannot work. The names must > match between the IDE and the package repository! > > And, for once, everything is clearly documented at > http://gambasdoc.org/help/howto/package for packagers with a link on the wiki > main page. So I don't know why the Ubuntu packager made that mistake. Gambas > Ubuntu packages have never been correct until now, and you or another Ubuntu > user must report the bug. > > > Maybe it is more important for us to move the Metacity window close button > between each version and make that an important feature. :-) > > > Regards, > Ok, good to know, so I was wrong. I will report this to the Ubuntu staff. Thanks! Regards -- Jesus, EA7DFH From charles at ...1784... Mon May 31 17:59:13 2010 From: charles at ...1784... (charlesg) Date: Mon, 31 May 2010 08:59:13 -0700 (PDT) Subject: [Gambas-user] Gambas3:draw.begin(printer) Message-ID: <28732431.post@...1379...> Hi Converting Gambas2 to Gambas3 using QT. draw.begin(printer) now says that printer is 'not a drawable object' printer.name reports correctly. Grateful any help or pointer to the documentation I can't find! rgds -- View this message in context: http://old.nabble.com/Gambas3%3Adraw.begin%28printer%29-tp28732431p28732431.html Sent from the gambas-user mailing list archive at Nabble.com. From ea7dfh at ...2382... Mon May 31 18:29:48 2010 From: ea7dfh at ...2382... (EA7DFH) Date: Mon, 31 May 2010 18:29:48 +0200 Subject: [Gambas-user] Bug in Gambas2 packager In-Reply-To: <4C03D382.8080501@...2382...> References: <4C02D2F0.4070409@...2382...> <201005310011.26280.gambas@...1...> <4C03D382.8080501@...2382...> Message-ID: <4C03E3FC.7000606@...2382...> El 31/05/10 17:19, EA7DFH escribi?: > El 31/05/10 00:11, Beno?t Minisini escribi?: >>> ouch old bug from the ubuntu staff... tell them >>> >> >> Yes. The name of a package is "gambas2" followed by the name of the component, >> the points being replaced by dashes. >> >> So: gb.db.sqlite3 => gambas2-gb-db-sqlite3. >> >> Without following that scheme, the IDE packager cannot work. The names must >> match between the IDE and the package repository! >> >> And, for once, everything is clearly documented at >> http://gambasdoc.org/help/howto/package for packagers with a link on the wiki >> main page. So I don't know why the Ubuntu packager made that mistake. Gambas >> Ubuntu packages have never been correct until now, and you or another Ubuntu >> user must report the bug. >> >> >> Maybe it is more important for us to move the Metacity window close button >> between each version and make that an important feature. :-) >> >> >> Regards, >> > Ok, good to know, so I was wrong. I will report this to the Ubuntu staff. > > Thanks! > > Regards > I filled this bug to launchpad. For those who are affected, please take a moment to add your own comment or subscribe on this bug. Perhaps we should make more "pressure", ;-) https://bugs.launchpad.net/ubuntu/+source/gambas2/+bug/587957 Regards, -- Jesus, EA7DFH From gambas.fr at ...626... Mon May 31 18:51:38 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Mon, 31 May 2010 18:51:38 +0200 Subject: [Gambas-user] Gambas3:draw.begin(printer) In-Reply-To: <28732431.post@...1379...> References: <28732431.post@...1379...> Message-ID: 2010/5/31 charlesg : > > Hi > > Converting Gambas2 to Gambas3 using QT. > > draw.begin(printer) now says that printer is 'not a drawable object' > printer.name reports correctly. yes it's true as printer do not use, draw any now, but paint. so you have to draw the page in the _draw event of the printer http://gambasdoc.org/help/comp/gb.qt4/printer?v3 http://gambasdoc.org/help/comp/gb.qt4/printer/.draw?v3 > > Grateful any help or pointer to the documentation I can't find! > > rgds > -- > View this message in context: http://old.nabble.com/Gambas3%3Adraw.begin%28printer%29-tp28732431p28732431.html > Sent from the gambas-user mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user >