From shuveb at ...122... Thu Apr 1 10:05:41 2004 From: shuveb at ...122... (shuveb at ...122...) Date: Thu, 01 Apr 2004 04:05:41 -0400 Subject: [Gambas-devel] Compiling under Debian unstable / KDE 3.2 Message-ID: <20040401080541.79F6A21AFF9@...123...> > But it should be fixed. By the way, where is the CVS located? > I could not find any on SF.net. I don't think there is a CVS rep. All changes must be presented to the maintainer. Cheers Shuveb -- _______________________________________________ Fill Your Inbox With Beer Check out the new way better Beer Mail @beer.com http://mms.beer.com/beermail/ From christian.sahastume at ...4... Thu Apr 1 16:34:46 2004 From: christian.sahastume at ...4... (Sahastume Christian) Date: Thu, 1 Apr 2004 16:34:46 +0200 Subject: [Gambas-devel] A cdrom component Message-ID: <200404011634.46994.christian.sahastume@...4...> Hi Beno?t, I made you share (a few days ago on the list users) my intention to write a component of access to the cdrom (via lib SDL). I based myself on your component SDL to write mine. I am blocked by the fact that Gambas give me an error (Error 24#: No startup method) I have this same error when I try to employ the following code (on yours SDL component): PUBLIC MyMusic as Music PUBLIC Sub Main() MyMusic.Load("/home/user/file.wav") MyMusic.Play() END My test of component is compiled well and the methods and properties are posted correctly in Gambas. But this code raise an error: PUBLIC MyCdrom as Cdrom PUBLIC Sub Main() DIM n as INTEGER n = MyCdrom.Devices.Count() PRINT n END Could you give me a hand to allow me to advance? (I join you my little try) Regards.... Christian. Fin du message encapsul? -------------- next part -------------- A non-text attachment was scrubbed... Name: cdrom.tar.bz2 Type: application/x-tbz Size: 67295 bytes Desc: not available URL: From gambas at ...1... Sat Apr 3 12:03:08 2004 From: gambas at ...1... (Benoit Minisini) Date: Sat, 3 Apr 2004 12:03:08 +0200 Subject: [Gambas-devel] A cdrom component In-Reply-To: <200404011634.46994.christian.sahastume@...4...> References: <200404011634.46994.christian.sahastume@...4...> Message-ID: <200404031203.08211.gambas@...1...> On Thursday 01 April 2004 16:34, Sahastume Christian wrote: > Hi Beno?t, Bonjour Christian, Je suis fran?ais (visiblement ce n'est pas clair sur mon site...) D?sol? pour ma r?ponse tardive, je suis bien occup? ! > > I made you share (a few days ago on the list users) my intention to write a > component of access to the cdrom (via lib SDL). > I based myself on your component SDL to write mine. I am blocked by the > fact that Gambas give me an error (Error 24#: No startup method) Il faut d?finir une m?thode Main() publique ET statique. Le mot-clef STATIC n'est pas n?cessaire si la classe de d?marrage est un module. > > I have this same error when I try to employ the following code (on yours > SDL component): > > PUBLIC MyMusic as Music > > PUBLIC Sub Main() > > MyMusic.Load("/home/user/file.wav") > MyMusic.Play() > > END > > My test of component is compiled well and the methods and properties are > posted correctly in Gambas. But this code raise an error: > > PUBLIC MyCdrom as Cdrom > > PUBLIC Sub Main() > DIM n as INTEGER > > n = MyCdrom.Devices.Count() > PRINT n > > END > > Could you give me a hand to allow me to advance? (I join you my little > try) > > Regards.... > > Christian. > J'ai regard? ton code. Voici ce que je peux te dire: Tu fais un SDL_Init(SDL_CDROM), ok, mais un SDL_Quit() comme si le composant ?tait seul ? utiliser SDL. Erreur ! :-) Je pense qu'il est inutile de cr?er un composant ? part. Autant int?grer tout ?a au composant SDL d?j? existant. Comme ?a, il n'y aura qu'un seul SDL_Quit(). Tu ne fais pas de distinction entre ce qui est statique (global ? toute la classe, comme la liste des lecteurs de cdroms) et dynamique (ce qui est propre ? un lecteur en particulier). En clair, CDRom.Devices doit ?tre statique. Je supprimerais la classe CDRom.Devices, et cr?erais une propri?t? CDRom.Devices qui retournerait un String[] contenant le nom de chaque CD-Rom. Pour utiliser un lecteur de CD-Rom, il faut instancier la classe. Comme le nombre de lecteurs est limit?, il vaudrait mieux : - D'avoir une m?thode statique _get qui retourne toujours la m?me instance pour le m?me lecteur. Elle prendrait en param?tre le nom du lecteur sous forme de cha?ne - Que la classe CDROM soit "GB_NOT_CREATABLE()", pour que l'utilisateur ne puisse pas lui-m?me cr?er d'objets CDRoms. Ainsi, on pourrait faire CdRom[CdRom.Devices[0]].Play ! Cdrom.Status doit retourner des constantes enti?res, et non des cha?nes ! Utilise directement les valeurs des constants SDL. CdRom devrait avoir une propri?t? Name qui retourne le nom du device. Il faudrait renommer Track.CurrentPos en Track.Pos (tout simplement) Remplac 'GB.Error ("Insert a media in your cdrom drive");' par 'GB.Error ("No media");' Voil?, c'est tout :-) Si tu peux faire toutes ces modifs, ce serait super. Garde ton composant, je m'occuperai ensuite de l'int?grer au gb.sdl principal. Amicalement, -- Benoit Minisini mailto:gambas at ...1... From gambas at ...1... Sat Apr 3 13:44:58 2004 From: gambas at ...1... (Benoit Minisini) Date: Sat, 3 Apr 2004 13:44:58 +0200 Subject: [Gambas-devel] German translation 0.91 In-Reply-To: <200403241633.47498.elentirmo@...51...> References: <200403241633.47498.elentirmo@...51...> Message-ID: <200404031344.58498.gambas@...1...> On Wednesday 24 March 2004 16:33, Marco Bauer wrote: > Hi, > > here is an updated german translation for gambas 0.91. > > Gru? > Marco Bauer Thanks Marco! Regards, -- Benoit Minisini mailto:gambas at ...1... From christian.sahastume at ...4... Sat Apr 3 14:23:40 2004 From: christian.sahastume at ...4... (Sahastume Christian) Date: Sat, 3 Apr 2004 14:23:40 +0200 Subject: [Gambas-devel] Merci pour les infos In-Reply-To: <200404031203.08211.gambas@...1...> References: <200404011634.46994.christian.sahastume@...4...> <200404031203.08211.gambas@...1...> Message-ID: <200404031423.40739.christian.sahastume@...4...> Le samedi 3 Avril 2004 12:03, Benoit Minisini a ?crit?: > On Thursday 01 April 2004 16:34, Sahastume Christian wrote: > > Hi Beno?t, > > Bonjour Christian, > Je suis fran?ais (visiblement ce n'est pas clair sur mon site...) > > D?sol? pour ma r?ponse tardive, je suis bien occup? ! Merci pour ta r?ponse. Je savais que tu ?tais fran?ais, mais je pensais que la liste devel ?tait en "english in the text". Pas de probl?me pour la reponse tardive, je comprends que tu as du pain sur la planche..... > > Si tu peux faire toutes ces modifs, ce serait super. Garde ton composant, > je m'occuperai ensuite de l'int?grer au gb.sdl principal. > > Amicalement, J'essayerai de faire de mon mieux avec tes indications et te tiendrai au courant d?s que j'aurai quelque chose qui tiens la route... A bient?t donc ... Amicalement. From gambas at ...1... Sat Apr 3 14:27:29 2004 From: gambas at ...1... (Benoit Minisini) Date: Sat, 3 Apr 2004 14:27:29 +0200 Subject: [Gambas-devel] Merci pour les infos In-Reply-To: <200404031423.40739.christian.sahastume@...4...> References: <200404011634.46994.christian.sahastume@...4...> <200404031203.08211.gambas@...1...> <200404031423.40739.christian.sahastume@...4...> Message-ID: <200404031427.29015.gambas@...1...> On Saturday 03 April 2004 14:23, Sahastume Christian wrote: > Le samedi 3 Avril 2004 12:03, Benoit Minisini a ?crit?: > > On Thursday 01 April 2004 16:34, Sahastume Christian wrote: > > > Hi Beno?t, > > > > Bonjour Christian, > > Je suis fran?ais (visiblement ce n'est pas clair sur mon site...) > > > > D?sol? pour ma r?ponse tardive, je suis bien occup? ! > > Merci pour ta r?ponse. Je savais que tu ?tais fran?ais, mais je pensais que > la liste devel ?tait en "english in the text". Pas de probl?me pour la > reponse tardive, je comprends que tu as du pain sur la planche..... > You are right. We should better talk english there. If you want to speak french, write me directly. Regards, -- Benoit Minisini mailto:gambas at ...1... From danielcampos at ...45... Sat Apr 3 23:08:49 2004 From: danielcampos at ...45... (Daniel Campos) Date: Sat, 03 Apr 2004 23:08:49 +0200 Subject: [Gambas-devel] spanish translation / 0.92 Message-ID: <1081026483.3632.1.camel@...102...> Hi! Here's Spanish translation for Gambas IDE 0.92. Now I have my new computer working (it is really a beast, record compiling Gambas! ), and I hope now I can restart my work in this project! Regards, -- Daniel Campos -------------- next part -------------- A non-text attachment was scrubbed... Name: gambas-es.po Type: text/x-po Size: 53951 bytes Desc: not available URL: From ronstk at ...124... Mon Apr 5 09:37:24 2004 From: ronstk at ...124... (ron) Date: Mon, 5 Apr 2004 09:37:24 +0200 Subject: [Gambas-devel] FFindAdv-092-085 update Message-ID: <200404050937.24084.ronstk@...124...> Hi Benoit, The main change is in the btnFind and btnFindPrevious. In this the part around the search is changed. The result is now that only files with modified set are searched again. The *.Froozen was to prevent the scroll of the text in the editor during the search and the are back in the code, now the right way. Second changes are in the ReadOption for setting a flag that when it is set a full search is done. Also a change in the Find combo set this flag Marks for this update are ' From g.brandl at ...78... Tue Apr 6 17:49:57 2004 From: g.brandl at ...78... (Georg Brandl) Date: Tue, 06 Apr 2004 17:49:57 +0200 Subject: [Gambas-devel] Bug in the LIKE operator Message-ID: <4072D1A5.3090003@...78...> Hello brave developers of my favourite BASIC language, I've most probably found a bug in the Gambas LIKE operator. Regular expressions of the form "[xyz]" always result in an "Missing brace" error. I've looked at the source code, and I think I isolated the problem. Here is my diff: --- gbx_regexp.c.bk 2004-04-06 17:09:33.935987720 +0200 +++ gbx_regexp.c 2004-04-06 17:05:48.984185592 +0200 @@ -161,10 +161,10 @@ for(;;) { - if (len_pattern == 0) - THROW(E_REGEXP, "Brace missing"); if (cp == ']') break; + if (len_pattern == 0) + THROW(E_REGEXP, "Brace missing"); _next_pattern(); } The problem is that when the ] brace, which is the last character of the pattern, is in cp, len_pattern is already zero, so the exception is thrown before the check for the brace is executed. I hope I described the problem properly. Thank you, Georg Brandl From nigel at ...2... Tue Apr 6 17:59:53 2004 From: nigel at ...2... (Nigel Gerrard) Date: Tue, 6 Apr 2004 16:59:53 +0100 Subject: [Gambas-devel] Database Component Message-ID: <000a01c41bf0$346a28d0$030a0a0a@...97...> Benoit, I have been making some changes to the database drivers and will submit them later when complete, but I have noticed some strange behavour in what I believe to to be the interpreter. If you create a table thus: create table test ( id integer not null, name test , primary key (id)); Then populate with a couple of records. insert into test ( 1, 'fred'); insert into test ( 2, 'sid'); Next create a gambas program to edit one of the records. . . . DIM rTest AS Result . . rTest = $hConn.Edit("test","id = 2") FOR EACH rTest.Field PRINT rTest.Field.Name NEXT PRINT rTest!id & ":" & rTest!name rTest!name = "sidney" rTest.Update Now run with the MySQL and Sqlite drivers and you get: id name ...... #-1: Unknown field: Name With postgresql you get what you would expect: id name 2:sid You might think that this is a problem only with the two drivers, but if you print the the paramater name being handed to field_index in main.c you will see that the value is 'Name' and not 'name' and it is only because postgresql is non case-sensative that it too doesn't fail. My belief is that during parsing, the token Name is mistaken for name. Nigel -------------- next part -------------- An HTML attachment was scrubbed... URL: From nigel at ...2... Tue Apr 6 18:25:18 2004 From: nigel at ...2... (Nigel Gerrard) Date: Tue, 6 Apr 2004 17:25:18 +0100 Subject: [Gambas-devel] Resend Database component Message-ID: <001901c41bf3$c0703b00$030a0a0a@...97...> (Don't knowwhy there was an incomplete message last time) Benoit, I have been making some changes to the database drivers and will submit them later when complete, but I have noticed some strange behavour in what I believe to to be the interpreter. If you create a table thus: create table test ( id integer not null, name test , primary key (id)); Then populate with a couple of records. insert into test ( 1, 'fred'); insert into test ( 2, 'sid'); Next create a gambas program to edit one of the records. . . DIM rTest AS Result . . rTest = $hConn.Edit("test","id = 2") FOR EACH rTest.Field PRINT rTest.Field.Name NEXT PRINT rTest!id & ":" & rTest!name rTest!name = "sidney" rTest.Update Now run with the MySQL and Sqlite drivers and you get: id name ...... #-1: Unknown field: Name With postgresql you get what you would expect: id name 2:sid You might think that this is a problem only with the two drivers, but if you print the the paramater name being handed to field_index in main.c you will see that the value is 'Name' and not 'name' and it is only because postgresql is non case-sensative that it too doesn't fail. My belief is that during parsing, the token Name is mistaken for name. Nigel -------------- next part -------------- An HTML attachment was scrubbed... URL: From nigel at ...2... Tue Apr 6 18:38:39 2004 From: nigel at ...2... (Nigel Gerrard) Date: Tue, 6 Apr 2004 17:38:39 +0100 Subject: [Gambas-devel] Database Component issue (Attempt 3) Message-ID: <000f01c41bf5$9ee63140$030a0a0a@...97...> Don't knowwhy there was an incomplete message last time) Benoit, I have been making some changes to the database drivers and will submit them later when complete, but I have noticed some strange behavour in what I believe to to be the interpreter. If you create a table thus: create table test ( id integer not null, name test , primary key (id)); Then populate with a couple of records. insert into test ( 1, 'fred'); insert into test ( 2, 'sid'); Next create a gambas program to edit one of the records. DIM rTest AS Result rTest = $hConn.Edit("test","id = 2") FOR EACH rTest.Field PRINT rTest.Field.Name NEXT PRINT rTest!id & ":" & rTest!name rTest!name = "sidney" rTest.Update Now run with the MySQL and Sqlite drivers and you get: id name ...... #-1: Unknown field: Name With postgresql you get what you would expect: id name 2:sid You might think that this is a problem only with the two drivers, but if you print the the paramater name being handed to field_index in main.c you will see that the value is 'Name' and not 'name' and it is only because postgresql is non case-sensative that it too doesn't fail. My belief is that during parsing, the token Name is mistaken for name. Nigel -------------- next part -------------- An HTML attachment was scrubbed... URL: From ronstk at ...124... Tue Apr 6 20:37:23 2004 From: ronstk at ...124... (ron) Date: Tue, 6 Apr 2004 20:37:23 +0200 Subject: [Gambas-devel] Database Component issue (Attempt 3) In-Reply-To: <000f01c41bf5$9ee63140$030a0a0a@...97...> References: <000f01c41bf5$9ee63140$030a0a0a@...97...> Message-ID: <200404062037.23988.ronstk@...124...> On Tuesday 06 April 2004 18:38, Nigel Gerrard wrote: > Don't knowwhy there was an incomplete message last time) > snip > You might think that this is a problem only with the two drivers, but if > you print the the paramater name being handed to field_index in main.c you > will see that the value is 'Name' and not 'name' and it is only because > postgresql is non case-sensative that it too doesn't fail. > I wonder if mysql is case sensitive. As far I know it isn't when i use phpmyadmin or with some other tools from the winbox in the past. The id field name was in uppercase in the table but all my sql lines where in lowercase and it worked. Getting the results in associated array (with names instead numbers) is in my view more the problem. i.e. myfield['lower']=123 or myfield['LOWER']=123 can have difference. Here it is not the problem of MySQL but from the program that is case sensitive for string compare of the names as in php the array index names are case sensitive as far I know. > My belief is that during parsing, the token Name is mistaken for name. > > Nigel This can be true. If you have some comments in the program typed but forgot to start with ' then in the comment the gambas key words are also changed. Ron From olerida at ...120... Wed Apr 7 00:13:26 2004 From: olerida at ...120... (Oscar =?ISO-8859-1?Q?L=E9rida_Mons=F3?=) Date: Wed, 07 Apr 2004 00:13:26 +0200 Subject: [Gambas-devel] About .lock files Message-ID: <1081289606.2027.239.camel@...121...> Hello, When you opens a project with new version 0.92, gambas intends to write the .lock file on current project folder. When a normal user intends to open a example application, the user obtains the following message: "Access forbidden", because gambas can't write the .lock file (the normal user don't have permission to write on examples folder). I think that to write the .lock file on /var/lock or /tmp with name ProjectName.lock or something similar is better. But if the user don't have permission to write on project folder then .lock file isn't needed (or yes?), because user can't modify project. Can to be one solution, make .lock file only when the user has permission to write? What about this? Thanks, -- From gambas at ...1... Wed Apr 7 22:05:31 2004 From: gambas at ...1... (Benoit Minisini) Date: Wed, 7 Apr 2004 22:05:31 +0200 Subject: [Gambas-devel] About .lock files In-Reply-To: <1081289606.2027.239.camel@...121...> References: <1081289606.2027.239.camel@...121...> Message-ID: <200404072205.31463.gambas@...1...> On Wednesday 07 April 2004 00:13, Oscar L?rida Mons? wrote: > Hello, > > When you opens a project with new version 0.92, gambas intends to write > the .lock file on current project folder. > > When a normal user intends to open a example application, the user > obtains the following message: "Access forbidden", because gambas can't > write the .lock file (the normal user don't have permission to write on > examples folder). > > I think that to write the .lock file on /var/lock or /tmp with name > ProjectName.lock or something similar is better. But if the user don't > have permission to write on project folder then .lock file isn't needed > (or yes?), because user can't modify project. Can to be one solution, > make .lock file only when the user has permission to write? > > What about this? > > Thanks, You are right. The IDE should detect a read-only project, and prevent locking in this case. Regards, -- Benoit Minisini mailto:gambas at ...1... From gambas at ...1... Fri Apr 9 20:12:13 2004 From: gambas at ...1... (Benoit Minisini) Date: Fri, 9 Apr 2004 20:12:13 +0200 Subject: [Gambas-devel] spanish translation / 0.92 In-Reply-To: <1081026483.3632.1.camel@...102...> References: <1081026483.3632.1.camel@...102...> Message-ID: <200404092012.13230.gambas@...1...> On Saturday 03 April 2004 23:08, Daniel Campos wrote: > Hi! > > > Here's Spanish translation for Gambas IDE 0.92. > Now I have my new computer working (it is really > a beast, record compiling Gambas! ), and I hope > now I can restart my work in this project! > > > Regards, Thanks Daniel. Welcome back ! :-) -- Benoit Minisini mailto:gambas at ...1... From gambas at ...1... Fri Apr 9 20:17:09 2004 From: gambas at ...1... (Benoit Minisini) Date: Fri, 9 Apr 2004 20:17:09 +0200 Subject: [Gambas-devel] FFindAdv-092-085 update In-Reply-To: <200404050937.24084.ronstk@...124...> References: <200404050937.24084.ronstk@...124...> Message-ID: <200404092017.09478.gambas@...1...> On Monday 05 April 2004 09:37, ron wrote: > Hi Benoit, > > The main change is in the btnFind and btnFindPrevious. > In this the part around the search is changed. > The result is now that only files with modified set are searched again. > > The *.Froozen was to prevent the scroll of the text in the editor during > the search and the are back in the code, now the right way. > > Second changes are in the ReadOption for setting a flag that when it > is set a full search is done. Also a change in the Find combo set this flag > > Marks for this update are ' > Thanks for the invitation in the gambas-devel list > > Regards, > > Ron OK! Included for the next version... Regards, -- Benoit Minisini mailto:gambas at ...1... From ronstk at ...124... Fri Apr 9 20:56:29 2004 From: ronstk at ...124... (ron) Date: Fri, 9 Apr 2004 20:56:29 +0200 Subject: [Gambas-devel] FFindAdv-092-085 update In-Reply-To: <200404092017.09478.gambas@...1...> References: <200404050937.24084.ronstk@...124...> <200404092017.09478.gambas@...1...> Message-ID: <200404092056.29275.ronstk@...124...> On Friday 09 April 2004 20:17, Benoit Minisini wrote: > On Monday 05 April 2004 09:37, ron wrote: > > Hi Benoit, > > > > The main change is in the btnFind and btnFindPrevious. > > In this the part around the search is changed. > > The result is now that only files with modified set are searched again. > > > > The *.Froozen was to prevent the scroll of the text in the editor during > > the search and the are back in the code, now the right way. > > > > Second changes are in the ReadOption for setting a flag that when it > > is set a full search is done. Also a change in the Find combo set this > > flag > > > > Marks for this update are ' > > > Thanks for the invitation in the gambas-devel list > > > > Regards, > > > > Ron > > OK! Included for the next version... > > Regards, Thanks but I had a small bug in a special case and could not reproduce it. Now i have found it. It occurs if the editor is in modified state and the find is used the first time after start gambas, the list is empty in that case. in FFindAdv-092-085 update btnFind_Click() in FFindAdv-092-085 update btnFindPrevious_Click() hForm = Project.ActiveForm hEdit = hForm.Editor IF hForm.IsModified() THEN cvwFindList.Moveto(hForm.path) cvwFindList.Item.Delete '<--------------- error in empty list ENDIF The fixed code: hForm = Project.ActiveForm hEdit = hForm.Editor IF hForm.IsModified() THEN '20040408 ' on empty list object not found IF cvwFindList.Moveto(hForm.path)=FALSE THEN cvwFindList.Item.Delete ENDIF ENDIF This is at both buttons Find and FindPrevious. This fixes the problem. At the moment there are several other tricks in it so a really upload of the file is not wise I think. From gambas at ...1... Fri Apr 9 21:02:29 2004 From: gambas at ...1... (Benoit Minisini) Date: Fri, 9 Apr 2004 21:02:29 +0200 Subject: [Gambas-devel] FFindAdv-092-085 update In-Reply-To: <200404092056.29275.ronstk@...124...> References: <200404050937.24084.ronstk@...124...> <200404092017.09478.gambas@...1...> <200404092056.29275.ronstk@...124...> Message-ID: <200404092102.29951.gambas@...1...> On Friday 09 April 2004 20:56, ron wrote: > On Friday 09 April 2004 20:17, Benoit Minisini wrote: > > On Monday 05 April 2004 09:37, ron wrote: > > > Hi Benoit, > > > > > > The main change is in the btnFind and btnFindPrevious. > > > In this the part around the search is changed. > > > The result is now that only files with modified set are searched again. > > > > > > The *.Froozen was to prevent the scroll of the text in the editor > > > during the search and the are back in the code, now the right way. > > > > > > Second changes are in the ReadOption for setting a flag that when it > > > is set a full search is done. Also a change in the Find combo set this > > > flag > > > > > > Marks for this update are ' > > > > > Thanks for the invitation in the gambas-devel list > > > > > > Regards, > > > > > > Ron > > > > OK! Included for the next version... > > > > Regards, > > Thanks but I had a small bug in a special case and could not reproduce it. > Now i have found it. It occurs if the editor is in modified state and the > find is used the first time after start gambas, the list is empty in that > case. > > in FFindAdv-092-085 update btnFind_Click() > in FFindAdv-092-085 update btnFindPrevious_Click() > > hForm = Project.ActiveForm > hEdit = hForm.Editor > IF hForm.IsModified() THEN > cvwFindList.Moveto(hForm.path) > cvwFindList.Item.Delete '<--------------- error in empty list > ENDIF > > The fixed code: > > hForm = Project.ActiveForm > hEdit = hForm.Editor > IF hForm.IsModified() THEN > '20040408 ' on empty list object not found > IF cvwFindList.Moveto(hForm.path)=FALSE THEN > cvwFindList.Item.Delete > ENDIF > ENDIF > > This is at both buttons Find and FindPrevious. This fixes the problem. > At the moment there are several other tricks in it so a really upload of > the file is not wise I think. > > I will not deliver gambas 0.93 until you send me a Find form while saying me everything is OK :-) -- Benoit Minisini mailto:gambas at ...1... From ronstk at ...124... Fri Apr 9 21:56:50 2004 From: ronstk at ...124... (ron) Date: Fri, 9 Apr 2004 21:56:50 +0200 Subject: [Gambas-devel] FFindAdv-092-085 update In-Reply-To: <200404092102.29951.gambas@...1...> References: <200404050937.24084.ronstk@...124...> <200404092056.29275.ronstk@...124...> <200404092102.29951.gambas@...1...> Message-ID: <200404092156.50229.ronstk@...124...> On Friday 09 April 2004 21:02, Benoit Minisini wrote: > > I will not deliver gambas 0.93 until you send me a Find form while saying > me everything is OK :-) This is chantage. I will pay this time with pleasure because you fixed the TabStrip :=) Hereby I send you the Find form and class and saying to you everything is OK. :) (and you in action for the fix.) -------------- next part -------------- A non-text attachment was scrubbed... Name: FFindAdv-092-0.86.tar.gz Type: application/x-tgz Size: 4781 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: businessman_nervous_sm_wht.gif Type: image/gif Size: 5414 bytes Desc: not available URL: From gambas at ...1... Fri Apr 9 22:29:31 2004 From: gambas at ...1... (Benoit Minisini) Date: Fri, 9 Apr 2004 22:29:31 +0200 Subject: [Gambas-devel] Database Component In-Reply-To: <000a01c41bf0$346a28d0$030a0a0a@...97...> References: <000a01c41bf0$346a28d0$030a0a0a@...97...> Message-ID: <200404092229.31838.gambas@...1...> On Tuesday 06 April 2004 17:59, Nigel Gerrard wrote: > Benoit, > > I have been making some changes to the database drivers and will submit > them later when complete, but I have noticed some strange behavour in what > I believe to to be the interpreter. > > If you create a table thus: > > create table test ( id integer not null, name test , primary key (id)); > > Then populate with a couple of records. > > insert into test ( 1, 'fred'); > insert into test ( 2, 'sid'); > > Next create a gambas program to edit one of the records. > > . > . > . > DIM rTest AS Result > . > . > rTest = $hConn.Edit("test","id = 2") > FOR EACH rTest.Field > PRINT rTest.Field.Name > NEXT > > PRINT rTest!id & ":" & rTest!name > rTest!name = "sidney" > rTest.Update > > > Now run with the MySQL and Sqlite drivers and you get: > > id > name > ...... #-1: Unknown field: Name > > With postgresql you get what you would expect: > id > name > 2:sid > > You might think that this is a problem only with the two drivers, but if > you print the the paramater name being handed to field_index in main.c you > will see that the value is 'Name' and not 'name' and it is only because > postgresql is non case-sensative that it too doesn't fail. > > My belief is that during parsing, the token Name is mistaken for name. > > Nigel Maybe the compiler use "Name" because of the first occurrence of name. This could be seen as a bug :-) But I think the database component should be case insensitive. By forcing field names to lowercase for example. What do you think about that ? Regards, -- Benoit Minisini mailto:gambas at ...1... From gambas at ...1... Fri Apr 9 22:31:40 2004 From: gambas at ...1... (Benoit Minisini) Date: Fri, 9 Apr 2004 22:31:40 +0200 Subject: [Gambas-devel] Bug in the LIKE operator In-Reply-To: <4072D1A5.3090003@...78...> References: <4072D1A5.3090003@...78...> Message-ID: <200404092231.40514.gambas@...1...> On Tuesday 06 April 2004 17:49, Georg Brandl wrote: > Hello brave developers of my favourite BASIC language, > > I've most probably found a bug in the Gambas LIKE operator. > > Regular expressions of the form "[xyz]" always result in an "Missing > brace" error. I've looked at the source code, and I think I isolated the > problem. > > Here is my diff: > > --- gbx_regexp.c.bk 2004-04-06 17:09:33.935987720 +0200 > +++ gbx_regexp.c 2004-04-06 17:05:48.984185592 +0200 > @@ -161,10 +161,10 @@ > > for(;;) > { > - if (len_pattern == 0) > - THROW(E_REGEXP, "Brace missing"); > if (cp == ']') > break; > + if (len_pattern == 0) > + THROW(E_REGEXP, "Brace missing"); > _next_pattern(); > } > > The problem is that when the ] brace, which is the last character of the > pattern, is in cp, len_pattern is already zero, so the exception is > thrown before the check for the brace is executed. > > I hope I described the problem properly. > > Thank you, > > Georg Brandl > > Thank you very much for your patch. I will include it in the next version. Regards, -- Benoit Minisini mailto:gambas at ...1... From abidoo.too at ...4... Sat Apr 10 00:11:17 2004 From: abidoo.too at ...4... (Fabien Bodard) Date: Sat, 10 Apr 2004 00:11:17 +0200 Subject: [Gambas-devel] FFindAdv-092-085 update In-Reply-To: <200404092156.50229.ronstk@...124...> References: <200404050937.24084.ronstk@...124...> <200404092102.29951.gambas@...1...> <200404092156.50229.ronstk@...124...> Message-ID: <200404100011.17346.abidoo.too@...4...> Le Vendredi 9 Avril 2004 21:56, ron a ?crit : > On Friday 09 April 2004 21:02, Benoit Minisini wrote: > > I will not deliver gambas 0.93 until you send me a Find form while saying > > me everything is OK :-) > > This is chantage. I will pay this time with pleasure because > you fixed the TabStrip :=) > > Hereby I send you the Find form and class and saying to you everything is > OK. :) > > (and you in action for the fix.) hum.. i think it need an option to force search windows to be on top... Because with list, it's not really usefull Fabien From abidoo.too at ...4... Sat Apr 10 00:30:39 2004 From: abidoo.too at ...4... (Fabien Bodard) Date: Sat, 10 Apr 2004 00:30:39 +0200 Subject: [Gambas-devel] I think i've found a bug... in clipboard Message-ID: <200404100030.39267.abidoo.too@...4...> Hi benoit I've test that in kde 3.1 and 3.2 and i found the same problem... and a big one because it crash my system. It appear when i try to modify the fmain in ide, i've put two toolbutton, made a copy of one, ... when i paste it one or two time, gambas enter in a loop (i think) and fill my memory ... after what i must to reboot. Can you see that ? Fabien From ronstk at ...124... Sat Apr 10 00:53:57 2004 From: ronstk at ...124... (ron) Date: Sat, 10 Apr 2004 00:53:57 +0200 Subject: [Gambas-devel] FFindAdv-092-085 update In-Reply-To: <200404100011.17346.abidoo.too@...4...> References: <200404050937.24084.ronstk@...124...> <200404092156.50229.ronstk@...124...> <200404100011.17346.abidoo.too@...4...> Message-ID: <200404100053.57286.ronstk@...124...> On Saturday 10 April 2004 00:11, Fabien Bodard wrote: > Le Vendredi 9 Avril 2004 21:56, ron a ?crit : > > On Friday 09 April 2004 21:02, Benoit Minisini wrote: > > > I will not deliver gambas 0.93 until you send me a Find form while > > > saying me everything is OK :-) > > > > This is chantage. I will pay this time with pleasure because > > you fixed the TabStrip :=) > > > > Hereby I send you the Find form and class and saying to you everything is > > OK. :) > > > > (and you in action for the fix.) > > hum.. i think it need an option to force search windows to be on top... > Because with list, it's not really usefull > > Fabien > Hi Fabien, You can resize the form when the list function is on. Do not forget if you click in the list and it is forced to front you can't see the place in the editor. The width of the form has also to do with the translation should fit on it and the theme style. For me it may also be smaller. I just have send a small update for improvement in upcoming 0.93 This cosmetic change can be next version if Benoit allows to do and I must send a new, not forsee yet, update. Ron From ronstk at ...124... Sat Apr 10 01:40:09 2004 From: ronstk at ...124... (ron) Date: Sat, 10 Apr 2004 01:40:09 +0200 Subject: [Gambas-devel] I think i've found a bug... in clipboard In-Reply-To: <200404100030.39267.abidoo.too@...4...> References: <200404100030.39267.abidoo.too@...4...> Message-ID: <200404100140.09860.ronstk@...124...> On Saturday 10 April 2004 00:30, Fabien Bodard wrote: > Hi benoit > I've test that in kde 3.1 and 3.2 and i found the same problem... and a big > one because it crash my system. > > It appear when i try to modify the fmain in ide, i've put two toolbutton, > made a copy of one, ... when i paste it one or two time, gambas enter in a > loop (i think) and fill my memory ... after what i must to reboot. > > Can you see that ? > > Fabien I can not produce it in FMain. I see something other. The name properties are increment for each copy but not the default caption. Cosmetic question. From gambas at ...1... Sat Apr 10 11:08:41 2004 From: gambas at ...1... (Benoit Minisini) Date: Sat, 10 Apr 2004 11:08:41 +0200 Subject: [Gambas-devel] I think i've found a bug... in clipboard In-Reply-To: <200404100030.39267.abidoo.too@...4...> References: <200404100030.39267.abidoo.too@...4...> Message-ID: <200404101108.41807.gambas@...1...> On Saturday 10 April 2004 00:30, Fabien Bodard wrote: > Hi benoit > I've test that in kde 3.1 and 3.2 and i found the same problem... and a big > one because it crash my system. > > It appear when i try to modify the fmain in ide, i've put two toolbutton, > made a copy of one, ... when i paste it one or two time, gambas enter in a > loop (i think) and fill my memory ... after what i must to reboot. > > Can you see that ? > > Fabien > > Could you send me a complete project that has this bug ? Regards, -- Benoit Minisini mailto:gambas at ...1... From abidoo.too at ...4... Sun Apr 11 15:53:58 2004 From: abidoo.too at ...4... (Fabien Bodard) Date: Sun, 11 Apr 2004 15:53:58 +0200 Subject: [Gambas-devel] Please help me... Message-ID: <200404111553.58814.abidoo.too@...4...> Sorry i send that here because i don't know why my message never appear on gambas user mailing list How i can use the drag and drop feature? I don't understand why i can't drop anything directly on a form on other non textual object. I send my test Fabien -------------- next part -------------- A non-text attachment was scrubbed... Name: gbdocktest-0.0.tar.gz Type: application/x-tgz Size: 853 bytes Desc: not available URL: From ronstk at ...124... Sun Apr 11 17:49:51 2004 From: ronstk at ...124... (ron) Date: Sun, 11 Apr 2004 17:49:51 +0200 Subject: [Gambas-devel] Please help me... In-Reply-To: <200404111553.58814.abidoo.too@...4...> References: <200404111553.58814.abidoo.too@...4...> Message-ID: <200404111749.52058.ronstk@...124...> On Sunday 11 April 2004 15:53, Fabien Bodard wrote: > Sorry i send that here because i don't know why my message never appear on > gambas user mailing list > > How i can use the drag and drop feature? > > I don't understand why i can't drop anything directly on a form on other > non textual object. > > I send my test > > Fabien I had a program made for trial of this operation. On _dragmove event I get the correct info but the _Drop crashes now Painfull my SQL builder using the drag and drop that has worked crashes also. debug window shows on the dragmove also good info but crash on drop. May be it is broken. Tested with v0.91 and it works again 0.92 fails on drop. the trial is included in gbdocktest-0.5.tar.gz but works not in 0.92 anymore! Drag with right mouse butten entries from the listbox on the right side to the tableview on the left. The selected is put in row 2 of the column you do the drop Code is a bit mess. Keep the console open, there are a lot of messages what happens on the background. Ron -------------- next part -------------- A non-text attachment was scrubbed... Name: gbdocktest-0.5.tar.gz Type: application/x-tgz Size: 5054 bytes Desc: not available URL: From abidoo.too at ...4... Sun Apr 11 18:43:01 2004 From: abidoo.too at ...4... (Fabien Bodard) Date: Sun, 11 Apr 2004 18:43:01 +0200 Subject: [Gambas-devel] Please help me... In-Reply-To: <200404111749.52058.ronstk@...124...> References: <200404111553.58814.abidoo.too@...4...> <200404111749.52058.ronstk@...124...> Message-ID: <200404111843.02573.abidoo.too@...4...> Le dimanche 11 Avril 2004 17:49, ron a ?crit : > On Sunday 11 April 2004 15:53, Fabien Bodard wrote: > > Sorry i send that here because i don't know why my message never appear > > on gambas user mailing list > > > > How i can use the drag and drop feature? > > > > I don't understand why i can't drop anything directly on a form on other > > non textual object. > > > > I send my test > > > > Fabien > > I had a program made for trial of this operation. > On _dragmove event I get the correct info but the _Drop crashes now > > Painfull my SQL builder using the drag and drop that has worked crashes > also. debug window shows on the dragmove also good info but crash on drop. > > May be it is broken. > Tested with v0.91 and it works again 0.92 fails on drop. > > the trial is included in gbdocktest-0.5.tar.gz but works not in 0.92 > anymore! Drag with right mouse butten entries from the listbox on the right > side to the tableview on the left. > The selected is put in row 2 of the column you do the drop > Code is a bit mess. Keep the console open, there are a lot of messages what > happens on the background. > > > Ron So it seem to be a reall problem... if benoit can see it... In fact a long way before a stable version 1 Fabien From gambas at ...1... Mon Apr 12 18:25:02 2004 From: gambas at ...1... (Benoit Minisini) Date: Mon, 12 Apr 2004 18:25:02 +0200 Subject: [Gambas-devel] Please help me... In-Reply-To: <200404111553.58814.abidoo.too@...4...> References: <200404111553.58814.abidoo.too@...4...> Message-ID: <200404121825.02601.gambas@...1...> On Sunday 11 April 2004 15:53, Fabien Bodard wrote: > Sorry i send that here because i don't know why my message never appear on > gambas user mailing list > > How i can use the drag and drop feature? > > I don't understand why i can't drop anything directly on a form on other > non textual object. > > I send my test > > Fabien What's the problem exactly ? The only one I found in your project is that you call Drag with "data" as type, which is forbidden. When you use the MimeType parameter of Drag, it must begin with "text/". You can't specify a mimetype for something other than text data. Regards, -- Benoit Minisini mailto:gambas at ...1... From ronstk at ...124... Mon Apr 12 19:18:20 2004 From: ronstk at ...124... (ron) Date: Mon, 12 Apr 2004 19:18:20 +0200 Subject: [Gambas-devel] Please help me... In-Reply-To: <200404121825.02601.gambas@...1...> References: <200404111553.58814.abidoo.too@...4...> <200404121825.02601.gambas@...1...> Message-ID: <200404121918.21414.ronstk@...124...> On Monday 12 April 2004 18:25, Benoit Minisini wrote: > On Sunday 11 April 2004 15:53, Fabien Bodard wrote: > > Sorry i send that here because i don't know why my message never appear > > on gambas user mailing list > > > > How i can use the drag and drop feature? > > > > I don't understand why i can't drop anything directly on a form on other > > non textual object. > > > > I send my test > > > > Fabien > > What's the problem exactly ? > > The only one I found in your project is that you call Drag with "data" as > type, which is forbidden. When you use the MimeType parameter of Drag, it > must begin with "text/". You can't specify a mimetype for something other > than text data. > > Regards, I have problems to Benoit PUBLIC SUB ShowDrag(dmsg AS String, drg AS Object) PRINT "---- Drag object at " & dmsg PRINT "drag.data =";drag.Data PRINT "drag.format =";drag.format PRINT "drag.type =";drag.type PRINT "drag.action =";drag.action PRINT "drag.source =";drag.source PRINT "drag.x =";drag.x PRINT "drag.y =";drag.y END PUBLIC SUB TableView1_drag() DIM idx AS Integer PRINT "TableView1_drag() event" ShowDrag("tbv drag", Drag) <-------- this one goes OK END '---------------------------- PUBLIC SUB tableview1_drop() DIM col AS Integer DIM hLB AS ListBox PRINT "tableview1_drop() event" ShowDrag("Drop tbv", Drag) <------- this crashes gambas in v0.92 END PUBLIC SUB ListBox1_MouseMove() IF mouse.button =2 THEN 'right button ListBox1.drag("LBframe") ' after the drag a listbox click occurs ENDIF END in the ShowDrag drg as Object is no error. It is simple not used the drag.property are all as expected on TableView1_drag() The Drag carried to the sub gives no error the crash in tableview1_drop() is only in v0.92 and works in v0.91 The Drag carried to the sub gives here an error Help say SUB Drag ( Data AS Variant [ , Format AS String ] )? For Data I can only geve a string. anything else gives a error at this line. the complete project is in gbdocktest-0.5.tar.gz i send to Fabian here in the maillist. From gambas at ...1... Mon Apr 12 20:45:44 2004 From: gambas at ...1... (Benoit Minisini) Date: Mon, 12 Apr 2004 20:45:44 +0200 Subject: [Gambas-devel] Please help me... In-Reply-To: <200404121918.21414.ronstk@...124...> References: <200404111553.58814.abidoo.too@...4...> <200404121825.02601.gambas@...1...> <200404121918.21414.ronstk@...124...> Message-ID: <200404122045.44470.gambas@...1...> On Monday 12 April 2004 19:18, ron wrote: > > I have problems to Benoit > > PUBLIC SUB ShowDrag(dmsg AS String, drg AS Object) > PRINT "---- Drag object at " & dmsg > PRINT "drag.data =";drag.Data > PRINT "drag.format =";drag.format > PRINT "drag.type =";drag.type > PRINT "drag.action =";drag.action > PRINT "drag.source =";drag.source > PRINT "drag.x =";drag.x > PRINT "drag.y =";drag.y > END > > PUBLIC SUB TableView1_drag() > DIM idx AS Integer > PRINT "TableView1_drag() event" > > ShowDrag("tbv drag", Drag) <-------- this one goes OK > > END > '---------------------------- > PUBLIC SUB tableview1_drop() > DIM col AS Integer > DIM hLB AS ListBox > > PRINT "tableview1_drop() event" > ShowDrag("Drop tbv", Drag) <------- this crashes gambas in v0.92 > > END > > PUBLIC SUB ListBox1_MouseMove() > IF mouse.button =2 THEN 'right button > ListBox1.drag("LBframe") > ' after the drag a listbox click occurs > ENDIF > END > > > in the ShowDrag drg as Object is no error. It is simple not used > the drag.property are all as expected on TableView1_drag() > The Drag carried to the sub gives no error > > the crash in tableview1_drop() is only in v0.92 and works in v0.91 > The Drag carried to the sub gives here an error > > Help say SUB Drag ( Data AS Variant [ , Format AS String ] )? > For Data I can only geve a string. anything else gives a error > at this line. > > the complete project is in gbdocktest-0.5.tar.gz i send to Fabian > here in the maillist. > > Just to tell you that Drag is a static class, like Key or Mouse. There is no drag object. -- Benoit Minisini mailto:gambas at ...1... From ronstk at ...124... Mon Apr 12 21:19:15 2004 From: ronstk at ...124... (ron) Date: Mon, 12 Apr 2004 21:19:15 +0200 Subject: [Gambas-devel] Please help me... In-Reply-To: <200404122045.44470.gambas@...1...> References: <200404111553.58814.abidoo.too@...4...> <200404121918.21414.ronstk@...124...> <200404122045.44470.gambas@...1...> Message-ID: <200404122119.15471.ronstk@...124...> On Monday 12 April 2004 20:45, Benoit Minisini wrote: > On Monday 12 April 2004 19:18, ron wrote: > > I have problems to Benoit > > > > PUBLIC SUB ShowDrag(dmsg AS String, drg as object) <-- removed PUBLIC SUB ShowDrag(dmsg AS String) <-- drg removed > > PRINT "---- Drag object at " & dmsg > > PRINT "drag.data =";drag.Data > > PRINT "drag.format =";drag.format > > PRINT "drag.type =";drag.type > > PRINT "drag.action =";drag.action > > PRINT "drag.source =";drag.source > > PRINT "drag.x =";drag.x > > PRINT "drag.y =";drag.y > > END > > > > PUBLIC SUB TableView1_drag() > > DIM idx AS Integer > > PRINT "TableView1_drag() event" > > > > ShowDrag("tbv drag", Drag) <-------- this one goes OK ShowDrag("tbv drag") <-------- this one goes OK > > > > END > > '---------------------------- > > PUBLIC SUB tableview1_drop() > > DIM col AS Integer > > DIM hLB AS ListBox > > > > PRINT "tableview1_drop() event" > > ShowDrag("Drop tbv", Drag) <------- this crashes gambas in v0.92 ShowDrag("Drop tbv") <------- this one goes now OK > > > > END > > > > PUBLIC SUB ListBox1_MouseMove() > > IF mouse.button =2 THEN 'right button > > ListBox1.drag("LBframe") ListBox1.drag(ListBox1) <--- bad Drag Format > > ' after the drag a listbox click occurs > > ENDIF > > END > > > > > > in the ShowDrag drg as Object is no error. It is simple not used > > the drag.property are all as expected on TableView1_drag() > > The Drag carried to the sub gives no error > > > > the crash in tableview1_drop() is only in v0.92 and works in v0.91 > > The Drag carried to the sub gives here an error > > > > Help say SUB Drag ( Data AS Variant [ , Format AS String ] )? > > For Data I can only geve a string. anything else gives a error > > at this line. Here I get still a error. I want to pass the Listbox and other controls as object and the _drop should detect the source and take what is marked from it or other things relevant for the drop place. > > > > the complete project is in gbdocktest-0.5.tar.gz i send to Fabian > > here in the maillist. > > Just to tell you that Drag is a static class, like Key or Mouse. There is > no drag object. Thanks, now I understand why the drag in Show did not work. Is it possible to use a different icon for this kind of class in the help browser? But 1 question is open. Data AS Variant Only string type is accepted. listbox.id also error. I dit try dim ivar as variant ivar=123 .drag(ivar) and this has also error. From gambas at ...1... Mon Apr 12 21:31:34 2004 From: gambas at ...1... (Benoit Minisini) Date: Mon, 12 Apr 2004 21:31:34 +0200 Subject: [Gambas-devel] About drag & drop In-Reply-To: <200404111553.58814.abidoo.too@...4...> References: <200404111553.58814.abidoo.too@...4...> Message-ID: <200404122131.34526.gambas@...1...> On Sunday 11 April 2004 15:53, Fabien Bodard wrote: > Sorry i send that here because i don't know why my message never appear on > gambas user mailing list > > How i can use the drag and drop feature? > > I don't understand why i can't drop anything directly on a form on other > non textual object. > > I send my test > > Fabien To start a drag --------------- TheSource.Drag(TheData, [TheTextFormat]) TheSource is the control or the form that is the source of the drag. TheData is a variant. Actually, text and picture are supported. TheTextFormat allows you to specify the text MIME type. It must be "text/something". To catch a drag --------------- Set the Drop control property to TRUE. Be careful! Some controls already accept drops: TextBox, TextArea, ... Your drag & drop management may interfer with the QT one! The Drag event is raised when the mouse enters the control. Call "STOP EVENT" to cancel it, and to tells the world that you don't want this drop. In the next version, the Drag event will be sent repeatedly while the mouse moves inside the control. The event is stopped when you cancel it. The Drop event is raised when the user releases the mouse button on the control (if the drag was accepted of course). Getting information about dropped data -------------------------------------- You get information with the Drag class, WHICH IS A STATIC CLASS, like Clipboard. Drag.Icon: sets the picture you want to see while the mouse is dragged. Drag.Data: the data dropped. Drag.Type: the drag type as a constant: Drag.Text or Drag.Image Drag.Format: the mime type as a string. Drag.Action: which action the user wants: Drag.Copy, Drag.Link or Drag.Move Drag.Source: the control source. Drag.X & Drag.Y: the mouse coordinates inside the destination control. Drag(Source, Data, Format) is an equivalent of Source.Drag(Data, Format) The crash of Ron was due to the fact that it sends directly a class into an object variable. The interpreter didn't like and crashed. He should raise an error instead, shouldn't he ? -- Benoit Minisini mailto:gambas at ...1... From ronstk at ...124... Mon Apr 12 21:59:46 2004 From: ronstk at ...124... (ron) Date: Mon, 12 Apr 2004 21:59:46 +0200 Subject: [Gambas-devel] About drag & drop In-Reply-To: <200404122131.34526.gambas@...1...> References: <200404111553.58814.abidoo.too@...4...> <200404122131.34526.gambas@...1...> Message-ID: <200404122159.47044.ronstk@...124...> > TheData is a variant. Actually, text and picture are supported Arggg, this explains very much. > The crash of Ron was due to the fact that it sends directly a class into an > object variable. The interpreter didn't like and crashed. He should raise > an error instead, shouldn't he ? I think so, Do I have to send a bug rport ;-) This info is very usefull for me and i hope Fabien also and can use it now. Many Thanks Ron From gambas at ...1... Mon Apr 12 22:42:03 2004 From: gambas at ...1... (Benoit Minisini) Date: Mon, 12 Apr 2004 22:42:03 +0200 Subject: [Gambas-devel] About drag & drop In-Reply-To: <200404122159.47044.ronstk@...124...> References: <200404111553.58814.abidoo.too@...4...> <200404122131.34526.gambas@...1...> <200404122159.47044.ronstk@...124...> Message-ID: <200404122242.03383.gambas@...1...> On Monday 12 April 2004 21:59, ron wrote: > > TheData is a variant. Actually, text and picture are supported > > Arggg, this explains very much. > > > The crash of Ron was due to the fact that it sends directly a class into > > an object variable. The interpreter didn't like and crashed. He should > > raise an error instead, shouldn't he ? > > I think so, Do I have to send a bug rport ;-) > > This info is very usefull for me and i hope Fabien also and can use it now. > > Many Thanks > > Ron > > Your crash is fixed - This is a bug introduced in 0.92 because of the change in object referencing/dereferencing management. Now you can safely pass class names to functions or variables. They are automatically converted into "class" object, i.e. gambas objects whose type is "Class". Regards, -- Benoit Minisini mailto:gambas at ...1... From eng_ak at ...100... Tue Apr 13 19:26:11 2004 From: eng_ak at ...100... (Ahmad Kamal) Date: Tue, 13 Apr 2004 19:26:11 +0200 Subject: [Gambas-devel] Presentation Message-ID: <407C22B3.4070005@...100...> Hi all, I will be making a 15 minute presentation about Gambas to the local LUG in Egypt. Has anyone done anything similar? If so, please send me your presentation, it will be a good starting point. ' If not, what do u think are the essential features I should show at the presentation? Thnx From nigel at ...2... Wed Apr 14 13:01:07 2004 From: nigel at ...2... (Nigel Gerrard) Date: Wed, 14 Apr 2004 12:01:07 +0100 Subject: [Gambas-devel] Database Component References: <000a01c41bf0$346a28d0$030a0a0a@...97...> <200404092229.31838.gambas@...1...> Message-ID: <000001c4223e$638d2e10$bd9f4f51@...97...> Benoit, I've found out that field names are indeed "not case sensative" in mysql, but table names and database names may be. In sqlite, table names and field names are case in sensative so it is an issue with each of the drivers. I will correct this amongst all the other changes and pass to you. Nigel ----- Original Message ----- From: "Benoit Minisini" To: Sent: Friday, April 09, 2004 9:29 PM Subject: Re: [Gambas-devel] Database Component > On Tuesday 06 April 2004 17:59, Nigel Gerrard wrote: > > Benoit, > > > > I have been making some changes to the database drivers and will submit > > them later when complete, but I have noticed some strange behavour in what > > I believe to to be the interpreter. > > > > If you create a table thus: > > > > create table test ( id integer not null, name test , primary key (id)); > > > > Then populate with a couple of records. > > > > insert into test ( 1, 'fred'); > > insert into test ( 2, 'sid'); > > > > Next create a gambas program to edit one of the records. > > > > . > > . > > . > > DIM rTest AS Result > > . > > . > > rTest = $hConn.Edit("test","id = 2") > > FOR EACH rTest.Field > > PRINT rTest.Field.Name > > NEXT > > > > PRINT rTest!id & ":" & rTest!name > > rTest!name = "sidney" > > rTest.Update > > > > > > Now run with the MySQL and Sqlite drivers and you get: > > > > id > > name > > ...... #-1: Unknown field: Name > > > > With postgresql you get what you would expect: > > id > > name > > 2:sid > > > > You might think that this is a problem only with the two drivers, but if > > you print the the paramater name being handed to field_index in main.c you > > will see that the value is 'Name' and not 'name' and it is only because > > postgresql is non case-sensative that it too doesn't fail. > > > > My belief is that during parsing, the token Name is mistaken for name. > > > > Nigel > > Maybe the compiler use "Name" because of the first occurrence of name. This > could be seen as a bug :-) > > But I think the database component should be case insensitive. By forcing > field names to lowercase for example. What do you think about that ? > > Regards, > > -- > Benoit Minisini > mailto:gambas at ...1... > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Gambas-devel mailing list > Gambas-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-devel From ronstk at ...124... Wed Apr 14 21:36:56 2004 From: ronstk at ...124... (ron) Date: Wed, 14 Apr 2004 21:36:56 +0200 Subject: [Gambas-devel] Database Component In-Reply-To: <000001c4223e$638d2e10$bd9f4f51@...97...> References: <000a01c41bf0$346a28d0$030a0a0a@...97...> <200404092229.31838.gambas@...1...> <000001c4223e$638d2e10$bd9f4f51@...97...> Message-ID: <200404142136.56276.ronstk@...124...> On Wednesday 14 April 2004 13:01, Nigel Gerrard wrote: > Benoit, > > I've found out that field names are indeed "not case sensative" in mysql, > but table names and database names may be. > In sqlite, table names and field names are case in sensative so it is an > issue with each of the drivers. ?I will correct this amongst all > the other changes and pass to you. > > Nigel table names are indeed case sensitive and database name for 99 % too Ron From sourceforge-raindog2 at ...19... Wed Apr 14 22:00:31 2004 From: sourceforge-raindog2 at ...19... (Rob) Date: Wed, 14 Apr 2004 16:00:31 -0400 Subject: [Gambas-devel] Database Component In-Reply-To: <200404142136.56276.ronstk@...124...> References: <000a01c41bf0$346a28d0$030a0a0a@...97...> <000001c4223e$638d2e10$bd9f4f51@...97...> <200404142136.56276.ronstk@...124...> Message-ID: <200404141600.31432.sourceforge-raindog2@...19...> On Wednesday 14 April 2004 15:36, ron wrote: > > I've found out that field names are indeed "not case > > sensative" in mysql, but table names and database names may > > be. > table names are indeed case sensitive > and database name for 99 % too In fact, mysql table names (and probably database names) are case insensitive if you store them on a case insensitive filesystem such as vfat or ntfs (not that I'm recommending that. :) ) I also think the ANSI SQL specification says table names need to be case insensitive, so sooner or later mysql will have to come around. Rob From ronstk at ...124... Wed Apr 14 22:51:54 2004 From: ronstk at ...124... (ron) Date: Wed, 14 Apr 2004 22:51:54 +0200 Subject: [Gambas-devel] Database Component In-Reply-To: <200404141600.31432.sourceforge-raindog2@...19...> References: <000a01c41bf0$346a28d0$030a0a0a@...97...> <200404142136.56276.ronstk@...124...> <200404141600.31432.sourceforge-raindog2@...19...> Message-ID: <200404142251.54865.ronstk@...124...> On Wednesday 14 April 2004 22:00, Rob wrote: > On Wednesday 14 April 2004 15:36, ron wrote: > > > I've found out that field names are indeed "not case > > > sensative" in mysql, but table names and database names may > > > be. > > > > table names are indeed case sensitive > > and database name for 99 % too > > In fact, mysql table names (and probably database names) are case > insensitive if you store them on a case insensitive filesystem > such as vfat or ntfs (not that I'm recommending that. :) ) I > also think the ANSI SQL specification says table names need to > be case insensitive, so sooner or later mysql will have to come > around. > > Rob > oeps then I must be very correct table names are indeed case sensitive and database name for 99 % too if you are using Linux filesystem reiser or ext2 as I use, and Yes i have to places for the database files. My winbox was using the ext2 part when it was running. From danielcampos at ...45... Wed Apr 14 23:15:56 2004 From: danielcampos at ...45... (Daniel Campos) Date: Wed, 14 Apr 2004 23:15:56 +0200 Subject: [Gambas-devel] An idea Message-ID: <1081977356.3475.5.camel@...102...> "La possibilit? de dessiner des pages HTML depuis l?IDE, enfin disons plut?t des formulaires sp?ciaux transformables en HTML. L?id?al serait de transformer un formulaire en XUL et une partie du code Gambas en JavaScript. Mais je ne sais pas si c?est possible..." Beno?t Minisini le 23 janvier 2004 Yesterday I had a vision, and I remembered these words... Well, at this moment this project is just a hack, but is growing fast. Just run the project, open Mozilla (no, Konqueror does not work yet), and use the following address : http://127.0.0.1:8383 Then, you can also close mozilla and write in the command line: mozilla -chrome http://127.0.0.1:8383 How it looks? Regards, -- Daniel Campos -------------- next part -------------- A non-text attachment was scrubbed... Name: XULizer-0.0.tar.gz Type: application/x-compressed-tar Size: 11708 bytes Desc: not available URL: From gambas at ...1... Thu Apr 15 00:01:16 2004 From: gambas at ...1... (Benoit Minisini) Date: Thu, 15 Apr 2004 00:01:16 +0200 Subject: [Gambas-devel] An idea In-Reply-To: <1081977356.3475.5.camel@...102...> References: <1081977356.3475.5.camel@...102...> Message-ID: <200404150001.17087.gambas@...1...> On Wednesday 14 April 2004 23:15, Daniel Campos wrote: > "La possibilit? de dessiner des pages HTML depuis l?IDE, enfin disons > plut?t des formulaires sp?ciaux transformables en HTML. L?id?al serait > de transformer un formulaire en XUL et une partie du code Gambas en > JavaScript. > > Mais je ne sais pas si c?est possible..." > > Beno?t Minisini le 23 janvier 2004 > > > Yesterday I had a vision, and I remembered these words... Well, at this > moment this project is just a hack, but is growing fast. > > Just run the project, open Mozilla (no, Konqueror does not work yet), > and use the following address : http://127.0.0.1:8383 > > Then, you can also close mozilla and write in the command line: > > mozilla -chrome http://127.0.0.1:8383 > > How it looks? > > > Regards, This is the idea :-) The problem are: - The differences between QT and XUL. - The dynamic behaviour of the form, i.e. Gambas -> Javascript. An idea could be making a XUL component. The IDE will draw forms by using QT Widgets. But at execution, the translation is done. Regards, -- Benoit Minisini mailto:gambas at ...1... From daniel.campos at ...103... Thu Apr 15 20:07:12 2004 From: daniel.campos at ...103... (Daniel) Date: Thu, 15 Apr 2004 20:07:12 +0200 Subject: [Gambas-devel] An idea In-Reply-To: <200404150001.17087.gambas@...1...> References: <1081977356.3475.5.camel@...102...> <200404150001.17087.gambas@...1...> Message-ID: <1082052420.3547.9.camel@...102...> > > > > Regards, > > This is the idea :-) > > The problem are: > - The differences between QT and XUL. Well, of course not all can be translated, but a good interface can be developed using this class, very much better that those developed with pure HTML, and fastest, so I will continue working on this experiment! > - The dynamic behaviour of the form, i.e. Gambas -> Javascript. You can not work as you use to do in a remote application, a part of the work must be done in the server, and another part in the client, so I will add a gambas-XUL class for any graphical object, so I can manage events i two ways: -> To be executed in the client : Javascript added in a string to the XUL code -> To be executed in the server : an XML-RPC call to the server, executed using Gambas code Unless somebody wants to write a "GambasScript" language for Mozilla and Konqueror I don't see any way to translate gambas code to javascript in the client...However knowing Gambas and a little JavaScript, a quite good server CGI could be written! > > An idea could be making a XUL component. The IDE will draw forms by using QT > Widgets. But at execution, the translation is done. > I will develope a component in the future, at this moment Gambas is faster to develope it... Regards, Daniel Campos -------------- next part -------------- A non-text attachment was scrubbed... Name: XULizer-0.1.tar.gz Type: application/x-compressed-tar Size: 19715 bytes Desc: not available URL: From gambas at ...1... Thu Apr 15 22:51:44 2004 From: gambas at ...1... (Benoit Minisini) Date: Thu, 15 Apr 2004 22:51:44 +0200 Subject: [Gambas-devel] An idea In-Reply-To: <1082052420.3547.9.camel@...102...> References: <1081977356.3475.5.camel@...102...> <200404150001.17087.gambas@...1...> <1082052420.3547.9.camel@...102...> Message-ID: <200404152251.44456.gambas@...1...> On Thursday 15 April 2004 20:07, Daniel wrote: > > > Regards, > > > > This is the idea :-) > > > > The problem are: > > - The differences between QT and XUL. > > Well, of course not all can be translated, but a good interface can > be developed using this class, very much better that those developed > with pure HTML, and fastest, so I will continue working on this > experiment! > > > - The dynamic behaviour of the form, i.e. Gambas -> Javascript. > > You can not work as you use to do in a remote application, a part of the > work must be done in the server, and another part in the client, so I > will add a gambas-XUL class for any graphical object, so I can manage > events i two ways: > > -> To be executed in the client : Javascript added in a string to the > XUL code > > -> To be executed in the server : an XML-RPC call to the server, > executed using Gambas code In the future, I want to make Gambas projects scriptable by exporting some of the project classes. I imagine some component that creates a socket (unix or inet) and define a protocol allowing another gambas project to use the exported classes like normal classes. Isn't it possible to merge the two ideas ? This is a question, I don't know :-) - Sending XUL interface and receiving XML-RPC calls. - Calling a project class from another project by XML-RPC. > > Unless somebody wants to write a "GambasScript" language for Mozilla and > Konqueror I don't see any way to translate gambas code to javascript in > the client...However knowing Gambas and a little JavaScript, a quite > good server CGI could be written! > > > An idea could be making a XUL component. The IDE will draw forms by using > > QT Widgets. But at execution, the translation is done. > > I will develope a component in the future, at this moment Gambas is > faster to develope it... After 1.0, I will try to allow Gambas projects to be used like components: exporting controls, having a *.component file, ... At the moment, the USE instruction allows including another compiled gambas project into a running one, but it is not the same behaviour than loading a component. This way, your XUL developmement could be a true component, even if developed with Gambas :-) > > Regards, > > Daniel Campos Regards, -- Benoit Minisini mailto:gambas at ...1... From eng_ak at ...100... Fri Apr 16 13:24:47 2004 From: eng_ak at ...100... (Ahmad Kamal) Date: Fri, 16 Apr 2004 13:24:47 +0200 Subject: [Gambas-devel] Bug-Auto complete TextEdit? Message-ID: <407FC27F.30306@...100...> Hi all, I am using the latest 0.92a version. The auto-complete feature rocks :) But, something is strange on my machine. Autocompletes works for (Label, TextLabel, and Button) but doesn't work for (TextEdit, RadioButton, ComboBox). Doesn't work means no menu is displayed when I hit the '.' key!! Is this normal. What is the difference bet label & textlabel BTW regards From ronstk at ...124... Fri Apr 16 14:00:41 2004 From: ronstk at ...124... (ron) Date: Fri, 16 Apr 2004 14:00:41 +0200 Subject: [Gambas-devel] Bug-Auto complete TextEdit? In-Reply-To: <407FC27F.30306@...100...> References: <407FC27F.30306@...100...> Message-ID: <200404161400.42286.ronstk@...124...> On Friday 16 April 2004 13:24, Ahmad Kamal wrote: > Hi all, > > I am using the latest 0.92a version. The auto-complete feature rocks > > :) But, something is strange on my machine. Autocompletes works for > > (Label, TextLabel, and Button) but doesn't work for (TextEdit, > RadioButton, ComboBox). Doesn't work means no menu is displayed when I > hit the '.' key!! Is this normal. At my box they work. When the class name consist of one letter, like the network examples, the autocomplete has indeed problems and do not work. Benoit does know it and is is searching a workaround for it. I found in the past this behaviour also but after a ENDIF end END IF The END WITH had the same problem and these are fixed now in 92a But maybe it is still better to use ENDIF. May be there is somewhere a syntax error. Is it in every procedure or a special one? If that is the case mail it here. One importand thing is the ' gambas class file at the first line. It looks to me the autocomplete can be sensitive for it when missing. Can not reliable reproduce it for bug report atm. If it is not there the code to get the symbols can or does forget the newly added symbols to add in this list sometimes as I found in my project and then the autocomplete miss it too or did not work. It can be a failure in my own code and it is based and uses the original class from the IDE. > > What is the difference bet label & textlabel BTW Label This control is a label that shows a text. TextLabel This class implements a control displaying HTML text. > > regards From danielcampos at ...45... Sat Apr 17 21:11:09 2004 From: danielcampos at ...45... (Daniel Campos) Date: Sat, 17 Apr 2004 21:11:09 +0200 Subject: [Gambas-devel] Arrangement bug in IDE Message-ID: <1082229069.11826.3.camel@...102...> Hi: Working with the IDE, if you change 'Arrangement' property in a form or any other control with that property, the 'preview' of the form does not show the new appearance of that form, you have to execute the program to see how it looks. By other side, 'Panel' has 'Arrangement' property, but not 'Frame', why? Regards, Daniel Campos -- Daniel Campos From gambas at ...1... Sat Apr 17 23:06:17 2004 From: gambas at ...1... (Benoit Minisini) Date: Sat, 17 Apr 2004 23:06:17 +0200 Subject: [Gambas-devel] Arrangement bug in IDE In-Reply-To: <1082229069.11826.3.camel@...102...> References: <1082229069.11826.3.camel@...102...> Message-ID: <200404172306.17716.gambas@...1...> On Saturday 17 April 2004 21:11, Daniel Campos wrote: > Hi: > > > Working with the IDE, if you change 'Arrangement' property in a form or > any other control with that property, the 'preview' of the form does not > show the new appearance of that form, you have to execute the program to > see how it looks. > > By other side, 'Panel' has 'Arrangement' property, but not 'Frame', > why? Because of the frame drawn, arrangement is useless : the children will be drawn on top of the frame border ! Arrangement is very primitive at the momemnt. I don't want to implement NOW a full layout engine. Maybe in the next version. Regards, -- Benoit Minisini mailto:gambas at ...1... From gambas at ...1... Sat Apr 17 23:14:07 2004 From: gambas at ...1... (Benoit Minisini) Date: Sat, 17 Apr 2004 23:14:07 +0200 Subject: [Gambas-devel] Arrangement bug in IDE In-Reply-To: <200404172306.17716.gambas@...1...> References: <1082229069.11826.3.camel@...102...> <200404172306.17716.gambas@...1...> Message-ID: <200404172314.07960.gambas@...1...> On Saturday 17 April 2004 23:06, Benoit Minisini wrote: > On Saturday 17 April 2004 21:11, Daniel Campos wrote: > > Hi: > > > > > > Working with the IDE, if you change 'Arrangement' property in a form or > > any other control with that property, the 'preview' of the form does not > > show the new appearance of that form, you have to execute the program to > > see how it looks. This is not a bug. I wanted that! :-) I didn't want the children controls to be moved because of an unwanted change of the Arrangement property. Regards, -- Benoit Minisini mailto:gambas at ...1... From nigel at ...2... Mon Apr 19 18:45:49 2004 From: nigel at ...2... (Nigel Gerrard) Date: Mon, 19 Apr 2004 17:45:49 +0100 Subject: [Gambas-devel] QT.BorderProperty (qt.ext) Message-ID: <002401c4262d$c6319ae0$77514d51@...97...> Benoit, In CLCDNumber.cpp, CTableView.cpp and CTextView.cpp QT.BorderProperty is to invoke the set up of the border properties for the Widget. I can see from the CWidget.cpp and main.cpp code that this is currently set to CWIDGET_border_simple. Whilst this appears to be okay for CTableView and CTextView because they use only the true and false attributes, there is a problem with CLCDNumber.cpp as it can take five settings : None, pPlain, Sunken, Raised and Etched - as defined in CWIDGET_border_full. Is there any problem with adopting the function. Nigel -------------- next part -------------- An HTML attachment was scrubbed... URL: From linus at ...2... Mon Apr 19 20:12:39 2004 From: linus at ...2... (Nigel Gerrard) Date: Mon, 19 Apr 2004 19:12:39 +0100 Subject: [Gambas-devel] More Database Driver Changes Message-ID: <1082398358.14479.15.camel@...128...> Benoit, Could you have a look at the following changes and feedback your comments. The changes apply to gambas-0.92. The major change is an attempt to implement access to fields with the same name contained in a multiple table query. e.g. select fred.field1, sid.field1 from fred, field. In order for this to work within Postgresql, version 7.4.1 or greater needs to be available. Please note that I have defined the $ character to separate tablename$filedname within the class. It would be better if '.' could be used as $ is valid within field/tablename. In each of my attempts to use '.' a syntax error is thrown (thus I've gone to $). I'm sure that you will be able to get around this. Project.Module is a rouh demonstration of what I have been trying to achieve. The other major change (and probably the one I have not tested enough) is the use of parameters within .EXEC eg. .Exec("select * from &1", table) would get evaluated as select * from 'table' which would throw an error in mysql or postgresql. Have a look at the changelogs to see what else has been implemented. Drop me a line if there is anything you need. Nigel -------------- next part -------------- A non-text attachment was scrubbed... Name: db_changes.tar.gz Type: application/x-compressed-tar Size: 11881 bytes Desc: not available URL: -------------- next part -------------- ' Gambas class file PRIVATE $hConn AS NEW Connection PUBLIC PROCEDURE Main() DIM rTest AS Result DIM sTable1 AS String DIM sTable2 AS String sTable1 = "Player" sTable2 = "Team" WITH $hConn '.Type = "postgresql" '.Type = "mysql" .Type = "sqlite" .Host = "localhost" IF $hConn.Type = "sqlite" THEN '.Host = "/home/ngerrard/gambas-0.91a/app/gambas-database-manager/" ELSE '.Host = "10.10.10.0" ENDIF .Login = "ngerrard" .Password = "" END WITH TRY $hConn.Open IF ERROR THEN PRINT "NIGEL: DATABASE NOT Running" 'END IF IF NOT $hConn.Database.Exist("test") THEN PRINT "Database does not exist" $hConn.Database.Create("test") $hConn.Close QUIT ENDIF $hConn.Close $hConn.Name = "test" $hConn.Open ' Create and populate the tables Create_tables() Enter_details() 'Test 1 'rTest = $hConn.Exec("select * from Player,Team where Player.Field2 = Team.id") 'rTest = $hConn.Exec("select Player.Field1, Team.Field1, Field2 from Player,Team where Player.Field2 = Team.id") 'Test 2 'rTest = $hConn.Exec("select Player.Field1 a, Team.Field1 b, Field2 from Player,Team where Player.Field2 = Team.id") 'Test 3 'rTest = $hConn.Exec("select a.Field1, b.Field1, Field2 from Player a,Team b where a.Field2 = b.id") '- does not work. Player.Field1 is shown 'Test 4 'rTest = $hConn.Exec("select a.Field1 as Foo, b.Field1 as Bar, Field2 from Player a,Team b where a.Field2 = b.id") 'Test 5 rTest = $hConn.Exec("select * from &1, &2 where Player.Field2 = Team.id", sTable1, sTable2) PRINT "The select statement contains the following fields:" FOR EACH rTest.Field PRINT rTest.Field.Name NEXT PRINT "Type : " & $hConn.Type & " Database : " & $hConn.Name PRINT "Records selected :" WHILE rTest.Available 'Test 1 'PRINT rTest!Player$Field1 & ":" & rTest!Team$Field1 & ":" & rTest!Field2 'Test 2 'success for mysql 'fails for postgresql 'partly for sqlite 'PRINT rTest!a & ":" & rTest!b & ":" & rTest!Field2 'works with mysql, not with postgresql and sort of works with sqlite 'Test 3 'fails for sqlite 'success for mysql 'fails for postgresql 'PRINT rTest!a$Field1 & ":" & rTest!b$Field1 & ":" & rTest!Field2 'Test 4 'For postgresql test: Works 'PRINT rTest!foo & ":" & rTest!bar & ":" & rTest!Field2 'Test 5 PRINT rTest!Player$Field1 & ":" & rTest!Team$Field1 & ":" & rTest!Field2 rTest.MoveNext WEND ' Drop Tables $hConn.Tables.Delete("Player") $hConn.Tables.Delete("Team") $hConn.Close PRINT "Ending..." 'CATCH ' PRINT "Nigel: Cannot open database" END PUBLIC SUB Create_tables() DIM hTable AS Table IF $hConn.Tables.Exist("Player") THEN $hConn.Tables.Delete("Player") ENDIF IF $hConn.Tables.Exist("Team") THEN $hConn.Tables.Delete("Team") ENDIF IF $hConn.Type = "mysql" THEN hTable = $hConn.Tables.Create("Player","InnoDB") ELSE hTable = $hConn.Tables.Create("Player") ENDIF hTable.Field.Create("id", gb.Integer) hTable.Field.Create("Field1", gb.String) hTable.Field.Create("Field2", gb.Integer) hTable.PrimaryKey=["id"] hTable.Update hTable = $hConn.Tables.Create("Team") hTable.Field.Create("id", gb.Integer) hTable.Field.Create("Field1", gb.String) hTable.PrimaryKey=["id"] hTable.Update PRINT "Tables successfully Created" 'CATCH ' PRINT "Unable to Create Table" END PUBLIC SUB Enter_details() DIM rTest AS Result rTest= $hConn.Create("Player") rTest!id = 1 rTest!Field1 = "Kevin Keegan" rTest!Field2 = 1 rTest.Update rTest!id = 2 rTest!Field1 = "Joe Royle" rTest!Field2 = 2 rTest.Update rTest= $hConn.Create("Team") rTest!id = 1 rTest!Field1 = "Liverpool" rTest.Update rTest!id = 2 rTest!Field1 = "Manchester City" rTest.Update END From danielcampos at ...45... Sun Apr 25 21:14:07 2004 From: danielcampos at ...45... (Daniel Campos) Date: Sun, 25 Apr 2004 21:14:07 +0200 Subject: [Gambas-devel] Compression / "Drivered" Message-ID: <1082920447.14275.8.camel@...102...> Hi; Well, after my hard work (that I hardly use to do :-), this is the compression component modified so there's a generic compression interface and (at this moment) two compression drivers: zlib and bzlib2 My first idea was to call the bzlib2 driver simply 'bzlib', but I'm not sure if a 'bzlib' (without 2) algorithm exists, so... Benoit, I suppose you'll need to add any detection routine in the configure.in for the zlib and bzlib libraries. These are the files needed to compile the two drivers if you're using Mandrake and urpmi: zlib1 zlib1-devel libbzip2 libbzip2-devel The headers needed for compilation are placed at /usr/include/zlib.h and /usr/include/bzlib.h I think all current Linux distributions have these two libraries available. Regards, Daniel Campos -- Daniel Campos -------------- next part -------------- A non-text attachment was scrubbed... Name: compress_0_0_1_gb_0_93.tar.bz2 Type: application/x-bzip Size: 36672 bytes Desc: not available URL: From danielcampos at ...45... Tue Apr 27 08:41:32 2004 From: danielcampos at ...45... (danielcampos at ...45...) Date: Tue, 27 Apr 2004 08:41:32 CEST Subject: [Gambas-devel] Gambas Interface Message-ID: Hi Benoit: While working in the 'net' component to adapt it to your requests, i've removed a lot of stuff thanks to the new GB_STREAM definition, with its "_free[]" space, so now I don't have to find the parent of the stream using an array. It reduces meory waste and makes it a little faster when reading or writing. However, I still need an array to find the parent of a socket when I receive a read or write callback from Watching interface, as I only receive the socket descriptor in the 'long Param' parameter. May be you could modify these functions to add new information, or add a 'GB_WATCH2' function with more paramters to manage these data... Regards, Daniel Campos ------------------------------------------------------------- NetCourrier, votre bureau virtuel sur Internet : Mail, Agenda, Clubs, Toolbar... Web/Wap : www.netcourrier.com T?l?phone/Fax : 08 92 69 00 21 (0,34 ? TTC/min) Minitel: 3615 NETCOURRIER (0,16 ? TTC/min) From gambas at ...1... Tue Apr 27 20:01:14 2004 From: gambas at ...1... (Benoit Minisini) Date: Tue, 27 Apr 2004 20:01:14 +0200 Subject: [Gambas-devel] Gambas Interface In-Reply-To: References: Message-ID: <200404272001.14457.gambas@...1...> On Tuesday 27 April 2004 13:41, danielcampos at ...45... wrote: > Hi Benoit: > > While working in the 'net' component to adapt it to your requests, i've > removed a lot of stuff thanks to the new GB_STREAM definition, with its > "_free[]" space, so now I don't have to find the parent of the stream using > an array. It reduces meory waste and makes it a little faster when reading > or writing. > > However, I still need an array to find the parent of a socket when I > receive a read or write callback from Watching interface, as I only receive > the socket descriptor in the 'long Param' parameter. > May be you could > modify these functions to add new information, or add a 'GB_WATCH2' > function with more paramters to manage these data... But why do you need the parent of the socket ? I could add a GB.GetParent() API, but you should never need that. > > Regards, > > Daniel Campos > Regards, -- Benoit Minisini mailto:gambas at ...1... From gambas at ...1... Tue Apr 27 21:22:51 2004 From: gambas at ...1... (Benoit Minisini) Date: Tue, 27 Apr 2004 21:22:51 +0200 Subject: [Gambas-devel] QT.BorderProperty (qt.ext) In-Reply-To: <002401c4262d$c6319ae0$77514d51@...97...> References: <002401c4262d$c6319ae0$77514d51@...97...> Message-ID: <200404272122.51767.gambas@...1...> On Monday 19 April 2004 18:45, Nigel Gerrard wrote: > Benoit, > > In CLCDNumber.cpp, CTableView.cpp and CTextView.cpp QT.BorderProperty is to > invoke the set up of the border properties for the Widget. I can see from > the CWidget.cpp and main.cpp code that this is currently set to > CWIDGET_border_simple. Whilst this appears to be okay for CTableView and > CTextView because they use only the true and false attributes, there is a > problem with CLCDNumber.cpp as it can take five settings : None, pPlain, > Sunken, Raised and Etched - as defined in CWIDGET_border_full. > > Is there any problem with adopting the function. > > > Nigel OK for CLCDNumber.cpp, but I keep the boolean version of the border property for the two others. Regards, -- Benoit Minisini mailto:gambas at ...1... From daniel.campos at ...103... Tue Apr 27 21:49:16 2004 From: daniel.campos at ...103... (Daniel) Date: Tue, 27 Apr 2004 21:49:16 +0200 Subject: [Gambas-devel] Gambas Interface In-Reply-To: <200404272001.14457.gambas@...1...> References: <200404272001.14457.gambas@...1...> Message-ID: <1083095356.3335.1.camel@...102...> > > But why do you need the parent of the socket ? > I could add a GB.GetParent() API, but you should never need that. When receiving a read or write callback, I have to raise events if there was any error, or modify any of the properties in the Socket object... > > > > > Regards, > > > > Daniel Campos > > > > Regards, From gambas at ...1... Tue Apr 27 21:54:48 2004 From: gambas at ...1... (Benoit Minisini) Date: Tue, 27 Apr 2004 21:54:48 +0200 Subject: [Gambas-devel] Gambas Interface In-Reply-To: <1083095356.3335.1.camel@...102...> References: <200404272001.14457.gambas@...1...> <1083095356.3335.1.camel@...102...> Message-ID: <200404272154.48208.gambas@...1...> On Tuesday 27 April 2004 21:49, Daniel wrote: > > But why do you need the parent of the socket ? > > I could add a GB.GetParent() API, but you should never need that. > > When receiving a read or write callback, I have to raise events if there > was any error, or modify any of the properties in the Socket object... > When you want to raise event, you use GB.Raise() on the socket, and the event is sent to the parent automatically. You don't need accessing the parent yourself ? -- Benoit Minisini mailto:gambas at ...1... From danielcampos at ...45... Wed Apr 28 08:42:44 2004 From: danielcampos at ...45... (danielcampos at ...45...) Date: Wed, 28 Apr 2004 08:42:44 CEST Subject: [Gambas-devel] Gambas Interface Message-ID: > >...is sent to the parent automatically. You don't need accessing the >parent >yourself ? > No, I think the problem is that i've explained my problem very bad, I don't know why I've used the word 'parent' if I was not exatly talking about objects but structures. I'll try to do it better: I have a structure to define the socket class: typedef struct { GB_BASE *ob; GB_STREAM *stream, int socket; int iStatus; ... } CSOCKET; I all the code, I can use the 'THIS' macro to reference the current 'Socket' object, so I can manage its 'internal properties', (the members of that structure, I mean), and I can pass that pointer to the rest of the functions. However, when I receive a call-back, the parameter that I receive is just the value of the socket descriptor, but I don't know where the structure that holds this socket descriptor (the 'parent':) is placed. So, I've created an array with CSOCKET pointers, and socket descriptors, and each time I receive a callback, I find the socket descriptor in the array, so I can obtain the value of the CSOCKET pointer, to be able to modify the rest of 'properties', for instance 'iStatus'. If I detect, for example, that connection was broken, in the 'write callback', I have to post an event, so I have to specify the CSOCKET pointer (the 'parent' of my socket descriptor)... I hope I've explained it better, as really my first question was very obscure :) Regards, Daniel Campos ------------------------------------------------------------- NetCourrier, votre bureau virtuel sur Internet : Mail, Agenda, Clubs, Toolbar... Web/Wap : www.netcourrier.com T?l?phone/Fax : 08 92 69 00 21 (0,34 ? TTC/min) Minitel: 3615 NETCOURRIER (0,16 ? TTC/min) From gambas at ...1... Wed Apr 28 13:41:34 2004 From: gambas at ...1... (Benoit Minisini) Date: Wed, 28 Apr 2004 13:41:34 +0200 Subject: [Gambas-devel] Gambas Interface In-Reply-To: References: Message-ID: <200404281341.34447.gambas@...1...> On Wednesday 28 April 2004 13:42, danielcampos at ...45... wrote: > >...is sent to the parent automatically. You don't need accessing the > > >parent yourself ? > > No, I think the problem is that i've explained my problem very bad, I > don't know why I've used the word 'parent' if I was not exatly talking > about objects but structures. I'll try to do it better: > > > I have a structure to define the socket class: > > typedef struct > { > GB_BASE *ob; > GB_STREAM *stream, > int socket; > int iStatus; > ... > } CSOCKET; > > I all the code, I can use the 'THIS' macro to reference the current > 'Socket' object, so I can manage its 'internal properties', (the members > of that structure, I mean), and I can pass that pointer to the rest of the > functions. > > However, when I receive a call-back, the parameter that I receive is just > the value of the socket descriptor, but I don't know where the structure > that holds this socket descriptor (the 'parent':) is placed. So, I've > created an array with CSOCKET pointers, and socket descriptors, and each > time I receive a callback, I find the socket descriptor in the array, so I > can obtain the value of the CSOCKET pointer, to be able to modify the rest > of 'properties', for instance 'iStatus'. > > If I detect, for example, that connection was broken, in the 'write > callback', I have to post an event, so I have to specify the CSOCKET > pointer (the 'parent' of my socket descriptor)... > > I hope I've explained it better, as really my first question was very > obscure :) > > Regards, > > Daniel Campos > Why don't you use the fourth parameter of GB.Watch() ? It is passed to the callback. Regards, -- Benoit Minisini mailto:gambas at ...1... From daniel.campos at ...103... Wed Apr 28 18:39:40 2004 From: daniel.campos at ...103... (Daniel) Date: Wed, 28 Apr 2004 18:39:40 +0200 Subject: [Gambas-devel] Gambas Interface In-Reply-To: <200404281341.34447.gambas@...1...> References: <200404281341.34447.gambas@...1...> Message-ID: <1083170380.3250.6.camel@...102...> > > > > Why don't you use the fourth parameter of GB.Watch() ? It is passed to the > callback. Sorry, but I don't understand. Let's see for example UdpSocket class. The only point in the CUdpSocket.c code in which I assign a call-back is this: ----------------------------------------------------- void CUdpSocket_AssignCallBack(long t_obj,int t_sock) { ... GB.Watch (t_sock , GB_WATCH_WRITE,(void*)CUdpSocket_CallBack,0); ... } ----------------------------------------------------- The fourth parameter is zero, and in the callback function : ------------------------------------- void CUdpSocket_CallBack(long lParam) { .... } ------------------------------------- I receive the socket descriptor in lParam. Now I've changed the fourth parameter: --------------------------------------- void CUdpSocket_AssignCallBack(long t_obj,int t_sock) { ... GB.Watch (t_sock , GB_WATCH_WRITE,(void*)CUdpSocket_CallBack,t_obj); ... } --------------------------------------- (t_obj is a pointer to a CUDPSOCKET structure) And it still works! I receive the socket descriptor in lParam! I'm puzzle... What I'm doing wrong? Regards, Daniel Campos From daniel.campos at ...103... Wed Apr 28 19:12:24 2004 From: daniel.campos at ...103... (Daniel) Date: Wed, 28 Apr 2004 19:12:24 +0200 Subject: [Gambas-devel] Gambas Interface In-Reply-To: <200404281341.34447.gambas@...1...> References: <200404281341.34447.gambas@...1...> Message-ID: <1083172344.3230.3.camel@...102...> OH, GOD! Finally found it! I was working with a quite old callback function definition! In gambas 0.6x (when I started the network component) there was only: void (* callback ) ( long param ); Now it is: void (* GB_WATCH_CALLBACK ) ( int fd , int type , long param ); It is good to have a wiki with all old versions saved!!! Regards, and sorry for the waste of time, Daniel Campos