From gambas at ...1... Mon Nov 1 13:57:14 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 1 Nov 2010 13:57:14 +0100 Subject: [Gambas-user] Desktop.Open slows application In-Reply-To: <201010300237.15201.rospolosco@...152...> References: <201010300237.15201.rospolosco@...152...> Message-ID: <201011011357.14808.gambas@...1...> > Hi, Benoit. > > I download a file and I want to have a preview while downloading. > While downloading, a progress value is updated every second or so. > > If I use Desktop.Open(URL) to preview the file, the progress value is > blocked until the Desktop default application starts playing the file. > In this case I talk about amarok. But if I use a SHELL call instedad of > Desktop.Open(URL) everything is fine and the progress is not blocked. > I would like Desktop.Open would work as a shell call or exec with no WAIT > at all. Is it possible? Something like: > > Desktop.Open(URL, False) if you don't want to wait that starting. > > finally: > > SHELL "amarok -a -p " & URL doesn't stop anything > > Desktop.Open(URL) pauses the program, I mean the progress update. > > Regards, > > Stefano > Hi, In revision #3275, Desktop.Open() now takes one more optional argument to tell if the URL must be opened in background or not. By default, the URL is opened in background. Regards, -- Beno?t Minisini From rospolosco at ...152... Mon Nov 1 16:07:49 2010 From: rospolosco at ...152... (Stefano Palmeri) Date: Mon, 1 Nov 2010 16:07:49 +0100 Subject: [Gambas-user] Desktop.Open slows application In-Reply-To: <201011011357.14808.gambas@...1...> References: <201010300237.15201.rospolosco@...152...> <201011011357.14808.gambas@...1...> Message-ID: <201011011607.49998.rospolosco@...152...> Il luned? 1 novembre 2010 13:57:14 Beno?t Minisini ha scritto: > > Hi, Benoit. > > > > I download a file and I want to have a preview while downloading. > > While downloading, a progress value is updated every second or so. > > > > If I use Desktop.Open(URL) to preview the file, the progress value is > > blocked until the Desktop default application starts playing the file. > > In this case I talk about amarok. But if I use a SHELL call instedad of > > Desktop.Open(URL) everything is fine and the progress is not blocked. > > I would like Desktop.Open would work as a shell call or exec with no WAIT > > at all. Is it possible? Something like: > > > > Desktop.Open(URL, False) if you don't want to wait that starting. > > > > finally: > > > > SHELL "amarok -a -p " & URL doesn't stop anything > > > > Desktop.Open(URL) pauses the program, I mean the progress update. > > > > Regards, > > > > Stefano > > Hi, > > In revision #3275, Desktop.Open() now takes one more optional argument to > tell if the URL must be opened in background or not. By default, the URL is > opened in background. > > Regards, Good! Thanks. Regards, Stefano From rterry at ...1946... Tue Nov 2 10:33:49 2010 From: rterry at ...1946... (richard terry) Date: Tue, 2 Nov 2010 20:33:49 +1100 Subject: [Gambas-user] columnview select mode Message-ID: <201011022033.49365.rterry@...1946...> Wondered what the constant names were for the select mode. Help with mode loads this: Select This class does not exist in version 3.0. Any help appreciated. Richard From jussi.lahtinen at ...626... Tue Nov 2 18:49:25 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Tue, 2 Nov 2010 19:49:25 +0200 Subject: [Gambas-user] Under construction or bug? In-Reply-To: <201010312038.53195.gambas@...1...> References: <201010312038.53195.gambas@...1...> Message-ID: Class: *''This is test variable* *Public* Test *As* Integer *''This is test variable* *''This is test variable* Form: *Public Sub *Form_Open*()* *Dim* aa *As New* Class1 aa*.* <--- When I write this far, I expect to see "This is test variable" in help window, instead of "No help found.". *End* This used to work, and I'm not sure when it broke. But now I'm on Gambas3 rev 3275 @ Ubuntu 10.04 64bit. Jussi 2010/10/31 Beno?t Minisini > > Help line feature seems not to work correctly with recent revision. > > If I type: > > Dim test as someclass > > > > test.somevariabl... I always get "No help found". > > > > Gambas 3 rev 3265 @Ubuntu 10.04 64bit > > > > Jussi > > Can you make a little project example for me that shows what the problem > is? > > -- > Beno?t Minisini > > > ------------------------------------------------------------------------------ > Nokia and AT&T present the 2010 Calling All Innovators-North America > contest > Create new apps & games for the Nokia N8 for consumers in U.S. and Canada > $10 million total in prizes - $4M cash, 500 devices, nearly $6M in > marketing > Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store > http://p.sf.net/sfu/nokia-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From jussi.lahtinen at ...626... Tue Nov 2 20:56:26 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Tue, 2 Nov 2010 21:56:26 +0200 Subject: [Gambas-user] Under construction or bug? In-Reply-To: References: <201010312038.53195.gambas@...1...> Message-ID: Source attached, if needed for some reason. Jussi On Tue, Nov 2, 2010 at 19:49, Jussi Lahtinen wrote: > Class: > *''This is test variable* > *Public* Test *As* Integer *''This is test variable* > *''This is test variable* > > Form: > *Public Sub *Form_Open*()* > *Dim* aa *As New* Class1 > aa*.* <--- When I write this far, I expect to see "This is test > variable" in help window, instead of "No help found.". > > *End* > > This used to work, and I'm not sure when it broke. > But now I'm on Gambas3 rev 3275 @ Ubuntu 10.04 64bit. > > Jussi > > > > 2010/10/31 Beno?t Minisini > > > Help line feature seems not to work correctly with recent revision. >> > If I type: >> > Dim test as someclass >> > >> > test.somevariabl... I always get "No help found". >> > >> > Gambas 3 rev 3265 @Ubuntu 10.04 64bit >> > >> > Jussi >> >> Can you make a little project example for me that shows what the problem >> is? >> >> -- >> Beno?t Minisini >> >> >> ------------------------------------------------------------------------------ >> Nokia and AT&T present the 2010 Calling All Innovators-North America >> contest >> Create new apps & games for the Nokia N8 for consumers in U.S. and Canada >> $10 million total in prizes - $4M cash, 500 devices, nearly $6M in >> marketing >> Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store >> http://p.sf.net/sfu/nokia-dev2dev >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > -------------- next part -------------- A non-text attachment was scrubbed... Name: HelpLineTest-0.0.1.tar.gz Type: application/x-gzip Size: 4796 bytes Desc: not available URL: From tobiasboe1 at ...20... Tue Nov 2 21:56:54 2010 From: tobiasboe1 at ...20... (tobias) Date: Tue, 02 Nov 2010 21:56:54 +0100 Subject: [Gambas-user] SQLite Driver In-Reply-To: References: <201010312038.53195.gambas@...1...> Message-ID: <4CD07B16.2070100@...20...> good evening, i have a simple question. in the doc it is said that "The SQLite driver supports the version 3 of SQLite, and falls back to the version 2 driver if needed. See www.sqlite.org for more information. " first, i can't find these "more information"... and i what could be reasons for the driver to "fall back to version 2"? syntax issues? or only by Connection.Type = "sqlite2"? regards, tobi From gambas.fr at ...626... Wed Nov 3 09:13:20 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Wed, 3 Nov 2010 09:13:20 +0100 Subject: [Gambas-user] SQLite Driver In-Reply-To: <4CD07B16.2070100@...20...> References: <201010312038.53195.gambas@...1...> <4CD07B16.2070100@...20...> Message-ID: it say just that the sqlite3 driver can manage sqlite 2 database ... so ..; select sqlite3 :) 2010/11/2 tobias : > good evening, > i have a simple question. > in the doc it is said that "The SQLite driver supports the version 3 of > SQLite, and falls back to the version 2 driver if needed. See > www.sqlite.org for more information. " > first, i can't find these "more information"... > and i what could be reasons for the driver to "fall back to version 2"? > syntax issues? or only by > Connection.Type = "sqlite2"? > > regards, > tobi > > ------------------------------------------------------------------------------ > Nokia and AT&T present the 2010 Calling All Innovators-North America contest > Create new apps & games for the Nokia N8 for consumers in ?U.S. and Canada > $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing > Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store > http://p.sf.net/sfu/nokia-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Fabien Bodard From demosthenesk at ...626... Wed Nov 3 09:47:20 2010 From: demosthenesk at ...626... (user) Date: Wed, 03 Nov 2010 10:47:20 +0200 Subject: [Gambas-user] Variable overflow questions Message-ID: <1288774040.2905.10.camel@...2493...> Hi i check the overflow of variables and there is something i dont understand. My system is user at ...2493...:~$ cat /etc/*release* DISTRIB_ID=Ubuntu DISTRIB_RELEASE=10.04 DISTRIB_CODENAME=lucid DISTRIB_DESCRIPTION="Ubuntu 10.04.1 LTS" Linux ubuntu-desktop 2.6.32-25-generic #45-Ubuntu SMP Sat Oct 16 19:52:42 UTC 2010 x86_64 GNU/Linux I have this small code ----------------------------------- ' Gambas class file PUBLIC SUB Form_Open() DIM bVar AS Boolean = TRUE DIM iNum AS Byte = 255 DIM iA AS Short = 32767 DIM iRoads AS Integer = 2147483647 DIM iBig AS Long = 9223372036854775807 DIM iArea AS Single = 1.7014118E+38 DIM fPi AS Float = 8.98846567431105E+307 bVar += 1 iNum += 1 iA += 1 iRoads += 1 iBig += 1 iArea += 1 fPi += 1 PRINT bVar PRINT iNum PRINT iA PRINT iRoads PRINT iBig PRINT iArea PRINT fPi END ----------------------------------- And i get the following result False 0 -32768 -2147483648 -9223372036854775808 1.701411834605E+38 8.988465674311E+307 My question is why the Single and Float do not overflow? I got this values from the Gambas help and i think these are the upper values of variables. i expected the Single to be -1,7014118+38 according to help (did you mean -1,7014118 (E) +38?) And for Float to overflow to -8.98846567431105E+307 From doriano.blengino at ...1909... Wed Nov 3 10:26:23 2010 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Wed, 03 Nov 2010 10:26:23 +0100 Subject: [Gambas-user] Variable overflow questions In-Reply-To: <1288774040.2905.10.camel@...2493...> References: <1288774040.2905.10.camel@...2493...> Message-ID: <4CD12ABF.3020506@...1909...> user ha scritto: > Hi i check the overflow of variables and there is something i dont > understand. > > My system is > > user at ...2493...:~$ cat /etc/*release* > DISTRIB_ID=Ubuntu > DISTRIB_RELEASE=10.04 > DISTRIB_CODENAME=lucid > DISTRIB_DESCRIPTION="Ubuntu 10.04.1 LTS" > > Linux ubuntu-desktop 2.6.32-25-generic #45-Ubuntu SMP Sat Oct 16 > 19:52:42 UTC 2010 x86_64 GNU/Linux > > > > I have this small code > ----------------------------------- > ' Gambas class file > PUBLIC SUB Form_Open() > > DIM bVar AS Boolean = TRUE > DIM iNum AS Byte = 255 > DIM iA AS Short = 32767 > DIM iRoads AS Integer = 2147483647 > DIM iBig AS Long = 9223372036854775807 > DIM iArea AS Single = 1.7014118E+38 > DIM fPi AS Float = 8.98846567431105E+307 > > bVar += 1 > iNum += 1 > iA += 1 > iRoads += 1 > iBig += 1 > iArea += 1 > fPi += 1 > > PRINT bVar > PRINT iNum > PRINT iA > PRINT iRoads > PRINT iBig > PRINT iArea > PRINT fPi > > END > ----------------------------------- > > And i get the following result > > False > 0 > -32768 > -2147483648 > -9223372036854775808 > 1.701411834605E+38 > 8.988465674311E+307 > > > My question is why the Single and Float do not overflow? > Because they should not overflow, I think. "Real" numbers (in the IT sense: "float" if you prefer ) are not discrete numbers, they have a limited precision; a single bit pattern in a float corresponds to infinite numbers in the real world. When you add a very small quantity to a float (and "1", compared to 1E+38, is very small), you simply tell it to store a different number, which has the same bit representation. If a float would overflow, it would cease its main reason to exist: in most situations you *do* want it to behave so. You could add a bigger number to make it overflow: you should add a number big enough to fall in the precision bits of the mantissa. A normal float has perhaps 6/7 digits of precision; to choose a comparable a number, you should choose something like 1E+31 (this "1" falls in the digits of precision of 1E+38). But! Even in that case, the number should not overflow, but raise an error (overflow error). This last thing depends on implementation of the floating point by the host computer. Regards, Doriano From gambas.fr at ...626... Wed Nov 3 11:08:57 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Wed, 3 Nov 2010 11:08:57 +0100 Subject: [Gambas-user] Under construction or bug? In-Reply-To: References: <201010312038.53195.gambas@...1...> Message-ID: i know ... there is a bug :) 2010/11/2 Jussi Lahtinen : > Source attached, if needed for some reason. > > Jussi > > > On Tue, Nov 2, 2010 at 19:49, Jussi Lahtinen wrote: > >> Class: >> *''This is test variable* >> *Public* Test *As* Integer *''This is test variable* >> *''This is test variable* >> >> Form: >> *Public Sub *Form_Open*()* >> *Dim* aa *As New* Class1 >> aa*.* ? <--- When I write this far, I expect to see "This is test >> variable" in help window, instead of "No help found.". >> >> *End* >> >> This used to work, and I'm not sure when it broke. >> But now I'm on Gambas3 rev 3275 @ Ubuntu 10.04 64bit. >> >> Jussi >> >> >> >> 2010/10/31 Beno?t Minisini >> >> > Help line feature seems not to work correctly with recent revision. >>> > If I type: >>> > Dim test as someclass >>> > >>> > test.somevariabl... ?I always get "No help found". >>> > >>> > Gambas 3 rev 3265 @Ubuntu 10.04 64bit >>> > >>> > Jussi >>> >>> Can you make a little project example for me that shows what the problem >>> is? >>> >>> -- >>> Beno?t Minisini >>> >>> >>> ------------------------------------------------------------------------------ >>> Nokia and AT&T present the 2010 Calling All Innovators-North America >>> contest >>> Create new apps & games for the Nokia N8 for consumers in ?U.S. and Canada >>> $10 million total in prizes - $4M cash, 500 devices, nearly $6M in >>> marketing >>> Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store >>> http://p.sf.net/sfu/nokia-dev2dev >>> _______________________________________________ >>> Gambas-user mailing list >>> Gambas-user at lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>> >> >> > > ------------------------------------------------------------------------------ > Nokia and AT&T present the 2010 Calling All Innovators-North America contest > Create new apps & games for the Nokia N8 for consumers in ?U.S. and Canada > $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing > Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store > http://p.sf.net/sfu/nokia-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > -- Fabien Bodard From jussi.lahtinen at ...626... Wed Nov 3 18:54:11 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Wed, 3 Nov 2010 19:54:11 +0200 Subject: [Gambas-user] .gambas folder? Message-ID: Hi! I'm writing backup script that excludes gambas executable, but exclude option doesn't make difference between .gambas folder and *.gambas files. So, what is .gambas folder for? For debugging symbols? Jussi From tobiasboe1 at ...20... Wed Nov 3 19:10:26 2010 From: tobiasboe1 at ...20... (tobias) Date: Wed, 03 Nov 2010 19:10:26 +0100 Subject: [Gambas-user] SQLite memory database In-Reply-To: <4CD07B16.2070100@...20...> References: <201010312038.53195.gambas@...1...> <4CD07B16.2070100@...20...> Message-ID: <4CD1A592.3040409@...20...> good evening, i have a more sqlite related question: what does it mean in the doc: For SQLite, you can also create and use a database in memory by giving as database name the string ":memory:". (from gambas2 doc, gb.db.connection.name) what is creating a database in memory?? simply a temporary database or is that a special term used with sqlite?? what is the difference (with Connection.Type = "sqlite3") between Connection.Name = "" (which means /tmp/sqlite.db) and Connection.Name = ":memory:"?? just that there is a temporary file in the first case and in the second everything is done in memory?? From gambas at ...1... Wed Nov 3 19:11:23 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 3 Nov 2010 19:11:23 +0100 Subject: [Gambas-user] .gambas folder? In-Reply-To: References: Message-ID: <201011031911.23219.gambas@...1...> > Hi! > I'm writing backup script that excludes gambas executable, but exclude > option doesn't make difference between .gambas folder and *.gambas files. > So, what is .gambas folder for? For debugging symbols? > > Jussi .gambas is the folder where the compiler put the compiled bytecode that will be executed by the interpreter. Regards, -- Beno?t Minisini From jussi.lahtinen at ...626... Wed Nov 3 19:18:21 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Wed, 3 Nov 2010 20:18:21 +0200 Subject: [Gambas-user] .gambas folder? In-Reply-To: <201011031911.23219.gambas@...1...> References: <201011031911.23219.gambas@...1...> Message-ID: Ok, so no need to back up them, thanks! Jussi 2010/11/3 Beno?t Minisini > > Hi! > > I'm writing backup script that excludes gambas executable, but exclude > > option doesn't make difference between .gambas folder and *.gambas files. > > So, what is .gambas folder for? For debugging symbols? > > > > Jussi > > .gambas is the folder where the compiler put the compiled bytecode that > will > be executed by the interpreter. > > Regards, > > -- > Beno?t Minisini > > > ------------------------------------------------------------------------------ > Achieve Improved Network Security with IP and DNS Reputation. > Defend against bad network traffic, including botnets, malware, > phishing sites, and compromised hosts - saving your company time, > money, and embarrassment. Learn More! > http://p.sf.net/sfu/hpdev2dev-nov > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From tobiasboe1 at ...20... Wed Nov 3 22:08:47 2010 From: tobiasboe1 at ...20... (tobias) Date: Wed, 03 Nov 2010 22:08:47 +0100 Subject: [Gambas-user] SQLite memory database In-Reply-To: <4CD1A592.3040409@...20...> References: <201010312038.53195.gambas@...1...> <4CD07B16.2070100@...20...> <4CD1A592.3040409@...20...> Message-ID: <4CD1CF5F.80109@...20...> tobias schrieb: > good evening, > i have a more sqlite related question: > what does it mean in the doc: For SQLite, you can also create and use a > database in memory by giving as database name the string ":memory:". > (from gambas2 doc, gb.db.connection.name) > > what is creating a database in memory?? simply a temporary database or > is that a special term used with sqlite?? > what is the difference (with Connection.Type = "sqlite3") between > Connection.Name = "" (which means /tmp/sqlite.db) > and > Connection.Name = ":memory:"?? > just that there is a temporary file in the first case and in the second > everything is done in memory?? > > ------------------------------------------------------------------------------ > Achieve Improved Network Security with IP and DNS Reputation. > Defend against bad network traffic, including botnets, malware, > phishing sites, and compromised hosts - saving your company time, > money, and embarrassment. Learn More! > http://p.sf.net/sfu/hpdev2dev-nov > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user ok, i found the information at sqlite.com From tobiasboe1 at ...20... Wed Nov 3 22:08:18 2010 From: tobiasboe1 at ...20... (tobias) Date: Wed, 03 Nov 2010 22:08:18 +0100 Subject: [Gambas-user] SQL Transaction In-Reply-To: <4CD12ABF.3020506@...1909...> References: <1288774040.2905.10.camel@...2493...> <4CD12ABF.3020506@...1909...> Message-ID: <4CD1CF42.3020608@...20...> hi, i have another sql related question: what are the benefits of using a transaction instead of ... using it not? regards, tobi From Karl.Reinl at ...2345... Wed Nov 3 23:09:00 2010 From: Karl.Reinl at ...2345... (Charlie Reinl) Date: Wed, 03 Nov 2010 23:09:00 +0100 Subject: [Gambas-user] SQL Transaction In-Reply-To: <4CD1CF42.3020608@...20...> References: <1288774040.2905.10.camel@...2493...> <4CD12ABF.3020506@...1909...> <4CD1CF42.3020608@...20...> Message-ID: <1288822140.6395.18.camel@...40...> Am Mittwoch, den 03.11.2010, 22:08 +0100 schrieb tobias: > transaction Salut Tobias, with transaction you can change, delete, update, upgrade and can check and/or show the results , but if you want to keep your work you have to "commit" the transaction. Or if you remark somethings got wrong, at the end of all that, you rollback the transaction, and you DB is like before the .begin. It's like BACKUP -> make changes -> SAVE or RESTORE BACKUP. -- Amicalement Charlie From gambas.fr at ...626... Thu Nov 4 08:42:06 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Thu, 4 Nov 2010 08:42:06 +0100 Subject: [Gambas-user] .gambas folder? In-Reply-To: References: <201011031911.23219.gambas@...1...> Message-ID: and you can use the isdir function to know if a path is a dir or use the option gb.directory with the dir() funtion to parse only directories or gb.file for file 2010/11/3 Jussi Lahtinen : > Ok, so no need to back up them, thanks! > > Jussi > > > 2010/11/3 Beno?t Minisini > >> > Hi! >> > I'm writing backup script that excludes gambas executable, but exclude >> > option doesn't make difference between .gambas folder and *.gambas files. >> > So, what is .gambas folder for? For debugging symbols? >> > >> > Jussi >> >> .gambas is the folder where the compiler put the compiled bytecode that >> will >> be executed by the interpreter. >> >> Regards, >> >> -- >> Beno?t Minisini >> >> >> ------------------------------------------------------------------------------ >> Achieve Improved Network Security with IP and DNS Reputation. >> Defend against bad network traffic, including botnets, malware, >> phishing sites, and compromised hosts - saving your company time, >> money, and embarrassment. ? Learn More! >> http://p.sf.net/sfu/hpdev2dev-nov >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > ------------------------------------------------------------------------------ > Achieve Improved Network Security with IP and DNS Reputation. > Defend against bad network traffic, including botnets, malware, > phishing sites, and compromised hosts - saving your company time, > money, and embarrassment. ? Learn More! > http://p.sf.net/sfu/hpdev2dev-nov > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Fabien Bodard From demosthenesk at ...626... Thu Nov 4 10:50:18 2010 From: demosthenesk at ...626... (user) Date: Thu, 04 Nov 2010 11:50:18 +0200 Subject: [Gambas-user] Questions about project options Message-ID: <1288864218.13019.4.camel@...2493...> Good morning to all and have a nice day, I have a question about option properties of a project. There is an option "Modules symbols are public by default No/Yes" 1) What are the modules symbols? The module variables ? And another one. 2) How can we use the option "Stack size" ? From mauricio at ...2500... Thu Nov 4 18:43:38 2010 From: mauricio at ...2500... (Mauricio Baeza) Date: Thu, 04 Nov 2010 11:43:38 -0600 Subject: [Gambas-user] Problem with control TableView Message-ID: <1288892618.30095.1.camel@...37...> Hi all ... When I show TableView control on a form which, in turn this into a Workspace control, shows me some items that I can not identify the image here: http://uploadpie.com/ElT5E If I show the form outside the workspace, it displays the correct TableView control. Does anyone know why? Thank you very much -- Mauricio Baeza 10 a?os usando OpenOffice.org, libre, gratuito y seguro _______________________________ Todo lo que no es dado es perdido From gambas at ...1... Thu Nov 4 19:13:49 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Thu, 4 Nov 2010 19:13:49 +0100 Subject: [Gambas-user] Problem with control TableView In-Reply-To: <1288892618.30095.1.camel@...37...> References: <1288892618.30095.1.camel@...37...> Message-ID: <201011041913.49456.gambas@...1...> > Hi all ... > > When I show TableView control on a form which, in turn this into a > Workspace control, shows me some items that I can not identify the image > here: http://uploadpie.com/ElT5E > > If I show the form outside the workspace, it displays the correct > TableView control. > > Does anyone know why? > > Thank you very much Please tell which version of Gambas you are using and send your project, or if you can't a little project that shows the bug. Thanks in advance. Regards, -- Beno?t Minisini From mauricio at ...2500... Thu Nov 4 19:42:25 2010 From: mauricio at ...2500... (Mauricio Baeza) Date: Thu, 04 Nov 2010 12:42:25 -0600 Subject: [Gambas-user] Problem with control TableView In-Reply-To: <201011041913.49456.gambas@...1...> References: <1288892618.30095.1.camel@...37...> <201011041913.49456.gambas@...1...> Message-ID: <1288896145.30095.3.camel@...37...> El jue, 04-11-2010 a las 19:13 +0100, Beno?t Minisini escribi?: > > Hi all ... > > > > When I show TableView control on a form which, in turn this into a > > Workspace control, shows me some items that I can not identify the image > > here: http://uploadpie.com/ElT5E > > > > If I show the form outside the workspace, it displays the correct > > TableView control. > > > > Does anyone know why? > > > > Thank you very much > > Please tell which version of Gambas you are using and send your project, or if > you can't a little project that shows the bug. > > Thanks in advance. > > Regards, > Thanks for the quick response. Atach small test which shows the error. Gambas 2.21 in ArchLinux x64 Best regards -- Mauricio Baeza 10 a?os usando OpenOffice.org, libre, gratuito y seguro _______________________________ Todo lo que no es dado es perdido -------------- next part -------------- A non-text attachment was scrubbed... Name: Test.zip Type: application/zip Size: 12578 bytes Desc: not available URL: From mauricio at ...2500... Thu Nov 4 22:06:21 2010 From: mauricio at ...2500... (Mauricio Baeza) Date: Thu, 04 Nov 2010 15:06:21 -0600 Subject: [Gambas-user] Translat Wiki Message-ID: <1288904781.30095.11.camel@...37...> Hello... I have been translating some parts of the Wiki of English to Spanish. I have the technical sufficient level to do this task. There are parts of the original one in English that are incomplete or definitively they are not documented. To document directly in English I do not feel capable, but I can try it, or can do it in Spanish and that someone translates it into English. My concrete question is: is there well that writes what is absent in Spanish and later to translate it? or: do I try it in English, although it needs a later review? Best regards -- Mauricio Baeza 10 a?os usando OpenOffice.org, libre, gratuito y seguro _______________________________ Todo lo que no es dado es perdido From gambas at ...1... Thu Nov 4 23:45:55 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Thu, 4 Nov 2010 23:45:55 +0100 Subject: [Gambas-user] Translat Wiki In-Reply-To: <1288904781.30095.11.camel@...37...> References: <1288904781.30095.11.camel@...37...> Message-ID: <201011042345.55690.gambas@...1...> > Hello... > > I have been translating some parts of the Wiki of English to Spanish. I > have the technical sufficient level to do this task. There are parts of > the original one in English that are incomplete or definitively they are > not documented. To document directly in English I do not feel capable, > but I can try it, or can do it in Spanish and that someone translates it > into English. My concrete question is: is there well that writes what is > absent in Spanish and later to translate it? or: do I try it in English, > although it needs a later review? > > > Best regards If you can translate the undocumented page in english first, do it. Otherwise, if it is too complex for you, do the translation in spanish only. But when I will do the english translation, your spanish page will be assumed to be out of date. Regards, -- Beno?t Minisini From mauricio at ...2500... Thu Nov 4 23:58:15 2010 From: mauricio at ...2500... (Mauricio Baeza) Date: Thu, 04 Nov 2010 16:58:15 -0600 Subject: [Gambas-user] Translat Wiki In-Reply-To: <201011042345.55690.gambas@...1...> References: <1288904781.30095.11.camel@...37...> <201011042345.55690.gambas@...1...> Message-ID: <1288911495.30095.12.camel@...37...> El jue, 04-11-2010 a las 23:45 +0100, Beno?t Minisini escribi?: > If you can translate the undocumented page in english first, do it. > > Otherwise, if it is too complex for you, do the translation in spanish > only. > But when I will do the english translation, your spanish page will be > assumed > to be out of date. > > Regards, Okay, so I do .. Best regards -- Mauricio Baeza 10 a?os usando OpenOffice.org, libre, gratuito y seguro _______________________________ Todo lo que no es dado es perdido From mdavies5 at ...169... Fri Nov 5 05:09:09 2010 From: mdavies5 at ...169... (Michael) Date: Fri, 05 Nov 2010 15:09:09 +1100 Subject: [Gambas-user] Gridview Select Multiple rows. Message-ID: <4CD38365.9030307@...169...> I'm a newbie to Gambas and very impressed. Managed to solve all my queries and port apps from VB. However I have one problem that has me beat:) I have a GridView with Mode = Multiple and can select multiple rows; either sequentially or at random. So far so good as similar to VB. I want to loop through the selected items and take some action on each item. eg: Delete the row. I cannot find a way to read the selected row. The Gridview.Row property only returns the last selected row. Typically my grid may contain 1000 rows and I use this function to delete old records. It would be tedious one at a time. I could get around it by asking the user to enter a cutoff date or range of row numbers to delete but this raises the question "What is the point of having a Multiple mode attribute?" Thanks Mike From demosthenesk at ...626... Fri Nov 5 07:56:54 2010 From: demosthenesk at ...626... (user) Date: Fri, 05 Nov 2010 08:56:54 +0200 Subject: [Gambas-user] Gridview Select Multiple rows. In-Reply-To: <4CD38365.9030307@...169...> References: <4CD38365.9030307@...169...> Message-ID: <1288940214.3870.5.camel@...2494...> One solution is to use a dynamic array, and when user click a row to check if it is selected. if it is selected check if is in array if row is in array the user want to remove it, remove record from array if row is not in array the user want to add it to selection, add it to array. if it is not selected user want to add row to array The array can hold the values of keys of GridView Finaly you will have a dynamic array with rows of user selection. i have an example, i will find it to show you. On Fri, 2010-11-05 at 15:09 +1100, Michael wrote: > I'm a newbie to Gambas and very impressed. Managed to solve all my > queries and port apps from VB. However I have one problem that has me beat:) > I have a GridView with Mode = Multiple and can select multiple rows; > either sequentially or at random. So far so good as similar to VB. > I want to loop through the selected items and take some action on each > item. eg: Delete the row. > I cannot find a way to read the selected row. The Gridview.Row property > only returns the last selected row. > Typically my grid may contain 1000 rows and I use this function to > delete old records. It would be tedious one at a time. I could get > around it by asking the user to enter a cutoff date or range of row > numbers to delete but this raises the question "What is the point of > having a Multiple mode attribute?" > Thanks > Mike > > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From demosthenesk at ...626... Fri Nov 5 08:09:47 2010 From: demosthenesk at ...626... (user) Date: Fri, 05 Nov 2010 09:09:47 +0200 Subject: [Gambas-user] Gridview Select Multiple rows. In-Reply-To: <4CD38365.9030307@...169...> References: <4CD38365.9030307@...169...> Message-ID: <1288940987.2455.7.camel@...2493...> Example with ListView control lswResults ----------------------------------------------- ' Gambas class file PRIVATE sFileArray AS String[] = [""] PRIVATE iKeyArray AS Integer[] = [0] PRIVATE bKeyControlPressed AS Boolean = FALSE PRIVATE bSellectAllPressed AS Boolean = FALSE PUBLIC SUB Form_Open() sFileArray.Clear 'reset private array iKeyArray.Clear 'reset private array END PUBLIC SUB btnSelectAll_Click() bSellectAllPressed = TRUE lswResults.SelectAll END PUBLIC SUB lswResults_KeyRelease() IF Key.Control = TRUE THEN bKeyControlPressed = FALSE ENDIF END PUBLIC SUB lswResults_KeyPress() IF Key.Control = TRUE THEN bKeyControlPressed = TRUE ENDIF END PUBLIC SUB lswResults_Select() DIM iKey AS Integer = 0 DIM sElement AS String = "" DIM sFile AS String[] = [""] DIM sRow AS String = "" DIM iCounter AS Integer sFile.Clear sRow = Replace$(lswResults.Current.Text, " ", "\n") 'format string sFile = Split(sRow, "\n") 'split row and take only path, reject virus description ' PRINT lswResults.Current.Text ' PRINT sFile[0] 'HERE IS WHAT YOU LOOK FOR ------------------------------- 'if user select with CTRL IF bKeyControlPressed = TRUE THEN 'check if in sFileArray there is a current selection IF sFileArray.Count > 0 THEN 'if there is one user clicked unselect IF sFileArray.Exist(sFile[0]) THEN 'delete entry of current selected item from sFileArray and from iKeyArray iKey = sFileArray.Find(sFile[0]) 'find key sFileArray.Delete(iKey) 'delete selection according found key iKey = iKeyArray.Find(lswResults.Current.Key) 'find key for second array iKeyArray.Delete(iKey) 'delete selection according found key ' lswResults.Current.Selected = FALSE ELSE 'if there is not, add the new selection sFileArray.Add(sFile[0]) iKeyArray.Add(lswResults.Current.Key) ENDIF ELSE 'add into Arrays for first time, sFileArray.Count=0 sFileArray.Add(sFile[0]) iKeyArray.Add(lswResults.Current.Key) ENDIF ELSE IF bSellectAllPressed = TRUE THEN 'if user pressed btnSelectAll sFile.Clear 'clear array sFileArray.Clear iKeyArray.Clear lswResults.MoveFirst 'add all items of listview into arrays FOR iCounter = 0 TO lswResults.Count - 1 sRow = Replace$(lswResults[lswResults.Item.Key].Text, " ", "\n") 'format string sFile = Split(sRow, "\n") 'split row and take only path, reject virus description sFileArray.Add(sFile[0]) iKeyArray.Add(lswResults[lswResults.Item.Key].Key) lswResults.MoveNext NEXT bSellectAllPressed = FALSE ELSE 'user makes single clicks sFileArray.Clear iKeyArray.Clear sFileArray.Add(sFile[0]) iKeyArray.Add(lswResults.Current.Key) ENDIF '-------------------------------------------------------- ' PRINT "----------------------" ' FOR EACH sElement IN sFileArray ' PRINT sElement ' NEXT END On Fri, 2010-11-05 at 15:09 +1100, Michael wrote: > I'm a newbie to Gambas and very impressed. Managed to solve all my > queries and port apps from VB. However I have one problem that has me beat:) > I have a GridView with Mode = Multiple and can select multiple rows; > either sequentially or at random. So far so good as similar to VB. > I want to loop through the selected items and take some action on each > item. eg: Delete the row. > I cannot find a way to read the selected row. The Gridview.Row property > only returns the last selected row. > Typically my grid may contain 1000 rows and I use this function to > delete old records. It would be tedious one at a time. I could get > around it by asking the user to enter a cutoff date or range of row > numbers to delete but this raises the question "What is the point of > having a Multiple mode attribute?" > Thanks > Mike > > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From gambas.fr at ...626... Fri Nov 5 11:50:03 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Fri, 5 Nov 2010 11:50:03 +0100 Subject: [Gambas-user] Questions about project options In-Reply-To: <1288864218.13019.4.camel@...2493...> References: <1288864218.13019.4.camel@...2493...> Message-ID: 2010/11/4 user : > Good morning to all and have a nice day, > > I have a question about option properties of a project. > > There is an option "Modules symbols are public by default No/Yes" > > 1) What are the modules symbols? The module variables ? yes :) > > And another one. > > 2) How can we use the option "Stack size" ? > > > > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Fabien Bodard From gambas.fr at ...626... Fri Nov 5 11:51:41 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Fri, 5 Nov 2010 11:51:41 +0100 Subject: [Gambas-user] Translat Wiki In-Reply-To: <1288911495.30095.12.camel@...37...> References: <1288904781.30095.11.camel@...37...> <201011042345.55690.gambas@...1...> <1288911495.30095.12.camel@...37...> Message-ID: 2010/11/4 Mauricio Baeza : > El jue, 04-11-2010 a las 23:45 +0100, Beno?t Minisini escribi?: > >> If you can translate the undocumented page in english first, do it. >> >> Otherwise, if it is too complex for you, do the translation in spanish >> only. >> But when I will do the english translation, your spanish page will be >> assumed >> to be out of date. yes but an open/save action can resolve that no ? >> >> Regards, > > > > Okay, so I do .. > > Best regards > > > -- > Mauricio Baeza > > 10 a?os usando OpenOffice.org, libre, gratuito y seguro > _______________________________ > Todo lo que no es dado es perdido > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Fabien Bodard From gambas.fr at ...626... Fri Nov 5 12:01:53 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Fri, 5 Nov 2010 12:01:53 +0100 Subject: [Gambas-user] Gridview Select Multiple rows. In-Reply-To: <1288940214.3870.5.camel@...2494...> References: <4CD38365.9030307@...169...> <1288940214.3870.5.camel@...2494...> Message-ID: true ... it seem it miss a function that can return an array of selected cells so we can parse the cells . Ex: Dim iLastRow as integer =-1 For each Cells in GridView.SelectedItems if iLastRow<>Cells.Row then aiRows.Add(Cells.Row) endif next But it miss some things to do that a cell item need to be able to return its rows maybe just a property row.selected wil be sufficient 2010/11/5 user : > One solution is to use a dynamic array, and when user click a row to > check if it is selected. > > if it is selected check if is in array > if row is in array the user want to remove it, remove record from array > if row is not in array the user want to add it to selection, add it to > array. > > if it is not selected user want to add row to array > > The array can hold the values of keys of GridView > > Finaly you will have a dynamic array with rows of user selection. > > i have an example, i will find it to show you. > > On Fri, 2010-11-05 at 15:09 +1100, Michael wrote: >> I'm a newbie to Gambas and very impressed. Managed to solve all my >> queries and port apps from VB. However I have one problem that has me beat:) >> I have a GridView with Mode = Multiple and can select multiple rows; >> either sequentially or at random. So far so good as similar to VB. >> I want to loop through the selected items and take some action on each >> item. eg: Delete the row. >> I cannot find a way to read the selected row. The Gridview.Row property >> only returns the last selected row. >> Typically my grid may contain 1000 rows and I use this function to >> delete old records. It would be tedious one at a time. I could get >> around it by asking the user to enter a cutoff date or range of row >> numbers to delete but this raises the question "What is the point of >> having a Multiple mode attribute?" >> Thanks >> Mike >> >> ------------------------------------------------------------------------------ >> The Next 800 Companies to Lead America's Growth: New Video Whitepaper >> David G. Thomson, author of the best-selling book "Blueprint to a >> Billion" shares his insights and actions to help propel your >> business during the next growth cycle. Listen Now! >> http://p.sf.net/sfu/SAP-dev2dev >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Fabien Bodard From mdavies5 at ...169... Fri Nov 5 12:59:52 2010 From: mdavies5 at ...169... (Michael) Date: Fri, 05 Nov 2010 22:59:52 +1100 Subject: [Gambas-user] Gridview Select Multiple rows. In-Reply-To: <1288940987.2455.7.camel@...2493...> References: <4CD38365.9030307@...169...> <1288940987.2455.7.camel@...2493...> Message-ID: <4CD3F1B8.6070501@...169...> Thanks, I will give this a try. Michael On 05/11/10 18:09, user wrote: > Example with ListView control lswResults > > ----------------------------------------------- > ' Gambas class file > PRIVATE sFileArray AS String[] = [""] > PRIVATE iKeyArray AS Integer[] = [0] > PRIVATE bKeyControlPressed AS Boolean = FALSE > PRIVATE bSellectAllPressed AS Boolean = FALSE > > > > PUBLIC SUB Form_Open() > sFileArray.Clear 'reset private array > iKeyArray.Clear 'reset private array > END > > > > PUBLIC SUB btnSelectAll_Click() > bSellectAllPressed = TRUE > lswResults.SelectAll > END > > > PUBLIC SUB lswResults_KeyRelease() > > IF Key.Control = TRUE THEN > bKeyControlPressed = FALSE > ENDIF > > > END > > PUBLIC SUB lswResults_KeyPress() > > IF Key.Control = TRUE THEN > bKeyControlPressed = TRUE > ENDIF > > END > > > > PUBLIC SUB lswResults_Select() > > DIM iKey AS Integer = 0 > DIM sElement AS String = "" > DIM sFile AS String[] = [""] > DIM sRow AS String = "" > DIM iCounter AS Integer > > sFile.Clear > sRow = Replace$(lswResults.Current.Text, " ", "\n") 'format string > sFile = Split(sRow, "\n") 'split row and take only path, reject virus > description > > ' PRINT lswResults.Current.Text > ' PRINT sFile[0] > > > 'HERE IS WHAT YOU LOOK FOR ------------------------------- > 'if user select with CTRL > IF bKeyControlPressed = TRUE THEN > 'check if in sFileArray there is a current selection > IF sFileArray.Count> 0 THEN > 'if there is one user clicked unselect > IF sFileArray.Exist(sFile[0]) THEN > 'delete entry of current selected item from sFileArray and from > iKeyArray > iKey = sFileArray.Find(sFile[0]) 'find key > sFileArray.Delete(iKey) 'delete selection according found key > iKey = iKeyArray.Find(lswResults.Current.Key) 'find key for second > array > iKeyArray.Delete(iKey) 'delete selection according found key > ' lswResults.Current.Selected = FALSE > ELSE > 'if there is not, add the new selection > sFileArray.Add(sFile[0]) > iKeyArray.Add(lswResults.Current.Key) > ENDIF > ELSE 'add into Arrays for first time, sFileArray.Count=0 > sFileArray.Add(sFile[0]) > iKeyArray.Add(lswResults.Current.Key) > ENDIF > ELSE IF bSellectAllPressed = TRUE THEN 'if user pressed btnSelectAll > sFile.Clear 'clear array > sFileArray.Clear > iKeyArray.Clear > > lswResults.MoveFirst 'add all items of listview into arrays > FOR iCounter = 0 TO lswResults.Count - 1 > sRow = Replace$(lswResults[lswResults.Item.Key].Text, " ", "\n") > 'format string > sFile = Split(sRow, "\n") 'split row and take only path, reject virus > description > sFileArray.Add(sFile[0]) > iKeyArray.Add(lswResults[lswResults.Item.Key].Key) > lswResults.MoveNext > NEXT > bSellectAllPressed = FALSE > > ELSE 'user makes single clicks > sFileArray.Clear > iKeyArray.Clear > > sFileArray.Add(sFile[0]) > iKeyArray.Add(lswResults.Current.Key) > > ENDIF > '-------------------------------------------------------- > > > ' PRINT "----------------------" > ' FOR EACH sElement IN sFileArray > ' PRINT sElement > ' NEXT > > END > > > On Fri, 2010-11-05 at 15:09 +1100, Michael wrote: >> I'm a newbie to Gambas and very impressed. Managed to solve all my >> queries and port apps from VB. However I have one problem that has me beat:) >> I have a GridView with Mode = Multiple and can select multiple rows; >> either sequentially or at random. So far so good as similar to VB. >> I want to loop through the selected items and take some action on each >> item. eg: Delete the row. >> I cannot find a way to read the selected row. The Gridview.Row property >> only returns the last selected row. >> Typically my grid may contain 1000 rows and I use this function to >> delete old records. It would be tedious one at a time. I could get >> around it by asking the user to enter a cutoff date or range of row >> numbers to delete but this raises the question "What is the point of >> having a Multiple mode attribute?" >> Thanks >> Mike >> >> ------------------------------------------------------------------------------ >> The Next 800 Companies to Lead America's Growth: New Video Whitepaper >> David G. Thomson, author of the best-selling book "Blueprint to a >> Billion" shares his insights and actions to help propel your >> business during the next growth cycle. Listen Now! >> http://p.sf.net/sfu/SAP-dev2dev >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user > > > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > From mdavies5 at ...169... Fri Nov 5 13:19:07 2010 From: mdavies5 at ...169... (Michael) Date: Fri, 05 Nov 2010 23:19:07 +1100 Subject: [Gambas-user] Gridview Select Multiple rows. In-Reply-To: <1288940987.2455.7.camel@...2493...> References: <4CD38365.9030307@...169...> <1288940987.2455.7.camel@...2493...> Message-ID: <4CD3F63B.1020008@...169...> Sorry, this does not work. It only applies to the ListView. I do use a ListView elsewhere and the easiest way is simply to loop through all items with the .movenext function and check for "If lvw.current.selected or lvw.item.selected". Then add the Key to the array of items to process. Unfortunately the GridView has no .item property. It has a .current property but this does not have a .selected property. I think I will add an extra hidden column to my grid to hold a 'Selected' flag. I can use some of your example to track the CONTROL and SHIFT keys to reset these flags as appropriate. Regards Michael On 05/11/10 18:09, user wrote: > Example with ListView control lswResults > > ----------------------------------------------- > ' Gambas class file > PRIVATE sFileArray AS String[] = [""] > PRIVATE iKeyArray AS Integer[] = [0] > PRIVATE bKeyControlPressed AS Boolean = FALSE > PRIVATE bSellectAllPressed AS Boolean = FALSE > > > > PUBLIC SUB Form_Open() > sFileArray.Clear 'reset private array > iKeyArray.Clear 'reset private array > END > > > > PUBLIC SUB btnSelectAll_Click() > bSellectAllPressed = TRUE > lswResults.SelectAll > END > > > PUBLIC SUB lswResults_KeyRelease() > > IF Key.Control = TRUE THEN > bKeyControlPressed = FALSE > ENDIF > > > END > > PUBLIC SUB lswResults_KeyPress() > > IF Key.Control = TRUE THEN > bKeyControlPressed = TRUE > ENDIF > > END > > > > PUBLIC SUB lswResults_Select() > > DIM iKey AS Integer = 0 > DIM sElement AS String = "" > DIM sFile AS String[] = [""] > DIM sRow AS String = "" > DIM iCounter AS Integer > > sFile.Clear > sRow = Replace$(lswResults.Current.Text, " ", "\n") 'format string > sFile = Split(sRow, "\n") 'split row and take only path, reject virus > description > > ' PRINT lswResults.Current.Text > ' PRINT sFile[0] > > > 'HERE IS WHAT YOU LOOK FOR ------------------------------- > 'if user select with CTRL > IF bKeyControlPressed = TRUE THEN > 'check if in sFileArray there is a current selection > IF sFileArray.Count> 0 THEN > 'if there is one user clicked unselect > IF sFileArray.Exist(sFile[0]) THEN > 'delete entry of current selected item from sFileArray and from > iKeyArray > iKey = sFileArray.Find(sFile[0]) 'find key > sFileArray.Delete(iKey) 'delete selection according found key > iKey = iKeyArray.Find(lswResults.Current.Key) 'find key for second > array > iKeyArray.Delete(iKey) 'delete selection according found key > ' lswResults.Current.Selected = FALSE > ELSE > 'if there is not, add the new selection > sFileArray.Add(sFile[0]) > iKeyArray.Add(lswResults.Current.Key) > ENDIF > ELSE 'add into Arrays for first time, sFileArray.Count=0 > sFileArray.Add(sFile[0]) > iKeyArray.Add(lswResults.Current.Key) > ENDIF > ELSE IF bSellectAllPressed = TRUE THEN 'if user pressed btnSelectAll > sFile.Clear 'clear array > sFileArray.Clear > iKeyArray.Clear > > lswResults.MoveFirst 'add all items of listview into arrays > FOR iCounter = 0 TO lswResults.Count - 1 > sRow = Replace$(lswResults[lswResults.Item.Key].Text, " ", "\n") > 'format string > sFile = Split(sRow, "\n") 'split row and take only path, reject virus > description > sFileArray.Add(sFile[0]) > iKeyArray.Add(lswResults[lswResults.Item.Key].Key) > lswResults.MoveNext > NEXT > bSellectAllPressed = FALSE > > ELSE 'user makes single clicks > sFileArray.Clear > iKeyArray.Clear > > sFileArray.Add(sFile[0]) > iKeyArray.Add(lswResults.Current.Key) > > ENDIF > '-------------------------------------------------------- > > > ' PRINT "----------------------" > ' FOR EACH sElement IN sFileArray > ' PRINT sElement > ' NEXT > > END > > > On Fri, 2010-11-05 at 15:09 +1100, Michael wrote: >> I'm a newbie to Gambas and very impressed. Managed to solve all my >> queries and port apps from VB. However I have one problem that has me beat:) >> I have a GridView with Mode = Multiple and can select multiple rows; >> either sequentially or at random. So far so good as similar to VB. >> I want to loop through the selected items and take some action on each >> item. eg: Delete the row. >> I cannot find a way to read the selected row. The Gridview.Row property >> only returns the last selected row. >> Typically my grid may contain 1000 rows and I use this function to >> delete old records. It would be tedious one at a time. I could get >> around it by asking the user to enter a cutoff date or range of row >> numbers to delete but this raises the question "What is the point of >> having a Multiple mode attribute?" >> Thanks >> Mike >> >> ------------------------------------------------------------------------------ >> The Next 800 Companies to Lead America's Growth: New Video Whitepaper >> David G. Thomson, author of the best-selling book "Blueprint to a >> Billion" shares his insights and actions to help propel your >> business during the next growth cycle. Listen Now! >> http://p.sf.net/sfu/SAP-dev2dev >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user > > > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > From gambas at ...1... Fri Nov 5 13:26:29 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Fri, 5 Nov 2010 13:26:29 +0100 Subject: [Gambas-user] Gridview Select Multiple rows. In-Reply-To: <4CD3F63B.1020008@...169...> References: <4CD38365.9030307@...169...> <1288940987.2455.7.camel@...2493...> <4CD3F63B.1020008@...169...> Message-ID: <201011051326.29238.gambas@...1...> > Sorry, this does not work. It only applies to the ListView. I do use a > ListView elsewhere and the easiest way is simply to loop through all > items with the .movenext function and check for "If lvw.current.selected > or lvw.item.selected". Then add the Key to the array of items to process. > > Unfortunately the GridView has no .item property. It has a .current > property but this does not have a .selected property. > > I think I will add an extra hidden column to my grid to hold a > 'Selected' flag. I can use some of your example to track the CONTROL and > SHIFT keys to reset these flags as appropriate. > Regards > Michael > You need something like that: For iInd = 0 to TheGridView.Rows.Count - 1 If TheGridView.Rows[iInd].Selected Then ... Endif Next Regards, -- Beno?t Minisini From gambas.fr at ...626... Fri Nov 5 14:27:25 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Fri, 5 Nov 2010 14:27:25 +0100 Subject: [Gambas-user] Gridview Select Multiple rows. In-Reply-To: <201011051326.29238.gambas@...1...> References: <4CD38365.9030307@...169...> <1288940987.2455.7.camel@...2493...> <4CD3F63B.1020008@...169...> <201011051326.29238.gambas@...1...> Message-ID: Le 5 novembre 2010 13:26, Beno?t Minisini a ?crit : >> Sorry, this does not work. It only applies to the ListView. I do use a >> ListView elsewhere and the easiest way is simply to loop through all >> items with the .movenext function and check for "If lvw.current.selected >> or lvw.item.selected". Then add the Key to the array of items to process. >> >> Unfortunately the GridView has no .item property. It has a .current >> property but this does not have a .selected property. >> >> I think I will add an extra hidden column to my grid to hold a >> 'Selected' flag. I can use some of your example to track the CONTROL and >> SHIFT keys to reset these flags as appropriate. >> Regards >> Michael >> > > You need something like that: > > For iInd = 0 to TheGridView.Rows.Count - 1 > ?If TheGridView.Rows[iInd].Selected Then > ? ?... > ?Endif > Next > > Regards, > > -- > Beno?t Minisini http://gambasdoc.org/help/comp/gb.qt4/.gridviewrows?v3 It is not in the doc, Benoit :), otherwise I would not say all this nonsense > > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Fabien Bodard From mdavies5 at ...169... Fri Nov 5 14:37:22 2010 From: mdavies5 at ...169... (Michael) Date: Sat, 06 Nov 2010 00:37:22 +1100 Subject: [Gambas-user] Gridview Select Multiple rows. In-Reply-To: References: <4CD38365.9030307@...169...> <1288940987.2455.7.camel@...2493...> <4CD3F63B.1020008@...169...> <201011051326.29238.gambas@...1...> Message-ID: <4CD40892.8040202@...169...> Thanks Fabien, I found it eventually but don't you feel silly when it's staring you in the face Michael On 06/11/10 00:27, Fabien Bodard wrote: > Le 5 novembre 2010 13:26, Beno?t Minisini > a ?crit : >>> Sorry, this does not work. It only applies to the ListView. I do use a >>> ListView elsewhere and the easiest way is simply to loop through all >>> items with the .movenext function and check for "If lvw.current.selected >>> or lvw.item.selected". Then add the Key to the array of items to process. >>> >>> Unfortunately the GridView has no .item property. It has a .current >>> property but this does not have a .selected property. >>> >>> I think I will add an extra hidden column to my grid to hold a >>> 'Selected' flag. I can use some of your example to track the CONTROL and >>> SHIFT keys to reset these flags as appropriate. >>> Regards >>> Michael >>> >> You need something like that: >> >> For iInd = 0 to TheGridView.Rows.Count - 1 >> If TheGridView.Rows[iInd].Selected Then >> ... >> Endif >> Next >> >> Regards, >> >> -- >> Beno?t Minisini > > http://gambasdoc.org/help/comp/gb.qt4/.gridviewrows?v3 > > It is not in the doc, Benoit :), otherwise I would not say all this nonsense > >> ------------------------------------------------------------------------------ >> The Next 800 Companies to Lead America's Growth: New Video Whitepaper >> David G. Thomson, author of the best-selling book "Blueprint to a >> Billion" shares his insights and actions to help propel your >> business during the next growth cycle. Listen Now! >> http://p.sf.net/sfu/SAP-dev2dev >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > From daniel.vanhee at ...626... Fri Nov 5 15:38:46 2010 From: daniel.vanhee at ...626... (Daniel Vanhee) Date: Fri, 5 Nov 2010 15:38:46 +0100 Subject: [Gambas-user] how to apply a revision Message-ID: I am using Gambas2.2.21.0 and had to download a revision (CDialog.cpp). Can anyone explain me how I have to apply that revision Regards. From gambas at ...1... Fri Nov 5 15:46:56 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Fri, 5 Nov 2010 15:46:56 +0100 Subject: [Gambas-user] Gridview Select Multiple rows. In-Reply-To: References: <4CD38365.9030307@...169...> <201011051326.29238.gambas@...1...> Message-ID: <201011051546.56787.gambas@...1...> > > http://gambasdoc.org/help/comp/gb.qt4/.gridviewrows?v3 > > It is not in the doc, Benoit :), otherwise I would not say all this > nonsense > It is if you click on the "act as a read-only array" link. Regards, -- Beno?t Minisini From demosthenesk at ...626... Fri Nov 5 16:53:10 2010 From: demosthenesk at ...626... (user) Date: Fri, 05 Nov 2010 17:53:10 +0200 Subject: [Gambas-user] Pango-WARNING Message-ID: <1288972390.10249.1.camel@...2493...> Hi, i have an application (VirusCollectionTools) and the output in console gave this. (VirusCollectionTools-source:6343): Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text() what is this? From math.eber at ...221... Fri Nov 5 19:50:45 2010 From: math.eber at ...221... (Matti) Date: Fri, 05 Nov 2010 19:50:45 +0100 Subject: [Gambas-user] Pango-WARNING In-Reply-To: <1288972390.10249.1.camel@...2493...> References: <1288972390.10249.1.camel@...2493...> Message-ID: <4CD45205.9000009@...221...> Just google. There are 1630 results for pango-warning invalid utf-8 string passed to pango_layout_set_text. Am 05.11.2010 16:53, schrieb user: > Hi, > > i have an application (VirusCollectionTools) and the output in console > gave this. > > (VirusCollectionTools-source:6343): Pango-WARNING **: Invalid UTF-8 > string passed to pango_layout_set_text() > > what is this? > > > > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From nando_f at ...951... Fri Nov 5 20:00:37 2010 From: nando_f at ...951... (nando) Date: Fri, 5 Nov 2010 15:00:37 -0400 Subject: [Gambas-user] Variable overflow questions In-Reply-To: <4CD12ABF.3020506@...1909...> References: <1288774040.2905.10.camel@...2493...> <4CD12ABF.3020506@...1909...> Message-ID: <20101105185638.M79295@...951...> Here is a visualization (view this email with a fixed width font): Regarding your line: DIM iArea AS Single = 1.7014118E+38 A Single only has about 8 digits of precision so, the number is really this: 170,141,180,000,000,000,000,000,000,000,000,000,000.0 1.0 + ===================================================== 170,141,180,000,000,000,000,000,000,000,000,000,000.0 = ^^^^^^^^^^ SINGLE only has room for about 8 digits of precision not all 38. So, adding 1 means nothing. -Fernando ---------- Original Message ----------- From: Doriano Blengino To: mailing list for gambas users Sent: Wed, 03 Nov 2010 10:26:23 +0100 Subject: Re: [Gambas-user] Variable overflow questions > user ha scritto: > > Hi i check the overflow of variables and there is something i dont > > understand. > > > > My system is > > > > user at ...2493...:~$ cat /etc/*release* > > DISTRIB_ID=Ubuntu > > DISTRIB_RELEASE=10.04 > > DISTRIB_CODENAME=lucid > > DISTRIB_DESCRIPTION="Ubuntu 10.04.1 LTS" > > > > Linux ubuntu-desktop 2.6.32-25-generic #45-Ubuntu SMP Sat Oct 16 > > 19:52:42 UTC 2010 x86_64 GNU/Linux > > > > > > > > I have this small code > > ----------------------------------- > > ' Gambas class file > > PUBLIC SUB Form_Open() > > > > DIM bVar AS Boolean = TRUE > > DIM iNum AS Byte = 255 > > DIM iA AS Short = 32767 > > DIM iRoads AS Integer = 2147483647 > > DIM iBig AS Long = 9223372036854775807 > > DIM iArea AS Single = 1.7014118E+38 > > DIM fPi AS Float = 8.98846567431105E+307 > > > > bVar += 1 > > iNum += 1 > > iA += 1 > > iRoads += 1 > > iBig += 1 > > iArea += 1 > > fPi += 1 > > > > PRINT bVar > > PRINT iNum > > PRINT iA > > PRINT iRoads > > PRINT iBig > > PRINT iArea > > PRINT fPi > > > > END > > ----------------------------------- > > > > And i get the following result > > > > False > > 0 > > -32768 > > -2147483648 > > -9223372036854775808 > > 1.701411834605E+38 > > 8.988465674311E+307 > > > > > > My question is why the Single and Float do not overflow? > > > Because they should not overflow, I think. "Real" numbers (in the IT > sense: "float" if you prefer ) are not discrete numbers, they have a > limited precision; a single bit pattern in a float corresponds to > infinite numbers in the real world. When you add a very small quantity > to a float (and "1", compared to 1E+38, is very small), you simply tell > it to store a different number, which has the same bit representation. > If a float would overflow, it would cease its main reason to exist: in > most situations you *do* want it to behave so. You could add a bigger > number to make it overflow: you should add a number big enough to fall > in the precision bits of the mantissa. A normal float has perhaps 6/7 > digits of precision; to choose a comparable a number, you should choose > something like 1E+31 (this "1" falls in the digits of precision of > 1E+38). But! Even in that case, the number should not overflow, but > raise an error (overflow error). This last thing depends on > implementation of the floating point by the host computer. > > Regards, > Doriano > > ------------------------------------------------------------------------------ > Achieve Improved Network Security with IP and DNS Reputation. > Defend against bad network traffic, including botnets, malware, > phishing sites, and compromised hosts - saving your company time, > money, and embarrassment. Learn More! > http://p.sf.net/sfu/hpdev2dev-nov > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user ------- End of Original Message ------- From gambas.fr at ...626... Fri Nov 5 21:16:23 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Fri, 5 Nov 2010 21:16:23 +0100 Subject: [Gambas-user] Gridview Select Multiple rows. In-Reply-To: <201011051546.56787.gambas@...1...> References: <4CD38365.9030307@...169...> <201011051326.29238.gambas@...1...> <201011051546.56787.gambas@...1...> Message-ID: Le 5 novembre 2010 15:46, Beno?t Minisini a ?crit : >> >> http://gambasdoc.org/help/comp/gb.qt4/.gridviewrows?v3 >> >> It is not in the doc, Benoit :), otherwise I would not say all this >> nonsense >> > > It is if you click on the "act as a read-only array" link. > > Regards, > > -- > Beno?t Minisini give me the link ... :/ i don't see anything about that... by the ide i can hav the help by typing : gridview1.rows[1].selected but if i want to find that in the doc... i cant have the properties of an object row... I think you need to add a ref to this object in the gridviewrows page otherwise users can't see the possibility they have with the row object :/ > > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Fabien Bodard From demosthenesk at ...626... Fri Nov 5 22:44:39 2010 From: demosthenesk at ...626... (user) Date: Fri, 05 Nov 2010 23:44:39 +0200 Subject: [Gambas-user] Variable overflow questions In-Reply-To: <20101105185638.M79295@...951...> References: <1288774040.2905.10.camel@...2493...> <4CD12ABF.3020506@...1909...> <20101105185638.M79295@...951...> Message-ID: <1288993479.3394.1.camel@...2494...> Thank you VERY much, very nice explanation! On Fri, 2010-11-05 at 15:00 -0400, nando wrote: > Here is a visualization (view this email with a fixed width font): > Regarding your line: DIM iArea AS Single = 1.7014118E+38 > A Single only has about 8 digits of precision so, the number is really this: > 170,141,180,000,000,000,000,000,000,000,000,000,000.0 > 1.0 + > ===================================================== > 170,141,180,000,000,000,000,000,000,000,000,000,000.0 = > ^^^^^^^^^^ > SINGLE only has room for about 8 digits of precision not all 38. > So, adding 1 means nothing. > -Fernando > > ---------- Original Message ----------- > From: Doriano Blengino > To: mailing list for gambas users > Sent: Wed, 03 Nov 2010 10:26:23 +0100 > Subject: Re: [Gambas-user] Variable overflow questions > > > user ha scritto: > > > Hi i check the overflow of variables and there is something i dont > > > understand. > > > > > > My system is > > > > > > user at ...2493...:~$ cat /etc/*release* > > > DISTRIB_ID=Ubuntu > > > DISTRIB_RELEASE=10.04 > > > DISTRIB_CODENAME=lucid > > > DISTRIB_DESCRIPTION="Ubuntu 10.04.1 LTS" > > > > > > Linux ubuntu-desktop 2.6.32-25-generic #45-Ubuntu SMP Sat Oct 16 > > > 19:52:42 UTC 2010 x86_64 GNU/Linux > > > > > > > > > > > > I have this small code > > > ----------------------------------- > > > ' Gambas class file > > > PUBLIC SUB Form_Open() > > > > > > DIM bVar AS Boolean = TRUE > > > DIM iNum AS Byte = 255 > > > DIM iA AS Short = 32767 > > > DIM iRoads AS Integer = 2147483647 > > > DIM iBig AS Long = 9223372036854775807 > > > DIM iArea AS Single = 1.7014118E+38 > > > DIM fPi AS Float = 8.98846567431105E+307 > > > > > > bVar += 1 > > > iNum += 1 > > > iA += 1 > > > iRoads += 1 > > > iBig += 1 > > > iArea += 1 > > > fPi += 1 > > > > > > PRINT bVar > > > PRINT iNum > > > PRINT iA > > > PRINT iRoads > > > PRINT iBig > > > PRINT iArea > > > PRINT fPi > > > > > > END > > > ----------------------------------- > > > > > > And i get the following result > > > > > > False > > > 0 > > > -32768 > > > -2147483648 > > > -9223372036854775808 > > > 1.701411834605E+38 > > > 8.988465674311E+307 > > > > > > > > > My question is why the Single and Float do not overflow? > > > > > Because they should not overflow, I think. "Real" numbers (in the IT > > sense: "float" if you prefer ) are not discrete numbers, they have a > > limited precision; a single bit pattern in a float corresponds to > > infinite numbers in the real world. When you add a very small quantity > > to a float (and "1", compared to 1E+38, is very small), you simply tell > > it to store a different number, which has the same bit representation. > > If a float would overflow, it would cease its main reason to exist: in > > most situations you *do* want it to behave so. You could add a bigger > > number to make it overflow: you should add a number big enough to fall > > in the precision bits of the mantissa. A normal float has perhaps 6/7 > > digits of precision; to choose a comparable a number, you should choose > > something like 1E+31 (this "1" falls in the digits of precision of > > 1E+38). But! Even in that case, the number should not overflow, but > > raise an error (overflow error). This last thing depends on > > implementation of the floating point by the host computer. > > > > Regards, > > Doriano > > > > ------------------------------------------------------------------------------ > > Achieve Improved Network Security with IP and DNS Reputation. > > Defend against bad network traffic, including botnets, malware, > > phishing sites, and compromised hosts - saving your company time, > > money, and embarrassment. Learn More! > > http://p.sf.net/sfu/hpdev2dev-nov > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > ------- End of Original Message ------- > > > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From jussi.lahtinen at ...626... Fri Nov 5 23:07:21 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sat, 6 Nov 2010 00:07:21 +0200 Subject: [Gambas-user] how to apply a revision In-Reply-To: References: Message-ID: I'm not sure I understand right... but. You probably want to download whole source of development version. Read from here what you need and how to compile: http://gambas.sourceforge.net/en/download.html http://gambasdoc.org/help/install?view&en Jussi On Fri, Nov 5, 2010 at 16:38, Daniel Vanhee wrote: > I am using Gambas2.2.21.0 and had to download a revision (CDialog.cpp). > Can anyone explain me how I have to apply that revision > > Regards. > > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From jussi.lahtinen at ...626... Fri Nov 5 23:08:45 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sat, 6 Nov 2010 00:08:45 +0200 Subject: [Gambas-user] how to apply a revision In-Reply-To: References: Message-ID: Hmmm... why do you need it? Bug? Jussi On Fri, Nov 5, 2010 at 16:38, Daniel Vanhee wrote: > I am using Gambas2.2.21.0 and had to download a revision (CDialog.cpp). > Can anyone explain me how I have to apply that revision > > Regards. > > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas.fr at ...626... Sat Nov 6 09:36:28 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Sat, 6 Nov 2010 09:36:28 +0100 Subject: [Gambas-user] how to apply a revision In-Reply-To: References: Message-ID: you need to download the complete archive, uncompress it , enter in the directory, do a ./reconf-all ./configure make make install (in root or with sudo) but befor all of that you need to install all the dev package needed... go to gambasdoc.org to learn more about that 2010/11/5 Jussi Lahtinen : > Hmmm... why do you need it? Bug? > > Jussi > > > On Fri, Nov 5, 2010 at 16:38, Daniel Vanhee wrote: > >> I am using Gambas2.2.21.0 and had to download a revision (CDialog.cpp). >> Can anyone explain me how I have to apply that revision >> >> Regards. >> >> ------------------------------------------------------------------------------ >> The Next 800 Companies to Lead America's Growth: New Video Whitepaper >> David G. Thomson, author of the best-selling book "Blueprint to a >> Billion" shares his insights and actions to help propel your >> business during the next growth cycle. Listen Now! >> http://p.sf.net/sfu/SAP-dev2dev >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Fabien Bodard From gambas at ...1... Sat Nov 6 16:57:34 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sat, 6 Nov 2010 16:57:34 +0100 Subject: [Gambas-user] Pango-WARNING In-Reply-To: <1288972390.10249.1.camel@...2493...> References: <1288972390.10249.1.camel@...2493...> Message-ID: <201011061657.34192.gambas@...1...> > Hi, > > i have an application (VirusCollectionTools) and the output in console > gave this. > > (VirusCollectionTools-source:6343): Pango-WARNING **: Invalid UTF-8 > string passed to pango_layout_set_text() > > what is this? > An invalid UTF-8 string has been set to a GTK+ function. To know where exactly: $ cd /path/to/my/project $ gbc3 -agt $ gdb gbx3 ... $ break g_log ... answer 'y' to the question $ run ... until the program breaks just before displaying the previous warning message $ finish ... to check that the Pango warning is actually displayed. $ p DEBUG_where() ... to see the current Gambas code line. Regards, -- Beno?t Minisini From demosthenesk at ...626... Sat Nov 6 23:43:47 2010 From: demosthenesk at ...626... (user) Date: Sun, 07 Nov 2010 00:43:47 +0200 Subject: [Gambas-user] Pango-WARNING In-Reply-To: <201011061657.34192.gambas@...1...> References: <1288972390.10249.1.camel@...2493...> <201011061657.34192.gambas@...1...> Message-ID: <1289083427.2714.1.camel@...2494...> Thanks. A question, wiil be any Gambas way to find the line for this error in the future? On Sat, 2010-11-06 at 16:57 +0100, Beno?t Minisini wrote: > > Hi, > > > > i have an application (VirusCollectionTools) and the output in console > > gave this. > > > > (VirusCollectionTools-source:6343): Pango-WARNING **: Invalid UTF-8 > > string passed to pango_layout_set_text() > > > > what is this? > > > > An invalid UTF-8 string has been set to a GTK+ function. To know where > exactly: > > $ cd /path/to/my/project > $ gbc3 -agt > $ gdb gbx3 > ... > $ break g_log > ... answer 'y' to the question > $ run > ... until the program breaks just before displaying the previous warning > message > $ finish > ... to check that the Pango warning is actually displayed. > $ p DEBUG_where() > ... to see the current Gambas code line. > > Regards, > From gambas at ...1... Sat Nov 6 23:47:51 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sat, 6 Nov 2010 23:47:51 +0100 Subject: [Gambas-user] Pango-WARNING In-Reply-To: <1289083427.2714.1.camel@...2494...> References: <1288972390.10249.1.camel@...2493...> <201011061657.34192.gambas@...1...> <1289083427.2714.1.camel@...2494...> Message-ID: <201011062347.51662.gambas@...1...> > Thanks. > > A question, wiil be any Gambas way to find the line for this error in > the future? > No. Gambas is not aware that an underlying shared library prints warning to the standard error output. Regards, -- Beno?t Minisini From gambas at ...1... Sun Nov 7 12:06:08 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sun, 7 Nov 2010 12:06:08 +0100 Subject: [Gambas-user] Problem with control TableView In-Reply-To: <1288896145.30095.3.camel@...37...> References: <1288892618.30095.1.camel@...37...> <201011041913.49456.gambas@...1...> <1288896145.30095.3.camel@...37...> Message-ID: <201011071206.08898.gambas@...1...> > El jue, 04-11-2010 a las 19:13 +0100, Beno?t Minisini escribi?: > > > Hi all ... > > > > > > When I show TableView control on a form which, in turn this into a > > > Workspace control, shows me some items that I can not identify the > > > image here: http://uploadpie.com/ElT5E > > > > > > If I show the form outside the workspace, it displays the correct > > > TableView control. > > > > > > Does anyone know why? > > > > > > Thank you very much > > > > Please tell which version of Gambas you are using and send your project, > > or if you can't a little project that shows the bug. > > > > Thanks in advance. > > > > Regards, > > Thanks for the quick response. > > Atach small test which shows the error. > Gambas 2.21 in ArchLinux x64 > > Best regards Hi, The bug should be fixed in revision #3278. Regards, -- Beno?t Minisini From gambas at ...1... Sun Nov 7 15:47:56 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sun, 7 Nov 2010 15:47:56 +0100 Subject: [Gambas-user] IDE crash with browse In-Reply-To: References: Message-ID: <201011071547.56428.gambas@...1...> > gvwFind.Column = 2 would be more convenient as search string can be found > multiple times from same line. > > Jussi > > On Fri, Oct 15, 2010 at 18:01, Jussi Lahtinen wrote: > > Hi! > > Way to reproduce the problem: > > 1. Open search window > > 2. type some word for search > > 3. click browse > > 4. press arrow key to right or left > > > > Reason: > > If gvwFind is not in focus, it has no current row, ie gvwFind.Row = -1. > > Crash when; > > hFind = $aBrowse[gvwFind.Row] > > @ Public Sub gvwFind_Select() > > > > Suggestion: > > Add following code to Sub gvwFind_Select. > > > > If gvwFind.Row = -1 Then > > gvwFind.Row = 0 ' Prevents crash. > > gvwFind.Column = 1 ' Makes browsing with arrow keys smoother. > > Endif > > > > Gambas 3 rev 3265 @Ubuntu 10.04 64bit > > > > Jussi > Thanks for the fix. I don't understand the need of setting gvwFind.Column, so I don't take that at the moment. Regards, -- Beno?t Minisini From jussi.lahtinen at ...626... Sun Nov 7 17:57:06 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sun, 7 Nov 2010 18:57:06 +0200 Subject: [Gambas-user] IDE crash with browse In-Reply-To: <201011071547.56428.gambas@...1...> References: <201011071547.56428.gambas@...1...> Message-ID: If column is already set to 2 (Col.), you can just use arrow keys (up/down) to browse results. Otherwise you must first select column by clicking with mouse. And if you select column 3 (Text), then column 0 (File) is not visible while browsing. Also selecting column 1 (Line), cause browsing stuck if there are two results in same line. And by stuck I mean need to select next row with mouse to continue browsing with arrow keys. Jussi 2010/11/7 Beno?t Minisini > > gvwFind.Column = 2 would be more convenient as search string can be > found > > multiple times from same line. > > > > Jussi > > > > On Fri, Oct 15, 2010 at 18:01, Jussi Lahtinen > wrote: > > > Hi! > > > Way to reproduce the problem: > > > 1. Open search window > > > 2. type some word for search > > > 3. click browse > > > 4. press arrow key to right or left > > > > > > Reason: > > > If gvwFind is not in focus, it has no current row, ie gvwFind.Row = -1. > > > Crash when; > > > hFind = $aBrowse[gvwFind.Row] > > > @ Public Sub gvwFind_Select() > > > > > > Suggestion: > > > Add following code to Sub gvwFind_Select. > > > > > > If gvwFind.Row = -1 Then > > > gvwFind.Row = 0 ' Prevents crash. > > > gvwFind.Column = 1 ' Makes browsing with arrow keys smoother. > > > Endif > > > > > > Gambas 3 rev 3265 @Ubuntu 10.04 64bit > > > > > > Jussi > > > > Thanks for the fix. I don't understand the need of setting gvwFind.Column, > so > I don't take that at the moment. > > Regards, > > -- > Beno?t Minisini > > > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From mauricio at ...2500... Sun Nov 7 18:11:02 2010 From: mauricio at ...2500... (Mauricio Baeza) Date: Sun, 07 Nov 2010 11:11:02 -0600 Subject: [Gambas-user] Problem with control TableView In-Reply-To: <201011071206.08898.gambas@...1...> References: <1288892618.30095.1.camel@...37...> <201011041913.49456.gambas@...1...> <1288896145.30095.3.camel@...37...> <201011071206.08898.gambas@...1...> Message-ID: <1289149863.2368.1.camel@...37...> El dom, 07-11-2010 a las 12:06 +0100, Beno?t Minisini escribi?: > > El jue, 04-11-2010 a las 19:13 +0100, Beno?t Minisini escribi?: > > > > Hi all ... > > > > > > > > When I show TableView control on a form which, in turn this into a > > > > Workspace control, shows me some items that I can not identify the > > > > image here: http://uploadpie.com/ElT5E > > > > > > > > If I show the form outside the workspace, it displays the correct > > > > TableView control. > > > > > > > > Does anyone know why? > > > > > > > > Thank you very much > > > > > > Please tell which version of Gambas you are using and send your project, > > > or if you can't a little project that shows the bug. > > > > > > Thanks in advance. > > > > > > Regards, > > > > Thanks for the quick response. > > > > Atach small test which shows the error. > > Gambas 2.21 in ArchLinux x64 > > > > Best regards > > Hi, > > The bug should be fixed in revision #3278. > > Regards, > Hello... It is grand, thank you... Only to finish this topic. I coment to you that I have proved the version of developer 2.99.0 in Ubuntu 10.10 x64, exactly in the same stage. The program provokes a general mistake and shows a message box of message that he says: The program stopped unexpectedly sending the sign #6 Please, make me know if I can help you with more information Thank you again Best regards -- Mauricio Baeza 10 a?os usando OpenOffice.org, libre, gratuito y seguro _______________________________ Todo lo que no es dado es perdido From gambas at ...1... Sun Nov 7 18:34:17 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sun, 7 Nov 2010 18:34:17 +0100 Subject: [Gambas-user] Problem with control TableView In-Reply-To: <1289149863.2368.1.camel@...37...> References: <1288892618.30095.1.camel@...37...> <201011071206.08898.gambas@...1...> <1289149863.2368.1.camel@...37...> Message-ID: <201011071834.17491.gambas@...1...> > El dom, 07-11-2010 a las 12:06 +0100, Beno?t Minisini escribi?: > > > El jue, 04-11-2010 a las 19:13 +0100, Beno?t Minisini escribi?: > > > > > Hi all ... > > > > > > > > > > When I show TableView control on a form which, in turn this into a > > > > > Workspace control, shows me some items that I can not identify the > > > > > image here: http://uploadpie.com/ElT5E > > > > > > > > > > If I show the form outside the workspace, it displays the correct > > > > > TableView control. > > > > > > > > > > Does anyone know why? > > > > > > > > > > Thank you very much > > > > > > > > Please tell which version of Gambas you are using and send your > > > > project, or if you can't a little project that shows the bug. > > > > > > > > Thanks in advance. > > > > > > > > Regards, > > > > > > Thanks for the quick response. > > > > > > Atach small test which shows the error. > > > Gambas 2.21 in ArchLinux x64 > > > > > > Best regards > > > > Hi, > > > > The bug should be fixed in revision #3278. > > > > Regards, > > Hello... > > It is grand, thank you... > > Only to finish this topic. I coment to you that I have proved the > version of developer 2.99.0 in Ubuntu 10.10 x64, exactly in the same > stage. The program provokes a general mistake and shows a message box of > message that he says: > > The program stopped unexpectedly sending the sign #6 > > Please, make me know if I can help you with more information > > Thank you again > > Best regards 1) Send me your project, and tell me how to reproduce the crash. 2) If the previous is not possible, follow the instruction on the "Reporting a problem" page of the web site to get a 'gdb' stack backtrace or a 'valgrind' output to help me fix the bug. Regards, -- Beno?t Minisini From mauricio at ...2500... Sun Nov 7 19:25:19 2010 From: mauricio at ...2500... (Mauricio Baeza) Date: Sun, 07 Nov 2010 12:25:19 -0600 Subject: [Gambas-user] Problem with control TableView In-Reply-To: <201011071834.17491.gambas@...1...> References: <1288892618.30095.1.camel@...37...> <201011071206.08898.gambas@...1...> <1289149863.2368.1.camel@...37...> <201011071834.17491.gambas@...1...> Message-ID: <1289154319.2368.3.camel@...37...> El dom, 07-11-2010 a las 18:34 +0100, Beno?t Minisini escribi?: > > El dom, 07-11-2010 a las 12:06 +0100, Beno?t Minisini escribi?: > > > > El jue, 04-11-2010 a las 19:13 +0100, Beno?t Minisini escribi?: > > > > > > Hi all ... > > > > > > > > > > > > When I show TableView control on a form which, in turn this into a > > > > > > Workspace control, shows me some items that I can not identify the > > > > > > image here: http://uploadpie.com/ElT5E > > > > > > > > > > > > If I show the form outside the workspace, it displays the correct > > > > > > TableView control. > > > > > > > > > > > > Does anyone know why? > > > > > > > > > > > > Thank you very much > > > > > > > > > > Please tell which version of Gambas you are using and send your > > > > > project, or if you can't a little project that shows the bug. > > > > > > > > > > Thanks in advance. > > > > > > > > > > Regards, > > > > > > > > Thanks for the quick response. > > > > > > > > Atach small test which shows the error. > > > > Gambas 2.21 in ArchLinux x64 > > > > > > > > Best regards > > > > > > Hi, > > > > > > The bug should be fixed in revision #3278. > > > > > > Regards, > > > > Hello... > > > > It is grand, thank you... > > > > Only to finish this topic. I coment to you that I have proved the > > version of developer 2.99.0 in Ubuntu 10.10 x64, exactly in the same > > stage. The program provokes a general mistake and shows a message box of > > message that he says: > > > > The program stopped unexpectedly sending the sign #6 > > > > Please, make me know if I can help you with more information > > > > Thank you again > > > > Best regards > > 1) Send me your project, and tell me how to reproduce the crash. > > 2) If the previous is not possible, follow the instruction on the "Reporting a > problem" page of the web site to get a 'gdb' stack backtrace or a 'valgrind' > output to help me fix the bug. > > Regards, > Hello... There atach the project in Gambas 2.99 in Ubuntu 10.10 x64 Inside the menu Forms, the first one works well, the second one provokes the mistake Thank you Best regards -- Mauricio Baeza 10 a?os usando OpenOffice.org, libre, gratuito y seguro ___________________________________ Todo lo que no es dado es perdido -------------- next part -------------- A non-text attachment was scrubbed... Name: Test.zip Type: application/zip Size: 9167 bytes Desc: not available URL: From mohareve at ...626... Sun Nov 7 21:10:41 2010 From: mohareve at ...626... (M. Cs.) Date: Sun, 7 Nov 2010 15:10:41 -0500 Subject: [Gambas-user] Requests for Gambas3 Message-ID: Dear Benoit and all, I'm writing this request as serious cry for your reconsideration and help. I was using Gambas2 on various distributions, and I'm trying to maintain the GamCat project, which is written in Gambas2, but it is harder and harder to do. First I've heard that openSuse is not following your concept of packaging the components, so they don't have gambas2-gb-sdl-sound component at all. Some times ago the component gambas2-gb-qt-kde has disappeared from Mandriva too. PCLinuxOS have only one package for gambas2 so it IS impossible to use projects written in G2 on various Linux distributions. In fact, only *buntu has full G2 support today, and this is a big regression. What I suggest is: - Have only two packages for the entire G3: one for the IDE component (for those not using G3 for development) and the rest of the components shipped in a single package. I have good reasons for that: gambas is not bigger than around 40MB. This is not a big size. I'd like to see gambas as a widely usable framework, not what is today. It would be so nice just to fire up the gambas3 package and have working applications written in it. Today I can't say gambas2 is very useful, because I can't force a user of e.g. GamCat to compile gambas2 from sources in order to have all the possible opions at hand. It is a real pain to package projects for different kind of Linuxes. It would be a pity for this great work to become a narrowing chunk. We cannot force packagers to obey the packaging rules of the many components, and the situation is really insane. Please consider it, for the project's sake. Thank you! Csaba From linuxos at ...1896... Sun Nov 7 21:50:59 2010 From: linuxos at ...1896... (Olivier Cruilles) Date: Sun, 7 Nov 2010 21:50:59 +0100 Subject: [Gambas-user] Requests for Gambas3 In-Reply-To: References: Message-ID: <43BBE976-0438-4EAE-BC44-CD4BA7C2B497@...1896...> Hello, I'm exactly in the same situation about my project 'gbrrdgraphix' and I confirm that is very difficult to create and maintain package of a Gambas project for the most known linux distributions. You need to consider that if you create only 2 packages for each distribution, to install these, you need to satisfy all dependencies of packages so It's not only 40 MB that you need to install but all packages whose all components depends and it's not the same problem. After many time thinking about that, better should be to have people who want to create package respecting all procedures that Benoit indicate on his web site. What do you think about that Benoit or did you have any other solution ? Olivier Cruilles Mail: linuxos at ...1896... Le 7 nov. 2010 ? 21:10, M. Cs. a ?crit : > > Dear Benoit and all, > I'm writing this request as serious cry for your reconsideration and help. > I was using Gambas2 on various distributions, and I'm trying to maintain the > GamCat project, which is written in Gambas2, but it is harder and harder to > do. First I've heard that openSuse is not following your concept of > packaging the components, so they don't have gambas2-gb-sdl-sound component > at all. Some times ago the component gambas2-gb-qt-kde has disappeared from > Mandriva too. PCLinuxOS have only one package for gambas2 so it IS > impossible to use projects written in G2 on various Linux distributions. In > fact, only *buntu has full G2 support today, and this is a big regression. > What I suggest is: > - Have only two packages for the entire G3: one for the IDE component (for > those not using G3 for development) and the rest of the components shipped > in a single package. > > I have good reasons for that: gambas is not bigger than around 40MB. This is > not a big size. I'd like to see gambas as a widely usable framework, not > what is today. It would be so nice just to fire up the gambas3 package and > have working applications written in it. Today I can't say gambas2 is very > useful, because I can't force a user of e.g. GamCat to compile gambas2 from > sources in order to have all the possible opions at hand. It is a real pain > to package projects for different kind of Linuxes. It would be a pity for > this great work to become a narrowing chunk. We cannot force packagers to > obey the packaging rules of the many components, and the situation is really > insane. Please consider it, for the project's sake. > > Thank you! > > Csaba > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas at ...1... Sun Nov 7 21:55:11 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sun, 7 Nov 2010 21:55:11 +0100 Subject: [Gambas-user] Requests for Gambas3 In-Reply-To: References: Message-ID: <201011072155.11865.gambas@...1...> > Dear Benoit and all, > I'm writing this request as serious cry for your reconsideration and help. > I was using Gambas2 on various distributions, and I'm trying to maintain > the GamCat project, which is written in Gambas2, but it is harder and > harder to do. First I've heard that openSuse is not following your concept > of packaging the components, so they don't have gambas2-gb-sdl-sound > component at all. Some times ago the component gambas2-gb-qt-kde has > disappeared from Mandriva too. PCLinuxOS have only one package for gambas2 > so it IS impossible to use projects written in G2 on various Linux > distributions. In fact, only *buntu has full G2 support today, and this is > a big regression. What I suggest is: > - Have only two packages for the entire G3: one for the IDE component (for > those not using G3 for development) and the rest of the components shipped > in a single package. > > I have good reasons for that: gambas is not bigger than around 40MB. This > is not a big size. I'd like to see gambas as a widely usable framework, > not what is today. It would be so nice just to fire up the gambas3 package > and have working applications written in it. Today I can't say gambas2 is > very useful, because I can't force a user of e.g. GamCat to compile > gambas2 from sources in order to have all the possible opions at hand. It > is a real pain to package projects for different kind of Linuxes. It would > be a pity for this great work to become a narrowing chunk. We cannot force > packagers to obey the packaging rules of the many components, and the > situation is really insane. Please consider it, for the project's sake. > > Thank you! > > Csaba Gambas is packaged the same way as other interpreted languages (python, perl, mono...) Distributions remove some gambas packages because they have removed the library they used. So using a different packaging will change nothing : you will get a non-working gambas component instead of nothing. Not really better... Putting everything in a single package is a very stupid idea, because it will force to install every Gambas dependencies, which is far more than 40 Mb! An intermediate solution is the ability of making self-contained package, like Google does with Google Earth for example. I think the situation will become better with Gambas 3, because it will use recent libraries. Regards, -- Beno?t Minisini From demosthenesk at ...626... Mon Nov 8 09:51:01 2010 From: demosthenesk at ...626... (user) Date: Mon, 08 Nov 2010 10:51:01 +0200 Subject: [Gambas-user] Numeric operation between strings. Message-ID: <1289206261.3025.2.camel@...2493...> Hi to all and good morning. I have this code PRINT CStr(-19776) + CStr(-19776) and i get -39552 How this is possible? Numeric operations between Strings? From Gambas at ...1950... Mon Nov 8 10:31:58 2010 From: Gambas at ...1950... (Caveat) Date: Mon, 08 Nov 2010 10:31:58 +0100 Subject: [Gambas-user] Numeric operation between strings. In-Reply-To: <1289206261.3025.2.camel@...2493...> References: <1289206261.3025.2.camel@...2493...> Message-ID: <1289208718.3358.51.camel@...2479...> Well CStr(-19776) gives -19776 so if you use the arithmetic addition operator you're gonna get -19776 plus -19776 giving -39552. Using the arithmetic operator in this case only works if both your strings can be treated as floats, so this will raise an error: PRINT CStr(-19776) + CStr("W") If you used the ampersand (&) instead, like this: PRINT CStr(-19776) & CStr(-19776) you'd've gotten the expected(?) result of: -19776-19776 and: PRINT CStr(-19776) & CStr("W") would not fail, but give: -19776W Regards, Caveat On Mon, 2010-11-08 at 10:51 +0200, user wrote: > Hi to all and good morning. > > I have this code > > PRINT CStr(-19776) + CStr(-19776) > > and i get -39552 > > How this is possible? Numeric operations between Strings? > > > > > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From mohareve at ...626... Mon Nov 8 11:07:15 2010 From: mohareve at ...626... (M. Cs.) Date: Mon, 8 Nov 2010 05:07:15 -0500 Subject: [Gambas-user] Requests for Gambas3 In-Reply-To: <201011072155.11865.gambas@...1...> References: <201011072155.11865.gambas@...1...> Message-ID: "An intermediate solution is the ability of making self-contained package, like Google does with Google Earth for example." But that isn't viable, since if I wanted to package an application on a system I need to have to have everything already installed in order to have the required libraries to be put into the target package, and that brings me back to the root of the problems: only *buntu has the background for that kind of work. From demosthenesk at ...626... Mon Nov 8 11:36:27 2010 From: demosthenesk at ...626... (user) Date: Mon, 08 Nov 2010 12:36:27 +0200 Subject: [Gambas-user] Numeric operation between strings. In-Reply-To: <1289208718.3358.51.camel@...2479...> References: <1289206261.3025.2.camel@...2493...> <1289208718.3358.51.camel@...2479...> Message-ID: <1289212587.3025.12.camel@...2493...> ok i see this but CStr(-19776) output is it a string? for example i think there is difference between DIM sVar1="-19776" AS String DIM iVar2=-19776 AS Integer why Gambas re-convert a string to integer again when see a + operator? The statement PRINT CStr(-19776) + CStr(-19776) should be equal to PRINT ("-19776" + "-19776") and raise an error, strings cannot be sumed. This function of Gambas seems to reconvert strings to numbers with + operator. Should be this happend? On Mon, 2010-11-08 at 10:31 +0100, Caveat wrote: > Well CStr(-19776) gives -19776 so if you use the arithmetic addition > operator you're gonna get -19776 plus -19776 giving -39552. > > Using the arithmetic operator in this case only works if both your > strings can be treated as floats, so this will raise an error: > > PRINT CStr(-19776) + CStr("W") > > If you used the ampersand (&) instead, like this: > > PRINT CStr(-19776) & CStr(-19776) > > you'd've gotten the expected(?) result of: > > -19776-19776 > > and: > > PRINT CStr(-19776) & CStr("W") > > would not fail, but give: > > -19776W > > Regards, > Caveat > > On Mon, 2010-11-08 at 10:51 +0200, user wrote: > > Hi to all and good morning. > > > > I have this code > > > > PRINT CStr(-19776) + CStr(-19776) > > > > and i get -39552 > > > > How this is possible? Numeric operations between Strings? > > > > > > > > > > ------------------------------------------------------------------------------ > > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > > David G. Thomson, author of the best-selling book "Blueprint to a > > Billion" shares his insights and actions to help propel your > > business during the next growth cycle. Listen Now! > > http://p.sf.net/sfu/SAP-dev2dev > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From doriano.blengino at ...1909... Mon Nov 8 11:52:11 2010 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Mon, 08 Nov 2010 11:52:11 +0100 Subject: [Gambas-user] Numeric operation between strings. In-Reply-To: <1289212587.3025.12.camel@...2493...> References: <1289206261.3025.2.camel@...2493...> <1289208718.3358.51.camel@...2479...> <1289212587.3025.12.camel@...2493...> Message-ID: <4CD7D65B.6070308@...1909...> user ha scritto: > ok i see this but > > CStr(-19776) output is it a string? > > for example i think there is difference between > > DIM sVar1="-19776" AS String > DIM iVar2=-19776 AS Integer > > why Gambas re-convert a string to integer again when see a + operator? > Because gambas has automatic type conversion. So, if it sees a "+" operator, which applies to numbers, it tries to convert its arguments to integer (or even float?). I think that this feature, if used with a grain of salt, can be very handy. When misused (I am not saying you were misusing), it can lead to very surprising results. Use the "&" operator, and the result will be no more strange. Hope it helps, regards, Doriano From demosthenesk at ...626... Mon Nov 8 12:49:20 2010 From: demosthenesk at ...626... (user) Date: Mon, 08 Nov 2010 13:49:20 +0200 Subject: [Gambas-user] Numeric operation between strings. In-Reply-To: <4CD7D65B.6070308@...1909...> References: <1289206261.3025.2.camel@...2493...> <1289208718.3358.51.camel@...2479...> <1289212587.3025.12.camel@...2493...> <4CD7D65B.6070308@...1909...> Message-ID: <1289216960.3705.2.camel@...2493...> ok i see that it works like this. I just want to ensure how it works because i am writing a book about Gambas and i want to describe some things correctly. Thanks. On Mon, 2010-11-08 at 11:52 +0100, Doriano Blengino wrote: > user ha scritto: > > ok i see this but > > > > CStr(-19776) output is it a string? > > > > for example i think there is difference between > > > > DIM sVar1="-19776" AS String > > DIM iVar2=-19776 AS Integer > > > > why Gambas re-convert a string to integer again when see a + operator? > > > Because gambas has automatic type conversion. So, if it sees a "+" > operator, which applies to numbers, it tries to convert its arguments to > integer (or even float?). I think that this feature, if used with a > grain of salt, can be very handy. When misused (I am not saying you were > misusing), it can lead to very surprising results. Use the "&" operator, > and the result will be no more strange. > > Hope it helps, regards, > Doriano > > > > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From demosthenesk at ...626... Mon Nov 8 17:30:16 2010 From: demosthenesk at ...626... (user) Date: Mon, 08 Nov 2010 18:30:16 +0200 Subject: [Gambas-user] MOD arithetic operator Message-ID: <1289233816.4245.1.camel@...2493...> Hi to all, i want to ask why there is not a modulus operator like % for example? From jussi.lahtinen at ...626... Mon Nov 8 17:50:51 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Mon, 8 Nov 2010 18:50:51 +0200 Subject: [Gambas-user] MOD arithetic operator In-Reply-To: <1289233816.4245.1.camel@...2493...> References: <1289233816.4245.1.camel@...2493...> Message-ID: ?? There is Mod. http://gambasdoc.org/help/lang/mod Jussi On Mon, Nov 8, 2010 at 18:30, user wrote: > Hi to all, > > i want to ask why there is not a modulus operator like % for example? > > > > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From mauricio at ...2500... Mon Nov 8 17:36:53 2010 From: mauricio at ...2500... (Mauricio Baeza) Date: Mon, 08 Nov 2010 10:36:53 -0600 Subject: [Gambas-user] MOD arithetic operator In-Reply-To: <1289233816.4245.1.camel@...2493...> References: <1289233816.4245.1.camel@...2493...> Message-ID: <1289234213.2251.7.camel@...37...> El lun, 08-11-2010 a las 18:30 +0200, user escribi?: > Hi to all, > > i want to ask why there is not a modulus operator like % for example? > http://gambasdoc.org/help/lang/mod -- Mauricio Baeza 10 a?os usando OpenOffice.org, libre, gratuito y seguro _______________________________ Todo lo que no es dado es perdido From demosthenesk at ...626... Mon Nov 8 19:35:13 2010 From: demosthenesk at ...626... (user) Date: Mon, 08 Nov 2010 20:35:13 +0200 Subject: [Gambas-user] MOD arithetic operator In-Reply-To: References: <1289233816.4245.1.camel@...2493...> Message-ID: <1289241313.3487.2.camel@...2494...> I know that there is MOD but i ask this question cause i compare the C++ operators with Gambas. As there is DIV and \ operator i was questioned why MOD has not an operator as % for example in C++ On Mon, 2010-11-08 at 18:50 +0200, Jussi Lahtinen wrote: > ?? There is Mod. > http://gambasdoc.org/help/lang/mod > > Jussi > > > > On Mon, Nov 8, 2010 at 18:30, user wrote: > > > Hi to all, > > > > i want to ask why there is not a modulus operator like % for example? > > > > > > > > ------------------------------------------------------------------------------ > > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > > David G. Thomson, author of the best-selling book "Blueprint to a > > Billion" shares his insights and actions to help propel your > > business during the next growth cycle. Listen Now! > > http://p.sf.net/sfu/SAP-dev2dev > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From gambas at ...1... Mon Nov 8 20:02:06 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 8 Nov 2010 20:02:06 +0100 Subject: [Gambas-user] MOD arithetic operator In-Reply-To: <1289241313.3487.2.camel@...2494...> References: <1289233816.4245.1.camel@...2493...> <1289241313.3487.2.camel@...2494...> Message-ID: <201011082002.06896.gambas@...1...> > I know that there is MOD > > but i ask this question cause i compare the C++ operators with Gambas. > > As there is DIV and \ operator > i was questioned why MOD has not an operator as % for example in C++ > Because Gambas is a Basic, and the Basic languages I know do not use "%" as operator. -- Beno?t Minisini From demosthenesk at ...626... Mon Nov 8 20:54:25 2010 From: demosthenesk at ...626... (user) Date: Mon, 08 Nov 2010 21:54:25 +0200 Subject: [Gambas-user] MOD arithetic operator In-Reply-To: <201011082002.06896.gambas@...1...> References: <1289233816.4245.1.camel@...2493...> <1289241313.3487.2.camel@...2494...> <201011082002.06896.gambas@...1...> Message-ID: <1289246065.3487.46.camel@...2494...> Ok, Thank you for your answer! On Mon, 2010-11-08 at 20:02 +0100, Beno?t Minisini wrote: > > I know that there is MOD > > > > but i ask this question cause i compare the C++ operators with Gambas. > > > > As there is DIV and \ operator > > i was questioned why MOD has not an operator as % for example in C++ > > > > Because Gambas is a Basic, and the Basic languages I know do not use "%" as > operator. > From demosthenesk at ...626... Tue Nov 9 01:26:22 2010 From: demosthenesk at ...626... (user) Date: Tue, 09 Nov 2010 02:26:22 +0200 Subject: [Gambas-user] MOD arithetic operator In-Reply-To: <201011082002.06896.gambas@...1...> References: <1289233816.4245.1.camel@...2493...> <1289241313.3487.2.camel@...2494...> <201011082002.06896.gambas@...1...> Message-ID: <1289262382.2141.3.camel@...2494...> This question was created to me when i saw the MOD function in arithmetic operators without a an operator as the DIV has one. http://gambasdoc.org/help/cat/arithop On Mon, 2010-11-08 at 20:02 +0100, Beno?t Minisini wrote: > > I know that there is MOD > > > > but i ask this question cause i compare the C++ operators with Gambas. > > > > As there is DIV and \ operator > > i was questioned why MOD has not an operator as % for example in C++ > > > > Because Gambas is a Basic, and the Basic languages I know do not use "%" as > operator. > From gambas.fr at ...626... Tue Nov 9 08:25:34 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Tue, 9 Nov 2010 08:25:34 +0100 Subject: [Gambas-user] MOD arithetic operator In-Reply-To: <1289262382.2141.3.camel@...2494...> References: <1289233816.4245.1.camel@...2493...> <1289241313.3487.2.camel@...2494...> <201011082002.06896.gambas@...1...> <1289262382.2141.3.camel@...2494...> Message-ID: in another hand.... i don't understand the existance of the DIV operator :/ ... if DIV exist why not ADD/MINUS/MULT ? so ... i'm agree with user ... why not add the % synonymous ? this is not consistent 2010/11/9 user : > This question was created to me when i saw the MOD function in > arithmetic operators without a an operator as the DIV has one. > > http://gambasdoc.org/help/cat/arithop > > On Mon, 2010-11-08 at 20:02 +0100, Beno?t Minisini wrote: >> > I know that there is MOD >> > >> > but i ask this question cause i compare the C++ operators with Gambas. >> > >> > As there is DIV and \ operator >> > i was questioned why MOD has not an operator as % for example in C++ >> > >> >> Because Gambas is a Basic, and the Basic languages I know do not use "%" as >> operator. >> > > > > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Fabien Bodard From demosthenesk at ...626... Tue Nov 9 08:40:33 2010 From: demosthenesk at ...626... (user) Date: Tue, 09 Nov 2010 09:40:33 +0200 Subject: [Gambas-user] MOD arithetic operator In-Reply-To: References: <1289233816.4245.1.camel@...2493...> <1289241313.3487.2.camel@...2494...> <201011082002.06896.gambas@...1...> <1289262382.2141.3.camel@...2494...> Message-ID: <1289288433.4832.11.camel@...2494...> i am not the person that should answer but i will as i understood well as possible the concept of Gambas .. i think Gambas concept is to keep a Basic style language as possible can. So an % operator is a foreign word for a Basic language. >From the other hand it would be nice Gambas to be a better Basic language with the meaning to have the good things of other languages but with Basic style so to be an advanced Basic more strong to be near other Linux style languages. As i know Basic does not have pointers either. But Gambas 3 has! And the EXTERN function leads things more than a Basic language. So in my opinion an % operator is not so big deal thing to be out of a Basic language. Indeed i suggest it as a wish/new feature if you like. But all depends how Basic like style we want to keep. On Tue, 2010-11-09 at 08:25 +0100, Fabien Bodard wrote: > in another hand.... i don't understand the existance of the DIV > operator :/ ... if DIV exist why not ADD/MINUS/MULT ? > > so ... i'm agree with user ... why not add the % synonymous ? > > this is not consistent > > > 2010/11/9 user : > > This question was created to me when i saw the MOD function in > > arithmetic operators without a an operator as the DIV has one. > > > > http://gambasdoc.org/help/cat/arithop > > > > On Mon, 2010-11-08 at 20:02 +0100, Beno?t Minisini wrote: > >> > I know that there is MOD > >> > > >> > but i ask this question cause i compare the C++ operators with Gambas. > >> > > >> > As there is DIV and \ operator > >> > i was questioned why MOD has not an operator as % for example in C++ > >> > > >> > >> Because Gambas is a Basic, and the Basic languages I know do not use "%" as > >> operator. > >> > > > > > > > > ------------------------------------------------------------------------------ > > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > > David G. Thomson, author of the best-selling book "Blueprint to a > > Billion" shares his insights and actions to help propel your > > business during the next growth cycle. Listen Now! > > http://p.sf.net/sfu/SAP-dev2dev > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > From doriano.blengino at ...1909... Tue Nov 9 09:08:52 2010 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Tue, 09 Nov 2010 09:08:52 +0100 Subject: [Gambas-user] MOD arithetic operator In-Reply-To: <1289288433.4832.11.camel@...2494...> References: <1289233816.4245.1.camel@...2493...> <1289241313.3487.2.camel@...2494...> <201011082002.06896.gambas@...1...> <1289262382.2141.3.camel@...2494...> <1289288433.4832.11.camel@...2494...> Message-ID: <4CD90194.8070600@...1909...> user ha scritto: > i am not the person that should answer but i will as i understood well > as possible the concept of Gambas .. > > i think Gambas concept is to keep a Basic style language as possible > can. So an % operator is a foreign word for a Basic language. > > >From the other hand it would be nice Gambas to be a better Basic > language with the meaning to have the good things of other languages but > with Basic style so to be an advanced Basic more strong to be near other > Linux style languages. > > As i know Basic does not have pointers either. > But Gambas 3 has! > > And the EXTERN function leads things more than a Basic language. > > So in my opinion an % operator is not so big deal thing to be out of a > Basic language. > Sorry to drop in - I only want to point out that MOD *is* an operator, and works just like "%". By putting "%" in gambas, you could do modulus using a single keystroke instead of three (five, counting the necessary spaces around...). You would also gain then "%=" operation (I wonder who in gambas misses things like this one). This could be a great deal, perhaps... but I don't think (just my opinion). I can not understand why people knowing C and C++ would like to turn gambas in a language where it is possible to write things like while (c%=*++b->h!=!n^k); Is it so painful to write "a = c mod b" instead of "a = c % b"? There are not enough symbols on the keyboard to express all the possible operations... so let stay with the most useful ones (the four arithmetic operations). I think that the integer division "\" should disappear, in favor of DIV. Would you say, instead, that gambas needs also &, &&, |, ||, and so on? No? Why not? It's the same as "%"... Hope to not having hurted you: it's just my opinion which contrasts with you... :-) Regards, Doriano > Indeed i suggest it as a wish/new feature if you like. > > But all depends how Basic like style we want to keep. > > On Tue, 2010-11-09 at 08:25 +0100, Fabien Bodard wrote: > >> in another hand.... i don't understand the existance of the DIV >> operator :/ ... if DIV exist why not ADD/MINUS/MULT ? >> >> so ... i'm agree with user ... why not add the % synonymous ? >> >> this is not consistent >> >> >> 2010/11/9 user : >> >>> This question was created to me when i saw the MOD function in >>> arithmetic operators without a an operator as the DIV has one. >>> >>> http://gambasdoc.org/help/cat/arithop >>> >>> On Mon, 2010-11-08 at 20:02 +0100, Beno?t Minisini wrote: >>> >>>>> I know that there is MOD >>>>> >>>>> but i ask this question cause i compare the C++ operators with Gambas. >>>>> >>>>> As there is DIV and \ operator >>>>> i was questioned why MOD has not an operator as % for example in C++ >>>>> >>>>> >>>> Because Gambas is a Basic, and the Basic languages I know do not use "%" as >>>> operator. >>>> >>>> >>> >>> ------------------------------------------------------------------------------ >>> The Next 800 Companies to Lead America's Growth: New Video Whitepaper >>> David G. Thomson, author of the best-selling book "Blueprint to a >>> Billion" shares his insights and actions to help propel your >>> business during the next growth cycle. Listen Now! >>> http://p.sf.net/sfu/SAP-dev2dev >>> _______________________________________________ >>> Gambas-user mailing list >>> Gambas-user at lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>> >>> >> >> > > > > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From demosthenesk at ...626... Tue Nov 9 09:58:56 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Tue, 09 Nov 2010 10:58:56 +0200 Subject: [Gambas-user] MOD arithetic operator In-Reply-To: <4CD90194.8070600@...1909...> References: <1289233816.4245.1.camel@...2493...> <1289241313.3487.2.camel@...2494...> <201011082002.06896.gambas@...1...> <1289262382.2141.3.camel@...2494...> <1289288433.4832.11.camel@...2494...> <4CD90194.8070600@...1909...> Message-ID: <1289293136.4832.22.camel@...2494...> Hi to all, and good morning. Dont worry you dont hurt me. :) I am not a C++ person not at all. Of course there is no need to turn Basic in C style. But i make a notice about DIV and MOD. The one of them has a synonmous as operator. The only thing i propose is to maintain a same "thinking" while reading the manual with programming style. To do this there are two options - MOD and DIV should not have operators - MOD and DIV it is nice to have operators. Or we leave the things as they are. All options are respectfull ones. On Tue, 2010-11-09 at 09:08 +0100, Doriano Blengino wrote: > user ha scritto: > > i am not the person that should answer but i will as i understood well > > as possible the concept of Gambas .. > > > > i think Gambas concept is to keep a Basic style language as possible > > can. So an % operator is a foreign word for a Basic language. > > > > >From the other hand it would be nice Gambas to be a better Basic > > language with the meaning to have the good things of other languages but > > with Basic style so to be an advanced Basic more strong to be near other > > Linux style languages. > > > > As i know Basic does not have pointers either. > > But Gambas 3 has! > > > > And the EXTERN function leads things more than a Basic language. > > > > So in my opinion an % operator is not so big deal thing to be out of a > > Basic language. > > > Sorry to drop in - I only want to point out that MOD *is* an operator, > and works just like "%". > By putting "%" in gambas, you could do modulus using a single keystroke > instead of three (five, counting the necessary spaces around...). You > would also gain then "%=" operation (I wonder who in gambas misses > things like this one). This could be a great deal, perhaps... but I > don't think (just my opinion). I can not understand why people knowing C > and C++ would like to turn gambas in a language where it is possible to > write things like > > while (c%=*++b->h!=!n^k); > > Is it so painful to write "a = c mod b" instead of "a = c % b"? There > are not enough symbols on the keyboard to express all the possible > operations... so let stay with the most useful ones (the four arithmetic > operations). I think that the integer division "\" should disappear, in > favor of DIV. Would you say, instead, that gambas needs also &, &&, |, > ||, and so on? No? Why not? It's the same as "%"... > > Hope to not having hurted you: it's just my opinion which contrasts with > you... :-) > > Regards, > Doriano > > > > > > Indeed i suggest it as a wish/new feature if you like. > > > > But all depends how Basic like style we want to keep. > > > > On Tue, 2010-11-09 at 08:25 +0100, Fabien Bodard wrote: > > > >> in another hand.... i don't understand the existance of the DIV > >> operator :/ ... if DIV exist why not ADD/MINUS/MULT ? > >> > >> so ... i'm agree with user ... why not add the % synonymous ? > >> > >> this is not consistent > >> > >> > >> 2010/11/9 user : > >> > >>> This question was created to me when i saw the MOD function in > >>> arithmetic operators without a an operator as the DIV has one. > >>> > >>> http://gambasdoc.org/help/cat/arithop > >>> > >>> On Mon, 2010-11-08 at 20:02 +0100, Beno?t Minisini wrote: > >>> > >>>>> I know that there is MOD > >>>>> > >>>>> but i ask this question cause i compare the C++ operators with Gambas. > >>>>> > >>>>> As there is DIV and \ operator > >>>>> i was questioned why MOD has not an operator as % for example in C++ > >>>>> > >>>>> > >>>> Because Gambas is a Basic, and the Basic languages I know do not use "%" as > >>>> operator. > >>>> > >>>> > >>> > >>> ------------------------------------------------------------------------------ > >>> The Next 800 Companies to Lead America's Growth: New Video Whitepaper > >>> David G. Thomson, author of the best-selling book "Blueprint to a > >>> Billion" shares his insights and actions to help propel your > >>> business during the next growth cycle. Listen Now! > >>> http://p.sf.net/sfu/SAP-dev2dev > >>> _______________________________________________ > >>> Gambas-user mailing list > >>> Gambas-user at lists.sourceforge.net > >>> https://lists.sourceforge.net/lists/listinfo/gambas-user > >>> > >>> > >> > >> > > > > > > > > ------------------------------------------------------------------------------ > > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > > David G. Thomson, author of the best-selling book "Blueprint to a > > Billion" shares his insights and actions to help propel your > > business during the next growth cycle. Listen Now! > > http://p.sf.net/sfu/SAP-dev2dev > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From ihaywood at ...1979... Tue Nov 9 12:25:40 2010 From: ihaywood at ...1979... (Ian Haywood) Date: Tue, 9 Nov 2010 22:25:40 +1100 Subject: [Gambas-user] MOD arithetic operator In-Reply-To: <1289288433.4832.11.camel@...2494...> References: <1289233816.4245.1.camel@...2493...> <1289241313.3487.2.camel@...2494...> <201011082002.06896.gambas@...1...> <1289262382.2141.3.camel@...2494...> <1289288433.4832.11.camel@...2494...> Message-ID: On Tue, Nov 9, 2010 at 6:40 PM, user wrote: > i think Gambas concept is to keep a Basic style language as possible > can. So an % operator is a foreign word for a Basic language. Correct I remember MOD from the BBC Acorn's BASIC in the mid 1980s, so for me it is fairly natural, strangely even after a 25 year hiatus in BASIC programming. It makes sense as the ASCII keyboard doesn't have an "obvious" symbol for modulus, (except for C programmers) unlike +, - and / which most people will understand from primary school mathematics lessons. Ian From gambas at ...1... Tue Nov 9 12:31:52 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 9 Nov 2010 12:31:52 +0100 Subject: [Gambas-user] MOD arithetic operator In-Reply-To: <1289293136.4832.22.camel@...2494...> References: <1289233816.4245.1.camel@...2493...> <4CD90194.8070600@...1909...> <1289293136.4832.22.camel@...2494...> Message-ID: <201011091231.52885.gambas@...1...> > Hi to all, and good morning. > > Dont worry you dont hurt me. :) > > I am not a C++ person not at all. > > Of course there is no need to turn Basic in C style. > > But i make a notice about DIV and MOD. > The one of them has a synonmous as operator. > > The only thing i propose is to maintain a same "thinking" while reading > the manual with programming style. > > To do this there are two options > - MOD and DIV should not have operators > - MOD and DIV it is nice to have operators. > > Or we leave the things as they are. > > All options are respectfull ones. > I can add '%' to the compiler as a MOD synonymous, as I don't think I will use this character for anything else. -- Beno?t Minisini From demosthenesk at ...626... Tue Nov 9 12:46:44 2010 From: demosthenesk at ...626... (user) Date: Tue, 09 Nov 2010 13:46:44 +0200 Subject: [Gambas-user] MOD arithetic operator In-Reply-To: <201011091231.52885.gambas@...1...> References: <1289233816.4245.1.camel@...2493...> <4CD90194.8070600@...1909...> <1289293136.4832.22.camel@...2494...> <201011091231.52885.gambas@...1...> Message-ID: <1289303204.3300.6.camel@...2493...> In my opinion that is correct choice. Because if you remove DIV aka / operator there will be problem for those who used this in their programs in the past. In the other hand if you add % operator as MOD the arithmetic operators will be complete and whole in my opinion as i read the manual. A last note if old developers like very much the strict classic Basic style you must weight their opinion if it is going to add or not a MOD operator, so not to be hard feelings. On Tue, 2010-11-09 at 12:31 +0100, Beno?t Minisini wrote: > > Hi to all, and good morning. > > > > Dont worry you dont hurt me. :) > > > > I am not a C++ person not at all. > > > > Of course there is no need to turn Basic in C style. > > > > But i make a notice about DIV and MOD. > > The one of them has a synonmous as operator. > > > > The only thing i propose is to maintain a same "thinking" while reading > > the manual with programming style. > > > > To do this there are two options > > - MOD and DIV should not have operators > > - MOD and DIV it is nice to have operators. > > > > Or we leave the things as they are. > > > > All options are respectfull ones. > > > > I can add '%' to the compiler as a MOD synonymous, as I don't think I will use > this character for anything else. > From demosthenesk at ...626... Tue Nov 9 13:05:56 2010 From: demosthenesk at ...626... (user) Date: Tue, 09 Nov 2010 14:05:56 +0200 Subject: [Gambas-user] MOD arithetic operator In-Reply-To: <201011091231.52885.gambas@...1...> References: <1289233816.4245.1.camel@...2493...> <4CD90194.8070600@...1909...> <1289293136.4832.22.camel@...2494...> <201011091231.52885.gambas@...1...> Message-ID: <1289304356.3500.0.camel@...2493...> > In my opinion that is correct choice. > >Because if you remove DIV aka / operator there will be problem for those Because if you remove DIV aka \ operator there will be problem for those (sorry mistake!) > who used this in their programs in the past. > > In the other hand if you add % operator as MOD the arithmetic operators > will be complete and whole in my opinion as i read the manual. > > A last note if old developers like very much the strict classic Basic > style you must weight their opinion if it is going to add or not a MOD > operator, so not to be hard feelings. > > > On Tue, 2010-11-09 at 12:31 +0100, Beno?t Minisini wrote: > > > Hi to all, and good morning. > > > > > > Dont worry you dont hurt me. :) > > > > > > I am not a C++ person not at all. > > > > > > Of course there is no need to turn Basic in C style. > > > > > > But i make a notice about DIV and MOD. > > > The one of them has a synonmous as operator. > > > > > > The only thing i propose is to maintain a same "thinking" while reading > > > the manual with programming style. > > > > > > To do this there are two options > > > - MOD and DIV should not have operators > > > - MOD and DIV it is nice to have operators. > > > > > > Or we leave the things as they are. > > > > > > All options are respectfull ones. > > > > > > > I can add '%' to the compiler as a MOD synonymous, as I don't think I will use > > this character for anything else. > > > From demosthenesk at ...626... Tue Nov 9 13:39:31 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Tue, 09 Nov 2010 14:39:31 +0200 Subject: [Gambas-user] IS, IsAscii, IsBlank, IsBoolean etc Message-ID: <1289306371.3879.2.camel@...2493...> In Operator Evaluation Order http://gambasdoc.org/help/cat/evalorder i see that the IS keyword is an operator with Strength 11. 1) All Is.. keywords are operators ? 2) All Is.. keywords have strength 11 ? From demosthenesk at ...626... Tue Nov 9 13:46:51 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Tue, 09 Nov 2010 14:46:51 +0200 Subject: [Gambas-user] string operator == Message-ID: <1289306811.3979.5.camel@...2493...> Hi, i dont understand the following result. PRINT "abc" == "ab" 'true PRINT "abc" == "abc" 'false in http://gambasdoc.org/help/cat/stringop says Returns if two strings are equal. The comparison is case unsensitive. 1) why "abc" and "ab" says they are equal? 2) and "abc" == "abc" are not? From gambas at ...1... Tue Nov 9 13:47:07 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 9 Nov 2010 13:47:07 +0100 Subject: [Gambas-user] IS, IsAscii, IsBlank, IsBoolean etc In-Reply-To: <1289306371.3879.2.camel@...2493...> References: <1289306371.3879.2.camel@...2493...> Message-ID: <201011091347.07504.gambas@...1...> > In Operator Evaluation Order > http://gambasdoc.org/help/cat/evalorder > > i see that the IS keyword is an operator with Strength 11. > > 1) All Is.. keywords are operators ? > 2) All Is.. keywords have strength 11 ? > They are not related at all. 'Is' is an operator, wherea IsXXXX() are functions. Regards, -- Beno?t Minisini From gregor at ...2441... Tue Nov 9 14:10:09 2010 From: gregor at ...2441... (Gregor Burck) Date: Tue, 9 Nov 2010 14:10:09 +0100 Subject: [Gambas-user] Print, Resolution, Units Message-ID: <08274450ce2edb85ff98f6ee127fd430@...2442...> Hi, when I want to print the units for draw were dots, for the gui I want to use milimeter. So I create a function public function mmToDots(mm as integer, resolution as integer) as integer return Round(mm / 25.4 * resolution) end And draw e.g. a line with draw(mmToDots(X,draw.resolution),mmToDots(Y,draw.resolution),mmToDots(X2,draw.resolution) ,mmToDots(Y2,draw.resolution)) to be independent from the Printer Resolution. But is there a better way for use the metric system to print? By Gregor -- From demosthenesk at ...626... Tue Nov 9 14:14:15 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Tue, 09 Nov 2010 15:14:15 +0200 Subject: [Gambas-user] IS, IsAscii, IsBlank, IsBoolean etc In-Reply-To: <201011091347.07504.gambas@...1...> References: <1289306371.3879.2.camel@...2493...> <201011091347.07504.gambas@...1...> Message-ID: <1289308455.4140.0.camel@...2493...> Thanks Beno?t! On Tue, 2010-11-09 at 13:47 +0100, Beno?t Minisini wrote: > > In Operator Evaluation Order > > http://gambasdoc.org/help/cat/evalorder > > > > i see that the IS keyword is an operator with Strength 11. > > > > 1) All Is.. keywords are operators ? > > 2) All Is.. keywords have strength 11 ? > > > > They are not related at all. 'Is' is an operator, wherea IsXXXX() are > functions. > > Regards, > From gambas.fr at ...626... Tue Nov 9 15:12:05 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Tue, 9 Nov 2010 15:12:05 +0100 Subject: [Gambas-user] Print, Resolution, Units In-Reply-To: <08274450ce2edb85ff98f6ee127fd430@...2442...> References: <08274450ce2edb85ff98f6ee127fd430@...2442...> Message-ID: 2010/11/9 Gregor Burck : > Hi, > > when I want to print the units for draw were dots, for the gui I want to use milimeter. > So I create a function > > public function mmToDots(mm as integer, resolution as integer) as integer > ?return Round(mm / 25.4 * resolution) > end > > And draw e.g. a line with > draw(mmToDots(X,draw.resolution),mmToDots(Y,draw.resolution),mmToDots(X2,draw.resolution) > ,mmToDots(Y2,draw.resolution)) > > to be independent from the Printer Resolution. > > But is there a better way for use the metric system to print? > the answer is no :) -- Fabien Bodard From gambas at ...1... Tue Nov 9 15:18:10 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 9 Nov 2010 15:18:10 +0100 Subject: [Gambas-user] Print, Resolution, Units In-Reply-To: References: <08274450ce2edb85ff98f6ee127fd430@...2442...> Message-ID: <201011091518.10706.gambas@...1...> > 2010/11/9 Gregor Burck : > > Hi, > > > > when I want to print the units for draw were dots, for the gui I want to > > use milimeter. So I create a function > > > > public function mmToDots(mm as integer, resolution as integer) as integer > > return Round(mm / 25.4 * resolution) > > end > > > > And draw e.g. a line with > > draw(mmToDots(X,draw.resolution),mmToDots(Y,draw.resolution),mmToDots(X2, > > draw.resolution) ,mmToDots(Y2,draw.resolution)) > > > > to be independent from the Printer Resolution. > > > > But is there a better way for use the metric system to print? > > the answer is no :) Actually you can use the Draw.Scale() method so that you don't have to call mmToDots each time you draw something. Draw.Scale(Draw.Resolution / 25.4, Draw.Resolution / 25.4) Regards, -- Beno?t Minisini From doriano.blengino at ...1909... Tue Nov 9 15:19:49 2010 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Tue, 09 Nov 2010 15:19:49 +0100 Subject: [Gambas-user] Print, Resolution, Units In-Reply-To: References: <08274450ce2edb85ff98f6ee127fd430@...2442...> Message-ID: <4CD95885.3010403@...1909...> Fabien Bodard ha scritto: > 2010/11/9 Gregor Burck : > >> Hi, >> >> when I want to print the units for draw were dots, for the gui I want to use milimeter. >> So I create a function >> >> public function mmToDots(mm as integer, resolution as integer) as integer >> return Round(mm / 25.4 * resolution) >> end >> >> And draw e.g. a line with >> draw(mmToDots(X,draw.resolution),mmToDots(Y,draw.resolution),mmToDots(X2,draw.resolution) >> ,mmToDots(Y2,draw.resolution)) >> >> to be independent from the Printer Resolution. >> >> But is there a better way for use the metric system to print? >> >> > the answer is no :) > > You could use Draw.Scale() to change world coordinates to mm... From gambas.fr at ...626... Tue Nov 9 17:57:29 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Tue, 9 Nov 2010 17:57:29 +0100 Subject: [Gambas-user] Print, Resolution, Units In-Reply-To: <4CD95885.3010403@...1909...> References: <08274450ce2edb85ff98f6ee127fd430@...2442...> <4CD95885.3010403@...1909...> Message-ID: 2010/11/9 Doriano Blengino : > Fabien Bodard ha scritto: >> 2010/11/9 Gregor Burck : >> >>> Hi, >>> >>> when I want to print the units for draw were dots, for the gui I want to use milimeter. >>> So I create a function >>> >>> public function mmToDots(mm as integer, resolution as integer) as integer >>> ?return Round(mm / 25.4 * resolution) >>> end >>> >>> And draw e.g. a line with >>> draw(mmToDots(X,draw.resolution),mmToDots(Y,draw.resolution),mmToDots(X2,draw.resolution) >>> ,mmToDots(Y2,draw.resolution)) >>> >>> to be independent from the Printer Resolution. >>> >>> But is there a better way for use the metric system to print? >>> >>> >> the answer is no :) >> >> > You could use Draw.Scale() to change world coordinates to mm... yes :) ... if you use only one convertion type ! -- Fabien Bodard From jussi.lahtinen at ...626... Tue Nov 9 19:35:46 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Tue, 9 Nov 2010 20:35:46 +0200 Subject: [Gambas-user] MOD arithetic operator In-Reply-To: <1289304356.3500.0.camel@...2493...> References: <1289233816.4245.1.camel@...2493...> <4CD90194.8070600@...1909...> <1289293136.4832.22.camel@...2494...> <201011091231.52885.gambas@...1...> <1289304356.3500.0.camel@...2493...> Message-ID: Sorry about nitpicking... but modulo, integer division, addition, subtraction are operators. MOD, %, DIV, + , - are called operator symbols, or just symbols. Jussi On Tue, Nov 9, 2010 at 14:05, user wrote: > > In my opinion that is correct choice. > > > >Because if you remove DIV aka / operator there will be problem for > those > > Because if you remove DIV aka \ operator there will be problem for those > (sorry mistake!) > > > who used this in their programs in the past. > > > > In the other hand if you add % operator as MOD the arithmetic > operators > > will be complete and whole in my opinion as i read the manual. > > > > A last note if old developers like very much the strict classic Basic > > style you must weight their opinion if it is going to add or not a MOD > > operator, so not to be hard feelings. > > > > > > On Tue, 2010-11-09 at 12:31 +0100, Beno?t Minisini wrote: > > > > Hi to all, and good morning. > > > > > > > > Dont worry you dont hurt me. :) > > > > > > > > I am not a C++ person not at all. > > > > > > > > Of course there is no need to turn Basic in C style. > > > > > > > > But i make a notice about DIV and MOD. > > > > The one of them has a synonmous as operator. > > > > > > > > The only thing i propose is to maintain a same "thinking" while > reading > > > > the manual with programming style. > > > > > > > > To do this there are two options > > > > - MOD and DIV should not have operators > > > > - MOD and DIV it is nice to have operators. > > > > > > > > Or we leave the things as they are. > > > > > > > > All options are respectfull ones. > > > > > > > > > > I can add '%' to the compiler as a MOD synonymous, as I don't think > I will use > > > this character for anything else. > > > > > > > > > > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From jussi.lahtinen at ...626... Tue Nov 9 19:40:17 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Tue, 9 Nov 2010 20:40:17 +0200 Subject: [Gambas-user] string operator == In-Reply-To: <1289306811.3979.5.camel@...2493...> References: <1289306811.3979.5.camel@...2493...> Message-ID: That is bug... However I cannot reproduce it with Gambas 2.21 or with Gambas 3 rev 3281. @ Ubuntu 10.04 64bit Are you sure you got it correct? Jussi On Tue, Nov 9, 2010 at 14:46, Demosthenes Koptsis wrote: > Hi, > > i dont understand the following result. > > PRINT "abc" == "ab" 'true > PRINT "abc" == "abc" 'false > > in http://gambasdoc.org/help/cat/stringop > says > Returns if two strings are equal. The comparison is case unsensitive. > > 1) why "abc" and "ab" says they are equal? > 2) and "abc" == "abc" are not? > > > > > > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From demosthenesk at ...626... Tue Nov 9 23:13:41 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Wed, 10 Nov 2010 00:13:41 +0200 Subject: [Gambas-user] string operator == In-Reply-To: References: <1289306811.3979.5.camel@...2493...> Message-ID: <1289340821.2013.1.camel@...2494...> Yes. I tried at amd64 and i386. I get the same results. i attach screenshot from i386. On Tue, 2010-11-09 at 20:40 +0200, Jussi Lahtinen wrote: > That is bug... However I cannot reproduce it with Gambas 2.21 or with Gambas > 3 rev 3281. > @ Ubuntu 10.04 64bit > > Are you sure you got it correct? > > Jussi > > > On Tue, Nov 9, 2010 at 14:46, Demosthenes Koptsis wrote: > > > Hi, > > > > i dont understand the following result. > > > > PRINT "abc" == "ab" 'true > > PRINT "abc" == "abc" 'false > > > > in http://gambasdoc.org/help/cat/stringop > > says > > Returns if two strings are equal. The comparison is case unsensitive. > > > > 1) why "abc" and "ab" says they are equal? > > 2) and "abc" == "abc" are not? > > > > > > > > > > > > ------------------------------------------------------------------------------ > > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > > David G. Thomson, author of the best-selling book "Blueprint to a > > Billion" shares his insights and actions to help propel your > > business during the next growth cycle. Listen Now! > > http://p.sf.net/sfu/SAP-dev2dev > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user -------------- next part -------------- A non-text attachment was scrubbed... Name: Tests - Gambas 2_001.png Type: image/png Size: 69973 bytes Desc: not available URL: From gambas at ...1... Tue Nov 9 23:19:52 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 9 Nov 2010 23:19:52 +0100 Subject: [Gambas-user] string operator == In-Reply-To: <1289340821.2013.1.camel@...2494...> References: <1289306811.3979.5.camel@...2493...> <1289340821.2013.1.camel@...2494...> Message-ID: <201011092319.52239.gambas@...1...> > Yes. I tried at amd64 and i386. I get the same results. > > i attach screenshot from i386. > Did you upgrade to the latest version? -- Beno?t Minisini From demosthenesk at ...626... Tue Nov 9 23:22:17 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Wed, 10 Nov 2010 00:22:17 +0200 Subject: [Gambas-user] string operator == In-Reply-To: References: <1289306811.3979.5.camel@...2493...> Message-ID: <1289341337.2013.2.camel@...2494...> i have Gambas2 2.21 but i dont know which rev. is there any way to find it? On Tue, 2010-11-09 at 20:40 +0200, Jussi Lahtinen wrote: > That is bug... However I cannot reproduce it with Gambas 2.21 or with Gambas > 3 rev 3281. > @ Ubuntu 10.04 64bit > > Are you sure you got it correct? > > Jussi > > > On Tue, Nov 9, 2010 at 14:46, Demosthenes Koptsis wrote: > > > Hi, > > > > i dont understand the following result. > > > > PRINT "abc" == "ab" 'true > > PRINT "abc" == "abc" 'false > > > > in http://gambasdoc.org/help/cat/stringop > > says > > Returns if two strings are equal. The comparison is case unsensitive. > > > > 1) why "abc" and "ab" says they are equal? > > 2) and "abc" == "abc" are not? > > > > > > > > > > > > ------------------------------------------------------------------------------ > > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > > David G. Thomson, author of the best-selling book "Blueprint to a > > Billion" shares his insights and actions to help propel your > > business during the next growth cycle. Listen Now! > > http://p.sf.net/sfu/SAP-dev2dev > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From demosthenesk at ...626... Wed Nov 10 00:14:09 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Wed, 10 Nov 2010 01:14:09 +0200 Subject: [Gambas-user] string operator == In-Reply-To: <201011092319.52239.gambas@...1...> References: <1289306811.3979.5.camel@...2493...> <1289340821.2013.1.camel@...2494...> <201011092319.52239.gambas@...1...> Message-ID: <1289344449.4651.2.camel@...2494...> i had 2.21 from 21/08/2010 now i get revision 3289 wait to install it On Tue, 2010-11-09 at 23:19 +0100, Beno?t Minisini wrote: > > Yes. I tried at amd64 and i386. I get the same results. > > > > i attach screenshot from i386. > > > > Did you upgrade to the latest version? > From eilert-sprachen at ...221... Wed Nov 10 09:10:57 2010 From: eilert-sprachen at ...221... (Rolf-Werner Eilert) Date: Wed, 10 Nov 2010 09:10:57 +0100 Subject: [Gambas-user] Gambas 3 Grid/Table question Message-ID: <4CDA5391.8090305@...221...> Just a question, as I do not have Gambas 3 running on my productive system yet. Currently, I'm considering a re-coding of one of my projects needing a Gridview/Tableview. In Gambas 2, there is no linewrap in a cell. Is it possible in Gambas 3? And if yes, is it possible to confine this behaviour to certain columns (which in turn would mean the table would have to adjust the row height automagically when a line is wrapped in one of its cells)? Regards Rolf From eilert-sprachen at ...221... Wed Nov 10 11:20:49 2010 From: eilert-sprachen at ...221... (Rolf-Werner Eilert) Date: Wed, 10 Nov 2010 11:20:49 +0100 Subject: [Gambas-user] Gambas 3 Grid/Table question In-Reply-To: <4CDA5391.8090305@...221...> References: <4CDA5391.8090305@...221...> Message-ID: <4CDA7201.9040007@...221...> Sorry, I was kinda tired this morning :-) There is a linewrap in the Gridview even with Gambas 2, but it is a default (at least I have not yet found a way to deactivate it) and it does not by itself adjust the line height appropriately. So the question would have to be: Is there a more specific way to define this in Gambas 3? For instance: Tableview1.Columns[3].WordWrap = TRUE Tableview1.Columns[3].Width = 125 Tableview1.AdjustRowHeight = TRUE would activate wordwrap for column 3, define a width of 125 px for this column and start automatic row height adjusting for the whole table... Maybe this would make sense for single rows? Then Tableview1.Rows[2].AdjustRowHeight = TRUE would be good, but I can't imagine a case where this might be good. Regards Rolf Am 10.11.2010 09:10, schrieb Rolf-Werner Eilert: > Just a question, as I do not have Gambas 3 running on my productive > system yet. Currently, I'm considering a re-coding of one of my projects > needing a Gridview/Tableview. > > In Gambas 2, there is no linewrap in a cell. Is it possible in Gambas 3? > And if yes, is it possible to confine this behaviour to certain columns > (which in turn would mean the table would have to adjust the row height > automagically when a line is wrapped in one of its cells)? > > Regards > > Rolf > > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From demosthenesk at ...626... Wed Nov 10 12:27:36 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Wed, 10 Nov 2010 13:27:36 +0200 Subject: [Gambas-user] string operator == In-Reply-To: <201011092319.52239.gambas@...1...> References: <1289306811.3979.5.camel@...2493...> <1289340821.2013.1.camel@...2494...> <201011092319.52239.gambas@...1...> Message-ID: <1289388456.24512.1.camel@...2494...> ok, i upgrated to svn3289 and i get i think correct results PRINT "abc" == "ab" 'false PRINT "abc" == "abc" 'true PRINT "aBc" == "abc" 'true On Tue, 2010-11-09 at 23:19 +0100, Beno?t Minisini wrote: > > Yes. I tried at amd64 and i386. I get the same results. > > > > i attach screenshot from i386. > > > > Did you upgrade to the latest version? > From Gambas at ...1950... Wed Nov 10 13:04:21 2010 From: Gambas at ...1950... (Caveat) Date: Wed, 10 Nov 2010 13:04:21 +0100 Subject: [Gambas-user] string operator == In-Reply-To: <1289388456.24512.1.camel@...2494...> References: <1289306811.3979.5.camel@...2493...> <1289340821.2013.1.camel@...2494...> <201011092319.52239.gambas@...1...> <1289388456.24512.1.camel@...2494...> Message-ID: <1289390661.3358.168.camel@...2479...> Am I missing something here? This would seem to me to be a fairly critical bug. I'm running v2.19 here as provided by my distro (Ubuntu 10.04 64-bit) and am also seeing the "turned around" logic giving what seems like wrong results for all equality string comparisons. Can we expect an update to the version(s) in the respositor(y)(ies), considering the seriousness of this bug? Do we know since when this has been broken? I'd hate to think I'd shipped any software based on Gambas that includes this bug (although I have a feeling even the most rudimentary tests would have picked this up... I hope!) Thanks and regards, Caveat On Wed, 2010-11-10 at 13:27 +0200, Demosthenes Koptsis wrote: > ok, i upgrated to svn3289 > > and i get i think correct results > > PRINT "abc" == "ab" 'false > PRINT "abc" == "abc" 'true > PRINT "aBc" == "abc" 'true > > > On Tue, 2010-11-09 at 23:19 +0100, Beno?t Minisini wrote: > > > Yes. I tried at amd64 and i386. I get the same results. > > > > > > i attach screenshot from i386. > > > > > > > Did you upgrade to the latest version? > > > > > > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From gambas at ...1... Wed Nov 10 13:04:22 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 10 Nov 2010 13:04:22 +0100 Subject: [Gambas-user] string operator == In-Reply-To: <1289390661.3358.168.camel@...2479...> References: <1289306811.3979.5.camel@...2493...> <1289388456.24512.1.camel@...2494...> <1289390661.3358.168.camel@...2479...> Message-ID: <201011101304.22558.gambas@...1...> > Am I missing something here? This would seem to me to be a fairly > critical bug. > > I'm running v2.19 here as provided by my distro (Ubuntu 10.04 64-bit) > and am also seeing the "turned around" logic giving what seems like > wrong results for all equality string comparisons. > > Can we expect an update to the version(s) in the respositor(y)(ies), > considering the seriousness of this bug? > > Do we know since when this has been broken? I'd hate to think I'd > shipped any software based on Gambas that includes this bug (although I > have a feeling even the most rudimentary tests would have picked this > up... I hope!) > > Thanks and regards, > Caveat > I will release a 2.22 version soon. Hopefully, this operator is rarely used! -- Beno?t Minisini From Gambas at ...1950... Wed Nov 10 13:38:56 2010 From: Gambas at ...1950... (Caveat) Date: Wed, 10 Nov 2010 13:38:56 +0100 Subject: [Gambas-user] string operator == In-Reply-To: <201011101304.22558.gambas@...1...> References: <1289306811.3979.5.camel@...2493...> <1289388456.24512.1.camel@...2494...> <1289390661.3358.168.camel@...2479...> <201011101304.22558.gambas@...1...> Message-ID: <1289392736.3358.203.camel@...2479...> Thanks for the (as usual) speedy reply Benoit. You are right that the == operator is not often used. I have just double-checked that the = operator does work as intended (phew!). My only fear is that I may have introduced an == somewhere, purely out of habit as a java programmer. I'll hold off on shipping anything out of the current 2.19 I have, to be on the safe side. :-) Just out of curiosity, is there a difference between = and == when working with strings? In java, = is an assignment and == means "are these 2 things the same object?". If you want to compare strings, you have to use the ugly and ungainly "some string".equals("some other string") method, which breaks horribly if your string is null... ho hum! Regards, Caveat On Wed, 2010-11-10 at 13:04 +0100, Beno?t Minisini wrote: > > Am I missing something here? This would seem to me to be a fairly > > critical bug. > > > > I'm running v2.19 here as provided by my distro (Ubuntu 10.04 64-bit) > > and am also seeing the "turned around" logic giving what seems like > > wrong results for all equality string comparisons. > > > > Can we expect an update to the version(s) in the respositor(y)(ies), > > considering the seriousness of this bug? > > > > Do we know since when this has been broken? I'd hate to think I'd > > shipped any software based on Gambas that includes this bug (although I > > have a feeling even the most rudimentary tests would have picked this > > up... I hope!) > > > > Thanks and regards, > > Caveat > > > > I will release a 2.22 version soon. Hopefully, this operator is rarely used! > From gambas.fr at ...626... Wed Nov 10 13:45:13 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Wed, 10 Nov 2010 13:45:13 +0100 Subject: [Gambas-user] MOD arithetic operator In-Reply-To: References: <1289233816.4245.1.camel@...2493...> <4CD90194.8070600@...1909...> <1289293136.4832.22.camel@...2494...> <201011091231.52885.gambas@...1...> <1289304356.3500.0.camel@...2493...> Message-ID: we will not spend the year ... Gambas will have a new symbol "%", it will be the synonym operator "MOD" Like "\" is synonymous with "DIV", thank you Benoit. As the operator is a long writing was old-fashioned (more explicit), and a short writing more compact. The point on which I would emphasize most is that there have the least possible exception, although wanting to keep compatibility with the basic standard is more or less simple (I want to evidence management strings) I said that sometimes a slight distance from this standard for more logic can be justified. And to my great joy is what is practiced. The Basic was created in the 1970s, standards were advanced with the basic objects, a small step forward can not hurt, especially when it comes to streamline the language. -- Fabien Bodard From wdahn at ...1000... Wed Nov 10 13:48:08 2010 From: wdahn at ...1000... (Werner) Date: Wed, 10 Nov 2010 20:48:08 +0800 Subject: [Gambas-user] string operator == In-Reply-To: <1289392736.3358.203.camel@...2479...> References: <1289306811.3979.5.camel@...2493...> <1289388456.24512.1.camel@...2494...> <1289390661.3358.168.camel@...2479...> <201011101304.22558.gambas@...1...> <1289392736.3358.203.camel@...2479...> Message-ID: <4CDA9488.30400@...1000...> On 10/11/10 20:38, Caveat wrote: > Thanks for the (as usual) speedy reply Benoit. > > You are right that the == operator is not often used. I have just > double-checked that the = operator does work as intended (phew!). My > only fear is that I may have introduced an == somewhere, purely out of > habit as a java programmer. > > I'll hold off on shipping anything out of the current 2.19 I have, to be > on the safe side. :-) > > Just out of curiosity, is there a difference between = and == when > working with strings? > In java, = is an assignment and == means "are these 2 things the same > object?". If you want to compare strings, you have to use the ugly and > ungainly "some string".equals("some other string") method, which breaks > horribly if your string is null... ho hum! > > Regards, > Caveat > The == comparison is not case sensitive Werner From o.s.p at ...69... Wed Nov 10 14:13:03 2010 From: o.s.p at ...69... (o.s.p at ...69...) Date: Wed, 10 Nov 2010 14:13:03 +0100 (CET) Subject: [Gambas-user] make problem Message-ID: <6903844.1655261289394783019.JavaMail.defaultUser@...1910...> hello i've a make problem with v3 pc: OS: frugalware Linux 2.6.36-fw1 #1 SMP PREEMPT Thu Oct 21 14:14:04 CEST 2010 i686 GNU/Linux GCC: Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i686-frugalware-linux/4.5.1/lto-wrapper Target: i686-frugalware-linux Configured with: ../gcc-4.5.1/configure --prefix=/usr --enable-java-awt=gtk -- with-fastjar=/usr/bin/fastjar --enable-gtk-cairo --disable-libjava-multilib -- enable-hash-synchronization --enable-__cxa_atexit --enable-libstdcxx- allocator=new --disable-libstdcxx-pch --enable-target-optspace --enable- languages=c,java,c++,objc,obj-c++,ada,fortran --enable-shared --enable- threads=posix --with-system-zlib --libdir=/usr/lib --disable-multilib --enable- bootstrap --with-bugurl=http://bugs.frugalware.org/ --with- pkgversion='Frugalware Linux' --enable-linux-futex --disable-dependency- tracking --build=i686-frugalware-linux Thread model: posix gcc version 4.5.1 (Frugalware Linux) MAKE: GNU Make 3.82 Built for i686-frugalware-linux-gnu LIBTOOL: libtool (GNU libtool) 2.4 thanks -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: configure.txt URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: make.txt URL: From demosthenesk at ...626... Wed Nov 10 14:16:01 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Wed, 10 Nov 2010 15:16:01 +0200 Subject: [Gambas-user] string operator == and others In-Reply-To: <201011092319.52239.gambas@...1...> References: <1289306811.3979.5.camel@...2493...> <1289340821.2013.1.camel@...2494...> <201011092319.52239.gambas@...1...> Message-ID: <1289394961.10321.8.camel@...2493...> i also check these, i use gambas2-2.21 rev3289 updated today (10/11/2010 dd/mm/yyyy). PRINT "abc" < "abc" 'false PRINT "abc" < "aBc" 'false PRINT "ABC" < "abc" 'true are these correct? in http://gambasdoc.org/help/cat/stringop says Returns if String1 is strictly lower than String2. PRINT "ABC" < "abc" 'true is this correct? Lower means lowercase not capital, is it? If so "ABC" is greater than "abc". Also PRINT "abc" > "abc" 'false PRINT "abc" > "aBc" 'true PRINT "ABC" > "abc" 'false PRINT "abc" <= "abc" 'true PRINT "abc" <= "aBc" 'false PRINT "ABC" <= "abc" 'true PRINT "abc" >= "abc" 'true PRINT "abc" >= "aBc" 'true PRINT "ABC" >= "abc" 'false -- Regards, Demosthenes Koptsis. From gambas at ...1... Wed Nov 10 14:36:58 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 10 Nov 2010 14:36:58 +0100 Subject: [Gambas-user] string operator == and others In-Reply-To: <1289394961.10321.8.camel@...2493...> References: <1289306811.3979.5.camel@...2493...> <201011092319.52239.gambas@...1...> <1289394961.10321.8.camel@...2493...> Message-ID: <201011101436.59049.gambas@...1...> > i also check these, i use gambas2-2.21 rev3289 updated today (10/11/2010 > dd/mm/yyyy). > > PRINT "abc" < "abc" 'false > PRINT "abc" < "aBc" 'false > PRINT "ABC" < "abc" 'true > > are these correct? > in http://gambasdoc.org/help/cat/stringop says > Returns if String1 is strictly lower than String2. > > PRINT "ABC" < "abc" 'true > > is this correct? Lower means lowercase not capital, is it? > If so "ABC" is greater than "abc". > > Also > PRINT "abc" > "abc" 'false > PRINT "abc" > "aBc" 'true > PRINT "ABC" > "abc" 'false > > PRINT "abc" <= "abc" 'true > PRINT "abc" <= "aBc" 'false > PRINT "ABC" <= "abc" 'true > > PRINT "abc" >= "abc" 'true > PRINT "abc" >= "aBc" 'true > PRINT "ABC" >= "abc" 'false Strings are compared using binary comparison, i.e. the ASCII value of their characters. In ASCII, 'A' < 'a'. Regards, -- Beno?t Minisini From demosthenesk at ...626... Wed Nov 10 14:52:35 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Wed, 10 Nov 2010 15:52:35 +0200 Subject: [Gambas-user] string operator == and others In-Reply-To: <201011101436.59049.gambas@...1...> References: <1289306811.3979.5.camel@...2493...> <201011092319.52239.gambas@...1...> <1289394961.10321.8.camel@...2493...> <201011101436.59049.gambas@...1...> Message-ID: <1289397155.25461.1.camel@...2494...> On Wed, 2010-11-10 at 14:36 +0100, Beno?t Minisini wrote: > > i also check these, i use gambas2-2.21 rev3289 updated today (10/11/2010 > > dd/mm/yyyy). > > > > PRINT "abc" < "abc" 'false > > PRINT "abc" < "aBc" 'false > > PRINT "ABC" < "abc" 'true > > > > are these correct? > > in http://gambasdoc.org/help/cat/stringop says > > Returns if String1 is strictly lower than String2. > > > > PRINT "ABC" < "abc" 'true > > > > is this correct? Lower means lowercase not capital, is it? > > If so "ABC" is greater than "abc". > > > > Also > > PRINT "abc" > "abc" 'false > > PRINT "abc" > "aBc" 'true > > PRINT "ABC" > "abc" 'false > > > > PRINT "abc" <= "abc" 'true > > PRINT "abc" <= "aBc" 'false > > PRINT "ABC" <= "abc" 'true > > > > PRINT "abc" >= "abc" 'true > > PRINT "abc" >= "aBc" 'true > > PRINT "ABC" >= "abc" 'false > > Strings are compared using binary comparison, i.e. the ASCII value of their > characters. In ASCII, 'A' < 'a'. > > Regards, > you mean that PRINT "A" < "a" 'true is similar like that PRINT Asc("A") < Asc("a") 'true From gambas at ...1... Wed Nov 10 15:00:35 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 10 Nov 2010 15:00:35 +0100 Subject: [Gambas-user] string operator == and others In-Reply-To: <1289397155.25461.1.camel@...2494...> References: <1289306811.3979.5.camel@...2493...> <201011101436.59049.gambas@...1...> <1289397155.25461.1.camel@...2494...> Message-ID: <201011101500.35128.gambas@...1...> > you mean that > PRINT "A" < "a" 'true > > is similar like that > PRINT Asc("A") < Asc("a") 'true > Yes. -- Beno?t Minisini From hiems at ...2501... Wed Nov 10 15:38:57 2010 From: hiems at ...2501... (NW) Date: Wed, 10 Nov 2010 14:38:57 +0000 Subject: [Gambas-user] Writing to a file on disk Message-ID: <20101110143857.ef610559.hiems@...2501...> My first question on the list. I am trying to read in a text file with just one line, to make a slight change to that line and then to write the new line to the original file on disk. The new line should replace the original line in the file. I can read in the file OK. I then use lineinput and copy the result to a text field. I can then make a change to the text. But I just cannot see how to write the file back to my hard disk with the new changed line in place of the original. Can anyone point me in the right direction please? Neil From rospolosco at ...152... Wed Nov 10 16:37:46 2010 From: rospolosco at ...152... (Stefano Palmeri) Date: Wed, 10 Nov 2010 16:37:46 +0100 Subject: [Gambas-user] Writing to a file on disk In-Reply-To: <20101110143857.ef610559.hiems@...2501...> References: <20101110143857.ef610559.hiems@...2501...> Message-ID: <201011101637.46649.rospolosco@...152...> Il mercoled? 10 novembre 2010 15:38:57 NW ha scritto: > My first question on the list. > > I am trying to read in a text file with just one line, to make a slight > change to that line and then to write the new line to the original file on > disk. The new line should replace the original line in the file. > > I can read in the file OK. I then use lineinput and copy the result to a > text field. I can then make a change to the text. > > But I just cannot see how to write the file back to my hard disk with the > new changed line in place of the original. > > Can anyone point me in the right direction please? > > Neil > > --------------------------------------------------------------------------- >--- The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user See File.Save() in the help. Regards, Stefano From gambas.fr at ...626... Wed Nov 10 16:18:35 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Wed, 10 Nov 2010 16:18:35 +0100 Subject: [Gambas-user] Writing to a file on disk In-Reply-To: <20101110143857.ef610559.hiems@...2501...> References: <20101110143857.ef610559.hiems@...2501...> Message-ID: you read the file, you write to a temp file , and then you copy the temp file to replace the readed file. 2010/11/10 NW : > My first question on the list. > > I am trying to read in a text file with just one line, to make a slight change to that line and then to write the new line to the original file on disk. The new line should replace the original line in the file. > > I can read in the file OK. I then use lineinput and copy the result to a text field. I can then make a change to the text. > > But I just cannot see how to write the file back to my hard disk with the new changed line in place of the original. > > Can anyone point me in the right direction please? > > Neil > > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Fabien Bodard From hiems at ...2501... Wed Nov 10 16:46:09 2010 From: hiems at ...2501... (NW) Date: Wed, 10 Nov 2010 15:46:09 +0000 Subject: [Gambas-user] Writing to a file on disk In-Reply-To: <20101110143857.ef610559.hiems@...2501...> References: <20101110143857.ef610559.hiems@...2501...> Message-ID: <20101110154609.4f8c5ade.hiems@...2501...> On Wed, 10 Nov 2010 14:38:57 +0000 NW wrote: > My first question on the list. > > I am trying to read in a text file with just one line, to make a slight change to that line and then to write the new line to the original file on disk. The new line should replace the original line in the file. > > I can read in the file OK. I then use lineinput and copy the result to a text field. I can then make a change to the text. > > But I just cannot see how to write the file back to my hard disk with the new changed line in place of the original. > > Can anyone point me in the right direction please? > > Neil > Further info. I have almost solved it. Each time a write the file back to disk I get an extra character at the beginning of the line. So far I have tested it 7 times and I now have the letters FEDCBAN at the beginning of the line. Can anyone suggest where I should go next please? Neil From eilert-sprachen at ...221... Wed Nov 10 17:14:24 2010 From: eilert-sprachen at ...221... (Rolf-Werner Eilert) Date: Wed, 10 Nov 2010 17:14:24 +0100 Subject: [Gambas-user] Writing to a file on disk In-Reply-To: <20101110154609.4f8c5ade.hiems@...2501...> References: <20101110143857.ef610559.hiems@...2501...> <20101110154609.4f8c5ade.hiems@...2501...> Message-ID: <4CDAC4E0.3060407@...221...> Am 10.11.2010 16:46, schrieb NW: > On Wed, 10 Nov 2010 14:38:57 +0000 > NW wrote: > >> My first question on the list. >> >> I am trying to read in a text file with just one line, to make a slight change to that line and then to write the new line to the original file on disk. The new line should replace the original line in the file. >> >> I can read in the file OK. I then use lineinput and copy the result to a text field. I can then make a change to the text. >> >> But I just cannot see how to write the file back to my hard disk with the new changed line in place of the original. >> >> Can anyone point me in the right direction please? >> >> Neil >> > Further info. I have almost solved it. Each time a write the file back to disk I get an extra character at the beginning of the line. So far I have tested it 7 times and I now have the letters FEDCBAN at the beginning of the line. Can anyone suggest where I should go next please? > > Neil > Maybe it's better you give us the lines you are using in your program to read and write the line. Then we should be able to see where the bug sits :-) Did you try the File functions to do this? These should work without any headache: File.Read and File.Write. Look them up in the help. If you prefer to open a stream for file writing, there are more things to be considered, best is you give us an idea of what you have written there... Regards Rolf From jussi.lahtinen at ...626... Wed Nov 10 18:18:22 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Wed, 10 Nov 2010 19:18:22 +0200 Subject: [Gambas-user] string operator == In-Reply-To: <201011101304.22558.gambas@...1...> References: <1289306811.3979.5.camel@...2493...> <1289388456.24512.1.camel@...2494...> <1289390661.3358.168.camel@...2479...> <201011101304.22558.gambas@...1...> Message-ID: There is other similar bug or non-convinient feature. IF NOT 1 = 2 THEN PRINT "This is never printed" ENDIF IF NOT 1 = 1 THEN PRINT "This is also never printed" ENDIF IF NOT (1 = 2) THEN PRINT "This however works" ENDIF Tested with Gambas 2.21 and with Gambas 3 rev 3281. @ Ubuntu 10.04 64bit Jussi 2010/11/10 Beno?t Minisini > > Am I missing something here? This would seem to me to be a fairly > > critical bug. > > > > I'm running v2.19 here as provided by my distro (Ubuntu 10.04 64-bit) > > and am also seeing the "turned around" logic giving what seems like > > wrong results for all equality string comparisons. > > > > Can we expect an update to the version(s) in the respositor(y)(ies), > > considering the seriousness of this bug? > > > > Do we know since when this has been broken? I'd hate to think I'd > > shipped any software based on Gambas that includes this bug (although I > > have a feeling even the most rudimentary tests would have picked this > > up... I hope!) > > > > Thanks and regards, > > Caveat > > > > I will release a 2.22 version soon. Hopefully, this operator is rarely > used! > > -- > Beno?t Minisini > > > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas at ...1... Wed Nov 10 18:21:10 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 10 Nov 2010 18:21:10 +0100 Subject: [Gambas-user] string operator == In-Reply-To: References: <1289306811.3979.5.camel@...2493...> <201011101304.22558.gambas@...1...> Message-ID: <201011101821.10157.gambas@...1...> > There is other similar bug or non-convinient feature. > > IF NOT 1 = 2 THEN > PRINT "This is never printed" > ENDIF > > IF NOT 1 = 1 THEN > PRINT "This is also never printed" > ENDIF > > IF NOT (1 = 2) THEN > PRINT "This however works" > ENDIF > > Tested with Gambas 2.21 and with Gambas 3 rev 3281. > @ Ubuntu 10.04 64bit > Jussi > The priority of NOT is greater than the priority of '='. Regards, -- Beno?t Minisini From jussi.lahtinen at ...626... Wed Nov 10 18:45:01 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Wed, 10 Nov 2010 19:45:01 +0200 Subject: [Gambas-user] string operator == In-Reply-To: <201011101821.10157.gambas@...1...> References: <1289306811.3979.5.camel@...2493...> <201011101304.22558.gambas@...1...> <201011101821.10157.gambas@...1...> Message-ID: OK, makes sense. Though there should be warning in documentation (to "NOT" section and to "Differences From Visual Basic"). And maybe compiler warning? Jussi 2010/11/10 Beno?t Minisini > > There is other similar bug or non-convinient feature. > > > > IF NOT 1 = 2 THEN > > PRINT "This is never printed" > > ENDIF > > > > IF NOT 1 = 1 THEN > > PRINT "This is also never printed" > > ENDIF > > > > IF NOT (1 = 2) THEN > > PRINT "This however works" > > ENDIF > > > > Tested with Gambas 2.21 and with Gambas 3 rev 3281. > > @ Ubuntu 10.04 64bit > > Jussi > > > > The priority of NOT is greater than the priority of '='. > > Regards, > > -- > Beno?t Minisini > > > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From hiems at ...2501... Wed Nov 10 19:03:16 2010 From: hiems at ...2501... (NW) Date: Wed, 10 Nov 2010 18:03:16 +0000 Subject: [Gambas-user] Writing to a file on disk In-Reply-To: <4CDAC4E0.3060407@...221...> References: <20101110143857.ef610559.hiems@...2501...> <20101110154609.4f8c5ade.hiems@...2501...> <4CDAC4E0.3060407@...221...> Message-ID: <20101110180316.59f0c1b3.hiems@...2501...> On Wed, 10 Nov 2010 17:14:24 +0100 Rolf-Werner Eilert wrote: > > > > Maybe it's better you give us the lines you are using in your program to > read and write the line. Then we should be able to see where the bug > sits :-) > > Did you try the File functions to do this? These should work without any > headache: File.Read and File.Write. Look them up in the help. > > If you prefer to open a stream for file writing, there are more things > to be considered, best is you give us an idea of what you have written > there... > > Regards > > Rolf > Here is some more information. I have a form which includes two buttons. The first one is for reading in the file, (which has only one line of text). Here is my coding. PUBLIC SUB Button1_Click() DIM lineIn AS String DIM fileIn AS File DIM fname AS String fname = "/home/neilwin/basic/trial.txt" OPEN fname FOR READ AS #fileIn LINE INPUT #fileIn, lineIn result.Text = "" result.text = result.text & lineIn FLUSH #fileIn CLOSE #fileIn END There is also a text box which I have renamed result. I make a few changes to the line of text and then I click on another button to write the changed file back to the hard disk. Here is the code PUBLIC SUB Button3_Click() DIM fileIn AS File DIM fname AS String fname = "/home/neilwin/basic/trial.txt" OPEN fname FOR CREATE AS #fileIn WRITE #fileIn, result.Text CLOSE #fileIn END Perhaps I should add that I am new to Gambas but not new to computers. When I check the new version of the file in Konqueror the changes are there but there is one extra character at the very start of the line. Is there a better way to do what I want? Thanks for any help, Neil From gambas.fr at ...626... Wed Nov 10 19:21:47 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Wed, 10 Nov 2010 19:21:47 +0100 Subject: [Gambas-user] Writing to a file on disk In-Reply-To: <20101110180316.59f0c1b3.hiems@...2501...> References: <20101110143857.ef610559.hiems@...2501...> <20101110154609.4f8c5ade.hiems@...2501...> <4CDAC4E0.3060407@...221...> <20101110180316.59f0c1b3.hiems@...2501...> Message-ID: have you tryed to replace result by a global string variable ? textbox use utf8 charset and yes in your case ... use file.save to resume your code Private $sResult as string PUBLIC SUB Button1_Click() $sResult = File.Load("/home/neilwin/basic/trial.txt") END PUBLIC SUB Button3_Click() File.Save("/home/neilwin/basic/trial.txt", $sResult) END But i think you want to modify somethong on a line so : dim s as string Dim sFile as string Dim hFile as File Dim sTempName as String Dim sMyFile as String = "/home/neilwin/basic/trial.txt" sTempName = Temp() hFile = Open sTempName FOR CREATE sFile = File.Load( sMyFile) For each s in split(sFile, "\n") if trim(s) Begin "Var=" then s = "coucou" endif print #hFile, s next close #hfile kill sMyFile copy sTempFile TO sMyFile 2010/11/10 NW : > On Wed, 10 Nov 2010 17:14:24 +0100 > Rolf-Werner Eilert wrote: > >> > >> >> Maybe it's better you give us the lines you are using in your program to >> read and write the line. Then we should be able to see where the bug >> sits :-) >> >> Did you try the File functions to do this? These should work without any >> headache: File.Read and File.Write. Look them up in the help. >> >> If you prefer to open a stream for file writing, there are more things >> to be considered, best is you give us an idea of what you have written >> there... >> >> Regards >> >> Rolf >> > Here is some more information. > I have a form which includes two buttons. The first one is for reading in the file, (which has only one line of text). Here is my coding. > > PUBLIC SUB Button1_Click() > > ?DIM lineIn AS String > ?DIM fileIn AS File > ?DIM fname AS String > ?fname = "/home/neilwin/basic/trial.txt" > > ?OPEN fname FOR READ AS #fileIn > ?LINE INPUT #fileIn, lineIn > ?result.Text = "" > ?result.text = result.text & lineIn > ?FLUSH #fileIn > ?CLOSE #fileIn > > END > > There is also a text box which I have renamed result. ?I make a few changes to the line of text and then I click on another button to write the changed file back to the hard disk. Here is the code > > PUBLIC SUB Button3_Click() > > ?DIM fileIn AS File > ?DIM fname AS String > ?fname = "/home/neilwin/basic/trial.txt" > ?OPEN fname FOR CREATE AS #fileIn > ? WRITE #fileIn, result.Text > ? CLOSE #fileIn > > END > > Perhaps I should add that I am new to Gambas but not new to computers. > > When I check the new version of the file in Konqueror ?the changes are there but there is one extra character at the very start of the line. > > Is there a better way to do what I want? ?Thanks for any help, > > Neil > > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Fabien Bodard From math.eber at ...221... Wed Nov 10 19:48:20 2010 From: math.eber at ...221... (Matti) Date: Wed, 10 Nov 2010 19:48:20 +0100 Subject: [Gambas-user] Writing to a file on disk In-Reply-To: <20101110180316.59f0c1b3.hiems@...2501...> References: <20101110143857.ef610559.hiems@...2501...> <20101110154609.4f8c5ade.hiems@...2501...> <4CDAC4E0.3060407@...221...> <20101110180316.59f0c1b3.hiems@...2501...> Message-ID: <4CDAE8F4.6080805@...221...> If you want to store just a few informations from your project, there is also the very simple way via the gb.settings component. You have to choose this component in the project properties first. Then (this is Gambas3, look in the docs if you use Gambas2): Write: Settings["MyText/1"] = result.Text Read: result.Text = Settings["MyText/1"] The automagically generated file MyProject.conf is stored in ~/.config/gambas(3). So, if you don't have to save "real" files, you don't have to care about opening, reading, writing and closing files at all. Regards Matti Am 10.11.2010 19:03, schrieb NW: > On Wed, 10 Nov 2010 17:14:24 +0100 > Rolf-Werner Eilert wrote: > >>> >> >> Maybe it's better you give us the lines you are using in your program to >> read and write the line. Then we should be able to see where the bug >> sits :-) >> >> Did you try the File functions to do this? These should work without any >> headache: File.Read and File.Write. Look them up in the help. >> >> If you prefer to open a stream for file writing, there are more things >> to be considered, best is you give us an idea of what you have written >> there... >> >> Regards >> >> Rolf >> > Here is some more information. > I have a form which includes two buttons. The first one is for reading in the file, (which has only one line of text). Here is my coding. > > PUBLIC SUB Button1_Click() > > DIM lineIn AS String > DIM fileIn AS File > DIM fname AS String > fname = "/home/neilwin/basic/trial.txt" > > OPEN fname FOR READ AS #fileIn > LINE INPUT #fileIn, lineIn > result.Text = "" > result.text = result.text & lineIn > FLUSH #fileIn > CLOSE #fileIn > > END > > There is also a text box which I have renamed result. I make a few changes to the line of text and then I click on another button to write the changed file back to the hard disk. Here is the code > > PUBLIC SUB Button3_Click() > > DIM fileIn AS File > DIM fname AS String > fname = "/home/neilwin/basic/trial.txt" > OPEN fname FOR CREATE AS #fileIn > WRITE #fileIn, result.Text > CLOSE #fileIn > > END > > Perhaps I should add that I am new to Gambas but not new to computers. > > When I check the new version of the file in Konqueror the changes are there but there is one extra character at the very start of the line. > > Is there a better way to do what I want? Thanks for any help, > > Neil > > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From hiems at ...2501... Wed Nov 10 20:04:41 2010 From: hiems at ...2501... (NW) Date: Wed, 10 Nov 2010 19:04:41 +0000 Subject: [Gambas-user] Writing to a file on disk In-Reply-To: <4CDAE8F4.6080805@...221...> References: <20101110143857.ef610559.hiems@...2501...> <20101110154609.4f8c5ade.hiems@...2501...> <4CDAC4E0.3060407@...221...> <20101110180316.59f0c1b3.hiems@...2501...> <4CDAE8F4.6080805@...221...> Message-ID: <20101110190441.a075aff8.hiems@...2501...> If you want to store just a few informations from your project, there is also the very simple way via the gb.settings component. You have to choose this component in the project properties first. Then (this is Gambas3, look in the docs if you use Gambas2): Write: Settings["MyText/1"] = result.Text Read: result.Text = Settings["MyText/1"] The automagically generated file MyProject.conf is stored in ~/.config/gambas(3). So, if you don't have to save "real" files, you don't have to care about opening, reading, writing and closing files at all. Regards Matti Thanks for that. It is something I must learn about. However, in this case I do need a real file because it will then be used by another program. So much to learn about Gambs2 and now you are using version 3!! Regards Neil From hiems at ...2501... Wed Nov 10 20:11:56 2010 From: hiems at ...2501... (NW) Date: Wed, 10 Nov 2010 19:11:56 +0000 Subject: [Gambas-user] Writing to a file on disk In-Reply-To: References: <20101110143857.ef610559.hiems@...2501...> <20101110154609.4f8c5ade.hiems@...2501...> <4CDAC4E0.3060407@...221...> <20101110180316.59f0c1b3.hiems@...2501...> Message-ID: <20101110191156.cf36e2bf.hiems@...2501...> On Wed, 10 Nov 2010 19:21:47 +0100 Fabien Bodard wrote: > have you tryed to replace result by a global string variable ? > > textbox use utf8 charset > > and yes in your case ... use file.save > > > to resume your code > > Private $sResult as string > > PUBLIC SUB Button1_Click() > > $sResult = File.Load("/home/neilwin/basic/trial.txt") > > END > > PUBLIC SUB Button3_Click() > > File.Save("/home/neilwin/basic/trial.txt", $sResult) > > END > > > > > But i think you want to modify somethong on a line so : > > > dim s as string > Dim sFile as string > Dim hFile as File > Dim sTempName as String > Dim sMyFile as String = "/home/neilwin/basic/trial.txt" > > sTempName = Temp() > > hFile = Open sTempName FOR CREATE > > sFile = File.Load( sMyFile) > > For each s in split(sFile, "\n") > > if trim(s) Begin "Var=" then > s = "coucou" > endif > > print #hFile, s > > next > > close #hfile > kill sMyFile > copy sTempFile TO sMyFile > Wow, thanks. I have made a copy of your suggestions and I will study it all carefully. I will then have a go at it. There is still a lot for me to learn about Gambas. Thank goodness there is this help list. I will let you know how I get on, regards Neil From math.eber at ...221... Wed Nov 10 20:34:52 2010 From: math.eber at ...221... (Matti) Date: Wed, 10 Nov 2010 20:34:52 +0100 Subject: [Gambas-user] Writing to a file on disk In-Reply-To: <20101110190441.a075aff8.hiems@...2501...> References: <20101110143857.ef610559.hiems@...2501...> <20101110154609.4f8c5ade.hiems@...2501...> <4CDAC4E0.3060407@...221...> <20101110180316.59f0c1b3.hiems@...2501...> <4CDAE8F4.6080805@...221...> <20101110190441.a075aff8.hiems@...2501...> Message-ID: <4CDAF3DC.10805@...221...> Well, settings it is a real file that you can use with other programs. It is built like [One chapter] first entry = "some text" another entry = "another text" [Another chapter] 1="something else" Of course, you can read that with another program if you know where the information is stored. And, about Gambas 2 and 3: If you are a beginner with Gambas, you should not waste time learning Gambas 2. Install Gambas 3, it is stable, it is better, and it is the soon coming version. Regards Matti Am 10.11.2010 20:04, schrieb NW: > Thanks for that. It is something I must learn about. However, in this case I do need a real file because it will then be used by another program. So much to learn about Gambs2 and now you are using version 3!! > > Regards > > Neil From linux at ...1904... Thu Nov 11 07:42:49 2010 From: linux at ...1904... (Dr. Martin Senftleben) Date: Thu, 11 Nov 2010 07:42:49 +0100 Subject: [Gambas-user] Installing gambas3 on LinuxMint Message-ID: <4CDB9069.4030503@...1904...> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi all, I want to install gambas3 on my LinuxMint machine (64bit), but it doesn't work, the gambas3-gb-db-mysql package cannot be installed, because it requires libmysqlclient15off, which is not available. I have libmysqlclient16 on the system, and libmysqlclient15off is not on the list of installable packages. Any ideas? Thanks Martin -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAkzbkGkACgkQUmmuY48ByEjyAACgu1F6l33LXouknfu6hZZ1CeCi SMMAoJ8JByMyFhDCqxaCIutfSWztUcpH =h8zi -----END PGP SIGNATURE----- From demosthenesk at ...626... Thu Nov 11 08:01:54 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Thu, 11 Nov 2010 09:01:54 +0200 Subject: [Gambas-user] SelectAll feature Message-ID: <1289458914.2788.5.camel@...2493...> Good morning to all, While setting properties or any text that is in a textbox i wanted to press CTRL+A to select all the word and then press BACKSPACE to delete it and next to write a new one. But the CTRL+A is not working and i need to press many times the arrow keys to set the pointer to the end of the word and then to press many times BACKSPACE to delete the word. I know this is not so a big deal but if i do it many times is annoying. Is it possible to enable the SelectAll feature for any textbox or any other control that contains text so to manage more fastest the strings? -- Regards, Demosthenes Koptsis. From oceanosoftlapalma at ...626... Thu Nov 11 08:06:09 2010 From: oceanosoftlapalma at ...626... (Ricardo =?ISO-8859-1?Q?D=EDaz_Mart=EDn?=) Date: Thu, 11 Nov 2010 08:06:09 +0100 Subject: [Gambas-user] Installing gambas3 on LinuxMint In-Reply-To: <4CDB9069.4030503@...1904...> References: <4CDB9069.4030503@...1904...> Message-ID: <1289459169.28126.2.camel@...2502...> Did you read this: http://gambasdoc.org/help/install/ubuntu?view ? Because Mint is Ubuntu based distro I think if you install dependencies as in ubuntu every works fine. Regards, Ricardo D?az -----Mensaje original----- De: Dr. Martin Senftleben Reply-to: mailing list for gambas users Para: gambas-user at lists.sourceforge.net Asunto: [Gambas-user] Installing gambas3 on LinuxMint Fecha: Thu, 11 Nov 2010 07:42:49 +0100 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi all, I want to install gambas3 on my LinuxMint machine (64bit), but it doesn't work, the gambas3-gb-db-mysql package cannot be installed, because it requires libmysqlclient15off, which is not available. I have libmysqlclient16 on the system, and libmysqlclient15off is not on the list of installable packages. Any ideas? Thanks Martin -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAkzbkGkACgkQUmmuY48ByEjyAACgu1F6l33LXouknfu6hZZ1CeCi SMMAoJ8JByMyFhDCqxaCIutfSWztUcpH =h8zi -----END PGP SIGNATURE----- ------------------------------------------------------------------------------ Centralized Desktop Delivery: Dell and VMware Reference Architecture Simplifying enterprise desktop deployment and management using Dell EqualLogic storage and VMware View: A highly scalable, end-to-end client virtualization framework. Read more! http://p.sf.net/sfu/dell-eql-dev2dev _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From eilert-sprachen at ...221... Thu Nov 11 09:03:14 2010 From: eilert-sprachen at ...221... (Rolf-Werner Eilert) Date: Thu, 11 Nov 2010 09:03:14 +0100 Subject: [Gambas-user] Writing to a file on disk In-Reply-To: <20101110180316.59f0c1b3.hiems@...2501...> References: <20101110143857.ef610559.hiems@...2501...> <20101110154609.4f8c5ade.hiems@...2501...> <4CDAC4E0.3060407@...221...> <20101110180316.59f0c1b3.hiems@...2501...> Message-ID: <4CDBA342.70107@...221...> Hi Neil, Nice to read your code. Here are some comments on it: > > PUBLIC SUB Button1_Click() > > DIM lineIn AS String > DIM fileIn AS File > DIM fname AS String > fname = "/home/neilwin/basic/trial.txt" > Benoit introduced a new way of writing such an OPEN, you already received messages which proposed it. Personally, I also prefer writing it the old way as you do, but do not be surprised if some day it isn't accepted anymore ;-) > OPEN fname FOR READ AS #fileIn > LINE INPUT #fileIn, lineIn Why do you delete the textbox and then concatenate the new string to it? Concatenating would only make sense if you left the existing string untouched, i. e. this line > result.Text = "" deletes the existing string and this line > result.text = result.text& lineIn fills it with the new one anyway. You could save a line by just writing result.text = lineIn The following line is needless when you read from a file: > FLUSH #fileIn It is only needed when you write into a stream which is buffered, just to make sure everything has been definitely written on disk prior to closing it. > CLOSE #fileIn > > END > > There is also a text box which I have renamed result. I make a few changes to the line of text and then I click on another button to write the changed file back to the hard disk. Here is the code > > PUBLIC SUB Button3_Click() > > DIM fileIn AS File > DIM fname AS String > fname = "/home/neilwin/basic/trial.txt" Here I would say that you missed WRITE in the line > OPEN fname FOR CREATE AS #fileIn it should read OPEN fname FOR WRITE CREATE AS #fileIn at least this is the way I do it... > WRITE #fileIn, result.Text If you would like to use FLUSH, this would be the place to put it, but I never used it and have no bad experience with it. As far as I remember, CLOSE will flush the stream anyway. > CLOSE #fileIn > > END Anyway, for simple textfile input/output, File.Read and File.Save will be your friends. By the way, the other day I found that vb.net also offers both ways, but when you use their version of File.Save, you get a single UTF-8(?) character set at the beginning of the string. Actually, this made it useless for me. I don't know why Microsoft is doing such things, and of course they won't tell you in the documentation what it is supposed to be good for. They just recommend to use this instead of opening the files. Good to have Gambas ;-) Regards Rolf From linux at ...1904... Thu Nov 11 09:29:03 2010 From: linux at ...1904... (Dr. Martin Senftleben) Date: Thu, 11 Nov 2010 09:29:03 +0100 Subject: [Gambas-user] Installing gambas3 on LinuxMint In-Reply-To: <1289459169.28126.2.camel@...2502...> References: <4CDB9069.4030503@...1904...> <1289459169.28126.2.camel@...2502...> Message-ID: <4CDBA94F.6040409@...1904...> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 11.11.2010 08:06, schrieb Ricardo D?az Mart?n: > Did you read this: http://gambasdoc.org/help/install/ubuntu?view ? I went through all steps (the links at the top are inaccessible) with no success. Still the same error about dependency. > Because Mint is Ubuntu based distro I think if you install dependencies > as in ubuntu every works fine. > > Regards, > Ricardo D?az > > -----Mensaje original----- > De: Dr. Martin Senftleben > Reply-to: mailing list for gambas users > > Para: gambas-user at lists.sourceforge.net > Asunto: [Gambas-user] Installing gambas3 on LinuxMint > Fecha: Thu, 11 Nov 2010 07:42:49 +0100 > > > Hi all, > > I want to install gambas3 on my LinuxMint machine (64bit), but it > doesn't work, the gambas3-gb-db-mysql package cannot be installed, > because it requires libmysqlclient15off, which is not available. I have > libmysqlclient16 on the system, and libmysqlclient15off is not on the > list of installable packages. > > Any ideas? > > Thanks > > Martin - ------------------------------------------------------------------------------ Centralized Desktop Delivery: Dell and VMware Reference Architecture Simplifying enterprise desktop deployment and management using Dell EqualLogic storage and VMware View: A highly scalable, end-to-end client virtualization framework. Read more! http://p.sf.net/sfu/dell-eql-dev2dev _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user - ------------------------------------------------------------------------------ Centralized Desktop Delivery: Dell and VMware Reference Architecture Simplifying enterprise desktop deployment and management using Dell EqualLogic storage and VMware View: A highly scalable, end-to-end client virtualization framework. Read more! http://p.sf.net/sfu/dell-eql-dev2dev _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAkzbqU8ACgkQUmmuY48ByEiYuwCeJUg4f8hg0spKPuYEVgrKF6SG DucAn2o8b+hYAUAyo4eLr5PwFUjzDUbt =BPLB -----END PGP SIGNATURE----- From shordi at ...626... Thu Nov 11 09:57:14 2010 From: shordi at ...626... (=?ISO-8859-1?Q?Jorge_Carri=F3n?=) Date: Thu, 11 Nov 2010 09:57:14 +0100 Subject: [Gambas-user] Installing gambas3 on LinuxMint In-Reply-To: <4CDBA94F.6040409@...1904...> References: <4CDB9069.4030503@...1904...> <1289459169.28126.2.camel@...2502...> <4CDBA94F.6040409@...1904...> Message-ID: I had some time ago a similar problem with a library of printing system (don't remember the name) and I created a link - (something like: ln -s libmysqlclient16 libmysqlclient15off) - and placed it in a directory located further down the chain of PATH than ver.16 . Thus, applications that seek version 16 can find it, and Gambas finds it too as continuing the search further in the PATH. Don't know if this is a sollution, but it works for me in printing sistem. Good Look. 2010/11/11 Dr. Martin Senftleben > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Am 11.11.2010 08:06, schrieb Ricardo D?az Mart?n: > > Did you read this: http://gambasdoc.org/help/install/ubuntu?view ? > > I went through all steps (the links at the top are inaccessible) with no > success. Still the same error about dependency. > > > Because Mint is Ubuntu based distro I think if you install dependencies > > as in ubuntu every works fine. > > > > Regards, > > Ricardo D?az > > > > -----Mensaje original----- > > De: Dr. Martin Senftleben > > Reply-to: mailing list for gambas users > > > > Para: gambas-user at lists.sourceforge.net > > Asunto: [Gambas-user] Installing gambas3 on LinuxMint > > Fecha: Thu, 11 Nov 2010 07:42:49 +0100 > > > > > > Hi all, > > > > I want to install gambas3 on my LinuxMint machine (64bit), but it > > doesn't work, the gambas3-gb-db-mysql package cannot be installed, > > because it requires libmysqlclient15off, which is not available. I have > > libmysqlclient16 on the system, and libmysqlclient15off is not on the > > list of installable packages. > > > > Any ideas? > > > > Thanks > > > > Martin > > - > > ------------------------------------------------------------------------------ > Centralized Desktop Delivery: Dell and VMware Reference Architecture > Simplifying enterprise desktop deployment and management using > Dell EqualLogic storage and VMware View: A highly scalable, end-to-end > client virtualization framework. Read more! > http://p.sf.net/sfu/dell-eql-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > - > > ------------------------------------------------------------------------------ > Centralized Desktop Delivery: Dell and VMware Reference Architecture > Simplifying enterprise desktop deployment and management using > Dell EqualLogic storage and VMware View: A highly scalable, end-to-end > client virtualization framework. Read more! > http://p.sf.net/sfu/dell-eql-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.10 (GNU/Linux) > > iEYEARECAAYFAkzbqU8ACgkQUmmuY48ByEiYuwCeJUg4f8hg0spKPuYEVgrKF6SG > DucAn2o8b+hYAUAyo4eLr5PwFUjzDUbt > =BPLB > -----END PGP SIGNATURE----- > > > ------------------------------------------------------------------------------ > Centralized Desktop Delivery: Dell and VMware Reference Architecture > Simplifying enterprise desktop deployment and management using > Dell EqualLogic storage and VMware View: A highly scalable, end-to-end > client virtualization framework. Read more! > http://p.sf.net/sfu/dell-eql-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From wellspinto at ...626... Thu Nov 11 10:41:46 2010 From: wellspinto at ...626... (Wellington de Souza Pinto) Date: Thu, 11 Nov 2010 07:41:46 -0200 Subject: [Gambas-user] Gambas-user Digest, Vol 54, Issue 19 In-Reply-To: References: Message-ID: Hi! Everyone helpme? I buy the mac and i like install gambas. How? Any step-by-step for this. tks From hiems at ...2501... Thu Nov 11 11:49:19 2010 From: hiems at ...2501... (NW) Date: Thu, 11 Nov 2010 10:49:19 +0000 Subject: [Gambas-user] Writing to a file on disk In-Reply-To: <4CDBA342.70107@...221...> References: <20101110143857.ef610559.hiems@...2501...> <20101110154609.4f8c5ade.hiems@...2501...> <4CDAC4E0.3060407@...221...> <20101110180316.59f0c1b3.hiems@...2501...> <4CDBA342.70107@...221...> Message-ID: <20101111104919.5f56d28c.hiems@...2501...> On Thu, 11 Nov 2010 09:03:14 +0100 Rolf-Werner Eilert wrote: > Hi Neil, > > Nice to read your code. Here are some comments on it: > > > > Thanks for your comments. I have made the suggested changes. I still get an extra character at the beginning of the line every time I write the new version of the line to the file. > Anyway, for simple textfile input/output, File.Read and File.Save will > be your friends. > I do have a copy of the book "A beginner's Guide to Gambas" It is a bit old now, but there does not seem to be anything else around. So I am still trying to find out about file.read and file.save. It does not seem to be mentioned in that book, nor can I find it on the internet. Anyway, thanks for all your help. More research needed, Neil From gambas.fr at ...626... Thu Nov 11 12:40:36 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Thu, 11 Nov 2010 12:40:36 +0100 Subject: [Gambas-user] Writing to a file on disk In-Reply-To: <20101111104919.5f56d28c.hiems@...2501...> References: <20101110143857.ef610559.hiems@...2501...> <20101110154609.4f8c5ade.hiems@...2501...> <4CDAC4E0.3060407@...221...> <20101110180316.59f0c1b3.hiems@...2501...> <4CDBA342.70107@...221...> <20101111104919.5f56d28c.hiems@...2501...> Message-ID: make an archive of your project and send it here 2010/11/11 NW : > On Thu, 11 Nov 2010 09:03:14 +0100 > Rolf-Werner Eilert wrote: > >> Hi Neil, >> >> Nice to read your code. Here are some comments on it: >> >> > >> > Thanks for your comments. I have made the suggested changes. I still get an extra character at the beginning of the line every time I write the new version of the line to the file. > >> Anyway, for simple textfile input/output, File.Read and File.Save will >> be your friends. >> > I do have a copy of the book "A beginner's Guide to Gambas" It is a bit old now, but there does not seem to be anything else around. > > So I am still trying to find out about file.read and file.save. It does not seem to be mentioned in that book, nor can I find it on the internet. > > Anyway, thanks for all your help. More research needed, > > Neil > > ------------------------------------------------------------------------------ > Centralized Desktop Delivery: Dell and VMware Reference Architecture > Simplifying enterprise desktop deployment and management using > Dell EqualLogic storage and VMware View: A highly scalable, end-to-end > client virtualization framework. Read more! > http://p.sf.net/sfu/dell-eql-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Fabien Bodard From hiems at ...2501... Thu Nov 11 15:13:56 2010 From: hiems at ...2501... (NW) Date: Thu, 11 Nov 2010 14:13:56 +0000 Subject: [Gambas-user] Writing to a file on disk In-Reply-To: <4CDBA342.70107@...221...> References: <20101110143857.ef610559.hiems@...2501...> <20101110154609.4f8c5ade.hiems@...2501...> <4CDAC4E0.3060407@...221...> <20101110180316.59f0c1b3.hiems@...2501...> <4CDBA342.70107@...221...> Message-ID: <20101111141356.b0bb72ac.hiems@...2501...> On Thu, 11 Nov 2010 09:03:14 +0100 Rolf-Werner Eilert wrote: > Hi Neil, > > Nice to read your code. Here are some comments on it: > > > Anyway, for simple textfile input/output, File.Read and File.Save will > be your friends. > As a follow up to this. I have searched around via Google and my A Beginner's Guide to Gambas book but I just cannot find out how to use File.Read and File.Save. Can anyone please start me off? I have played around with ideas for it but keep getting error messages. Many Thanks Neil From eilert-sprachen at ...221... Thu Nov 11 15:47:26 2010 From: eilert-sprachen at ...221... (Rolf-Werner Eilert) Date: Thu, 11 Nov 2010 15:47:26 +0100 Subject: [Gambas-user] Writing to a file on disk In-Reply-To: <20101111141356.b0bb72ac.hiems@...2501...> References: <20101110143857.ef610559.hiems@...2501...> <20101110154609.4f8c5ade.hiems@...2501...> <4CDAC4E0.3060407@...221...> <20101110180316.59f0c1b3.hiems@...2501...> <4CDBA342.70107@...221...> <20101111141356.b0bb72ac.hiems@...2501...> Message-ID: <4CDC01FE.6040408@...221...> Am 11.11.2010 15:13, schrieb NW: > On Thu, 11 Nov 2010 09:03:14 +0100 > Rolf-Werner Eilert wrote: > >> Hi Neil, >> >> Nice to read your code. Here are some comments on it: >> >> >> Anyway, for simple textfile input/output, File.Read and File.Save will >> be your friends. >> > As a follow up to this. > > I have searched around via Google and my A Beginner's Guide to Gambas book but I just cannot find out how to use File.Read and File.Save. Can anyone please start me off? I have played around with ideas for it but keep getting error messages. > > Many Thanks > > Neil > Sure, and Fabien has already given the example, so I quote him here. Copying his mail, I find something interesting he mentioned right at the beginning. I've never used that stuff, so just give it a try :-) Here is what he wrote: have you tryed to replace result by a global string variable ? textbox use utf8 charset and yes in your case ... use file.save to resume your code Private $sResult as string PUBLIC SUB Button1_Click() $sResult = File.Load("/home/neilwin/basic/trial.txt") END PUBLIC SUB Button3_Click() File.Save("/home/neilwin/basic/trial.txt", $sResult) END Regards Rolf From hiems at ...2501... Thu Nov 11 16:54:20 2010 From: hiems at ...2501... (NW) Date: Thu, 11 Nov 2010 15:54:20 +0000 Subject: [Gambas-user] Writing to a file on disk In-Reply-To: <4CDC01FE.6040408@...221...> References: <20101110143857.ef610559.hiems@...2501...> <20101110154609.4f8c5ade.hiems@...2501...> <4CDAC4E0.3060407@...221...> <20101110180316.59f0c1b3.hiems@...2501...> <4CDBA342.70107@...221...> <20101111141356.b0bb72ac.hiems@...2501...> <4CDC01FE.6040408@...221...> Message-ID: <20101111155420.cdc07d24.hiems@...2501...> On Thu, 11 Nov 2010 15:47:26 +0100 Rolf-Werner Eilert wrote: > > Sure, and Fabien has already given the example, so I quote him here. > Copying his mail, I find something interesting he mentioned right at the > beginning. I've never used that stuff, so just give it a try :-) Here is > what he wrote: > > > have you tryed to replace result by a global string variable ? > > textbox use utf8 charset > > and yes in your case ... use file.save > Yes, I did read that but I want to make some changes to the line of code before saving it back to disk so I thought the best way was to use a text box. Anyway, further research on the Internet and I found a way of doing it. Here is the code I put on a new button for saving the changed line.(Result is the name of the text box). PUBLIC SUB Button4_Click() DIM lines AS String DIM dest AS String lines = result.Text dest = "/home/neilwin/basic/trial.txt" File.Save(dest, lines) END And that has worked just fine. Now to carry on learning more .... Neil From math.eber at ...221... Thu Nov 11 20:47:41 2010 From: math.eber at ...221... (Matti) Date: Thu, 11 Nov 2010 20:47:41 +0100 Subject: [Gambas-user] SelectAll feature In-Reply-To: <1289458914.2788.5.camel@...2493...> References: <1289458914.2788.5.camel@...2493...> Message-ID: <4CDC485D.4050707@...221...> If you want to do it via CTRL+A, you have to write a keypress event for the form: Public Sub Form_KeyPress() If Key.Code = Key["A"] And If Key.Control Then TextBox1.SelectAll Endif End And if you want to have the text selected automatically when the text box gets the focus, do: Public Sub TextBox1_GotFocus() TextBox1.SelectAll End Am 11.11.2010 08:01, schrieb Demosthenes Koptsis: > Good morning to all, > > While setting properties or any text that is in a textbox i wanted to > press CTRL+A to select all the word and then press BACKSPACE to delete > it and next to write a new one. > > But the CTRL+A is not working and i need to press many times the arrow > keys to set the pointer to the end of the word and then to press many > times BACKSPACE to delete the word. > > I know this is not so a big deal but if i do it many times is annoying. > > Is it possible to enable the SelectAll feature for any textbox or any > other control that contains text so to manage more fastest the strings? > From mohareve at ...626... Thu Nov 11 21:16:13 2010 From: mohareve at ...626... (M. Cs.) Date: Thu, 11 Nov 2010 15:16:13 -0500 Subject: [Gambas-user] No Data event with gb.gtk libraries Message-ID: I'd like to move my project from KDE based stuff to GNOME. I have grid views, and I'm getting errors when I try to fill them with Data event. Why, which components would solve the problem? Thanks! (gambas 2.21) Csaba From demosthenesk at ...626... Thu Nov 11 21:19:28 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Thu, 11 Nov 2010 22:19:28 +0200 Subject: [Gambas-user] SelectAll feature In-Reply-To: <4CDC485D.4050707@...221...> References: <1289458914.2788.5.camel@...2493...> <4CDC485D.4050707@...221...> Message-ID: <1289506768.4878.1.camel@...2494...> The SelectAll is for the Gambas2 application, not a mine one. This feature is missing from Gambas2. On Thu, 2010-11-11 at 20:47 +0100, Matti wrote: > If you want to do it via CTRL+A, you have to write a keypress event for the form: > > Public Sub Form_KeyPress() > If Key.Code = Key["A"] And If Key.Control Then > TextBox1.SelectAll > Endif > End > > And if you want to have the text selected automatically when the text box gets > the focus, do: > > Public Sub TextBox1_GotFocus() > TextBox1.SelectAll > End > > > Am 11.11.2010 08:01, schrieb Demosthenes Koptsis: > > Good morning to all, > > > > While setting properties or any text that is in a textbox i wanted to > > press CTRL+A to select all the word and then press BACKSPACE to delete > > it and next to write a new one. > > > > But the CTRL+A is not working and i need to press many times the arrow > > keys to set the pointer to the end of the word and then to press many > > times BACKSPACE to delete the word. > > > > I know this is not so a big deal but if i do it many times is annoying. > > > > Is it possible to enable the SelectAll feature for any textbox or any > > other control that contains text so to manage more fastest the strings? > > > > ------------------------------------------------------------------------------ > Centralized Desktop Delivery: Dell and VMware Reference Architecture > Simplifying enterprise desktop deployment and management using > Dell EqualLogic storage and VMware View: A highly scalable, end-to-end > client virtualization framework. Read more! > http://p.sf.net/sfu/dell-eql-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From gambas at ...1... Thu Nov 11 21:22:33 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Thu, 11 Nov 2010 21:22:33 +0100 Subject: [Gambas-user] No Data event with gb.gtk libraries In-Reply-To: References: Message-ID: <201011112122.33862.gambas@...1...> > I'd like to move my project from KDE based stuff to GNOME. I have grid > views, and I'm getting errors when I try to fill them with Data event. Why, > which components would solve the problem? Thanks! (gambas 2.21) > > Csaba If you give no details about your problems, nobody can help you! -- Beno?t Minisini From gambas at ...1... Thu Nov 11 21:27:16 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Thu, 11 Nov 2010 21:27:16 +0100 Subject: [Gambas-user] SelectAll feature In-Reply-To: <1289458914.2788.5.camel@...2493...> References: <1289458914.2788.5.camel@...2493...> Message-ID: <201011112127.16546.gambas@...1...> > Good morning to all, > > While setting properties or any text that is in a textbox i wanted to > press CTRL+A to select all the word and then press BACKSPACE to delete > it and next to write a new one. > > But the CTRL+A is not working and i need to press many times the arrow > keys to set the pointer to the end of the word and then to press many > times BACKSPACE to delete the word. > > I know this is not so a big deal but if i do it many times is annoying. > > Is it possible to enable the SelectAll feature for any textbox or any > other control that contains text so to manage more fastest the strings? Qt 3 TextBox and TextArea do not have the CTRL+A shortcut, so you have to do it yourself. Regards, -- Beno?t Minisini From math.eber at ...221... Thu Nov 11 21:37:50 2010 From: math.eber at ...221... (Matti) Date: Thu, 11 Nov 2010 21:37:50 +0100 Subject: [Gambas-user] SelectAll feature In-Reply-To: <1289506768.4878.1.camel@...2494...> References: <1289458914.2788.5.camel@...2493...> <4CDC485D.4050707@...221...> <1289506768.4878.1.camel@...2494...> Message-ID: <4CDC541E.3000907@...221...> I don't understand. What do you mean with "not a mine one"? Here, in Gambas 2 (and 3) TextBox.SelectAll works fine. Am 11.11.2010 21:19, schrieb Demosthenes Koptsis: > The SelectAll is for the Gambas2 application, not a mine one. > > This feature is missing from Gambas2. > > On Thu, 2010-11-11 at 20:47 +0100, Matti wrote: >> If you want to do it via CTRL+A, you have to write a keypress event for the form: >> >> Public Sub Form_KeyPress() >> If Key.Code = Key["A"] And If Key.Control Then >> TextBox1.SelectAll >> Endif >> End >> >> And if you want to have the text selected automatically when the text box gets >> the focus, do: >> >> Public Sub TextBox1_GotFocus() >> TextBox1.SelectAll >> End >> >> >> Am 11.11.2010 08:01, schrieb Demosthenes Koptsis: >>> Good morning to all, >>> >>> While setting properties or any text that is in a textbox i wanted to >>> press CTRL+A to select all the word and then press BACKSPACE to delete >>> it and next to write a new one. >>> >>> But the CTRL+A is not working and i need to press many times the arrow >>> keys to set the pointer to the end of the word and then to press many >>> times BACKSPACE to delete the word. >>> >>> I know this is not so a big deal but if i do it many times is annoying. >>> >>> Is it possible to enable the SelectAll feature for any textbox or any >>> other control that contains text so to manage more fastest the strings? >>> >> >> ------------------------------------------------------------------------------ >> Centralized Desktop Delivery: Dell and VMware Reference Architecture >> Simplifying enterprise desktop deployment and management using >> Dell EqualLogic storage and VMware View: A highly scalable, end-to-end >> client virtualization framework. Read more! >> http://p.sf.net/sfu/dell-eql-dev2dev >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > ------------------------------------------------------------------------------ > Centralized Desktop Delivery: Dell and VMware Reference Architecture > Simplifying enterprise desktop deployment and management using > Dell EqualLogic storage and VMware View: A highly scalable, end-to-end > client virtualization framework. Read more! > http://p.sf.net/sfu/dell-eql-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From mohareve at ...626... Thu Nov 11 21:38:06 2010 From: mohareve at ...626... (M. Cs.) Date: Thu, 11 Nov 2010 15:38:06 -0500 Subject: [Gambas-user] No Data event with gb.gtk libraries In-Reply-To: <201011112122.33862.gambas@...1...> References: <201011112122.33862.gambas@...1...> Message-ID: O.K: There's a big mess with the gb components among the different kinds of distributions. I was trying to find a good replacement solution for the KDE libraries, since at least a half of the platforms are lacking the gb-qt-kde component. My project can run without this library, but is ugly as hell without it. I've tried just simply to turn off gb.qt and gb.qt.ext and to turn in gb.gtk and gb.gtk.ext. But I've realized that in gtk versions there are no printing modules. Beside that, the gb.sdl component is unusable since it requires .gui or .gtk or .qt components, and at the same time are in conflict with the same. Please Benoit, make a global project cleanup! It's a hell of a mess. I'm currently on Mandriva 2010.1 but I found the same situation on Ubuntu too. Csaba From mohareve at ...626... Thu Nov 11 21:43:06 2010 From: mohareve at ...626... (M. Cs.) Date: Thu, 11 Nov 2010 15:43:06 -0500 Subject: [Gambas-user] No Data event with gb.gtk libraries In-Reply-To: References: <201011112122.33862.gambas@...1...> Message-ID: > > And yes, I've tried to run my program with the same code as it worked > before: I have some search queries where the results are put into gridviewe. > With .gtk components the Data event returns an error finding no event data. Csaba > > From gambas at ...1... Thu Nov 11 21:48:25 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Thu, 11 Nov 2010 21:48:25 +0100 Subject: [Gambas-user] No Data event with gb.gtk libraries In-Reply-To: References: <201011112122.33862.gambas@...1...> Message-ID: <201011112148.25197.gambas@...1...> > O.K: > There's a big mess with the gb components among the different kinds of > distributions. I was trying to find a good replacement solution for the KDE > libraries, since at least a half of the platforms are lacking the gb-qt-kde > component. My project can run without this library, but is ugly as hell > without it. I've tried just simply to turn off gb.qt and gb.qt.ext and to > turn in gb.gtk and gb.gtk.ext. But I've realized that in gtk versions there > are no printing modules. Beside that, the gb.sdl component is unusable > since it requires .gui or .gtk or .qt components, and at the same time are > in conflict with the same. Please Benoit, make a global project cleanup! > It's a hell of a mess. I'm currently on Mandriva 2010.1 but I found the > same situation on Ubuntu too. > > Csaba First Ubuntu has all needed Gambas 2 components, KDE 3 libraries included. Second, gb.sdl does not require a GUI component, as it is in conflict with them. I don't know why you thought that. If a distribution decide to remove KDE3 environment *and* KDE3 libraries, I can't make your project magically work as soon as it depends on KDE3 libraries! You have to compile KDE3 by hand, I can't help you more. So I suggest you try to port your project on Gambas 3: gb.qt.kde.html has been replaced by gb.qt4.webkit, and DCOP support has been removed, and replaced by a gb.dbus component. Regards, -- Beno?t Minisini From jussi.lahtinen at ...626... Thu Nov 11 21:48:35 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Thu, 11 Nov 2010 22:48:35 +0200 Subject: [Gambas-user] Elusive Gambas3 crashing bug Message-ID: Hi! I'm doing quick and dirty "GambasTester" project. Idea is to fuzz with all commands to find out if all works correctly within current revision. Of course it is not possible to test all combinations and situations, but much better than nothing. I know IDE is pretty good tester itself, but this will be better in some aspects, as it will automatically test things for you and it uses commands that IDE doesn't. While doing this I crashed gambas several times. I ran this command in IDE's console (replacing X with several different numbers): ? bin(rol(1073741784+ shl(9,2) + shr(24,3),X ),32) (gdb) set args /usr/local/bin/gambas3 (gdb) run Starting program: /usr/local/bin/gbr3 /usr/local/bin/gambas3 [Thread debugging using libthread_db enabled] warning: unable to load Qt translation: en_GB.utf8 [New Thread 0x7fffdfa60710 (LWP 31378)] Program received signal SIGSEGV, Segmentation fault. 0x0000000000423c50 in realloc_string (ptr=0x7fffffffc4a0, new_len=8) at gbx_string.c:242 242 STRING *nstr = alloc_string(new_len); (gdb) f 1 #1 STRING_extend (ptr=0x7fffffffc4a0, new_len=8) at gbx_string.c:389 389 str = realloc_string(STRING_from_ptr(*ptr), new_len); All logs are from very different cases, sometimes gambas crashes immediately, some times it need much fuzzing. Usually crash happens when I hit enter on console and then click focus to editor. See attached valgrind logs. Gambas3 rev 3281 @ Ubuntu 10.04 64bit Jussi -------------- next part -------------- A non-text attachment was scrubbed... Name: valgrind-memcheck.log Type: text/x-log Size: 62716 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: valgrind-callgrind.log Type: text/x-log Size: 3303 bytes Desc: not available URL: From gambas at ...1... Thu Nov 11 21:53:30 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Thu, 11 Nov 2010 21:53:30 +0100 Subject: [Gambas-user] Elusive Gambas3 crashing bug In-Reply-To: References: Message-ID: <201011112153.30485.gambas@...1...> > Hi! > I'm doing quick and dirty "GambasTester" project. > Idea is to fuzz with all commands to find out if all works correctly within > current revision. > Of course it is not possible to test all combinations and situations, but > much better than nothing. > I know IDE is pretty good tester itself, but this will be better in some > aspects, as it will automatically test things for you > and it uses commands that IDE doesn't. Good idea! > > While doing this I crashed gambas several times. > I ran this command in IDE's console (replacing X with several different > numbers): > ? bin(rol(1073741784+ shl(9,2) + shr(24,3),X ),32) > > > (gdb) set args /usr/local/bin/gambas3 > (gdb) run > Starting program: /usr/local/bin/gbr3 /usr/local/bin/gambas3 > [Thread debugging using libthread_db enabled] > warning: unable to load Qt translation: en_GB.utf8 > [New Thread 0x7fffdfa60710 (LWP 31378)] > > Program received signal SIGSEGV, Segmentation fault. > 0x0000000000423c50 in realloc_string (ptr=0x7fffffffc4a0, new_len=8) > at gbx_string.c:242 > 242 STRING *nstr = alloc_string(new_len); > (gdb) f 1 > #1 STRING_extend (ptr=0x7fffffffc4a0, new_len=8) at gbx_string.c:389 > 389 str = realloc_string(STRING_from_ptr(*ptr), new_len); > > > All logs are from very different cases, sometimes gambas crashes > immediately, some times it need much fuzzing. > Usually crash happens when I hit enter on console and then click focus to > editor. > See attached valgrind logs. > > Gambas3 rev 3281 @ Ubuntu 10.04 64bit > > Jussi I will look at the log, but I don't understand what you did *exactly* to get the crash. Regards, -- Beno?t Minisini From mdavies5 at ...169... Fri Nov 12 01:01:35 2010 From: mdavies5 at ...169... (Michael) Date: Fri, 12 Nov 2010 11:01:35 +1100 Subject: [Gambas-user] SelectAll feature In-Reply-To: <1289506768.4878.1.camel@...2494...> References: <1289458914.2788.5.camel@...2493...> <4CDC485D.4050707@...221...> <1289506768.4878.1.camel@...2494...> Message-ID: <4CDC83DF.3060202@...169...> I am using Gambas2 and the .SelectAll feature when a textbox gets focus. It works perfectly on my Ubuntu 64 bit. I am using the GB.qt components. Regards Mike On 12/11/10 07:19, Demosthenes Koptsis wrote: > The SelectAll is for the Gambas2 application, not a mine one. > > This feature is missing from Gambas2. > > On Thu, 2010-11-11 at 20:47 +0100, Matti wrote: >> If you want to do it via CTRL+A, you have to write a keypress event for the form: >> >> Public Sub Form_KeyPress() >> If Key.Code = Key["A"] And If Key.Control Then >> TextBox1.SelectAll >> Endif >> End >> >> And if you want to have the text selected automatically when the text box gets >> the focus, do: >> >> Public Sub TextBox1_GotFocus() >> TextBox1.SelectAll >> End >> >> >> Am 11.11.2010 08:01, schrieb Demosthenes Koptsis: >>> Good morning to all, >>> >>> While setting properties or any text that is in a textbox i wanted to >>> press CTRL+A to select all the word and then press BACKSPACE to delete >>> it and next to write a new one. >>> >>> But the CTRL+A is not working and i need to press many times the arrow >>> keys to set the pointer to the end of the word and then to press many >>> times BACKSPACE to delete the word. >>> >>> I know this is not so a big deal but if i do it many times is annoying. >>> >>> Is it possible to enable the SelectAll feature for any textbox or any >>> other control that contains text so to manage more fastest the strings? >>> >> ------------------------------------------------------------------------------ >> Centralized Desktop Delivery: Dell and VMware Reference Architecture >> Simplifying enterprise desktop deployment and management using >> Dell EqualLogic storage and VMware View: A highly scalable, end-to-end >> client virtualization framework. Read more! >> http://p.sf.net/sfu/dell-eql-dev2dev >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user > > > ------------------------------------------------------------------------------ > Centralized Desktop Delivery: Dell and VMware Reference Architecture > Simplifying enterprise desktop deployment and management using > Dell EqualLogic storage and VMware View: A highly scalable, end-to-end > client virtualization framework. Read more! > http://p.sf.net/sfu/dell-eql-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > From demosthenesk at ...626... Fri Nov 12 02:48:06 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Fri, 12 Nov 2010 03:48:06 +0200 Subject: [Gambas-user] SelectAll feature In-Reply-To: <4CDC83DF.3060202@...169...> References: <1289458914.2788.5.camel@...2493...> <4CDC485D.4050707@...221...> <1289506768.4878.1.camel@...2494...> <4CDC83DF.3060202@...169...> Message-ID: <1289526486.2233.38.camel@...2494...> i speak about the following: i am in IDE of Gambas2. I click on a Button1 on my FMain. I click on Name property. The property is get focus and selects all text. If i click in gridview in text area and i want to select all again the text of Name property is not possible. When i press CRTL+A the cursor goes at the beginning of the name as shown in video but is not selecting the text. i type names or texts i make some mistakes and i need to delete the whole text without taking my hands out of the keyboard. To do so i was used to selectall the text with CTRL+A. See video. http://www.mediafire.com/file/i9xtjiqqerdtiz4/gambas2-select_all.ogv The only way to select all the text is to click the Gridview at the first column at "Name". How is it possible to select all by click and not by CTRL+A? Is this a Qt issue as Benoit said? On Fri, 2010-11-12 at 11:01 +1100, Michael wrote: > I am using Gambas2 and the .SelectAll feature when a textbox gets focus. > It works perfectly on my Ubuntu 64 bit. I am using the GB.qt components. > Regards > Mike > > On 12/11/10 07:19, Demosthenes Koptsis wrote: > > The SelectAll is for the Gambas2 application, not a mine one. > > > > This feature is missing from Gambas2. > > > > On Thu, 2010-11-11 at 20:47 +0100, Matti wrote: > >> If you want to do it via CTRL+A, you have to write a keypress event for the form: > >> > >> Public Sub Form_KeyPress() > >> If Key.Code = Key["A"] And If Key.Control Then > >> TextBox1.SelectAll > >> Endif > >> End > >> > >> And if you want to have the text selected automatically when the text box gets > >> the focus, do: > >> > >> Public Sub TextBox1_GotFocus() > >> TextBox1.SelectAll > >> End > >> > >> > >> Am 11.11.2010 08:01, schrieb Demosthenes Koptsis: > >>> Good morning to all, > >>> > >>> While setting properties or any text that is in a textbox i wanted to > >>> press CTRL+A to select all the word and then press BACKSPACE to delete > >>> it and next to write a new one. > >>> > >>> But the CTRL+A is not working and i need to press many times the arrow > >>> keys to set the pointer to the end of the word and then to press many > >>> times BACKSPACE to delete the word. > >>> > >>> I know this is not so a big deal but if i do it many times is annoying. > >>> > >>> Is it possible to enable the SelectAll feature for any textbox or any > >>> other control that contains text so to manage more fastest the strings? > >>> > >> ------------------------------------------------------------------------------ > >> Centralized Desktop Delivery: Dell and VMware Reference Architecture > >> Simplifying enterprise desktop deployment and management using > >> Dell EqualLogic storage and VMware View: A highly scalable, end-to-end > >> client virtualization framework. Read more! > >> http://p.sf.net/sfu/dell-eql-dev2dev > >> _______________________________________________ > >> Gambas-user mailing list > >> Gambas-user at lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > ------------------------------------------------------------------------------ > > Centralized Desktop Delivery: Dell and VMware Reference Architecture > > Simplifying enterprise desktop deployment and management using > > Dell EqualLogic storage and VMware View: A highly scalable, end-to-end > > client virtualization framework. Read more! > > http://p.sf.net/sfu/dell-eql-dev2dev > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > > > ------------------------------------------------------------------------------ > Centralized Desktop Delivery: Dell and VMware Reference Architecture > Simplifying enterprise desktop deployment and management using > Dell EqualLogic storage and VMware View: A highly scalable, end-to-end > client virtualization framework. Read more! > http://p.sf.net/sfu/dell-eql-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From eilert-sprachen at ...221... Fri Nov 12 08:49:00 2010 From: eilert-sprachen at ...221... (Rolf-Werner Eilert) Date: Fri, 12 Nov 2010 08:49:00 +0100 Subject: [Gambas-user] SelectAll feature In-Reply-To: <1289526486.2233.38.camel@...2494...> References: <1289458914.2788.5.camel@...2493...> <4CDC485D.4050707@...221...> <1289506768.4878.1.camel@...2494...> <4CDC83DF.3060202@...169...> <1289526486.2233.38.camel@...2494...> Message-ID: <4CDCF16C.7050502@...221...> Ok, Demosthenes, the guys got you wrong :-) We thought you mean a running application, not the IDE. Am 12.11.2010 02:48, schrieb Demosthenes Koptsis: > i speak about the following: > > i am in IDE of Gambas2. > I click on a Button1 on my FMain. > I click on Name property. > The property is get focus and selects all text. > > If i click in gridview in text area and i want to select all again the > text of Name property is not possible. Tried this here. You are right, each time I click on another element, I have to search for "Name" and click it again to get its text selected. Is this what you mean? > > When i press CRTL+A the cursor goes at the beginning of the name as > shown in video but is not selecting the text. Confirmed, it does not react as expected. > The only way to select all the text is to click the Gridview at the > first column at "Name". That's right. > > How is it possible to select all by click and not by CTRL+A? > > Is this a Qt issue as Benoit said? Hm. The IDE is coded in Gambas itself (is it?), so it should be possible to achieve this via catching the keystroke the way Matti described. Or did Benoit mean, the GridView/TableView doesn't allow for catching the keystrokes here? Regards Rolf > > > > On Fri, 2010-11-12 at 11:01 +1100, Michael wrote: >> I am using Gambas2 and the .SelectAll feature when a textbox gets focus. >> It works perfectly on my Ubuntu 64 bit. I am using the GB.qt components. >> Regards >> Mike >> >> On 12/11/10 07:19, Demosthenes Koptsis wrote: >>> The SelectAll is for the Gambas2 application, not a mine one. >>> >>> This feature is missing from Gambas2. >>> >>> On Thu, 2010-11-11 at 20:47 +0100, Matti wrote: >>>> If you want to do it via CTRL+A, you have to write a keypress event for the form: >>>> >>>> Public Sub Form_KeyPress() >>>> If Key.Code = Key["A"] And If Key.Control Then >>>> TextBox1.SelectAll >>>> Endif >>>> End >>>> >>>> And if you want to have the text selected automatically when the text box gets >>>> the focus, do: >>>> >>>> Public Sub TextBox1_GotFocus() >>>> TextBox1.SelectAll >>>> End >>>> >>>> >>>> Am 11.11.2010 08:01, schrieb Demosthenes Koptsis: >>>>> Good morning to all, >>>>> >>>>> While setting properties or any text that is in a textbox i wanted to >>>>> press CTRL+A to select all the word and then press BACKSPACE to delete >>>>> it and next to write a new one. >>>>> >>>>> But the CTRL+A is not working and i need to press many times the arrow >>>>> keys to set the pointer to the end of the word and then to press many >>>>> times BACKSPACE to delete the word. >>>>> >>>>> I know this is not so a big deal but if i do it many times is annoying. >>>>> >>>>> Is it possible to enable the SelectAll feature for any textbox or any >>>>> other control that contains text so to manage more fastest the strings? >>>>> >>>> ------------------------------------------------------------------------------ >>>> Centralized Desktop Delivery: Dell and VMware Reference Architecture >>>> Simplifying enterprise desktop deployment and management using >>>> Dell EqualLogic storage and VMware View: A highly scalable, end-to-end >>>> client virtualization framework. Read more! >>>> http://p.sf.net/sfu/dell-eql-dev2dev >>>> _______________________________________________ >>>> Gambas-user mailing list >>>> Gambas-user at lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>> >>> >>> ------------------------------------------------------------------------------ >>> Centralized Desktop Delivery: Dell and VMware Reference Architecture >>> Simplifying enterprise desktop deployment and management using >>> Dell EqualLogic storage and VMware View: A highly scalable, end-to-end >>> client virtualization framework. Read more! >>> http://p.sf.net/sfu/dell-eql-dev2dev >>> _______________________________________________ >>> Gambas-user mailing list >>> Gambas-user at lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>> >>> >>> >> >> ------------------------------------------------------------------------------ >> Centralized Desktop Delivery: Dell and VMware Reference Architecture >> Simplifying enterprise desktop deployment and management using >> Dell EqualLogic storage and VMware View: A highly scalable, end-to-end >> client virtualization framework. Read more! >> http://p.sf.net/sfu/dell-eql-dev2dev >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > ------------------------------------------------------------------------------ > Centralized Desktop Delivery: Dell and VMware Reference Architecture > Simplifying enterprise desktop deployment and management using > Dell EqualLogic storage and VMware View: A highly scalable, end-to-end > client virtualization framework. Read more! > http://p.sf.net/sfu/dell-eql-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From eilert-sprachen at ...221... Fri Nov 12 08:54:05 2010 From: eilert-sprachen at ...221... (Rolf-Werner Eilert) Date: Fri, 12 Nov 2010 08:54:05 +0100 Subject: [Gambas-user] SelectAll feature In-Reply-To: <1289526486.2233.38.camel@...2494...> References: <1289458914.2788.5.camel@...2493...> <4CDC485D.4050707@...221...> <1289506768.4878.1.camel@...2494...> <4CDC83DF.3060202@...169...> <1289526486.2233.38.camel@...2494...> Message-ID: <4CDCF29D.9010305@...221...> Let me add one thing: you could still use Shift + Pos1/End to select all. Everything you have to do is to first jump to the end or beginning of the line first: Pos1, then Shift+End OR End, then Shift+Pos1. But it remains that you do not get a cursor in the same field after clicking on another object. This is somewhat... well... :-) Am 12.11.2010 02:48, schrieb Demosthenes Koptsis: > i speak about the following: > > i am in IDE of Gambas2. > I click on a Button1 on my FMain. > I click on Name property. > The property is get focus and selects all text. > > If i click in gridview in text area and i want to select all again the > text of Name property is not possible. > > When i press CRTL+A the cursor goes at the beginning of the name as > shown in video but is not selecting the text. > > i type names or texts i make some mistakes and i need to delete the > whole text without taking my hands out of the keyboard. > To do so i was used to selectall the text with CTRL+A. > > See video. > http://www.mediafire.com/file/i9xtjiqqerdtiz4/gambas2-select_all.ogv > > The only way to select all the text is to click the Gridview at the > first column at "Name". > > How is it possible to select all by click and not by CTRL+A? > > Is this a Qt issue as Benoit said? > > > > On Fri, 2010-11-12 at 11:01 +1100, Michael wrote: >> I am using Gambas2 and the .SelectAll feature when a textbox gets focus. >> It works perfectly on my Ubuntu 64 bit. I am using the GB.qt components. >> Regards >> Mike >> >> On 12/11/10 07:19, Demosthenes Koptsis wrote: >>> The SelectAll is for the Gambas2 application, not a mine one. >>> >>> This feature is missing from Gambas2. >>> >>> On Thu, 2010-11-11 at 20:47 +0100, Matti wrote: >>>> If you want to do it via CTRL+A, you have to write a keypress event for the form: >>>> >>>> Public Sub Form_KeyPress() >>>> If Key.Code = Key["A"] And If Key.Control Then >>>> TextBox1.SelectAll >>>> Endif >>>> End >>>> >>>> And if you want to have the text selected automatically when the text box gets >>>> the focus, do: >>>> >>>> Public Sub TextBox1_GotFocus() >>>> TextBox1.SelectAll >>>> End >>>> >>>> >>>> Am 11.11.2010 08:01, schrieb Demosthenes Koptsis: >>>>> Good morning to all, >>>>> >>>>> While setting properties or any text that is in a textbox i wanted to >>>>> press CTRL+A to select all the word and then press BACKSPACE to delete >>>>> it and next to write a new one. >>>>> >>>>> But the CTRL+A is not working and i need to press many times the arrow >>>>> keys to set the pointer to the end of the word and then to press many >>>>> times BACKSPACE to delete the word. >>>>> >>>>> I know this is not so a big deal but if i do it many times is annoying. >>>>> >>>>> Is it possible to enable the SelectAll feature for any textbox or any >>>>> other control that contains text so to manage more fastest the strings? >>>>> >>>> ------------------------------------------------------------------------------ >>>> Centralized Desktop Delivery: Dell and VMware Reference Architecture >>>> Simplifying enterprise desktop deployment and management using >>>> Dell EqualLogic storage and VMware View: A highly scalable, end-to-end >>>> client virtualization framework. Read more! >>>> http://p.sf.net/sfu/dell-eql-dev2dev >>>> _______________________________________________ >>>> Gambas-user mailing list >>>> Gambas-user at lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>> >>> >>> ------------------------------------------------------------------------------ >>> Centralized Desktop Delivery: Dell and VMware Reference Architecture >>> Simplifying enterprise desktop deployment and management using >>> Dell EqualLogic storage and VMware View: A highly scalable, end-to-end >>> client virtualization framework. Read more! >>> http://p.sf.net/sfu/dell-eql-dev2dev >>> _______________________________________________ >>> Gambas-user mailing list >>> Gambas-user at lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>> >>> >>> >> >> ------------------------------------------------------------------------------ >> Centralized Desktop Delivery: Dell and VMware Reference Architecture >> Simplifying enterprise desktop deployment and management using >> Dell EqualLogic storage and VMware View: A highly scalable, end-to-end >> client virtualization framework. Read more! >> http://p.sf.net/sfu/dell-eql-dev2dev >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > ------------------------------------------------------------------------------ > Centralized Desktop Delivery: Dell and VMware Reference Architecture > Simplifying enterprise desktop deployment and management using > Dell EqualLogic storage and VMware View: A highly scalable, end-to-end > client virtualization framework. Read more! > http://p.sf.net/sfu/dell-eql-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From ihaywood at ...1979... Fri Nov 12 10:22:05 2010 From: ihaywood at ...1979... (Ian Haywood) Date: Fri, 12 Nov 2010 20:22:05 +1100 Subject: [Gambas-user] Installing gambas3 on LinuxMint In-Reply-To: <4CDB9069.4030503@...1904...> References: <4CDB9069.4030503@...1904...> Message-ID: On Thu, Nov 11, 2010 at 5:42 PM, Dr. Martin Senftleben wrote: > I want to install gambas3 on my LinuxMint machine (64bit), but it > doesn't work, the gambas3-gb-db-mysql package cannot be installed, > because it requires libmysqlclient15off, which is not available. I have > libmysqlclient16 on the system, and libmysqlclient15off is not on the > list of installable packages. > > Any ideas? Where are you getting these packages from? if they are mine, then the issue is they are compiled against an older version of Ubuntu than what you are using One solution is to compile gambas3 yourself. Another is for me to release some packages for newer versions of Ubuntu ;-) I can do this mid next week if you want. Ian From demosthenesk at ...626... Fri Nov 12 12:57:06 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Fri, 12 Nov 2010 13:57:06 +0200 Subject: [Gambas-user] SelectAll feature In-Reply-To: <4CDCF16C.7050502@...221...> References: <1289458914.2788.5.camel@...2493...> <4CDC485D.4050707@...221...> <1289506768.4878.1.camel@...2494...> <4CDC83DF.3060202@...169...> <1289526486.2233.38.camel@...2494...> <4CDCF16C.7050502@...221...> Message-ID: <1289563026.12121.57.camel@...2494...> On Fri, 2010-11-12 at 08:49 +0100, Rolf-Werner Eilert wrote: Ok, SHIFT+END works like CTRL+A but only if cursor is at the beginning of the text. if cursor is in the middle of the text selects from the positions until the end. See video. http://www.youtube.com/watch?v=ijlTiX7mEfg i think these keys combination would be better if it was CTRL+A. It is more rapid for the use of left hand. CTRL+A buttons are very near than buttons SHIFT+END. > Let me add one thing: you could still use Shift + Pos1/End to select > all. Everything you have to do is to first jump to the end or beginning > of the line first: Pos1, then Shift+End OR End, then Shift+Pos1. From jussi.lahtinen at ...626... Fri Nov 12 16:18:29 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Fri, 12 Nov 2010 17:18:29 +0200 Subject: [Gambas-user] Elusive Gambas3 crashing bug In-Reply-To: <201011112153.30485.gambas@...1...> References: <201011112153.30485.gambas@...1...> Message-ID: > I will look at the log, but I don't understand what you did *exactly* to > get > the crash. > That is why I wrote "elusive"... I can't figure out what exactly causes this crash. But copy&paste this to IDE console; ? bin(rol(1073741784+ shl(9,2) + shr(24,3),X ),32) Then replace X with some random number and hit enter, example: ? bin(rol(1073741784+ shl(9,2) + shr(24,3),2 ),32) Normally you get; 11111111111111111111111111111100 But sometimes you get crash. More usually crash occurs when you repeat this many times, and then click on editor. This is as far as I can isolated this problem right now. Jussi From demosthenesk at ...626... Fri Nov 12 16:23:33 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Fri, 12 Nov 2010 17:23:33 +0200 Subject: [Gambas-user] Gambas3 compilation error - svn 3290 Message-ID: <1289575413.6788.1.camel@...2493...> I try to compile Gambas3 svn3290 in Ubuntu 10.04 and i get this error. main.cpp:31:25: error: cwebhittest.h: No such file or directory main.cpp:44: error: ?CWebHitTestDesc? was not declared in this scope make[5]: *** [main.lo] Error 1 make[5]: Leaving directory `/home/user/Downloads/Gambas/gambas3-svn3290/gb.qt4/src/webkit' make[4]: *** [all-recursive] Error 1 make[4]: Leaving directory `/home/user/Downloads/Gambas/gambas3-svn3290/gb.qt4/src' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/home/user/Downloads/Gambas/gambas3-svn3290/gb.qt4' make[2]: *** [all] Error 2 make[2]: Leaving directory `/home/user/Downloads/Gambas/gambas3-svn3290/gb.qt4' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/user/Downloads/Gambas/gambas3-svn3290' make: *** [all] Error 2 -- Regards, Demosthenes Koptsis. From gambas at ...1... Fri Nov 12 16:30:16 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Fri, 12 Nov 2010 16:30:16 +0100 Subject: [Gambas-user] Gambas3 compilation error - svn 3290 In-Reply-To: <1289575413.6788.1.camel@...2493...> References: <1289575413.6788.1.camel@...2493...> Message-ID: <201011121630.16242.gambas@...1...> > I try to compile Gambas3 svn3290 in Ubuntu 10.04 and i get this error. > > main.cpp:31:25: error: cwebhittest.h: No such file or directory > main.cpp:44: error: ?CWebHitTestDesc? was not declared in this scope > make[5]: *** [main.lo] Error 1 > make[5]: Leaving directory > `/home/user/Downloads/Gambas/gambas3-svn3290/gb.qt4/src/webkit' > make[4]: *** [all-recursive] Error 1 > make[4]: Leaving directory > `/home/user/Downloads/Gambas/gambas3-svn3290/gb.qt4/src' > make[3]: *** [all-recursive] Error 1 > make[3]: Leaving directory > `/home/user/Downloads/Gambas/gambas3-svn3290/gb.qt4' > make[2]: *** [all] Error 2 > make[2]: Leaving directory > `/home/user/Downloads/Gambas/gambas3-svn3290/gb.qt4' > make[1]: *** [all-recursive] Error 1 > make[1]: Leaving directory `/home/user/Downloads/Gambas/gambas3-svn3290' > make: *** [all] Error 2 Oops. Try again with revision #3291... -- Beno?t Minisini From jussi.lahtinen at ...626... Fri Nov 12 19:25:39 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Fri, 12 Nov 2010 20:25:39 +0200 Subject: [Gambas-user] Elusive Gambas3 crashing bug In-Reply-To: References: <201011112153.30485.gambas@...1...> Message-ID: More from GambasTester project.... A. According to documentation these functions are same: Debug Ang(-1, 1) Debug ATan2(-1, 1) 2.35619449019235 -0.785398163397448 So, Atan2 seems to make errors. B. Cos(ACos(0.5)) = 0.5 and Tan(ATan(0.5)) = 0.5 are False! Tan(ATan(0.5)) - 0.5 gives 1E-16, so this is seems to be precision problem. Is this OK? Jussi On Fri, Nov 12, 2010 at 17:18, Jussi Lahtinen wrote: > > I will look at the log, but I don't understand what you did *exactly* to >> get >> the crash. >> > > That is why I wrote "elusive"... I can't figure out what exactly causes > this crash. > But copy&paste this to IDE console; > > ? bin(rol(1073741784+ shl(9,2) + shr(24,3),X ),32) > > Then replace X with some random number and hit enter, example: > ? bin(rol(1073741784+ shl(9,2) + shr(24,3),2 ),32) > Normally you get; > 11111111111111111111111111111100 > But sometimes you get crash. > More usually crash occurs when you repeat this many times, and then click > on editor. > > This is as far as I can isolated this problem right now. > > Jussi > From demosthenesk at ...626... Fri Nov 12 19:42:28 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Fri, 12 Nov 2010 20:42:28 +0200 Subject: [Gambas-user] Gambas3 svn3291, checkinstall error Message-ID: <1289587349.1206.10.camel@...2493...> Hi, i try to install gambas3 with checkinstall after successfully compiling. i get this errors: ~/Downloads/Gambas/gambas3-svn3291$ sudo dpkg -i gambas3_svn3291-1_amd64.deb (Reading database ... 289880 files and directories currently installed.) Unpacking gambas3 (from gambas3_svn3291-1_amd64.deb) ... dpkg: error processing gambas3_svn3291-1_amd64.deb (--install): trying to overwrite '/usr/share/icons/hicolor/icon-theme.cache', which is also in package gambas2-2.21 0:svn3289-1 dpkg-deb: subprocess paste killed by signal (Broken pipe) Processing triggers for hicolor-icon-theme ... Errors were encountered while processing: gambas3_svn3291-1_amd64.deb But with sudo make install worked! -- Regards, Demosthenes Koptsis. From gambas at ...1... Fri Nov 12 20:01:23 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Fri, 12 Nov 2010 20:01:23 +0100 Subject: [Gambas-user] Elusive Gambas3 crashing bug In-Reply-To: References: <201011112153.30485.gambas@...1...> Message-ID: <201011122001.23752.gambas@...1...> > > I will look at the log, but I don't understand what you did *exactly* to > > get > > the crash. > > That is why I wrote "elusive"... I can't figure out what exactly causes > this crash. > But copy&paste this to IDE console; > ? bin(rol(1073741784+ shl(9,2) + shr(24,3),X ),32) > > Then replace X with some random number and hit enter, example: > ? bin(rol(1073741784+ shl(9,2) + shr(24,3),2 ),32) > Normally you get; > 11111111111111111111111111111100 > But sometimes you get crash. > More usually crash occurs when you repeat this many times, and then click > on editor. > > This is as far as I can isolated this problem right now. > > Jussi Sorry, I couldn't reproduce the crash... Maybe there is something in the all context you didn't tell me. :-/ -- Beno?t Minisini From gambas at ...1... Fri Nov 12 20:04:12 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Fri, 12 Nov 2010 20:04:12 +0100 Subject: [Gambas-user] Elusive Gambas3 crashing bug In-Reply-To: References: Message-ID: <201011122004.12444.gambas@...1...> > More from GambasTester project.... > > > A. > > According to documentation these functions are same: > Debug Ang(-1, 1) > Debug ATan2(-1, 1) > > 2.35619449019235 > -0.785398163397448 > > So, Atan2 seems to make errors. The documentation is not accurate enough. Ang() and ATan2() are the same functions, except that their arguments are inverted! > > > B. > > Cos(ACos(0.5)) = 0.5 and Tan(ATan(0.5)) = 0.5 are False! > Tan(ATan(0.5)) - 0.5 gives 1E-16, so this is seems to be precision problem. > Is this OK? Yes. You often have precision problems with floating numbers. I have the plan to use the "==" operator to implement a floating point comparison that would ignore the unsignificant digits, but I must find the good algorithm first. Regards, -- Beno?t Minisini From jussi.lahtinen at ...626... Fri Nov 12 20:36:24 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Fri, 12 Nov 2010 21:36:24 +0200 Subject: [Gambas-user] Elusive Gambas3 crashing bug In-Reply-To: <201011122004.12444.gambas@...1...> References: <201011122004.12444.gambas@...1...> Message-ID: I'll send my whole project to you later. According to documentation this should yield True. ? IsBlank(" \\t") I got always False... BTW. I'll check all math functions against wolfram|Alpha, so sometimes I'm not sure where to put limit of acceptable accuracy. Jussi 2010/11/12 Beno?t Minisini > > More from GambasTester project.... > > > > > > A. > > > > According to documentation these functions are same: > > Debug Ang(-1, 1) > > Debug ATan2(-1, 1) > > > > 2.35619449019235 > > -0.785398163397448 > > > > So, Atan2 seems to make errors. > > The documentation is not accurate enough. Ang() and ATan2() are the same > functions, except that their arguments are inverted! > > > > > > > B. > > > > Cos(ACos(0.5)) = 0.5 and Tan(ATan(0.5)) = 0.5 are False! > > Tan(ATan(0.5)) - 0.5 gives 1E-16, so this is seems to be precision > problem. > > Is this OK? > > Yes. You often have precision problems with floating numbers. > > I have the plan to use the "==" operator to implement a floating point > comparison that would ignore the unsignificant digits, but I must find the > good algorithm first. > > Regards, > > -- > Beno?t Minisini > > > ------------------------------------------------------------------------------ > Centralized Desktop Delivery: Dell and VMware Reference Architecture > Simplifying enterprise desktop deployment and management using > Dell EqualLogic storage and VMware View: A highly scalable, end-to-end > client virtualization framework. Read more! > http://p.sf.net/sfu/dell-eql-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas at ...1... Fri Nov 12 21:05:44 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Fri, 12 Nov 2010 21:05:44 +0100 Subject: [Gambas-user] Elusive Gambas3 crashing bug In-Reply-To: References: <201011122004.12444.gambas@...1...> Message-ID: <201011122105.44972.gambas@...1...> > I'll send my whole project to you later. > > According to documentation this should yield True. > ? IsBlank(" \\t") > I got always False... It's a typo mistake. Read: IsBlank(" \t") > > BTW. I'll check all math functions against wolfram|Alpha, > so sometimes I'm not sure where to put limit of acceptable accuracy. > > Jussi > What's "wolfram|Alpha" ? -- Beno?t Minisini From jussi.lahtinen at ...626... Fri Nov 12 22:44:52 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Fri, 12 Nov 2010 23:44:52 +0200 Subject: [Gambas-user] Elusive Gambas3 crashing bug In-Reply-To: <201011122105.44972.gambas@...1...> References: <201011122004.12444.gambas@...1...> <201011122105.44972.gambas@...1...> Message-ID: > > I'll send my whole project to you later. > > > > According to documentation this should yield True. > > ? IsBlank(" \\t") > > I got always False... > > It's a typo mistake. Read: IsBlank(" \t") > OK. > > > > BTW. I'll check all math functions against wolfram|Alpha, > > so sometimes I'm not sure where to put limit of acceptable accuracy. > > > > Jussi > > > > What's "wolfram|Alpha" ? > Handy tool... http://www.wolframalpha.com/ Jussi From gambas at ...1... Sat Nov 13 02:01:17 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sat, 13 Nov 2010 02:01:17 +0100 Subject: [Gambas-user] Gambas 3 Grid/Table question In-Reply-To: <4CDA7201.9040007@...221...> References: <4CDA5391.8090305@...221...> <4CDA7201.9040007@...221...> Message-ID: <201011130201.17405.gambas@...1...> > Sorry, I was kinda tired this morning :-) > > There is a linewrap in the Gridview even with Gambas 2, but it is a > default (at least I have not yet found a way to deactivate it) and it > does not by itself adjust the line height appropriately. > > So the question would have to be: Is there a more specific way to define > this in Gambas 3? For instance: > > Tableview1.Columns[3].WordWrap = TRUE > Tableview1.Columns[3].Width = 125 > Tableview1.AdjustRowHeight = TRUE > > would activate wordwrap for column 3, define a width of 125 px for this > column and start automatic row height adjusting for the whole table... > Maybe this would make sense for single rows? Then > > Tableview1.Rows[2].AdjustRowHeight = TRUE > > would be good, but I can't imagine a case where this might be good. > > Regards > > Rolf > In Gambas 3, WordWrap is a property attached to the cell. And to adjust the width of a row or a column, you must set its height (or width) to "-1". But, if I remember well, it is not implemented in gb.gtk yet. Maybe a WordWrap property at the column level may be useful then? -- Beno?t Minisini From gambas at ...1... Sat Nov 13 02:15:03 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sat, 13 Nov 2010 02:15:03 +0100 Subject: [Gambas-user] Under construction or bug? In-Reply-To: References: Message-ID: <201011130215.03359.gambas@...1...> > Help line feature seems not to work correctly with recent revision. > If I type: > Dim test as someclass > > test.somevariabl... I always get "No help found". > > Gambas 3 rev 3265 @Ubuntu 10.04 64bit > > Jussi That bug should be fixed in revision #3293. Regards, -- Beno?t Minisini From arosa at ...2168... Sat Nov 13 10:21:21 2010 From: arosa at ...2168... (Toni Rosa) Date: Sat, 13 Nov 2010 10:21:21 +0100 (Hora estándar romance) Subject: [Gambas-user] CDE. An interesting packaging tool Message-ID: <.77.224.23.61.1289640081.squirrel@...2402...> Hi Gambas List, It's been a while since I last posted here. I came across this nice project: CDE (http://stanford.edu/~pgbovine/cde.html) and I thought of Gambas. It is a really interesting automatic packaging tool to share applications among different Linux distributions... It does so by analysing runtime dependencies and creating a package with them all in it. It *might* be a nice addition to Gambas, which is already an amazing tool but has always had some difficulties having all the distribution packages up-to-date, making the portability among different Linux-es not as smooth as we all would like for our Gambas-powered applications... Regards, Toni From soleilpqd at ...626... Sat Nov 13 13:37:17 2010 From: soleilpqd at ...626... (=?UTF-8?B?UGjhuqFtIFF1YW5nIETGsMahbmc=?=) Date: Sat, 13 Nov 2010 19:37:17 +0700 Subject: [Gambas-user] Display & character on Message box Message-ID: Hi, How to display '&' character? I tried: Message.Info("&") Message.Info("&&") Message.Info(chr(38)) Message.Info("&abc") Message.Info("abc &") And got empty message box. From linuxos at ...1896... Sat Nov 13 13:44:48 2010 From: linuxos at ...1896... (Olivier Cruilles) Date: Sat, 13 Nov 2010 13:44:48 +0100 Subject: [Gambas-user] Display & character on Message box In-Reply-To: References: Message-ID: <51BE7D4A-1142-4DCF-83F9-AB061EBF00C4@...1896...> Hi On Gambas v2 > Message.Info("&") => work fine and display '&' correctly on screen.. Olivier Cruilles Mail: linuxos at ...1896... Le 13 nov. 2010 ? 13:37, Ph?m Quang D??ng a ?crit : > > Hi, > > How to display '&' character? I tried: > > Message.Info("&") > Message.Info("&&") > Message.Info(chr(38)) > Message.Info("&abc") > Message.Info("abc &") > > And got empty message box. > ------------------------------------------------------------------------------ > Centralized Desktop Delivery: Dell and VMware Reference Architecture > Simplifying enterprise desktop deployment and management using > Dell EqualLogic storage and VMware View: A highly scalable, end-to-end > client virtualization framework. Read more! > http://p.sf.net/sfu/dell-eql-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From demosthenesk at ...626... Sat Nov 13 18:00:25 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Sat, 13 Nov 2010 19:00:25 +0200 Subject: [Gambas-user] CDE. An interesting packaging tool In-Reply-To: <.77.224.23.61.1289640081.squirrel@...2402...> References: <.77.224.23.61.1289640081.squirrel@...2402...> Message-ID: <1289667625.3212.2.camel@...2494...> Very very nice program indeed! I was looking something like that to make installation packages for my Gambas projects that include libs of Gambas and able to run without the whole IDE or the whole language. Another thing is that every package is self independent from system libs or other installations! On Sat, 2010-11-13 at 10:21 +0100, Toni Rosa wrote: > Hi Gambas List, > It's been a while since I last posted here. > I came across this nice project: CDE > (http://stanford.edu/~pgbovine/cde.html) and I thought of Gambas. It is a > really interesting automatic packaging tool to share applications among > different Linux distributions... It does so by analysing runtime > dependencies and creating a package with them all in it. > It *might* be a nice addition to Gambas, which is already an amazing tool > but has always had some difficulties having all the distribution packages > up-to-date, making the portability among different Linux-es not as smooth > as we all would like for our Gambas-powered applications... > Regards, > Toni > > > ------------------------------------------------------------------------------ > Centralized Desktop Delivery: Dell and VMware Reference Architecture > Simplifying enterprise desktop deployment and management using > Dell EqualLogic storage and VMware View: A highly scalable, end-to-end > client virtualization framework. Read more! > http://p.sf.net/sfu/dell-eql-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From demosthenesk at ...626... Sat Nov 13 18:13:20 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Sat, 13 Nov 2010 19:13:20 +0200 Subject: [Gambas-user] Display & character on Message box In-Reply-To: <51BE7D4A-1142-4DCF-83F9-AB061EBF00C4@...1896...> References: <51BE7D4A-1142-4DCF-83F9-AB061EBF00C4@...1896...> Message-ID: <1289668400.3212.4.camel@...2494...> On gambas2-2.21-svn3289 Message.Info("&") is not working! Message is empty. On Sat, 2010-11-13 at 13:44 +0100, Olivier Cruilles wrote: > Hi > > On Gambas v2 > > > Message.Info("&") => work fine > > and display '&' correctly on screen.. > > > Olivier Cruilles > Mail: linuxos at ...1896... > > Le 13 nov. 2010 ? 13:37, Ph?m Quang D??ng a ?crit : > > > > > Hi, > > > > How to display '&' character? I tried: > > > > Message.Info("&") > > Message.Info("&&") > > Message.Info(chr(38)) > > Message.Info("&abc") > > Message.Info("abc &") > > > > And got empty message box. > > ------------------------------------------------------------------------------ > > Centralized Desktop Delivery: Dell and VMware Reference Architecture > > Simplifying enterprise desktop deployment and management using > > Dell EqualLogic storage and VMware View: A highly scalable, end-to-end > > client virtualization framework. Read more! > > http://p.sf.net/sfu/dell-eql-dev2dev > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > > > ------------------------------------------------------------------------------ > Centralized Desktop Delivery: Dell and VMware Reference Architecture > Simplifying enterprise desktop deployment and management using > Dell EqualLogic storage and VMware View: A highly scalable, end-to-end > client virtualization framework. Read more! > http://p.sf.net/sfu/dell-eql-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From jussi.lahtinen at ...626... Sat Nov 13 18:36:05 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sat, 13 Nov 2010 19:36:05 +0200 Subject: [Gambas-user] Elusive Gambas3 crashing bug In-Reply-To: References: <201011122004.12444.gambas@...1...> <201011122105.44972.gambas@...1...> Message-ID: More... Dim TestSingle As Single Dim pp As Pointer TestSingle = 33.1 pp = VarPtr(TestSingle) SinglePtr(pp) = 33.1 is False! Gives -2... Jussi On Fri, Nov 12, 2010 at 23:44, Jussi Lahtinen wrote: > > > I'll send my whole project to you later. >> > >> > According to documentation this should yield True. >> > ? IsBlank(" \\t") >> > I got always False... >> >> It's a typo mistake. Read: IsBlank(" \t") >> > > OK. > > >> > >> > BTW. I'll check all math functions against wolfram|Alpha, >> > so sometimes I'm not sure where to put limit of acceptable accuracy. >> > >> > Jussi >> > >> >> What's "wolfram|Alpha" ? >> > > Handy tool... > http://www.wolframalpha.com/ > > Jussi > From demosthenesk at ...626... Sat Nov 13 19:03:26 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Sat, 13 Nov 2010 20:03:26 +0200 Subject: [Gambas-user] CDE. An interesting packaging tool In-Reply-To: <.77.224.23.61.1289640081.squirrel@...2402...> References: <.77.224.23.61.1289640081.squirrel@...2402...> Message-ID: <1289671406.29698.8.camel@...2494...> i was thinking this before a couple of days. i was thinking how is it possible to make a package of a gambas project with all necessary libs but not all the Gambas IDE or Gambas language. And more, to package these files in a chroot like way, so to install the package in /opt independently. for example to have a package MyProject in /opt like /opt /MyProject /libs /bin myproject.gambas ... CDE looks like to do something like that. i test it in some of my projects but had no good results i dont know why. On Sat, 2010-11-13 at 10:21 +0100, Toni Rosa wrote: > Hi Gambas List, > It's been a while since I last posted here. > I came across this nice project: CDE > (http://stanford.edu/~pgbovine/cde.html) and I thought of Gambas. It is a > really interesting automatic packaging tool to share applications among > different Linux distributions... It does so by analysing runtime > dependencies and creating a package with them all in it. > It *might* be a nice addition to Gambas, which is already an amazing tool > but has always had some difficulties having all the distribution packages > up-to-date, making the portability among different Linux-es not as smooth > as we all would like for our Gambas-powered applications... > Regards, > Toni > > > ------------------------------------------------------------------------------ > Centralized Desktop Delivery: Dell and VMware Reference Architecture > Simplifying enterprise desktop deployment and management using > Dell EqualLogic storage and VMware View: A highly scalable, end-to-end > client virtualization framework. Read more! > http://p.sf.net/sfu/dell-eql-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From mohareve at ...626... Sat Nov 13 20:17:49 2010 From: mohareve at ...626... (M. Cs.) Date: Sat, 13 Nov 2010 14:17:49 -0500 Subject: [Gambas-user] CDE. An interesting packaging tool In-Reply-To: <1289671406.29698.8.camel@...2494...> References: <.77.224.23.61.1289640081.squirrel@...2402...> <1289671406.29698.8.camel@...2494...> Message-ID: Although I'm not a gambas developer, I appreciate the idea. I would prefer to have all the must-haves packaged into single file, instead of fighting with unresolved package dependencies. It's better to have a myprogram.bin installer, than myprogram.rpm, myprogram.deb... Maybe Benoit would argue because of the package size. It's more like Windows. But who cares. If I'd be sure my program will run independently of the Linux platform flavor, I'd yes to size increment. Csaba From mdavies5 at ...169... Sun Nov 14 04:54:35 2010 From: mdavies5 at ...169... (Michael) Date: Sun, 14 Nov 2010 14:54:35 +1100 Subject: [Gambas-user] Problem with data types In-Reply-To: <201011130201.17405.gambas@...1...> References: <4CDA5391.8090305@...221...> <4CDA7201.9040007@...221...> <201011130201.17405.gambas@...1...> Message-ID: <4CDF5D7B.2030904@...169...> I am porting all my vb.net apps to gambas and I am very happy with the results, particularly the gb.db component. However it does have some limitations: 1. I need to determine the type of database columns using irsData.Fields[intCounter].Type. This works fine for strings, floats, integers and dates but many MySql data types such as 'Decimal' are seen as db.String(9). 2. I thought I would test if it was really a string by using the ResultField.Length property which should return zero for non-strings but it returned 19 for a Decimal(18,0) field in my database. I overcame the problem by changing all my MySql decimal fields to floats and it works fine. However there may be other MySql types which I have not tested and which may have a similar problem. Are there any plans to update gb.db to handle the many data types now available in most databases? Regards Mike From hiems at ...2501... Sun Nov 14 10:19:58 2010 From: hiems at ...2501... (NW) Date: Sun, 14 Nov 2010 09:19:58 +0000 Subject: [Gambas-user] Project - Make ... Message-ID: <20101114091958.41161303.hiems@...2501...> Can anyone help me with the difference between Project --> Make --> Source Archive and Project --> Make --> Installation Package please? I think that the installation package is aimed at setting up a usable Gambas program for someone who does not have Gambas installed. Is that correct? If so, what is the purpose of source archive? I have done some research via Google but am more confused than before. Thanks Neil From doriano.blengino at ...1909... Sun Nov 14 10:46:37 2010 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Sun, 14 Nov 2010 10:46:37 +0100 Subject: [Gambas-user] Project - Make ... In-Reply-To: <20101114091958.41161303.hiems@...2501...> References: <20101114091958.41161303.hiems@...2501...> Message-ID: <4CDFAFFD.6010108@...1909...> NW ha scritto: > Can anyone help me with the difference between Project --> Make --> Source Archive and Project --> Make --> Installation Package please? I think that the installation package is aimed at setting up a usable Gambas program for someone who does not have Gambas installed. Is that correct? > > If so, what is the purpose of source archive? I have done some research via Google but am more confused than before. > "Make installation package" builds an installable package of the program binaries; so you can distribuite your program (without sources). After you build, say, an RPM package, you can install your program on any machine having RPM system using "rpm -i blahblahblah" - even the dependencies are taken in account. "Make source archive" does what its name implies: an archive (.tar.gz) containing the source of the program. It is useful for doing backups or share your sources with other people (you can see often in this list someone who attaches an archive to show others what the problem is: "send me your project" - "I attach a project which ..."). When you have an archive like this, "mytestproject-0.0.1.tar.gz", you extract it somewhere, and then you can open the project in the gambas IDE. An installation package lets you run the program, but not to see/modify its internals; a source archive (or tarball) contains everything needed to revise, modify and compile the program, provided you have the needed tools (gambas compiler). More about the source archive. As far as I know, gambas is the only one IDE which has a similar feature. Differently from other languages, it is not so clear what the various files in a project directory do. If one wanted to manually copy "the sources", he should try to analyze the single files (some of them are hidden) to decide what to include in the archive and what to exclude. The "Make source archive" function takes care of this: who, if not gambas itself, knows better what is part of the source and what is not? Hope this is clear, regards, -- Doriano Blengino "Listen twice before you speak. This is why we have two ears, but only one mouth." From gambas at ...1... Sun Nov 14 12:05:08 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sun, 14 Nov 2010 12:05:08 +0100 Subject: [Gambas-user] Problem with data types In-Reply-To: <4CDF5D7B.2030904@...169...> References: <4CDA5391.8090305@...221...> <201011130201.17405.gambas@...1...> <4CDF5D7B.2030904@...169...> Message-ID: <201011141205.08277.gambas@...1...> > I am porting all my vb.net apps to gambas and I am very happy with the > results, particularly the gb.db component. However it does have some > limitations: > 1. I need to determine the type of database columns using > irsData.Fields[intCounter].Type. This works fine for strings, floats, > integers and dates but many MySql data types such as 'Decimal' are seen > as db.String(9). > 2. I thought I would test if it was really a string by using the > ResultField.Length property which should return zero for non-strings but > it returned 19 for a Decimal(18,0) field in my database. > > I overcame the problem by changing all my MySql decimal fields to floats > and it works fine. However there may be other MySql types which I have > not tested and which may have a similar problem. Are there any plans to > update gb.db to handle the many data types now available in most databases? > > Regards > Mike > Yes and no. SQL datatypes are mapped to Gambas datatypes, so you don't see them. Moreover, the gb.db component aims at being independent of the database backend. And as SQL is not really a standard, datatypes are different between MySQL, PostgreSQL, SQLite..., and so it is impossible to manage them in an independant way. You will get more information about datatype mapping there: http://gambasdoc.org/help/doc/db-type-mapping On the other hand, David Villalobos Cambronero has wrote a component named "gb.mysql" that allows you to access all specific MySQL features. But I have never used it, so he will help you better than me about that. Regards, -- Beno?t Minisini From gambas at ...1... Sun Nov 14 12:06:23 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sun, 14 Nov 2010 12:06:23 +0100 Subject: [Gambas-user] Display & character on Message box In-Reply-To: <1289668400.3212.4.camel@...2494...> References: <51BE7D4A-1142-4DCF-83F9-AB061EBF00C4@...1896...> <1289668400.3212.4.camel@...2494...> Message-ID: <201011141206.23221.gambas@...1...> > On gambas2-2.21-svn3289 > > Message.Info("&") > > is not working! > > Message is empty. > Mmm. Maybe now Qt interprets it as pure HTML, or a text mnenomic... Try: Message.Info("&&") And: Message.Info("&") Regards, -- Beno?t Minisini From gambas at ...1... Sun Nov 14 12:17:33 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sun, 14 Nov 2010 12:17:33 +0100 Subject: [Gambas-user] CDE. An interesting packaging tool In-Reply-To: References: <.77.224.23.61.1289640081.squirrel@...2402...> <1289671406.29698.8.camel@...2494...> Message-ID: <201011141217.33773.gambas@...1...> > Although I'm not a gambas developer, I appreciate the idea. I would prefer > to have all the must-haves packaged into single file, instead of fighting > with unresolved package dependencies. It's better to have a myprogram.bin > installer, than myprogram.rpm, myprogram.deb... Maybe Benoit would argue > because of the package size. It's more like Windows. But who cares. If I'd > be sure my program will run independently of the Linux platform flavor, I'd > yes to size increment. > > Csaba This is exactly what Cristian Abarzua F. (craf) tried to achieve. But it did it by hand, I tried to help him, but we encountered problems. Apparently 'cde' seems to work, so I should try it and integrate it inside the IDE packager. So, no I'm not fully against that kind of package now. Except that users should be aware of the following: - They will be bigger (imagine a full Gambas GUI program relying of a lot of components). - System security fix and updates won't apply to them. So packagers must regularly repackage them. (Same nightmare as in windows). Regards, -- Beno?t Minisini From gambas at ...1... Sun Nov 14 12:22:33 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sun, 14 Nov 2010 12:22:33 +0100 Subject: [Gambas-user] CDE. An interesting packaging tool In-Reply-To: <201011141217.33773.gambas@...1...> References: <.77.224.23.61.1289640081.squirrel@...2402...> <201011141217.33773.gambas@...1...> Message-ID: <201011141222.33813.gambas@...1...> > > Although I'm not a gambas developer, I appreciate the idea. I would > > prefer to have all the must-haves packaged into single file, instead of > > fighting with unresolved package dependencies. It's better to have a > > myprogram.bin installer, than myprogram.rpm, myprogram.deb... Maybe > > Benoit would argue because of the package size. It's more like Windows. > > But who cares. If I'd be sure my program will run independently of the > > Linux platform flavor, I'd yes to size increment. > > > > Csaba > > This is exactly what Cristian Abarzua F. (craf) tried to achieve. But it > did it by hand, I tried to help him, but we encountered problems. > > Apparently 'cde' seems to work, so I should try it and integrate it inside > the IDE packager. > > So, no I'm not fully against that kind of package now. Except that users > should be aware of the following: > > - They will be bigger (imagine a full Gambas GUI program relying of a lot > of components). > > - System security fix and updates won't apply to them. So packagers must > regularly repackage them. (Same nightmare as in windows). > > Regards, Another possible problem: Gambas can load a component during the execution of a program (Component.Load() method), not necesarilly at startup. So you must take that into account when making a cde package! Moreover, some component uses that feature. For example, the Gambas 3 gb.form.stock hidden component included a full stock of icons that is loaded only if an icon is not found in the Gnome or KDE icon themes installed on the system (which is very possible if you didn't install both Gnome and KDE). Regards, -- Beno?t Minisini From gambas at ...1... Sun Nov 14 12:43:43 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sun, 14 Nov 2010 12:43:43 +0100 Subject: [Gambas-user] CDE. An interesting packaging tool In-Reply-To: <201011141222.33813.gambas@...1...> References: <.77.224.23.61.1289640081.squirrel@...2402...> <201011141217.33773.gambas@...1...> <201011141222.33813.gambas@...1...> Message-ID: <201011141243.43859.gambas@...1...> > > > Although I'm not a gambas developer, I appreciate the idea. I would > > > prefer to have all the must-haves packaged into single file, instead of > > > fighting with unresolved package dependencies. It's better to have a > > > myprogram.bin installer, than myprogram.rpm, myprogram.deb... Maybe > > > Benoit would argue because of the package size. It's more like Windows. > > > But who cares. If I'd be sure my program will run independently of the > > > Linux platform flavor, I'd yes to size increment. > > > > > > Csaba > > > > This is exactly what Cristian Abarzua F. (craf) tried to achieve. But it > > did it by hand, I tried to help him, but we encountered problems. > > > > Apparently 'cde' seems to work, so I should try it and integrate it > > inside the IDE packager. > > > > So, no I'm not fully against that kind of package now. Except that users > > should be aware of the following: > > > > - They will be bigger (imagine a full Gambas GUI program relying of a lot > > of components). > > > > - System security fix and updates won't apply to them. So packagers must > > regularly repackage them. (Same nightmare as in windows). > > > > Regards, > > Another possible problem: Gambas can load a component during the execution > of a program (Component.Load() method), not necesarilly at startup. So you > must take that into account when making a cde package! > > Moreover, some component uses that feature. For example, the Gambas 3 > gb.form.stock hidden component included a full stock of icons that is > loaded only if an icon is not found in the Gnome or KDE icon themes > installed on the system (which is very possible if you didn't install both > Gnome and KDE). > > Regards, Another problem again: cde will store in the packages *all* existing files opened by the program during its execution. Maybe I should take the source code of 'cde' and modify it to only store the shared libraries? -- Beno?t Minisini From doriano.blengino at ...1909... Sun Nov 14 13:47:19 2010 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Sun, 14 Nov 2010 13:47:19 +0100 Subject: [Gambas-user] CDE. An interesting packaging tool In-Reply-To: <201011141217.33773.gambas@...1...> References: <.77.224.23.61.1289640081.squirrel@...2402...> <1289671406.29698.8.camel@...2494...> <201011141217.33773.gambas@...1...> Message-ID: <4CDFDA57.3000805@...1909...> Beno?t Minisini ha scritto: >> Although I'm not a gambas developer, I appreciate the idea. I would prefer >> to have all the must-haves packaged into single file, instead of fighting >> with unresolved package dependencies. It's better to have a myprogram.bin >> installer, than myprogram.rpm, myprogram.deb... Maybe Benoit would argue >> because of the package size. It's more like Windows. But who cares. If I'd >> be sure my program will run independently of the Linux platform flavor, I'd >> yes to size increment. >> >> Csaba >> > > This is exactly what Cristian Abarzua F. (craf) tried to achieve. But it did > it by hand, I tried to help him, but we encountered problems. > > Apparently 'cde' seems to work, so I should try it and integrate it inside the > IDE packager. > > So, no I'm not fully against that kind of package now. Except that users > should be aware of the following: > > - They will be bigger (imagine a full Gambas GUI program relying of a lot of > components). > > - System security fix and updates won't apply to them. So packagers must > regularly repackage them. (Same nightmare as in windows). > I add a simple thought: shared libraries are a nice and fundamental concept in operating systems... if only they worked the way they should. Problems about shared libraries are *not* gambas problems - they are operating system ones. Trying to solve this issue in an improper manner can (and probably will) lead to add problems to problems. From a pure, theoretical point of view, this idea is really wrong, as it intereferes heavily with a beatiful concept. That said, anyone is free to interefere as much as wanted... eventually with success... Regards, -- Doriano Blengino "Listen twice before you speak. This is why we have two ears, but only one mouth." From jussi.lahtinen at ...626... Sun Nov 14 14:02:30 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sun, 14 Nov 2010 15:02:30 +0200 Subject: [Gambas-user] Elusive Gambas3 crashing bug In-Reply-To: References: <201011122004.12444.gambas@...1...> <201011122105.44972.gambas@...1...> Message-ID: More... ? Week("07/24/2005") 30 Should be 29. Jussi On Sat, Nov 13, 2010 at 19:36, Jussi Lahtinen wrote: > More... > > Dim TestSingle As Single > Dim pp As Pointer > > TestSingle = 33.1 > pp = VarPtr(TestSingle) > > SinglePtr(pp) = 33.1 is False! Gives -2... > > > Jussi > > > > > > On Fri, Nov 12, 2010 at 23:44, Jussi Lahtinen wrote: > >> >> > I'll send my whole project to you later. >>> > >>> > According to documentation this should yield True. >>> > ? IsBlank(" \\t") >>> > I got always False... >>> >>> It's a typo mistake. Read: IsBlank(" \t") >>> >> >> OK. >> >> >>> > >>> > BTW. I'll check all math functions against wolfram|Alpha, >>> > so sometimes I'm not sure where to put limit of acceptable accuracy. >>> > >>> > Jussi >>> > >>> >>> What's "wolfram|Alpha" ? >>> >> >> Handy tool... >> http://www.wolframalpha.com/ >> >> Jussi >> > > From demosthenesk at ...626... Sun Nov 14 14:18:43 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Sun, 14 Nov 2010 15:18:43 +0200 Subject: [Gambas-user] Display & character on Message box In-Reply-To: <201011141206.23221.gambas@...1...> References: <51BE7D4A-1142-4DCF-83F9-AB061EBF00C4@...1896...> <1289668400.3212.4.camel@...2494...> <201011141206.23221.gambas@...1...> Message-ID: <1289740723.6084.0.camel@...2494...> Nope, none of them works. On Sun, 2010-11-14 at 12:06 +0100, Beno?t Minisini wrote: > > On gambas2-2.21-svn3289 > > > > Message.Info("&") > > > > is not working! > > > > Message is empty. > > > > Mmm. Maybe now Qt interprets it as pure HTML, or a text mnenomic... > > Try: > > Message.Info("&&") > > And: > > Message.Info("&") > > Regards, > From demosthenesk at ...626... Sun Nov 14 14:23:58 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Sun, 14 Nov 2010 15:23:58 +0200 Subject: [Gambas-user] CDE. An interesting packaging tool In-Reply-To: <201011141243.43859.gambas@...1...> References: <.77.224.23.61.1289640081.squirrel@...2402...> <201011141217.33773.gambas@...1...> <201011141222.33813.gambas@...1...> <201011141243.43859.gambas@...1...> Message-ID: <1289741038.6084.3.camel@...2494...> yes this is better. i tried cde with gambas project and it copied all the files in cde-package included passwd /home directory and other files that application used. This feature should work only for libs and as an option for packagers not "an only way" method. This is my opinion. On Sun, 2010-11-14 at 12:43 +0100, Beno?t Minisini wrote: > > > > Although I'm not a gambas developer, I appreciate the idea. I would > > > > prefer to have all the must-haves packaged into single file, instead of > > > > fighting with unresolved package dependencies. It's better to have a > > > > myprogram.bin installer, than myprogram.rpm, myprogram.deb... Maybe > > > > Benoit would argue because of the package size. It's more like Windows. > > > > But who cares. If I'd be sure my program will run independently of the > > > > Linux platform flavor, I'd yes to size increment. > > > > > > > > Csaba > > > > > > This is exactly what Cristian Abarzua F. (craf) tried to achieve. But it > > > did it by hand, I tried to help him, but we encountered problems. > > > > > > Apparently 'cde' seems to work, so I should try it and integrate it > > > inside the IDE packager. > > > > > > So, no I'm not fully against that kind of package now. Except that users > > > should be aware of the following: > > > > > > - They will be bigger (imagine a full Gambas GUI program relying of a lot > > > of components). > > > > > > - System security fix and updates won't apply to them. So packagers must > > > regularly repackage them. (Same nightmare as in windows). > > > > > > Regards, > > > > Another possible problem: Gambas can load a component during the execution > > of a program (Component.Load() method), not necesarilly at startup. So you > > must take that into account when making a cde package! > > > > Moreover, some component uses that feature. For example, the Gambas 3 > > gb.form.stock hidden component included a full stock of icons that is > > loaded only if an icon is not found in the Gnome or KDE icon themes > > installed on the system (which is very possible if you didn't install both > > Gnome and KDE). > > > > Regards, > > Another problem again: > > cde will store in the packages *all* existing files opened by the program > during its execution. Maybe I should take the source code of 'cde' and modify > it to only store the shared libraries? > From jussi.lahtinen at ...626... Sun Nov 14 14:46:09 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sun, 14 Nov 2010 15:46:09 +0200 Subject: [Gambas-user] Elusive Gambas3 crashing bug In-Reply-To: References: <201011122004.12444.gambas@...1...> <201011122105.44972.gambas@...1...> Message-ID: More... Shouldn't Finally to be read after Catch, not before? Now I get: TestErrorManagment(1) = 1 <-- Catch is never read! TestErrorManagment(2) = 21 I exepected; TestErrorManagment(1) = 4 TestErrorManagment(2) = 21 Right now word Finally doesn't do anything. Private Function TestErrorManagment(iWhich As Integer) As Integer Dim iError As Integer If iWhich = 1 Then iError = 1 / 0 Else iError = 20 Endif Finally Inc iError Return iError Catch iError = 3 End Jussi On Sun, Nov 14, 2010 at 15:02, Jussi Lahtinen wrote: > More... > > ? Week("07/24/2005") > 30 > Should be 29. > > Jussi > > > > > On Sat, Nov 13, 2010 at 19:36, Jussi Lahtinen wrote: > >> More... >> >> Dim TestSingle As Single >> Dim pp As Pointer >> >> TestSingle = 33.1 >> pp = VarPtr(TestSingle) >> >> SinglePtr(pp) = 33.1 is False! Gives -2... >> >> >> Jussi >> >> >> >> >> >> On Fri, Nov 12, 2010 at 23:44, Jussi Lahtinen wrote: >> >>> >>> > I'll send my whole project to you later. >>>> > >>>> > According to documentation this should yield True. >>>> > ? IsBlank(" \\t") >>>> > I got always False... >>>> >>>> It's a typo mistake. Read: IsBlank(" \t") >>>> >>> >>> OK. >>> >>> >>>> > >>>> > BTW. I'll check all math functions against wolfram|Alpha, >>>> > so sometimes I'm not sure where to put limit of acceptable accuracy. >>>> > >>>> > Jussi >>>> > >>>> >>>> What's "wolfram|Alpha" ? >>>> >>> >>> Handy tool... >>> http://www.wolframalpha.com/ >>> >>> Jussi >>> >> >> > From ron at ...1740... Sun Nov 14 14:26:26 2010 From: ron at ...1740... (Ron) Date: Sun, 14 Nov 2010 14:26:26 +0100 Subject: [Gambas-user] Display & character on Message box In-Reply-To: <1289740723.6084.0.camel@...2494...> References: <51BE7D4A-1142-4DCF-83F9-AB061EBF00C4@...1896...> <1289668400.3212.4.camel@...2494...> <201011141206.23221.gambas@...1...> <1289740723.6084.0.camel@...2494...> Message-ID: You have the same issue with title propery of forms. On Nov 14, 2010 2:19 PM, "Demosthenes Koptsis" wrote: > Nope, none of them works. > > On Sun, 2010-11-14 at 12:06 +0100, Beno?t Minisini wrote: >> > On gambas2-2.21-svn3289 >> > >> > Message.Info("&") >> > >> > is not working! >> > >> > Message is empty. >> > >> >> Mmm. Maybe now Qt interprets it as pure HTML, or a text mnenomic... >> >> Try: >> >> Message.Info("&&") >> >> And: >> >> Message.Info("&") >> >> Regards, >> > > > > ------------------------------------------------------------------------------ > Centralized Desktop Delivery: Dell and VMware Reference Architecture > Simplifying enterprise desktop deployment and management using > Dell EqualLogic storage and VMware View: A highly scalable, end-to-end > client virtualization framework. Read more! > http://p.sf.net/sfu/dell-eql-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From qhpexxlm at ...43... Sun Nov 14 16:34:32 2010 From: qhpexxlm at ...43... (jcrebt) Date: Sun, 14 Nov 2010 07:34:32 -0800 (PST) Subject: [Gambas-user] Using WebBrowser Control With Squid Proxy Message-ID: <30212765.post@...1379...> Just started learning Gambas How set Webbrowser control to use a proxy server that requires authentication (Squid proxy server)? In VB6 I could have used the WinInet with InternetSetOption Any help would be greatly appreciated -- View this message in context: http://old.nabble.com/Using-WebBrowser-Control-With-Squid-Proxy-tp30212765p30212765.html Sent from the gambas-user mailing list archive at Nabble.com. From gambas at ...1... Sun Nov 14 16:37:21 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sun, 14 Nov 2010 16:37:21 +0100 Subject: [Gambas-user] Using WebBrowser Control With Squid Proxy In-Reply-To: <30212765.post@...1379...> References: <30212765.post@...1379...> Message-ID: <201011141637.21650.gambas@...1...> > Just started learning Gambas > How set Webbrowser control to use a proxy server that requires > authentication (Squid proxy server)? > In VB6 I could have used the WinInet with InternetSetOption > Any help would be greatly appreciated In Gambas 2 you can't, unless you configure KDE3 proxy settings. In Gambas 3 you can't, this is yet to be done. -- Beno?t Minisini From math.eber at ...221... Sun Nov 14 16:48:32 2010 From: math.eber at ...221... (Matti) Date: Sun, 14 Nov 2010 16:48:32 +0100 Subject: [Gambas-user] Display & character on Message box In-Reply-To: References: <51BE7D4A-1142-4DCF-83F9-AB061EBF00C4@...1896...> <1289668400.3212.4.camel@...2494...> <201011141206.23221.gambas@...1...> <1289740723.6084.0.camel@...2494...> Message-ID: <4CE004D0.3010108@...221...> Strange. Here I have 2-2.21.0 (from 24-07-2010) without any svn updates, and all of the following works perfectly: ME.Title = "Loading " & Chr(38) & " starting" Message.Info("Loading " & Chr(38) & " starting") ME.Title = "Loading " & "&" & " starting" Message.Info("Loading " & "&" & " starting") Message.Info("&") Maybe there was something changed in the following svn updates? Am 14.11.2010 14:26, schrieb Ron: > You have the same issue with title propery of forms. > On Nov 14, 2010 2:19 PM, "Demosthenes Koptsis" > wrote: >> Nope, none of them works. >> >> On Sun, 2010-11-14 at 12:06 +0100, Beno?t Minisini wrote: >>>> On gambas2-2.21-svn3289 >>>> >>>> Message.Info("&") >>>> >>>> is not working! >>>> >>>> Message is empty. >>>> >>> >>> Mmm. Maybe now Qt interprets it as pure HTML, or a text mnenomic... >>> >>> Try: >>> >>> Message.Info("&&") >>> >>> And: >>> >>> Message.Info("&") >>> >>> Regards, >>> >> >> >> >> > ------------------------------------------------------------------------------ >> Centralized Desktop Delivery: Dell and VMware Reference Architecture >> Simplifying enterprise desktop deployment and management using >> Dell EqualLogic storage and VMware View: A highly scalable, end-to-end >> client virtualization framework. Read more! >> http://p.sf.net/sfu/dell-eql-dev2dev >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user > ------------------------------------------------------------------------------ > Centralized Desktop Delivery: Dell and VMware Reference Architecture > Simplifying enterprise desktop deployment and management using > Dell EqualLogic storage and VMware View: A highly scalable, end-to-end > client virtualization framework. Read more! > http://p.sf.net/sfu/dell-eql-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From qhpexxlm at ...43... Sun Nov 14 16:51:48 2010 From: qhpexxlm at ...43... (jcrebt) Date: Sun, 14 Nov 2010 07:51:48 -0800 (PST) Subject: [Gambas-user] Using WebBrowser Control With Squid Proxy In-Reply-To: <30212765.post@...1379...> References: <30212765.post@...1379...> Message-ID: <30212882.post@...1379...> Like gambas but should go back to vb -- View this message in context: http://old.nabble.com/Using-WebBrowser-Control-With-Squid-Proxy-tp30212765p30212882.html Sent from the gambas-user mailing list archive at Nabble.com. From ron at ...1740... Sun Nov 14 16:55:27 2010 From: ron at ...1740... (Ron) Date: Sun, 14 Nov 2010 16:55:27 +0100 Subject: [Gambas-user] Display & character on Message box In-Reply-To: <4CE004D0.3010108@...221...> References: <51BE7D4A-1142-4DCF-83F9-AB061EBF00C4@...1896...> <1289668400.3212.4.camel@...2494...> <201011141206.23221.gambas@...1...> <1289740723.6084.0.camel@...2494...> <4CE004D0.3010108@...221...> Message-ID: You are right, it never worked, so I assumed it still didn't, but now it does work in titles...hmmm Sorry for the noise... On Sun, Nov 14, 2010 at 4:48 PM, Matti wrote: > Strange. Here I have 2-2.21.0 (from 24-07-2010) without any svn updates, and all > of the following works perfectly: > > ?ME.Title = "Loading " & Chr(38) & " starting" > ?Message.Info("Loading " & Chr(38) & " starting") > > ?ME.Title = "Loading " & "&" & " starting" > ?Message.Info("Loading " & "&" & " starting") > > ?Message.Info("&") > > Maybe there was something changed in the following svn updates? > > > > Am 14.11.2010 14:26, schrieb Ron: >> You have the same issue with title propery of forms. >> On Nov 14, 2010 2:19 PM, "Demosthenes Koptsis" >> wrote: >>> Nope, none of them works. >>> >>> On Sun, 2010-11-14 at 12:06 +0100, Beno?t Minisini wrote: >>>>> On gambas2-2.21-svn3289 >>>>> >>>>> Message.Info("&") >>>>> >>>>> is not working! >>>>> >>>>> Message is empty. >>>>> >>>> >>>> Mmm. Maybe now Qt interprets it as pure HTML, or a text mnenomic... >>>> >>>> Try: >>>> >>>> Message.Info("&&") >>>> >>>> And: >>>> >>>> Message.Info("&") >>>> >>>> Regards, >>>> >>> >>> >>> >>> >> ------------------------------------------------------------------------------ >>> Centralized Desktop Delivery: Dell and VMware Reference Architecture >>> Simplifying enterprise desktop deployment and management using >>> Dell EqualLogic storage and VMware View: A highly scalable, end-to-end >>> client virtualization framework. Read more! >>> http://p.sf.net/sfu/dell-eql-dev2dev >>> _______________________________________________ >>> Gambas-user mailing list >>> Gambas-user at lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/gambas-user >> ------------------------------------------------------------------------------ >> Centralized Desktop Delivery: Dell and VMware Reference Architecture >> Simplifying enterprise desktop deployment and management using >> Dell EqualLogic storage and VMware View: A highly scalable, end-to-end >> client virtualization framework. Read more! >> http://p.sf.net/sfu/dell-eql-dev2dev >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > ------------------------------------------------------------------------------ > Centralized Desktop Delivery: Dell and VMware Reference Architecture > Simplifying enterprise desktop deployment and management using > Dell EqualLogic storage and VMware View: A highly scalable, end-to-end > client virtualization framework. Read more! > http://p.sf.net/sfu/dell-eql-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From mdavies5 at ...169... Mon Nov 15 05:31:01 2010 From: mdavies5 at ...169... (Michael) Date: Mon, 15 Nov 2010 15:31:01 +1100 Subject: [Gambas-user] Problem with data types In-Reply-To: <201011141205.08277.gambas@...1...> References: <4CDA5391.8090305@...221...> <201011130201.17405.gambas@...1...> <4CDF5D7B.2030904@...169...> <201011141205.08277.gambas@...1...> Message-ID: <4CE0B785.4050508@...169...> Thanks Benoit, The help page for gb.mysql says it is not available for Gambas2 but it doesn't matter as one of the beauties of Gambas, it is always possible to find a way around problems. When can we expect V3 generally available? Regards Mike On 14/11/10 22:05, Beno?t Minisini wrote: >> I am porting all my vb.net apps to gambas and I am very happy with the >> results, particularly the gb.db component. However it does have some >> limitations: >> 1. I need to determine the type of database columns using >> irsData.Fields[intCounter].Type. This works fine for strings, floats, >> integers and dates but many MySql data types such as 'Decimal' are seen >> as db.String(9). >> 2. I thought I would test if it was really a string by using the >> ResultField.Length property which should return zero for non-strings but >> it returned 19 for a Decimal(18,0) field in my database. >> >> I overcame the problem by changing all my MySql decimal fields to floats >> and it works fine. However there may be other MySql types which I have >> not tested and which may have a similar problem. Are there any plans to >> update gb.db to handle the many data types now available in most databases? >> >> Regards >> Mike >> > Yes and no. > > SQL datatypes are mapped to Gambas datatypes, so you don't see them. > > Moreover, the gb.db component aims at being independent of the database > backend. And as SQL is not really a standard, datatypes are different between > MySQL, PostgreSQL, SQLite..., and so it is impossible to manage them in an > independant way. > > You will get more information about datatype mapping there: > > http://gambasdoc.org/help/doc/db-type-mapping > > On the other hand, David Villalobos Cambronero has wrote a component named > "gb.mysql" that allows you to access all specific MySQL features. But I have > never used it, so he will help you better than me about that. > > Regards, > From eilert-sprachen at ...221... Mon Nov 15 08:58:46 2010 From: eilert-sprachen at ...221... (Rolf-Werner Eilert) Date: Mon, 15 Nov 2010 08:58:46 +0100 Subject: [Gambas-user] Gambas 3 Grid/Table question In-Reply-To: <201011130201.17405.gambas@...1...> References: <4CDA5391.8090305@...221...> <4CDA7201.9040007@...221...> <201011130201.17405.gambas@...1...> Message-ID: <4CE0E836.6030506@...221...> Am 13.11.2010 02:01, schrieb Beno?t Minisini: >> Sorry, I was kinda tired this morning :-) >> >> There is a linewrap in the Gridview even with Gambas 2, but it is a >> default (at least I have not yet found a way to deactivate it) and it >> does not by itself adjust the line height appropriately. >> >> So the question would have to be: Is there a more specific way to define >> this in Gambas 3? For instance: >> >> Tableview1.Columns[3].WordWrap = TRUE >> Tableview1.Columns[3].Width = 125 >> Tableview1.AdjustRowHeight = TRUE >> >> would activate wordwrap for column 3, define a width of 125 px for this >> column and start automatic row height adjusting for the whole table... >> Maybe this would make sense for single rows? Then >> >> Tableview1.Rows[2].AdjustRowHeight = TRUE >> >> would be good, but I can't imagine a case where this might be good. >> >> Regards >> >> Rolf >> > > In Gambas 3, WordWrap is a property attached to the cell. And to adjust the > width of a row or a column, you must set its height (or width) to "-1". But, > if I remember well, it is not implemented in gb.gtk yet. > > Maybe a WordWrap property at the column level may be useful then? > Definitely yes! I think, this is where it makes most sense. But it is not very useful without RowHeight adjusting automatically, too. If you cannot add something like an AdjustRowHeight property, there should at least be an event and a property that can be read telling me how many lines the fullest cell has on this line (to enable me to adjust the RowHeight by my own code). What I meant above was, I don't know if an AdjustRowHeight property makes sense on Row level. Regards Rolf From bbruen at ...2308... Mon Nov 15 09:34:08 2010 From: bbruen at ...2308... (Bruce Bruen) Date: Mon, 15 Nov 2010 19:04:08 +1030 Subject: [Gambas-user] Some confusion re TabStrip property settings In-Reply-To: <30212765.post@...1379...> References: <30212765.post@...1379...> Message-ID: <201011151904.10096.bbruen@...2308...> It appears to me (in Gambas 2) that some properties of TabStrip .Tab items, such as Caption, are only settable via code if the item is visible. PUBLIC SUB Form_Open() DIM ix AS Integer TabStrip1.Count = 9 FOR ix = 1 TO 9 TabStrip1[ix - 1].Text = ix IF ix > 6 THEN TabStrip1[ix - 1].Visible = FALSE NEXT TabStrip1.Index = 2 TabStrip1.Index = 8 TabStrip1.Current.Text = "I am OK" TabStrip1[7].Caption = "I am not properly labelled!" FOR ix = 1 TO 9 TabStrip1[ix - 1].Visible=TRUE NEXT END Is this expected behaviour? -- best regards Bruce Bruen From jussi.lahtinen at ...626... Mon Nov 15 18:44:26 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Mon, 15 Nov 2010 19:44:26 +0200 Subject: [Gambas-user] GambasTester 0.9.9 Message-ID: Hi! My quick&dirty side project for Gambas 3 is now ready to be share. It makes some seemingly stupid and some, actually stupid tests, to confirm that current revision works. It is far from perfect, but better than nothing. I hope people keep on improving this. There are still few untested commands (see "Excluded & Unimplemented"). First GambasTester test commands, and then it scans it's own source to find out whether all commands are included. So, if new commands are added to Gambas, they should be added to "SearchList" in alphabetical order. That way it is easy to tell if all commands are tested, and actual tests do not have to be in any order to keep track of things. Questions, comments & improvements are welcome. To Benoit, Please see mTest.module lines 1037 and 1091. Also run GambasTester to see problems with current revision (3293). Jussi -------------- next part -------------- A non-text attachment was scrubbed... Name: GambasTester-0.9.9.tar.gz Type: application/x-gzip Size: 13923 bytes Desc: not available URL: From tobiasboe1 at ...20... Mon Nov 15 19:56:31 2010 From: tobiasboe1 at ...20... (tobias) Date: Mon, 15 Nov 2010 19:56:31 +0100 Subject: [Gambas-user] Result object In-Reply-To: References: Message-ID: <4CE1825F.3030900@...20...> hi, i have again another question about the result object... when i do: hResult = hConnection.Edit("table") i get a read/write result, i can move through the elements and edit their fields, e.g. hResult.MoveTo(2) hResult["id"] = 10 right? but where do i have to move to to add one (or more) new element/s?? From Karl.Reinl at ...2345... Mon Nov 15 20:45:45 2010 From: Karl.Reinl at ...2345... (Charlie Reinl) Date: Mon, 15 Nov 2010 20:45:45 +0100 Subject: [Gambas-user] Result object In-Reply-To: <4CE1825F.3030900@...20...> References: <4CE1825F.3030900@...20...> Message-ID: <1289850345.7306.1.camel@...40...> Am Montag, den 15.11.2010, 19:56 +0100 schrieb tobias: > hi, > i have again another question about the result object... > when i do: > hResult = hConnection.Edit("table") > > i get a read/write result, i can move through the elements and edit > their fields, e.g. > hResult.MoveTo(2) > hResult["id"] = 10 > > right? > but where do i have to move to to add one (or more) new element/s?? > Salut Tobias, hResult = hConnection.Create("table") should to the job -- Amicalement Charlie From gambas.fr at ...626... Mon Nov 15 21:07:52 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Mon, 15 Nov 2010 21:07:52 +0100 Subject: [Gambas-user] GambasTester 0.9.9 In-Reply-To: References: Message-ID: If Format$(Pi, "#.##") <> 3.14 Then Return 85 Endif this test can be true only in country where decimal separator is "." in france ... the decimal separator is ","... then you compare a string to a float !! All the error i have are based on this problem. From gambas at ...1... Mon Nov 15 21:18:33 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 15 Nov 2010 21:18:33 +0100 Subject: [Gambas-user] GambasTester 0.9.9 In-Reply-To: References: Message-ID: <201011152118.33238.gambas@...1...> > If Format$(Pi, "#.##") <> 3.14 Then > Return 85 > Endif > > this test can be true only in country where decimal separator is "." > > > in france ... the decimal separator is ","... then you compare a > string to a float !! > > All the error i have are based on this problem. > The problem is your comparison between a string (Format$) and a number. The number is automatically converted to a string by using CStr(), which does not use localization contrary to Format$(). -- Beno?t Minisini From mauricio at ...2500... Mon Nov 15 20:46:38 2010 From: mauricio at ...2500... (Mauricio Baeza) Date: Mon, 15 Nov 2010 13:46:38 -0600 Subject: [Gambas-user] Null Object with XmlDocument Message-ID: <1289850398.19592.1.camel@...37...> Hello ... A few days ago the following code worked Dim oDocXML As XmlDocument oDocXML.Open ("/home/user/file.xml") Now, it gives me the error statement Null Object I tried it in Gambas 2.21 in ArchLinux x64 x64 and Ubuntu 10.10 Can anyone prove it?, Thanks -- Mauricio Baeza 10 a?os usando OpenOffice.org, libre, gratuito y seguro _______________________________ Todo lo que no es dado es perdido From gambas at ...1... Mon Nov 15 21:59:42 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 15 Nov 2010 21:59:42 +0100 Subject: [Gambas-user] Display & character on Message box In-Reply-To: References: Message-ID: <201011152159.42266.gambas@...1...> > Hi, > > How to display '&' character? I tried: > > Message.Info("&") > Message.Info("&&") > Message.Info(chr(38)) > Message.Info("&abc") > Message.Info("abc &") > > And got empty message box. The bug has been fixed in revision #3295. Regards, -- Beno?t Minisini From jussi.lahtinen at ...626... Mon Nov 15 22:02:07 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Mon, 15 Nov 2010 23:02:07 +0200 Subject: [Gambas-user] GambasTester 0.9.9 In-Reply-To: <201011152118.33238.gambas@...1...> References: <201011152118.33238.gambas@...1...> Message-ID: OK, these are not the errors I meant... These are obviously my errors. I fixed Format$ to be compared against Str$(). There might be other similar errors too... Jussi 2010/11/15 Beno?t Minisini > > If Format$(Pi, "#.##") <> 3.14 Then > > Return 85 > > Endif > > > > this test can be true only in country where decimal separator is "." > > > > > > in france ... the decimal separator is ","... then you compare a > > string to a float !! > > > > All the error i have are based on this problem. > > > > The problem is your comparison between a string (Format$) and a number. The > number is automatically converted to a string by using CStr(), which does > not > use localization contrary to Format$(). > > -- > Beno?t Minisini > > > ------------------------------------------------------------------------------ > Centralized Desktop Delivery: Dell and VMware Reference Architecture > Simplifying enterprise desktop deployment and management using > Dell EqualLogic storage and VMware View: A highly scalable, end-to-end > client virtualization framework. Read more! > http://p.sf.net/sfu/dell-eql-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -------------- next part -------------- A non-text attachment was scrubbed... Name: GambasTester-0.9.10.tar.gz Type: application/x-gzip Size: 13913 bytes Desc: not available URL: From gambas at ...1... Mon Nov 15 22:11:16 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 15 Nov 2010 22:11:16 +0100 Subject: [Gambas-user] Elusive Gambas3 crashing bug In-Reply-To: References: Message-ID: <201011152211.16911.gambas@...1...> > More... > > Shouldn't Finally to be read after Catch, not before? > Now I get: > TestErrorManagment(1) = 1 <-- Catch is never read! > TestErrorManagment(2) = 21 > > I exepected; > TestErrorManagment(1) = 4 > TestErrorManagment(2) = 21 > > Right now word Finally doesn't do anything. > > > Private Function TestErrorManagment(iWhich As Integer) As Integer > Dim iError As Integer > > If iWhich = 1 Then > iError = 1 / 0 > Else > iError = 20 > Endif > > Finally > Inc iError > Return iError > > Catch > iError = 3 > > End > > > Jussi > 'Finally' is always run before 'Catch'. And the Return statement prevents the 'Catch' part to be executed after the 'Finally' part. Regards, -- Beno?t Minisini From gambas at ...1... Mon Nov 15 22:19:06 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 15 Nov 2010 22:19:06 +0100 Subject: [Gambas-user] Elusive Gambas3 crashing bug In-Reply-To: References: Message-ID: <201011152219.06716.gambas@...1...> > More... > > Dim TestSingle As Single > Dim pp As Pointer > > TestSingle = 33.1 > pp = VarPtr(TestSingle) > > SinglePtr(pp) = 33.1 is False! Gives -2... > > > Jussi > Actually SinglePtr() cannot work on local variables, because internally there is no "Single" local variable, only "Float". Thanks for detecting that weird thing! -- Beno?t Minisini From gambas at ...1... Tue Nov 16 02:51:14 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 16 Nov 2010 02:51:14 +0100 Subject: [Gambas-user] Elusive Gambas3 crashing bug In-Reply-To: <201011152219.06716.gambas@...1...> References: <201011152219.06716.gambas@...1...> Message-ID: <201011160251.14295.gambas@...1...> > > More... > > > > Dim TestSingle As Single > > Dim pp As Pointer > > > > TestSingle = 33.1 > > pp = VarPtr(TestSingle) > > > > SinglePtr(pp) = 33.1 is False! Gives -2... > > > > Jussi > > Actually SinglePtr() cannot work on local variables, because internally > there is no "Single" local variable, only "Float". > > Thanks for detecting that weird thing! Full Single management has been implemented in revision #3296. Note that floating point constants (33.1 for example) are always Float. So if you compare SinglePtr(pp) to 33.1, the Single value returned by SinglePtr() is converted to a Float before doing the comparison, and so the values do not match. To force a Single comparison, do: SinglePtr(pp) = CSng(33.1) Regards, -- Beno?t Minisini From mauricio at ...2500... Tue Nov 16 05:58:45 2010 From: mauricio at ...2500... (Mauricio Baeza) Date: Mon, 15 Nov 2010 22:58:45 -0600 Subject: [Gambas-user] Edit XML Message-ID: <1289883525.22168.0.camel@...37...> Hi all ... With the library for XML I can, without problems ... 1 .- Create new XML file 2 .- Read any XML file What I can not do is change just one attribute of an element of an existing file. Does anyone have a sample? Greetings -- Mauricio Baeza 10 a?os usando OpenOffice.org, libre, gratuito y seguro _______________________________ Todo lo que no es dado es perdido From wally at ...2037... Tue Nov 16 09:18:17 2010 From: wally at ...2037... (wally) Date: Tue, 16 Nov 2010 09:18:17 +0100 Subject: [Gambas-user] draw graph gambas2 Message-ID: <201011160918.17181.wally@...2037...> Hi, i need to draw a graph with nonlinear data from a measurement device. Doing draw.line/draw.polyline gives pretty ugly results. Is there a way to draw to drawarea with smooth lines, bezier or curve_to as in cairo with Gambas2 ? In general its an YT-Plotter / Recorder wally From rterry at ...1946... Tue Nov 16 10:17:15 2010 From: rterry at ...1946... (richard terry) Date: Tue, 16 Nov 2010 20:17:15 +1100 Subject: [Gambas-user] draw graph gambas2 In-Reply-To: <201011160918.17181.wally@...2037...> References: <201011160918.17181.wally@...2037...> Message-ID: <201011162017.15783.rterry@...1946...> On Tuesday 16 November 2010 19:18:17 wally wrote: > Hi, > > i need to draw a graph with nonlinear data from a measurement device. > Doing draw.line/draw.polyline gives pretty ugly results. > Is there a way to draw to drawarea with smooth lines, bezier or curve_to as > in cairo with Gambas2 ? In general its an YT-Plotter / Recorder > > wally > > > > --------------------------------------------------------------------------- > --- Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. > Spend less time writing and rewriting code and more time creating great > experiences on the web. Be a part of the beta today > http://p.sf.net/sfu/msIE9-sfdev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > Hav;t used the gambas graphing stuff for eons, but shelling to gnuplot and retrieving the piccie and displaying it is really really quick and your options are (relatively) unlimited. Regards Richard From eilert-sprachen at ...221... Tue Nov 16 11:03:53 2010 From: eilert-sprachen at ...221... (Rolf-Werner Eilert) Date: Tue, 16 Nov 2010 11:03:53 +0100 Subject: [Gambas-user] Gambas 3 Grid/Table question In-Reply-To: <4CE0E836.6030506@...221...> References: <4CDA5391.8090305@...221...> <4CDA7201.9040007@...221...> <201011130201.17405.gambas@...1...> <4CE0E836.6030506@...221...> Message-ID: <4CE25709.8000802@...221...> Am 15.11.2010 08:58, schrieb Rolf-Werner Eilert: > Am 13.11.2010 02:01, schrieb Beno?t Minisini: >>> Sorry, I was kinda tired this morning :-) >>> >>> There is a linewrap in the Gridview even with Gambas 2, but it is a >>> default (at least I have not yet found a way to deactivate it) and it >>> does not by itself adjust the line height appropriately. >>> >>> So the question would have to be: Is there a more specific way to define >>> this in Gambas 3? For instance: >>> >>> Tableview1.Columns[3].WordWrap = TRUE >>> Tableview1.Columns[3].Width = 125 >>> Tableview1.AdjustRowHeight = TRUE >>> >>> would activate wordwrap for column 3, define a width of 125 px for this >>> column and start automatic row height adjusting for the whole table... >>> Maybe this would make sense for single rows? Then >>> >>> Tableview1.Rows[2].AdjustRowHeight = TRUE >>> >>> would be good, but I can't imagine a case where this might be good. >>> >>> Regards >>> >>> Rolf >>> >> >> In Gambas 3, WordWrap is a property attached to the cell. And to adjust the >> width of a row or a column, you must set its height (or width) to "-1". But, >> if I remember well, it is not implemented in gb.gtk yet. >> >> Maybe a WordWrap property at the column level may be useful then? >> > > Definitely yes! I think, this is where it makes most sense. But it is > not very useful without RowHeight adjusting automatically, too. If you > cannot add something like an AdjustRowHeight property, there should at > least be an event and a property that can be read telling me how many > lines the fullest cell has on this line (to enable me to adjust the > RowHeight by my own code). > > What I meant above was, I don't know if an AdjustRowHeight property > makes sense on Row level. > > Regards > > Rolf > Let me add couple of things that came to my head... :-) If we try to pimp the GridView, we should have in mind that there are different ways of showing a cell or column in a grid. All of them are good for certain situations. You can just make the column wider and wider, but this is not very professional. Yet there might be situations for which this is ok. The standard way is to cut the rest if it doesn't fit, usually shown by "..." at the end (or a fade-out, I saw this somewhere, looks nice!) You will then want some way to feed the ToolTip for the mouse showing the complete contents when the user hovers over the cell. Then you can make a word wrap, either the way it is now or with an automatic adaptation of the row height. The latter looks more professional, but it might be confusing in some cases, so better it can be switched on or off. The real problem arises when it comes to TabelView, i. e. when you want to edit the cell. Would you implement a multi-line edit? What if the row height hasn't been adapted? Lots of questions... Anyway, it should be avoided to produce an "eggs laying wool-milk sow" as we put it in German ;-) or a feature dinosaur with so many properties and events that nobody knows how to control it (as it is in vb.net - and with literally no documentation worth mentioning). Regards Rolf From jussi.lahtinen at ...626... Tue Nov 16 16:29:50 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Tue, 16 Nov 2010 17:29:50 +0200 Subject: [Gambas-user] Elusive Gambas3 crashing bug In-Reply-To: <201011152211.16911.gambas@...1...> References: <201011152211.16911.gambas@...1...> Message-ID: But then I don't understand why "Finally" exist... At least that test function is equal without it. Is there proper usage for it, or is it for historical etc reasons? BTW. You didn't get errors from any date commands? Nor crash from line 1038 of mTest? I'll send logs about that crash later. Jussi 2010/11/15 Beno?t Minisini > > More... > > > > Shouldn't Finally to be read after Catch, not before? > > Now I get: > > TestErrorManagment(1) = 1 <-- Catch is never read! > > TestErrorManagment(2) = 21 > > > > I exepected; > > TestErrorManagment(1) = 4 > > TestErrorManagment(2) = 21 > > > > Right now word Finally doesn't do anything. > > > > > > Private Function TestErrorManagment(iWhich As Integer) As Integer > > Dim iError As Integer > > > > If iWhich = 1 Then > > iError = 1 / 0 > > Else > > iError = 20 > > Endif > > > > Finally > > Inc iError > > Return iError > > > > Catch > > iError = 3 > > > > End > > > > > > Jussi > > > > 'Finally' is always run before 'Catch'. And the Return statement prevents > the > 'Catch' part to be executed after the 'Finally' part. > > Regards, > > -- > Beno?t Minisini > > > ------------------------------------------------------------------------------ > Centralized Desktop Delivery: Dell and VMware Reference Architecture > Simplifying enterprise desktop deployment and management using > Dell EqualLogic storage and VMware View: A highly scalable, end-to-end > client virtualization framework. Read more! > http://p.sf.net/sfu/dell-eql-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From oceanosoftlapalma at ...626... Tue Nov 16 17:18:15 2010 From: oceanosoftlapalma at ...626... (=?ISO-8859-1?Q?Ricardo_D=EDaz_Mart=EDn?=) Date: Tue, 16 Nov 2010 17:18:15 +0100 Subject: [Gambas-user] Class destructor Message-ID: Hi, Is possible in gambas3 set a sub that will be fire when you set the object = null? I got a gambas class for loading big quantity of data in a gridview in dynamic mode (using the Data event). In this class, I got some "New" sentences that be manually cleaned by a public sub. I want to simply set the object to null and the "cleaner sub" runs. I was searching in gabasdoc for "destructor", "constructor", "class"... I found this http://gambasdoc.org/help/lang/special but there isn't anything like _unload Thanks in advance, Ricardo D?az From gambas.fr at ...626... Tue Nov 16 19:16:38 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Tue, 16 Nov 2010 19:16:38 +0100 Subject: [Gambas-user] Class destructor In-Reply-To: References: Message-ID: Just Public sub _free() end and at the same level that _init public sub _exit() -- Fabien Bodard From demosthenesk at ...626... Tue Nov 16 19:29:05 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Tue, 16 Nov 2010 20:29:05 +0200 Subject: [Gambas-user] WAIT command questions. Message-ID: <1289932145.14611.3.camel@...2493...> In manual for WAIT, it is said that If Delay is not specified, the functions processes every events and returns immediately. In this case, keyboard and mouse events are ignored. i dont understand this. What does it mean "the functions processes every event" ? Which functions? We talk about event loop functions? Please explain, thanks. -- Regards, Demosthenes Koptsis. From tobiasboe1 at ...20... Tue Nov 16 21:44:11 2010 From: tobiasboe1 at ...20... (tobias) Date: Tue, 16 Nov 2010 21:44:11 +0100 Subject: [Gambas-user] Result object In-Reply-To: <1289850345.7306.1.camel@...40...> References: <4CE1825F.3030900@...20...> <1289850345.7306.1.camel@...40...> Message-ID: <4CE2ED1B.1000604@...20...> Charlie Reinl schrieb: > Am Montag, den 15.11.2010, 19:56 +0100 schrieb tobias: >> hi, >> i have again another question about the result object... >> when i do: >> hResult = hConnection.Edit("table") >> >> i get a read/write result, i can move through the elements and edit >> their fields, e.g. >> hResult.MoveTo(2) >> hResult["id"] = 10 >> >> right? >> but where do i have to move to to add one (or more) new element/s?? >> > Salut Tobias, > > hResult = hConnection.Create("table") > > should to the job > this maybe works but in theory i can't imagine why...? From oceanosoftlapalma at ...626... Tue Nov 16 22:27:27 2010 From: oceanosoftlapalma at ...626... (=?ISO-8859-1?Q?Ricardo_D=EDaz_Mart=EDn?=) Date: Tue, 16 Nov 2010 22:27:27 +0100 Subject: [Gambas-user] Class destructor In-Reply-To: References: Message-ID: Thanks a lot, Fabien 2010/11/16 Fabien Bodard > Just > > Public sub _free() > > end > > and at the same level that _init > > public sub _exit() > > > > -- > Fabien Bodard > > > ------------------------------------------------------------------------------ > Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. > Spend less time writing and rewriting code and more time creating great > experiences on the web. Be a part of the beta today > http://p.sf.net/sfu/msIE9-sfdev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From Karl.Reinl at ...2345... Tue Nov 16 23:16:22 2010 From: Karl.Reinl at ...2345... (Charlie Reinl) Date: Tue, 16 Nov 2010 23:16:22 +0100 Subject: [Gambas-user] Result object In-Reply-To: <4CE2ED1B.1000604@...20...> References: <4CE1825F.3030900@...20...> <1289850345.7306.1.camel@...40...> <4CE2ED1B.1000604@...20...> Message-ID: <1289945782.6381.2.camel@...40...> Am Dienstag, den 16.11.2010, 21:44 +0100 schrieb tobias: > Charlie Reinl schrieb: > > Am Montag, den 15.11.2010, 19:56 +0100 schrieb tobias: > >> hi, > >> i have again another question about the result object... > >> when i do: > >> hResult = hConnection.Edit("table") > >> > >> i get a read/write result, i can move through the elements and edit > >> their fields, e.g. > >> hResult.MoveTo(2) > >> hResult["id"] = 10 > >> > >> right? > >> but where do i have to move to to add one (or more) new element/s?? > >> > > Salut Tobias, > > > > hResult = hConnection.Create("table") > > > > should to the job > > > this maybe works but in theory i can't imagine why...? > Sorry, I can't follow you. EDIT reads something which can be handeled read/write afterwards. Where is the problem with CREATE ? CREATE, creates something new, and throws immediately an EDIT. So, EDIT reads something which can be handeled read/write afterwards. -- Amicalement Charlie From gambas at ...1... Wed Nov 17 00:03:07 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 17 Nov 2010 00:03:07 +0100 Subject: [Gambas-user] WAIT command questions. In-Reply-To: <1289932145.14611.3.camel@...2493...> References: <1289932145.14611.3.camel@...2493...> Message-ID: <201011170003.07611.gambas@...1...> > In manual for WAIT, it is said that > > If Delay is not specified, the functions processes every events and > returns immediately. In this case, keyboard and mouse events are > ignored. > > i dont understand this. > > What does it mean "the functions processes every event" ? > Which functions? > > We talk about event loop functions? > > Please explain, > > thanks. The wiki page was badly written. Is it clearer now ? -- Beno?t Minisini From gambas at ...1... Wed Nov 17 00:24:53 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 17 Nov 2010 00:24:53 +0100 Subject: [Gambas-user] Elusive Gambas3 crashing bug In-Reply-To: References: <201011152211.16911.gambas@...1...> Message-ID: <201011170024.53131.gambas@...1...> > But then I don't understand why "Finally" exist... > At least that test function is equal without it. > Is there proper usage for it, or is it for historical etc reasons? > Finally exists so that you can have some code that is always executed at the end of the function, even if there was an error. > BTW. You didn't get errors from any date commands? Mmm. No. Be more precise. > Nor crash from line 1038 of mTest? Yes, it crashes. I'm looking at it. Regards, -- Beno?t Minisini From demosthenesk at ...626... Wed Nov 17 09:04:08 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Wed, 17 Nov 2010 10:04:08 +0200 Subject: [Gambas-user] WAIT command questions. In-Reply-To: <201011170003.07611.gambas@...1...> References: <1289932145.14611.3.camel@...2493...> <201011170003.07611.gambas@...1...> Message-ID: <1289981048.21019.5.camel@...2493...> On Wed, 2010-11-17 at 00:03 +0100, Beno?t Minisini wrote: > > In manual for WAIT, it is said that > > > > If Delay is not specified, the functions processes every events and > > returns immediately. In this case, keyboard and mouse events are > > ignored. > > > > i dont understand this. > > > > What does it mean "the functions processes every event" ? > > Which functions? > > > > We talk about event loop functions? > > > > Please explain, > > > > thanks. > > The wiki page was badly written. Is it clearer now ? > Ok, now i understand it, thanks! One question more. The SUBs event_read() such "PUBLIC SUB MySerialPort_Read()" in example are raised recursively again and again if WAIT is called from them because they are part of event loop or because event loop call them again and again? How do they work? -- Regards, Demosthenes Koptsis. From oceanosoftlapalma at ...626... Wed Nov 17 11:05:08 2010 From: oceanosoftlapalma at ...626... (=?ISO-8859-1?Q?Ricardo_D=EDaz_Mart=EDn?=) Date: Wed, 17 Nov 2010 11:05:08 +0100 Subject: [Gambas-user] gambas3 IDE bug Message-ID: Hi, I have updated today to version 3296 and I got this bug in the IDE. Attach a project example to reproduce. Open the project in gambas3, go to Form_Open() sub and write: me.fF Then you got the error. Regards, -------------- next part -------------- A non-text attachment was scrubbed... Name: gambas3IDEError.png Type: image/png Size: 130513 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: htmlhelpbug.tar.gz Type: application/x-gzip Size: 5057 bytes Desc: not available URL: From demosthenesk at ...626... Wed Nov 17 11:22:21 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Wed, 17 Nov 2010 12:22:21 +0200 Subject: [Gambas-user] About array Initialization Message-ID: <1289989341.3063.1.camel@...2493...> Good morning to all! we can do an array initialization such as DIM aNumbers AS Integer[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] but not DIM aNumbers AS Integer[10] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] why is that? -- Regards, Demosthenes Koptsis. From gambas at ...1... Wed Nov 17 11:22:30 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 17 Nov 2010 11:22:30 +0100 Subject: [Gambas-user] gambas3 IDE bug In-Reply-To: References: Message-ID: <201011171122.30902.gambas@...1...> > Hi, > > I have updated today to version 3296 and I got this bug in the IDE. > > Attach a project example to reproduce. Open the project in gambas3, go to > Form_Open() sub and write: > > me.fF > > Then you got the error. > > Regards, It should be fixed in revision #3297. Regards, -- Beno?t Minisini From demosthenesk at ...626... Wed Nov 17 11:38:09 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Wed, 17 Nov 2010 12:38:09 +0200 Subject: [Gambas-user] About help and arrays and variables Message-ID: <1289990289.3063.15.camel@...2493...> Hi again, i am writing my book and now i am in the section about arrays. i see that in help wiki the pages about arrays are mixed up with variables subject. This is not well readable and understood. I feel that the arrays try to be described in a general way like variables. For example 1) in http://gambasdoc.org/help/lang/vardecl?show the syntax is [ STATIC ] { PUBLIC | PRIVATE } Identifier [ Embedded array declaration ] AS Datatype [ = Expression ] and is mentioned the [ Embedded array declaration ]. 2) in the other hand in http://gambasdoc.org/help/lang/arraydecl?show the infos are very mixed up. It is not easy readable and understood by a beginner. In my book i follow the next way to describe these subjects. Variables Scope (local, global) Declaration of local vars Declaration of global vars Initialization Arrays Scope (local, global) Declaration of local arrays Declaration of global arrays Initialization Static arrays Dynamic arrays i propose to a similar way for the wiki so these subjects to be easy to read and understand and not to have all the info in one or two pages all together. -- Regards, Demosthenes Koptsis. From oceanosoftlapalma at ...626... Wed Nov 17 11:47:22 2010 From: oceanosoftlapalma at ...626... (=?ISO-8859-1?Q?Ricardo_D=EDaz_Mart=EDn?=) Date: Wed, 17 Nov 2010 11:47:22 +0100 Subject: [Gambas-user] gambas3 IDE bug In-Reply-To: <201011171122.30902.gambas@...1...> References: <201011171122.30902.gambas@...1...> Message-ID: Now works fine. Thanks Benoit 2010/11/17 Beno?t Minisini > > Hi, > > > > I have updated today to version 3296 and I got this bug in the IDE. > > > > Attach a project example to reproduce. Open the project in gambas3, go to > > Form_Open() sub and write: > > > > me.fF > > > > Then you got the error. > > > > Regards, > > It should be fixed in revision #3297. > > Regards, > > -- > Beno?t Minisini > > > ------------------------------------------------------------------------------ > Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. > Spend less time writing and rewriting code and more time creating great > experiences on the web. Be a part of the beta today > http://p.sf.net/sfu/msIE9-sfdev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From demosthenesk at ...626... Wed Nov 17 12:45:37 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Wed, 17 Nov 2010 13:45:37 +0200 Subject: [Gambas-user] About help and arrays and variables Message-ID: <1289994337.4274.9.camel@...2493...> in http://gambasdoc.org/help/lang/arraydecl?show the syntax for Embedded arrays is [ STATIC ] { PUBLIC | PRIVATE } Identifier [ Array dimensions ... ] AS Native Datatype but i could use also the NEW keyword For example PUBLIC aNames AS NEW String[2, 2] This description for the use of NEW is in 1)local array syntax with DIM keyword 2)and at variable syntax in "Initialization" section http://gambasdoc.org/help/lang/vardecl?show but is missing at Embedded arrays syntax. it is implied in variable section but the all description is separated and mixed up in many pages. -- Regards, Demosthenes Koptsis. From gambas at ...1... Wed Nov 17 12:49:47 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 17 Nov 2010 12:49:47 +0100 Subject: [Gambas-user] About help and arrays and variables In-Reply-To: <1289994337.4274.9.camel@...2493...> References: <1289994337.4274.9.camel@...2493...> Message-ID: <201011171249.47203.gambas@...1...> > in http://gambasdoc.org/help/lang/arraydecl?show > > the syntax for Embedded arrays is > > [ STATIC ] { PUBLIC | PRIVATE } Identifier [ Array dimensions ... ] AS > Native Datatype > > but i could use also the NEW keyword > > For example > > PUBLIC aNames AS NEW String[2, 2] That is a different thing. PUBLIC aNames AS New String[2, 2] Is the same thing as: PUBLIC aNames As String[] aNames = New String[2, 2] Where as: PUBLIC aNames[2, 2] As String Is an embedded array. "Normal" arrays are true Gambas objects, whereas embedded arrays are just a way to access a part of a Gambas object as an array. The array contents is stored in the memory slot allocated to the Gambas object where it is declared. Regards, -- Beno?t Minisini From tobiasboe1 at ...20... Wed Nov 17 14:34:34 2010 From: tobiasboe1 at ...20... (tobias) Date: Wed, 17 Nov 2010 14:34:34 +0100 Subject: [Gambas-user] Result object In-Reply-To: <1289945782.6381.2.camel@...40...> References: <4CE1825F.3030900@...20...> <1289850345.7306.1.camel@...40...> <4CE2ED1B.1000604@...20...> <1289945782.6381.2.camel@...40...> Message-ID: <4CE3D9EA.3050406@...20...> Charlie Reinl schrieb: > Am Dienstag, den 16.11.2010, 21:44 +0100 schrieb tobias: >> Charlie Reinl schrieb: >>> Am Montag, den 15.11.2010, 19:56 +0100 schrieb tobias: >>>> hi, >>>> i have again another question about the result object... >>>> when i do: >>>> hResult = hConnection.Edit("table") >>>> >>>> i get a read/write result, i can move through the elements and edit >>>> their fields, e.g. >>>> hResult.MoveTo(2) >>>> hResult["id"] = 10 >>>> >>>> right? >>>> but where do i have to move to to add one (or more) new element/s?? >>>> >>> Salut Tobias, >>> >>> hResult = hConnection.Create("table") >>> >>> should to the job >>> >> this maybe works but in theory i can't imagine why...? >> > Sorry, I can't follow you. > > EDIT reads something which can be handeled read/write afterwards. > > Where is the problem with CREATE ? > > CREATE, creates something new, and throws immediately an EDIT. > > So, EDIT reads something which can be handeled read/write afterwards. > salut, yes, understood is this far but my problem is that hConnection.Edit() returns a read/write result to edit an specific entry field by Move*()ing to the record. my question is now where i have to Move*() to to add a new record. Connection.Create("table")["field"] = new_records_value works well, but in case i Move*()ed somewhere in the result where do i have to move to make sure that i don't overwrite data in the record i just moved too, instead create a new one? is this explanation clear enough? From tobiasboe1 at ...20... Wed Nov 17 14:37:42 2010 From: tobiasboe1 at ...20... (tobias) Date: Wed, 17 Nov 2010 14:37:42 +0100 Subject: [Gambas-user] Result object In-Reply-To: <1289945782.6381.2.camel@...40...> References: <4CE1825F.3030900@...20...> <1289850345.7306.1.camel@...40...> <4CE2ED1B.1000604@...20...> <1289945782.6381.2.camel@...40...> Message-ID: <4CE3DAA6.4020706@...20...> Charlie Reinl schrieb: > Am Dienstag, den 16.11.2010, 21:44 +0100 schrieb tobias: >> Charlie Reinl schrieb: >>> Am Montag, den 15.11.2010, 19:56 +0100 schrieb tobias: >>>> hi, >>>> i have again another question about the result object... >>>> when i do: >>>> hResult = hConnection.Edit("table") >>>> >>>> i get a read/write result, i can move through the elements and edit >>>> their fields, e.g. >>>> hResult.MoveTo(2) >>>> hResult["id"] = 10 >>>> >>>> right? >>>> but where do i have to move to to add one (or more) new element/s?? >>>> >>> Salut Tobias, >>> >>> hResult = hConnection.Create("table") >>> >>> should to the job >>> >> this maybe works but in theory i can't imagine why...? >> > Sorry, I can't follow you. > > EDIT reads something which can be handeled read/write afterwards. > > Where is the problem with CREATE ? > > CREATE, creates something new, and throws immediately an EDIT. > > So, EDIT reads something which can be handeled read/write afterwards. > oh, i'm very sorry, i just read the gambas doc entry entirely, Connection.Create() creates a read/write result for creating records, i thought it would create a new table an returns an empty result-.- hmm, but a new question: to add 2 new records, do i have to call Connection.Create() twice? or is there an easier way?? From gambas at ...1... Wed Nov 17 14:46:18 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 17 Nov 2010 14:46:18 +0100 Subject: [Gambas-user] Result object In-Reply-To: <4CE3DAA6.4020706@...20...> References: <1289945782.6381.2.camel@...40...> <4CE3DAA6.4020706@...20...> Message-ID: <201011171446.18920.gambas@...1...> > Charlie Reinl schrieb: > > Am Dienstag, den 16.11.2010, 21:44 +0100 schrieb tobias: > >> Charlie Reinl schrieb: > >>> Am Montag, den 15.11.2010, 19:56 +0100 schrieb tobias: > >>>> hi, > >>>> i have again another question about the result object... > >>>> when i do: > >>>> hResult = hConnection.Edit("table") > >>>> > >>>> i get a read/write result, i can move through the elements and edit > >>>> their fields, e.g. > >>>> hResult.MoveTo(2) > >>>> hResult["id"] = 10 > >>>> > >>>> right? > >>>> but where do i have to move to to add one (or more) new element/s?? > >>> > >>> Salut Tobias, > >>> > >>> hResult = hConnection.Create("table") > >>> > >>> should to the job > >> > >> this maybe works but in theory i can't imagine why...? > > > > Sorry, I can't follow you. > > > > EDIT reads something which can be handeled read/write afterwards. > > > > Where is the problem with CREATE ? > > > > CREATE, creates something new, and throws immediately an EDIT. > > > > So, EDIT reads something which can be handeled read/write afterwards. > > oh, i'm very sorry, i just read the gambas doc entry entirely, > Connection.Create() creates a read/write result for creating records, i > thought it would create a new table an returns an empty result-.- > hmm, but a new question: to add 2 new records, do i have to call > Connection.Create() twice? or is there an easier way?? > Once you have call the Update() method on the Result object, you can use it again to create another record. Regards, -- Beno?t Minisini From tobiasboe1 at ...20... Wed Nov 17 14:58:56 2010 From: tobiasboe1 at ...20... (tobias) Date: Wed, 17 Nov 2010 14:58:56 +0100 Subject: [Gambas-user] Result object In-Reply-To: <201011171446.18920.gambas@...1...> References: <1289945782.6381.2.camel@...40...> <4CE3DAA6.4020706@...20...> <201011171446.18920.gambas@...1...> Message-ID: <4CE3DFA0.9080709@...20...> Beno?t Minisini schrieb: >> Charlie Reinl schrieb: >>> Am Dienstag, den 16.11.2010, 21:44 +0100 schrieb tobias: >>>> Charlie Reinl schrieb: >>>>> Am Montag, den 15.11.2010, 19:56 +0100 schrieb tobias: >>>>>> hi, >>>>>> i have again another question about the result object... >>>>>> when i do: >>>>>> hResult = hConnection.Edit("table") >>>>>> >>>>>> i get a read/write result, i can move through the elements and edit >>>>>> their fields, e.g. >>>>>> hResult.MoveTo(2) >>>>>> hResult["id"] = 10 >>>>>> >>>>>> right? >>>>>> but where do i have to move to to add one (or more) new element/s?? >>>>> Salut Tobias, >>>>> >>>>> hResult = hConnection.Create("table") >>>>> >>>>> should to the job >>>> this maybe works but in theory i can't imagine why...? >>> Sorry, I can't follow you. >>> >>> EDIT reads something which can be handeled read/write afterwards. >>> >>> Where is the problem with CREATE ? >>> >>> CREATE, creates something new, and throws immediately an EDIT. >>> >>> So, EDIT reads something which can be handeled read/write afterwards. >> oh, i'm very sorry, i just read the gambas doc entry entirely, >> Connection.Create() creates a read/write result for creating records, i >> thought it would create a new table an returns an empty result-.- >> hmm, but a new question: to add 2 new records, do i have to call >> Connection.Create() twice? or is there an easier way?? >> > > Once you have call the Update() method on the Result object, you can use it > again to create another record. > > Regards, > so i have to .Create(), input, .Update(), .Create(), input and .Update()? not .Create(), input, .Update(), input, .Update()? thank you for your help! From gambas.fr at ...626... Wed Nov 17 17:09:57 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Wed, 17 Nov 2010 17:09:57 +0100 Subject: [Gambas-user] Result object In-Reply-To: <4CE3DFA0.9080709@...20...> References: <1289945782.6381.2.camel@...40...> <4CE3DAA6.4020706@...20...> <201011171446.18920.gambas@...1...> <4CE3DFA0.9080709@...20...> Message-ID: no just create one time... and then ... just call update between each entry 2010/11/17 tobias : > Beno?t Minisini schrieb: >>> Charlie Reinl schrieb: >>>> Am Dienstag, den 16.11.2010, 21:44 +0100 schrieb tobias: >>>>> Charlie Reinl schrieb: >>>>>> Am Montag, den 15.11.2010, 19:56 +0100 schrieb tobias: >>>>>>> hi, >>>>>>> i have again another question about the result object... >>>>>>> when i do: >>>>>>> hResult = hConnection.Edit("table") >>>>>>> >>>>>>> i get a read/write result, i can move through the elements and edit >>>>>>> their fields, e.g. >>>>>>> hResult.MoveTo(2) >>>>>>> hResult["id"] = 10 >>>>>>> >>>>>>> right? >>>>>>> but where do i have to move to to add one (or more) new element/s?? >>>>>> Salut Tobias, >>>>>> >>>>>> hResult = hConnection.Create("table") >>>>>> >>>>>> should to the job >>>>> this maybe works but in theory i can't imagine why...? >>>> Sorry, I can't follow you. >>>> >>>> EDIT reads something which can be handeled read/write afterwards. >>>> >>>> Where is the problem with CREATE ?? >>>> >>>> CREATE, creates something new, and throws immediately an EDIT. >>>> >>>> So, EDIT reads something which can be handeled read/write afterwards. >>> oh, i'm very sorry, i just read the gambas doc entry entirely, >>> Connection.Create() creates a read/write result for creating records, i >>> thought it would create a new table an returns an empty result-.- >>> hmm, but a new question: to add 2 new records, do i have to call >>> Connection.Create() twice? or is there an easier way?? >>> >> >> Once you have call the Update() method on the Result object, you can use it >> again to create another record. >> >> Regards, >> > so i have to .Create(), input, .Update(), .Create(), input and .Update()? > not .Create(), input, .Update(), input, .Update()? > > thank you for your help! > > ------------------------------------------------------------------------------ > Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ?ECMAScript5, and DOM L2 & L3. > Spend less time writing and ?rewriting code and more time creating great > experiences on the web. Be a part of the beta today > http://p.sf.net/sfu/msIE9-sfdev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Fabien Bodard From gambas.fr at ...626... Wed Nov 17 17:11:16 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Wed, 17 Nov 2010 17:11:16 +0100 Subject: [Gambas-user] Result object In-Reply-To: References: <1289945782.6381.2.camel@...40...> <4CE3DAA6.4020706@...20...> <201011171446.18920.gambas@...1...> <4CE3DFA0.9080709@...20...> Message-ID: hResult = db.Create("mytable") for i = 0 to 10 hResult["name"]="toto " & i hResult!Firstname = "titi " & i hResult.Update next 2010/11/17 Fabien Bodard : > no just create one time... and then ... just call update between each entry > > > > 2010/11/17 tobias : >> Beno?t Minisini schrieb: >>>> Charlie Reinl schrieb: >>>>> Am Dienstag, den 16.11.2010, 21:44 +0100 schrieb tobias: >>>>>> Charlie Reinl schrieb: >>>>>>> Am Montag, den 15.11.2010, 19:56 +0100 schrieb tobias: >>>>>>>> hi, >>>>>>>> i have again another question about the result object... >>>>>>>> when i do: >>>>>>>> hResult = hConnection.Edit("table") >>>>>>>> >>>>>>>> i get a read/write result, i can move through the elements and edit >>>>>>>> their fields, e.g. >>>>>>>> hResult.MoveTo(2) >>>>>>>> hResult["id"] = 10 >>>>>>>> >>>>>>>> right? >>>>>>>> but where do i have to move to to add one (or more) new element/s?? >>>>>>> Salut Tobias, >>>>>>> >>>>>>> hResult = hConnection.Create("table") >>>>>>> >>>>>>> should to the job >>>>>> this maybe works but in theory i can't imagine why...? >>>>> Sorry, I can't follow you. >>>>> >>>>> EDIT reads something which can be handeled read/write afterwards. >>>>> >>>>> Where is the problem with CREATE ?? >>>>> >>>>> CREATE, creates something new, and throws immediately an EDIT. >>>>> >>>>> So, EDIT reads something which can be handeled read/write afterwards. >>>> oh, i'm very sorry, i just read the gambas doc entry entirely, >>>> Connection.Create() creates a read/write result for creating records, i >>>> thought it would create a new table an returns an empty result-.- >>>> hmm, but a new question: to add 2 new records, do i have to call >>>> Connection.Create() twice? or is there an easier way?? >>>> >>> >>> Once you have call the Update() method on the Result object, you can use it >>> again to create another record. >>> >>> Regards, >>> >> so i have to .Create(), input, .Update(), .Create(), input and .Update()? >> not .Create(), input, .Update(), input, .Update()? >> >> thank you for your help! >> >> ------------------------------------------------------------------------------ >> Beautiful is writing same markup. Internet Explorer 9 supports >> standards for HTML5, CSS3, SVG 1.1, ?ECMAScript5, and DOM L2 & L3. >> Spend less time writing and ?rewriting code and more time creating great >> experiences on the web. Be a part of the beta today >> http://p.sf.net/sfu/msIE9-sfdev2dev >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > > > -- > Fabien Bodard > -- Fabien Bodard From gambas at ...1... Wed Nov 17 17:33:07 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 17 Nov 2010 17:33:07 +0100 Subject: [Gambas-user] ARM hardware In-Reply-To: <4CE401B7.5050706@...1740...> References: <4CE401B7.5050706@...1740...> Message-ID: <201011171733.07269.gambas@...1...> > Hi Benoit, > > No question or bugreport this time... Ow. It's a pity. :-) > > Just a mail to tell you that some users of my project managed to install > and run Gambas (and DomotiGa) on small ARM computers like the > BeagleBoard and the SheevaPlug computer. > > See here for more info. > http://www.domotiga.nl/wiki/Domotiga/HardwareUsed > > Really nice...! > > Regards, > Ron_2nd. So cool. I tell the mailing-list! -- Beno?t Minisini From demosthenesk at ...626... Wed Nov 17 18:30:49 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Wed, 17 Nov 2010 19:30:49 +0200 Subject: [Gambas-user] About help and arrays and variables In-Reply-To: <201011171249.47203.gambas@...1...> References: <1289994337.4274.9.camel@...2493...> <201011171249.47203.gambas@...1...> Message-ID: <1290015049.7776.5.camel@...2493...> Can someone explain embedded arrays further? i understand nothing. i know what a normal array is and that it can be static or dynamic. But "embedded arrays are just a way to access a part of a Gambas object" for example i have a TextBox1 how can i use an embedded array on it? You mean do use the TextBox1 as an array..? For example to enumerate its properties? i cant think what do you mean. If there is an example to demonstrate the differences. Please. On Wed, 2010-11-17 at 12:49 +0100, Beno?t Minisini wrote: > > in http://gambasdoc.org/help/lang/arraydecl?show > > > > the syntax for Embedded arrays is > > > > [ STATIC ] { PUBLIC | PRIVATE } Identifier [ Array dimensions ... ] AS > > Native Datatype > > > > but i could use also the NEW keyword > > > > For example > > > > PUBLIC aNames AS NEW String[2, 2] > > That is a different thing. > > PUBLIC aNames AS New String[2, 2] > > Is the same thing as: > > PUBLIC aNames As String[] > aNames = New String[2, 2] > > Where as: > > PUBLIC aNames[2, 2] As String > > Is an embedded array. > > "Normal" arrays are true Gambas objects, whereas embedded arrays are just a > way to access a part of a Gambas object as an array. The array contents is > stored in the memory slot allocated to the Gambas object where it is declared. > > Regards, > -- Regards, Demosthenes Koptsis. From jussi.lahtinen at ...626... Wed Nov 17 19:35:31 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Wed, 17 Nov 2010 20:35:31 +0200 Subject: [Gambas-user] Elusive Gambas3 crashing bug In-Reply-To: <201011170024.53131.gambas@...1...> References: <201011152211.16911.gambas@...1...> <201011170024.53131.gambas@...1...> Message-ID: > > But then I don't understand why "Finally" exist... > > At least that test function is equal without it. > > Is there proper usage for it, or is it for historical etc reasons? > > > > Finally exists so that you can have some code that is always executed at > the > end of the function, even if there was an error. > OK, so code execution jumps to FINALLY part after error, then to CATCH. Everything between FINALLY and error raising line, is not executed. I had imagine this other ways for some reason... and wrongly. > > BTW. You didn't get errors from any date commands? > > Mmm. No. Be more precise. > 1. Week("07/24/2005") = 30, should be 29 according to Time&Date . 2. This fails randomly: If DateDiff(Now, DateAdd(Date(Now), gb.Day, 2), gb.Day) <> 2 Then Return 160 Endif Though, today with new revision (3299) I haven't be able to reproduce it. I'll look it more closely later. Jussi From jussi.lahtinen at ...626... Wed Nov 17 21:18:21 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Wed, 17 Nov 2010 22:18:21 +0200 Subject: [Gambas-user] Elusive Gambas3 crashing bug In-Reply-To: References: <201011152211.16911.gambas@...1...> <201011170024.53131.gambas@...1...> Message-ID: > This fails randomly: > > If DateDiff(Now, DateAdd(Date(Now), gb.Day, 2), gb.Day) <> 2 Then > Return 160 > Endif > > Though, today with new revision (3299) I haven't be able to reproduce it. > I'll look it more closely later. > OK, now it fails again. If DateDiff(Now, DateAdd(Date(Now), gb.Day, 2), gb.Day) <> 2 Then Debug Now Debug DateAdd(Date(Now), gb.Day, 2) Debug DateDiff(Now, DateAdd(Date(Now), gb.Day, 2), gb.Day) Return 160 Endif mTest.DoTests.842: 17/11/2010 22:08:38 mTest.DoTests.843: 19/11/10 mTest.DoTests.844: 1 More... ? now 17/11/2010 22:10:53 ? date(now) 17/11/10 ? date(2010,11,17,22,11,33) 17/11/2010 22:11:33 So, it seems that date command doesn't always like "now". This seems to happen only at evenings. Jussi Gambas 3 rev 3299 @ Ubuntu 10.04 64bit From gambas.fr at ...626... Wed Nov 17 21:22:44 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Wed, 17 Nov 2010 21:22:44 +0100 Subject: [Gambas-user] ARM hardware In-Reply-To: <201011171733.07269.gambas@...1...> References: <4CE401B7.5050706@...1740...> <201011171733.07269.gambas@...1...> Message-ID: a new step :) Le 17 novembre 2010 17:33, Beno?t Minisini a ?crit : >> Hi Benoit, >> >> No question or bugreport this time... > > Ow. It's a pity. :-) > >> >> Just a mail to tell you that some users of my project managed to install >> and run Gambas (and DomotiGa) on small ARM computers like the >> BeagleBoard and the SheevaPlug computer. >> >> See here for more info. >> http://www.domotiga.nl/wiki/Domotiga/HardwareUsed >> >> Really nice...! >> >> Regards, >> Ron_2nd. > > So cool. I tell the mailing-list! > > -- > Beno?t Minisini > > ------------------------------------------------------------------------------ > Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ?ECMAScript5, and DOM L2 & L3. > Spend less time writing and ?rewriting code and more time creating great > experiences on the web. Be a part of the beta today > http://p.sf.net/sfu/msIE9-sfdev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Fabien Bodard From jussi.lahtinen at ...626... Wed Nov 17 21:23:15 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Wed, 17 Nov 2010 22:23:15 +0200 Subject: [Gambas-user] GambasTester 0.9.9 In-Reply-To: References: <201011152118.33238.gambas@...1...> Message-ID: More errors fixed from GambasTester, and now self test ignores comment lines. Jussi On Mon, Nov 15, 2010 at 23:02, Jussi Lahtinen wrote: > OK, these are not the errors I meant... These are obviously my errors. > I fixed Format$ to be compared against Str$(). > > There might be other similar errors too... > > Jussi > > > > 2010/11/15 Beno?t Minisini > > > If Format$(Pi, "#.##") <> 3.14 Then >> > Return 85 >> > Endif >> > >> > this test can be true only in country where decimal separator is "." >> > >> > >> > in france ... the decimal separator is ","... then you compare a >> > string to a float !! >> > >> > All the error i have are based on this problem. >> > >> >> The problem is your comparison between a string (Format$) and a number. >> The >> number is automatically converted to a string by using CStr(), which does >> not >> use localization contrary to Format$(). >> >> -- >> Beno?t Minisini >> >> >> ------------------------------------------------------------------------------ >> Centralized Desktop Delivery: Dell and VMware Reference Architecture >> Simplifying enterprise desktop deployment and management using >> Dell EqualLogic storage and VMware View: A highly scalable, end-to-end >> client virtualization framework. Read more! >> http://p.sf.net/sfu/dell-eql-dev2dev >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > -------------- next part -------------- A non-text attachment was scrubbed... Name: GambasTester-0.9.12.tar.gz Type: application/x-gzip Size: 14059 bytes Desc: not available URL: From demosthenesk at ...626... Thu Nov 18 13:21:31 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Thu, 18 Nov 2010 14:21:31 +0200 Subject: [Gambas-user] gambas install in a Madriva 2010.0 Message-ID: <1290082891.22608.1.camel@...2493...> i get a No package named libimlib2-devel when i try to install packages with urpmi -- Regards, Demosthenes Koptsis. From gambas at ...1... Thu Nov 18 18:15:43 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Thu, 18 Nov 2010 18:15:43 +0100 Subject: [Gambas-user] gambas install in a Madriva 2010.0 In-Reply-To: <1290082891.22608.1.camel@...2493...> References: <1290082891.22608.1.camel@...2493...> Message-ID: <201011181815.43425.gambas@...1...> > i get a > No package named libimlib2-devel > > when i try to install packages with urpmi If you have a libimlib2 package, you must have a libimlib2-devel package. Or maybe the problem is that you don't have a libimlib2 package? -- Beno?t Minisini From demosthenesk at ...626... Thu Nov 18 19:03:32 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Thu, 18 Nov 2010 20:03:32 +0200 Subject: [Gambas-user] gambas install in a Madriva 2010.0 In-Reply-To: <201011181815.43425.gambas@...1...> References: <1290082891.22608.1.camel@...2493...> <201011181815.43425.gambas@...1...> Message-ID: <1290103413.25609.1.camel@...2493...> On Thu, 2010-11-18 at 18:15 +0100, Beno?t Minisini wrote: > > i get a > > No package named libimlib2-devel > > > > when i try to install packages with urpmi > > If you have a libimlib2 package, you must have a libimlib2-devel package. Or > maybe the problem is that you don't have a libimlib2 package? > i have the default installation of Mandriva 2010.0 i solved this by change libimlib2-devel to lib2-devel -- Regards, Demosthenes Koptsis. From demosthenesk at ...626... Thu Nov 18 19:11:38 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Thu, 18 Nov 2010 20:11:38 +0200 Subject: [Gambas-user] gambas install in a Madriva 2010.0 In-Reply-To: <201011181815.43425.gambas@...1...> References: <1290082891.22608.1.camel@...2493...> <201011181815.43425.gambas@...1...> Message-ID: <1290103898.25857.2.camel@...2493...> although, there is no lib2-devel package! But urpmi did not complaint ... i think it ignored it. On Thu, 2010-11-18 at 18:15 +0100, Beno?t Minisini wrote: > > i get a > > No package named libimlib2-devel > > > > when i try to install packages with urpmi > > If you have a libimlib2 package, you must have a libimlib2-devel package. Or > maybe the problem is that you don't have a libimlib2 package? > -- Regards, Demosthenes Koptsis. From math.eber at ...221... Thu Nov 18 20:41:28 2010 From: math.eber at ...221... (Matti) Date: Thu, 18 Nov 2010 20:41:28 +0100 Subject: [Gambas-user] Problems with make Message-ID: <4CE58168.9060200@...221...> Suddenly, I have strange things in make, and Gambas won't install anymore. Gambas3 rev 3300 OpenSuse 11.2 KDE 4.35 The errors start here: Making all in webkit make[5]: Entering directory `/Platte2/Downloads/gambas3/3300/trunk/gb.qt4/src/webkit' /bin/sh ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -DQT_SHARED -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include/QtNetwork -I/usr/include/QtDBus -I/usr/include/QtXml -I/usr/include/QtWebKit -I../../share -I../../src/share -pipe -Wall -fno-exceptions -Wno-unused-value -fsigned-char -fvisibility=hidden -g -Os -fno-omit-frame-pointer -MT ccookiejar.lo -MD -MP -MF .deps/ccookiejar.Tpo -c -o ccookiejar.lo ccookiejar.cpp libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -DQT_SHARED -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include/QtNetwork -I/usr/include/QtDBus -I/usr/include/QtXml -I/usr/include/QtWebKit -I../../share -I../../src/share -pipe -Wall -fno-exceptions -Wno-unused-value -fsigned-char -fvisibility=hidden -g -Os -fno-omit-frame-pointer -MT ccookiejar.lo -MD -MP -MF .deps/ccookiejar.Tpo -c ccookiejar.cpp -fPIC -DPIC -o .libs/ccookiejar.o In file included from /usr/include/c++/4.4/bits/basic_ios.h:39, from /usr/include/c++/4.4/ios:45, from /usr/include/c++/4.4/ostream:40, from /usr/include/c++/4.4/iterator:65, from /usr/include/QtCore/qlist.h:50, from /usr/include/QtCore/qobject.h:50, from /usr/include/QtGui/qwidget.h:46, from /usr/include/QtGui/QWidget:1, from ../gb.qt.h:32, from main.h:27, from ccookiejar.h:26, from ccookiejar.cpp:27: /usr/include/c++/4.4/bits/locale_facets.h:225: error: expected ?;? before ?.? token /usr/include/c++/4.4/bits/locale_facets.h:239: error: expected ?;? before ?const? /usr/include/c++/4.4/bits/locale_facets.h:240: error: expected ?;? before ?.? token /usr/include/c++/4.4/bits/locale_facets.h:253: error: expected ?;? before ?char_type? /usr/include/c++/4.4/bits/locale_facets.h:254: error: expected ?;? before ?.? token /usr/include/c++/4.4/bits/locale_facets.h:268: error: expected ?;? before ?const? /usr/include/c++/4.4/bits/locale_facets.h:269: error: expected ?;? before ?.? token /usr/include/c++/4.4/bits/locale_facets.h:285: error: expected ?;? before ?char_type? /usr/include/c++/4.4/bits/locale_facets.h:795: error: expected ?;? before ?.? token /usr/include/c++/4.4/bits/locale_facets.h:811: error: expected ?;? before ?const? /usr/include/c++/4.4/bits/locale_facets.h:812: error: expected ?;? before ?.? token /usr/include/c++/4.4/bits/locale_facets.h:827: error: expected ?;? before ?char_type? /usr/include/c++/4.4/bits/locale_facets.h:828: error: expected ?;? before ?.? token /usr/include/c++/4.4/bits/locale_facets.h:844: error: expected ?;? before ?const? /usr/include/c++/4.4/bits/locale_facets.h:845: error: expected ?;? before ?.? token /usr/include/c++/4.4/bits/locale_facets.h:864: error: expected ?;? before ?char_type? In file included from /usr/include/c++/4.4/bits/basic_ios.h:39, from /usr/include/c++/4.4/ios:45, from /usr/include/c++/4.4/ostream:40, from /usr/include/c++/4.4/iterator:65, from /usr/include/QtCore/qlist.h:50, from /usr/include/QtCore/qobject.h:50, from /usr/include/QtGui/qwidget.h:46, from /usr/include/QtGui/QWidget:1, from ../gb.qt.h:32, from main.h:27, from ccookiejar.h:26, from ccookiejar.cpp:27: /usr/include/c++/4.4/bits/locale_facets.h:2587: error: expected initializer before ?.? token /usr/include/c++/4.4/bits/locale_facets.h:2593: error: expected initializer before ?.? token make[5]: *** [ccookiejar.lo] Fehler 1 make[5]: Leaving directory `/Platte2/Downloads/gambas3/3300/trunk/gb.qt4/src/webkit' make[4]: *** [all-recursive] Fehler 1 make[4]: Leaving directory `/Platte2/Downloads/gambas3/3300/trunk/gb.qt4/src' make[3]: *** [all-recursive] Fehler 1 make[3]: Leaving directory `/Platte2/Downloads/gambas3/3300/trunk/gb.qt4' make[2]: *** [all] Fehler 2 make[2]: Leaving directory `/Platte2/Downloads/gambas3/3300/trunk/gb.qt4' make[1]: *** [all-recursive] Fehler 1 make[1]: Leaving directory `/Platte2/Downloads/gambas3/3300/trunk' make: *** [all] Fehler 2 Any ideas what to do now? Regards Matti From gambas at ...1... Fri Nov 19 01:33:42 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Fri, 19 Nov 2010 01:33:42 +0100 Subject: [Gambas-user] Problems with make In-Reply-To: <4CE58168.9060200@...221...> References: <4CE58168.9060200@...221...> Message-ID: <201011190133.42969.gambas@...1...> > Suddenly, I have strange things in make, and Gambas won't install anymore. > > Gambas3 rev 3300 > OpenSuse 11.2 > KDE 4.35 > Is it better with revision #3301? -- Beno?t Minisini From gambas at ...1... Fri Nov 19 01:36:11 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Fri, 19 Nov 2010 01:36:11 +0100 Subject: [Gambas-user] About array Initialization In-Reply-To: <1289989341.3063.1.camel@...2493...> References: <1289989341.3063.1.camel@...2493...> Message-ID: <201011190136.11823.gambas@...1...> > Good morning to all! > > we can do an array initialization such as > > DIM aNumbers AS Integer[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] > > but not > DIM aNumbers AS Integer[10] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] > > > why is that? No real reason, except that the second syntax is useless: you are creating a array of ten integers that you are replacing with another array of ten integers. The first array is freed. Dim xxx As yyy[] = [ ... ] is not just an array initialization like in C. It actually runs the [ ... ] operator to create an array at runtime. Regards, -- Beno?t Minisini From gambas at ...1... Fri Nov 19 01:37:33 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Fri, 19 Nov 2010 01:37:33 +0100 Subject: [Gambas-user] About help and arrays and variables In-Reply-To: <1289990289.3063.15.camel@...2493...> References: <1289990289.3063.15.camel@...2493...> Message-ID: <201011190137.33472.gambas@...1...> > Hi again, > > i am writing my book and now i am in the section about arrays. > > i see that in help wiki the pages about arrays are mixed up with > variables subject. > > This is not well readable and understood. > > I feel that the arrays try to be described in a general way like > variables. > > For example > > 1) in http://gambasdoc.org/help/lang/vardecl?show > > the syntax is > > [ STATIC ] { PUBLIC | PRIVATE } Identifier [ Embedded array > declaration ] AS Datatype [ = Expression ] > > and is mentioned the [ Embedded array declaration ]. > > > 2) in the other hand in http://gambasdoc.org/help/lang/arraydecl?show > > the infos are very mixed up. It is not easy readable and understood by a > beginner. > > In my book i follow the next way to describe these subjects. > > Variables > Scope (local, global) > Declaration of local vars > Declaration of global vars > Initialization > > Arrays > Scope (local, global) > Declaration of local arrays > Declaration of global arrays > Initialization > Static arrays > Dynamic arrays > > i propose to a similar way for the wiki so these subjects to be easy to > read and understand and not to have all the info in one or two pages all > together. You are right, and you can do the change if you want! -- Beno?t Minisini From gambas at ...1... Fri Nov 19 01:38:01 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Fri, 19 Nov 2010 01:38:01 +0100 Subject: [Gambas-user] About help and arrays and variables In-Reply-To: <1290015049.7776.5.camel@...2493...> References: <1289994337.4274.9.camel@...2493...> <201011171249.47203.gambas@...1...> <1290015049.7776.5.camel@...2493...> Message-ID: <201011190138.01701.gambas@...1...> > Can someone explain embedded arrays further? > > i understand nothing. > > i know what a normal array is and that it can be static or dynamic. > > But "embedded arrays are just a way to access a part of a Gambas object" > > for example i have a TextBox1 how can i use an embedded array on it? > > You mean do use the TextBox1 as an array..? For example to enumerate its > properties? i cant think what do you mean. > > If there is an example to demonstrate the differences. Please. > First, have you read the documentation page about Gambas object model? -- Beno?t Minisini From gambas at ...1... Fri Nov 19 01:40:13 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Fri, 19 Nov 2010 01:40:13 +0100 Subject: [Gambas-user] WAIT command questions. In-Reply-To: <1289981048.21019.5.camel@...2493...> References: <1289932145.14611.3.camel@...2493...> <201011170003.07611.gambas@...1...> <1289981048.21019.5.camel@...2493...> Message-ID: <201011190140.13811.gambas@...1...> > On Wed, 2010-11-17 at 00:03 +0100, Beno?t Minisini wrote: > > > In manual for WAIT, it is said that > > > > > > If Delay is not specified, the functions processes every events and > > > returns immediately. In this case, keyboard and mouse events are > > > ignored. > > > > > > i dont understand this. > > > > > > What does it mean "the functions processes every event" ? > > > Which functions? > > > > > > We talk about event loop functions? > > > > > > Please explain, > > > > > > thanks. > > > > The wiki page was badly written. Is it clearer now ? > > Ok, now i understand it, thanks! > > One question more. > > The SUBs event_read() such "PUBLIC SUB MySerialPort_Read()" in example > are raised recursively again and again if WAIT is called from them > because they are part of event loop or because event loop call them > again and again? Because the event loop calls it again and again. You can try something like that yourself in the code with a Timer: you create a timer with a short delay (e.g. 100 ms), and in the Timer event handler, you call WAIT with a big delay (1 second). Then, stop the project in the IDE, and look at the stack. > How do they work? How do they work what? -- Beno?t Minisini From math.eber at ...221... Fri Nov 19 08:17:18 2010 From: math.eber at ...221... (Matti) Date: Fri, 19 Nov 2010 08:17:18 +0100 Subject: [Gambas-user] Problems with make In-Reply-To: <201011190133.42969.gambas@...1...> References: <4CE58168.9060200@...221...> <201011190133.42969.gambas@...1...> Message-ID: <4CE6247E.5040104@...221...> Yes! Am 19.11.2010 01:33, schrieb Beno?t Minisini: >> Suddenly, I have strange things in make, and Gambas won't install anymore. >> >> Gambas3 rev 3300 >> OpenSuse 11.2 >> KDE 4.35 >> > > Is it better with revision #3301? > From demosthenesk at ...626... Fri Nov 19 08:37:24 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Fri, 19 Nov 2010 09:37:24 +0200 Subject: [Gambas-user] About array Initialization In-Reply-To: <201011190136.11823.gambas@...1...> References: <1289989341.3063.1.camel@...2493...> <201011190136.11823.gambas@...1...> Message-ID: <1290152244.2005.2.camel@...2494...> ok, another question... the only way to init a static array aNumbers[10] is aNumbers[0]=1 aNumbers[1]=2 aNumbers[2]=12 aNumbers[3]=13 .... On Fri, 2010-11-19 at 01:36 +0100, Beno?t Minisini wrote: > > Good morning to all! > > > > we can do an array initialization such as > > > > DIM aNumbers AS Integer[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] > > > > but not > > DIM aNumbers AS Integer[10] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] > > > > > > why is that? > > No real reason, except that the second syntax is useless: you are creating a > array of ten integers that you are replacing with another array of ten > integers. The first array is freed. > > Dim xxx As yyy[] = [ ... ] is not just an array initialization like in C. It > actually runs the [ ... ] operator to create an array at runtime. > > Regards, > From gambas.fr at ...626... Fri Nov 19 08:48:45 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Fri, 19 Nov 2010 08:48:45 +0100 Subject: [Gambas-user] About array Initialization In-Reply-To: <1290152244.2005.2.camel@...2494...> References: <1289989341.3063.1.camel@...2493...> <201011190136.11823.gambas@...1...> <1290152244.2005.2.camel@...2494...> Message-ID: 2010/11/19 Demosthenes Koptsis : > ok, > another question... > > the only way to init a static array aNumbers[10] is > > aNumbers[0]=1 > aNumbers[1]=2 > aNumbers[2]=12 > aNumbers[3]=13 > .... yes a static array is not an object ... that's why it's a little bit deprecated :) anther way : dim htmpArray as integer[]= [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] dim i as integer For i = 0 to hTmparray.max aNumbers.add( htmpArray[i]) next Stupid ... isn't it ? the power of modern langage is to simplify the synthax with objects... > > > On Fri, 2010-11-19 at 01:36 +0100, Beno?t Minisini wrote: >> > Good morning to all! >> > >> > we can do an array initialization such as >> > >> > ? DIM aNumbers AS Integer[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] >> > >> > but not >> > ? DIM aNumbers AS Integer[10] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] >> > >> > >> > why is that? >> >> No real reason, except that the second syntax is useless: you are creating a >> array of ten integers that you are replacing with another array of ten >> integers. The first array is freed. >> >> Dim xxx As yyy[] = [ ... ] is not just an array initialization like in C. It >> actually runs the [ ... ] operator to create an array at runtime. >> >> Regards, >> > > > > ------------------------------------------------------------------------------ > Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ?ECMAScript5, and DOM L2 & L3. > Spend less time writing and ?rewriting code and more time creating great > experiences on the web. Be a part of the beta today > http://p.sf.net/sfu/msIE9-sfdev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Fabien Bodard From demosthenesk at ...626... Fri Nov 19 08:49:33 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Fri, 19 Nov 2010 09:49:33 +0200 Subject: [Gambas-user] About help and arrays and variables In-Reply-To: <201011190137.33472.gambas@...1...> References: <1289990289.3063.15.camel@...2493...> <201011190137.33472.gambas@...1...> Message-ID: <1290152973.2005.13.camel@...2494...> Beno?t, i am thinking seriously to undertake the work of Greek translation of wiki (gambas help). I ll tell for that in the future. But for now i will stay to writing the book. i prefer the changes to be made by someone else with more experience, like you and i follow the translation cause some things as embedded arrays i didnt understand it well. in the next categorization we can add embedded arrays and array operator [...] > Arrays > > Scope (local, global) > > Declaration of local arrays > > Declaration of global arrays > > Initialization > > Static arrays > > Dynamic arrays Embedded arrays Array operator [...] is there anything else about arrays? On Fri, 2010-11-19 at 01:37 +0100, Beno?t Minisini wrote: > > Hi again, > > > > i am writing my book and now i am in the section about arrays. > > > > i see that in help wiki the pages about arrays are mixed up with > > variables subject. > > > > This is not well readable and understood. > > > > I feel that the arrays try to be described in a general way like > > variables. > > > > For example > > > > 1) in http://gambasdoc.org/help/lang/vardecl?show > > > > the syntax is > > > > [ STATIC ] { PUBLIC | PRIVATE } Identifier [ Embedded array > > declaration ] AS Datatype [ = Expression ] > > > > and is mentioned the [ Embedded array declaration ]. > > > > > > 2) in the other hand in http://gambasdoc.org/help/lang/arraydecl?show > > > > the infos are very mixed up. It is not easy readable and understood by a > > beginner. > > > > In my book i follow the next way to describe these subjects. > > > > Variables > > Scope (local, global) > > Declaration of local vars > > Declaration of global vars > > Initialization > > > > Arrays > > Scope (local, global) > > Declaration of local arrays > > Declaration of global arrays > > Initialization > > Static arrays > > Dynamic arrays > > > > i propose to a similar way for the wiki so these subjects to be easy to > > read and understand and not to have all the info in one or two pages all > > together. > > You are right, and you can do the change if you want! > From gambas.fr at ...626... Fri Nov 19 09:07:58 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Fri, 19 Nov 2010 09:07:58 +0100 Subject: [Gambas-user] About help and arrays and variables In-Reply-To: <201011190138.01701.gambas@...1...> References: <1289994337.4274.9.camel@...2493...> <201011171249.47203.gambas@...1...> <1290015049.7776.5.camel@...2493...> <201011190138.01701.gambas@...1...> Message-ID: http://gambasdoc.org/help/cat/objectmodel http://gambasdoc.org/help/cat/arraydecl Ok so, an embedd array is a private array... you cannot give it as argument throw a procedure ex : Public mysub(myVar as MyArray[]) Like we can do with a dynamic array that have global reference such as any objects The embedd array have the same memory space than the object into it is initialized... so it die with this object A dynamic array will be alive all the time it is referenced somewhere in the project. like any gambas objects. Yes i prefer dynamics one ... and i think , like Benoit i don't use static one any more. Le 19 novembre 2010 01:38, Beno?t Minisini a ?crit : >> Can someone explain embedded arrays further? >> >> i understand nothing. >> >> i know what a normal array is and that it can be static or dynamic. >> >> But "embedded arrays are just a way to access a part of a Gambas object" >> >> for example i have a TextBox1 how can i use an embedded array on it? >> >> You mean do use the TextBox1 as an array..? For example to enumerate its >> properties? i cant think what do you mean. >> >> If there is an example to demonstrate the differences. Please. >> > > First, have you read the documentation page about Gambas object model? > > -- > Beno?t Minisini > > ------------------------------------------------------------------------------ > Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ?ECMAScript5, and DOM L2 & L3. > Spend less time writing and ?rewriting code and more time creating great > experiences on the web. Be a part of the beta today > http://p.sf.net/sfu/msIE9-sfdev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Fabien Bodard From gambas.fr at ...626... Fri Nov 19 09:12:22 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Fri, 19 Nov 2010 09:12:22 +0100 Subject: [Gambas-user] About help and arrays and variables In-Reply-To: References: <1289994337.4274.9.camel@...2493...> <201011171249.47203.gambas@...1...> <1290015049.7776.5.camel@...2493...> <201011190138.01701.gambas@...1...> Message-ID: 2010/11/19 Fabien Bodard : > http://gambasdoc.org/help/cat/objectmodel > > http://gambasdoc.org/help/cat/arraydecl > > Ok so, > > > an embedd array is a private array... oups i forgot to read this line in the help : "In Gambas 3, embedded arrays cannot be used as local variables anymore. But they can be public!" so the only advantage to static array i see it's that they die with the object :) > you cannot give it as argument throw a procedure ex : > > Public mysub(myVar as MyArray[]) > > Like we can do with a dynamic array that have global reference such as > any objects > > > The embedd array have the same memory space than the object into it is > initialized... so it die with this object > > > A dynamic array will be alive all the time it is referenced somewhere > in the project. like any gambas objects. > > > Yes i prefer dynamics one ... and i think , like Benoit i don't use > static one any more. > > > Le 19 novembre 2010 01:38, Beno?t Minisini > a ?crit : >>> Can someone explain embedded arrays further? >>> >>> i understand nothing. >>> >>> i know what a normal array is and that it can be static or dynamic. >>> >>> But "embedded arrays are just a way to access a part of a Gambas object" >>> >>> for example i have a TextBox1 how can i use an embedded array on it? >>> >>> You mean do use the TextBox1 as an array..? For example to enumerate its >>> properties? i cant think what do you mean. >>> >>> If there is an example to demonstrate the differences. Please. >>> >> >> First, have you read the documentation page about Gambas object model? >> >> -- >> Beno?t Minisini >> >> ------------------------------------------------------------------------------ >> Beautiful is writing same markup. Internet Explorer 9 supports >> standards for HTML5, CSS3, SVG 1.1, ?ECMAScript5, and DOM L2 & L3. >> Spend less time writing and ?rewriting code and more time creating great >> experiences on the web. Be a part of the beta today >> http://p.sf.net/sfu/msIE9-sfdev2dev >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > > > -- > Fabien Bodard > -- Fabien Bodard From bbruen at ...2308... Fri Nov 19 10:18:27 2010 From: bbruen at ...2308... (Bruce Bruen) Date: Fri, 19 Nov 2010 19:48:27 +1030 Subject: [Gambas-user] BUG: postgresql dropped columns Message-ID: <201011191948.28236.bbruen@...2308...> If a column from a postgresql table is dropped, postgresql does not actually remove the column, from the help files: "The DROP COLUMN form does not physically remove the column, but simply makes it invisible to SQL operations. Subsequent insert and update operations in the table will store a null value for the column. Thus, dropping a column is quick but it will not immediately reduce the on-disk size of your table, as the space occupied by the dropped column is not reclaimed. The space will be reclaimed over time as existing rows are updated. (These statements do not apply when dropping the system oid column; that is done with an immediate rewrite.)" (My emphasis) Gambas does not respect this and continually returns a database error on subsequent row updates, viz: Database level error (-1) Cannot modify record: ERROR: column "........pg.dropped.8........" of relation "track" does not exist This is a fundamental error. -- best regards Bruce Bruen From ihaywood at ...1979... Fri Nov 19 12:31:28 2010 From: ihaywood at ...1979... (Ian Haywood) Date: Fri, 19 Nov 2010 22:31:28 +1100 Subject: [Gambas-user] Installing gambas3 on LinuxMint In-Reply-To: References: <4CDB9069.4030503@...1904...> Message-ID: On Fri, Nov 12, 2010 at 8:22 PM, Ian Haywood wrote: > On Thu, Nov 11, 2010 at 5:42 PM, Dr. Martin Senftleben > wrote: > >> I want to install gambas3 on my LinuxMint machine (64bit), but it >> doesn't work, the gambas3-gb-db-mysql package cannot be installed, >> because it requires libmysqlclient15off, which is not available. I have >> libmysqlclient16 on the system, and libmysqlclient15off is not on the >> list of installable packages. >> >> Any ideas? > Where are you getting these packages from? > if they are mine, then the issue is they are compiled against an older > version of > Ubuntu than what you are using I have updated the packages to the latest svn (3301), and now they are compiled for karmic, lucid, and maverick, the three most recent Ubuntu releases. For Linux Mint, I'd try with the Ubuntu Maverick release, so add the following to /etc/apt/sources.list deb http://ppa.launchpad.net/ihaywood3/gambas3/ubuntu maverick main deb-src http://ppa.launchpad.net/ihaywood3/gambas3/ubuntu maverick main then enter sudo apt-get update sudo apt-get install gambas3 and hopefully gambas should be installed! Ian From demosthenesk at ...626... Fri Nov 19 13:27:23 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Fri, 19 Nov 2010 14:27:23 +0200 Subject: [Gambas-user] About help and arrays and variables In-Reply-To: <201011190138.01701.gambas@...1...> References: <1289994337.4274.9.camel@...2493...> <201011171249.47203.gambas@...1...> <1290015049.7776.5.camel@...2493...> <201011190138.01701.gambas@...1...> Message-ID: <1290169643.12614.32.camel@...2493...> On Fri, 2010-11-19 at 01:38 +0100, Beno?t Minisini wrote: > > Can someone explain embedded arrays further? > > > > i understand nothing. > > > > i know what a normal array is and that it can be static or dynamic. > > > > But "embedded arrays are just a way to access a part of a Gambas object" > > > > for example i have a TextBox1 how can i use an embedded array on it? > > > > You mean do use the TextBox1 as an array..? For example to enumerate its > > properties? i cant think what do you mean. > > > > If there is an example to demonstrate the differences. Please. > > > > First, have you read the documentation page about Gambas object model? > Yes i did. But i try to understand. Thanks Fabien! So 1) PRIVATE aInt1[3] AS Integer is an embedded array of integers with 3 elements in an object for example FMain. 2) DIM iFieldr AS NEW Integer[9] is a static array of integers with 9 elements 3) Also PRIVATE Languages AS String[] = [ "fr", "it", "es", "de", "ja" ] is a static !!! (so far i thought that this was a dynamic array, because it was declared with no dimensions PRIVATE Languages AS String[]) 4) A dynamic array has global reference, where is it declared ? A dynamic array declaration how is it? Example? ps: so far i knew that 1) a static array has fixed dimensions, cannot be resized 2) a dynamic array can be resized, has no static dimensions. so i thought a DIM aInt AS Integer[5] is a static and PRIVATE aInt AS Integer[] is a dynamic but i saw that in both declarations i can do aInt.Add(6) and to add elements. The terminology of static and dynamic is different in Gambas or i am wrong again? 2010/11/19 Fabien Bodard : > http://gambasdoc.org/help/cat/objectmodel > > http://gambasdoc.org/help/cat/arraydecl > > Ok so, > > > an embedd array is a private array... > >oups i forgot to read this line in the help : > >"In Gambas 3, embedded arrays cannot be used as local variables >anymore. But they can be public!" > >so the only advantage to static array i see it's that they die with >the object :) > > you cannot give it as argument throw a procedure ex : > > Public mysub(myVar as MyArray[]) > > Like we can do with a dynamic array that have global reference such as > any objects > > > The embedd array have the same memory space than the object into it is > initialized... so it die with this object > > > A dynamic array will be alive all the time it is referenced somewhere > in the project. like any gambas objects. > > > Yes i prefer dynamics one ... and i think , like Benoit i don't use > static one any more. > > > Le 19 novembre 2010 01:38, Beno?t Minisini > a ?crit : >>> Can someone explain embedded arrays further? >>> >>> i understand nothing. >>> >>> i know what a normal array is and that it can be static or dynamic. >>> >>> But "embedded arrays are just a way to access a part of a Gambas object" >>> >>> for example i have a TextBox1 how can i use an embedded array on it? >>> >>> You mean do use the TextBox1 as an array..? For example to enumerate its >>> properties? i cant think what do you mean. >>> >>> If there is an example to demonstrate the differences. Please. >>> >> >> First, have you read the documentation page about Gambas object model? >> >> -- >> Beno?t Minisini >> >> ------------------------------------------------------------------------------ >> Beautiful is writing same markup. Internet Explorer 9 supports >> standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. >> Spend less time writing and rewriting code and more time creating great >> experiences on the web. Be a part of the beta today >> http://p.sf.net/sfu/msIE9-sfdev2dev >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > > > -- > Fabien Bodard > From mdavies5 at ...169... Fri Nov 19 13:33:49 2010 From: mdavies5 at ...169... (Michael) Date: Fri, 19 Nov 2010 23:33:49 +1100 Subject: [Gambas-user] SUb Routines with a return value In-Reply-To: References: <4CDB9069.4030503@...1904...> Message-ID: <4CE66EAD.9010708@...169...> I have been using popup menus for the first time and got the following from the Gambas help. "PUBLIC SUB Action_Activate(key AS String) AS Boolean" I assumed this was an error as only functions have a return value so I changed it "Public Function...". Then on my line "mnuPopup.Popup()" it got an error "no return value". Then I modified the line to "PUBLIC SUB..." with no "as Boolean". and got the same error. However it all works perfectly when written as a SUB with a return value. Is this intended? One more question? Can Gambas 3 be installed alongside Gambas 2 on Ubuntu Maverick? Thanks Mike From gambas.fr at ...626... Fri Nov 19 14:01:02 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Fri, 19 Nov 2010 14:01:02 +0100 Subject: [Gambas-user] About help and arrays and variables In-Reply-To: <1290169643.12614.32.camel@...2493...> References: <1289994337.4274.9.camel@...2493...> <201011171249.47203.gambas@...1...> <1290015049.7776.5.camel@...2493...> <201011190138.01701.gambas@...1...> <1290169643.12614.32.camel@...2493...> Message-ID: 2010/11/19 Demosthenes Koptsis : > On Fri, 2010-11-19 at 01:38 +0100, Beno?t Minisini wrote: >> > Can someone explain embedded arrays further? >> > >> > i understand nothing. >> > >> > i know what a normal array is and that it can be static or dynamic. >> > >> > But "embedded arrays are just a way to access a part of a Gambas object" >> > >> > for example i have a TextBox1 how can i use an embedded array on it? >> > >> > You mean do use the TextBox1 as an array..? For example to enumerate its >> > properties? i cant think what do you mean. >> > >> > If there is an example to demonstrate the differences. Please. >> > >> >> First, have you read the documentation page about Gambas object model? >> > > Yes i did. But i try to understand. > > Thanks Fabien! > > So > > 1) PRIVATE aInt1[3] AS Integer > is an embedded array of integers with 3 elements in an object for > example FMain. > > 2) DIM iFieldr AS NEW Integer[9] > is a static array of integers with 9 elements > > 3) Also PRIVATE Languages AS String[] = [ "fr", "it", "es", "de", "ja" ] > is a static !!! no ..dynamic ... you are assigned a dynamic array = [...] in fact [...] generate an array and you assign it's internal ref to the variable string array Languages > (so far i thought that this was a dynamic array, because it was declared > with no dimensions PRIVATE Languages AS String[]) > > 4) A dynamic array has global reference, where is it declared ? in intern ... it's a pointer but in the reallity it act like a normal variable private/public/static/ and local > > A dynamic array declaration how is it? private aMyArray as new Integer[] but it can be too private aLabels as new Label[] this is dynamic array, there are all herited of the array class, witch allow to add, resize (preserve), remove, etc some class in dynamic array have some extents like .sort or .find > > Example? > > > ps: > so far i knew that > 1) a static array has fixed dimensions, cannot be resized yes > 2) a dynamic array can be resized, has no static dimensions. > so i thought a > DIM aInt AS Integer[5] is a static > and > PRIVATE aInt AS Integer[] is a dynamic yes > but i saw that in both declarations i can do > > aInt.Add(6) and to add ?l?ments. no AND YOU'VE FOUND A BEAUTIFUL BUG IN THE IDE :) if you try that and exec it generate an error and say "static array" > > The terminology of static and dynamic is different in Gambas or i am > wrong again? no i think it's the same as other language > > 2010/11/19 Fabien Bodard : >> http://gambasdoc.org/help/cat/objectmodel >> >> http://gambasdoc.org/help/cat/arraydecl >> >> Ok so, >> >> >> an embedd array is a private array... >> >>oups i forgot to read this line in the help : >> >>"In Gambas 3, embedded arrays cannot be used as local variables >>anymore. But they can be public!" >> >>so the only advantage to static array i see it's that they die with >>the object :) >> >> you cannot give it as argument throw a procedure ex : >> >> Public mysub(myVar as MyArray[]) >> >> Like we can do with a dynamic array that have global reference such as >> any objects >> >> >> The embedd array have the same memory space than the object into it is >> initialized... so it die with this object >> >> >> A dynamic array will be alive all the time it is referenced somewhere >> in the project. like any gambas objects. >> >> >> Yes i prefer dynamics one ... and i think , like Benoit i don't use >> static one any more. >> >> >> Le 19 novembre 2010 01:38, Beno?t Minisini >> a ?crit : >>>> Can someone explain embedded arrays further? >>>> >>>> i understand nothing. >>>> >>>> i know what a normal array is and that it can be static or dynamic. >>>> >>>> But "embedded arrays are just a way to access a part of a Gambas > object" >>>> >>>> for example i have a TextBox1 how can i use an embedded array on it? >>>> >>>> You mean do use the TextBox1 as an array..? For example to enumerate > its >>>> properties? i cant think what do you mean. >>>> >>>> If there is an example to demonstrate the differences. Please. >>>> >>> >>> First, have you read the documentation page about Gambas object > model? >>> >>> -- >>> Beno?t Minisini >>> >>> > ------------------------------------------------------------------------------ >>> Beautiful is writing same markup. Internet Explorer 9 supports >>> standards for HTML5, CSS3, SVG 1.1, ?ECMAScript5, and DOM L2 & L3. >>> Spend less time writing and ?rewriting code and more time creating > great >>> experiences on the web. Be a part of the beta today >>> http://p.sf.net/sfu/msIE9-sfdev2dev >>> _______________________________________________ >>> Gambas-user mailing list >>> Gambas-user at lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>> >> >> >> >> -- >> Fabien Bodard >> > > > > > > > ------------------------------------------------------------------------------ > Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ?ECMAScript5, and DOM L2 & L3. > Spend less time writing and ?rewriting code and more time creating great > experiences on the web. Be a part of the beta today > http://p.sf.net/sfu/msIE9-sfdev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Fabien Bodard From gambas.fr at ...626... Fri Nov 19 14:07:32 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Fri, 19 Nov 2010 14:07:32 +0100 Subject: [Gambas-user] SUb Routines with a return value In-Reply-To: <4CE66EAD.9010708@...169...> References: <4CDB9069.4030503@...1904...> <4CE66EAD.9010708@...169...> Message-ID: action_activate is an event handler not a funtion... that's why it's a sub in gambas SUB/FUNCTION are all synonyme of PROCEDURE chose between each is just made by convention ... but for events it's a sub ! 2010/11/19 Michael : > I have been using popup menus for the first time and got the following > from the Gambas help. > "PUBLIC SUB Action_Activate(key AS String) AS Boolean" > > I assumed this was an error as only functions have a return value so I > changed it "Public Function...". > Then on my line "mnuPopup.Popup()" it got an error "no return value". > > Then I modified the line to "PUBLIC SUB..." with no "as Boolean". and > got the same error. However it all works perfectly when written as a SUB > with a return value. Is this intended? > > One more question? Can Gambas 3 be installed alongside Gambas 2 on > Ubuntu Maverick? > > Thanks > Mike > > > > ------------------------------------------------------------------------------ > Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ?ECMAScript5, and DOM L2 & L3. > Spend less time writing and ?rewriting code and more time creating great > experiences on the web. Be a part of the beta today > http://p.sf.net/sfu/msIE9-sfdev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Fabien Bodard From demosthenesk at ...626... Fri Nov 19 14:23:43 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Fri, 19 Nov 2010 15:23:43 +0200 Subject: [Gambas-user] About help and arrays and variables In-Reply-To: References: <1289994337.4274.9.camel@...2493...> <201011171249.47203.gambas@...1...> <1290015049.7776.5.camel@...2493...> <201011190138.01701.gambas@...1...> <1290169643.12614.32.camel@...2493...> Message-ID: <1290173023.3221.15.camel@...2494...> ok! i was cofused from two things 1) in previous message about static arrays Fabien said that: >yes a static array is not an object ... that's why it's a little bit >deprecated :) > > >anther way : > >dim htmpArray as integer[]= [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] > so a DIM htmpArray as integer[]= [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] i thought was a static. and 2) --------------------------------- DIM aInt2 AS Integer[3] aInt2[0] = 1 aInt2[1] = 20 aInt2[2] = 30 aInt2.Add(40) 'here is the resize of the array aInt2.Add(50) aInt2.Add(60) PRINT aInt2[3] PRINT aInt2[4] PRINT aInt2[5] --------------------------------- In my gambas2-2.21 rev3300 there is no error, nor compilation nor execution! On Fri, 2010-11-19 at 14:01 +0100, Fabien Bodard wrote: > 2010/11/19 Demosthenes Koptsis : > > On Fri, 2010-11-19 at 01:38 +0100, Beno?t Minisini wrote: > >> > Can someone explain embedded arrays further? > >> > > >> > i understand nothing. > >> > > >> > i know what a normal array is and that it can be static or dynamic. > >> > > >> > But "embedded arrays are just a way to access a part of a Gambas object" > >> > > >> > for example i have a TextBox1 how can i use an embedded array on it? > >> > > >> > You mean do use the TextBox1 as an array..? For example to enumerate its > >> > properties? i cant think what do you mean. > >> > > >> > If there is an example to demonstrate the differences. Please. > >> > > >> > >> First, have you read the documentation page about Gambas object model? > >> > > > > Yes i did. But i try to understand. > > > > Thanks Fabien! > > > > So > > > > 1) PRIVATE aInt1[3] AS Integer > > is an embedded array of integers with 3 elements in an object for > > example FMain. > > > > 2) DIM iFieldr AS NEW Integer[9] > > is a static array of integers with 9 elements > > > > 3) Also PRIVATE Languages AS String[] = [ "fr", "it", "es", "de", "ja" ] > > is a static !!! > no ..dynamic ... you are assigned a dynamic array = [...] > > in fact [...] generate an array and you assign it's internal ref to > the variable string array Languages > > > > (so far i thought that this was a dynamic array, because it was declared > > with no dimensions PRIVATE Languages AS String[]) > > > > > 4) A dynamic array has global reference, where is it declared ? > in intern ... it's a pointer > > but in the reallity it act like a normal variable > > private/public/static/ and local > > > > > > A dynamic array declaration how is it? > > private aMyArray as new Integer[] > > but it can be too > > private aLabels as new Label[] > > > this is dynamic array, there are all herited of the array class, witch > allow to add, resize (preserve), remove, etc > > > some class in dynamic array have some extents like .sort or .find > > > > > > > > Example? > > > > > > ps: > > so far i knew that > > 1) a static array has fixed dimensions, cannot be resized > yes > > 2) a dynamic array can be resized, has no static dimensions. > > so i thought a > > DIM aInt AS Integer[5] is a static > > and > > PRIVATE aInt AS Integer[] is a dynamic > > yes > > > but i saw that in both declarations i can do > > > > aInt.Add(6) and to add ?l?ments. > no AND YOU'VE FOUND A BEAUTIFUL BUG IN THE IDE :) > if you try that and exec it generate an error and say "static array" > > > > The terminology of static and dynamic is different in Gambas or i am > > wrong again? > no i think it's the same as other language > > > > > > > 2010/11/19 Fabien Bodard : > >> http://gambasdoc.org/help/cat/objectmodel > >> > >> http://gambasdoc.org/help/cat/arraydecl > >> > >> Ok so, > >> > >> > >> an embedd array is a private array... > >> > >>oups i forgot to read this line in the help : > >> > >>"In Gambas 3, embedded arrays cannot be used as local variables > >>anymore. But they can be public!" > >> > >>so the only advantage to static array i see it's that they die with > >>the object :) > >> > >> you cannot give it as argument throw a procedure ex : > >> > >> Public mysub(myVar as MyArray[]) > >> > >> Like we can do with a dynamic array that have global reference such as > >> any objects > >> > >> > >> The embedd array have the same memory space than the object into it is > >> initialized... so it die with this object > >> > >> > >> A dynamic array will be alive all the time it is referenced somewhere > >> in the project. like any gambas objects. > >> > >> > >> Yes i prefer dynamics one ... and i think , like Benoit i don't use > >> static one any more. > >> > >> > >> Le 19 novembre 2010 01:38, Beno?t Minisini > >> a ?crit : > >>>> Can someone explain embedded arrays further? > >>>> > >>>> i understand nothing. > >>>> > >>>> i know what a normal array is and that it can be static or dynamic. > >>>> > >>>> But "embedded arrays are just a way to access a part of a Gambas > > object" > >>>> > >>>> for example i have a TextBox1 how can i use an embedded array on it? > >>>> > >>>> You mean do use the TextBox1 as an array..? For example to enumerate > > its > >>>> properties? i cant think what do you mean. > >>>> > >>>> If there is an example to demonstrate the differences. Please. > >>>> > >>> > >>> First, have you read the documentation page about Gambas object > > model? > >>> > >>> -- > >>> Beno?t Minisini > >>> > >>> > > ------------------------------------------------------------------------------ > >>> Beautiful is writing same markup. Internet Explorer 9 supports > >>> standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. > >>> Spend less time writing and rewriting code and more time creating > > great > >>> experiences on the web. Be a part of the beta today > >>> http://p.sf.net/sfu/msIE9-sfdev2dev > >>> _______________________________________________ > >>> Gambas-user mailing list > >>> Gambas-user at lists.sourceforge.net > >>> https://lists.sourceforge.net/lists/listinfo/gambas-user > >>> > >> > >> > >> > >> -- > >> Fabien Bodard > >> > > > > > > > > > > > > > > ------------------------------------------------------------------------------ > > Beautiful is writing same markup. Internet Explorer 9 supports > > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. > > Spend less time writing and rewriting code and more time creating great > > experiences on the web. Be a part of the beta today > > http://p.sf.net/sfu/msIE9-sfdev2dev > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > From gambas.fr at ...626... Fri Nov 19 14:58:36 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Fri, 19 Nov 2010 14:58:36 +0100 Subject: [Gambas-user] About help and arrays and variables In-Reply-To: <1290173023.3221.15.camel@...2494...> References: <1289994337.4274.9.camel@...2493...> <201011171249.47203.gambas@...1...> <1290015049.7776.5.camel@...2493...> <201011190138.01701.gambas@...1...> <1290169643.12614.32.camel@...2493...> <1290173023.3221.15.camel@...2494...> Message-ID: 2010/11/19 Demosthenes Koptsis : > ok! > > i was cofused from two things > > 1) > in previous message about static arrays Fabien said that: > >>yes a static array is not an object ... that's why it's a little bit >>deprecated :) >> >> >>anther way : >> >>dim htmpArray as integer[]= ?[1, 2, 3, 4, 5, 6, 7, 8, 9, 10] >> > > so a > DIM htmpArray as integer[]= ?[1, 2, 3, 4, 5, 6, 7, 8, 9, 10] > i thought was a static. no a dynamic ... look at the bottom > > and > > 2) > --------------------------------- > DIM aInt2 AS Integer[3] > > aInt2[0] = 1 > aInt2[1] = 20 > aInt2[2] = 30 > > aInt2.Add(40) 'here is the resize of the array > aInt2.Add(50) > aInt2.Add(60) > > PRINT aInt2[3] > PRINT aInt2[4] > PRINT aInt2[5] > --------------------------------- > > In my gambas2-2.21 rev3300 there is no error, nor compilation nor > execution! > Normal it's Dynamic array :) Dynamic : DIM Identifier AS [ NEW ] Native Datatype [ Array dimensions ... ] ex : dim aInt as Integer[10] Static [ STATIC ] { PUBLIC | PRIVATE } Identifier [ Array dimensions ... ] AS Native Datatype ex : Private aInt[10] as integer you can't declare a staic array in a sub From simonart.dominique at ...11... Fri Nov 19 15:17:40 2010 From: simonart.dominique at ...11... (Simonart Dominique) Date: Fri, 19 Nov 2010 15:17:40 +0100 Subject: [Gambas-user] About help and arrays and variables In-Reply-To: References: <1289994337.4274.9.camel@...2493...> <201011171249.47203.gambas@...1...> <1290015049.7776.5.camel@...2493...> <201011190138.01701.gambas@...1...> <1290169643.12614.32.camel@...2493...> <1290173023.3221.15.camel@...2494...> Message-ID: <4CE68704.8050407@...11...> Le 19/11/2010 14:58, Fabien Bodard a ?crit : > 2010/11/19 Demosthenes Koptsis: >> ok! >> >> i was cofused from two things >> Hi all, I tend to get a little confused too! Are these assumptions correct? If array notation is on Variable name, array is STATIC If array notation is on Data type, array is DYNAMIC >> 1) >> in previous message about static arrays Fabien said that: >> >>> yes a static array is not an object ... that's why it's a little bit >>> deprecated :) >>> >>> >>> anther way : >>> >>> dim htmpArray as integer[]= [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] >>> >> >> so a >> DIM htmpArray as integer[]= [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] >> i thought was a static. > no a dynamic ... look at the bottom >> >> and >> >> 2) >> --------------------------------- >> DIM aInt2 AS Integer[3] >> >> aInt2[0] = 1 >> aInt2[1] = 20 >> aInt2[2] = 30 >> >> aInt2.Add(40) 'here is the resize of the array >> aInt2.Add(50) >> aInt2.Add(60) >> >> PRINT aInt2[3] >> PRINT aInt2[4] >> PRINT aInt2[5] >> --------------------------------- >> >> In my gambas2-2.21 rev3300 there is no error, nor compilation nor >> execution! >> > Normal it's Dynamic array :) > > Dynamic : > DIM Identifier AS [ NEW ] Native Datatype [ Array dimensions ... ] > > ex : dim aInt as Integer[10] > > Static > [ STATIC ] { PUBLIC | PRIVATE } Identifier [ Array dimensions ... ] AS > Native Datatype > > > ex : Private aInt[10] as integer > > you can't declare a staic array in a sub > From linux at ...1904... Fri Nov 19 15:24:04 2010 From: linux at ...1904... (Dr. Martin Senftleben) Date: Fri, 19 Nov 2010 15:24:04 +0100 Subject: [Gambas-user] Installing gambas3 on LinuxMint In-Reply-To: References: <4CDB9069.4030503@...1904...> Message-ID: <4CE68884.2090203@...1904...> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, thanks for your efforts! Am 19.11.2010 12:31, schrieb Ian Haywood: > On Fri, Nov 12, 2010 at 8:22 PM, Ian Haywood wrote: > For Linux Mint, I'd try with the Ubuntu Maverick release, so add the > following to /etc/apt/sources.list > > deb http://ppa.launchpad.net/ihaywood3/gambas3/ubuntu maverick main > deb-src http://ppa.launchpad.net/ihaywood3/gambas3/ubuntu maverick main > > then enter > > sudo apt-get update > sudo apt-get install gambas3 > > and hopefully gambas should be installed! > No, doesn't work. I have many more problems unresolved dependencies) than before. I'll install LinuxMint 10 tomorrow and see what happens then. Martin -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAkzmiH4ACgkQUmmuY48ByEi3VQCeI6o2QSgJ7COAA5uRweCHPl9D +WgAoIDWbZ4Ozj0QUYnZOcwFK5lqMeoR =krcs -----END PGP SIGNATURE----- From demosthenesk at ...626... Fri Nov 19 15:26:17 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Fri, 19 Nov 2010 16:26:17 +0200 Subject: [Gambas-user] About help and arrays and variables In-Reply-To: References: <1289994337.4274.9.camel@...2493...> <201011171249.47203.gambas@...1...> <1290015049.7776.5.camel@...2493...> <201011190138.01701.gambas@...1...> <1290169643.12614.32.camel@...2493...> <1290173023.3221.15.camel@...2494...> Message-ID: <1290176777.3221.41.camel@...2494...> > Normal it's Dynamic array :) > > Dynamic : > DIM Identifier AS [ NEW ] Native Datatype [ Array dimensions ... ] So what the difference between DIM aInt2 AS Integer[3], DIM aInt2 AS Integer[] if both are dynamic? Now my examples tell me if i am right... Dynamic arrays ------------------------- 'locale scope in a SUB DIM aInt2 AS Integer[3] 'this is a dynamic array DIM aInt2 AS Integer[] = [1, 2, 3] 'another dynamic array 'global scope in Declarations PUBLIC aInt2 AS Integer[] = [1, 2, 3] 'more dynamic arrays PRIVATE aInt2 AS Integer[] = [1, 2, 3] ------------------------------------------- And now finally static arrays: Static arrays ----------------------------- 'local scope in a SUB DIM aInt2[10] AS Integer 'this static array is in a SUB! 'global scope in Declarations PRIVATE aInt2[10] AS Integer ' this static array is ok in declarations PUBLIC aInt2[10] AS Integer 'this is forbidden in global scope, i get an error ------------------------------------------- are these ok? i think i understood it except DIM aInt2[10] AS Integer 'this static array is in a SUB! > ex : dim aInt as Integer[10] > > Static > [ STATIC ] { PUBLIC | PRIVATE } Identifier [ Array dimensions ... ] AS > Native Datatype > > > ex : Private aInt[10] as integer > > you can't declare a staic array in a sub yes i notice that > ------------------------------------------------------------------------------ > Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. > Spend less time writing and rewriting code and more time creating great > experiences on the web. Be a part of the beta today > http://p.sf.net/sfu/msIE9-sfdev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From demosthenesk at ...626... Fri Nov 19 15:34:02 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Fri, 19 Nov 2010 16:34:02 +0200 Subject: [Gambas-user] About help and arrays and variables In-Reply-To: <4CE68704.8050407@...11...> References: <1289994337.4274.9.camel@...2493...> <201011171249.47203.gambas@...1...> <1290015049.7776.5.camel@...2493...> <201011190138.01701.gambas@...1...> <1290169643.12614.32.camel@...2493...> <1290173023.3221.15.camel@...2494...> <4CE68704.8050407@...11...> Message-ID: <1290177242.3221.47.camel@...2494...> as i think it now the word STATIC is not for declaration static arrays but If the STATIC keyword is specified, the same variable will be shared with every object of this class. i get this from variable syntax, same for arrays which they are a set of variables. A static array is declared as PRIVATE TicTacToe[3] AS Integer STATIC PRIVATE TicTacToe[3] AS Integer A dynamic arrays is declared as DIM TicTacToe AS Integer[3] DIM TicTacToe AS Integer[] DIM TicTacToe AS NEW Integer[] PUBLIC TicTacToe AS Integer[3] PUBLIC TicTacToe AS Integer[] PRIVATE TicTacToe AS Integer[3] am i right Fabien? On Fri, 2010-11-19 at 15:17 +0100, Simonart Dominique wrote: > Le 19/11/2010 14:58, Fabien Bodard a ?crit : > > 2010/11/19 Demosthenes Koptsis: > >> ok! > >> > >> i was cofused from two things > >> > Hi all, > > I tend to get a little confused too! > > Are these assumptions correct? > > If array notation is on Variable name, array is STATIC > If array notation is on Data type, array is DYNAMIC > > > >> 1) > >> in previous message about static arrays Fabien said that: > >> > >>> yes a static array is not an object ... that's why it's a little bit > >>> deprecated :) > >>> > >>> > >>> anther way : > >>> > >>> dim htmpArray as integer[]= [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] > >>> > >> > >> so a > >> DIM htmpArray as integer[]= [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] > >> i thought was a static. > > no a dynamic ... look at the bottom > >> > >> and > >> > >> 2) > >> --------------------------------- > >> DIM aInt2 AS Integer[3] > >> > >> aInt2[0] = 1 > >> aInt2[1] = 20 > >> aInt2[2] = 30 > >> > >> aInt2.Add(40) 'here is the resize of the array > >> aInt2.Add(50) > >> aInt2.Add(60) > >> > >> PRINT aInt2[3] > >> PRINT aInt2[4] > >> PRINT aInt2[5] > >> --------------------------------- > >> > >> In my gambas2-2.21 rev3300 there is no error, nor compilation nor > >> execution! > >> > > Normal it's Dynamic array :) > > > > Dynamic : > > DIM Identifier AS [ NEW ] Native Datatype [ Array dimensions ... ] > > > > ex : dim aInt as Integer[10] > > > > Static > > [ STATIC ] { PUBLIC | PRIVATE } Identifier [ Array dimensions ... ] AS > > Native Datatype > > > > > > ex : Private aInt[10] as integer > > > > you can't declare a staic array in a sub > > > > > > ------------------------------------------------------------------------------ > Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. > Spend less time writing and rewriting code and more time creating great > experiences on the web. Be a part of the beta today > http://p.sf.net/sfu/msIE9-sfdev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From demosthenesk at ...626... Fri Nov 19 15:40:07 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Fri, 19 Nov 2010 16:40:07 +0200 Subject: [Gambas-user] About help and arrays and variables In-Reply-To: <4CE68704.8050407@...11...> References: <1289994337.4274.9.camel@...2493...> <201011171249.47203.gambas@...1...> <1290015049.7776.5.camel@...2493...> <201011190138.01701.gambas@...1...> <1290169643.12614.32.camel@...2493...> <1290173023.3221.15.camel@...2494...> <4CE68704.8050407@...11...> Message-ID: <1290177607.3221.49.camel@...2494...> On Fri, 2010-11-19 at 15:17 +0100, Simonart Dominique wrote: > Le 19/11/2010 14:58, Fabien Bodard a ?crit : > > 2010/11/19 Demosthenes Koptsis: > >> ok! > >> > >> i was cofused from two things > >> > Hi all, > > I tend to get a little confused too! > > Are these assumptions correct? > > If array notation is on Variable name, array is STATIC PRIVATE TicTacToe[3] AS Integer 'a static array > If array notation is on Data type, array is DYNAMIC PRIVATE TicTacToe AS Integer[] 'a dynamic array > >> 1) > >> in previous message about static arrays Fabien said that: > >> > >>> yes a static array is not an object ... that's why it's a little bit > >>> deprecated :) > >>> > >>> > >>> anther way : > >>> > >>> dim htmpArray as integer[]= [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] > >>> > >> > >> so a > >> DIM htmpArray as integer[]= [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] > >> i thought was a static. > > no a dynamic ... look at the bottom > >> > >> and > >> > >> 2) > >> --------------------------------- > >> DIM aInt2 AS Integer[3] > >> > >> aInt2[0] = 1 > >> aInt2[1] = 20 > >> aInt2[2] = 30 > >> > >> aInt2.Add(40) 'here is the resize of the array > >> aInt2.Add(50) > >> aInt2.Add(60) > >> > >> PRINT aInt2[3] > >> PRINT aInt2[4] > >> PRINT aInt2[5] > >> --------------------------------- > >> > >> In my gambas2-2.21 rev3300 there is no error, nor compilation nor > >> execution! > >> > > Normal it's Dynamic array :) > > > > Dynamic : > > DIM Identifier AS [ NEW ] Native Datatype [ Array dimensions ... ] > > > > ex : dim aInt as Integer[10] > > > > Static > > [ STATIC ] { PUBLIC | PRIVATE } Identifier [ Array dimensions ... ] AS > > Native Datatype > > > > > > ex : Private aInt[10] as integer > > > > you can't declare a staic array in a sub > > > > > > ------------------------------------------------------------------------------ > Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. > Spend less time writing and rewriting code and more time creating great > experiences on the web. Be a part of the beta today > http://p.sf.net/sfu/msIE9-sfdev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From dosida at ...626... Fri Nov 19 15:49:41 2010 From: dosida at ...626... (Dimitris Anogiatis) Date: Fri, 19 Nov 2010 07:49:41 -0700 Subject: [Gambas-user] About help and arrays and variables In-Reply-To: <1290177607.3221.49.camel@...2494...> References: <1289994337.4274.9.camel@...2493...> <201011171249.47203.gambas@...1...> <1290015049.7776.5.camel@...2493...> <201011190138.01701.gambas@...1...> <1290169643.12614.32.camel@...2493...> <1290173023.3221.15.camel@...2494...> <4CE68704.8050407@...11...> <1290177607.3221.49.camel@...2494...> Message-ID: Demosthenes, I might be able to help out with the Greek Translation of the wiki as well. When you're done with your book, send me an email perhaps we can work on that together. Regards, Dimitris On Fri, Nov 19, 2010 at 7:40 AM, Demosthenes Koptsis wrote: > On Fri, 2010-11-19 at 15:17 +0100, Simonart Dominique wrote: > > Le 19/11/2010 14:58, Fabien Bodard a ?crit : > > > 2010/11/19 Demosthenes Koptsis: > > >> ok! > > >> > > >> i was cofused from two things > > >> > > Hi all, > > > > I tend to get a little confused too! > > > > Are these assumptions correct? > > > > If array notation is on Variable name, array is STATIC > PRIVATE TicTacToe[3] AS Integer 'a static array > > If array notation is on Data type, array is DYNAMIC > PRIVATE TicTacToe AS Integer[] 'a dynamic array > > > >> 1) > > >> in previous message about static arrays Fabien said that: > > >> > > >>> yes a static array is not an object ... that's why it's a little bit > > >>> deprecated :) > > >>> > > >>> > > >>> anther way : > > >>> > > >>> dim htmpArray as integer[]= [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] > > >>> > > >> > > >> so a > > >> DIM htmpArray as integer[]= [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] > > >> i thought was a static. > > > no a dynamic ... look at the bottom > > >> > > >> and > > >> > > >> 2) > > >> --------------------------------- > > >> DIM aInt2 AS Integer[3] > > >> > > >> aInt2[0] = 1 > > >> aInt2[1] = 20 > > >> aInt2[2] = 30 > > >> > > >> aInt2.Add(40) 'here is the resize of the array > > >> aInt2.Add(50) > > >> aInt2.Add(60) > > >> > > >> PRINT aInt2[3] > > >> PRINT aInt2[4] > > >> PRINT aInt2[5] > > >> --------------------------------- > > >> > > >> In my gambas2-2.21 rev3300 there is no error, nor compilation nor > > >> execution! > > >> > > > Normal it's Dynamic array :) > > > > > > Dynamic : > > > DIM Identifier AS [ NEW ] Native Datatype [ Array dimensions ... ] > > > > > > ex : dim aInt as Integer[10] > > > > > > Static > > > [ STATIC ] { PUBLIC | PRIVATE } Identifier [ Array dimensions ... ] AS > > > Native Datatype > > > > > > > > > ex : Private aInt[10] as integer > > > > > > you can't declare a staic array in a sub > > > > > > > > > > > > ------------------------------------------------------------------------------ > > Beautiful is writing same markup. Internet Explorer 9 supports > > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. > > Spend less time writing and rewriting code and more time creating great > > experiences on the web. Be a part of the beta today > > http://p.sf.net/sfu/msIE9-sfdev2dev > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > ------------------------------------------------------------------------------ > Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. > Spend less time writing and rewriting code and more time creating great > experiences on the web. Be a part of the beta today > http://p.sf.net/sfu/msIE9-sfdev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From demosthenesk at ...626... Fri Nov 19 15:51:52 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Fri, 19 Nov 2010 16:51:52 +0200 Subject: [Gambas-user] About help and arrays and variables In-Reply-To: References: <1289994337.4274.9.camel@...2493...> <201011171249.47203.gambas@...1...> <1290015049.7776.5.camel@...2493...> <201011190138.01701.gambas@...1...> <1290169643.12614.32.camel@...2493...> <1290173023.3221.15.camel@...2494...> <4CE68704.8050407@...11...> <1290177607.3221.49.camel@...2494...> Message-ID: <1290178312.3221.50.camel@...2494...> Ok Dimitri i will !!! On Fri, 2010-11-19 at 07:49 -0700, Dimitris Anogiatis wrote: > Demosthenes, > > I might be able to help out with the Greek Translation of the wiki as well. > When you're done with your book, send me an email perhaps we can work > on that together. > > Regards, > Dimitris > > On Fri, Nov 19, 2010 at 7:40 AM, Demosthenes Koptsis > wrote: > > > On Fri, 2010-11-19 at 15:17 +0100, Simonart Dominique wrote: > > > Le 19/11/2010 14:58, Fabien Bodard a ?crit : > > > > 2010/11/19 Demosthenes Koptsis: > > > >> ok! > > > >> > > > >> i was cofused from two things > > > >> > > > Hi all, > > > > > > I tend to get a little confused too! > > > > > > Are these assumptions correct? > > > > > > If array notation is on Variable name, array is STATIC > > PRIVATE TicTacToe[3] AS Integer 'a static array > > > If array notation is on Data type, array is DYNAMIC > > PRIVATE TicTacToe AS Integer[] 'a dynamic array > > > > > >> 1) > > > >> in previous message about static arrays Fabien said that: > > > >> > > > >>> yes a static array is not an object ... that's why it's a little bit > > > >>> deprecated :) > > > >>> > > > >>> > > > >>> anther way : > > > >>> > > > >>> dim htmpArray as integer[]= [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] > > > >>> > > > >> > > > >> so a > > > >> DIM htmpArray as integer[]= [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] > > > >> i thought was a static. > > > > no a dynamic ... look at the bottom > > > >> > > > >> and > > > >> > > > >> 2) > > > >> --------------------------------- > > > >> DIM aInt2 AS Integer[3] > > > >> > > > >> aInt2[0] = 1 > > > >> aInt2[1] = 20 > > > >> aInt2[2] = 30 > > > >> > > > >> aInt2.Add(40) 'here is the resize of the array > > > >> aInt2.Add(50) > > > >> aInt2.Add(60) > > > >> > > > >> PRINT aInt2[3] > > > >> PRINT aInt2[4] > > > >> PRINT aInt2[5] > > > >> --------------------------------- > > > >> > > > >> In my gambas2-2.21 rev3300 there is no error, nor compilation nor > > > >> execution! > > > >> > > > > Normal it's Dynamic array :) > > > > > > > > Dynamic : > > > > DIM Identifier AS [ NEW ] Native Datatype [ Array dimensions ... ] > > > > > > > > ex : dim aInt as Integer[10] > > > > > > > > Static > > > > [ STATIC ] { PUBLIC | PRIVATE } Identifier [ Array dimensions ... ] AS > > > > Native Datatype > > > > > > > > > > > > ex : Private aInt[10] as integer > > > > > > > > you can't declare a staic array in a sub > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------------ > > > Beautiful is writing same markup. Internet Explorer 9 supports > > > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. > > > Spend less time writing and rewriting code and more time creating great > > > experiences on the web. Be a part of the beta today > > > http://p.sf.net/sfu/msIE9-sfdev2dev > > > _______________________________________________ > > > Gambas-user mailing list > > > Gambas-user at lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > > > > > ------------------------------------------------------------------------------ > > Beautiful is writing same markup. Internet Explorer 9 supports > > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. > > Spend less time writing and rewriting code and more time creating great > > experiences on the web. Be a part of the beta today > > http://p.sf.net/sfu/msIE9-sfdev2dev > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > ------------------------------------------------------------------------------ > Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. > Spend less time writing and rewriting code and more time creating great > experiences on the web. Be a part of the beta today > http://p.sf.net/sfu/msIE9-sfdev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From gambas.fr at ...626... Fri Nov 19 16:48:08 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Fri, 19 Nov 2010 16:48:08 +0100 Subject: [Gambas-user] About help and arrays and variables In-Reply-To: <1290177242.3221.47.camel@...2494...> References: <1289994337.4274.9.camel@...2493...> <201011171249.47203.gambas@...1...> <1290015049.7776.5.camel@...2493...> <201011190138.01701.gambas@...1...> <1290169643.12614.32.camel@...2493...> <1290173023.3221.15.camel@...2494...> <4CE68704.8050407@...11...> <1290177242.3221.47.camel@...2494...> Message-ID: 2010/11/19 Demosthenes Koptsis : > as i think it now > > the word STATIC is not for declaration static arrays but > > If the STATIC keyword is specified, the same variable will be shared > with every object of this class. > > i get this from variable syntax, same for arrays which they are a set of > variables. > > A static array is declared as > > PRIVATE TicTacToe[3] AS Integer > STATIC PRIVATE TicTacToe[3] AS Integer > > A dynamic arrays is declared as > > DIM TicTacToe AS Integer[3] > DIM TicTacToe AS Integer[] > DIM TicTacToe AS NEW Integer[] > PUBLIC TicTacToe AS Integer[3] > PUBLIC TicTacToe AS Integer[] > PRIVATE TicTacToe AS Integer[3] > > am i right Fabien? yes For the other question in internal when you wrote : dim tictactoe as interger[3] gambas do : Dim TicTacToe as New Integer[] TicTacToe.resize(3) When you wrote Dim TicTacToe as Integer[] You have give a type to TicTacToe but you need then to instanciate a new array and assing it to this variable by TicTacToc = New Integer[] A dynamic array is an object you can pass it throught procedure byref and between classes ... it's really powerfull.. it's an object :) From gambas.fr at ...626... Fri Nov 19 16:52:10 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Fri, 19 Nov 2010 16:52:10 +0100 Subject: [Gambas-user] About help and arrays and variables In-Reply-To: <4CE68704.8050407@...11...> References: <1289994337.4274.9.camel@...2493...> <201011171249.47203.gambas@...1...> <1290015049.7776.5.camel@...2493...> <201011190138.01701.gambas@...1...> <1290169643.12614.32.camel@...2493...> <1290173023.3221.15.camel@...2494...> <4CE68704.8050407@...11...> Message-ID: 2010/11/19 Simonart Dominique : > Le 19/11/2010 14:58, Fabien Bodard a ?crit : >> 2010/11/19 Demosthenes Koptsis: >>> ok! >>> >>> i was cofused from two things >>> > Hi all, > > I tend to get a little confused too! > > Are these assumptions correct? > > If array notation is on Variable name, array is STATIC > If array notation is on Data type, array is DYNAMIC the difficulty for me is that gambas2 is not gambas3 :) in gambas2 only static array can be used for other thing than the basic datatypes (string, integer, float, object, etc) in gambas3 the dynamic array can manage all the types. before i was writted private aObj as Object[] Dim hLabel as New Label(me) sObj.Add(hLabel) And now private aLbl as Label[] Dim hLabel as New Label(me) sLbl.Add(hLabel) From math.eber at ...221... Fri Nov 19 20:29:32 2010 From: math.eber at ...221... (Matti) Date: Fri, 19 Nov 2010 20:29:32 +0100 Subject: [Gambas-user] SUb Routines with a return value In-Reply-To: <4CE66EAD.9010708@...169...> References: <4CDB9069.4030503@...1904...> <4CE66EAD.9010708@...169...> Message-ID: <4CE6D01C.5080904@...221...> I don't understand exactly what you want to do, and why you have "mnuPopup.Popup()" inside the event handler sub Action_Activate. And why "mnuPopup.Popup()" anyway? Popup menus are easily made like PUBLIC SUB Form_MouseDown() 'or something else MouseDown() IF Mouse.Right THEN mnuTest.Popup END now mnuTest shows, and if some element of mnuTest is clicked, then PUBLIC SUB mnuAction_Click() Message.Info("hello") END Generally, you have to write sub/function "AS something" only if you want to return something to the code that called it. If you don't, "PUBLIC SUB xy()" is enough. Yes, and Gambas 2 and 3 can live together on the same machine. Am 19.11.2010 13:33, schrieb Michael: > I have been using popup menus for the first time and got the following > from the Gambas help. > "PUBLIC SUB Action_Activate(key AS String) AS Boolean" > > I assumed this was an error as only functions have a return value so I > changed it "Public Function...". > Then on my line "mnuPopup.Popup()" it got an error "no return value". > > Then I modified the line to "PUBLIC SUB..." with no "as Boolean". and > got the same error. However it all works perfectly when written as a SUB > with a return value. Is this intended? > > One more question? Can Gambas 3 be installed alongside Gambas 2 on > Ubuntu Maverick? > > Thanks > Mike > > > > ------------------------------------------------------------------------------ > Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. > Spend less time writing and rewriting code and more time creating great > experiences on the web. Be a part of the beta today > http://p.sf.net/sfu/msIE9-sfdev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From demosthenesk at ...626... Fri Nov 19 20:41:21 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Fri, 19 Nov 2010 21:41:21 +0200 Subject: [Gambas-user] About help and arrays and variables In-Reply-To: References: <1289994337.4274.9.camel@...2493...> <201011171249.47203.gambas@...1...> <1290015049.7776.5.camel@...2493...> <201011190138.01701.gambas@...1...> <1290169643.12614.32.camel@...2493...> <1290173023.3221.15.camel@...2494...> <4CE68704.8050407@...11...> Message-ID: <1290195681.16353.2.camel@...2493...> hm i have not write so far object programming but i know the basics how to do that. But i have no experience about that you say. My book is for Gambas2 and i all i said about static and dynamic arrays is from this side. On Fri, 2010-11-19 at 16:52 +0100, Fabien Bodard wrote: > 2010/11/19 Simonart Dominique : > > Le 19/11/2010 14:58, Fabien Bodard a ?crit : > >> 2010/11/19 Demosthenes Koptsis: > >>> ok! > >>> > >>> i was cofused from two things > >>> > > Hi all, > > > > I tend to get a little confused too! > > > > Are these assumptions correct? > > > > If array notation is on Variable name, array is STATIC > > If array notation is on Data type, array is DYNAMIC > > the difficulty for me is that gambas2 is not gambas3 :) > > > in gambas2 only static array can be used for other thing than the > basic datatypes (string, integer, float, object, etc) > > in gambas3 the dynamic array can manage all the types. > > before i was writted > > private aObj as Object[] > > Dim hLabel as New Label(me) > sObj.Add(hLabel) > > > And now > > private aLbl as Label[] > > Dim hLabel as New Label(me) > sLbl.Add(hLabel) > > ------------------------------------------------------------------------------ > Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. > Spend less time writing and rewriting code and more time creating great > experiences on the web. Be a part of the beta today > http://p.sf.net/sfu/msIE9-sfdev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user -- Regards, Demosthenes Koptsis. From gambas.fr at ...626... Fri Nov 19 21:04:14 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Fri, 19 Nov 2010 21:04:14 +0100 Subject: [Gambas-user] SUb Routines with a return value In-Reply-To: <4CE6D01C.5080904@...221...> References: <4CDB9069.4030503@...1904...> <4CE66EAD.9010708@...169...> <4CE6D01C.5080904@...221...> Message-ID: 2010/11/19 Matti : > I don't understand exactly what you want to do, and why you have > "mnuPopup.Popup()" inside the event handler sub Action_Activate. And why > "mnuPopup.Popup()" anyway? i've don't say anything about that but generally a public sub myMenu_Click() end is enouth action is a system to manage groups of items > Popup menus are easily made like > > PUBLIC SUB Form_MouseDown() ? ? 'or something else MouseDown() > ?IF Mouse.Right THEN mnuTest.Popup > END > > now mnuTest shows, > and if some element of mnuTest is clicked, then > > PUBLIC SUB mnuAction_Click() > ?Message.Info("hello") > END > > Generally, you have to write sub/function "AS something" only if you want to > return something to the code that called it. If you don't, "PUBLIC SUB xy()" is > enough. > > Yes, and Gambas 2 and 3 can live together on the same machine. > > > Am 19.11.2010 13:33, schrieb Michael: >> I have been using popup menus for the first time and got the following >> from the Gambas help. >> "PUBLIC SUB Action_Activate(key AS String) AS Boolean" >> >> I assumed this was an error as only functions have a return value so I >> changed it "Public Function...". >> Then on my line "mnuPopup.Popup()" it got an error "no return value". >> >> Then I modified the line to "PUBLIC SUB..." with no "as Boolean". and >> got the same error. However it all works perfectly when written as a SUB >> with a return value. Is this intended? >> >> One more question? Can Gambas 3 be installed alongside Gambas 2 on >> Ubuntu Maverick? >> >> Thanks >> Mike >> >> >> >> ------------------------------------------------------------------------------ >> Beautiful is writing same markup. Internet Explorer 9 supports >> standards for HTML5, CSS3, SVG 1.1, ?ECMAScript5, and DOM L2 & L3. >> Spend less time writing and ?rewriting code and more time creating great >> experiences on the web. Be a part of the beta today >> http://p.sf.net/sfu/msIE9-sfdev2dev >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > ------------------------------------------------------------------------------ > Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ?ECMAScript5, and DOM L2 & L3. > Spend less time writing and ?rewriting code and more time creating great > experiences on the web. Be a part of the beta today > http://p.sf.net/sfu/msIE9-sfdev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Fabien Bodard From gambas.fr at ...626... Fri Nov 19 21:06:57 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Fri, 19 Nov 2010 21:06:57 +0100 Subject: [Gambas-user] About help and arrays and variables In-Reply-To: <1290195681.16353.2.camel@...2493...> References: <1289994337.4274.9.camel@...2493...> <201011171249.47203.gambas@...1...> <1290015049.7776.5.camel@...2493...> <201011190138.01701.gambas@...1...> <1290169643.12614.32.camel@...2493...> <1290173023.3221.15.camel@...2494...> <4CE68704.8050407@...11...> <1290195681.16353.2.camel@...2493...> Message-ID: as i was saying it is not easy to me to talk about gambas2 ... there is at least 2 year that i dont use it ... i'm working all the time on gambas3. sorry, From zelimir_ikovic at ...43... Fri Nov 19 21:40:00 2010 From: zelimir_ikovic at ...43... (Zelimir Ikovic) Date: Fri, 19 Nov 2010 12:40:00 -0800 (PST) Subject: [Gambas-user] About help and arrays and variables In-Reply-To: Message-ID: <179586.71552.qm@...2505...> I am following discussion on Gambas more than 3 months. Last 10 years I worked in VB6 (70%) and C(30%) on Windows. I am about to switch to Linux, and I have to decide: Gambas3, FreePascal (fpGUI or Lazarus) or C, C++ and FLTK I am just wondering is there any discussion on this topic, and where. How do you compare Gambas against those tools Regards From demosthenesk at ...626... Fri Nov 19 21:44:36 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Fri, 19 Nov 2010 22:44:36 +0200 Subject: [Gambas-user] About help and arrays and variables In-Reply-To: References: <1289994337.4274.9.camel@...2493...> <201011171249.47203.gambas@...1...> <1290015049.7776.5.camel@...2493...> <201011190138.01701.gambas@...1...> <1290169643.12614.32.camel@...2493...> <1290173023.3221.15.camel@...2494...> <4CE68704.8050407@...11...> <1290195681.16353.2.camel@...2493...> Message-ID: <1290199476.5351.1.camel@...2494...> i think the difference about arrays of gambas2 and gambas3 is that the second has more datatypes. The basic syntax is the same for the subject of declaration for static and dynamic arrays. On Fri, 2010-11-19 at 21:06 +0100, Fabien Bodard wrote: > as i was saying it is not easy to me to talk about gambas2 ... there > is at least 2 year that i dont use it ... i'm working all the time on > gambas3. > > sorry, > > ------------------------------------------------------------------------------ > Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. > Spend less time writing and rewriting code and more time creating great > experiences on the web. Be a part of the beta today > http://p.sf.net/sfu/msIE9-sfdev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user -- Regards, Demosthenes From mdumm at ...647... Fri Nov 19 22:56:22 2010 From: mdumm at ...647... (Maurice Dumais) Date: Fri, 19 Nov 2010 16:56:22 -0500 Subject: [Gambas-user] Installing Gambas3 on PCLINUXOS -2010 Message-ID: <4CE6F286.7040508@...647...> HI All, I am running PCLINUXOS 2010, KDE 4.5.3 QT Toolkit, and Libtools 2.6.10. I tried to install Gambas3 rev. 3302 and Make stops here: Making all in webkit make[5]: entrant dans le r?pertoire ? /home/maurice/trunk/gb.qt4/src/webkit ? /bin/sh ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -DQT_SHARED -I/usr/lib/qt4/include -I/usr/lib/qt4/include/QtCore -I/usr/lib/qt4/include/QtGui -I/usr/lib/qt4/include/QtNetwork -I/usr/lib/qt4/include/QtDBus -I/usr/lib/qt4/include/QtXml -I/usr/lib/qt4/include/QtWebKit -I../../share -I../../src/share -pipe -Wall -fno-exceptions -Wno-unused-value -fsigned-char -fvisibility=hidden -g -Os -fno-omit-frame-pointer -MT main.lo -MD -MP -MF .deps/main.Tpo -c -o main.lo main.cpp libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -DQT_SHARED -I/usr/lib/qt4/include -I/usr/lib/qt4/include/QtCore -I/usr/lib/qt4/include/QtGui -I/usr/lib/qt4/include/QtNetwork -I/usr/lib/qt4/include/QtDBus -I/usr/lib/qt4/include/QtXml -I/usr/lib/qt4/include/QtWebKit -I../../share -I../../src/share -pipe -Wall -fno-exceptions -Wno-unused-value -fsigned-char -fvisibility=hidden -g -Os -fno-omit-frame-pointer -MT main.lo -MD -MP -MF .deps/main.Tpo -c main.cpp -fPIC -DPIC -o .libs/main.o In file included from main.cpp:31: cwebhittest.h:47: error: ISO C++ forbids declaration of 'QWebHitTestResult' with no type cwebhittest.h:47: error: expected ';' before '*' token cwebhittest.h:51: error: ISO C++ forbids declaration of 'QWebHitTestResult' with no type cwebhittest.h:51: error: expected ',' or '...' before '&' token In file included from main.cpp:35: cwebview.h:59: error: 'createWindow' declared as a 'virtual' field cwebview.h:59: error: expected ';' before '(' token make[5]: *** [main.lo] Erreur 1 make[5]: quittant le r?pertoire ? /home/maurice/trunk/gb.qt4/src/webkit ? make[4]: *** [all-recursive] Erreur 1 make[4]: quittant le r?pertoire ? /home/maurice/trunk/gb.qt4/src ? make[3]: *** [all-recursive] Erreur 1 make[3]: quittant le r?pertoire ? /home/maurice/trunk/gb.qt4 ? make[2]: *** [all] Erreur 2 make[2]: quittant le r?pertoire ? /home/maurice/trunk/gb.qt4 ? make[1]: *** [all-recursive] Erreur 1 make[1]: quittant le r?pertoire ? /home/maurice/trunk ? make: *** [all] Erreur 2 What should I do now? Regards, Maurice Dumais From mdavies5 at ...169... Sat Nov 20 00:35:30 2010 From: mdavies5 at ...169... (Michael) Date: Sat, 20 Nov 2010 10:35:30 +1100 Subject: [Gambas-user] SUb Routines with a return value In-Reply-To: References: <4CDB9069.4030503@...1904...> <4CE66EAD.9010708@...169...> Message-ID: <4CE709C2.9070301@...169...> Thanks Fabien Mike On 20/11/10 00:07, Fabien Bodard wrote: > action_activate is an event handler not a funtion... that's why it's a sub > > in gambas SUB/FUNCTION are all synonyme of PROCEDURE > > chose between each is just made by convention ... but for events it's a sub ! > > > > > 2010/11/19 Michael: >> I have been using popup menus for the first time and got the following >> from the Gambas help. >> "PUBLIC SUB Action_Activate(key AS String) AS Boolean" >> >> I assumed this was an error as only functions have a return value so I >> changed it "Public Function...". >> Then on my line "mnuPopup.Popup()" it got an error "no return value". >> >> Then I modified the line to "PUBLIC SUB..." with no "as Boolean". and >> got the same error. However it all works perfectly when written as a SUB >> with a return value. Is this intended? >> >> One more question? Can Gambas 3 be installed alongside Gambas 2 on >> Ubuntu Maverick? >> >> Thanks >> Mike >> >> >> >> ------------------------------------------------------------------------------ >> Beautiful is writing same markup. Internet Explorer 9 supports >> standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2& L3. >> Spend less time writing and rewriting code and more time creating great >> experiences on the web. Be a part of the beta today >> http://p.sf.net/sfu/msIE9-sfdev2dev >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > From mdavies5 at ...169... Sat Nov 20 00:56:12 2010 From: mdavies5 at ...169... (Michael) Date: Sat, 20 Nov 2010 10:56:12 +1100 Subject: [Gambas-user] SUb Routines with a return value In-Reply-To: References: <4CDB9069.4030503@...1904...> <4CE66EAD.9010708@...169...> <4CE6D01C.5080904@...221...> Message-ID: <4CE70E9C.1030601@...169...> Fabien, I didn't include the whole code. The MnuPopup.Popup is in a Click_Event of a grid because I want a popup menu not a permanent menu item. It works fine now. I look forward to Gambas 3 release. Regards Mike On 20/11/10 07:04, Fabien Bodard wrote: > 2010/11/19 Matti: >> I don't understand exactly what you want to do, and why you have >> "mnuPopup.Popup()" inside the event handler sub Action_Activate. And why >> "mnuPopup.Popup()" anyway? > i've don't say anything about that but generally a > > public sub myMenu_Click() > > end > > is enouth > > action is a system to manage groups of items > > >> Popup menus are easily made like >> >> PUBLIC SUB Form_MouseDown() 'or something else MouseDown() >> IF Mouse.Right THEN mnuTest.Popup >> END >> >> now mnuTest shows, >> and if some element of mnuTest is clicked, then >> >> PUBLIC SUB mnuAction_Click() >> Message.Info("hello") >> END >> >> Generally, you have to write sub/function "AS something" only if you want to >> return something to the code that called it. If you don't, "PUBLIC SUB xy()" is >> enough. >> >> Yes, and Gambas 2 and 3 can live together on the same machine. >> >> >> Am 19.11.2010 13:33, schrieb Michael: >>> I have been using popup menus for the first time and got the following >>> from the Gambas help. >>> "PUBLIC SUB Action_Activate(key AS String) AS Boolean" >>> >>> I assumed this was an error as only functions have a return value so I >>> changed it "Public Function...". >>> Then on my line "mnuPopup.Popup()" it got an error "no return value". >>> >>> Then I modified the line to "PUBLIC SUB..." with no "as Boolean". and >>> got the same error. However it all works perfectly when written as a SUB >>> with a return value. Is this intended? >>> >>> One more question? Can Gambas 3 be installed alongside Gambas 2 on >>> Ubuntu Maverick? >>> >>> Thanks >>> Mike >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Beautiful is writing same markup. Internet Explorer 9 supports >>> standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2& L3. >>> Spend less time writing and rewriting code and more time creating great >>> experiences on the web. Be a part of the beta today >>> http://p.sf.net/sfu/msIE9-sfdev2dev >>> _______________________________________________ >>> Gambas-user mailing list >>> Gambas-user at lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>> >> ------------------------------------------------------------------------------ >> Beautiful is writing same markup. Internet Explorer 9 supports >> standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2& L3. >> Spend less time writing and rewriting code and more time creating great >> experiences on the web. Be a part of the beta today >> http://p.sf.net/sfu/msIE9-sfdev2dev >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > From mdavies5 at ...169... Sat Nov 20 01:01:21 2010 From: mdavies5 at ...169... (Michael) Date: Sat, 20 Nov 2010 11:01:21 +1100 Subject: [Gambas-user] About help and arrays and variables In-Reply-To: <179586.71552.qm@...2505...> References: <179586.71552.qm@...2505...> Message-ID: <4CE70FD1.2000500@...169...> Zelimir, I have spent years in VB6 and VB.Net and C#.Net. I have just recently switched to Gambas2 and it is very rewarding. It doesn't have the full range of facilities of VB.Net but in many instances it is easier to work with and any shortcomings can be overcome. It's fun! Haven't tried Gambas 3 yet as not fully released and cannot comment on the other languages you mention Regards Mike On 20/11/10 07:40, Zelimir Ikovic wrote: > I am following discussion on Gambas more than 3 months. > > Last 10 years I worked in VB6 (70%) and C(30%) on Windows. > > I am about to switch to Linux, and I have to decide: > Gambas3, FreePascal (fpGUI or Lazarus) or C, C++ and FLTK > I am just wondering is there any discussion on this topic, and where. > > How do you compare Gambas against those tools > > Regards > > > > > ------------------------------------------------------------------------------ > Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2& L3. > Spend less time writing and rewriting code and more time creating great > experiences on the web. Be a part of the beta today > http://p.sf.net/sfu/msIE9-sfdev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > From gambas at ...1... Sat Nov 20 02:30:46 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sat, 20 Nov 2010 02:30:46 +0100 Subject: [Gambas-user] BUG: postgresql dropped columns In-Reply-To: <201011191948.28236.bbruen@...2308...> References: <201011191948.28236.bbruen@...2308...> Message-ID: <201011200230.46874.gambas@...1...> > If a column from a postgresql table is dropped, postgresql does not > actually remove the column, from the help files: > > "The DROP COLUMN form does not physically remove the column, but simply > makes it invisible to SQL operations. Subsequent insert and update > operations in the table will store a null value for the column. Thus, > dropping a column is quick but it will not immediately reduce the on-disk > size of your table, as the space occupied by the dropped column is not > reclaimed. The space will be reclaimed over time as existing rows are > updated. (These statements do not apply when dropping the system oid > column; that is done with an immediate rewrite.)" > (My emphasis) > > Gambas does not respect this and continually returns a database error on > subsequent row updates, viz: > Database level error (-1) Cannot modify record: ERROR: column > "........pg.dropped.8........" of relation "track" does not exist > > This is a fundamental error. The Gambas PostgreSQL driver does not use the "drop column" instruction, so I was not aware of this strange feature. I will see if dropped fields can be ignored. Regards, -- Beno?t Minisini From wdahn at ...1000... Sat Nov 20 06:24:14 2010 From: wdahn at ...1000... (Werner) Date: Sat, 20 Nov 2010 13:24:14 +0800 Subject: [Gambas-user] About help and arrays and variables In-Reply-To: <179586.71552.qm@...2505...> References: <179586.71552.qm@...2505...> Message-ID: <4CE75B7E.7040803@...1000...> On 20/11/10 04:40, Zelimir Ikovic wrote: > I am following discussion on Gambas more than 3 months. > > Last 10 years I worked in VB6 (70%) and C(30%) on Windows. > > I am about to switch to Linux, and I have to decide: > Gambas3, FreePascal (fpGUI or Lazarus) or C, C++ and FLTK > I am just wondering is there any discussion on this topic, and where. > > How do you compare Gambas against those tools > > Regards > Hello and welcome. Mr. Ballmer will not like this. He will not like this at all. Watch out for low flying chairs. Sorry, couldn't resist. From ihaywood at ...1979... Sat Nov 20 07:11:10 2010 From: ihaywood at ...1979... (Ian Haywood) Date: Sat, 20 Nov 2010 17:11:10 +1100 Subject: [Gambas-user] About help and arrays and variables In-Reply-To: <4CE75B7E.7040803@...1000...> References: <179586.71552.qm@...2505...> <4CE75B7E.7040803@...1000...> Message-ID: On Sat, Nov 20, 2010 at 4:24 PM, Werner wrote: > On 20/11/10 04:40, Zelimir Ikovic wrote: >> I am following discussion on Gambas more than 3 months. >> >> Last 10 years I worked in VB6 (70%) and C(30%) on Windows. >> >> I am about to switch to Linux, and I have to decide: >> Gambas3, FreePascal (fpGUI or Lazarus) or C, C++ and FLTK >> I am just wondering is there any discussion on this topic, and where. >> >> How do you compare Gambas against those tools Gambas is the smoothest transition from VB in terms of language syntax, the differences are usually thngs most VB programmers would acknowledge as defects in the original language, such as 1-based arrays, overloading ( ) to deference arrays. However Gambas is Linux-only, the advantage of FreePascal and C++ is you can port back to Windows. The Gambas IDE is easier to use and more stable IMHO. Of the three languages (C++, Pascal, Gambas), Gambas is the most high-level. It is fully OOP but lacks the "protected" access level (personally I hardly used it in C++ and don't miss it) The only things I really miss are function pointers ("procedural variables" in Pascal) and a proper heredoc syntax. Gambas is interpreted, the other 2 are compiled, so it's slower, but in practice I haven't found this an issue (it's heaps faster than Java, and even Ruby, probably on par with Python) Ian From gambas.fr at ...626... Sat Nov 20 08:05:00 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Sat, 20 Nov 2010 08:05:00 +0100 Subject: [Gambas-user] About help and arrays and variables In-Reply-To: <4CE70FD1.2000500@...169...> References: <179586.71552.qm@...2505...> <4CE70FD1.2000500@...169...> Message-ID: 2010/11/20 Michael : > Zelimir, > I have spent years in VB6 and VB.Net and C#.Net. I have just recently > switched to Gambas2 and it is very rewarding. It doesn't have the full > range of facilities of VB.Net but in many instances it is easier to work > with and any shortcomings can be overcome. It's fun! > Haven't tried Gambas 3 yet as not fully released and cannot comment on > the other languages you mention > Regards > Mike so try Gambas 3 ;) From gambas.fr at ...626... Sat Nov 20 08:16:57 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Sat, 20 Nov 2010 08:16:57 +0100 Subject: [Gambas-user] About help and arrays and variables In-Reply-To: <179586.71552.qm@...2505...> References: <179586.71552.qm@...2505...> Message-ID: 2010/11/19 Zelimir Ikovic : > I am following discussion on Gambas more than 3 months. > > Last 10 years I worked in VB6 (70%) and C(30%) on Windows. > > I am about to switch to Linux, and I have to decide: > Gambas3, FreePascal (fpGUI or Lazarus) or C, C++ and FLTK > I am just wondering is there any discussion on this topic, and where. > > How do you compare Gambas against those tools > > Regards > it depend what you have to do with : Have you to port it to wondows or mac ... ? if yes choose freepascal or C++ if not ... is it a game or a program that need full cpu power ? if yes ... use C++ if not ... you can use Gambas . Gambas is (for an interpreted language) really fast, modern, logical, object oriented. The IDE is simple and really complete (in Gambas3 more :) ) The Lack of Gambas ? ... the Help is not really easy for a person that have never use any language. From Gambas at ...1950... Sat Nov 20 13:54:27 2010 From: Gambas at ...1950... (Caveat) Date: Sat, 20 Nov 2010 13:54:27 +0100 Subject: [Gambas-user] Edit XML In-Reply-To: <1289883525.22168.0.camel@...37...> References: <1289883525.22168.0.camel@...37...> Message-ID: <1290257667.3398.64.camel@...2479...> Hi Mauricio Sorry for the late reply, I was doing a lot of thinking. :-) Perhaps you might like something along these lines: DIM rewriter AS NEW XMLRewriter ' Read the original input XML (See http://pastebin.com/aR11N5uc) rewriter.parseInput(User.home &/ "Heroes.xml") ' All existing Text Entities in /all_characters/characters/heroe/name with current value "Claire Bennet" will be updated to "Banana Pudding" rewriter.updateTextByPath("/all_characters/characters/heroe/name", "Claire Bennet", "Banana Pudding") ' All existing Text Entities in /all_characters/characters/villain/played_by will be updated to "Someone evil" regardless of the current content rewriter.updateTextByPath("/all_characters/characters/villain/played_by", NULL, "Someone evil") ' All Text Entities with the value "Being silly" get updated to "Being a complete donut brain" rewriter.updateTextByValue("Being silly", "Being a complete donut brain") ' Change the value of the attribute named "id" to "h1" on all Entities having an Attribute named "name" with a value of "Claire Bennet" rewriter.changeAttribute("/all_characters/characters/heroe", "name", "Claire Bennet", "id", "h1") ' Change the value of the attribute named "id" to "h2" on all Entities having an Attribute named "name" with a value of "Hiro Nakamura" rewriter.changeAttribute("/all_characters/characters/heroe", "name", "Hiro Nakamura", "id", "h2") ' First correct a fault in the XML (Attribute called "name" has an erroneous space at the front of the value) ' So this will change the value of the Attribute named "name" to "Gabriel Sylar" on all Entities having an Attribute named "name" with a value of " Gabriel Sylar" (note the leading space) rewriter.changeAttribute("/all_characters/characters/villain", "name", " Gabriel Sylar", "name", "Gabriel Sylar") ' Now continue updating the ids rewriter.changeAttribute("/all_characters/characters/villain", "name", "Gabriel Sylar", "id", "v1") rewriter.changeAttribute("/all_characters/characters/heroe", "name", "Graham", "id", "b1") rewriter.changeAttribute("/all_characters/characters/heroe", "name", "Bill", "id", "b2") rewriter.changeAttribute("/all_characters/characters/heroe", "name", "Tim", "id", "b3") ' Write out the new XML from the changed internal data model (See http://pastebin.com/T0S96xiS) rewriter.writeXML(User.home &/ "NewHeroes.xml", TRUE, "UTF-8") XMLRewriter is a class in a little project I've been working on. The idea of XMLRewriter is that it should be capable of parsing any XML input and applying edits to it to create a new output XML. The XMLRewriter class itself does not need to know anything about the XML it's being fed, as it automagically builds an internal data model of the provided XML. :-D Let me know if you're interested in taking this further, perhaps we can go off-list to get into the details. Regards, Caveat On Mon, 2010-11-15 at 22:58 -0600, Mauricio Baeza wrote: > Hi all ... > > With the library for XML I can, without problems ... > 1 .- Create new XML file > 2 .- Read any XML file > > What I can not do is change just one attribute of an element of an > existing file. Does anyone have a sample? > > Greetings > > > From demosthenesk at ...626... Sat Nov 20 15:21:54 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Sat, 20 Nov 2010 16:21:54 +0200 Subject: [Gambas-user] About help and arrays and variables Message-ID: <1290262914.3875.5.camel@...2493...> hi, i have gambas2-2.21 rev3300 > Now my examples tell me if i am right... > > Dynamic arrays ------------------------- > 'locale scope in a SUB > DIM aInt2 AS Integer[3] 'this is a dynamic array > DIM aInt2 AS Integer[] = [1, 2, 3] 'another dynamic array > > 'global scope in Declarations > PUBLIC aInt2 AS Integer[] = [1, 2, 3] 'more dynamic arrays > PRIVATE aInt2 AS Integer[] = [1, 2, 3] > ------------------------------------------- > And now finally static arrays: > > Static arrays ----------------------------- > 'local scope in a SUB > DIM aInt2[10] AS Integer 'this static array is in a SUB! > > 'global scope in Declarations > PRIVATE aInt2[10] AS Integer ' this static array is ok in declarations > PUBLIC aInt2[10] AS Integer 'this is forbidden in global scope, i get > an error > ------------------------------------------- for static arrays i could declare it as aInt2[10] AS Integer in FMain form without PRIVATE or STATIC word. Is it accepted this? -- Regards, Demosthenes Koptsis. From demosthenesk at ...626... Sat Nov 20 16:48:24 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Sat, 20 Nov 2010 17:48:24 +0200 Subject: [Gambas-user] Bit manipulation functions Message-ID: <1290268104.5071.12.camel@...2493...> Good evening to all, i test Lsr with a negative short and i get i thing wrong results. PRINT "Bin(-9) :"; Bin(-9) PRINT "Bin(Lsl(-9, 1)):"; Bin(Lsl(-9, 1)) PRINT "Bin(Lsr(-9, 1)):"; Bin(Lsr(-9, 1)) Bin(-9) :1111111111111111111111111111111111111111111111111111111111110111 Bin(Lsl(-9,1)):1111111111111111111111111111111111111111111111111111111111101110 Bin(Lsr(-9,1)):1111111111111111111111111111011 Lsl is correct, it adds a 0 at the right and shift binary to left Lsr i think is wrong -9 is 1111111111111111111111111111111111111111111111111111111111110111 Lsr(-9,1) should be 0111111111111111111111111111111111111111111111111111111111111011 also i found in help Lsr with a negative Short Number argument will have as result a Short which has 32 bits, bits 16 to 31 are the result of shifted pattern &HFFFF0000& This is a Bug of Verion 1.9.28 Is this that case? This bug does still exist? -- Regards, Demosthenes Koptsis. From jussi.lahtinen at ...626... Sat Nov 20 16:55:40 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sat, 20 Nov 2010 17:55:40 +0200 Subject: [Gambas-user] Bit manipulation functions In-Reply-To: <1290268104.5071.12.camel@...2493...> References: <1290268104.5071.12.camel@...2493...> Message-ID: > PRINT "Bin(-9) :"; Bin(-9) > PRINT "Bin(Lsl(-9, 1)):"; Bin(Lsl(-9, 1)) > PRINT "Bin(Lsr(-9, 1)):"; Bin(Lsr(-9, 1)) > > Bin(-9) > :1111111111111111111111111111111111111111111111111111111111110111 > > Bin(Lsl(-9,1)):1111111111111111111111111111111111111111111111111111111111101110 > Bin(Lsr(-9,1)):1111111111111111111111111111011 > > Lsl is correct, it adds a 0 at the right and shift binary to left > Lsr i think is wrong > > -9 is > 1111111111111111111111111111111111111111111111111111111111110111 > > Lsr(-9,1) should be > 0111111111111111111111111111111111111111111111111111111111111011 > > I think the sign bit shouldn't be shifted. So this is correct. Jussi From jussi.lahtinen at ...626... Sat Nov 20 16:58:07 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sat, 20 Nov 2010 17:58:07 +0200 Subject: [Gambas-user] Bit manipulation functions In-Reply-To: References: <1290268104.5071.12.camel@...2493...> Message-ID: Argh... no. Try this: ? bin(Lsr(-9,1),32) 01111111111111111111111111111011 Jussi On Sat, Nov 20, 2010 at 17:55, Jussi Lahtinen wrote: > > PRINT "Bin(-9) :"; Bin(-9) >> PRINT "Bin(Lsl(-9, 1)):"; Bin(Lsl(-9, 1)) >> PRINT "Bin(Lsr(-9, 1)):"; Bin(Lsr(-9, 1)) >> >> Bin(-9) >> :1111111111111111111111111111111111111111111111111111111111110111 >> >> Bin(Lsl(-9,1)):1111111111111111111111111111111111111111111111111111111111101110 >> Bin(Lsr(-9,1)):1111111111111111111111111111011 >> >> Lsl is correct, it adds a 0 at the right and shift binary to left >> Lsr i think is wrong >> >> -9 is >> 1111111111111111111111111111111111111111111111111111111111110111 >> >> Lsr(-9,1) should be >> 0111111111111111111111111111111111111111111111111111111111111011 >> >> > I think the sign bit shouldn't be shifted. So this is correct. > > Jussi > > From demosthenesk at ...626... Sat Nov 20 17:14:16 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Sat, 20 Nov 2010 18:14:16 +0200 Subject: [Gambas-user] Bit manipulation functions In-Reply-To: References: <1290268104.5071.12.camel@...2493...> Message-ID: <1290269656.5071.13.camel@...2493...> hm, ok... ? bin(-9, 64) 1111111111111111111111111111111111111111111111111111111111110111 ? bin(lsr(-9,1), 64) 0000000000000000000000000000000001111111111111111111111111111011 On Sat, 2010-11-20 at 17:58 +0200, Jussi Lahtinen wrote: > ? bin(Lsr(-9,1),32) -- Regards, Demosthenes Koptsis. From demosthenesk at ...626... Sat Nov 20 17:27:14 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Sat, 20 Nov 2010 18:27:14 +0200 Subject: [Gambas-user] Bit manipulation functions In-Reply-To: References: <1290268104.5071.12.camel@...2493...> Message-ID: <1290270434.5071.20.camel@...2493...> but why a shift to right of ? bin(-9, 64) 1111111111111111111111111111111111111111111111111111111111110111 is not 0111111111111111111111111111111111111111111111111111111111111011 and it is ? bin(lsr(-9,1), 64) 0000000000000000000000000000000001111111111111111111111111111011 ??? because lsr processes 32 bits of the short -9 and not 64 bits of the long binary number? On Sat, 2010-11-20 at 17:58 +0200, Jussi Lahtinen wrote: > Argh... no. > Try this: > ? bin(Lsr(-9,1),32) > 01111111111111111111111111111011 > > Jussi > > > On Sat, Nov 20, 2010 at 17:55, Jussi Lahtinen wrote: > > > > > PRINT "Bin(-9) :"; Bin(-9) > >> PRINT "Bin(Lsl(-9, 1)):"; Bin(Lsl(-9, 1)) > >> PRINT "Bin(Lsr(-9, 1)):"; Bin(Lsr(-9, 1)) > >> > >> Bin(-9) > >> :1111111111111111111111111111111111111111111111111111111111110111 > >> > >> Bin(Lsl(-9,1)):1111111111111111111111111111111111111111111111111111111111101110 > >> Bin(Lsr(-9,1)):1111111111111111111111111111011 > >> > >> Lsl is correct, it adds a 0 at the right and shift binary to left > >> Lsr i think is wrong > >> > >> -9 is > >> 1111111111111111111111111111111111111111111111111111111111110111 > >> > >> Lsr(-9,1) should be > >> 0111111111111111111111111111111111111111111111111111111111111011 > >> > >> > > I think the sign bit shouldn't be shifted. So this is correct. > > > > Jussi > > > > > ------------------------------------------------------------------------------ > Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. > Spend less time writing and rewriting code and more time creating great > experiences on the web. Be a part of the beta today > http://p.sf.net/sfu/msIE9-sfdev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user -- Regards, Demosthenes Koptsis. From jussi.lahtinen at ...626... Sat Nov 20 17:30:32 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sat, 20 Nov 2010 18:30:32 +0200 Subject: [Gambas-user] Bit manipulation functions In-Reply-To: <1290270434.5071.20.camel@...2493...> References: <1290268104.5071.12.camel@...2493...> <1290270434.5071.20.camel@...2493...> Message-ID: because lsr processes 32 bits of the short -9 and not 64 bits of the > long binary number? > Yes, -9 is considered as short. Try: ? bin(lsr(clng(-9),1), 64) 0111111111111111111111111111111111111111111111111111111111111011 Jussi From demosthenesk at ...626... Sat Nov 20 17:47:26 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Sat, 20 Nov 2010 18:47:26 +0200 Subject: [Gambas-user] Bit manipulation functions In-Reply-To: References: <1290268104.5071.12.camel@...2493...> <1290270434.5071.20.camel@...2493...> Message-ID: <1290271646.5071.21.camel@...2493...> Great! it's easy! Thanks very much! On Sat, 2010-11-20 at 18:30 +0200, Jussi Lahtinen wrote: > because lsr processes 32 bits of the short -9 and not 64 bits of the > > long binary number? > > > > Yes, -9 is considered as short. > Try: > ? bin(lsr(clng(-9),1), 64) > 0111111111111111111111111111111111111111111111111111111111111011 > > Jussi > ------------------------------------------------------------------------------ > Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. > Spend less time writing and rewriting code and more time creating great > experiences on the web. Be a part of the beta today > http://p.sf.net/sfu/msIE9-sfdev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user -- Regards, Demosthenes Koptsis. From demosthenesk at ...626... Sat Nov 20 20:52:01 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Sat, 20 Nov 2010 21:52:01 +0200 Subject: [Gambas-user] WAIT command questions. In-Reply-To: <201011190140.13811.gambas@...1...> References: <1289932145.14611.3.camel@...2493...> <201011170003.07611.gambas@...1...> <1289981048.21019.5.camel@...2493...> <201011190140.13811.gambas@...1...> Message-ID: <1290282721.9162.4.camel@...2494...> > > The SUBs event_read() such "PUBLIC SUB MySerialPort_Read()" in example > > are raised recursively again and again if WAIT is called from them > > because they are part of event loop or because event loop call them > > again and again? > How do they work what? > i speak about read events the Subs MySerialPort_Read(), Process_Read(), etc how do they work together with event loop... If we put a WAIT in them the event loop calls again and again them. That i mean. -- Regards, Demosthenes From soleilpqd at ...626... Sat Nov 20 23:52:12 2010 From: soleilpqd at ...626... (=?UTF-8?B?UGjhuqFtIFF1YW5nIETGsMahbmc=?=) Date: Sun, 21 Nov 2010 05:52:12 +0700 Subject: [Gambas-user] Gambas2 IDE preferences & System Language Message-ID: Hi, My system language is English. I change the system language (re-login) to test my program GUI (but keep all my user's folders name (Desktop, Music ...) in English), and I lost Gambas2 IDE preferences (like color, font ... of the IDE editor). But when I change system language back to English, everything back too. What's different here? No folder is renamed so path of config files does not change, why the preferences are different? From ian.roper at ...1974... Sun Nov 21 02:15:52 2010 From: ian.roper at ...1974... (Ian Roper) Date: Sun, 21 Nov 2010 09:15:52 +0800 Subject: [Gambas-user] ODBC and MS SQL 2000 table existence test issue Message-ID: <1290302152.2149.17.camel@...2506...> Greetings all, I'm asking this question on behalf of a member of http://www.gambasforum.com who can't access this mailing list as it's blocked in his country for some reason ? The issue he is trying to resolve is: Using an ODBC connection to a MS SQL 2000 instance. He can connect. He can list tables. He can access data. The problem is that if he tries the table existence check below he always gets a TRUE even if the table dose not exist. bExist = FALSE bExist = $hConn.Tables.Exist("test") IF bExist THEN Message.Info("exist") ENDIF In the mean time , I have asked him to carefully check the perms on the SQL server for the account he is accessing with to ensure that there are no unusual settings applied. I'll post any suggestions back to his request thread. Thank you in advance. Ian Roper Perth - Western Australia. From mauricio at ...2500... Sun Nov 21 06:23:39 2010 From: mauricio at ...2500... (Mauricio Baeza) Date: Sat, 20 Nov 2010 23:23:39 -0600 Subject: [Gambas-user] Edit XML In-Reply-To: <1290257667.3398.64.camel@...2479...> References: <1289883525.22168.0.camel@...37...> <1290257667.3398.64.camel@...2479...> Message-ID: <1290317019.2265.1.camel@...37...> El s?b, 20-11-2010 a las 13:54 +0100, Caveat escribi?: > Hi Mauricio > > Sorry for the late reply, I was doing a lot of thinking. :-) > > Perhaps you might like something along these lines: > > XMLRewriter is a class in a little project I've been working on. The > idea of XMLRewriter is that it should be capable of parsing any XML > input and applying edits to it to create a new output XML. The > XMLRewriter class itself does not need to know anything about the XML > it's being fed, as it automagically builds an internal data model of the > provided XML. :-D > > Let me know if you're interested in taking this further, perhaps we can > go off-list to get into the details. > > Regards, > Caveat > > On Mon, 2010-11-15 at 22:58 -0600, Mauricio Baeza wrote: > > > Hi all ... > > > > With the library for XML I can, without problems ... > > 1 .- Create new XML file > > 2 .- Read any XML file > > > > What I can not do is change just one attribute of an element of an > > existing file. Does anyone have a sample? > > > > Greetings > > > > > > > Hello ... Thanks for the reply ... I really just want to know how to edit an attribute of an element. Currently I have solved simply not adding the attribute to first create the XML. Then add it as follows: DIM oDocXMLTmp AS NEW XmlDocument DIM sTmp AS String oDocXMLTmp.FromString(docXML) oDocXMLTmp.Root.NewAttribute("sello", Sello) sTmp = oDocXMLTmp.ToString() But the stamp is the final attribute. To be in the order I want, I need to add it to create the XML and then edit. Which I could not. If only you could help me with this, much will thank you. Best regards -- Mauricio Baeza 10 a?os usando OpenOffice.org, libre, gratuito y seguro _______________________________ Todo lo que no es dado es perdido From gambas.fr at ...626... Sun Nov 21 07:40:42 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Sun, 21 Nov 2010 07:40:42 +0100 Subject: [Gambas-user] Gambas2 IDE preferences & System Language In-Reply-To: References: Message-ID: 2010/11/20 Ph?m Quang D??ng : > Hi, > > My system language is English. I change the system language (re-login) to > test my program GUI (but keep all my user's folders name (Desktop, Music > ...) in English), and I lost Gambas2 IDE preferences (like color, font ... > of the IDE editor). But when I change system language back to English, > everything back too. > > What's different here? No folder is renamed so path of config files does not > change, why the preferences are different? can you say me to what language you have change ? > ------------------------------------------------------------------------------ > Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ?ECMAScript5, and DOM L2 & L3. > Spend less time writing and ?rewriting code and more time creating great > experiences on the web. Be a part of the beta today > http://p.sf.net/sfu/msIE9-sfdev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Fabien Bodard From demosthenesk at ...626... Sun Nov 21 11:44:43 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Sun, 21 Nov 2010 12:44:43 +0200 Subject: [Gambas-user] Functions with ? Message-ID: <1290336284.6206.2.camel@...2493...> Good morning to all, i want to ask wich is the difference between IsAscii() and Ascii?() there are also as i see many such functions with function?() style. -- Regards, Demosthenes Koptsis. From soleilpqd at ...626... Sun Nov 21 12:52:57 2010 From: soleilpqd at ...626... (=?UTF-8?B?UGjhuqFtIFF1YW5nIETGsMahbmc=?=) Date: Sun, 21 Nov 2010 18:52:57 +0700 Subject: [Gambas-user] Gambas2 IDE preferences & System Language In-Reply-To: References: Message-ID: Vietnamese. With Fedora 14, Gambas 2.21. From soleilpqd at ...626... Sun Nov 21 15:45:01 2010 From: soleilpqd at ...626... (=?UTF-8?B?UGjhuqFtIFF1YW5nIETGsMahbmc=?=) Date: Sun, 21 Nov 2010 21:45:01 +0700 Subject: [Gambas-user] How to exit loop and close the form Message-ID: Hi, I want create a dialog form which showes the current progress and let user stop the operation and close this dialog by clicking a Cancel button On form1 I have 2 progress bars and 1 button: Private shouldStop as Boolean Private Sub Form_Open() shouldStop = False Me.Show() doIt() 'Main loop of the operation End Private Sub Button1_Click() shouldStop = True Me.Close() End Private Sub doIt() Dim i As Interger, j As Interger i = 1 Repeat j = 1 Repeat Wait 'Let user click Cancel button ' My job here ProgressBar2.Value = j / 100 j += 1 Until shouldStop Or j = 100 ProgressBar1.Value = i / 100 i += 1 ProgressBar2.Reset() Until shouldStop Or i = 100 Me.Close() End On FMain I call: form1.ShowDialog() In real-time when I click Cancel button first time, the operation (progress bar) stoppes but the form does not close until I click Cancel button the second time. I think that my code is bad but I can not find the better solution. Please help! Thank you. From mauricio at ...2500... Sun Nov 21 17:22:39 2010 From: mauricio at ...2500... (Mauricio Baeza) Date: Sun, 21 Nov 2010 10:22:39 -0600 Subject: [Gambas-user] Draw Text Message-ID: <1290356559.10331.5.camel@...37...> Hi all ... Draw.Text use to draw text on screen. sTmp = "Long Text - asafdasdggasddashsdah sdfg df sdf gsdf dshfsdhfsdf hsdf hsdf hsdfhsdf hsdf" Draw.Text(sTmp,500,500,2000,3000) The online help says that the alignment of the text, shall take effect if you use the optional parameters width and height. If I line up right, left and center, is displayed correctly. But I can not show text justified. How I can do? Thanks in advance. -- Mauricio Baeza 10 a?os usando OpenOffice.org, libre, gratuito y seguro _______________________________ Todo lo que no es dado es perdido From math.eber at ...221... Sun Nov 21 17:28:28 2010 From: math.eber at ...221... (Matti) Date: Sun, 21 Nov 2010 17:28:28 +0100 Subject: [Gambas-user] Functions with ? In-Reply-To: <1290336284.6206.2.camel@...2493...> References: <1290336284.6206.2.camel@...2493...> Message-ID: <4CE948AC.7030505@...221...> Looking at the help browser, there should be no difference. It should be just a synonym. Am 21.11.2010 11:44, schrieb Demosthenes Koptsis: > Good morning to all, > > i want to ask wich is the difference between > > IsAscii() and Ascii?() > > there are also as i see many such functions with function?() style. > > > > From math.eber at ...221... Sun Nov 21 18:20:27 2010 From: math.eber at ...221... (Matti) Date: Sun, 21 Nov 2010 18:20:27 +0100 Subject: [Gambas-user] How to exit loop and close the form In-Reply-To: References: Message-ID: <4CE954DB.5070105@...221...> You have to specify a delay to Wait. From the docs: "If Delay is not specified, the function processes all pending events and returns immediately. In that specific case, input events (keyboard and mouse) are ignored." Try it like this: Public Sub Form_Open() shouldStop = False Me.Show doIt End Public Sub btnStop_Click() shouldStop = True End Public Sub doIt() Dim i As Integer, j As Integer For i = 1 To 100 If shouldStop = True Then Break ProgressBar1.Value = i / 100 For j = 1 To 100 If shouldStop = True Then Break ProgressBar2.Value = j / 100 Print i, j ' My job here Wait 0.1 Next Wait 0.1 Next Me.Close() End Am 21.11.2010 15:45, schrieb Ph?m Quang D??ng: > Hi, > > I want create a dialog form which showes the current progress and let user > stop the operation and close this dialog by clicking a Cancel button > On form1 I have 2 progress bars and 1 button: > > Private shouldStop as Boolean > > Private Sub Form_Open() > shouldStop = False > Me.Show() > doIt() 'Main loop of the operation > End > > Private Sub Button1_Click() > shouldStop = True > Me.Close() > End > > Private Sub doIt() > Dim i As Interger, j As Interger > i = 1 > Repeat > j = 1 > Repeat > Wait 'Let user click Cancel button > ' My job here > ProgressBar2.Value = j / 100 > j += 1 > Until shouldStop Or j = 100 > ProgressBar1.Value = i / 100 > i += 1 > ProgressBar2.Reset() > Until shouldStop Or i = 100 > Me.Close() > End > > On FMain I call: > > form1.ShowDialog() > > In real-time when I click Cancel button first time, the operation (progress > bar) stoppes but the form does not close until I click Cancel button the > second time. > > I think that my code is bad but I can not find the better solution. Please > help! Thank you. > ------------------------------------------------------------------------------ > Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. > Spend less time writing and rewriting code and more time creating great > experiences on the web. Be a part of the beta today > http://p.sf.net/sfu/msIE9-sfdev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From math.eber at ...221... Sun Nov 21 18:45:34 2010 From: math.eber at ...221... (Matti) Date: Sun, 21 Nov 2010 18:45:34 +0100 Subject: [Gambas-user] To the wish list: FHelpBrowser Message-ID: <4CE95ABE.1030908@...221...> 1. As I asked before, why does the HelpBrowser have to be a "utility" window that you can't minimize? I can't see no reason why it couldn't be a "normal" window that could be used much easier. Read, minimize, try, and read again... 2. Right now, it is impossible to copy some text from FHelpBrowser. This should be possible! If someone asks a question on the mailing list, and you find the answer in FHelpBrowser, it is annoying to have to open the gambas docs on the web just to copy a line of text. Regards Matti From gambas.fr at ...626... Mon Nov 22 06:48:37 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Mon, 22 Nov 2010 06:48:37 +0100 Subject: [Gambas-user] Edit XML In-Reply-To: <1290317019.2265.1.camel@...37...> References: <1289883525.22168.0.camel@...37...> <1290257667.3398.64.camel@...2479...> <1290317019.2265.1.camel@...37...> Message-ID: In fact the problem is simple ... xmldoc is not finalized ... since many year. if someone have capabilities and times for it ... 2010/11/21 Mauricio Baeza : > El s?b, 20-11-2010 a las 13:54 +0100, Caveat escribi?: > >> Hi Mauricio >> >> Sorry for the late reply, I was doing a lot of thinking. :-) >> >> Perhaps you might like something along these lines: >> >> XMLRewriter is a class in a little project I've been working on. ?The >> idea of XMLRewriter is that it should be capable of parsing any XML >> input and applying edits to it to create a new output XML. ?The >> XMLRewriter class itself does not need to know anything about the XML >> it's being fed, as it automagically builds an internal data model of the >> provided XML. :-D >> >> Let me know if you're interested in taking this further, perhaps we can >> go off-list to get into the details. >> >> Regards, >> Caveat >> >> On Mon, 2010-11-15 at 22:58 -0600, Mauricio Baeza wrote: >> >> > Hi all ... >> > >> > With the library for XML I can, without problems ... >> > 1 .- Create new XML file >> > 2 .- Read any XML file >> > >> > What I can not do is change just one attribute of an element of an >> > existing file. Does anyone have a sample? >> > >> > Greetings >> > >> > >> > >> > > > > Hello ... > > Thanks for the reply ... > > I really just want to know how to edit an attribute of an element. > Currently I have solved simply not adding the attribute to first create > the XML. Then add it as follows: > > DIM oDocXMLTmp AS NEW XmlDocument > DIM sTmp AS String > > ? ?oDocXMLTmp.FromString(docXML) > ? ?oDocXMLTmp.Root.NewAttribute("sello", Sello) > ? ?sTmp = oDocXMLTmp.ToString() > > But the stamp is the final attribute. To be in the order I want, I need > to add it to create the XML and then edit. Which I could not. If only > you could help me with this, much will thank you. > > Best regards > > > -- > Mauricio Baeza > > 10 a?os usando OpenOffice.org, libre, gratuito y seguro > _______________________________ > Todo lo que no es dado es perdido > ------------------------------------------------------------------------------ > Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ?ECMAScript5, and DOM L2 & L3. > Spend less time writing and ?rewriting code and more time creating great > experiences on the web. Be a part of the beta today > http://p.sf.net/sfu/msIE9-sfdev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Fabien Bodard From Gambas at ...1950... Mon Nov 22 11:17:09 2010 From: Gambas at ...1950... (Caveat) Date: Mon, 22 Nov 2010 11:17:09 +0100 Subject: [Gambas-user] Edit XML In-Reply-To: References: <1289883525.22168.0.camel@...37...> <1290257667.3398.64.camel@...2479...> <1290317019.2265.1.camel@...37...> Message-ID: <1290421029.3398.143.camel@...2479...> Hi Fabien The code I have written acts as a kind of generic interface between the existing Gambas XMLReader and XMLWriter. The question is, does this go some way to "completing xmldoc"? The code consists of: XMLParserToModel XMLContainer XMLRewriter The important thing to note here is that my XMLParserToModel should be able to read *ANY* XML and create an internal model of it, in a set of XMLContainers. I have tried it with hand-written XML, and with examples from t'internet. The XMLContainer object I've created is capable of holding a hierarchical structure with XMLContainers that themselves hold Collections of XMLContainer objects. Each XMLContainer also holds the Node Text (if applicable) and any Attributes for that Node. When created, an XMLContainer knows its parent XMLContainer but as the object model is built, the XMLContainers morph into children of their parents. The XMLRewriter is really just a demonstration class to show how, using the XMLParserToModel to build a model of your XML and the XMLContainer's built-in searching to inspect and alter your XML, you can create edits which alter specific elements of your original XML. Any changed XML can be seen as a String (use toXMLString on an XMLContainer) or written to a new XML file (use writeXML in the XMLRewriter class, which calls out to writeSelf on the root XMLContainer). Here's a transcript of a session paying with the new objects, I think they are quite powerful. Remember there's NO code in the 3 classes described above that knows anything about orders or priorities, or CDs or catalogs, or heroes or villains etc. *************** Provide some sample XML as a String *************** inputString = 20101120123rubber duck20101120123s ponge *************** Now parse the XML ********************************* parserToModel.parseInputString(inputString) *************** Get the model out of the parserToModel object and ask it to represent itself as XML *************** parserToModel.getModel().toXMLString() 20101120123 rubber duck 20101120123 sponge ******************************************************************************************************************* *************** Now read sample XML from a file (from http://www.w3schools.com/xml/cd_catalog.xml) *************** parserToModel.parseInputFile(User.Home &/ "dev" &/ "cd_catalog.xml") *************** Pick out the Node(s) containing an ARTIST text entity with the text Kim Larsen *************** parserToModel.getModel().findSuperNodesByText("Kim Larsen", "ARTIST", selectArtists, NULL) *************** Ask them to represent themselves as XML strings *************** FOR EACH selectArtists PRINT selectArtists[selectArtists.Key].toXMLString() NEXT Midt om natten Kim Larsen EU Medley 7.80 1983 ******************************************************************************* *************** Pick out the Node(s) containing a COUNTRY text entity with the text EU *************** parserToModel.getModel().findSuperNodesByText("EU", "COUNTRY", selectArtists, NULL) *************** Ask them to represent themselves as XML strings *************** FOR EACH selectArtists PRINT selectArtists[selectArtists.Key].toXMLString() NEXT Eros Eros Ramazzotti EU BMG 9.90 1997 Romanza Andrea Bocelli EU Polydor 10.80 1996 Black angel Savage Rose EU Mega 10.90 1995 Midt om natten Kim Larsen EU Medley 7.80 1983 Picture book Simply Red EU Elektra 7.20 1985 ******************************************************************************* ************************************************************** *************** Read the original Heroes input XML (See http://pastebin.com/aR11N5uc) *************** parserToModel.parseInputFile(User.home &/ "Heroes.xml") *************** Look at the original XML we have in our internal data model *************** parserToModel.getModel().toXMLString() Claire Bennet Hayden Panettiere Rapid cellular regeneration Hiro Nakamura Masi Oka Space-time manipulation: teleportation & time travel Gabriel Sylar Zachary Quinto Understand how things work and multiple other abilities acquired Graham Graham Bell Being silly Bill Bill Odie Being very silly Tim Tim Brook Taylor Being very very silly ******************************************************************************************* *************** All existing Text Entities in /all_characters/characters/heroe/name with current value "Claire Bennet" will be updated to "Banana Pudding" *************** rewriter.updateTextByPath("/all_characters/characters/heroe/name", "Claire Bennet", "Banana Pudding") *************** All existing Text Entities in /all_characters/characters/villain/played_by will be updated to "Someone evil" regardless of the current content rewriter.updateTextByPath("/all_characters/characters/villain/played_by", NULL, "Someone evil") *************** All Text Entities with the value "Being silly" get updated to "Being a complete donut brain" rewriter.updateTextByValue("Being silly", "Being a complete donut brain") *************** Change the value of the attribute named "id" to "h1" on all Entities having an Attribute named "name" with a value of "Claire Bennet" rewriter.changeAttribute("/all_characters/characters/heroe", "name", "Claire Bennet", "id", "h1") *************** Change the value of the attribute named "id" to "h2" on all Entities having an Attribute named "name" with a value of "Hiro Nakamura" rewriter.changeAttribute("/all_characters/characters/heroe", "name", "Hiro Nakamura", "id", "h2") *************** First correct a fault in the XML (Attribute called "name" has an erroneous space at the front of the value) *************** So this will change the value of the Attribute named "name" to "Gabriel Sylar" on all Entities having an Attribute named "name" with a value of " Gabriel Sylar" (note the leading space) rewriter.changeAttribute("/all_characters/characters/villain", "name", " Gabriel Sylar", "name", "Gabriel Sylar") *************** Now continue updating the ids *************** Write out the new XML from the changed internal data model (See http://pastebin.com/T0S96xiS) rewriter.writeXML(User.home &/ "dev" &/ "NewHeroes.xml", TRUE, "UTF-8") *************** Look at the new XML from the changed internal data model *************** parserToModel.getModel().toXMLString() Banana Pudding Hayden Panettiere Rapid cellular regeneration Hiro Nakamura Masi Oka Space-time manipulation: teleportation & time travel Gabriel Sylar Someone evil Understand how things work and multiple other abilities acquired Graham Graham Bell Being a complete donut brain Bill Bill Odie Being very silly Tim Tim Brook Taylor Being very very silly **************************************************************************************** Let me know whether you think this approach is worth pursuing... Regards, Caveat On Mon, 2010-11-22 at 06:48 +0100, Fabien Bodard wrote: > In fact the problem is simple ... xmldoc is not finalized ... since many year. > > if someone have capabilities and times for it ... > > 2010/11/21 Mauricio Baeza : > > El s?b, 20-11-2010 a las 13:54 +0100, Caveat escribi?: > > > >> Hi Mauricio > >> > >> Sorry for the late reply, I was doing a lot of thinking. :-) > >> > >> Perhaps you might like something along these lines: > >> > >> XMLRewriter is a class in a little project I've been working on. The > >> idea of XMLRewriter is that it should be capable of parsing any XML > >> input and applying edits to it to create a new output XML. The > >> XMLRewriter class itself does not need to know anything about the XML > >> it's being fed, as it automagically builds an internal data model of the > >> provided XML. :-D > >> > >> Let me know if you're interested in taking this further, perhaps we can > >> go off-list to get into the details. > >> > >> Regards, > >> Caveat > >> > >> On Mon, 2010-11-15 at 22:58 -0600, Mauricio Baeza wrote: > >> > >> > Hi all ... > >> > > >> > With the library for XML I can, without problems ... > >> > 1 .- Create new XML file > >> > 2 .- Read any XML file > >> > > >> > What I can not do is change just one attribute of an element of an > >> > existing file. Does anyone have a sample? > >> > > >> > Greetings > >> > > >> > > >> > > >> > > > > > > > > Hello ... > > > > Thanks for the reply ... > > > > I really just want to know how to edit an attribute of an element. > > Currently I have solved simply not adding the attribute to first create > > the XML. Then add it as follows: > > > > DIM oDocXMLTmp AS NEW XmlDocument > > DIM sTmp AS String > > > > oDocXMLTmp.FromString(docXML) > > oDocXMLTmp.Root.NewAttribute("sello", Sello) > > sTmp = oDocXMLTmp.ToString() > > > > But the stamp is the final attribute. To be in the order I want, I need > > to add it to create the XML and then edit. Which I could not. If only > > you could help me with this, much will thank you. > > > > Best regards > > > > > > -- > > Mauricio Baeza > > > > 10 a?os usando OpenOffice.org, libre, gratuito y seguro > > _______________________________ > > Todo lo que no es dado es perdido > > ------------------------------------------------------------------------------ > > Beautiful is writing same markup. Internet Explorer 9 supports > > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. > > Spend less time writing and rewriting code and more time creating great > > experiences on the web. Be a part of the beta today > > http://p.sf.net/sfu/msIE9-sfdev2dev > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > From gambas at ...1... Mon Nov 22 11:25:42 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 22 Nov 2010 11:25:42 +0100 Subject: [Gambas-user] Edit XML In-Reply-To: <1290421029.3398.143.camel@...2479...> References: <1289883525.22168.0.camel@...37...> <1290421029.3398.143.camel@...2479...> Message-ID: <201011221125.42064.gambas@...1...> > Hi Fabien > > The code I have written acts as a kind of generic interface between the > existing Gambas XMLReader and XMLWriter. The question is, does this go > some way to "completing xmldoc"? > > The code consists of: > XMLParserToModel > XMLContainer > XMLRewriter > > The important thing to note here is that my XMLParserToModel should be > able to read *ANY* XML and create an internal model of it, in a set of > XMLContainers. I have tried it with hand-written XML, and with examples > from t'internet. > > The XMLContainer object I've created is capable of holding a > hierarchical structure with XMLContainers that themselves hold > Collections of XMLContainer objects. Each XMLContainer also holds the > Node Text (if applicable) and any Attributes for that Node. When > created, an XMLContainer knows its parent XMLContainer but as the object > model is built, the XMLContainers morph into children of their parents. > > The XMLRewriter is really just a demonstration class to show how, using > the XMLParserToModel to build a model of your XML and the XMLContainer's > built-in searching to inspect and alter your XML, you can create edits > which alter specific elements of your original XML. Any changed XML can > be seen as a String (use toXMLString on an XMLContainer) or written to a > new XML file (use writeXML in the XMLRewriter class, which calls out to > writeSelf on the root XMLContainer). > > Here's a transcript of a session paying with the new objects, I think > they are quite powerful. Remember there's NO code in the 3 classes > described above that knows anything about orders or priorities, or CDs > or catalogs, or heroes or villains etc. > > *************** Provide some sample XML as a String *************** > inputString = encoding="ISO-8859-1"?> "cd_catalog.css"?> priority="rush">20101120123rubber > duck20101120123s > ponge > *************** Now parse the XML ********************************* > parserToModel.parseInputString(inputString) > *************** Get the model out of the parserToModel object and ask it > to represent itself as XML *************** > parserToModel.getModel().toXMLString() > > > > 20101120123 > rubber duck > > 20101120123 > sponge > *************************************************************************** > **************************************** > > *************** Now read sample XML from a file (from > http://www.w3schools.com/xml/cd_catalog.xml) *************** > parserToModel.parseInputFile(User.Home &/ "dev" &/ "cd_catalog.xml") > *************** Pick out the Node(s) containing an ARTIST text entity > with the text Kim Larsen *************** > parserToModel.getModel().findSuperNodesByText("Kim Larsen", "ARTIST", > selectArtists, NULL) > *************** Ask them to represent themselves as XML strings > *************** > FOR EACH selectArtists > PRINT selectArtists[selectArtists.Key].toXMLString() > NEXT > > > Midt om natten > Kim Larsen > EU > Medley > 7.80 > 1983 > *************************************************************************** > **** *************** Pick out the Node(s) containing a COUNTRY text entity > with the text EU *************** > parserToModel.getModel().findSuperNodesByText("EU", "COUNTRY", > selectArtists, NULL) > *************** Ask them to represent themselves as XML strings > *************** > FOR EACH selectArtists > PRINT selectArtists[selectArtists.Key].toXMLString() > NEXT > > > Eros > Eros Ramazzotti > EU > BMG > 9.90 > 1997 > > > Romanza > Andrea Bocelli > EU > Polydor > 10.80 > 1996 > > > Black angel > Savage Rose > EU > Mega > 10.90 > 1995 > > > Midt om natten > Kim Larsen > EU > Medley > 7.80 > 1983 > > > Picture book > Simply Red > EU > Elektra > 7.20 > 1985 > *************************************************************************** > **** ************************************************************** > *************** Read the original Heroes input XML (See > http://pastebin.com/aR11N5uc) *************** > parserToModel.parseInputFile(User.home &/ "Heroes.xml") > *************** Look at the original XML we have in our internal data > model *************** > parserToModel.getModel().toXMLString() > > > > > Claire Bennet > Hayden Panettiere > Rapid cellular regeneration > > Hiro Nakamura > Masi Oka > Space-time manipulation: teleportation & time > travel > > Gabriel Sylar > Zachary Quinto > Understand how things work and multiple other abilities > acquired > > > Graham > Graham Bell > Being silly > > Bill > Bill Odie > Being very silly > > Tim > Tim Brook Taylor > Being very very > silly > *************************************************************************** > **************** *************** All existing Text Entities > in /all_characters/characters/heroe/name with current value "Claire > Bennet" will be updated to "Banana Pudding" *************** > rewriter.updateTextByPath("/all_characters/characters/heroe/name", > "Claire Bennet", "Banana Pudding") > *************** All existing Text Entities > in /all_characters/characters/villain/played_by will be updated to > "Someone evil" regardless of the current content > rewriter.updateTextByPath("/all_characters/characters/villain/played_by", > NULL, "Someone evil") *************** All Text Entities with the value > "Being silly" get updated to "Being a complete donut brain" > rewriter.updateTextByValue("Being silly", "Being a complete donut > brain") > *************** Change the value of the attribute named "id" to "h1" on > all Entities having an Attribute named "name" with a value of "Claire > Bennet" > rewriter.changeAttribute("/all_characters/characters/heroe", "name", > "Claire Bennet", "id", "h1") > *************** Change the value of the attribute named "id" to "h2" on > all Entities having an Attribute named "name" with a value of "Hiro > Nakamura" > rewriter.changeAttribute("/all_characters/characters/heroe", "name", > "Hiro Nakamura", "id", "h2") > *************** First correct a fault in the XML (Attribute called > "name" has an erroneous space at the front of the value) > *************** So this will change the value of the Attribute named > "name" to "Gabriel Sylar" on all Entities having an Attribute named > "name" with a value of " Gabriel Sylar" (note the leading space) > rewriter.changeAttribute("/all_characters/characters/villain", "name", " > Gabriel Sylar", "name", "Gabriel Sylar") > *************** Now continue updating the ids > *************** Write out the new XML from the changed internal data > model (See http://pastebin.com/T0S96xiS) > rewriter.writeXML(User.home &/ "dev" &/ "NewHeroes.xml", TRUE, "UTF-8") > *************** Look at the new XML from the changed internal data model > *************** > parserToModel.getModel().toXMLString() > > > > > Banana Pudding > Hayden Panettiere > Rapid cellular regeneration > > Hiro Nakamura > Masi Oka > Space-time manipulation: teleportation & time > travel > > Gabriel Sylar > Someone evil > Understand how things work and multiple other abilities > acquired > > > Graham > Graham Bell > Being a complete donut brain > > Bill > Bill Odie > Being very silly > > Tim > Tim Brook Taylor > Being very very > silly > *************************************************************************** > ************* > > Let me know whether you think this approach is worth pursuing... > > Regards, > Caveat > It is sort of a "simple XML interface" ? -- Beno?t Minisini From soleilpqd at ...626... Mon Nov 22 12:18:56 2010 From: soleilpqd at ...626... (=?UTF-8?B?UGjhuqFtIFF1YW5nIETGsMahbmc=?=) Date: Mon, 22 Nov 2010 18:18:56 +0700 Subject: [Gambas-user] How to exit loop and close the form In-Reply-To: <4CE954DB.5070105@...221...> References: <4CE954DB.5070105@...221...> Message-ID: Thank for your answers, but the result is the same. I let the progress run to the end but it does not automatically close. I tried some ways: I change "Me.Close" by: "Me.Hide" => same result, the dialog still appears "ProgressBar2.Visible = False" => ProgressBar2 disappears "Quit" => when I click Cancel button or let it finish, program quits normally. May be I have to change my design ... ~.~ (I think about use a container control like panel or frame on FMain + Visible attribute). 2010/11/22 Matti > You have to specify a delay to Wait. From the docs: > "If Delay is not specified, the function processes all pending events and > returns immediately. In that specific case, input events (keyboard and > mouse) > are ignored." > > Try it like this: > > Public Sub Form_Open() > shouldStop = False > Me.Show > doIt > End > > Public Sub btnStop_Click() > shouldStop = True > End > > Public Sub doIt() > Dim i As Integer, j As Integer > > For i = 1 To 100 > If shouldStop = True Then Break > ProgressBar1.Value = i / 100 > > For j = 1 To 100 > If shouldStop = True Then Break > ProgressBar2.Value = j / 100 > Print i, j ' My job here > Wait 0.1 > Next > > Wait 0.1 > Next > > Me.Close() > End > From leonardo at ...1237... Mon Nov 22 11:55:20 2010 From: leonardo at ...1237... (Leonardo Miliani) Date: Mon, 22 Nov 2010 11:55:20 +0100 Subject: [Gambas-user] Error (or not logic) in sub/function parsing Message-ID: <1290423321.2613.5.camel@...2507...> Copy the following code in a sample form and run it: PUBLIC SUB Form_Open() DIM a AS Integer a = Test_sub() PRINT a a = Test_func() PRINT a END PUBLIC SUB Test_sub() AS Integer RETURN 1 END PUBLIC FUNCTION Test_func() AS Integer RETURN 1 END You'll see two "1" in the Gambas console. I think this is wrong because a SUB (or Procedure) must not return any value. Instead the Function works correctly as it is (or it should be) the only one that can (or could) return a value. The right way should be that Gambas parser should raise an error when it finds a "RETURN" statement inside a SUB routine. -- Leonardo Miliani. Sito personale: www.leonardomiliani.com Co-fondatore di www.gambas-it.org Il portale della comunit? italiana dei programmatori Gambas From gambas at ...1... Mon Nov 22 12:28:15 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 22 Nov 2010 12:28:15 +0100 Subject: [Gambas-user] Error (or not logic) in sub/function parsing In-Reply-To: <1290423321.2613.5.camel@...2507...> References: <1290423321.2613.5.camel@...2507...> Message-ID: <201011221228.15554.gambas@...1...> > Copy the following code in a sample form and run it: > > PUBLIC SUB Form_Open() > DIM a AS Integer > > a = Test_sub() > PRINT a > a = Test_func() > PRINT a > > END > > PUBLIC SUB Test_sub() AS Integer > RETURN 1 > END > > PUBLIC FUNCTION Test_func() AS Integer > RETURN 1 > END > > > You'll see two "1" in the Gambas console. I think this is wrong because > a SUB (or Procedure) must not return any value. Instead the Function > works correctly as it is (or it should be) the only one that can (or > could) return a value. > > The right way should be that Gambas parser should raise an error when it > finds a "RETURN" statement inside a SUB routine. But the more practical there is being flexible. So, as soon as you specify a return type, the compiler assumes your code is a function, whatever keyword you use: FUNCTION, SUB or PROCEDURE. Regards, -- Beno?t Minisini From Gambas at ...1950... Mon Nov 22 12:39:59 2010 From: Gambas at ...1950... (Caveat) Date: Mon, 22 Nov 2010 12:39:59 +0100 Subject: [Gambas-user] Edit XML In-Reply-To: <201011221125.42064.gambas@...1...> References: <1289883525.22168.0.camel@...37...> <1290421029.3398.143.camel@...2479...> <201011221125.42064.gambas@...1...> Message-ID: <1290425999.3398.158.camel@...2479...> Hi Benoit, Yes, indeed this provides a "simple XML interface". The project is attached herewith. I've tried to make the documentation as complete as possible. Regards, Caveat On Mon, 2010-11-22 at 11:25 +0100, Beno?t Minisini wrote: > > Hi Fabien > > > > The code I have written acts as a kind of generic interface between the > > existing Gambas XMLReader and XMLWriter. The question is, does this go > > some way to "completing xmldoc"? > > > > The code consists of: > > XMLParserToModel > > XMLContainer > > XMLRewriter > > > > The important thing to note here is that my XMLParserToModel should be > > able to read *ANY* XML and create an internal model of it, in a set of > > XMLContainers. I have tried it with hand-written XML, and with examples > > from t'internet. > > > > The XMLContainer object I've created is capable of holding a > > hierarchical structure with XMLContainers that themselves hold > > Collections of XMLContainer objects. Each XMLContainer also holds the > > Node Text (if applicable) and any Attributes for that Node. When > > created, an XMLContainer knows its parent XMLContainer but as the object > > model is built, the XMLContainers morph into children of their parents. > > > > The XMLRewriter is really just a demonstration class to show how, using > > the XMLParserToModel to build a model of your XML and the XMLContainer's > > built-in searching to inspect and alter your XML, you can create edits > > which alter specific elements of your original XML. Any changed XML can > > be seen as a String (use toXMLString on an XMLContainer) or written to a > > new XML file (use writeXML in the XMLRewriter class, which calls out to > > writeSelf on the root XMLContainer). > > > > Here's a transcript of a session paying with the new objects, I think > > they are quite powerful. Remember there's NO code in the 3 classes > > described above that knows anything about orders or priorities, or CDs > > or catalogs, or heroes or villains etc. > > > > *************** Provide some sample XML as a String *************** > > inputString = > encoding="ISO-8859-1"?> > "cd_catalog.css"?> > priority="rush">20101120123rubber > > duck20101120123s > > ponge > > *************** Now parse the XML ********************************* > > parserToModel.parseInputString(inputString) > > *************** Get the model out of the parserToModel object and ask it > > to represent itself as XML *************** > > parserToModel.getModel().toXMLString() > > > > > > > > 20101120123 > > rubber duck > > > > 20101120123 > > sponge > > *************************************************************************** > > **************************************** > > > > *************** Now read sample XML from a file (from > > http://www.w3schools.com/xml/cd_catalog.xml) *************** > > parserToModel.parseInputFile(User.Home &/ "dev" &/ "cd_catalog.xml") > > *************** Pick out the Node(s) containing an ARTIST text entity > > with the text Kim Larsen *************** > > parserToModel.getModel().findSuperNodesByText("Kim Larsen", "ARTIST", > > selectArtists, NULL) > > *************** Ask them to represent themselves as XML strings > > *************** > > FOR EACH selectArtists > > PRINT selectArtists[selectArtists.Key].toXMLString() > > NEXT > > > > > > Midt om natten > > Kim Larsen > > EU > > Medley > > 7.80 > > 1983 > > *************************************************************************** > > **** *************** Pick out the Node(s) containing a COUNTRY text entity > > with the text EU *************** > > parserToModel.getModel().findSuperNodesByText("EU", "COUNTRY", > > selectArtists, NULL) > > *************** Ask them to represent themselves as XML strings > > *************** > > FOR EACH selectArtists > > PRINT selectArtists[selectArtists.Key].toXMLString() > > NEXT > > > > > > Eros > > Eros Ramazzotti > > EU > > BMG > > 9.90 > > 1997 > > > > > > Romanza > > Andrea Bocelli > > EU > > Polydor > > 10.80 > > 1996 > > > > > > Black angel > > Savage Rose > > EU > > Mega > > 10.90 > > 1995 > > > > > > Midt om natten > > Kim Larsen > > EU > > Medley > > 7.80 > > 1983 > > > > > > Picture book > > Simply Red > > EU > > Elektra > > 7.20 > > 1985 > > *************************************************************************** > > **** ************************************************************** > > *************** Read the original Heroes input XML (See > > http://pastebin.com/aR11N5uc) *************** > > parserToModel.parseInputFile(User.home &/ "Heroes.xml") > > *************** Look at the original XML we have in our internal data > > model *************** > > parserToModel.getModel().toXMLString() > > > > > > > > > > Claire Bennet > > Hayden Panettiere > > Rapid cellular regeneration > > > > Hiro Nakamura > > Masi Oka > > Space-time manipulation: teleportation & time > > travel > > > > Gabriel Sylar > > Zachary Quinto > > Understand how things work and multiple other abilities > > acquired > > > > > > Graham > > Graham Bell > > Being silly > > > > Bill > > Bill Odie > > Being very silly > > > > Tim > > Tim Brook Taylor > > Being very very > > silly > > *************************************************************************** > > **************** *************** All existing Text Entities > > in /all_characters/characters/heroe/name with current value "Claire > > Bennet" will be updated to "Banana Pudding" *************** > > rewriter.updateTextByPath("/all_characters/characters/heroe/name", > > "Claire Bennet", "Banana Pudding") > > *************** All existing Text Entities > > in /all_characters/characters/villain/played_by will be updated to > > "Someone evil" regardless of the current content > > rewriter.updateTextByPath("/all_characters/characters/villain/played_by", > > NULL, "Someone evil") *************** All Text Entities with the value > > "Being silly" get updated to "Being a complete donut brain" > > rewriter.updateTextByValue("Being silly", "Being a complete donut > > brain") > > *************** Change the value of the attribute named "id" to "h1" on > > all Entities having an Attribute named "name" with a value of "Claire > > Bennet" > > rewriter.changeAttribute("/all_characters/characters/heroe", "name", > > "Claire Bennet", "id", "h1") > > *************** Change the value of the attribute named "id" to "h2" on > > all Entities having an Attribute named "name" with a value of "Hiro > > Nakamura" > > rewriter.changeAttribute("/all_characters/characters/heroe", "name", > > "Hiro Nakamura", "id", "h2") > > *************** First correct a fault in the XML (Attribute called > > "name" has an erroneous space at the front of the value) > > *************** So this will change the value of the Attribute named > > "name" to "Gabriel Sylar" on all Entities having an Attribute named > > "name" with a value of " Gabriel Sylar" (note the leading space) > > rewriter.changeAttribute("/all_characters/characters/villain", "name", " > > Gabriel Sylar", "name", "Gabriel Sylar") > > *************** Now continue updating the ids > > *************** Write out the new XML from the changed internal data > > model (See http://pastebin.com/T0S96xiS) > > rewriter.writeXML(User.home &/ "dev" &/ "NewHeroes.xml", TRUE, "UTF-8") > > *************** Look at the new XML from the changed internal data model > > *************** > > parserToModel.getModel().toXMLString() > > > > > > > > > > Banana Pudding > > Hayden Panettiere > > Rapid cellular regeneration > > > > Hiro Nakamura > > Masi Oka > > Space-time manipulation: teleportation & time > > travel > > > > Gabriel Sylar > > Someone evil > > Understand how things work and multiple other abilities > > acquired > > > > > > Graham > > Graham Bell > > Being a complete donut brain > > > > Bill > > Bill Odie > > Being very silly > > > > Tim > > Tim Brook Taylor > > Being very very > > silly > > *************************************************************************** > > ************* > > > > Let me know whether you think this approach is worth pursuing... > > > > Regards, > > Caveat > > > > It is sort of a "simple XML interface" ? > -------------- next part -------------- A non-text attachment was scrubbed... Name: xmleditor.tar Type: application/x-tar Size: 81920 bytes Desc: not available URL: From gambas at ...1... Mon Nov 22 12:45:23 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 22 Nov 2010 12:45:23 +0100 Subject: [Gambas-user] How to exit loop and close the form In-Reply-To: References: <4CE954DB.5070105@...221...> Message-ID: <201011221245.23262.gambas@...1...> > Thank for your answers, but the result is the same. > > I let the progress run to the end but it does not automatically close. > > I tried some ways: > I change "Me.Close" by: > "Me.Hide" => same result, the dialog still appears > "ProgressBar2.Visible = False" => ProgressBar2 disappears > "Quit" => when I click Cancel button or let it finish, program quits > normally. > > May be I have to change my design ... ~.~ (I think about use a container > control like panel or frame on FMain + Visible attribute). > Because you are doing that during the Form_Open event. If I remember, depending on the Gambas version you use, closing the form during that event may have no effect. Anyway, don't process anything during a "Open" event. Do that later. For example, during the Form_Activate event handler, with a flag to ensure that you start your process once. But the real working solution is not using a modal dialog, and disable all the GUI during the processing, except the "Cancel" button. Regards, -- Beno?t Minisini From soleilpqd at ...626... Mon Nov 22 15:00:27 2010 From: soleilpqd at ...626... (=?UTF-8?B?UGjhuqFtIFF1YW5nIETGsMahbmc=?=) Date: Mon, 22 Nov 2010 21:00:27 +0700 Subject: [Gambas-user] How to exit loop and close the form In-Reply-To: <201011221245.23262.gambas@...1...> References: <4CE954DB.5070105@...221...> <201011221245.23262.gambas@...1...> Message-ID: I understood. Thank you. From gambas at ...1... Mon Nov 22 15:09:12 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 22 Nov 2010 15:09:12 +0100 Subject: [Gambas-user] To the wish list: FHelpBrowser In-Reply-To: <4CE95ABE.1030908@...221...> References: <4CE95ABE.1030908@...221...> Message-ID: <201011221509.12807.gambas@...1...> > 1. As I asked before, why does the HelpBrowser have to be a "utility" > window that you can't minimize? I can't see no reason why it couldn't be a > "normal" window that could be used much easier. Read, minimize, try, and > read again... My window manager allows me to roll/unroll the help window with the mouse wheel, so I don't need to minimize it. I think I made the help window an utility window so that it doesn't go behind the main window. But I admit this is not practical when you use the help window often, which is not my case! > > 2. Right now, it is impossible to copy some text from FHelpBrowser. > This should be possible! > If someone asks a question on the mailing list, and you find the answer in > FHelpBrowser, it is annoying to have to open the gambas docs on the web > just to copy a line of text. > Select the text, open the contextual menu, and click on "Copy". Regards, -- Beno?t Minisini From gambas at ...1... Mon Nov 22 15:10:08 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 22 Nov 2010 15:10:08 +0100 Subject: [Gambas-user] Draw Text In-Reply-To: <1290356559.10331.5.camel@...37...> References: <1290356559.10331.5.camel@...37...> Message-ID: <201011221510.08974.gambas@...1...> > Hi all ... > > Draw.Text use to draw text on screen. > > sTmp = "Long Text - asafdasdggasddashsdah sdfg df sdf gsdf dshfsdhfsdf > hsdf hsdf hsdfhsdf hsdf" > Draw.Text(sTmp,500,500,2000,3000) > > The online help says that the alignment of the text, shall take effect > if you use the optional parameters width and height. If I line up right, > left and center, is displayed correctly. But I can not show text > justified. How I can do? > > Thanks in advance. You can't justify the text with that method. You must do that by hand, sorry for that! Regards, -- Beno?t Minisini From gambas at ...1... Mon Nov 22 15:14:55 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 22 Nov 2010 15:14:55 +0100 Subject: [Gambas-user] About help and arrays and variables In-Reply-To: References: <179586.71552.qm@...2505...> <4CE75B7E.7040803@...1000...> Message-ID: <201011221514.55560.gambas@...1...> > On Sat, Nov 20, 2010 at 4:24 PM, Werner wrote: > > On 20/11/10 04:40, Zelimir Ikovic wrote: > >> I am following discussion on Gambas more than 3 months. > >> > >> Last 10 years I worked in VB6 (70%) and C(30%) on Windows. > >> > >> I am about to switch to Linux, and I have to decide: > >> Gambas3, FreePascal (fpGUI or Lazarus) or C, C++ and FLTK > >> I am just wondering is there any discussion on this topic, and where. > >> > >> How do you compare Gambas against those tools > > Gambas is the smoothest transition from VB in terms of language > syntax, the differences are usually > thngs most VB programmers would acknowledge as defects in the original > language, such as 1-based arrays, > overloading ( ) to deference arrays. > However Gambas is Linux-only, the advantage of FreePascal and C++ is > you can port back to Windows. > The Gambas IDE is easier to use and more stable IMHO. > > Of the three languages (C++, Pascal, Gambas), Gambas is the most > high-level. It is fully OOP but lacks the "protected" access level > (personally I hardly used it in C++ and don't miss it) > The only things I really miss are function pointers ("procedural > variables" in Pascal) and a proper heredoc syntax. In Gambas 3, you have support for callbacks. That means you can send a Gambas function to a extern C function, and the extern C function will use it (almost) transparently! As for "heredoc" syntax, I don't know what that word means. > > Gambas is interpreted, the other 2 are compiled, so it's slower, but > in practice I haven't found this an > issue (it's heaps faster than Java, and even Ruby, probably on par with > Python) > > Ian > I made a few comparison tests with Python, and Gambas is a little bit faster in stupid benchmarks (loops + arithmetic computation). I think it should be faster when calling methods inside components written in C/C++ too. Of course, it is slower than compiled and JIT interpreted languages. But I guess it uses less memory and is faster to start. Regards, -- Beno?t Minisini From mauricio at ...2500... Mon Nov 22 16:29:14 2010 From: mauricio at ...2500... (Mauricio Baeza) Date: Mon, 22 Nov 2010 09:29:14 -0600 Subject: [Gambas-user] Draw Text In-Reply-To: <201011221510.08974.gambas@...1...> References: <1290356559.10331.5.camel@...37...> <201011221510.08974.gambas@...1...> Message-ID: <1290439754.1575.0.camel@...37...> El lun, 22-11-2010 a las 15:10 +0100, Beno?t Minisini escribi?: > > Hi all ... > > > > Draw.Text use to draw text on screen. > > > > sTmp = "Long Text - asafdasdggasddashsdah sdfg df sdf gsdf dshfsdhfsdf > > hsdf hsdf hsdfhsdf hsdf" > > Draw.Text(sTmp,500,500,2000,3000) > > > > The online help says that the alignment of the text, shall take effect > > if you use the optional parameters width and height. If I line up right, > > left and center, is displayed correctly. But I can not show text > > justified. How I can do? > > > > Thanks in advance. > > You can't justify the text with that method. You must do that by hand, sorry > for that! > > Regards, > Hi Benoit ... Thanks for the reply ... So I've been doing for now. No problem. Any plans to include it later? Best regards -- Mauricio Baeza 10 a?os usando OpenOffice.org, libre, gratuito y seguro _______________________________ Todo lo que no es dado es perdido From gambas.fr at ...626... Mon Nov 22 18:32:46 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Mon, 22 Nov 2010 18:32:46 +0100 Subject: [Gambas-user] About help and arrays and variables In-Reply-To: <201011221514.55560.gambas@...1...> References: <179586.71552.qm@...2505...> <4CE75B7E.7040803@...1000...> <201011221514.55560.gambas@...1...> Message-ID: Le 22 novembre 2010 15:14, Beno?t Minisini a ?crit : >> On Sat, Nov 20, 2010 at 4:24 PM, Werner wrote: >> > On 20/11/10 04:40, Zelimir Ikovic wrote: >> >> I am following discussion on Gambas more than 3 months. >> >> >> >> Last 10 years I worked in VB6 (70%) and C(30%) on Windows. >> >> >> >> I am about to switch to Linux, and I have to decide: >> >> Gambas3, FreePascal (fpGUI or Lazarus) or C, C++ and FLTK >> >> I am just wondering is there any discussion on this topic, and where. >> >> >> >> How do you compare Gambas against those tools >> >> Gambas is the smoothest transition from VB in terms of language >> syntax, the differences are usually >> thngs most VB programmers would acknowledge as defects in the original >> language, such as 1-based arrays, >> overloading ( ) to deference arrays. >> However Gambas is Linux-only, the advantage of FreePascal and C++ is >> you can port back to Windows. >> The Gambas IDE is easier to use and more stable IMHO. >> >> Of the three languages (C++, Pascal, Gambas), Gambas is the most >> high-level. It is fully OOP but lacks the "protected" access level >> (personally I hardly used it in C++ and don't miss it) >> The only things I really miss are function pointers ("procedural >> variables" in Pascal) and a proper heredoc syntax. > > In Gambas 3, you have support for callbacks. That means you can send a Gambas > function to a extern C function, and the extern C function will use it > (almost) transparently! > > As for "heredoc" syntax, I don't know what that word means. http://www.manuelphp.com/php/language.types.string.syntax.heredoc.php > >> >> Gambas is interpreted, the other 2 are compiled, so it's slower, but >> in practice I haven't found this an >> issue (it's heaps faster than Java, and even Ruby, probably on par with >> Python) >> >> Ian >> > > I made a few comparison tests with Python, and Gambas is a little bit faster > in stupid benchmarks (loops + arithmetic computation). I think it should be > faster when calling methods inside components written in C/C++ too. > > Of course, it is slower than compiled and JIT interpreted languages. But I > guess it uses less memory and is faster to start. > > Regards, > > -- > Beno?t Minisini > > ------------------------------------------------------------------------------ > Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ?ECMAScript5, and DOM L2 & L3. > Spend less time writing and ?rewriting code and more time creating great > experiences on the web. Be a part of the beta today > http://p.sf.net/sfu/msIE9-sfdev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Fabien Bodard From gambas at ...1... Mon Nov 22 19:28:29 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 22 Nov 2010 19:28:29 +0100 Subject: [Gambas-user] About help and arrays and variables In-Reply-To: References: <179586.71552.qm@...2505...> <201011221514.55560.gambas@...1...> Message-ID: <201011221928.29840.gambas@...1...> > >> > >> Of the three languages (C++, Pascal, Gambas), Gambas is the most > >> high-level. It is fully OOP but lacks the "protected" access level > >> (personally I hardly used it in C++ and don't miss it) > >> The only things I really miss are function pointers ("procedural > >> variables" in Pascal) and a proper heredoc syntax. > > > > In Gambas 3, you have support for callbacks. That means you can send a > > Gambas function to a extern C function, and the extern C function will > > use it (almost) transparently! > > > > As for "heredoc" syntax, I don't know what that word means. > > http://www.manuelphp.com/php/language.types.string.syntax.heredoc.php > OK. Very powerful to offuscate your code and make it unreadable. :-) -- Beno?t Minisini From ihaywood at ...1979... Mon Nov 22 21:31:28 2010 From: ihaywood at ...1979... (Ian Haywood) Date: Tue, 23 Nov 2010 07:31:28 +1100 Subject: [Gambas-user] About help and arrays and variables In-Reply-To: <201011221928.29840.gambas@...1...> References: <179586.71552.qm@...2505...> <201011221514.55560.gambas@...1...> <201011221928.29840.gambas@...1...> Message-ID: 2010/11/23 Beno?t Minisini : >> > In Gambas 3, you have support for callbacks. That means you can send a >> > Gambas function to a extern C function, and the extern C function will >> > use it (almost) transparently! Can Gambas code call a Gambas callback? Ian From gambas at ...1... Mon Nov 22 21:36:17 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 22 Nov 2010 21:36:17 +0100 Subject: [Gambas-user] About help and arrays and variables In-Reply-To: References: <179586.71552.qm@...2505...> <201011221928.29840.gambas@...1...> Message-ID: <201011222136.17321.gambas@...1...> > 2010/11/23 Beno?t Minisini : > >> > In Gambas 3, you have support for callbacks. That means you can send a > >> > Gambas function to a extern C function, and the extern C function will > >> > use it (almost) transparently! > > Can Gambas code call a Gambas callback? > > Ian > A Gambas callback is a normal Gambas function, so yes. -- Beno?t Minisini From gambas at ...1... Mon Nov 22 21:41:02 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 22 Nov 2010 21:41:02 +0100 Subject: [Gambas-user] Bit manipulation functions In-Reply-To: <1290271646.5071.21.camel@...2493...> References: <1290268104.5071.12.camel@...2493...> <1290271646.5071.21.camel@...2493...> Message-ID: <201011222141.03006.gambas@...1...> > Great! it's easy! > > Thanks very much! > > On Sat, 2010-11-20 at 18:30 +0200, Jussi Lahtinen wrote: > > because lsr processes 32 bits of the short -9 and not 64 bits of the > > > > > long binary number? > > > > Yes, -9 is considered as short. > > Try: > > ? bin(lsr(clng(-9),1), 64) > > 0111111111111111111111111111111111111111111111111111111111111011 > > > > Jussi Bit manipulation functions work on the number of bits defined by their argument: Byte -> 8, Short -> 16, Integer (the default for numeric values) -> 32, Long -> 64. So Lsr(-9, 1), which does not keep the sign of its argument, does that: 11111111111111111111111111110111 -> 01111111111111111111111111111011 But Bin$() always print 64 binary digits for negative numbers, so you think that it was wrong. Regards, -- Beno?t Minisini From barneywinton at ...867... Tue Nov 23 04:47:09 2010 From: barneywinton at ...867... (Barnett Winton) Date: Tue, 23 Nov 2010 14:47:09 +1100 Subject: [Gambas-user] Gambas 2 and Databound controls Message-ID: <4CEB393D.9060802@...867...> Hi all, Could someone outline the steps required when calling a form with Datasource ( table specified) from a parent form. I am using Gambas 2.20 and sqlite3. OS is PCLinuxOS 2010. Form 1 provides for table selection and then calls a table specific Form ( Form 2) As there is no specific DB Connection info in Form 2, when Form 2 is called ( FModesEntry.Showmodal ) I get a DB error message from Form 1 saying "unknown table :" for the selected table. The example DB app passes the DB connection and the Result object ( which contains the table records ) to a second form which is a Viewing Form. I want to set up the DB connection so I can access the table in a second form. I am guessing that the DB connection needs to be set up in Form 1, but How ??????. Regards, Barnett Winton From mdavies5 at ...169... Tue Nov 23 06:02:01 2010 From: mdavies5 at ...169... (Michael) Date: Tue, 23 Nov 2010 16:02:01 +1100 Subject: [Gambas-user] Gambas 2 and Databound controls In-Reply-To: <4CEB393D.9060802@...867...> References: <4CEB393D.9060802@...867...> Message-ID: <4CEB4AC9.8060705@...169...> Barnett, Declare your connection as Public in Form1 (or in a module) and then refer to it from any other form as Form1.MyConnection. In your Project/Properties/Options you may need to ensure that "Module Symbols" and "Form Controls" are set to public. Regards Mike On 23/11/10 14:47, Barnett Winton wrote: > Hi all, > > Could someone outline the steps required when calling a form with > Datasource ( table specified) from a parent form. > > I am using Gambas 2.20 and sqlite3. OS is PCLinuxOS 2010. > > Form 1 provides for table selection and then calls a table specific Form > ( Form 2) > > As there is no specific DB Connection info in Form 2, when Form 2 is > called ( FModesEntry.Showmodal ) I get a DB error message from Form 1 > saying "unknown table :" for the selected table. > > The example DB app passes the DB connection and the Result object ( > which contains the table records ) to a second form which is a Viewing Form. > > I want to set up the DB connection so I can access the table in a second > form. > > I am guessing that the DB connection needs to be set up in Form 1, but > How ??????. > > Regards, > Barnett Winton > > ------------------------------------------------------------------------------ > Increase Visibility of Your 3D Game App& Earn a Chance To Win $500! > Tap into the largest installed PC base& get more eyes on your game by > optimizing for Intel(R) Graphics Technology. Get started today with the > Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. > http://p.sf.net/sfu/intelisp-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > From linux at ...1904... Tue Nov 23 06:04:28 2010 From: linux at ...1904... (Dr. Martin Senftleben) Date: Tue, 23 Nov 2010 06:04:28 +0100 Subject: [Gambas-user] Installing gambas3 on LinuxMint In-Reply-To: References: <4CDB9069.4030503@...1904...> Message-ID: <4CEB4B5C.1070907@...1904...> Hi, Am 19.11.2010 12:31, schrieb Ian Haywood: > On Fri, Nov 12, 2010 at 8:22 PM, Ian Haywood wrote: > For Linux Mint, I'd try with the Ubuntu Maverick release, so add the > following to /etc/apt/sources.list > > deb http://ppa.launchpad.net/ihaywood3/gambas3/ubuntu maverick main > deb-src http://ppa.launchpad.net/ihaywood3/gambas3/ubuntu maverick main This works with LinuxMint 10. Now I have Gambas3 on my system. Thanks! Martin From austinium at ...43... Tue Nov 23 11:45:47 2010 From: austinium at ...43... (vikram) Date: Tue, 23 Nov 2010 02:45:47 -0800 (PST) Subject: [Gambas-user] Displaying Mouse.Wait while running a SHELL Command Message-ID: <804825.15666.qm@...2464...> Hi, How do i display a "wait" cursor while a process is running? I have tried using ??? ME.mouse = Mouse.Wait without much luck. Heres a code snippet: ------------------------ ? ME.mouse = Mouse.Wait ? Application.Busy = 1 ? command = "sha512sum " & filePath & "|awk '{print $1}' " ? SHELL command TO checksum ? checksum = Left(checksum, Len(checksum) - 1) 'strip \n ? txta_checksum.Text = checksum ? Application.busy = 0 ? ME.Mouse = Mouse.DEFAULT ------------------------ I am using Gambas 2.21. Thanks, Vikram From lordheavym at ...626... Tue Nov 23 12:00:29 2010 From: lordheavym at ...626... (Laurent Carlier) Date: Tue, 23 Nov 2010 12:00:29 +0100 Subject: [Gambas-user] Displaying Mouse.Wait while running a SHELL Command In-Reply-To: <804825.15666.qm@...2464...> References: <804825.15666.qm@...2464...> Message-ID: <201011231200.30205.lordheavym@...626...> Le mardi 23 novembre 2010 11:45:47, vikram a ?crit : > Hi, > > How do i display a "wait" cursor while a process is running? I have tried > using > > ME.mouse = Mouse.Wait > > without much luck. > > Heres a code snippet: > ------------------------ > ME.mouse = Mouse.Wait > Application.Busy = 1 > > command = "sha512sum " & filePath & "|awk '{print $1}' " > SHELL command TO checksum > > checksum = Left(checksum, Len(checksum) - 1) 'strip \n > txta_checksum.Text = checksum > > Application.busy = 0 > ME.Mouse = Mouse.DEFAULT > ------------------------ > > I am using Gambas 2.21. > > Thanks, > Vikram > You can use the Wait keyword, see http://gambasdoc.org/help/lang/shell Something like: SHELL command Wait TO checksum ++ From rterry at ...1946... Tue Nov 23 12:36:54 2010 From: rterry at ...1946... (richard terry) Date: Tue, 23 Nov 2010 22:36:54 +1100 Subject: [Gambas-user] DateBox/DateChoose - numbers on calendar all the same Message-ID: <201011232236.54616.rterry@...1946...> Hi List ?Just my machine, but for some reason in my last update there all the days of the mont h are '31' any ideas? Richard From austinium at ...43... Tue Nov 23 12:40:05 2010 From: austinium at ...43... (vikram) Date: Tue, 23 Nov 2010 03:40:05 -0800 (PST) Subject: [Gambas-user] Displaying Mouse.Wait while running a SHELL Command Message-ID: <220176.31510.qm@...2469...> >You can use the Wait keyword, see http://gambasdoc.org/help/lang/shell >Something like: >SHELL command Wait TO checksum Thanks for the quick reply. Adding WAIT to the SHELL command is not causing the mouse cursor to change to Mouse.Wait :( Regards, Vikram From ron at ...1740... Tue Nov 23 12:49:27 2010 From: ron at ...1740... (Ron) Date: Tue, 23 Nov 2010 12:49:27 +0100 Subject: [Gambas-user] Displaying Mouse.Wait while running a SHELL Command In-Reply-To: <220176.31510.qm@...2469...> References: <220176.31510.qm@...2469...> Message-ID: <4CEBAA47.1010603@...1740...> Strange, this simply works here: ' Gambas class file PUBLIC SUB Form_Open() END PUBLIC SUB Form_Activate() DIM Checksum AS String ME.Mouse = Mouse.Wait Application.Busy = TRUE SHELL "ls -lR" TO checksum Application.Busy = FALSE ME.Mouse = Mouse.DEFAULT 'PRINT checksum END Gambas 2.21.x, ubuntu 10.4, gb.qt Regards, Ron_2nd. >> You can use the Wait keyword, see http://gambasdoc.org/help/lang/shell >> Something like: >> SHELL command Wait TO checksum > Thanks for the quick reply. Adding WAIT to the SHELL command is not causing the mouse cursor to change to Mouse.Wait :( > > Regards, > Vikram > > > > > ------------------------------------------------------------------------------ > Increase Visibility of Your 3D Game App& Earn a Chance To Win $500! > Tap into the largest installed PC base& get more eyes on your game by > optimizing for Intel(R) Graphics Technology. Get started today with the > Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. > http://p.sf.net/sfu/intelisp-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From eilert-sprachen at ...221... Tue Nov 23 12:59:48 2010 From: eilert-sprachen at ...221... (Rolf-Werner Eilert) Date: Tue, 23 Nov 2010 12:59:48 +0100 Subject: [Gambas-user] Displaying Mouse.Wait while running a SHELL Command In-Reply-To: <220176.31510.qm@...2469...> References: <220176.31510.qm@...2469...> Message-ID: <4CEBACB4.3040505@...221...> Am 23.11.2010 12:40, schrieb vikram: >> You can use the Wait keyword, see http://gambasdoc.org/help/lang/shell > >> Something like: >> SHELL command Wait TO checksum > > Thanks for the quick reply. Adding WAIT to the SHELL command is not causing the mouse cursor to change to Mouse.Wait :( > > Regards, > Vikram > No, but it waits until the shell command is finished. So you have a defined period of time for the mouse cursor to change its shape. Otherwise, your program will just go on, leaving the shell alone, and the change of the mouse is too short to notice... Regards Rolf From austinium at ...43... Tue Nov 23 13:21:47 2010 From: austinium at ...43... (vikram) Date: Tue, 23 Nov 2010 04:21:47 -0800 (PST) Subject: [Gambas-user] Displaying Mouse.Wait while running a SHELL Command Message-ID: <163453.89138.qm@...2508...> Hi, heres a sample program. iam running sha512sum on file which are 100MB+ in size, its takes around 5 seconds. right now the button stays depressed until the hash has been displayed. regards, Vikram -------------- next part -------------- A non-text attachment was scrubbed... Name: GenerateSHA512.tar.gz Type: application/x-gzip Size: 9859 bytes Desc: not available URL: From gambas at ...1... Tue Nov 23 18:57:25 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 23 Nov 2010 18:57:25 +0100 Subject: [Gambas-user] To the wish list: FHelpBrowser In-Reply-To: <4CE95ABE.1030908@...221...> References: <4CE95ABE.1030908@...221...> Message-ID: <201011231857.25476.gambas@...1...> > 1. As I asked before, why does the HelpBrowser have to be a "utility" > window that you can't minimize? I can't see no reason why it couldn't be a > "normal" window that could be used much easier. Read, minimize, try, and > read again... > Upgrade to the latest revision, and set "Use utility windows" to "No" in the IDE option dialog. Regards, -- Beno?t Minisini From gambas at ...1... Tue Nov 23 19:13:27 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 23 Nov 2010 19:13:27 +0100 Subject: [Gambas-user] About arrays Message-ID: <201011231913.27794.gambas@...1...> Hi, This is a clarification about Gambas arrays for Demosthene and all who answered him. There are two kinds of arrays in Gambas: - "Normal" arrays. - "Embedded" arrays. Fabien used the word "static" arrays for "embedded" arrays because this was the word I used first. Then I changed to "embedded" to avoid any confusion with the "STATIC" keywords, which is not related at all. "Normal" arrays are true Gambas objects. They have their own memory allocation, and they are destroyed when they are not referenced anymore. To declare a "normal" array, you can do: (1) Dim NormalArray As Type[] (2) Dim NormalArray As Type[] = [ ... ] (3) Dim NormalArray As Type[] = New Type[A, B] (4) Dim NormalArray As Type[A, B] (1) declares an object variable that can receive a reference to a array whose type is "Type[]". "Type" can be a native datatype or a class name. Note that in Gambas 2, "Type" can only be a native datatype. (2) declares an object variable, and initializes it with a new array created by the [ ... ] operator. (3) declares an object variable, and initializes it with a new array hainvg the specified dimension. (4) is a shortcut to the (3) syntax. "Embedded" arrays are arrays that are allocated *inside* another object. They don't have a memory allocation on their own, and they are automatically freed with the object including them. "Embedded" arrays are always member of a class or a structure only. To declare an "embedded" array, you do the following: [Static] {Private|Public} EmbeddedArray[A, B] As Type There, "Type" is the datatype of one element of the array. There is no "[]" after the type, unless you want to store array references inside the array of course. "Embedded" arrays can be static or not, public or private. "Embedded" arrays are a little bit slower than normal arrays. They were created to mimic C arrays (like Gambas structures, that were created to mimic C structures), so that working with extern C functions using arrays and structures is possible. So you should not use them, unless you are working with extern functions. I hope Gambas arrays are clearer now! Regards, -- Beno?t Minisini From math.eber at ...221... Tue Nov 23 20:43:03 2010 From: math.eber at ...221... (math.eber at ...221...) Date: Tue, 23 Nov 2010 20:43:03 +0100 Subject: [Gambas-user] =?utf-8?q?To_the_wish_list=3A_FHelpBrowser_-_error?= In-Reply-To: <201011231857.25476.gambas@...1...> References: <201011231857.25476.gambas@...1...> Message-ID: <1PKylb-2LJWOu0@...2509...> Too bad, can't update to rev 3311. It's the make / webkit error again. This time it is: Making all in webkit make[5]: Entering directory `/Platte2/Downloads/gambas3/3311/trunk/gb.qt4/src/webkit' /bin/sh ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -DQT_SHARED -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include/QtNetwork -I/usr/include/QtDBus -I/usr/include/QtXml -I/usr/include/QtWebKit -I../../share -I../../src/share -pipe -Wall -fno-exceptions -Wno-unused-value -fsigned-char -fvisibility=hidden -g -Os -fno-omit-frame-pointer -MT cwebview.lo -MD -MP -MF .deps/cwebview.Tpo -c -o cwebview.lo cwebview.cpp libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -DQT_SHARED -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include/QtNetwork -I/usr/include/QtDBus -I/usr/include/QtXml -I/usr/include/QtWebKit -I../../share -I../../src/share -pipe -Wall -fno-exceptions -Wno-unused-value -fsigned-char -fvisibility=hidden -g -Os -fno-omit-frame-pointer -MT cwebview.lo -MD -MP -MF .deps/cwebview.Tpo -c cwebview.cpp -fPIC -DPIC -o .libs/cwebview.o cwebview.cpp: In function ?void WebView_FindText(void*, void*)?: cwebview.cpp:361: error: ?HighlightAllOccurrences? is not a member of ?QWebPage? make[5]: *** [cwebview.lo] Fehler 1 make[5]: Leaving directory `/Platte2/Downloads/gambas3/3311/trunk/gb.qt4/src/webkit' make[4]: *** [all-recursive] Fehler 1 make[4]: Leaving directory `/Platte2/Downloads/gambas3/3311/trunk/gb.qt4/src' make[3]: *** [all-recursive] Fehler 1 make[3]: Leaving directory `/Platte2/Downloads/gambas3/3311/trunk/gb.qt4' make[2]: *** [all] Fehler 2 make[2]: Leaving directory `/Platte2/Downloads/gambas3/3311/trunk/gb.qt4' make[1]: *** [all-recursive] Fehler 1 make[1]: Leaving directory `/Platte2/Downloads/gambas3/3311/trunk' make: *** [all] Fehler 2 I looked if I have an old version of qt4, but (at least in OpenSuse) there is no newer one. Regards Matti -----Original-Nachricht----- Subject: Re: [Gambas-user] To the wish list: FHelpBrowser Date: Tue, 23 Nov 2010 18:57:25 +0100 From: Beno?t Minisini To: mailing list for gambas users > 1. As I asked before, why does the HelpBrowser have to be a "utility" > window that you can't minimize? I can't see no reason why it couldn't be a > "normal" window that could be used much easier. Read, minimize, try, and > read again... > Upgrade to the latest revision, and set "Use utility windows" to "No" in the IDE option dialog. Regards, -- Beno?t Minisini ---------------------------------------------------------------------------- -- Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! Tap into the largest installed PC base & get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From demosthenesk at ...626... Tue Nov 23 20:51:03 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Tue, 23 Nov 2010 21:51:03 +0200 Subject: [Gambas-user] About arrays In-Reply-To: <201011231913.27794.gambas@...1...> References: <201011231913.27794.gambas@...1...> Message-ID: <1290541863.3739.5.camel@...2494...> Thanks Beno?t, i understood the array subject well. But one note. i cant do in Gambas2-2.21 PUBLIC aInt2[10] AS Integer in declaration section of a class so the syntax [Static] {Private|Public} EmbeddedArray[A, B] As Type is it correct, for the Public keyword? On Tue, 2010-11-23 at 19:13 +0100, Beno?t Minisini wrote: > Hi, > > This is a clarification about Gambas arrays for Demosthene and all who > answered him. > > There are two kinds of arrays in Gambas: > - "Normal" arrays. > - "Embedded" arrays. > > Fabien used the word "static" arrays for "embedded" arrays because this was > the word I used first. Then I changed to "embedded" to avoid any confusion > with the "STATIC" keywords, which is not related at all. > > "Normal" arrays are true Gambas objects. They have their own memory > allocation, and they are destroyed when they are not referenced anymore. > > To declare a "normal" array, you can do: > > (1) Dim NormalArray As Type[] > (2) Dim NormalArray As Type[] = [ ... ] > (3) Dim NormalArray As Type[] = New Type[A, B] > (4) Dim NormalArray As Type[A, B] > > (1) declares an object variable that can receive a reference to a array whose > type is "Type[]". "Type" can be a native datatype or a class name. Note that > in Gambas 2, "Type" can only be a native datatype. > > (2) declares an object variable, and initializes it with a new array created > by the [ ... ] operator. > > (3) declares an object variable, and initializes it with a new array hainvg > the specified dimension. > > (4) is a shortcut to the (3) syntax. > > "Embedded" arrays are arrays that are allocated *inside* another object. They > don't have a memory allocation on their own, and they are automatically freed > with the object including them. > > "Embedded" arrays are always member of a class or a structure only. > > To declare an "embedded" array, you do the following: > > [Static] {Private|Public} EmbeddedArray[A, B] As Type > > There, "Type" is the datatype of one element of the array. There is no "[]" > after the type, unless you want to store array references inside the array of > course. > > "Embedded" arrays can be static or not, public or private. > > "Embedded" arrays are a little bit slower than normal arrays. > > They were created to mimic C arrays (like Gambas structures, that were created > to mimic C structures), so that working with extern C functions using arrays > and structures is possible. > > So you should not use them, unless you are working with extern functions. > > I hope Gambas arrays are clearer now! > > Regards, > -- Regards, Demosthenes From gambas at ...1... Wed Nov 24 01:05:49 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 24 Nov 2010 01:05:49 +0100 Subject: [Gambas-user] Release of Gambas 2.22 Message-ID: <201011240105.49234.gambas@...1...> Hi, I release a new version of Gambas 2. It was a long time since the 2.21 release, and so there are a lot of bug fixes. Now I'm developing on Ubuntu, so please test the source package, and tell me if you encounter any problem. You may notice that the package is bigger than the old ones made on Mandriva. I have no idea why! Here is the full changelog: ------------------------------------------------------------------------------- [CONFIGURATION] * BUG: Detect x86_64 architecture better. * BUG: Compile correctly on Ubuntu 10.10. * NEW: Add AC_PROG_LIBTOOL in root configure.ac file. * NEW: Check for missing mathematical function directly instead of relying on operating system detection. * NEW: Remove useless install-sh links. [DEVELOPMENT ENVIRONMENT] * BUG: A "=" character was missing in the menu file generated by the Debian/Ubuntu packager. * NEW: Don't save the Url in the project file if it is equal to the default URL http://www.endoftheinternet.com * NEW: Greek translation updated by Demosthenes Koptsis. [DATABASE MANAGER] * NEW: Greek translation updated by Demosthenes Koptsis. [INTERPRETER] * BUG: Extern functions now can handle up to 16 pointer or string arguments. * BUG: Do not use stack contents as return value. * BUG: The return value of extern functions returning a 'char *' is now correctly converted to a constant String. * BUG: The == operator works correctly now. * BUG: Fix two incorrect optional function declarations. [COMPILER] * BUG: Remove some useless tests. [ARCHIVER] * BUG: Files having the ".gambas" extension are now excluded from executable archives. That prevents a possible endless growing generated file. [DEVELOPMENT ENVIROMENT] * NEW: Spanish translation updated. [GB.DB.POSTGRESQL] * BUG: Correctly ignore fields deleted with the "DROP COLUMN" command. [GB.FORM] * BUG: Make arrow keys navigation work better with read-only cells in TableView control. * NEW: DateChooser uses Sunday as first day of the week when the current language is 'C' or 'en_US'. [GB.GTK] * BUG: Fix duplicate Click event in CheckBox control. * BUG: Correctly handle tristate Checkbox controls. * BUG: Fix the behaviour of ComboBox when setting the List and the ReadOnly property, and the order used for saving ComboBox properties in the *.form file. * BUG: Popup menus now work correctly on tray icons in all cases. * BUG: Make TabStrip behave like in gb.qt when inserting a new tab. * BUG: TabStrip now uses its own window, so that it is not partially visible when covering other widgets. * BUG: ColumnView, TreeView and ListView are correctly refreshed when an item icon is changed. * BUG: Read-only ComboBox controls do not lost focus events anymore. * BUG: Correctly free menu tags. * BUG: Fix possible crashes in three utility routines. * BUG: Fix a crash in GridView.Rows[].Text property. * BUG: Fix a infinite recursion in drag and drop management when draging TextBox or TextArea contents inside the same application. * BUG: Reparenting a top-level window does not show hidden children controls anymore. * BUG: Rich-text string management has been fixed. The ampersand character, the "&", ">" and "<" entites are correctly interpreted now. [GB.NET.CURL] * BUG: The HttpClient and FtpClient Tag property does not leak memory anymore. [GB.NET.SMTP] * BUG: Fix an always true test. [GB.OPENGL] * BUG: Fix the use of "=" instead of "==". [GB.QT] * BUG: Fix the behaviour of ComboBox when setting the List property, and the order used for saving ComboBox properties in the *.form file. * BUG: Don't raise events while setting the ComboBox.List property. * BUG: Fix the properties order. Only the ComboBox ReadOnly property must be set first. * BUG: Workaround what it seems a Qt bug in ComboBox. Now, when an editable combo-box is hidden, it correctly loses the focus. * BUG: Do not propagate Drop events when there is a drop event handler. [GB.SDL.SOUND] * BUG: Fix segfaulting when moving the position of a mp3 music. Adding a delay of 10ms when rewinding the music seem to fix the problem that look like a threading issue in SDLmixer. ------------------------------------------------------------------------------- Enjoy it! -- Beno?t Minisini From lordheavym at ...626... Wed Nov 24 01:34:59 2010 From: lordheavym at ...626... (Laurent Carlier) Date: Wed, 24 Nov 2010 01:34:59 +0100 Subject: [Gambas-user] Release of Gambas 2.22 In-Reply-To: <201011240105.49234.gambas@...1...> References: <201011240105.49234.gambas@...1...> Message-ID: <201011240134.59665.lordheavym@...626...> Le mercredi 24 novembre 2010 01:05:49, Beno?t Minisini a ?crit : > Hi, > > I release a new version of Gambas 2. It was a long time since the 2.21 > release, and so there are a lot of bug fixes. > > Now I'm developing on Ubuntu, so please test the source package, and tell > me if you encounter any problem. > > You may notice that the package is bigger than the old ones made on > Mandriva. I have no idea why! > > ---- > > Enjoy it! And it's available also for archlinux i686/x86_64 in the repos. ++ From mauricio at ...2500... Wed Nov 24 02:19:18 2010 From: mauricio at ...2500... (Mauricio Baeza) Date: Tue, 23 Nov 2010 19:19:18 -0600 Subject: [Gambas-user] Release of Gambas 2.22 In-Reply-To: <201011240105.49234.gambas@...1...> References: <201011240105.49234.gambas@...1...> Message-ID: <1290561558.2248.8.camel@...37...> El mi?, 24-11-2010 a las 01:05 +0100, Beno?t Minisini escribi?: > Hi, > > I release a new version of Gambas 2. It was a long time since the > 2.21 > release, and so there are a lot of bug fixes. > > Now I'm developing on Ubuntu, so please test the source package, and > tell me > if you encounter any problem. > > You may notice that the package is bigger than the old ones made on > Mandriva. > I have no idea why! > file. > > [DEVELOPMENT ENVIROMENT] > * NEW: Spanish translation updated. > Enjoy it! Hi Benoit ... What a great language ... As for translation into Spanish. In version 2.1 the menu Proyecto -> Crear -> Ejectutable "Ejecutable" must say. It's the same in version 2.99 of development. Best regards -- Mauricio Baeza 10 a?os usando OpenOffice.org, libre, gratuito y seguro _______________________________ Todo lo que no es dado es perdido From mauricio at ...2500... Wed Nov 24 02:21:03 2010 From: mauricio at ...2500... (Mauricio Baeza) Date: Tue, 23 Nov 2010 19:21:03 -0600 Subject: [Gambas-user] Release of Gambas 2.22 In-Reply-To: <201011240134.59665.lordheavym@...626...> References: <201011240105.49234.gambas@...1...> <201011240134.59665.lordheavym@...626...> Message-ID: <1290561663.2248.9.camel@...37...> El mi?, 24-11-2010 a las 01:34 +0100, Laurent Carlier escribi?: > Le mercredi 24 novembre 2010 01:05:49, Beno?t Minisini a ?crit : > > Hi, > > > > I release a new version of Gambas 2. It was a long time since the 2.21 > > release, and so there are a lot of bug fixes. > > > > Now I'm developing on Ubuntu, so please test the source package, and tell > > me if you encounter any problem. > > > > You may notice that the package is bigger than the old ones made on > > Mandriva. I have no idea why! > > > > ---- > > > > Enjoy it! > > And it's available also for archlinux i686/x86_64 in the repos. > > ++ > For this (and other things) ... I love ArchLinux Thank you very much -- Mauricio Baeza 10 a?os usando OpenOffice.org, libre, gratuito y seguro _______________________________ Todo lo que no es dado es perdido From demosthenesk at ...626... Wed Nov 24 09:15:22 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Wed, 24 Nov 2010 10:15:22 +0200 Subject: [Gambas-user] About arrays In-Reply-To: <201011231913.27794.gambas@...1...> References: <201011231913.27794.gambas@...1...> Message-ID: <1290586522.6404.1.camel@...2493...> Good morning to all, write this code to see something strange DIM aInt2[1] AS String PRINT IsObject(aInt2) Gambas2-2.21 rev3300 Ubuntu 10.04, AMD64 From demosthenesk at ...626... Wed Nov 24 09:21:50 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Wed, 24 Nov 2010 10:21:50 +0200 Subject: [Gambas-user] IsObject(NULL) Message-ID: <1290586910.6513.1.camel@...2493...> hi, PRINT IsObject(NULL) returns TRUE The NULL constant is an object? -- Regards, Demosthenes Koptsis. From gambas.fr at ...626... Wed Nov 24 11:50:33 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Wed, 24 Nov 2010 11:50:33 +0100 Subject: [Gambas-user] About arrays In-Reply-To: <1290586522.6404.1.camel@...2493...> References: <201011231913.27794.gambas@...1...> <1290586522.6404.1.camel@...2493...> Message-ID: 2010/11/24 Demosthenes Koptsis : > Good morning to all, > > write this code to see something strange > > DIM aInt2[1] AS String > > PRINT IsObject(aInt2) > > Gambas2-2.21 rev3300 > Ubuntu 10.04, AMD64 > that ? False *** glibc detected *** menudyn: double free or corruption (fasttop): 0x000000000217beb0 *** So isobject work correctly ... it is not an object ... it's an embedded array. but for the rest ... yes it is not 'normal' -- Fabien Bodard From gambas at ...1... Wed Nov 24 11:53:08 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 24 Nov 2010 11:53:08 +0100 Subject: [Gambas-user] About arrays In-Reply-To: <1290586522.6404.1.camel@...2493...> References: <201011231913.27794.gambas@...1...> <1290586522.6404.1.camel@...2493...> Message-ID: <201011241153.08523.gambas@...1...> > Good morning to all, > > write this code to see something strange > > DIM aInt2[1] AS String > > PRINT IsObject(aInt2) > > Gambas2-2.21 rev3300 > Ubuntu 10.04, AMD64 > I see nothing strange. -- Beno?t Minisini From gambas.fr at ...626... Wed Nov 24 11:53:45 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Wed, 24 Nov 2010 11:53:45 +0100 Subject: [Gambas-user] IsObject(NULL) In-Reply-To: <1290586910.6513.1.camel@...2493...> References: <1290586910.6513.1.camel@...2493...> Message-ID: 2010/11/24 Demosthenes Koptsis : > > hi, > > PRINT IsObject(NULL) > > returns > TRUE > > The NULL constant is an object? nead the help please ! http://gambasdoc.org/help/lang/isobject > > -- > Regards, > Demosthenes Koptsis. > > > ------------------------------------------------------------------------------ > Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! > Tap into the largest installed PC base & get more eyes on your game by > optimizing for Intel(R) Graphics Technology. Get started today with the > Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. > http://p.sf.net/sfu/intelisp-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Fabien Bodard From gambas at ...1... Wed Nov 24 11:56:20 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 24 Nov 2010 11:56:20 +0100 Subject: [Gambas-user] About arrays In-Reply-To: <201011241153.08523.gambas@...1...> References: <201011231913.27794.gambas@...1...> <1290586522.6404.1.camel@...2493...> <201011241153.08523.gambas@...1...> Message-ID: <201011241156.20826.gambas@...1...> > > Good morning to all, > > > > write this code to see something strange > > > > DIM aInt2[1] AS String > > > > PRINT IsObject(aInt2) > > > > Gambas2-2.21 rev3300 > > Ubuntu 10.04, AMD64 > > I see nothing strange. Ah yes, I got the "double free" error. -- Beno?t Minisini From gambas at ...1... Wed Nov 24 11:59:07 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 24 Nov 2010 11:59:07 +0100 Subject: [Gambas-user] About arrays In-Reply-To: <201011241156.20826.gambas@...1...> References: <201011231913.27794.gambas@...1...> <201011241153.08523.gambas@...1...> <201011241156.20826.gambas@...1...> Message-ID: <201011241159.07119.gambas@...1...> > > > Good morning to all, > > > > > > write this code to see something strange > > > > > > DIM aInt2[1] AS String > > > > > > PRINT IsObject(aInt2) > > > > > > Gambas2-2.21 rev3300 > > > Ubuntu 10.04, AMD64 > > > > I see nothing strange. > > Ah yes, I got the "double free" error. Mmm. I'm not sure I will be able to fix that in Gambas 2. Gambas 3 should be stronger against that, as "embedded" arrays are accessed through internal temporary objects (i.e. IsObject(EmbeddedArray) will return TRUE). -- Beno?t Minisini From gambas at ...1... Wed Nov 24 11:59:14 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 24 Nov 2010 11:59:14 +0100 Subject: [Gambas-user] IsObject(NULL) In-Reply-To: <1290586910.6513.1.camel@...2493...> References: <1290586910.6513.1.camel@...2493...> Message-ID: <201011241159.14839.gambas@...1...> > hi, > > PRINT IsObject(NULL) > > returns > TRUE > > The NULL constant is an object? NULL is almost everything. So IsObject(Null) and IsString(Null) returns TRUE. But IsDate(Null) returns FALSE, whereas Null can be a date. So things are not very logical there. -- Beno?t Minisini From austinium at ...43... Wed Nov 24 12:01:12 2010 From: austinium at ...43... (vikram) Date: Wed, 24 Nov 2010 03:01:12 -0800 (PST) Subject: [Gambas-user] Displaying Mouse.Wait while running a SHELL Command Message-ID: <562648.46131.qm@...2467...> Hi, Heres how i "fixed" it, hope it is the right way to display a "wait" cursor while a process executes. ------------------------- FMain.Mouse = Mouse.Wait WAIT Application.Busy = 1 SHELL "sha512sum lenny.iso" TO actualSUM Application.Busy = 0 FMain.Mouse = Mouse.Default ------------------------- I read "If you call WAIT from an event handler, you may create infinite recursions, and then stack overflows" from the Docs, i hope it wouldn't be an issue in this case (i.e., if i were to use WAIT for the click event of a Button). Regards, Vikram From gambas at ...1... Wed Nov 24 12:08:34 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 24 Nov 2010 12:08:34 +0100 Subject: [Gambas-user] Removing / Modifying IsXXXX() functions in Gambas 3 Message-ID: <201011241208.34100.gambas@...1...> Hi, I'm currently thinking about modifying/removing all IsXXXX() functions in Gambas 3. They mainly test the datatype of their expression. So, either the datatype is known at compile time, and there should be no need of testing it ; either you are using a Variant, and you can use TypeOf() to get the datatype of the value. I will replace them by some functions that will test if a value can be converted safely from a string by using localization. This is what most users expected from these functions. For exemple, in french localization: IsDate("13/2/20") -> True IsNumber("3,34") -> True IsInteger("3,34") -> False IsNumber("3.34") -> False Internally, they will use Val() and see if the conversion works. I will kept most of the name, so there will be a big incompatibility between Gambas 2, current Gambas 3, and final Gambas 3. What do you think about that? Who is using the IsXXXX() functions, and in which context? -- Beno?t Minisini From demosthenesk at ...626... Wed Nov 24 12:08:43 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Wed, 24 Nov 2010 13:08:43 +0200 Subject: [Gambas-user] About arrays In-Reply-To: <201011241153.08523.gambas@...1...> References: <201011231913.27794.gambas@...1...> <1290586522.6404.1.camel@...2493...> <201011241153.08523.gambas@...1...> Message-ID: <1290596923.2321.2.camel@...2494...> i expected a FALSE than all this code show up in console. On Wed, 2010-11-24 at 11:53 +0100, Beno?t Minisini wrote: > > Good morning to all, > > > > write this code to see something strange > > > > DIM aInt2[1] AS String > > > > PRINT IsObject(aInt2) > > > > Gambas2-2.21 rev3300 > > Ubuntu 10.04, AMD64 > > > > I see nothing strange. > -- Regards, Demosthenes From gambas at ...1... Wed Nov 24 12:09:45 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 24 Nov 2010 12:09:45 +0100 Subject: [Gambas-user] Displaying Mouse.Wait while running a SHELL Command In-Reply-To: <562648.46131.qm@...2467...> References: <562648.46131.qm@...2467...> Message-ID: <201011241209.45046.gambas@...1...> > Hi, > > Heres how i "fixed" it, hope it is the right way to display a "wait" cursor > while a process executes. > > ------------------------- > FMain.Mouse = Mouse.Wait > WAIT > Application.Busy = 1 > > SHELL "sha512sum lenny.iso" TO actualSUM > > Application.Busy = 0 > FMain.Mouse = Mouse.Default > ------------------------- > > I read "If you call WAIT from an event handler, you may create infinite > recursions, and then stack overflows" from the Docs, i hope it wouldn't be > an issue in this case (i.e., if i were to use WAIT for the click event of > a Button). > > Regards, > Vikram > Setting FMain.Mouse and calling WAIT is useless. Application.Busy should already set the busy cursor for every widget in the application. Otherwise this is a bug. Regards, -- Beno?t Minisini From demosthenesk at ...626... Wed Nov 24 12:11:12 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Wed, 24 Nov 2010 13:11:12 +0200 Subject: [Gambas-user] IsObject(NULL) In-Reply-To: References: <1290586910.6513.1.camel@...2493...> Message-ID: <1290597072.2321.3.camel@...2494...> sorry... i ll be more careful next time. On Wed, 2010-11-24 at 11:53 +0100, Fabien Bodard wrote: > 2010/11/24 Demosthenes Koptsis : > > > > hi, > > > > PRINT IsObject(NULL) > > > > returns > > TRUE > > > > The NULL constant is an object? > > nead the help please ! > > http://gambasdoc.org/help/lang/isobject > > > > > -- > > Regards, > > Demosthenes Koptsis. > > > > > > ------------------------------------------------------------------------------ > > Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! > > Tap into the largest installed PC base & get more eyes on your game by > > optimizing for Intel(R) Graphics Technology. Get started today with the > > Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. > > http://p.sf.net/sfu/intelisp-dev2dev > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > -- Regards, Demosthenes From ron at ...1740... Wed Nov 24 12:18:32 2010 From: ron at ...1740... (Ron) Date: Wed, 24 Nov 2010 12:18:32 +0100 Subject: [Gambas-user] Removing / Modifying IsXXXX() functions in Gambas 3 In-Reply-To: <201011241208.34100.gambas@...1...> References: <201011241208.34100.gambas@...1...> Message-ID: <4CECF488.5080904@...1740...> On 24-11-2010 12:08, Beno?t Minisini wrote: > Hi, > > I'm currently thinking about modifying/removing all IsXXXX() functions in > Gambas 3. > > They mainly test the datatype of their expression. So, either the datatype is > known at compile time, and there should be no need of testing it ; either you > are using a Variant, and you can use TypeOf() to get the datatype of the > value. > > I will replace them by some functions that will test if a value can be > converted safely from a string by using localization. This is what most users > expected from these functions. > > For exemple, in french localization: > > IsDate("13/2/20") -> True > IsNumber("3,34") -> True > IsInteger("3,34") -> False > IsNumber("3.34") -> False > > Internally, they will use Val() and see if the conversion works. > > I will kept most of the name, so there will be a big incompatibility between > Gambas 2, current Gambas 3, and final Gambas 3. > > What do you think about that? > > Who is using the IsXXXX() functions, and in which context? > I use these in my project, a lot less than expected at first: Bluetooth.module: IF IsInteger(Val(sRSSI)) THEN Bluetooth.module: iRSSI = IsInteger(Val(sRSSI)) Events.module: IF rResult!rerunenabled = TRUE AND IF IsDate(rResult!lastrun) THEN Events.module: IF IsBoolean(sValue) THEN sValue = Main.DisplayBool(sValue) Events.module: IF IsBoolean(sCond) THEN sCond = Main.DisplayBool(sCond) Events.module: ELSE IF IsBoolean(vResult) THEN JSON.module: IF NOT IsLetter(sCar) THEN RETURN sCar JSON.module: IF NOT IsLetter(sCar) THEN JSON.module: IF IsNull(vNumber) THEN Error.Raise("Incorrect number") JSON.module: ELSE IF sCar = "-" OR IF IsDigit(sCar) THEN Mail.module: IF IsString(Main.GlobalVar["Minute"]) THEN Main.GlobalVar["Minute"] = Val(Main.GlobalVar["Minute"]) Main.module: IF NOT IsNull(vValue) THEN Main.module: IF IsNumber(Val(tv[k, col].Text)) THEN Main.module: IF IsNumber(Val(gv[k, col].Text)) THEN Main.module:PUBLIC FUNCTION IsTime(sString AS String) AS Boolean Main.module:PUBLIC FUNCTION IsBool(sStr AS String) AS Boolean CDenon.class: IF IsInteger(sValue) THEN CDenon.class: IF IsInteger(sValue) THEN CDenon.class: IF IsNull(Val(sZonecat)) THEN CRFXComRX.class: IF IsDigit(Hex(RecBuf[4])) AND IF IsDigit(Hex(Lsr(RecBuf[3], 4))) THEN CSqueezeServer.class: ELSE IF IsLetter(sCar) OR IF IsDigit(sCar) OR IF InStr("*-._", sCar) THEN FConditionEditor.class: IF NOT (Main.IsBool(Events.EvalFormula(taFormula.Text))) THEN FConditionEditor.class: IF IsBoolean(vVal) THEN FDebug.class: IF IsBoolean(vValue) THEN FTriggerEditor.class: IF IsBoolean(Main.GlobalVar[cmbVariables.Text]) THEN FTriggerEditor.class: ELSE IF NOT IsNumber(Main.GlobalVar[cmbVariables.Text]) THEN FTriggerEditor.class: IF IsNumber(Val(txtDeviceValue.Text)) THEN Regards, Ron_2nd. From gambas.fr at ...626... Wed Nov 24 12:21:58 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Wed, 24 Nov 2010 12:21:58 +0100 Subject: [Gambas-user] IsObject(NULL) In-Reply-To: <201011241159.14839.gambas@...1...> References: <1290586910.6513.1.camel@...2493...> <201011241159.14839.gambas@...1...> Message-ID: Le 24 novembre 2010 11:59, Beno?t Minisini a ?crit : >> hi, >> >> PRINT IsObject(NULL) >> >> returns >> TRUE >> >> The NULL constant is an object? > > NULL is almost everything. So IsObject(Null) and IsString(Null) returns TRUE. > But IsDate(Null) returns FALSE, whereas Null can be a date. > > So things are not very logical there. I think too .. as i can't use a null as an object so it is not an object... but it depend if isobject test the variable type or the content. For exemple dim o as object isobject(o) will return true even if o is null... o can only be an object but dim v as variant is object(v) will return false if it is null ... it can be anything .... in my mind it will work like that ... > > -- > Beno?t Minisini > > ------------------------------------------------------------------------------ > Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! > Tap into the largest installed PC base & get more eyes on your game by > optimizing for Intel(R) Graphics Technology. Get started today with the > Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. > http://p.sf.net/sfu/intelisp-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Fabien Bodard From ron at ...1740... Wed Nov 24 12:20:03 2010 From: ron at ...1740... (Ron) Date: Wed, 24 Nov 2010 12:20:03 +0100 Subject: [Gambas-user] Displaying Mouse.Wait while running a SHELL Command In-Reply-To: <201011241209.45046.gambas@...1...> References: <562648.46131.qm@...2467...> <201011241209.45046.gambas@...1...> Message-ID: <4CECF4E3.6010505@...1740...> On 24-11-2010 12:09, Beno?t Minisini wrote: >> Hi, >> >> Heres how i "fixed" it, hope it is the right way to display a "wait" cursor >> while a process executes. >> >> ------------------------- >> FMain.Mouse = Mouse.Wait >> WAIT >> Application.Busy = 1 >> >> SHELL "sha512sum lenny.iso" TO actualSUM >> >> Application.Busy = 0 >> FMain.Mouse = Mouse.Default >> ------------------------- >> >> I read "If you call WAIT from an event handler, you may create infinite >> recursions, and then stack overflows" from the Docs, i hope it wouldn't be >> an issue in this case (i.e., if i were to use WAIT for the click event of >> a Button). >> >> Regards, >> Vikram >> > Setting FMain.Mouse and calling WAIT is useless. Application.Busy should > already set the busy cursor for every widget in the application. Otherwise > this is a bug. > > Regards, > That was what I thought too, but Application.Busy alone is not showing a busy pointer (anymore?) on latest gambas 2 and Ubuntu 10.04 with gb.qt Regards, Ron_2nd. From rterry at ...1946... Wed Nov 24 12:27:24 2010 From: rterry at ...1946... (richard terry) Date: Wed, 24 Nov 2010 22:27:24 +1100 Subject: [Gambas-user] Removing / Modifying IsXXXX() functions in Gambas 3 In-Reply-To: <201011241208.34100.gambas@...1...> References: <201011241208.34100.gambas@...1...> Message-ID: <201011242227.24708.rterry@...1946...> On Wednesday 24 November 2010 22:08:34 Beno?t Minisini wrote: Hi Benoit I use isDate() quite a lot, isNumber I think once Regards richard > Hi, > > I'm currently thinking about modifying/removing all IsXXXX() functions in > Gambas 3. > > They mainly test the datatype of their expression. So, either the datatype > is known at compile time, and there should be no need of testing it ; > either you are using a Variant, and you can use TypeOf() to get the > datatype of the value. > > I will replace them by some functions that will test if a value can be > converted safely from a string by using localization. This is what most > users expected from these functions. > > For exemple, in french localization: > > IsDate("13/2/20") -> True > IsNumber("3,34") -> True > IsInteger("3,34") -> False > IsNumber("3.34") -> False > > Internally, they will use Val() and see if the conversion works. > > I will kept most of the name, so there will be a big incompatibility > between Gambas 2, current Gambas 3, and final Gambas 3. > > What do you think about that? > > Who is using the IsXXXX() functions, and in which context? > From bbruen at ...2308... Wed Nov 24 12:27:30 2010 From: bbruen at ...2308... (Bruce Bruen) Date: Wed, 24 Nov 2010 21:57:30 +1030 Subject: [Gambas-user] IsObject(NULL) In-Reply-To: <1290586910.6513.1.camel@...2493...> References: <1290586910.6513.1.camel@...2493...> Message-ID: <201011242157.32065.bbruen@...2308...> On Wed, 24 Nov 2010 06:51:50 pm Demosthenes Koptsis wrote: > hi, > > PRINT IsObject(NULL) > > returns > TRUE > > The NULL constant is an object? I really don't see a problem here. Directly from the help: "IsObject Syntax bRes = IsObject ( vRef ) AS Booelan bRes = Object? ( vRef ) AS Boolean Returns TRUE if the vRef is an object or a null reference. IsObject(NULL) doesn't refer to the NULL constant being an object, it is answering correctly that a vRef=NULL is a null reference! -- best regards Bruce Bruen From gambas at ...1... Wed Nov 24 12:28:00 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 24 Nov 2010 12:28:00 +0100 Subject: [Gambas-user] Removing / Modifying IsXXXX() functions in Gambas3 In-Reply-To: <4CECF488.5080904@...1740...> References: <201011241208.34100.gambas@...1...> <4CECF488.5080904@...1740...> Message-ID: <201011241228.00690.gambas@...1...> > On 24-11-2010 12:08, Beno?t Minisini wrote: > > Hi, > > > > I'm currently thinking about modifying/removing all IsXXXX() functions in > > Gambas 3. > > > > They mainly test the datatype of their expression. So, either the > > datatype is known at compile time, and there should be no need of > > testing it ; either you are using a Variant, and you can use TypeOf() to > > get the datatype of the value. > > > > I will replace them by some functions that will test if a value can be > > converted safely from a string by using localization. This is what most > > users expected from these functions. > > > > For exemple, in french localization: > > IsDate("13/2/20") -> True > > IsNumber("3,34") -> True > > IsInteger("3,34") -> False > > IsNumber("3.34") -> False > > > > Internally, they will use Val() and see if the conversion works. > > > > I will kept most of the name, so there will be a big incompatibility > > between Gambas 2, current Gambas 3, and final Gambas 3. > > > > What do you think about that? > > > > Who is using the IsXXXX() functions, and in which context? > > I use these in my project, a lot less than expected at first: > > Bluetooth.module: IF IsInteger(Val(sRSSI)) THEN > Bluetooth.module: iRSSI = IsInteger(Val(sRSSI)) > Events.module: IF rResult!rerunenabled = TRUE AND IF > IsDate(rResult!lastrun) THEN > Events.module: IF IsBoolean(sValue) THEN sValue = Main.DisplayBool(sValue) > Events.module: IF IsBoolean(sCond) THEN sCond = Main.DisplayBool(sCond) > Events.module: ELSE IF IsBoolean(vResult) THEN > JSON.module: IF NOT IsLetter(sCar) THEN RETURN sCar > JSON.module: IF NOT IsLetter(sCar) THEN > JSON.module: IF IsNull(vNumber) THEN Error.Raise("Incorrect number") > JSON.module: ELSE IF sCar = "-" OR IF IsDigit(sCar) THEN > Mail.module: IF IsString(Main.GlobalVar["Minute"]) THEN > Main.GlobalVar["Minute"] = Val(Main.GlobalVar["Minute"]) > Main.module: IF NOT IsNull(vValue) THEN > Main.module: IF IsNumber(Val(tv[k, col].Text)) THEN > Main.module: IF IsNumber(Val(gv[k, col].Text)) THEN > Main.module:PUBLIC FUNCTION IsTime(sString AS String) AS Boolean > Main.module:PUBLIC FUNCTION IsBool(sStr AS String) AS Boolean > CDenon.class: IF IsInteger(sValue) THEN > CDenon.class: IF IsInteger(sValue) THEN > CDenon.class: IF IsNull(Val(sZonecat)) THEN > CRFXComRX.class: IF IsDigit(Hex(RecBuf[4])) AND IF > IsDigit(Hex(Lsr(RecBuf[3], 4))) THEN > CSqueezeServer.class: ELSE IF IsLetter(sCar) OR IF IsDigit(sCar) OR > IF InStr("*-._", sCar) THEN > FConditionEditor.class: IF NOT > (Main.IsBool(Events.EvalFormula(taFormula.Text))) THEN > FConditionEditor.class: IF IsBoolean(vVal) THEN > FDebug.class: IF IsBoolean(vValue) THEN > FTriggerEditor.class: IF IsBoolean(Main.GlobalVar[cmbVariables.Text]) > THEN > FTriggerEditor.class: ELSE IF NOT > IsNumber(Main.GlobalVar[cmbVariables.Text]) THEN > FTriggerEditor.class: IF IsNumber(Val(txtDeviceValue.Text)) THEN > > Regards, > Ron_2nd. > When you do IsNumber(Val(...)), you actually want the new behaviour I want to implement: checking if a string can be safely converted to what you want. In the new syntax, you will directly do IsNumber(...). The IsDigit(), IsLetter()... functions are not concerned by the change. IsNull() will be kept unchanged. Then, please tell me what you are testing exactly with these lines: Events.module: IF rResult!rerunenabled = TRUE AND IF IsDate(rResult!lastrun) THEN Events.module: IF IsBoolean(sValue) THEN sValue = Main.DisplayBool(sValue) Events.module: IF IsBoolean(sCond) THEN sCond = Main.DisplayBool(sCond) Events.module: ELSE IF IsBoolean(vResult) THEN Mail.module: IF IsString(Main.GlobalVar["Minute"]) THEN Main.GlobalVar["Minute"] = Val(Main.GlobalVar["Minute"]) CDenon.class: IF IsInteger(sValue) THEN CDenon.class: IF IsInteger(sValue) THEN FConditionEditor.class: IF IsBoolean(vVal) THEN FDebug.class: IF IsBoolean(vValue) THEN FTriggerEditor.class: IF IsBoolean(Main.GlobalVar[cmbVariables.Text]) THEN FTriggerEditor.class: ELSE IF NOT IsNumber(Main.GlobalVar[cmbVariables.Text]) THEN Thanks in advance. -- Beno?t Minisini From gambas at ...1... Wed Nov 24 12:32:26 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 24 Nov 2010 12:32:26 +0100 Subject: [Gambas-user] Removing / Modifying IsXXXX() functions in Gambas3 In-Reply-To: <201011242227.24708.rterry@...1946...> References: <201011241208.34100.gambas@...1...> <201011242227.24708.rterry@...1946...> Message-ID: <201011241232.26903.gambas@...1...> > On Wednesday 24 November 2010 22:08:34 Beno?t Minisini wrote: > > Hi Benoit I use isDate() quite a lot, isNumber I think once > > Regards > richard > In which context exactly? -- Beno?t Minisini From demosthenesk at ...626... Wed Nov 24 12:44:22 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Wed, 24 Nov 2010 13:44:22 +0200 Subject: [Gambas-user] IsObject(NULL) In-Reply-To: References: <1290586910.6513.1.camel@...2493...> <201011241159.14839.gambas@...1...> Message-ID: <1290599062.2321.19.camel@...2494...> i will describe my thoughts about that, i read the http://gambasdoc.org/help/cat/constants and i saw that a TRUE or FALSE value is a Language constant. Also NULL is a Language constant! So i expected from IsObject() to return FALSE when it is feed with constants as argument. So PRINT IsObject(TRUE) 'False PRINT IsObject(FALSE) 'False PRINT IsObject(0) 'False PRINT IsObject("a string") 'False But PRINT IsObject(NULL) 'True Some more thoughts.. In wiki says that NULL is a void string and indeed... PRINT IsObject("") 'True 1) But what if someone want to check a void string? 2) How a PRINT IsObject("a string") 'is False and a PRINT IsObject("") 'is not False both are strings and not Objects. On Wed, 2010-11-24 at 12:21 +0100, Fabien Bodard wrote: > Le 24 novembre 2010 11:59, Beno?t Minisini > a ?crit : > >> hi, > >> > >> PRINT IsObject(NULL) > >> > >> returns > >> TRUE > >> > >> The NULL constant is an object? > > > > NULL is almost everything. So IsObject(Null) and IsString(Null) returns TRUE. > > But IsDate(Null) returns FALSE, whereas Null can be a date. > > > > So things are not very logical there. > > I think too .. as i can't use a null as an object so it is not an > object... but it depend if isobject test the variable type or the > content. > > For exemple > dim o as object > > isobject(o) will return true even if o is null... o can only be an object > > but > dim v as variant > > is object(v) will return false if it is null ... it can be anything > > .... > in my mind it will work like that ... > > > > > > -- > > Beno?t Minisini > > > > ------------------------------------------------------------------------------ > > Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! > > Tap into the largest installed PC base & get more eyes on your game by > > optimizing for Intel(R) Graphics Technology. Get started today with the > > Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. > > http://p.sf.net/sfu/intelisp-dev2dev > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > -- Regards, Demosthenes From gambas at ...1... Wed Nov 24 12:47:30 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 24 Nov 2010 12:47:30 +0100 Subject: [Gambas-user] IsObject(NULL) In-Reply-To: <1290599062.2321.19.camel@...2494...> References: <1290586910.6513.1.camel@...2493...> <1290599062.2321.19.camel@...2494...> Message-ID: <201011241247.30246.gambas@...1...> > i will describe my thoughts about that, > > i read the > > http://gambasdoc.org/help/cat/constants > > and i saw that a TRUE or FALSE value is a Language constant. > Also NULL is a Language constant! > > So i expected from IsObject() to return FALSE when it is feed with > constants as argument. > > So > PRINT IsObject(TRUE) 'False > PRINT IsObject(FALSE) 'False > PRINT IsObject(0) 'False > PRINT IsObject("a string") 'False > > But > PRINT IsObject(NULL) 'True > > Some more thoughts.. > In wiki says that NULL is a void string > and indeed... > > PRINT IsObject("") 'True > > 1) But what if someone want to check a void string? > 2) How a > PRINT IsObject("a string") 'is False > and a > PRINT IsObject("") 'is not False > > both are strings and not Objects. > In Gambas, NULL and the void string are the same thing. -- Beno?t Minisini From demosthenesk at ...626... Wed Nov 24 12:56:56 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Wed, 24 Nov 2010 13:56:56 +0200 Subject: [Gambas-user] IsObject(NULL) In-Reply-To: <201011242157.32065.bbruen@...2308...> References: <1290586910.6513.1.camel@...2493...> <201011242157.32065.bbruen@...2308...> Message-ID: <1290599816.2321.27.camel@...2494...> On Wed, 2010-11-24 at 21:57 +1030, Bruce Bruen wrote: > Returns TRUE if the vRef is an object or a null reference. > IsObject(NULL) doesn't refer to the NULL constant being an object, it is > answering correctly that a vRef=NULL is a null reference! > yes i saw now the help about NULL reference or an object. But IsObject(NULL) i think is different from IsObject(oMyNullObject) The first is the constant the second is a NULL object. Also see IsObject("") which here is a empty string. If i am wrong please correct me. -- Regards, Demosthenes From ron at ...1740... Wed Nov 24 13:10:57 2010 From: ron at ...1740... (Ron) Date: Wed, 24 Nov 2010 13:10:57 +0100 Subject: [Gambas-user] Removing / Modifying IsXXXX() functions in Gambas3 In-Reply-To: <201011241228.00690.gambas@...1...> References: <201011241208.34100.gambas@...1...> <4CECF488.5080904@...1740...> <201011241228.00690.gambas@...1...> Message-ID: <4CED00D1.70002@...1740...> On 24-11-2010 12:28, Beno?t Minisini wrote: >> On 24-11-2010 12:08, Beno?t Minisini wrote: >>> Hi, >>> >>> I'm currently thinking about modifying/removing all IsXXXX() functions in >>> Gambas 3. >>> >>> They mainly test the datatype of their expression. So, either the >>> datatype is known at compile time, and there should be no need of >>> testing it ; either you are using a Variant, and you can use TypeOf() to >>> get the datatype of the value. >>> >>> I will replace them by some functions that will test if a value can be >>> converted safely from a string by using localization. This is what most >>> users expected from these functions. >>> >>> For exemple, in french localization: >>> IsDate("13/2/20") -> True >>> IsNumber("3,34") -> True >>> IsInteger("3,34") -> False >>> IsNumber("3.34") -> False >>> >>> Internally, they will use Val() and see if the conversion works. >>> >>> I will kept most of the name, so there will be a big incompatibility >>> between Gambas 2, current Gambas 3, and final Gambas 3. >>> >>> What do you think about that? >>> >>> Who is using the IsXXXX() functions, and in which context? >> I use these in my project, a lot less than expected at first: >> >> Bluetooth.module: IF IsInteger(Val(sRSSI)) THEN >> Bluetooth.module: iRSSI = IsInteger(Val(sRSSI)) >> Events.module: IF rResult!rerunenabled = TRUE AND IF >> IsDate(rResult!lastrun) THEN >> Events.module: IF IsBoolean(sValue) THEN sValue = Main.DisplayBool(sValue) >> Events.module: IF IsBoolean(sCond) THEN sCond = Main.DisplayBool(sCond) >> Events.module: ELSE IF IsBoolean(vResult) THEN >> JSON.module: IF NOT IsLetter(sCar) THEN RETURN sCar >> JSON.module: IF NOT IsLetter(sCar) THEN >> JSON.module: IF IsNull(vNumber) THEN Error.Raise("Incorrect number") >> JSON.module: ELSE IF sCar = "-" OR IF IsDigit(sCar) THEN >> Mail.module: IF IsString(Main.GlobalVar["Minute"]) THEN >> Main.GlobalVar["Minute"] = Val(Main.GlobalVar["Minute"]) >> Main.module: IF NOT IsNull(vValue) THEN >> Main.module: IF IsNumber(Val(tv[k, col].Text)) THEN >> Main.module: IF IsNumber(Val(gv[k, col].Text)) THEN >> Main.module:PUBLIC FUNCTION IsTime(sString AS String) AS Boolean >> Main.module:PUBLIC FUNCTION IsBool(sStr AS String) AS Boolean >> CDenon.class: IF IsInteger(sValue) THEN >> CDenon.class: IF IsInteger(sValue) THEN >> CDenon.class: IF IsNull(Val(sZonecat)) THEN >> CRFXComRX.class: IF IsDigit(Hex(RecBuf[4])) AND IF >> IsDigit(Hex(Lsr(RecBuf[3], 4))) THEN >> CSqueezeServer.class: ELSE IF IsLetter(sCar) OR IF IsDigit(sCar) OR >> IF InStr("*-._", sCar) THEN >> FConditionEditor.class: IF NOT >> (Main.IsBool(Events.EvalFormula(taFormula.Text))) THEN >> FConditionEditor.class: IF IsBoolean(vVal) THEN >> FDebug.class: IF IsBoolean(vValue) THEN >> FTriggerEditor.class: IF IsBoolean(Main.GlobalVar[cmbVariables.Text]) >> THEN >> FTriggerEditor.class: ELSE IF NOT >> IsNumber(Main.GlobalVar[cmbVariables.Text]) THEN >> FTriggerEditor.class: IF IsNumber(Val(txtDeviceValue.Text)) THEN >> >> Regards, >> Ron_2nd. >> > When you do IsNumber(Val(...)), you actually want the new behaviour I want to > implement: checking if a string can be safely converted to what you want. In > the new syntax, you will directly do IsNumber(...). > > The IsDigit(), IsLetter()... functions are not concerned by the change. > > IsNull() will be kept unchanged. > > Then, please tell me what you are testing exactly with these lines: > > Events.module: IF rResult!rerunenabled = TRUE AND IF > IsDate(rResult!lastrun) THEN It appears to be just a test if the db record field has a date value in it, instead of an empty value. > Events.module: IF IsBoolean(sValue) THEN sValue = Main.DisplayBool(sValue) > Events.module: IF IsBoolean(sCond) THEN sCond = Main.DisplayBool(sCond) > Events.module: ELSE IF IsBoolean(vResult) THEN --- PUBLIC SUB CheckCondition(sValue AS Variant, sOperand AS String, sCond AS Variant, OPTIONAL bMute AS Boolean) AS Boolean DIM bReturn AS Boolean IF IsBoolean(sValue) THEN sValue = Main.DisplayBool(sValue) IF IsBoolean(sCond) THEN sCond = Main.DisplayBool(sCond) --- CheckConditions(), has variants as arguments. If the variant sValue is a Boolean, then change it to a string value with "True" "False" as content, so that conversion and compare tests (below) after that can be more generic. --- SELECT sOperand CASE "=" IF Comp(sValue, sCond) = 0 THEN bReturn = TRUE CASE "<>" IF sValue <> sCond THEN bReturn = TRUE CASE ">" IF CFloat(Replace(sValue, ",", ".", gb.String)) > CFloat(Replace(sCond, ",", ".", gb.String)) THEN bReturn = TRUE CASE "<" IF CFloat(Replace(sValue, ",", ".", gb.String)) < CFloat(Replace(sCond, ",", ".", gb.String)) THEN bReturn = TRUE CASE ELSE IF Main.bEventsDebug THEN Main.WriteDebugLog(("[Events] 2c. Unsupported operand '" & sOperand & "' found!")) END SELECT IF Main.bEventsDebug AND IF NOT bMute THEN Main.WriteDebugLog(("[Events] 2c. Check condition '") & sValue & " " & sOperand & " " & sCond & "' = " & Main.DisplayBool(bReturn)) RETURN bReturn CATCH IF Main.bEventsDebug THEN Main.WriteDebugLog(("[Events] 2c. Invalid comparison in CheckCondition() routine!")) RETURN FALSE END --- > Mail.module: IF IsString(Main.GlobalVar["Minute"]) THEN > Main.GlobalVar["Minute"] = Val(Main.GlobalVar["Minute"]) Just seems to be checks to see if the variant value from that collection isn't empty, to prevent errors. > CDenon.class: IF IsInteger(sValue) THEN > CDenon.class: IF IsInteger(sValue) THEN TRY sValue = Val(sValue) IF IsInteger(sValue) THEN sValue = sValue + 80 ELSE IF UCase(sValue) = "OFF" THEN sValue = 99 ENDIF To see if sValue contains a decibel value -18...80 , or on/off/up/down. > FConditionEditor.class: IF IsBoolean(vVal) THEN TRY vVal = Main.GlobalVar[Right(tvVariables.Current.Key, Len(tvVariables.Current.Key) - 4)] IF IsBoolean(vVal) THEN sVal = Main.DisplayBool(vVal) ELSE sVal = vVal ENDIF vVal can be strings, numbers or booleans, if its a boolean, change it to "True", "False", otherwise just a T or nothing is shown in TableView. > FDebug.class: IF IsBoolean(vValue) THEN Same here. > FTriggerEditor.class: IF IsBoolean(Main.GlobalVar[cmbVariables.Text]) > THEN > FTriggerEditor.class: ELSE IF NOT > IsNumber(Main.GlobalVar[cmbVariables.Text]) THEN > If value is a boolean, disable compare checkboxes <, > , on form, just have = and <> enabled, if it's a number allow, < and > too as operand for trigger rules in my event/trigger editor. Regards, Ron_2nd. From demosthenesk at ...626... Wed Nov 24 13:14:08 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Wed, 24 Nov 2010 14:14:08 +0200 Subject: [Gambas-user] IsObject(NULL) In-Reply-To: References: <1290586910.6513.1.camel@...2493...> <201011241159.14839.gambas@...1...> Message-ID: <1290600848.2321.30.camel@...2494...> On Wed, 2010-11-24 at 12:21 +0100, Fabien Bodard wrote: > For exemple > dim o as object > > isobject(o) will return true even if o is null... o can only be an object > > but > dim v as variant > > is object(v) will return false if it is null ... it can be anything hm... i checked this in Gambas2-2.21 DIM v AS Variant = NULL PRINT IsObject(v) 'True i see that, if something is NULL is recognized as object anyway. -- Regards, Demosthenes From gregor at ...2441... Wed Nov 24 13:41:44 2010 From: gregor at ...2441... (Gregor Burck) Date: Wed, 24 Nov 2010 13:41:44 +0100 Subject: [Gambas-user] Print html direct? Message-ID: <5a2d7358478beff1fc46df93f558f7de@...2510...> Hi, I'm still experimenting with printing, the scale method was a good hint for me. But now a other question: Can I direct print html? The background: I try to improve a application, and I wonder if it is esyer to generate html instead of print direkt, cause there are elements for layout. In this case I want to improve the print of an invoicment, so I need a head, tables blocks,... on idea is to generate the html code with css and open it with the system browser, other is to print html direct from gambas? In the moment I prever the first solution,... Any additional Ideas? Gregor -- From charles at ...1784... Wed Nov 24 13:54:57 2010 From: charles at ...1784... (charlesg) Date: Wed, 24 Nov 2010 04:54:57 -0800 (PST) Subject: [Gambas-user] Print html direct? In-Reply-To: <5a2d7358478beff1fc46df93f558f7de@...2510...> References: <5a2d7358478beff1fc46df93f558f7de@...2510...> Message-ID: <30296557.post@...1379...> Hi Gregor Burck wrote: > > Can I direct print html? > I shell to htmldoc to turn the html to pdf. e.g. shll = "htmldoc --bodyfont Sans --fontsize 6.0 --outfile " & Application.path & "/tfc.pdf --webpage " & Application.path & "/tfc.htm" SHELL shll WAIT then: shll = "lpr " & Application.path & "/tfc.pdf" shell shll wait -- View this message in context: http://old.nabble.com/Print-html-direct--tp30296474p30296557.html Sent from the gambas-user mailing list archive at Nabble.com. From demosthenesk at ...626... Wed Nov 24 14:00:26 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Wed, 24 Nov 2010 15:00:26 +0200 Subject: [Gambas-user] IsObject(NULL) In-Reply-To: <201011242157.32065.bbruen@...2308...> References: <1290586910.6513.1.camel@...2493...> <201011242157.32065.bbruen@...2308...> Message-ID: <1290603626.1971.15.camel@...2494...> On Wed, 2010-11-24 at 21:57 +1030, Bruce Bruen wrote: > I really don't see a problem here. > Directly from the help: > "IsObject > Returns TRUE if the vRef is an object or a null reference. > IsObject(NULL) doesn't refer to the NULL constant being an object, it is > answering correctly that a vRef=NULL is a null reference! > ok, may be Bruce is right here, NULL can be a reference to a NULL object but also a Variant or a Dynamic array or anything with a NULL reference. So IsObject() cannot determine the reference to object but to a NULL reference. i was just thinking if there is a way the IsObject() can be more accurate if something is NULL object or anything else. I was thinking if it was a NULL object, ok it is an object If it was anything else NULL, is not an object for example DIM aStrings AS String[] 'is a null object PRINT IsObject(aStrings) 'True DIM v AS Variant = NULL PRINT IsObject(v) 'here i expected false i tried to determine this difference with TypeOf DIM aStrings AS String[] 'is a null object PRINT TypeOf(aStrings) 'but i get 15 NULL value DIM v AS Variant = NULL PRINT TypeOf(v) 'again 15 NULL value instead 11 so i think there is no way to make difference of objects or anything else if they are NULL. -- Regards, Demosthenes From bbruen at ...2308... Wed Nov 24 14:10:55 2010 From: bbruen at ...2308... (Bruce Bruen) Date: Wed, 24 Nov 2010 23:40:55 +1030 Subject: [Gambas-user] Removing / Modifying IsXXXX() functions in Gambas 3 In-Reply-To: <201011241208.34100.gambas@...1...> References: <201011241208.34100.gambas@...1...> Message-ID: <201011242340.56691.bbruen@...2308...> On Wed, 24 Nov 2010 09:38:34 pm Beno?t Minisini wrote: > Hi, > > I'm currently thinking about modifying/removing all IsXXXX() functions in > Gambas 3. > > They mainly test the datatype of their expression. So, either the datatype > is known at compile time, and there should be no need of testing it ; > either you are using a Variant, and you can use TypeOf() to get the > datatype of the value. > > I will replace them by some functions that will test if a value can be > converted safely from a string by using localization. This is what most > users expected from these functions. > > For exemple, in french localization: > > IsDate("13/2/20") -> True > IsNumber("3,34") -> True > IsInteger("3,34") -> False > IsNumber("3.34") -> False > > Internally, they will use Val() and see if the conversion works. > > I will kept most of the name, so there will be a big incompatibility > between Gambas 2, current Gambas 3, and final Gambas 3. > > What do you think about that? > > Who is using the IsXXXX() functions, and in which context? Beno?t, MAJOR PANIC! I use IsNumber extensively to do quick checks on field parsing across heterogeneous databases. Using the 80-20 rule I can parse text fields for junk appendices to an expected numeric. Code such as vItem=split(result!note," ",NULL,TRUE)[0] IF IsNumber(vItem) THEN RETURN Val(vItem) ' else begin parsing diabolical note structure ..... abounds. Please reconsider this. -- best regards Bruce Bruen From gambas at ...1... Wed Nov 24 14:23:20 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 24 Nov 2010 14:23:20 +0100 Subject: [Gambas-user] Removing / Modifying IsXXXX() functions in Gambas3 In-Reply-To: <201011242340.56691.bbruen@...2308...> References: <201011241208.34100.gambas@...1...> <201011242340.56691.bbruen@...2308...> Message-ID: <201011241423.20500.gambas@...1...> > > Beno?t, > > MAJOR PANIC! I use IsNumber extensively to do quick checks on field > parsing across heterogeneous databases. Using the 80-20 rule I can parse > text fields for junk appendices to an expected numeric. > Code such as > > vItem=split(result!note," ",NULL,TRUE)[0] > IF IsNumber(vItem) THEN RETURN Val(vItem) > ' else begin parsing diabolical note structure > ..... > > abounds. > > Please reconsider this. Then you are using IsNumber() the wrong way: in your code, vItem is a string (I guess), and so IsNumber(vItem) will always return FALSE. You used IsNumber() as if it would tell you if a string can be converted to a number, which it does not at the moment! And which is exactly what I want to change! -- Beno?t Minisini From eilert-sprachen at ...221... Wed Nov 24 15:36:25 2010 From: eilert-sprachen at ...221... (Rolf-Werner Eilert) Date: Wed, 24 Nov 2010 15:36:25 +0100 Subject: [Gambas-user] Print html direct? In-Reply-To: <30296557.post@...1379...> References: <5a2d7358478beff1fc46df93f558f7de@...2510...> <30296557.post@...1379...> Message-ID: <4CED22E9.5000307@...221...> Am 24.11.2010 13:54, schrieb charlesg: > > Hi > > > Gregor Burck wrote: >> >> Can I direct print html? >> > > I shell to htmldoc to turn the html to pdf. > e.g. > shll = "htmldoc --bodyfont Sans --fontsize 6.0 --outfile "& > Application.path& "/tfc.pdf --webpage "& Application.path& "/tfc.htm" > SHELL shll WAIT > then: > shll = "lpr "& Application.path& "/tfc.pdf" > shell shll wait This is really cool dude :-) I'll print it and pin it on my wall, will certainly be used next time I've got to do something like this! By the way, htmldoc doesn't seem to be on my system, do you know where it comes from? Regards Rolf From dosida at ...626... Wed Nov 24 15:46:02 2010 From: dosida at ...626... (Dimitris Anogiatis) Date: Wed, 24 Nov 2010 07:46:02 -0700 Subject: [Gambas-user] Print html direct? In-Reply-To: <4CED22E9.5000307@...221...> References: <5a2d7358478beff1fc46df93f558f7de@...2510...> <30296557.post@...1379...> <4CED22E9.5000307@...221...> Message-ID: Hey guys, Does htmldoc have any UTF-8 support? Regards, Dimitrios On Wed, Nov 24, 2010 at 7:36 AM, Rolf-Werner Eilert < eilert-sprachen at ...221...> wrote: > Am 24.11.2010 13:54, schrieb charlesg: > > > > Hi > > > > > > Gregor Burck wrote: > >> > >> Can I direct print html? > >> > > > > I shell to htmldoc to turn the html to pdf. > > e.g. > > shll = "htmldoc --bodyfont Sans --fontsize 6.0 --outfile "& > > Application.path& "/tfc.pdf --webpage "& Application.path& "/tfc.htm" > > SHELL shll WAIT > > then: > > shll = "lpr "& Application.path& "/tfc.pdf" > > shell shll wait > > This is really cool dude :-) I'll print it and pin it on my wall, will > certainly be used next time I've got to do something like this! > > By the way, htmldoc doesn't seem to be on my system, do you know where > it comes from? > > Regards > > Rolf > > > > ------------------------------------------------------------------------------ > Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! > Tap into the largest installed PC base & get more eyes on your game by > optimizing for Intel(R) Graphics Technology. Get started today with the > Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. > http://p.sf.net/sfu/intelisp-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From eilert-sprachen at ...221... Wed Nov 24 16:12:49 2010 From: eilert-sprachen at ...221... (Rolf-Werner Eilert) Date: Wed, 24 Nov 2010 16:12:49 +0100 Subject: [Gambas-user] Removing / Modifying IsXXXX() functions in Gambas 3 In-Reply-To: <201011241208.34100.gambas@...1...> References: <201011241208.34100.gambas@...1...> Message-ID: <4CED2B71.4070808@...221...> Am 24.11.2010 12:08, schrieb Beno?t Minisini: > Hi, > > I'm currently thinking about modifying/removing all IsXXXX() functions in > Gambas 3. > > They mainly test the datatype of their expression. So, either the datatype is > known at compile time, and there should be no need of testing it ; either you > are using a Variant, and you can use TypeOf() to get the datatype of the > value. > > I will replace them by some functions that will test if a value can be > converted safely from a string by using localization. This is what most users > expected from these functions. > > For exemple, in french localization: > > IsDate("13/2/20") -> True > IsNumber("3,34") -> True > IsInteger("3,34") -> False > IsNumber("3.34") -> False > > Internally, they will use Val() and see if the conversion works. > > I will kept most of the name, so there will be a big incompatibility between > Gambas 2, current Gambas 3, and final Gambas 3. > > What do you think about that? > > Who is using the IsXXXX() functions, and in which context? > I just checked it. As far as I remember and due to my search within my most important projects, I have only used IsNull so far. In one project, I used it very often to manage Val() because Val() doesn't understand empty strings or strings without numbers. Wasn't it you or Fabien who once pointed me to this fact and gave me the tip to use IsNull for it? In that project there are lots of places where wrong inputs could occur, so there are lots of IF IsNull(bla) THEN RETURN "bullshit" or IF NOT IsNull(bla) THEN RETURN Val(bla) ;-) So from my point of view, if you let be Val() less critical, you my discard IsNull, otherwise leave it there or replace it by something useful. Regards Rolf From gambas at ...1... Wed Nov 24 16:25:04 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 24 Nov 2010 16:25:04 +0100 Subject: [Gambas-user] Fwd: Re: Removing / Modifying IsXXXX() functions in Gambas3 Message-ID: <201011241625.05057.gambas@...1...> On Wed, 24 Nov 2010 11:53:20 pm you wrote: > > Beno?t, > > > > MAJOR PANIC! I use IsNumber extensively to do quick checks on field > > parsing across heterogeneous databases. Using the 80-20 rule I can > > parse text fields for junk appendices to an expected numeric. > > Code such as > > > > vItem=split(result!note," ",NULL,TRUE)[0] > > > > IF IsNumber(vItem) THEN RETURN Val(vItem) > > > > ' else begin parsing diabolical note structure > > > > ..... > > > > abounds. > > > > Please reconsider this. > > Then you are using IsNumber() the wrong way: in your code, vItem is a > string (I guess), and so IsNumber(vItem) will always return FALSE. > > You used IsNumber() as if it would tell you if a string can be converted > to a number, which it does not at the moment! And which is exactly what > I want to change! Arrrrrggh, yer right again. After calming down I checked. IF IsNumber(Val(vItem)) THEN RETURN Val(vItem) Sorry, I just get the panics over "my precious code" :-) -- best regards Bruce Bruen From gambas.fr at ...626... Wed Nov 24 16:58:52 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Wed, 24 Nov 2010 16:58:52 +0100 Subject: [Gambas-user] Fwd: Re: Removing / Modifying IsXXXX() functions in Gambas3 In-Reply-To: <201011241625.05057.gambas@...1...> References: <201011241625.05057.gambas@...1...> Message-ID: nevertheless some shortcut functions to analyse the text in function of the localization will be useful and a isPrintable ... to say if all the characters in the string can be displayed (not special characters) From charles at ...1784... Wed Nov 24 18:48:11 2010 From: charles at ...1784... (charlesg) Date: Wed, 24 Nov 2010 09:48:11 -0800 (PST) Subject: [Gambas-user] Print html direct? In-Reply-To: References: <5a2d7358478beff1fc46df93f558f7de@...2510...> <30296557.post@...1379...> <4CED22E9.5000307@...221...> Message-ID: <30298482.post@...1379...> Dimitris Anogiatis wrote: > > Hey guys, > > Does htmldoc have any UTF-8 support? > Looking at www.htmldoc.org I don't think there is UTF-8 support. I just use it for formatting tables. It is in the Ubuntu repository (sudo apt-get install htmldoc) but I don't know about other distros. rgds -- View this message in context: http://old.nabble.com/Print-html-direct--tp30296474p30298482.html Sent from the gambas-user mailing list archive at Nabble.com. From tobiasboe1 at ...20... Wed Nov 24 19:50:32 2010 From: tobiasboe1 at ...20... (tobias) Date: Wed, 24 Nov 2010 19:50:32 +0100 Subject: [Gambas-user] Result object, again In-Reply-To: <30298482.post@...1379...> References: <5a2d7358478beff1fc46df93f558f7de@...2510...> <30296557.post@...1379...> <4CED22E9.5000307@...221...> <30298482.post@...1379...> Message-ID: <4CED5E78.6000008@...20...> good evening all, i have another question about my eternal punishment: the result object :-) caveat answered to a former question about results in general: >If you got into the habit of reading all the >records you've selected into memory (or even if the Result object >worked >that way behind the scenes...), you'd soon find everything breaking >with >Out Of Memory errors as soon as you start doing anything serious. my question now is, how the result works behind the scenes, is there a counter (result.index?) that tells a layer (the driver?) which record is to be given back? regards, tobi From shordi at ...626... Wed Nov 24 20:15:26 2010 From: shordi at ...626... (=?ISO-8859-1?Q?Jorge_Carri=F3n?=) Date: Wed, 24 Nov 2010 20:15:26 +0100 Subject: [Gambas-user] Print html direct? In-Reply-To: <30298482.post@...1379...> References: <5a2d7358478beff1fc46df93f558f7de@...2510...> <30296557.post@...1379...> <4CED22E9.5000307@...221...> <30298482.post@...1379...> Message-ID: Hi: Try wkhtmltopdf, in ubuntu repositories too... If you html code carry on the Utf-8 esecification it works... Goog Luck 2010/11/24 charlesg > > > Dimitris Anogiatis wrote: > > > > Hey guys, > > > > Does htmldoc have any UTF-8 support? > > > > Looking at www.htmldoc.org I don't think there is UTF-8 support. I just > use > it for formatting tables. > > It is in the Ubuntu repository (sudo apt-get install htmldoc) but I don't > know about other distros. > > rgds > -- > View this message in context: > http://old.nabble.com/Print-html-direct--tp30296474p30298482.html > Sent from the gambas-user mailing list archive at Nabble.com. > > > > ------------------------------------------------------------------------------ > Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! > Tap into the largest installed PC base & get more eyes on your game by > optimizing for Intel(R) Graphics Technology. Get started today with the > Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. > http://p.sf.net/sfu/intelisp-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From math.eber at ...221... Wed Nov 24 20:35:02 2010 From: math.eber at ...221... (math.eber at ...221...) Date: Wed, 24 Nov 2010 20:35:02 +0100 Subject: [Gambas-user] =?utf-8?q?To_the_wish_list=3A_FHelpBrowser?= In-Reply-To: <201011231857.25476.gambas@...1...> References: <201011231857.25476.gambas@...1...> Message-ID: <1PLL7O-0siBJw0@...2511...> Thanks, Beno?t. The "make" error has gone, the help browser behaves like any other window, and I even learned how to copy from help. Fine! -----Original-Nachricht----- Subject: Re: [Gambas-user] To the wish list: FHelpBrowser Date: Tue, 23 Nov 2010 18:57:25 +0100 From: Beno?t Minisini To: mailing list for gambas users > 1. As I asked before, why does the HelpBrowser have to be a "utility" > window that you can't minimize? I can't see no reason why it couldn't be a > "normal" window that could be used much easier. Read, minimize, try, and > read again... > Upgrade to the latest revision, and set "Use utility windows" to "No" in the IDE option dialog. Regards, -- Beno?t Minisini ---------------------------------------------------------------------------- -- Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! Tap into the largest installed PC base & get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From math.eber at ...221... Wed Nov 24 20:54:40 2010 From: math.eber at ...221... (math.eber at ...221...) Date: Wed, 24 Nov 2010 20:54:40 +0100 Subject: [Gambas-user] =?utf-8?q?Removing_/_Modifying_IsXXXX=28=29_functio?= =?utf-8?q?ns_in_Gambas_3?= In-Reply-To: <201011241208.34100.gambas@...1...> References: <201011241208.34100.gambas@...1...> Message-ID: <1PLLQP-0yra9g0@...2511...> If I understand you right, If Not IsDigit(TextBox.Text) Then... wouldn't be changed? -----Original-Nachricht----- Subject: [Gambas-user] Removing / Modifying IsXXXX() functions in Gambas 3 Date: Wed, 24 Nov 2010 12:08:34 +0100 From: Beno?t Minisini To: gambas-user at lists.sourceforge.net Who is using the IsXXXX() functions, and in which context? From rterry at ...1946... Wed Nov 24 22:22:59 2010 From: rterry at ...1946... (richard terry) Date: Thu, 25 Nov 2010 08:22:59 +1100 Subject: [Gambas-user] Removing / Modifying IsXXXX() functions in Gambas3 In-Reply-To: <201011241232.26903.gambas@...1...> References: <201011241208.34100.gambas@...1...> <201011242227.24708.rterry@...1946...> <201011241232.26903.gambas@...1...> Message-ID: <201011250822.59560.rterry@...1946...> On Wednesday 24 November 2010 22:32:26 Beno?t Minisini wrote: > > On Wednesday 24 November 2010 22:08:34 Beno?t Minisini wrote: > > > > Hi Benoit I use isDate() quite a lot, isNumber I think once > > > > Regards > > richard > > In which context exactly? > When I've got textboxes and user has entered what is meant to be a date, for example on the lost_focus event From rterry at ...1946... Wed Nov 24 22:24:49 2010 From: rterry at ...1946... (richard terry) Date: Thu, 25 Nov 2010 08:24:49 +1100 Subject: [Gambas-user] isNull() Message-ID: <201011250824.49638.rterry@...1946...> I use IsNull extensively, is that going to be removed? richard From nando_f at ...951... Wed Nov 24 23:49:52 2010 From: nando_f at ...951... (nando) Date: Wed, 24 Nov 2010 18:49:52 -0400 Subject: [Gambas-user] Type Mismatch error with max neg long int as constant Message-ID: <20101124224711.M5490@...951...> In Gambas2, I get a type mismatch error...but no error if ends in a 7 PUBLIC CONST LOWESTLONG AS Long = -9223372036854775808 'from wiki: -9.223.372.036.854.775.808 -Fernando From gambas at ...1... Wed Nov 24 23:51:12 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 24 Nov 2010 23:51:12 +0100 Subject: [Gambas-user] Result object, again In-Reply-To: <4CED5E78.6000008@...20...> References: <5a2d7358478beff1fc46df93f558f7de@...2510...> <30298482.post@...1379...> <4CED5E78.6000008@...20...> Message-ID: <201011242351.12809.gambas@...1...> > good evening all, > i have another question about my eternal punishment: the result object :-) > > caveat answered to a former question about results in general: > >If you got into the habit of reading all the > >records you've selected into memory (or even if the Result object > >worked > >that way behind the scenes...), you'd soon find everything breaking >with > >Out Of Memory errors as soon as you start doing anything serious. > > my question now is, how the result works behind the scenes, is there a > counter (result.index?) that tells a layer (the driver?) which record is > to be given back? > > regards, > tobi > A result object stores the entire query of the result in memory, because of the stupidity of most SQL backends. The gb.db.form implements a system that only keep a small part of the query result, by using the ">" operator on the table key, "Order By", and the Limit() method. That way, you can use a DataBrowser to browse a table that is located on a far server easily. Regards, -- Beno?t Minisini From gambas at ...1... Wed Nov 24 23:52:29 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 24 Nov 2010 23:52:29 +0100 Subject: [Gambas-user] Removing / Modifying IsXXXX() functions in Gambas3 In-Reply-To: <201011250822.59560.rterry@...1946...> References: <201011241208.34100.gambas@...1...> <201011241232.26903.gambas@...1...> <201011250822.59560.rterry@...1946...> Message-ID: <201011242352.29514.gambas@...1...> > On Wednesday 24 November 2010 22:32:26 Beno?t Minisini wrote: > > > On Wednesday 24 November 2010 22:08:34 Beno?t Minisini wrote: > > > > > > Hi Benoit I use isDate() quite a lot, isNumber I think once > > > > > > Regards > > > richard > > > > In which context exactly? > > When I've got textboxes and user has entered what is meant to be a date, > for example on the lost_focus event > I mean which code. IsDate() only tells you if a variant is a Date. If you want to check that a string is a date, you have to do that: dDate = Val(sTextBoxString) If IsNull(dDate) Then Print "Enter a date!" Endif -- Beno?t Minisini From gambas at ...1... Wed Nov 24 23:52:59 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 24 Nov 2010 23:52:59 +0100 Subject: [Gambas-user] Removing / Modifying IsXXXX() functions in Gambas 3 In-Reply-To: <1PLLQP-0yra9g0@...2511...> References: <201011241208.34100.gambas@...1...> <1PLLQP-0yra9g0@...2511...> Message-ID: <201011242352.59719.gambas@...1...> > If I understand you right, > If Not IsDigit(TextBox.Text) Then... > wouldn't be changed? No. All IsXXX() functions that just test characters won't be changed. -- Beno?t Minisini From mdavies5 at ...169... Thu Nov 25 00:24:01 2010 From: mdavies5 at ...169... (Michael) Date: Thu, 25 Nov 2010 10:24:01 +1100 Subject: [Gambas-user] Removing / Modifying IsXXXX() functions in Gambas 3 In-Reply-To: <201011241208.34100.gambas@...1...> References: <201011241208.34100.gambas@...1...> Message-ID: <4CED9E91.4030009@...169...> Benoit, The IsXXX functions confused me because when testing IsNumber("123") I got an error similar to "Expected number got a string". It seems you needed to know the type before testing for it. I therefore do not use it. However I believe new versions of software should be backward compatible so I suggest giving the new functions a slightly different name. EG: IsNumeric. Regards Mike On 24/11/10 22:08, Beno?t Minisini wrote: > Hi, > > I'm currently thinking about modifying/removing all IsXXXX() functions in > Gambas 3. > > They mainly test the datatype of their expression. So, either the datatype is > known at compile time, and there should be no need of testing it ; either you > are using a Variant, and you can use TypeOf() to get the datatype of the > value. > > I will replace them by some functions that will test if a value can be > converted safely from a string by using localization. This is what most users > expected from these functions. > > For exemple, in french localization: > > IsDate("13/2/20") -> True > IsNumber("3,34") -> True > IsInteger("3,34") -> False > IsNumber("3.34") -> False > > Internally, they will use Val() and see if the conversion works. > > I will kept most of the name, so there will be a big incompatibility between > Gambas 2, current Gambas 3, and final Gambas 3. > > What do you think about that? > > Who is using the IsXXXX() functions, and in which context? > From gambas at ...1... Thu Nov 25 00:31:42 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Thu, 25 Nov 2010 00:31:42 +0100 Subject: [Gambas-user] isNull() In-Reply-To: <201011250824.49638.rterry@...1946...> References: <201011250824.49638.rterry@...1946...> Message-ID: <201011250031.42809.gambas@...1...> > I use IsNull extensively, is that going to be removed? > > richard > No. I use it extensively too. Here is the result of my thought: - You can know the datatype of a variant with the TypeOf() function. You don't have to use the current IsXXXX() functions. - But you often need to know if a string can be converted to a number, an integer, a float, a date. - You normally want to know that for localized strings get from the outside (i.e. the user). For non-localized strings, they are intern to your program, so you should know what you are doing. So: IsNull(x) -> kept its behaviour. IsInteger(x) -> If Val(x) returns an integer IsFloat(x) -> If Val(x) returns a float IsDate(x) -> If Val(x) returns a date They should be enough. But I could add: IsLong(x) -> If Val(x) returns a Long IsSingle(x) -> If Single(x) returns a Single. Regards, -- Beno?t Minisini From gambas at ...1... Thu Nov 25 00:33:33 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Thu, 25 Nov 2010 00:33:33 +0100 Subject: [Gambas-user] Removing / Modifying IsXXXX() functions in Gambas3 In-Reply-To: <4CED9E91.4030009@...169...> References: <201011241208.34100.gambas@...1...> <4CED9E91.4030009@...169...> Message-ID: <201011250033.33554.gambas@...1...> > Benoit, > The IsXXX functions confused me because when testing IsNumber("123") I > got an error similar to "Expected number got a string". It seems you > needed to know the type before testing for it. Yes. Not really useful, except with variants. > I therefore do not use > it. However I believe new versions of software should be backward > compatible so I suggest giving the new functions a slightly different > name. EG: IsNumeric. > Regards > Mike > I think I can be not backward compatible there, because nobody apparently uses this useless function. I don't want to keep these useless functions in the interpreter. Regards, -- Beno?t Minisini From ihaywood at ...1979... Thu Nov 25 05:09:42 2010 From: ihaywood at ...1979... (Ian Haywood) Date: Thu, 25 Nov 2010 15:09:42 +1100 Subject: [Gambas-user] Result object, again In-Reply-To: <201011242351.12809.gambas@...1...> References: <5a2d7358478beff1fc46df93f558f7de@...2510...> <30298482.post@...1379...> <4CED5E78.6000008@...20...> <201011242351.12809.gambas@...1...> Message-ID: 2010/11/25 Beno?t Minisini : >> good evening all, >> i have another question about my eternal punishment: the result object :-) >> >> caveat answered to a former question about results in general: >> ?>If you got into the habit of reading all the >> ?>records you've selected into memory (or even if the Result object >> ?>worked >> ?>that way behind the scenes...), you'd soon find everything breaking >with >> ?>Out Of Memory errors as soon as you start doing anything serious. >> >> my question now is, how the result works behind the scenes, is there a >> counter (result.index?) that tells a layer (the driver?) which record is >> to be given back? >> >> regards, >> tobi >> > > A result object stores the entire query of the result in memory, because of > the stupidity of most SQL backends. Postgresql definately supports cursors (being able to retrieve rows in groups and not hold them all in memory) Ian From austinium at ...43... Thu Nov 25 05:23:20 2010 From: austinium at ...43... (vikram) Date: Wed, 24 Nov 2010 20:23:20 -0800 (PST) Subject: [Gambas-user] Displaying Mouse.Wait while running a SHELL Command Message-ID: <316935.43858.qm@...2512...> > Setting FMain.Mouse and calling WAIT is useless. Application.Busy should > already set the busy cursor for every widget in the application. Otherwise > this is a bug. Application.Busy alone is not showing a busy pointer on Debian Squeeze, with Gambas 2.21. Regards, Vikram From dosida at ...626... Thu Nov 25 06:06:53 2010 From: dosida at ...626... (Dimitris Anogiatis) Date: Wed, 24 Nov 2010 22:06:53 -0700 Subject: [Gambas-user] Displaying Mouse.Wait while running a SHELL Command In-Reply-To: <316935.43858.qm@...2512...> References: <316935.43858.qm@...2512...> Message-ID: I use INC Application.Busy and DEC Application.Busy in my applications on Debian Lenny (with LXDE) and Gambas 2.21 and it works just fine. Regards, Dimitris On Wed, Nov 24, 2010 at 9:23 PM, vikram wrote: > > Setting FMain.Mouse and calling WAIT is useless. Application.Busy should > > already set the busy cursor for every widget in the application. > Otherwise > > this is a bug. > Application.Busy alone is not showing a busy pointer on Debian Squeeze, > with Gambas 2.21. > > Regards, > Vikram > > > > > > ------------------------------------------------------------------------------ > Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! > Tap into the largest installed PC base & get more eyes on your game by > optimizing for Intel(R) Graphics Technology. Get started today with the > Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. > http://p.sf.net/sfu/intelisp-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas.fr at ...626... Thu Nov 25 09:40:59 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Thu, 25 Nov 2010 09:40:59 +0100 Subject: [Gambas-user] isNull() In-Reply-To: <201011250031.42809.gambas@...1...> References: <201011250824.49638.rterry@...1946...> <201011250031.42809.gambas@...1...> Message-ID: Le 25 novembre 2010 00:31, Beno?t Minisini a ?crit : >> I use IsNull extensively, is that going to be removed? >> >> richard >> > > No. I use it extensively too. > > Here is the result of my thought: > > - You can know the datatype of a variant with the TypeOf() function. You don't > have to use the current IsXXXX() functions. > > - But you often need to know if a string can be converted to a number, an > integer, a float, a date. > > - You normally want to know that for localized strings get from the outside > (i.e. the user). For non-localized strings, they are intern to your program, > so you should know what you are doing. > > So: > > ? ? ? ?IsNull(x) -> kept its behaviour. > ? ? ? ?IsInteger(x) -> If Val(x) returns an integer > ? ? ? ?IsFloat(x) -> If Val(x) returns a float > ? ? ? ?IsDate(x) -> If Val(x) returns a date hum ... isBinary ? but how do you test if it's not ? i imagine it is taht : Function isFloat(Value as variant) as Float dim fValue as Float fValue = Val(Value) if not error then return fValue end but in the other side i need to test it :/ again if isFoat(Value) then print isFloat(Value) in fact there is not fabulous soluce as we need two thing, known if a convertion is possible with this datatype and then get the value. the only one soluce i see is the C way... with a byref value Function isFloat(Value as variant, Byref Ret as Float) as Boolean dim fValue as Float fValue = Val(Value) if not error then Ret = fValue Return True endif return end Dim fRet as Float If IsFloat(Value, ByRef fRet) then Print fRet > > They should be enough. But I could add: > > ? ? ? ?IsLong(x) -> If Val(x) returns a Long > ? ? ? ?IsSingle(x) -> If Single(x) returns a Single. > > Regards, > > -- > Beno?t Minisini > > ------------------------------------------------------------------------------ > Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! > Tap into the largest installed PC base & get more eyes on your game by > optimizing for Intel(R) Graphics Technology. Get started today with the > Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. > http://p.sf.net/sfu/intelisp-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Fabien Bodard From bbruen at ...2308... Thu Nov 25 10:13:54 2010 From: bbruen at ...2308... (Bruce Bruen) Date: Thu, 25 Nov 2010 19:43:54 +1030 Subject: [Gambas-user] isNull() In-Reply-To: <201011250031.42809.gambas@...1...> References: <201011250824.49638.rterry@...1946...> <201011250031.42809.gambas@...1...> Message-ID: <201011251943.55641.bbruen@...2308...> On Thu, 25 Nov 2010 10:01:42 am Beno?t Minisini wrote: > > I use IsNull extensively, is that going to be removed? > > > > richard > > No. I use it extensively too. > > Here is the result of my thought: > > - You can know the datatype of a variant with the TypeOf() function. You > don't have to use the current IsXXXX() functions. > > - But you often need to know if a string can be converted to a number, an > integer, a float, a date. > > - You normally want to know that for localized strings get from the outside > (i.e. the user). For non-localized strings, they are intern to your > program, so you should know what you are doing. > > So: > > IsNull(x) -> kept its behaviour. > IsInteger(x) -> If Val(x) returns an integer > IsFloat(x) -> If Val(x) returns a float > IsDate(x) -> If Val(x) returns a date > > They should be enough. But I could add: > > IsLong(x) -> If Val(x) returns a Long > IsSingle(x) -> If Single(x) returns a Single. > > Regards, Beno?t, I would like to see the generic IsNumber retained. When dealing with external data sources, i.e. data from an external system source not "a user" the content of data fields in a database can vary widely over time. In different eras, a particular column may have it's type changed in the source database system but the existent data remains undisturbed. Although it sounds weird, we often see data columns on mainframe and even on some PC based rdbms that have gone from a text (or char or varchar) to a numeric type, to a different numeric type and so forth. In these database systems, any new inserts or updates will conform to the current type definition. However, existing data is left as is. So if "booktype" was originally char(1), then became charvar then became a specific structured datatype (for example, some of the custom types provided for in postgresql), we still see instances of, say "A" being returned by the dbms for booktype. (The way we handle this is by way of our own postgresql "front end" database that accesses the remote dbms and returns text fields for any and all columns that contain suspect data types.) In the main, I don't care if the field contains an integer or a float (or a long or single etc) just that it contains a number and not any non-numeric data. I will worry about the representation after I have determined that it is a number. I realise that this is a fairly arcane use of gambas, but the speed that we can develop (and run) filters based on this approach is why I chose gambas in the first place. As I said, we use a 80-20 rule to get to the core issue of the data as soon as possible. The parsing filters get more and more complex for each 20% left over. So the ability to recognise "generic" datatypes in string values, "is it a number, good, then return true else start looking for other clues as to what it is supposed to represent ... does it look like it might be a date? If so then try to decipher the date structure, else does it look like a "known" construct (i.e IF wkstr LIKE "*(*%)*" then ...) etc etc. Oh, and by the way, I too use IsNull extensively, specifically to provide "lazy loads" of subordinate persisted objects, usually collections, whose content is not required unless specifically accessed. For example, a "Book" object may have a property which is an "Author" object. When the persisted book object is loaded from the database, the author object is not loaded until the program actually accesses the book.author property, viz PRIVATE FUNCTION MyAuthor() as Author if IsNull($myAuthor) $myAuthor=NEW Author $myAuthor.LoadDB(ME.AuthorName) endif RETURN $myAuthor END (obviously simplified to exclude error checking). -- best regards Bruce Bruen From gambas at ...1... Thu Nov 25 11:00:26 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Thu, 25 Nov 2010 11:00:26 +0100 Subject: [Gambas-user] isNull() In-Reply-To: <201011251943.55641.bbruen@...2308...> References: <201011250824.49638.rterry@...1946...> <201011250031.42809.gambas@...1...> <201011251943.55641.bbruen@...2308...> Message-ID: <201011251100.27079.gambas@...1...> > On Thu, 25 Nov 2010 10:01:42 am Beno?t Minisini wrote: > > > I use IsNull extensively, is that going to be removed? > > > > > > richard > > > > No. I use it extensively too. > > > > Here is the result of my thought: > > > > - You can know the datatype of a variant with the TypeOf() function. You > > don't have to use the current IsXXXX() functions. > > > > - But you often need to know if a string can be converted to a number, an > > integer, a float, a date. > > > > - You normally want to know that for localized strings get from the > > outside (i.e. the user). For non-localized strings, they are intern to > > your program, so you should know what you are doing. > > > > So: > > IsNull(x) -> kept its behaviour. > > IsInteger(x) -> If Val(x) returns an integer > > IsFloat(x) -> If Val(x) returns a float > > IsDate(x) -> If Val(x) returns a date > > > > They should be enough. But I could add: > > IsLong(x) -> If Val(x) returns a Long > > IsSingle(x) -> If Single(x) returns a Single. > > > > Regards, > > Beno?t, > > I would like to see the generic IsNumber retained. When dealing with > external data sources, i.e. data from an external system source not "a > user" the content of data fields in a database can vary widely over time. > In different eras, a particular column may have it's type changed in the > source database system but the existent data remains undisturbed. > > Although it sounds weird, we often see data columns on mainframe and even > on some PC based rdbms that have gone from a text (or char or varchar) to > a numeric type, to a different numeric type and so forth. In these > database systems, any new inserts or updates will conform to the current > type definition. However, existing data is left as is. > > So if "booktype" was originally char(1), then became charvar then became a > specific structured datatype (for example, some of the custom types > provided for in postgresql), we still see instances of, say "A" being > returned by the dbms for booktype. (The way we handle this is by way of > our own postgresql "front end" database that accesses the remote dbms and > returns text fields for any and all columns that contain suspect data > types.) > > In the main, I don't care if the field contains an integer or a float (or a > long or single etc) just that it contains a number and not any non-numeric > data. I will worry about the representation after I have determined that > it is a number. > > I realise that this is a fairly arcane use of gambas, but the speed that we > can develop (and run) filters based on this approach is why I chose gambas > in the first place. As I said, we use a 80-20 rule to get to the core > issue of the data as soon as possible. The parsing filters get more and > more complex for each 20% left over. So the ability to recognise > "generic" datatypes in string values, "is it a number, good, then return > true else start looking for other clues as to what it is supposed to > represent ... does it look like it might be a date? If so then try to > decipher the date structure, else does it look like a "known" construct > (i.e IF wkstr LIKE "*(*%)*" then ...) etc etc. > > > Oh, and by the way, I too use IsNull extensively, specifically to provide > "lazy loads" of subordinate persisted objects, usually collections, whose > content is not required unless specifically accessed. For example, a > "Book" object may have a property which is an "Author" object. When the > persisted book object is loaded from the database, the author object is > not loaded until the program actually accesses the book.author property, > viz > > PRIVATE FUNCTION MyAuthor() as Author > if IsNull($myAuthor) > $myAuthor=NEW Author > $myAuthor.LoadDB(ME.AuthorName) > endif > RETURN $myAuthor > END > > (obviously simplified to exclude error checking). You must check the datatype of a column by using Result.Fields["xxx"].Type, not by using IsXXXX() on the value. Or if really you don't want, use TypeOf(). Anyway, in my list, IsFloat() does what you want IsNumber() to do, as there is no number higher than Float in the Gambas number hierarchy. Regards, -- Beno?t Minisini From gambas at ...1... Thu Nov 25 11:01:56 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Thu, 25 Nov 2010 11:01:56 +0100 Subject: [Gambas-user] Result object, again In-Reply-To: References: <5a2d7358478beff1fc46df93f558f7de@...2510...> <201011242351.12809.gambas@...1...> Message-ID: <201011251101.56928.gambas@...1...> > 2010/11/25 Beno?t Minisini : > >> good evening all, > >> i have another question about my eternal punishment: the result object > >> :-) > >> > >> caveat answered to a former question about results in general: > >> >If you got into the habit of reading all the > >> >records you've selected into memory (or even if the Result object > >> >worked > >> >that way behind the scenes...), you'd soon find everything breaking > >> >with >Out Of Memory errors as soon as you start doing anything > >> serious. > >> > >> my question now is, how the result works behind the scenes, is there a > >> counter (result.index?) that tells a layer (the driver?) which record is > >> to be given back? > >> > >> regards, > >> tobi > > > > A result object stores the entire query of the result in memory, because > > of the stupidity of most SQL backends. > > Postgresql definately supports cursors (being able to retrieve rows in > groups and not hold them all in memory) > > Ian > Maybe all database backends have their specific way of not holding the full result in memory, I don't know. Anyway, all these SQL backends are stupid, that should be completely transparent. Regards, -- Beno?t Minisini From gambas at ...1... Thu Nov 25 11:09:31 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Thu, 25 Nov 2010 11:09:31 +0100 Subject: [Gambas-user] Displaying Mouse.Wait while running a SHELL Command In-Reply-To: References: <316935.43858.qm@...2512...> Message-ID: <201011251109.31094.gambas@...1...> > I use > > INC Application.Busy > > and > > DEC Application.Busy > > in my applications on Debian Lenny (with LXDE) > and Gambas 2.21 and it works just fine. > > Regards, > Dimitris > > On Wed, Nov 24, 2010 at 9:23 PM, vikram wrote: > > > Setting FMain.Mouse and calling WAIT is useless. Application.Busy > > > should already set the busy cursor for every widget in the > > > application. > > > > Otherwise > > > > > this is a bug. > > > > Application.Busy alone is not showing a busy pointer on Debian Squeeze, > > with Gambas 2.21. > > > > Regards, > > Vikram > > > > I see: with gb.gtk, Application.Busy > 0 works only if the event loop is run just after (i.e. you call WAIT just after INC Application.Busy). No idea why, I will look at that... -- Beno?t Minisini From demosthenesk at ...626... Thu Nov 25 13:04:48 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Thu, 25 Nov 2010 14:04:48 +0200 Subject: [Gambas-user] Rnd Wiki Message-ID: <1290686688.7831.4.camel@...2493...> In wiki the page http://gambasdoc.org/help/lang/rnd?show i think in these parts is hard read. * If no parameters is specified, returns a pseudo-random number in the interval [ 0 , 1 [. * If the one parameter is specified, returns a pseudo-random in the interval [ 0 , Min [. * If the two parameters are specified, returns a pseudo-random in the interval [ Min , Max [. I think you mean: * If no parameters is specified the defaults are Min=0, Max=1, returns a pseudo-random number in the interval [ 0 , 1 ]. * If the one parameter is specified it is Max value, returns a pseudo-random in the interval [ 0 , Max ]. * If the two parameters are specified they are Min, Max values, returns a pseudo-random in the interval [ Min , Max ]. Am i right? As i see in example that i understand. -- Regards, Demosthenes Koptsis. From gambas at ...1... Thu Nov 25 13:10:17 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Thu, 25 Nov 2010 13:10:17 +0100 Subject: [Gambas-user] Rnd Wiki In-Reply-To: <1290686688.7831.4.camel@...2493...> References: <1290686688.7831.4.camel@...2493...> Message-ID: <201011251310.17386.gambas@...1...> > In wiki the page http://gambasdoc.org/help/lang/rnd?show > > i think in these parts is hard read. > > * If no parameters is specified, returns a pseudo-random number in the > interval [ 0 , 1 [. > * If the one parameter is specified, returns a pseudo-random in the > interval [ 0 , Min [. > * If the two parameters are specified, returns a pseudo-random in the > interval [ Min , Max [. > > I think you mean: > > * If no parameters is specified the defaults are Min=0, Max=1, returns a > pseudo-random number in the > interval [ 0 , 1 ]. > * If the one parameter is specified it is Max value, returns a > pseudo-random in the interval [ 0 , Max ]. > * If the two parameters are specified they are Min, Max values, > returns a pseudo-random in the interval [ Min , Max ]. > > Am i right? > > As i see in example that i understand. Yes, except that the higher born of the interval is never returned. I have fixed the bad english in the wiki page. Regards, -- Beno?t Minisini From demosthenesk at ...626... Thu Nov 25 13:26:54 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Thu, 25 Nov 2010 14:26:54 +0200 Subject: [Gambas-user] Rnd Wiki In-Reply-To: <201011251310.17386.gambas@...1...> References: <1290686688.7831.4.camel@...2493...> <201011251310.17386.gambas@...1...> Message-ID: <1290688014.7831.8.camel@...2493...> For one parameter you still have * If only one parameter is specified, returns a pseudo-random in the interval [ 0 , Min [. i think is * If only one parameter is specified, returns a pseudo-random in the interval [ 0 , Max [. and something else what does it mean 0, Max [. ? isn't it [0, Max] ? On Thu, 2010-11-25 at 13:10 +0100, Beno?t Minisini wrote: > > In wiki the page http://gambasdoc.org/help/lang/rnd?show > > > > i think in these parts is hard read. > > > > * If no parameters is specified, returns a pseudo-random number in the > > interval [ 0 , 1 [. > > * If the one parameter is specified, returns a pseudo-random in the > > interval [ 0 , Min [. > > * If the two parameters are specified, returns a pseudo-random in the > > interval [ Min , Max [. > > > > I think you mean: > > > > * If no parameters is specified the defaults are Min=0, Max=1, returns a > > pseudo-random number in the > > interval [ 0 , 1 ]. > > * If the one parameter is specified it is Max value, returns a > > pseudo-random in the interval [ 0 , Max ]. > > * If the two parameters are specified they are Min, Max values, > > returns a pseudo-random in the interval [ Min , Max ]. > > > > Am i right? > > > > As i see in example that i understand. > > Yes, except that the higher born of the interval is never returned. > > I have fixed the bad english in the wiki page. > > Regards, > -- Regards, Demosthenes Koptsis. From gambas at ...1... Thu Nov 25 13:28:25 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Thu, 25 Nov 2010 13:28:25 +0100 Subject: [Gambas-user] Rnd Wiki In-Reply-To: <1290688014.7831.8.camel@...2493...> References: <1290686688.7831.4.camel@...2493...> <201011251310.17386.gambas@...1...> <1290688014.7831.8.camel@...2493...> Message-ID: <201011251328.25717.gambas@...1...> > For one parameter you still have > > * If only one parameter is specified, returns a pseudo-random in the > interval [ 0 , Min [. > > i think is > > * If only one parameter is specified, returns a pseudo-random in the > interval [ 0 , Max [. > > and something else what does it mean > 0, Max [. > ? > > isn't it [0, Max] ? > No, as _Min_ is the first argument. -- Beno?t Minisini From demosthenesk at ...626... Thu Nov 25 13:35:48 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Thu, 25 Nov 2010 14:35:48 +0200 Subject: [Gambas-user] Rnd Wiki In-Reply-To: <201011251328.25717.gambas@...1...> References: <1290686688.7831.4.camel@...2493...> <201011251310.17386.gambas@...1...> <1290688014.7831.8.camel@...2493...> <201011251328.25717.gambas@...1...> Message-ID: <1290688548.7831.12.camel@...2493...> Yes the first argument is the Min and the second is the Max. But if i pass one argument PRINT Rnd(2) this is equal PRINT Rnd(0, 2) so one argument is the Max parameter and the range is [0, 2] where 2=Max in example that is said ' Between 0 and 2 PRINT Rnd(2) so * If only one parameter is specified, returns a pseudo-random in the interval [ 0 , Max] What did i understand wrong? On Thu, 2010-11-25 at 13:28 +0100, Beno?t Minisini wrote: > > For one parameter you still have > > > > * If only one parameter is specified, returns a pseudo-random in the > > interval [ 0 , Min [. > > > > i think is > > > > * If only one parameter is specified, returns a pseudo-random in the > > interval [ 0 , Max [. > > > > and something else what does it mean > > 0, Max [. > > ? > > > > isn't it [0, Max] ? > > > > No, as _Min_ is the first argument. > -- Regards, Demosthenes Koptsis. From soleilpqd at ...626... Thu Nov 25 13:49:45 2010 From: soleilpqd at ...626... (=?UTF-8?B?UGjhuqFtIFF1YW5nIETGsMahbmc=?=) Date: Thu, 25 Nov 2010 19:49:45 +0700 Subject: [Gambas-user] Question about read/write file performance Message-ID: Hi, Maybe this is a basic question. I have 2 scripts like this: Code 1: Dim buff as *Byte* sizeOfFile = Stat("aBigFile").Size hFile = Open "aBigFile" for read For i = 1 to sizeOfFile Read hFile, buff Next Close hFile Code 2: Dim buff as *Byte* Dim bigBuff as *Float* sizeOfFile = Stat("aBigFile").Size hFile = Open "aBigFile" for read For i = 1 to sizeOfFile / 8 Read hFile, bigBuff Next For i = 1 to sizeOfFile MOD 8 Read hFile, buff Next Close hFile Code 1 take t1 time unit to finish, code 2 is t2. Are t1, t2 different? Which can be faster? From gambas.fr at ...626... Thu Nov 25 14:26:12 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Thu, 25 Nov 2010 14:26:12 +0100 Subject: [Gambas-user] Rnd Wiki In-Reply-To: <1290688548.7831.12.camel@...2493...> References: <1290686688.7831.4.camel@...2493...> <201011251310.17386.gambas@...1...> <1290688014.7831.8.camel@...2493...> <201011251328.25717.gambas@...1...> <1290688548.7831.12.camel@...2493...> Message-ID: if i wrote that like a function ... rnd(min as float, max as float) the variable named min don't change his name i think benoit should take others name than min/max val1/val2 ? Float = Rnd ( [ Val1 [ , Val2 ] ) * If no parameters is specified, returns a pseudo-random number in the interval [ 0 , 1 [. * If only one parameter is specified it is Max value, returns a pseudo-random in the interval [ 0 , Val1 [. * If the two parameters are specified they are Min, Max values, returns a pseudo-random in the interval [ Val1 , Val2 ]. -- Fabien Bodard From demosthenesk at ...626... Thu Nov 25 15:01:14 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Thu, 25 Nov 2010 16:01:14 +0200 Subject: [Gambas-user] Rnd Wiki In-Reply-To: References: <1290686688.7831.4.camel@...2493...> <201011251310.17386.gambas@...1...> <1290688014.7831.8.camel@...2493...> <201011251328.25717.gambas@...1...> <1290688548.7831.12.camel@...2493...> Message-ID: <1290693674.9449.8.camel@...2493...> On Thu, 2010-11-25 at 14:26 +0100, Fabien Bodard wrote: > if i wrote that like a function ... > > rnd(min as float, max as float) > > the variable named min don't change his name > > i think benoit should take others name than min/max i am not confused about min, max, i understand that these are the lower limit and upper limit of range min-max. That's ok. > > val1/val2 ? > > Float = Rnd ( [ Val1 [ , Val2 ] ) > > > * If no parameters is specified, returns a pseudo-random number in the > interval [ 0 , 1 [. > > * If only one parameter is specified it is Max value, returns a > pseudo-random in the > interval [ 0 , Val1 [. ok one paramater is the max value! at this point i see in wiki this If only one parameter is specified, returns a pseudo-random in the interval [ 0 , Min [. it confuses me that [ 0 , Min [. i understand it better as range [0 - Max] or in your example range [0, Val2] not Val1. Because the lower limit is Min=0 and upper limit is Max=Val2. Example ' Between 0 and 2 PRINT Rnd(2) Min=0, Max=2 Val1=0, Val2=2 it is equal PRINT Rnd(0, 2) Min=0, Max=2 Val1=0, Val2=2 > * If the two parameters are specified they are Min, Max values, > returns a pseudo-random in the interval [ Val1 , Val2 ]. > > > -- > Fabien Bodard > > ------------------------------------------------------------------------------ > Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! > Tap into the largest installed PC base & get more eyes on your game by > optimizing for Intel(R) Graphics Technology. Get started today with the > Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. > http://p.sf.net/sfu/intelisp-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user -- Regards, Demosthenes Koptsis. From oceanosoftlapalma at ...626... Thu Nov 25 16:45:23 2010 From: oceanosoftlapalma at ...626... (=?ISO-8859-1?Q?Ricardo_D=EDaz_Mart=EDn?=) Date: Thu, 25 Nov 2010 16:45:23 +0100 Subject: [Gambas-user] DateBox/DateChoose - numbers on calendar all the same In-Reply-To: <201011232236.54616.rterry@...1946...> References: <201011232236.54616.rterry@...1946...> Message-ID: I got the same problem with calendar control. Now I'm updating gambas3 from svn. I'm going to try new version if the bug is fixed. Regards, Ricardo D?az 2010/11/23 richard terry > Hi List > > ?Just my machine, but for some reason in my last update there all the days > of > the mont h are '31' > > any ideas? > > Richard > > > ------------------------------------------------------------------------------ > Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! > Tap into the largest installed PC base & get more eyes on your game by > optimizing for Intel(R) Graphics Technology. Get started today with the > Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. > http://p.sf.net/sfu/intelisp-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From oceanosoftlapalma at ...626... Thu Nov 25 16:53:56 2010 From: oceanosoftlapalma at ...626... (=?ISO-8859-1?Q?Ricardo_D=EDaz_Mart=EDn?=) Date: Thu, 25 Nov 2010 16:53:56 +0100 Subject: [Gambas-user] DateBox/DateChoose - numbers on calendar all the same In-Reply-To: References: <201011232236.54616.rterry@...1946...> Message-ID: Works fine in 3321. Regards, Ricardo D?az 2010/11/25 Ricardo D?az Mart?n > I got the same problem with calendar control. Now I'm updating gambas3 from > svn. I'm going to try new version if the bug is fixed. > > Regards, > Ricardo D?az > > > > 2010/11/23 richard terry > > Hi List >> >> ?Just my machine, but for some reason in my last update there all the days >> of >> the mont h are '31' >> >> any ideas? >> >> Richard >> >> >> ------------------------------------------------------------------------------ >> Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! >> Tap into the largest installed PC base & get more eyes on your game by >> optimizing for Intel(R) Graphics Technology. Get started today with the >> Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. >> http://p.sf.net/sfu/intelisp-dev2dev >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > From demosthenesk at ...626... Thu Nov 25 17:03:07 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Thu, 25 Nov 2010 18:03:07 +0200 Subject: [Gambas-user] Rnd Wiki In-Reply-To: References: <1290686688.7831.4.camel@...2493...> <201011251310.17386.gambas@...1...> <1290688014.7831.8.camel@...2493...> <201011251328.25717.gambas@...1...> <1290688548.7831.12.camel@...2493...> Message-ID: <1290700987.9588.9.camel@...2493...> hm... i think i have got it. The function accepts two parameters Rnd ( [ Min [ , Max ] ) the Min param and the Max param. if we pass only one param it takes as first argument, so it is the Min argument BUT BUT BUT... it uses it as Max value, as upper limit, because the lower limit by default is 0 !!! so the range is [0, Min] !!! same to say the range is [0, Argument1] Is that really happen ??? If this is the point it is really very strange to understand it for me at least because suddenly the Min word became Max limit. On Thu, 2010-11-25 at 14:26 +0100, Fabien Bodard wrote: > if i wrote that like a function ... > > rnd(min as float, max as float) > > the variable named min don't change his name > > i think benoit should take others name than min/max > > > val1/val2 ? > > Float = Rnd ( [ Val1 [ , Val2 ] ) > > > * If no parameters is specified, returns a pseudo-random number in the > interval [ 0 , 1 [. > > * If only one parameter is specified it is Max value, returns a > pseudo-random in the > interval [ 0 , Val1 [. > > * If the two parameters are specified they are Min, Max values, > returns a pseudo-random in the interval [ Val1 , Val2 ]. > > > -- > Fabien Bodard > > ------------------------------------------------------------------------------ > Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! > Tap into the largest installed PC base & get more eyes on your game by > optimizing for Intel(R) Graphics Technology. Get started today with the > Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. > http://p.sf.net/sfu/intelisp-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user -- Regards, Demosthenes Koptsis. From demosthenesk at ...626... Thu Nov 25 17:24:46 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Thu, 25 Nov 2010 18:24:46 +0200 Subject: [Gambas-user] Rnd Wiki In-Reply-To: References: <1290686688.7831.4.camel@...2493...> <201011251310.17386.gambas@...1...> <1290688014.7831.8.camel@...2493...> <201011251328.25717.gambas@...1...> <1290688548.7831.12.camel@...2493...> Message-ID: <1290702286.9588.17.camel@...2493...> I wrote something that i think describes better the Rnd(). If you like it you can use or modify it for the wiki. ------------------------------------------------------------------------ Float = Rnd ( [ Min [ , Max ] ) Compute a pseudo-random floating point number between a lower Min limit value and an upper Max limit value. # If no parameters is specified the default value for lower limit, Min, is 0 and for upper limit, Max, is 1. The function returns a pseudo-random number in the interval [ 0 , 1 ]. # If only one parameter is specified this parameter is used as the upper limit, so argument1, Min will be used as upper limit. The lower limit is by default 0. The function returns a pseudo-random in the interval [ 0 , Min ]. # If both parameters are specified, Min is the lower limit and Max the upper limit. The function returns a pseudo-random in the interval [ Min , Max ]. Note that the higher born of the interval is never returned. .... ------------------------------------------------------------------------ On Thu, 2010-11-25 at 14:26 +0100, Fabien Bodard wrote: > if i wrote that like a function ... > > rnd(min as float, max as float) > > the variable named min don't change his name > > i think benoit should take others name than min/max > > > val1/val2 ? > > Float = Rnd ( [ Val1 [ , Val2 ] ) > > > * If no parameters is specified, returns a pseudo-random number in the > interval [ 0 , 1 [. > > * If only one parameter is specified it is Max value, returns a > pseudo-random in the > interval [ 0 , Val1 [. > > * If the two parameters are specified they are Min, Max values, > returns a pseudo-random in the interval [ Val1 , Val2 ]. > > > -- > Fabien Bodard > > ------------------------------------------------------------------------------ > Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! > Tap into the largest installed PC base & get more eyes on your game by > optimizing for Intel(R) Graphics Technology. Get started today with the > Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. > http://p.sf.net/sfu/intelisp-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user -- Regards, Demosthenes Koptsis. From tobiasboe1 at ...20... Thu Nov 25 20:06:47 2010 From: tobiasboe1 at ...20... (tobias) Date: Thu, 25 Nov 2010 20:06:47 +0100 Subject: [Gambas-user] Result object, again In-Reply-To: <201011242351.12809.gambas@...1...> References: <5a2d7358478beff1fc46df93f558f7de@...2510...> <30298482.post@...1379...> <4CED5E78.6000008@...20...> <201011242351.12809.gambas@...1...> Message-ID: <4CEEB3C7.2070701@...20...> Beno?t Minisini schrieb: >> good evening all, >> i have another question about my eternal punishment: the result object :-) >> >> caveat answered to a former question about results in general: >> >If you got into the habit of reading all the >> >records you've selected into memory (or even if the Result object >> >worked >> >that way behind the scenes...), you'd soon find everything breaking >with >> >Out Of Memory errors as soon as you start doing anything serious. >> >> my question now is, how the result works behind the scenes, is there a >> counter (result.index?) that tells a layer (the driver?) which record is >> to be given back? >> >> regards, >> tobi >> > > A result object stores the entire query of the result in memory, because of > the stupidity of most SQL backends. > > The gb.db.form implements a system that only keep a small part of the query > result, by using the ">" operator on the table key, "Order By", and the > Limit() method. That way, you can use a DataBrowser to browse a table that is > located on a far server easily. > > Regards, > thank you! but at the moment, i don't think about the db related controls... ok, so the result stores just the query in memory and on demand, it loads the next (according to Result.Index) result entry, right? is there another internal pointer? i hopefully finish my research paper (dict.cc told me that this is a good word for it :-) ) the next days, i think, it would be found then somewhere at gambas-club.de or gambas-projekt.de ... regards, tobi From tobiasboe1 at ...20... Thu Nov 25 21:28:22 2010 From: tobiasboe1 at ...20... (tobias) Date: Thu, 25 Nov 2010 21:28:22 +0100 Subject: [Gambas-user] Primary Key missing? Message-ID: <4CEEC6E6.3010204@...20...> hello, prooving my sqlite code, i have several buttons on a form, whose subs should do the same work in different ways (one just using Exec() method, the other does all work with the gambas objects (editing fields etc.)). after this code: Button2_Click: DIM hResult AS Result hConnection.Exec("create table test(id integer primary key, name varchar(10));") hConnection.Exec("insert into test(name) values(\"Aaron\");") hConnection.Exec("insert into test(name) values('Zacharias');") '1|Aaron '2|Zacharias i have another button which should edit this table: DIM hResult AS Result hResult = hConnection.Edit("test", "name=&1", "Aaron") hResult["name"] = "Adam" hResult.Update() but in the line where the Edit()-function is used, i get the error that there is no primary key in my table but didn't i specify one creating the table? by the way... i found that i wasn't able to even find a command to edit a record in terminal; i wanted to proof if the sqlite3 program with the same commands would tell me the same... regards, tobi From rterry at ...1946... Thu Nov 25 23:12:11 2010 From: rterry at ...1946... (richard terry) Date: Fri, 26 Nov 2010 09:12:11 +1100 Subject: [Gambas-user] Fresh machine, fresh gambas - won't run Message-ID: <201011260912.11254.rterry@...1946...> Hi LIst Any ideas on this. Downloade fresh svn on fresh machine, compiled ok When try and run gambas get message: no project file in /usr/local/bin/gambas3 and nothing happens Any help appreciated richard From gambas at ...1... Thu Nov 25 23:20:04 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Thu, 25 Nov 2010 23:20:04 +0100 Subject: [Gambas-user] Fresh machine, fresh gambas - won't run In-Reply-To: <201011260912.11254.rterry@...1946...> References: <201011260912.11254.rterry@...1946...> Message-ID: <201011252320.04546.gambas@...1...> > Hi LIst > > Any ideas on this. > > Downloade fresh svn on fresh machine, compiled ok > > When try and run gambas get message: > > no project file in /usr/local/bin/gambas3 > > and nothing happens > > Any help appreciated > > richard > Need more info! Full output of the compilation and installation process, distribution, and the contents of /usr/local/bin. Regards, -- Beno?t Minisini From rterry at ...1946... Thu Nov 25 23:17:31 2010 From: rterry at ...1946... (richard terry) Date: Fri, 26 Nov 2010 09:17:31 +1100 Subject: [Gambas-user] DateBox/DateChoose - numbers on calendar all the same In-Reply-To: References: <201011232236.54616.rterry@...1946...> Message-ID: <201011260917.31064.rterry@...1946...> On Friday 26 November 2010 02:45:23 Ricardo D?az Mart?n wrote: seems fixed in the latest update richard > I got the same problem with calendar control. Now I'm updating gambas3 from > svn. I'm going to try new version if the bug is fixed. > > Regards, > Ricardo D?az > > > > 2010/11/23 richard terry > > > Hi List > > > > ?Just my machine, but for some reason in my last update there all the > > days of > > the mont h are '31' > > > > any ideas? > > > > Richard > > > > > > ------------------------------------------------------------------------- > >----- Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! > > Tap into the largest installed PC base & get more eyes on your game by > > optimizing for Intel(R) Graphics Technology. Get started today with the > > Intel(R) Software Partner Program. Five $500 cash prizes are up for > > grabs. http://p.sf.net/sfu/intelisp-dev2dev > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > --------------------------------------------------------------------------- > --- Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! > Tap into the largest installed PC base & get more eyes on your game by > optimizing for Intel(R) Graphics Technology. Get started today with the > Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. > http://p.sf.net/sfu/intelisp-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From shordi at ...626... Thu Nov 25 23:56:11 2010 From: shordi at ...626... (=?ISO-8859-1?Q?Jorge_Carri=F3n?=) Date: Thu, 25 Nov 2010 23:56:11 +0100 Subject: [Gambas-user] Primary Key missing? In-Reply-To: <4CEEC6E6.3010204@...20...> References: <4CEEC6E6.3010204@...20...> Message-ID: Try with sqliteman (Ubuntu repositories). It's a graphic environment good enough for that operations... For edit a record in terminal you have to use alter table command... Good Luck. 2010/11/25 tobias > hello, > > prooving my sqlite code, i have several buttons on a form, whose subs > should do the same work in different ways (one just using Exec() method, > the other does all work with the gambas objects (editing fields etc.)). > > after this code: > > Button2_Click: > > DIM hResult AS Result > > hConnection.Exec("create table test(id integer primary key, name > varchar(10));") > hConnection.Exec("insert into test(name) values(\"Aaron\");") > hConnection.Exec("insert into test(name) values('Zacharias');") > > '1|Aaron > '2|Zacharias > > i have another button which should edit this table: > > DIM hResult AS Result > > hResult = hConnection.Edit("test", "name=&1", "Aaron") > hResult["name"] = "Adam" > hResult.Update() > > > but in the line where the Edit()-function is used, i get the error that > there is no primary key in my table but didn't i specify one creating > the table? > > by the way... i found that i wasn't able to even find a command to edit > a record in terminal; i wanted to proof if the sqlite3 program with the > same commands would tell me the same... > > regards, > tobi > > > ------------------------------------------------------------------------------ > Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! > Tap into the largest installed PC base & get more eyes on your game by > optimizing for Intel(R) Graphics Technology. Get started today with the > Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. > http://p.sf.net/sfu/intelisp-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas at ...1... Fri Nov 26 00:03:59 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Fri, 26 Nov 2010 00:03:59 +0100 Subject: [Gambas-user] Primary Key missing? In-Reply-To: <4CEEC6E6.3010204@...20...> References: <4CEEC6E6.3010204@...20...> Message-ID: <201011260003.59265.gambas@...1...> > hello, > > prooving my sqlite code, i have several buttons on a form, whose subs > should do the same work in different ways (one just using Exec() method, > the other does all work with the gambas objects (editing fields etc.)). > > after this code: > > Button2_Click: > > DIM hResult AS Result > > hConnection.Exec("create table test(id integer primary key, name > varchar(10));") > hConnection.Exec("insert into test(name) values(\"Aaron\");") > hConnection.Exec("insert into test(name) values('Zacharias');") > > '1|Aaron > '2|Zacharias > > i have another button which should edit this table: > > DIM hResult AS Result > > hResult = hConnection.Edit("test", "name=&1", "Aaron") > hResult["name"] = "Adam" > hResult.Update() > > > but in the line where the Edit()-function is used, i get the error that > there is no primary key in my table but didn't i specify one creating > the table? > > by the way... i found that i wasn't able to even find a command to edit > a record in terminal; i wanted to proof if the sqlite3 program with the > same commands would tell me the same... > > regards, > tobi > The syntax I know for sqlite is: create table test(id integer, name varchar(10), primary key(id)) Try to create table by using the Table class, and not the Exec() method. Otherwise, send me your sqlite database so that I look at it. Regards, -- Beno?t Minisini From Gambas at ...1950... Fri Nov 26 09:24:23 2010 From: Gambas at ...1950... (Caveat) Date: Fri, 26 Nov 2010 09:24:23 +0100 Subject: [Gambas-user] Primary Key missing? In-Reply-To: <201011260003.59265.gambas@...1...> References: <4CEEC6E6.3010204@...20...> <201011260003.59265.gambas@...1...> Message-ID: <1290759863.27279.6.camel@...2479...> > hConnection.Exec("create table test(id integer primary key, name > varchar(10));") > didn't i specify one creating > the table? Yes, you did indeed. You specified id. :-) So I'm wondering whether your Edit might not work better if you were to try: hResult = hConnection.Edit("test", "id=&1", 1) hResult["name"] = "Adam" hResult.Update hResult.Commit Regards, Caveat From Gambas at ...1950... Fri Nov 26 09:42:03 2010 From: Gambas at ...1950... (Caveat) Date: Fri, 26 Nov 2010 09:42:03 +0100 Subject: [Gambas-user] Primary Key missing? In-Reply-To: <201011260003.59265.gambas@...1...> References: <4CEEC6E6.3010204@...20...> <201011260003.59265.gambas@...1...> Message-ID: <1290760923.27279.13.camel@...2479...> > by the way... i found that i wasn't able to even find a command to edit > > a record in terminal; i wanted to proof if the sqlite3 program with the > > same commands would tell me the same... > Use sqlite, specify the name of the database on the command line... $ sqlite mytest.db SQLite version 2.8.17 Enter ".help" for instructions sqlite> create table test(id integer primary key, name text); sqlite> insert into test (id, name) values (1, "Aaron"); sqlite> insert into test (id, name) values (2, "Zacharias"); sqlite> select * from test; 1|Aaron 2|Zacharias sqlite> update test set name = "Adam" where id = 1; sqlite> select * from test; 1|Adam 2|Zacharias sqlite> .quit $ If you don't have sqlite installed, it'll moan at you: $ sqlite The program 'sqlite' is currently not installed. You can install it by typing: sudo apt-get install sqlite So, do as it says (this is Ubuntu, ymmv): $ sudo apt-get install sqlite Regards, Caveat On Fri, 2010-11-26 at 00:03 +0100, Beno?t Minisini wrote: > > hello, > > > > prooving my sqlite code, i have several buttons on a form, whose subs > > should do the same work in different ways (one just using Exec() method, > > the other does all work with the gambas objects (editing fields etc.)). > > > > after this code: > > > > Button2_Click: > > > > DIM hResult AS Result > > > > hConnection.Exec("create table test(id integer primary key, name > > varchar(10));") > > hConnection.Exec("insert into test(name) values(\"Aaron\");") > > hConnection.Exec("insert into test(name) values('Zacharias');") > > > > '1|Aaron > > '2|Zacharias > > > > i have another button which should edit this table: > > > > DIM hResult AS Result > > > > hResult = hConnection.Edit("test", "name=&1", "Aaron") > > hResult["name"] = "Adam" > > hResult.Update() > > > > > > but in the line where the Edit()-function is used, i get the error that > > there is no primary key in my table but didn't i specify one creating > > the table? > > > > by the way... i found that i wasn't able to even find a command to edit > > a record in terminal; i wanted to proof if the sqlite3 program with the > > same commands would tell me the same... > > > > regards, > > tobi > > > > The syntax I know for sqlite is: > > create table test(id integer, name varchar(10), primary key(id)) > > Try to create table by using the Table class, and not the Exec() method. > > Otherwise, send me your sqlite database so that I look at it. > > Regards, > From Gambas at ...1950... Fri Nov 26 09:47:59 2010 From: Gambas at ...1950... (Caveat) Date: Fri, 26 Nov 2010 09:47:59 +0100 Subject: [Gambas-user] Result object, again In-Reply-To: <4CEEB3C7.2070701@...20...> References: <5a2d7358478beff1fc46df93f558f7de@...2510...> <30298482.post@...1379...> <4CED5E78.6000008@...20...> <201011242351.12809.gambas@...1...> <4CEEB3C7.2070701@...20...> Message-ID: <1290761279.27279.18.camel@...2479...> On Thu, 2010-11-25 at 20:06 +0100, tobias wrote: > > A result object stores the entire query of the result in memory, > because of > > the stupidity of most SQL backends. Hmmm, I'd take that statement with a grain of salt. When working on databases at work, I think we'd have soon run into major problems if this were true. Perhaps the difference is that the databases I'd use at work would be DB2, Oracle etc. running either on the mainframe (yes, they still exist!) or big servers. We wouldn't have used any 'toy' databases like access, sqlite etc. But you gotta love sqlite for its simplicity, access for it's user-friendliness... lol And, sadly enough, we never used Gambas for any project at work :-( Regards, Caveat From gambas at ...1... Fri Nov 26 11:29:50 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Fri, 26 Nov 2010 11:29:50 +0100 Subject: [Gambas-user] Result object, again In-Reply-To: <1290761279.27279.18.camel@...2479...> References: <5a2d7358478beff1fc46df93f558f7de@...2510...> <4CEEB3C7.2070701@...20...> <1290761279.27279.18.camel@...2479...> Message-ID: <201011261129.50725.gambas@...1...> > On Thu, 2010-11-25 at 20:06 +0100, tobias wrote: > > > A result object stores the entire query of the result in memory, > > > > because of > > > > > the stupidity of most SQL backends. > > Hmmm, I'd take that statement with a grain of salt. When working on > databases at work, I think we'd have soon run into major problems if > this were true. Perhaps the difference is that the databases I'd use at > work would be DB2, Oracle etc. running either on the mainframe (yes, > they still exist!) or big servers. We wouldn't have used any 'toy' > databases like access, sqlite etc. But you gotta love sqlite for its > simplicity, access for it's user-friendliness... lol > > And, sadly enough, we never used Gambas for any project at work :-( > > Regards, > Caveat > The problem is not actually in the servers, but in the client libraries. They are usually not as clever as they should be. Regards, -- Beno?t Minisini From soleilpqd at ...626... Fri Nov 26 14:25:49 2010 From: soleilpqd at ...626... (=?UTF-8?B?UGjhuqFtIFF1YW5nIETGsMahbmc=?=) Date: Fri, 26 Nov 2010 20:25:49 +0700 Subject: [Gambas-user] Convert path of drop file Message-ID: Hi, I try to get input file by drag and drop file from Nautilus onto my form. But the path that I got is HTML format, so I have trouble with the path including space or unicode characters. How to convert this path to normal path so I can work with OPEN statement. From gambas at ...1... Fri Nov 26 14:32:16 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Fri, 26 Nov 2010 14:32:16 +0100 Subject: [Gambas-user] Convert path of drop file In-Reply-To: References: Message-ID: <201011261432.16982.gambas@...1...> > Hi, > > I try to get input file by drag and drop file from Nautilus onto my form. > But the path that I got is HTML format, so I have trouble with the path > including space or unicode characters. > How to convert this path to normal path so I can work with OPEN statement. When receiving a drop, you may receive the data in different mime types, so you must check all the mime-types you get first, otherwise you will get the default, which may not be what you need. Look at Drag.Formats and Drag.Paste(). Regards, -- Beno?t Minisini From tobiasboe1 at ...20... Fri Nov 26 23:13:20 2010 From: tobiasboe1 at ...20... (tobias) Date: Fri, 26 Nov 2010 23:13:20 +0100 Subject: [Gambas-user] Primary Key missing? In-Reply-To: <1290759863.27279.6.camel@...2479...> References: <4CEEC6E6.3010204@...20...> <201011260003.59265.gambas@...1...> <1290759863.27279.6.camel@...2479...> Message-ID: <4CF03100.6020500@...20...> hi, > So I'm wondering whether your Edit might not work better if you were to > try: > > hResult = hConnection.Edit("test", "id=&1", 1) > hResult["name"] = "Adam" > hResult.Update > hResult.Commit > > this gives the same error, i changed the tables creation to hConnection.Exec("create table test(id integer, name varchar(10), primary key(id));") but nothing happens...? in terminal everything went well, even with create table test(id integer primary key, name varchar(10)); From gambas at ...1... Fri Nov 26 23:21:53 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Fri, 26 Nov 2010 23:21:53 +0100 Subject: [Gambas-user] Primary Key missing? In-Reply-To: <4CF03100.6020500@...20...> References: <4CEEC6E6.3010204@...20...> <1290759863.27279.6.camel@...2479...> <4CF03100.6020500@...20...> Message-ID: <201011262321.53359.gambas@...1...> > hi, > > > So I'm wondering whether your Edit might not work better if you were to > > > > try: > > hResult = hConnection.Edit("test", "id=&1", 1) > > hResult["name"] = "Adam" > > hResult.Update > > hResult.Commit > > this gives the same error, i changed the tables creation to > > hConnection.Exec("create table test(id integer, name varchar(10), > primary key(id));") > > but nothing happens...? > in terminal everything went well, even with > create table test(id integer primary key, name varchar(10)); > Which version of Gambas do you use? -- Beno?t Minisini From gambas at ...1... Sat Nov 27 02:28:47 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sat, 27 Nov 2010 02:28:47 +0100 Subject: [Gambas-user] Rev. 3199 - Gambas 3 In-Reply-To: <1283968315.6390.7.camel@...2406...> References: <1283968315.6390.7.camel@...2406...> Message-ID: <201011270228.47918.gambas@...1...> > OS: Ubuntu 9.10 - 32bits > Gnome : 2.28 > Monitor : res. 1360x768 > > [GB.FORM] > > *BUG: The icons in the Console tab, not shown completely. > See.Image.png > > Regards. > > Cristian Abarz?a F. Is it better with the latest revision? -- Beno?t Minisini From gambas at ...1... Sat Nov 27 02:42:45 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sat, 27 Nov 2010 02:42:45 +0100 Subject: [Gambas-user] Question about read/write file performance In-Reply-To: References: Message-ID: <201011270242.45454.gambas@...1...> > Hi, > > Maybe this is a basic question. I have 2 scripts like this: > > Code 1: > Dim buff as *Byte* > sizeOfFile = Stat("aBigFile").Size > > hFile = Open "aBigFile" for read > For i = 1 to sizeOfFile > Read hFile, buff > Next > Close hFile > > Code 2: > Dim buff as *Byte* > Dim bigBuff as *Float* > > sizeOfFile = Stat("aBigFile").Size > > hFile = Open "aBigFile" for read > For i = 1 to sizeOfFile / 8 > Read hFile, bigBuff > Next > For i = 1 to sizeOfFile MOD 8 > Read hFile, buff > Next > Close hFile > > Code 1 take t1 time unit to finish, code 2 is t2. > > Are t1, t2 different? Which can be faster? Reading/writing data is always faster if you read it chunk by chunk instead of reading it byte by byte. The chunk size is usually 4096 bytes, which is the size of a memory page on a common Linux system. You won't see much gain with higher values. Try and check! Regards, -- Beno?t Minisini From gambas at ...1... Sat Nov 27 14:44:05 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sat, 27 Nov 2010 14:44:05 +0100 Subject: [Gambas-user] Some new features in Gambas 3 Message-ID: <201011271444.05812.gambas@...1...> Hi, Here is just a few words about recently added features in Gambas 3, for those who didn't see them. 1) The gb.qt4.webkit got support for cookies and file downloads. See the WebBrowser example for the details. 2) A new set of native functions named Mk$() to create a string from the memory representation of a value. For example, MkShort$(1234) returns Chr$(210) & Chr$(4) (on a little endian machine). 3) The contrary are the new @() functions (Bool@, Byte@, Short at ...2513......) that replace the BoolPtr, BytePtr, ShortPtr... functions. It is just a rename, except that these functions can take a string instead of a pointer. In that case, the function will read the memory at the beginning of the string. In other words: Before: ... = ShortPtr(VarPtr(AString)) Now: ... = Short@(AString) 4) Structures now can be read from and written to a stream with the READ and WRITE instructions. That way: Public Struct TheThing ... End Struct Dim AThing As TheThing AThing = New TheThing ... Write #AStream, AThing As TheThing AThing = Read #AStream As TheThing Note #1: reading a structure from a stream does not fill the structure, but creates a new one. Note #2: writing a structure is done in one shot (one system call). That way, you can use structures do send and receive messages to UDP sockets. Note #3: structures can include other structures, and embedded arrays, and embedded arrays of structures! All that is managed recursively and transparently. Now, I am going to make the big change on the Is() functions that frightens a lot of people. Let's be bold! :-) -- Beno?t Minisini From gambas at ...1... Sat Nov 27 15:02:02 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sat, 27 Nov 2010 15:02:02 +0100 Subject: [Gambas-user] Some new features in Gambas 3 In-Reply-To: <201011271444.05812.gambas@...1...> References: <201011271444.05812.gambas@...1...> Message-ID: <201011271502.02358.gambas@...1...> > Hi, > > Here is just a few words about recently added features in Gambas 3, for > those who didn't see them. > > ... I forgot: 5) Now the interpreter does an automatic conversion between all array classes (except embedded arrays that are not real arrays). So now you can write: Dim MyArray As Byte[] = [ 0, 1, 2 ] Whereas you had to write that before: Dim MyArray As Byte[] = [ CByte(0), CByte(1), CByte(2) ] You can do that too: Dim MyArray As Integer[] = [ "1", Pi, Now ] The conversion is done too when passing arguments to functions. At the moment, only native classes can implement a specific conversion routines. It will be now possible to add an automatic conversion from Collection to a Variant[] (for example). Maybe in the future I will allow that for Gambas classes, but I am not sure it is a good idea. As conversion is done automatically under the hood, I prefer that feature to be clearly defined and limited. Regards, -- Beno?t Minisini From gambas at ...1... Sat Nov 27 15:05:02 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sat, 27 Nov 2010 15:05:02 +0100 Subject: [Gambas-user] Type Mismatch error with max neg long int as constant In-Reply-To: <20101124224711.M5490@...951...> References: <20101124224711.M5490@...951...> Message-ID: <201011271505.02275.gambas@...1...> > In Gambas2, I get a type mismatch error...but no error if ends in a 7 > > PUBLIC CONST LOWESTLONG AS Long = -9223372036854775808 'from wiki: > -9.223.372.036.854.775.808 > > -Fernando > Mmm. Yes. Strange, as it works inside the interpreter, and I thought both compiler and interpreter had the same "string to number" routine. I will look at that... -- Beno?t Minisini From gambas at ...1... Sat Nov 27 15:29:22 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sat, 27 Nov 2010 15:29:22 +0100 Subject: [Gambas-user] Type Mismatch error with max neg long int as constant In-Reply-To: <201011271505.02275.gambas@...1...> References: <20101124224711.M5490@...951...> <201011271505.02275.gambas@...1...> Message-ID: <201011271529.22059.gambas@...1...> > > In Gambas2, I get a type mismatch error...but no error if ends in a 7 > > > > PUBLIC CONST LOWESTLONG AS Long = -9223372036854775808 'from wiki: > > -9.223.372.036.854.775.808 > > > > -Fernando > > Mmm. Yes. Strange, as it works inside the interpreter, and I thought both > compiler and interpreter had the same "string to number" routine. > > I will look at that... OK, I see: the compiler reads the sign of the number in one place, and the digits in another place. So it tries to read "9223372036854775808" as a positive integer, and of course it overflows, as the greatest long is "9223372036854775807". No solution at the moment... -- Beno?t Minisini From gambas at ...1... Sat Nov 27 15:58:37 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sat, 27 Nov 2010 15:58:37 +0100 Subject: [Gambas-user] Type Mismatch error with max neg long int as constant In-Reply-To: <201011271529.22059.gambas@...1...> References: <20101124224711.M5490@...951...> <201011271505.02275.gambas@...1...> <201011271529.22059.gambas@...1...> Message-ID: <201011271558.37614.gambas@...1...> > > > In Gambas2, I get a type mismatch error...but no error if ends in a 7 > > > > > > PUBLIC CONST LOWESTLONG AS Long = -9223372036854775808 'from wiki: > > > -9.223.372.036.854.775.808 > > > > > > -Fernando > > > > Mmm. Yes. Strange, as it works inside the interpreter, and I thought both > > compiler and interpreter had the same "string to number" routine. > > > > I will look at that... > > OK, I see: the compiler reads the sign of the number in one place, and the > digits in another place. So it tries to read "9223372036854775808" as a > positive integer, and of course it overflows, as the greatest long is > "9223372036854775807". > > No solution at the moment... OK, that should be fixed in both Gambas 2 and Gambas 3 in revision #3328. Regards, -- Beno?t Minisini From gambas at ...1... Sat Nov 27 16:04:34 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sat, 27 Nov 2010 16:04:34 +0100 Subject: [Gambas-user] Gambas2 IDE preferences & System Language In-Reply-To: References: Message-ID: <201011271604.34993.gambas@...1...> > Vietnamese. > With Fedora 14, Gambas 2.21. Gambas chooses its language by reading the LC_ALL environmental variables, and then the LANG environmental variable if LC_ALL is not defined. But it should not have no impact on where Qt and the Gambas IDE read their configuration. What are the values of these variables on your machine (before and after you have switched the current language)? On mine (Ubuntu 10.10): LC_ALL is not defined, and LANG=fr_FR.UTF-8 Regards, -- Beno?t Minisini From mauricio at ...2500... Sat Nov 27 15:56:29 2010 From: mauricio at ...2500... (Mauricio Baeza) Date: Sat, 27 Nov 2010 08:56:29 -0600 Subject: [Gambas-user] Some new features in Gambas 3 In-Reply-To: <201011271502.02358.gambas@...1...> References: <201011271444.05812.gambas@...1...> <201011271502.02358.gambas@...1...> Message-ID: <1290869789.2377.0.camel@...37...> El s?b, 27-11-2010 a las 15:02 +0100, Beno?t Minisini escribi?: > > Hi, > > > > Here is just a few words about recently added features in Gambas 3, for > > those who didn't see them. > > > > ... > > I forgot: > > 5) Now the interpreter does an automatic conversion between all array classes > (except embedded arrays that are not real arrays). > > So now you can write: > > Dim MyArray As Byte[] = [ 0, 1, 2 ] > > Whereas you had to write that before: > > Dim MyArray As Byte[] = [ CByte(0), CByte(1), CByte(2) ] > > You can do that too: > > Dim MyArray As Integer[] = [ "1", Pi, Now ] > > The conversion is done too when passing arguments to functions. > > At the moment, only native classes can implement a specific conversion > routines. > > It will be now possible to add an automatic conversion from Collection to a > Variant[] (for example). > > Maybe in the future I will allow that for Gambas classes, but I am not sure it > is a good idea. As conversion is done automatically under the hood, I prefer > that feature to be clearly defined and limited. > > Regards, > Hi Benoit ... Gambas3 looks nice. Integrated support our wiki in my language is wonderful. Do you have a date for the final version?, I need the day and time, but something close would help me. Thank you very much for this great work. Best regards -- Mauricio Baeza 10 a?os usando OpenOffice.org, libre, gratuito y seguro _______________________________ Todo lo que no es dado es perdido From wally at ...2037... Sat Nov 27 16:52:42 2010 From: wally at ...2037... (wally) Date: Sat, 27 Nov 2010 16:52:42 +0100 Subject: [Gambas-user] GSL lib and Gambas Message-ID: <201011271652.42878.wally@...2037...> I would like to use several functions of GSL "GNU Scientific Library" in a Gambas application under Linux. Is this generally possible and does an example code exists ? thx wally From mauricio at ...2500... Sat Nov 27 17:10:15 2010 From: mauricio at ...2500... (Mauricio Baeza) Date: Sat, 27 Nov 2010 10:10:15 -0600 Subject: [Gambas-user] Some new features in Gambas 3 In-Reply-To: <1290869789.2377.0.camel@...37...> References: <201011271444.05812.gambas@...1...> <201011271502.02358.gambas@...1...> <1290869789.2377.0.camel@...37...> Message-ID: <1290874215.2377.1.camel@...37...> El s?b, 27-11-2010 a las 08:56 -0600, Mauricio Baeza escribi?: > Gambas3 looks nice. Integrated support our wiki in my language is > wonderful. > > Do you have a date for the final version?, I need the day and time, > but > something close would help me. > > Thank you very much for this great work. > > Best regards Sorry I meant: I not needed the day and time, But Something close Would help me. Best regards -- Mauricio Baeza 10 a?os usando OpenOffice.org, libre, gratuito y seguro _______________________________ Todo lo que no es dado es perdido From gambas at ...1... Sat Nov 27 18:37:09 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sat, 27 Nov 2010 18:37:09 +0100 Subject: [Gambas-user] Some new features in Gambas 3 In-Reply-To: <1290874215.2377.1.camel@...37...> References: <201011271444.05812.gambas@...1...> <1290869789.2377.0.camel@...37...> <1290874215.2377.1.camel@...37...> Message-ID: <201011271837.09913.gambas@...1...> > El s?b, 27-11-2010 a las 08:56 -0600, Mauricio Baeza escribi?: > > Gambas3 looks nice. Integrated support our wiki in my language is > > wonderful. > > > > Do you have a date for the final version?, I need the day and time, > > but > > something close would help me. > > > > Thank you very much for this great work. > > > > Best regards > > Sorry I meant: > > I not needed the day and time, But Something close Would help me. > > > Best regards I understood. I wanted to release before the end of the year, but I have yet some things to finish. As I want to make next releases (> 3.0) more often, I have to implement some sort of preprocessor in the compiler, so that we can compile some part of the code according to the version. I will try to keep backward compatibility, but as I will add new features at each release, it may not be possible. So the user needs a way to make his program compatible between 3.0, 3.1... So I think I will implement that. Then I will check that there is no little things to do yet in the language (like I did with Mk$() and @() functions) so that at least the core is stable between future versions. Then I will make a bug tracking system. The simpler is using the Google one. The funnier is making one in Gambas. And then I will release the first release candidate. Regards, -- Beno?t Minisini From tobiasboe1 at ...20... Sat Nov 27 19:48:01 2010 From: tobiasboe1 at ...20... (tobias) Date: Sat, 27 Nov 2010 19:48:01 +0100 Subject: [Gambas-user] Primary Key missing? In-Reply-To: <201011262321.53359.gambas@...1...> References: <4CEEC6E6.3010204@...20...> <1290759863.27279.6.camel@...2479...> <4CF03100.6020500@...20...> <201011262321.53359.gambas@...1...> Message-ID: <4CF15261.7010904@...20...> Beno?t Minisini schrieb: >> hi, >> >>> So I'm wondering whether your Edit might not work better if you were to >>> >>> try: >>> hResult = hConnection.Edit("test", "id=&1", 1) >>> hResult["name"] = "Adam" >>> hResult.Update >>> hResult.Commit >> this gives the same error, i changed the tables creation to >> >> hConnection.Exec("create table test(id integer, name varchar(10), >> primary key(id));") >> >> but nothing happens...? >> in terminal everything went well, even with >> create table test(id integer primary key, name varchar(10)); >> > > Which version of Gambas do you use? > gambas2.20 (i thought, it would be 2.21...?) From mauricio at ...2500... Sat Nov 27 19:49:46 2010 From: mauricio at ...2500... (Mauricio Baeza) Date: Sat, 27 Nov 2010 12:49:46 -0600 Subject: [Gambas-user] Some new features in Gambas 3 In-Reply-To: <201011271837.09913.gambas@...1...> References: <201011271444.05812.gambas@...1...> <1290869789.2377.0.camel@...37...> <1290874215.2377.1.camel@...37...> <201011271837.09913.gambas@...1...> Message-ID: <1290883786.3252.1.camel@...37...> El s?b, 27-11-2010 a las 18:37 +0100, Beno?t Minisini escribi?: > > El s?b, 27-11-2010 a las 08:56 -0600, Mauricio Baeza escribi?: > > > Gambas3 looks nice. Integrated support our wiki in my language is > > > wonderful. > > > > > > Do you have a date for the final version?, I need the day and time, > > > but > > > something close would help me. > > > > > > Thank you very much for this great work. > > > > > > Best regards > > > > Sorry I meant: > > > > I not needed the day and time, But Something close Would help me. > > > > > > Best regards > > I understood. I wanted to release before the end of the year, but I have yet > some things to finish. > > As I want to make next releases (> 3.0) more often, I have to implement some > sort of preprocessor in the compiler, so that we can compile some part of the > code according to the version. I will try to keep backward compatibility, but > as I will add new features at each release, it may not be possible. So the > user needs a way to make his program compatible between 3.0, 3.1... > > So I think I will implement that. Then I will check that there is no little > things to do yet in the language (like I did with Mk$() and @() > functions) so that at least the core is stable between future versions. Then I > will make a bug tracking system. The simpler is using the Google one. The > funnier is making one in Gambas. And then I will release the first release > candidate. > > Regards, > Wonderful ... Then it will be sooner than I thought. As the help is based on the wiki, I get to work to translate into my language (Spanish) as much as possible of the documentation. Best regards P.D. Sorry my bad English -- Mauricio Baeza 10 a?os usando OpenOffice.org, libre, gratuito y seguro _______________________________ Todo lo que no es dado es perdido From gambas.fr at ...626... Sun Nov 28 11:27:29 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Sun, 28 Nov 2010 11:27:29 +0100 Subject: [Gambas-user] GSL lib and Gambas In-Reply-To: <201011271652.42878.wally@...2037...> References: <201011271652.42878.wally@...2037...> Message-ID: i've not exemple here but with gb3 it's really easy :) you need to use the external functions to call directly the shared library. http://gambasdoc.org/help/cat/externfunc?v3 2010/11/27 wally : > I would like to use several functions of GSL "GNU Scientific Library" > in a Gambas application under Linux. > Is this generally possible and does an example code exists ? > thx ?wally > > ------------------------------------------------------------------------------ > Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! > Tap into the largest installed PC base & get more eyes on your game by > optimizing for Intel(R) Graphics Technology. Get started today with the > Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. > http://p.sf.net/sfu/intelisp-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Fabien Bodard From ron at ...1740... Sun Nov 28 18:08:28 2010 From: ron at ...1740... (Ron) Date: Sun, 28 Nov 2010 18:08:28 +0100 Subject: [Gambas-user] Some new features in Gambas 3 In-Reply-To: <1290883786.3252.1.camel@...37...> References: <201011271444.05812.gambas@...1...> <1290869789.2377.0.camel@...37...> <1290874215.2377.1.camel@...37...> <201011271837.09913.gambas@...1...> <1290883786.3252.1.camel@...37...> Message-ID: Benoit, all those changes are great! There is one big problem porting my big gambas2 project to gambas3 and keep it uptodate. (I have to maintain them next to eachother for a while) I cannot use diff or my favorite tool Meld diff viewer, to keep up with the changes to my project, simply because of the fact that Gambas2 uses all capital commands IF THEN ELSE and gambas3 If Then Else, all lines are different. Something can be done, can a project setting be added for this behavior? Or is this a big change/lot of work? Sure it looks nice(r), but I cannot see the changes between my gambas2 and 3 source code... Regards, Ron_2nd. On Sat, Nov 27, 2010 at 7:49 PM, Mauricio Baeza wrote: > El s?b, 27-11-2010 a las 18:37 +0100, Beno?t Minisini escribi?: > >> > El s?b, 27-11-2010 a las 08:56 -0600, Mauricio Baeza escribi?: >> > > Gambas3 looks nice. Integrated support our wiki in my language is >> > > wonderful. >> > > >> > > Do you have a date for the final version?, I need the day and time, >> > > but >> > > something close would help me. >> > > >> > > Thank you very much for this great work. >> > > >> > > Best regards >> > >> > Sorry I meant: >> > >> > I not needed the day and time, But Something close Would help me. >> > >> > >> > Best regards >> >> I understood. I wanted to release before the end of the year, but I have yet >> some things to finish. >> >> As I want to make next releases (> 3.0) more often, I have to implement some >> sort of preprocessor in the compiler, so that we can compile some part of the >> code according to the version. I will try to keep backward compatibility, but >> as I will add new features at each release, it may not be possible. So the >> user needs a way to make his program compatible between 3.0, 3.1... >> >> So I think I will implement that. Then I will check that there is no little >> things to do yet in the language (like I did with Mk$() and @() >> functions) so that at least the core is stable between future versions. Then I >> will make a bug tracking system. The simpler is using the Google one. The >> funnier is making one in Gambas. And then I will release the first release >> candidate. >> >> Regards, >> > > > Wonderful ... > > Then it will be sooner than I thought. As the help is based on the wiki, > I get to work to translate into my language (Spanish) as much as > possible of the documentation. > > Best regards > > > P.D. Sorry my bad English > > > -- > Mauricio Baeza > > 10 a?os usando OpenOffice.org, libre, gratuito y seguro > _______________________________ > Todo lo que no es dado es perdido > ------------------------------------------------------------------------------ > Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! > Tap into the largest installed PC base & get more eyes on your game by > optimizing for Intel(R) Graphics Technology. Get started today with the > Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. > http://p.sf.net/sfu/intelisp-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From tobiasboe1 at ...20... Sun Nov 28 19:18:27 2010 From: tobiasboe1 at ...20... (tobias) Date: Sun, 28 Nov 2010 19:18:27 +0100 Subject: [Gambas-user] Primary Key missing? In-Reply-To: <4CF15261.7010904@...20...> References: <4CEEC6E6.3010204@...20...> <1290759863.27279.6.camel@...2479...> <4CF03100.6020500@...20...> <201011262321.53359.gambas@...1...> <4CF15261.7010904@...20...> Message-ID: <4CF29CF3.2030709@...20...> >>> hi, >>> >>>> So I'm wondering whether your Edit might not work better if you were to >>>> >>>> try: >>>> hResult = hConnection.Edit("test", "id=&1", 1) >>>> hResult["name"] = "Adam" >>>> hResult.Update >>>> hResult.Commit >>> this gives the same error, i changed the tables creation to >>> >>> hConnection.Exec("create table test(id integer, name varchar(10), >>> primary key(id));") >>> >>> but nothing happens...? >>> in terminal everything went well, even with >>> create table test(id integer primary key, name varchar(10)); >>> >> Which version of Gambas do you use? >> > gambas2.20 (i thought, it would be 2.21...?) > > ------------------------------------------------------------------------------ > Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! > Tap into the largest installed PC base & get more eyes on your game by > optimizing for Intel(R) Graphics Technology. Get started today with the > Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. > http://p.sf.net/sfu/intelisp-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user i don't know, if i said it but the regular way (with gambas objects and setting Table.PrimaryKey = ["id"]) worked fine... i don't know... i've just been trying to install gambas2-2.22 but tar sais the archive is broken and my download speed decreased to nearly 0 -.- From gambas at ...1... Sun Nov 28 20:11:31 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sun, 28 Nov 2010 20:11:31 +0100 Subject: [Gambas-user] Some new features in Gambas 3 In-Reply-To: References: <201011271444.05812.gambas@...1...> <1290883786.3252.1.camel@...37...> Message-ID: <201011282011.31766.gambas@...1...> > Benoit, > > all those changes are great! > > There is one big problem porting my big gambas2 project to gambas3 and > keep it uptodate. (I have to maintain them next to eachother for a > while) > > I cannot use diff or my favorite tool Meld diff viewer, to keep up > with the changes to my project, simply because of the fact that > Gambas2 uses all capital commands IF THEN ELSE and gambas3 If Then > Else, all lines are different. > > Something can be done, can a project setting be added for this behavior? > Or is this a big change/lot of work? > Sure it looks nice(r), but I cannot see the changes between my gambas2 > and 3 source code... > > Regards, > Ron_2nd. > diff has an option to ignore case differences, "-i". Regards, -- Beno?t Minisini From rterry at ...1946... Mon Nov 29 11:42:50 2010 From: rterry at ...1946... (richard terry) Date: Mon, 29 Nov 2010 21:42:50 +1100 Subject: [Gambas-user] Missing tooltip in IDE Message-ID: <201011292142.50044.rterry@...1946...> Hi Benoit, I've noticed for quite a while now that the tool tip which used to appear when you put the cursor over a tool in the toolbox is gone - I sometimes can't remember what the graphic's represent (the list pictures mainly), so it would be nice to have this back if possible. Regards Richard From gambas at ...1... Mon Nov 29 11:56:24 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 29 Nov 2010 11:56:24 +0100 Subject: [Gambas-user] Missing tooltip in IDE In-Reply-To: <201011292142.50044.rterry@...1946...> References: <201011292142.50044.rterry@...1946...> Message-ID: <201011291156.24471.gambas@...1...> > Hi Benoit, > > I've noticed for quite a while now that the tool tip which used to appear > when you put the cursor over a tool in the toolbox is gone - I sometimes > can't remember what the graphic's represent (the list pictures mainly), so > it would be nice to have this back if possible. > > Regards > > Richard > It should be better with revision #3334. Regards, -- Beno?t Minisini From gambas at ...1... Mon Nov 29 18:38:25 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 29 Nov 2010 18:38:25 +0100 Subject: [Gambas-user] Removing / Modifying IsXXXX() functions in Gambas3 In-Reply-To: <4CED00D1.70002@...1740...> References: <201011241208.34100.gambas@...1...> <201011241228.00690.gambas@...1...> <4CED00D1.70002@...1740...> Message-ID: <201011291838.25953.gambas@...1...> > > > > When you do IsNumber(Val(...)), you actually want the new behaviour I > > want to implement: checking if a string can be safely converted to what > > you want. In the new syntax, you will directly do IsNumber(...). > > > > The IsDigit(), IsLetter()... functions are not concerned by the change. > > > > IsNull() will be kept unchanged. > > > > Then, please tell me what you are testing exactly with these lines: > > > > Events.module: IF rResult!rerunenabled = TRUE AND IF > > IsDate(rResult!lastrun) THEN > > It appears to be just a test if the db record field has a date value in > it, instead of an empty value. > If rResult!lastrun is a database date field, then you must replace IsDate(...) par Not IsNull(...). If rResult!lastrun is not a date field, then IsDate() was always returning False, so now it will works as expected. > > Events.module: IF IsBoolean(sValue) THEN sValue = > > Main.DisplayBool(sValue) Events.module: IF IsBoolean(sCond) THEN sCond > > = Main.DisplayBool(sCond) Events.module: ELSE IF IsBoolean(vResult) > > THEN > > --- > PUBLIC SUB CheckCondition(sValue AS Variant, sOperand AS String, sCond > AS Variant, OPTIONAL bMute AS Boolean) AS Boolean > > DIM bReturn AS Boolean > > IF IsBoolean(sValue) THEN sValue = Main.DisplayBool(sValue) > IF IsBoolean(sCond) THEN sCond = Main.DisplayBool(sCond) > --- > > CheckConditions(), has variants as arguments. > If the variant sValue is a Boolean, then change it to a string value > with "True" "False" as content, so that conversion and compare tests > (below) after that can be more generic. > You must replace all "IsBoolean(x)" by "TypeOf(x) = gb.Boolean". Same remark actually for IsShort(), IsInteger(), IsFloat(), IsDate() and IsObject(). > --- > SELECT sOperand > CASE "=" > IF Comp(sValue, sCond) = 0 THEN bReturn = TRUE > CASE "<>" > IF sValue <> sCond THEN bReturn = TRUE > CASE ">" > IF CFloat(Replace(sValue, ",", ".", gb.String)) > > CFloat(Replace(sCond, ",", ".", gb.String)) THEN bReturn = TRUE > CASE "<" > IF CFloat(Replace(sValue, ",", ".", gb.String)) < > CFloat(Replace(sCond, ",", ".", gb.String)) THEN bReturn = TRUE > CASE ELSE > IF Main.bEventsDebug THEN Main.WriteDebugLog(("[Events] 2c. > Unsupported operand '" & sOperand & "' found!")) > END SELECT > IF Main.bEventsDebug AND IF NOT bMute THEN > Main.WriteDebugLog(("[Events] 2c. Check condition '") & sValue & " " & > sOperand & " " & sCond & "' = " & Main.DisplayBool(bReturn)) > RETURN bReturn > > CATCH > IF Main.bEventsDebug THEN Main.WriteDebugLog(("[Events] 2c. Invalid > comparison in CheckCondition() routine!")) > RETURN FALSE > > END > --- > > > Mail.module: IF IsString(Main.GlobalVar["Minute"]) THEN > > Main.GlobalVar["Minute"] = Val(Main.GlobalVar["Minute"]) > > Just seems to be checks to see if the variant value from that collection > isn't empty, to prevent errors. So use 'Not IsNull()' instead. > > > CDenon.class: IF IsInteger(sValue) THEN > > CDenon.class: IF IsInteger(sValue) THEN > > TRY sValue = Val(sValue) > IF IsInteger(sValue) THEN > sValue = sValue + 80 > ELSE > IF UCase(sValue) = "OFF" THEN sValue = 99 > ENDIF > > To see if sValue contains a decibel value -18...80 , or on/off/up/down. Now IsInteger() really tests if a string can be converted to an integer. But the simpler is replacing IsInteger(sValue) by TypeOf(sValue) = gb.Integer. > > > FConditionEditor.class: IF IsBoolean(vVal) THEN > > TRY vVal = Main.GlobalVar[Right(tvVariables.Current.Key, > Len(tvVariables.Current.Key) - 4)] > IF IsBoolean(vVal) THEN > sVal = Main.DisplayBool(vVal) > ELSE > sVal = vVal > ENDIF > > vVal can be strings, numbers or booleans, if its a boolean, change it to > "True", "False", otherwise just a T or nothing is shown in TableView. Use "TypeOf(vVal) = gb.Boolean". > > > FDebug.class: IF IsBoolean(vValue) THEN > > Same here. > Same change. > > FTriggerEditor.class: IF IsBoolean(Main.GlobalVar[cmbVariables.Text]) > > THEN > > FTriggerEditor.class: ELSE IF NOT > > IsNumber(Main.GlobalVar[cmbVariables.Text]) THEN > > If value is a boolean, disable compare checkboxes <, > , on form, just > have = and <> enabled, if it's a number allow, < and > too as operand > for trigger rules in my event/trigger editor. You must replace "IsNumber(...)" by "TypeOf(...) > gb.Boolean And TypeOf(...) <= gb.Float" (i.e. check the type of the variant against all possible number datatypes). Regards, -- Beno?t Minisini From tobiasboe1 at ...20... Mon Nov 29 20:47:53 2010 From: tobiasboe1 at ...20... (tobias) Date: Mon, 29 Nov 2010 20:47:53 +0100 Subject: [Gambas-user] Connection.Create and .Index Message-ID: <4CF40369.1060103@...20...> hi, i'm confused about the output i get from: PUBLIC SUB test() DIM hResult AS Result 'hConnection is an established Connection, with existing Table "test", Fields "id", db.Serial Primary Key, "name" db.String hResult = hConnection.Create("test") PRINT hResult.Index hResult["name"] = "Aaron" hResult.Update() PRINT hResult.Index hResult["name"] = "Zacharias" hResult.Update() END i get in console: 0 0 but i thought the second PRINTed Index should be 1? the records are fine but with both indizes 0 shouldn't the first be overwritten with "Zacharias" or is there another internal pointer to specify the record?? regards, tobi From gambas at ...1... Mon Nov 29 20:52:01 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 29 Nov 2010 20:52:01 +0100 Subject: [Gambas-user] Connection.Create and .Index In-Reply-To: <4CF40369.1060103@...20...> References: <4CF40369.1060103@...20...> Message-ID: <201011292052.01803.gambas@...1...> > hi, > > i'm confused about the output i get from: > > PUBLIC SUB test() > > DIM hResult AS Result > > 'hConnection is an established Connection, with existing Table > "test", Fields "id", db.Serial Primary Key, "name" db.String > hResult = hConnection.Create("test") > PRINT hResult.Index > hResult["name"] = "Aaron" > hResult.Update() > PRINT hResult.Index > hResult["name"] = "Zacharias" > hResult.Update() > > END > > i get in console: > 0 > 0 > > but i thought the second PRINTed Index should be 1? the records are fine > but with both indizes 0 shouldn't the first be overwritten with > "Zacharias" or is there another internal pointer to specify the record?? > > regards, > tobi > In creation mode there is only one record in the Result object, the record that will be created. So Result.Index always returns 0. Regards, -- Beno?t Minisini From tobiasboe1 at ...20... Mon Nov 29 21:02:21 2010 From: tobiasboe1 at ...20... (tobias) Date: Mon, 29 Nov 2010 21:02:21 +0100 Subject: [Gambas-user] Connection.Create and .Index In-Reply-To: <201011292052.01803.gambas@...1...> References: <4CF40369.1060103@...20...> <201011292052.01803.gambas@...1...> Message-ID: <4CF406CD.9020107@...20...> Beno?t Minisini schrieb: >> hi, >> >> i'm confused about the output i get from: >> >> PUBLIC SUB test() >> >> DIM hResult AS Result >> >> 'hConnection is an established Connection, with existing Table >> "test", Fields "id", db.Serial Primary Key, "name" db.String >> hResult = hConnection.Create("test") >> PRINT hResult.Index >> hResult["name"] = "Aaron" >> hResult.Update() >> PRINT hResult.Index >> hResult["name"] = "Zacharias" >> hResult.Update() >> >> END >> >> i get in console: >> 0 >> 0 >> >> but i thought the second PRINTed Index should be 1? the records are fine >> but with both indizes 0 shouldn't the first be overwritten with >> "Zacharias" or is there another internal pointer to specify the record?? >> >> regards, >> tobi >> > > In creation mode there is only one record in the Result object, the record > that will be created. So Result.Index always returns 0. > > Regards, > oh... of course! this makes sense! and for general unterstanding, i can say that an index in a result is some kind of linked to a position in the database so that the driver, or whatever does this, knows, where to write the record in the result to in the real database? From gambas at ...1... Mon Nov 29 21:41:39 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 29 Nov 2010 21:41:39 +0100 Subject: [Gambas-user] Connection.Create and .Index In-Reply-To: <4CF406CD.9020107@...20...> References: <4CF40369.1060103@...20...> <201011292052.01803.gambas@...1...> <4CF406CD.9020107@...20...> Message-ID: <201011292141.39948.gambas@...1...> > > > > In creation mode there is only one record in the Result object, the > > record that will be created. So Result.Index always returns 0. > > > > Regards, > > oh... of course! this makes sense! > and for general unterstanding, i can say that an index in a result is > some kind of linked to a position in the database so that the driver, or > whatever does this, knows, where to write the record in the result to in > the real database? > Not at all. It's just the index inside the internal record buffer of the Result object. -- Beno?t Minisini From tobiasboe1 at ...20... Mon Nov 29 22:07:10 2010 From: tobiasboe1 at ...20... (tobias) Date: Mon, 29 Nov 2010 22:07:10 +0100 Subject: [Gambas-user] Connection.Create and .Index In-Reply-To: <201011292141.39948.gambas@...1...> References: <4CF40369.1060103@...20...> <201011292052.01803.gambas@...1...> <4CF406CD.9020107@...20...> <201011292141.39948.gambas@...1...> Message-ID: <4CF415FE.5080105@...20...> Beno?t Minisini schrieb: >>> In creation mode there is only one record in the Result object, the >>> record that will be created. So Result.Index always returns 0. >>> >>> Regards, >> oh... of course! this makes sense! >> and for general unterstanding, i can say that an index in a result is >> some kind of linked to a position in the database so that the driver, or >> whatever does this, knows, where to write the record in the result to in >> the real database? >> > > Not at all. It's just the index inside the internal record buffer of the > Result object. > so how does the driver know where to write a result record to in a database? thanks, tobi From gambas at ...1... Mon Nov 29 22:32:47 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 29 Nov 2010 22:32:47 +0100 Subject: [Gambas-user] Connection.Create and .Index In-Reply-To: <4CF415FE.5080105@...20...> References: <4CF40369.1060103@...20...> <201011292141.39948.gambas@...1...> <4CF415FE.5080105@...20...> Message-ID: <201011292232.47501.gambas@...1...> > > so how does the driver know where to write a result record to in a > database? > > thanks, > tobi > Well, do you know what SQL is? -- Beno?t Minisini From rterry at ...1946... Mon Nov 29 23:58:05 2010 From: rterry at ...1946... (richard terry) Date: Tue, 30 Nov 2010 09:58:05 +1100 Subject: [Gambas-user] What replaces isSTring Message-ID: <201011300958.05904.rterry@...1946...> wasn't really paying attention to the discussion on this, but IsString is gone in the latest update and its blown away all our database saving routines (we don't use the gambas ones). This code: If IsString(field) Then no longer works. Any help appreciated. In the meantime - Benoit - How do I roll back to a previous SVN version so I can continue working/using my program. Richard From gambas at ...1... Tue Nov 30 00:12:39 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 30 Nov 2010 00:12:39 +0100 Subject: [Gambas-user] What replaces isSTring In-Reply-To: <201011300958.05904.rterry@...1946...> References: <201011300958.05904.rterry@...1946...> Message-ID: <201011300012.39097.gambas@...1...> > wasn't really paying attention to the discussion on this, but > > IsString is gone in the latest update and its blown away all our database > saving routines (we don't use the gambas ones). > > This code: > > If IsString(field) Then no longer works. > > Any help appreciated. See the comments I made to Ron. IsString(value) must be replaced by TypeOf(value) = gb.String. And more generally, IsXXXX(value) must be replaced by TypeOf(value) = gb.XXXX Only IsNull() has been kept. The other IsXXXX() functions now check if a string can be converted safely to a boolean, an integer, a long, a float or a date. But you should tell in which context you use IsString(), to be sure that you didn't make a mistake by using it at the first place. > > In the meantime - Benoit - How do I roll back to a previous SVN version so > I can continue working/using my program. > > Richard svn update -r to update your local copy of Gambas sources to the revision . Sorry for the inconvenience! Regards, -- Beno?t Minisini From rterry at ...1946... Tue Nov 30 00:17:31 2010 From: rterry at ...1946... (richard terry) Date: Tue, 30 Nov 2010 10:17:31 +1100 Subject: [Gambas-user] What replaces isSTring In-Reply-To: <201011300012.39097.gambas@...1...> References: <201011300958.05904.rterry@...1946...> <201011300012.39097.gambas@...1...> Message-ID: <201011301017.31757.rterry@...1946...> On Tuesday 30 November 2010 10:12:39 Beno?t Minisini wrote: > > wasn't really paying attention to the discussion on this, but > > > > IsString is gone in the latest update and its blown away all our database > > saving routines (we don't use the gambas ones). > > > > This code: > > > > If IsString(field) Then no longer works. > > > > Any help appreciated. > > See the comments I made to Ron. > > IsString(value) must be replaced by TypeOf(value) = gb.String. > > And more generally, IsXXXX(value) must be replaced by TypeOf(value) = > gb.XXXX > > Only IsNull() has been kept. The other IsXXXX() functions now check if a > string can be converted safely to a boolean, an integer, a long, a float or > a date. > > But you should tell in which context you use IsString(), to be sure that > you didn't make a mistake by using it at the first place. > > > In the meantime - Benoit - How do I roll back to a previous SVN version > > so I can continue working/using my program. > > > > Richard > > svn update -r to update your local copy of Gambas sources to the > revision . > > Sorry for the inconvenience! > > Regards, > Thanks, at least that runs now, I'll have to test it. Problem is I now use my program for clinical purposes so that stopped my consulation in its tracks. Regards richard From rterry at ...1946... Tue Nov 30 01:09:42 2010 From: rterry at ...1946... (richard terry) Date: Tue, 30 Nov 2010 11:09:42 +1100 Subject: [Gambas-user] What replaces isSTring In-Reply-To: <201011300012.39097.gambas@...1...> References: <201011300958.05904.rterry@...1946...> <201011300012.39097.gambas@...1...> Message-ID: <201011301109.42219.rterry@...1946...> On Tuesday 30 November 2010 10:12:39 Beno?t Minisini wrote: Ok, is working again ok, thanks, can save the patient's notes, insert pictures into notes again Thanks. > > wasn't really paying attention to the discussion on this, but > > > > IsString is gone in the latest update and its blown away all our database > > saving routines (we don't use the gambas ones). > > > > This code: > > > > If IsString(field) Then no longer works. > > > > Any help appreciated. > > See the comments I made to Ron. > > IsString(value) must be replaced by TypeOf(value) = gb.String. > > And more generally, IsXXXX(value) must be replaced by TypeOf(value) = > gb.XXXX > > Only IsNull() has been kept. The other IsXXXX() functions now check if a > string can be converted safely to a boolean, an integer, a long, a float or > a date. > > But you should tell in which context you use IsString(), to be sure that > you didn't make a mistake by using it at the first place. > > > In the meantime - Benoit - How do I roll back to a previous SVN version > > so I can continue working/using my program. > > > > Richard > > svn update -r to update your local copy of Gambas sources to the > revision . > > Sorry for the inconvenience! > > Regards, > From ron at ...1740... Tue Nov 30 09:04:58 2010 From: ron at ...1740... (Ron) Date: Tue, 30 Nov 2010 09:04:58 +0100 Subject: [Gambas-user] Removing / Modifying IsXXXX() functions in Gambas3 In-Reply-To: <201011291838.25953.gambas@...1...> References: <201011241208.34100.gambas@...1...> <201011241228.00690.gambas@...1...> <4CED00D1.70002@...1740...> <201011291838.25953.gambas@...1...> Message-ID: <4CF4B02A.1000508@...1740...> >>> Mail.module: IF IsString(Main.GlobalVar["Minute"]) THEN >>> Main.GlobalVar["Minute"] = Val(Main.GlobalVar["Minute"]) >> Just seems to be checks to see if the variant value from that collection >> isn't empty, to prevent errors. > So use 'Not IsNull()' instead. > I get when I do If Not IsNull(Main.GlobalVar["Minute"]) Then .... Error: Type Mismatch wanted string, got integer. Main.GlobalVar["Minute"] 's value is 34 Main.GlobalVar[] is a Collection with Variants , so contains all types of values. Sometimes, (don't know why) Main.GlobalVar["Minute"] contained a string so "34" instead of an integer, then further down my program things went wrong, so therefor this stupid check and correction posted above was used.. Regards, Ron_2nd. From gau_veldt at ...67... Tue Nov 30 09:50:13 2010 From: gau_veldt at ...67... (B. Jack) Date: Tue, 30 Nov 2010 00:50:13 -0800 Subject: [Gambas-user] Removing / Modifying IsXXXX() functions in Gambas3 In-Reply-To: <4CF4B02A.1000508@...1740...> References: <201011241208.34100.gambas@...1...> <201011241228.00690.gambas@...1...> <4CED00D1.70002@...1740...>, <201011291838.25953.gambas@...1...>, <4CF4B02A.1000508@...1740...> Message-ID: Perhaps GAMBAS needs something like Python's y=repr( x) to guarantee y is a string representation of x > Date: Tue, 30 Nov 2010 09:04:58 +0100 > From: ron at ...1740... > To: gambas-user at lists.sourceforge.net > Subject: Re: [Gambas-user] Removing / Modifying IsXXXX() functions in Gambas3 > > > >>> Mail.module: IF IsString(Main.GlobalVar["Minute"]) THEN > >>> Main.GlobalVar["Minute"] = Val(Main.GlobalVar["Minute"]) > >> Just seems to be checks to see if the variant value from that collection > >> isn't empty, to prevent errors. > > So use 'Not IsNull()' instead. > > > > I get when I do If Not IsNull(Main.GlobalVar["Minute"]) Then .... > > Error: Type Mismatch wanted string, got integer. > > Main.GlobalVar["Minute"] 's value is 34 > > Main.GlobalVar[] is a Collection with Variants , so contains all types > of values. > > Sometimes, (don't know why) Main.GlobalVar["Minute"] contained a string > so "34" instead of an integer, then further down my program things went > wrong, so therefor this stupid check and correction posted above was used.. > > Regards, > Ron_2nd. > > ------------------------------------------------------------------------------ > Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! > Tap into the largest installed PC base & get more eyes on your game by > optimizing for Intel(R) Graphics Technology. Get started today with the > Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. > http://p.sf.net/sfu/intelisp-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From gambas at ...1... Tue Nov 30 12:58:27 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 30 Nov 2010 12:58:27 +0100 Subject: [Gambas-user] Removing / Modifying IsXXXX() functions in Gambas3 In-Reply-To: <4CF4B02A.1000508@...1740...> References: <201011241208.34100.gambas@...1...> <201011291838.25953.gambas@...1...> <4CF4B02A.1000508@...1740...> Message-ID: <201011301258.27729.gambas@...1...> > >>> Mail.module: IF IsString(Main.GlobalVar["Minute"]) THEN > >>> Main.GlobalVar["Minute"] = Val(Main.GlobalVar["Minute"]) > >> > >> Just seems to be checks to see if the variant value from that collection > >> isn't empty, to prevent errors. > > > > So use 'Not IsNull()' instead. > > I get when I do If Not IsNull(Main.GlobalVar["Minute"]) Then .... > > Error: Type Mismatch wanted string, got integer. > > Main.GlobalVar["Minute"] 's value is 34 > > Main.GlobalVar[] is a Collection with Variants , so contains all types > of values. > > Sometimes, (don't know why) Main.GlobalVar["Minute"] contained a string > so "34" instead of an integer, then further down my program things went > wrong, so therefor this stupid check and correction posted above was used.. > > Regards, > Ron_2nd. > Then you must do "If TypeOf(Main.GlobalVar["Minute"]) = gb.String" if you really need a string. Regardsn -- Beno?t Minisini From gambas at ...1... Tue Nov 30 12:59:04 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 30 Nov 2010 12:59:04 +0100 Subject: [Gambas-user] Removing / Modifying IsXXXX() functions in Gambas3 In-Reply-To: References: <201011241208.34100.gambas@...1...> <4CF4B02A.1000508@...1740...> Message-ID: <201011301259.04183.gambas@...1...> > Perhaps GAMBAS needs something like Python's y=repr( x) to > guarantee y is a string representation of x > The name of the function is CStr() - or Str$() if you need localization. Regards, -- Beno?t Minisini From ron at ...1740... Tue Nov 30 13:58:59 2010 From: ron at ...1740... (Ron) Date: Tue, 30 Nov 2010 13:58:59 +0100 Subject: [Gambas-user] Removing / Modifying IsXXXX() functions in Gambas3 In-Reply-To: <201011301259.04183.gambas@...1...> References: <201011241208.34100.gambas@...1...> <4CF4B02A.1000508@...1740...> <201011301259.04183.gambas@...1...> Message-ID: Don't want to bash, but why are CLng and CSng removed/replaced by CLong and CSingle and CStr is still there / not replaced by CString? I see some "vb logics" creeping in... same as marking text in insert and normal mode in IDE i wrote about... Back in the Gambas2 version it was so logical and cool, but I get more restless everytime the revision number goes up ;-) Regards, Ron_2nd. 2010/11/30 Beno?t Minisini : >> Perhaps GAMBAS needs something like Python's y=repr( x) to >> guarantee y is a string representation of x >> > > The name of the function is CStr() - or Str$() if you need localization. > > Regards, > > -- > Beno?t Minisini > > ------------------------------------------------------------------------------ > Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! > Tap into the largest installed PC base & get more eyes on your game by > optimizing for Intel(R) Graphics Technology. Get started today with the > Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. > http://p.sf.net/sfu/intelisp-dev2dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas at ...1... Tue Nov 30 14:19:13 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 30 Nov 2010 14:19:13 +0100 Subject: [Gambas-user] Removing / Modifying IsXXXX() functions in Gambas3 In-Reply-To: References: <201011241208.34100.gambas@...1...> <201011301259.04183.gambas@...1...> Message-ID: <201011301419.13045.gambas@...1...> > Don't want to bash, but why are CLng and CSng removed/replaced by > CLong and CSingle and CStr is still there / not replaced by CString? > They were not replaced, I just removed some abbreviations. But I admit it maye be stupid, as it just takes memory in the compiler. The interpreter does not care. > I see some "vb logics" creeping in... same as marking text in insert > and normal mode in IDE i wrote about... As for that, maybe we misunderstood each other. By pressing the INSERT key, you toggle the editor between normal mode and block/overwrite mode, like in Kate or KWrite. In block mode, insertion replaces the character under the cursor, and the selection is rectangular (a block). But maybe the problem you have is not that. I don't know, you was not very clear. > > Back in the Gambas2 version it was so logical and cool, but I get more > restless everytime the revision number goes up ;-) Gambas 3 is more logical than Gambas 2 is many places! Regards, -- Beno?t Minisini From ron at ...1740... Tue Nov 30 14:51:00 2010 From: ron at ...1740... (Ron) Date: Tue, 30 Nov 2010 14:51:00 +0100 Subject: [Gambas-user] Removing / Modifying IsXXXX() functions in Gambas3 In-Reply-To: <201011301419.13045.gambas@...1...> References: <201011241208.34100.gambas@...1...> <201011301259.04183.gambas@...1...> <201011301419.13045.gambas@...1...> Message-ID: 2010/11/30 Beno?t Minisini : >> Don't want to bash, but why are CLng and CSng removed/replaced by >> CLong and CSingle and CStr is still there / not replaced by CString? >> > > They were not replaced, I just removed some abbreviations. But I admit it maye > be stupid, as it just takes memory in the compiler. The interpreter does not > care. > Ok, I understand now I think CLng and CSng where 'aliases' of main functions CLong and CSingle. But CString is an 'alias' of CStr, not the main function, so the other way around, therefor you didn't remove Cstr, is that what you are saying? >> I see some "vb logics" creeping in... same as marking text in insert >> and normal mode in IDE i wrote about... > > As for that, maybe we misunderstood each other. > Yes we did apparently... Look at the attached screenshot.. I marked -with my mouse- all the full lines of text you see in there except the last one "Main.ControlLed("EIB", "On") The last letters of "byte" are not back colored purple, even though I have selected them. It does this with all lines having comments in them It's due to the fact that the font of the comments are different size/type as the rest I guess, this is the default Ubuntu type theme. > By pressing the INSERT key, you toggle the editor between normal mode and > block/overwrite mode, like in Kate or KWrite. In block mode, insertion > replaces the character under the cursor, and the selection is rectangular (a > block). > > But maybe the problem you have is not that. I don't know, you was not very > clear. > >> >> Back in the Gambas2 version it was so logical and cool, but I get more >> restless everytime the revision number goes up ;-) > > Gambas 3 is more logical than Gambas 2 is many places! > You are right, getting better... Regards, Ron_2nd. > Regards, > > -- > Beno?t Minisini > > -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot-1.png Type: image/png Size: 5305 bytes Desc: not available URL: From gambas at ...1... Tue Nov 30 15:07:20 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 30 Nov 2010 15:07:20 +0100 Subject: [Gambas-user] Removing / Modifying IsXXXX() functions in Gambas3 In-Reply-To: References: <201011241208.34100.gambas@...1...> <201011301419.13045.gambas@...1...> Message-ID: <201011301507.20459.gambas@...1...> > 2010/11/30 Beno?t Minisini : > >> Don't want to bash, but why are CLng and CSng removed/replaced by > >> CLong and CSingle and CStr is still there / not replaced by CString? > > > > They were not replaced, I just removed some abbreviations. But I admit it > > maye be stupid, as it just takes memory in the compiler. The interpreter > > does not care. > > Ok, I understand now I think CLng and CSng where 'aliases' of main > functions CLong and CSingle. They were aliases. > > But CString is an 'alias' of CStr, not the main function, so the other > way around, therefor you didn't remove Cstr, is that what you are > saying? CString and CStr are the same thing too. > > Yes we did apparently... > > Look at the attached screenshot.. > I marked -with my mouse- all the full lines of text you see in there > except the last one "Main.ControlLed("EIB", "On") > > The last letters of "byte" are not back colored purple, even though I > have selected them. > It does this with all lines having comments in them > > It's due to the fact that the font of the comments are different > size/type as the rest I guess, this is the default Ubuntu type theme. > No, it's a bug in Qt or in the font you use. It happens sometimes. You should use another font! Regards, -- Beno?t Minisini From ron at ...1740... Tue Nov 30 15:20:03 2010 From: ron at ...1740... (Ron) Date: Tue, 30 Nov 2010 15:20:03 +0100 Subject: [Gambas-user] Removing / Modifying IsXXXX() functions in Gambas3 In-Reply-To: <201011301507.20459.gambas@...1...> References: <201011241208.34100.gambas@...1...> <201011301419.13045.gambas@...1...> <201011301507.20459.gambas@...1...> Message-ID: <4CF50813.3030607@...1740...> On 30-11-2010 15:07, Beno?t Minisini wrote: >> 2010/11/30 Beno?t Minisini: >>>> Don't want to bash, but why are CLng and CSng removed/replaced by >>>> CLong and CSingle and CStr is still there / not replaced by CString? >>> They were not replaced, I just removed some abbreviations. But I admit it >>> maye be stupid, as it just takes memory in the compiler. The interpreter >>> does not care. >> Ok, I understand now I think CLng and CSng where 'aliases' of main >> functions CLong and CSingle. > They were aliases. > >> But CString is an 'alias' of CStr, not the main function, so the other >> way around, therefor you didn't remove Cstr, is that what you are >> saying? > CString and CStr are the same thing too. > But they are threated differently, thats what I meant by vb logic... not consistent. >> Yes we did apparently... >> >> Look at the attached screenshot.. >> I marked -with my mouse- all the full lines of text you see in there >> except the last one "Main.ControlLed("EIB", "On") >> >> The last letters of "byte" are not back colored purple, even though I >> have selected them. >> It does this with all lines having comments in them >> >> It's due to the fact that the font of the comments are different >> size/type as the rest I guess, this is the default Ubuntu type theme. >> > No, it's a bug in Qt or in the font you use. It happens sometimes. You should > use another font! > > Regards, But it's the default font/theme for Ubuntu 10.4... I didn't change a think about the theme. It looks horrible too, can't you choose another one for comments in your gambas ide project? So it works ok always... Regards, Ron. From tobiasboe1 at ...20... Tue Nov 30 17:54:36 2010 From: tobiasboe1 at ...20... (tobias) Date: Tue, 30 Nov 2010 17:54:36 +0100 Subject: [Gambas-user] Connection.Create and .Index In-Reply-To: <201011292232.47501.gambas@...1...> References: <4CF40369.1060103@...20...> <201011292141.39948.gambas@...1...> <4CF415FE.5080105@...20...> <201011292232.47501.gambas@...1...> Message-ID: <4CF52C4C.6030709@...20...> Beno?t Minisini schrieb: >> so how does the driver know where to write a result record to in a >> database? >> >> thanks, >> tobi >> > > Well, do you know what SQL is? > i know that it is a query language to manipulate data in databases, but that doesn't seem to be enough if you can answer my question with the definition of sql :-) regards, tobi From gambas at ...1... Tue Nov 30 18:04:24 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 30 Nov 2010 18:04:24 +0100 Subject: [Gambas-user] Connection.Create and .Index In-Reply-To: <4CF52C4C.6030709@...20...> References: <4CF40369.1060103@...20...> <201011292232.47501.gambas@...1...> <4CF52C4C.6030709@...20...> Message-ID: <201011301804.24423.gambas@...1...> > Beno?t Minisini schrieb: > >> so how does the driver know where to write a result record to in a > >> database? > >> > >> thanks, > >> tobi > > > > Well, do you know what SQL is? > > i know that it is a query language to manipulate data in databases, but > that doesn't seem to be enough if you can answer my question with the > definition of sql :-) > > regards, > tobi > Gambas database drivers communicates with the client libraries mainly by using SQL statements. They do not know where to write a result in the database. But they need to identify a record to modify it, and the only standard way is having a primary key in the table. With no primary key, you can't use the Edit() method. Regards, -- Beno?t Minisini From tobiasboe1 at ...20... Tue Nov 30 18:11:54 2010 From: tobiasboe1 at ...20... (tobias) Date: Tue, 30 Nov 2010 18:11:54 +0100 Subject: [Gambas-user] Connection.Create and .Index In-Reply-To: <201011301804.24423.gambas@...1...> References: <4CF40369.1060103@...20...> <201011292232.47501.gambas@...1...> <4CF52C4C.6030709@...20...> <201011301804.24423.gambas@...1...> Message-ID: <4CF5305A.9080005@...20...> Beno?t Minisini schrieb: >> Beno?t Minisini schrieb: >>>> so how does the driver know where to write a result record to in a >>>> database? >>>> >>>> thanks, >>>> tobi >>> Well, do you know what SQL is? >> i know that it is a query language to manipulate data in databases, but >> that doesn't seem to be enough if you can answer my question with the >> definition of sql :-) >> >> regards, >> tobi >> > > Gambas database drivers communicates with the client libraries mainly by using > SQL statements. They do not know where to write a result in the database. > > But they need to identify a record to modify it, and the only standard way is > having a primary key in the table. With no primary key, you can't use the > Edit() method. > > Regards, > ...as i just saw testing my code :-) i thought this works this way but i wasn't sure... thank you!