[Gambas-user] Bug in the IDE editor

Leonardo Miliani leonardo at ...1237...
Tue Oct 30 10:35:10 CET 2007


Benoit Minisini ha scritto:
> On lundi 29 octobre 2007, Leonardo Miliani wrote:
>> I think there is a bug in IDE editor of the last version of Gambas 1.9.90.
>>
>> Let me explain....
>> I worked a program that manipolates tables from an SQLite3 database and
>> assign their values at some strings contained in a module...
>> This is a part of the code:
>>
>> [...]
>> StampeAuto.Targa.Add(Risultato!Targa)
>> StampeAuto.Veicolo.Add(Risultato!Veicolo)
>> StampeAuto.Chiave.Add(Risultato!Chiave)
>> StampeAuto.Posto.Add(Risultato!Posto)
>> StampeAuto.Piano.Add(Risultato!Piano)
>> [...]
>>
>> The problem is that the first letter of the names of the tables in the
>> database are in lower case and the first letter of the names of the
>> strings contained in the module StampeAuto are in upper case instead.
>> So, what happens? Gambas (as you can see in the example) set all the
>> name of the tables after Risultato! in Upper case because it thinks that
>> those names are the same variables of the name of the properties of the
>> module... and the program doesn't work because it doesn't find nothing
>> in the database (Linux discriminates from lower and upper case).
>> If I set those names in lower case than Gambas set in lower case the
>> name of the tables too and the program works, i.e.:
>>
>> StampeAuto.targa.Add(Risultato!targa)
> 
> Yes, this is some sort of bug, but I think it was fixed recently.
> 
> Otherwise, you have a workaround:
> 
> StampeAuto.Targa.Add(Risultato["Targa"])
> 
> 'a!b' is just syntactic sugar for 'a["b"]', except that in the second case the 
> compiler correctly stores "b" as a string, and not as an identifier.
> 
> Regards,
> 

Thank for the tip... I'll modify my code to use the new syntax.

-- 
Ciao.
Leo.

Web: www.leonardomiliani.com
E-mail: leonardo at ...1237...
Scegli software opensource - Choose opensource software




More information about the User mailing list