Re: [Gambas-user] MySQL problem
I've found same problem. The myapplication_all.deb does not include de gambas2-gb-db-mysql package. I don't know why. You should install it by hand after install you application. Perhaps sombody can explain this... 2009/4/7 agrgal agr1971...@yahoo.es First of all, excuse my poor English. I'm still studying it. :-) I've experienced a problem within an application. It works well under Gambas Environment but when I pack a debian package in order to install it later, I get a mistake. It seems not to have suitable permissions when it connects to MySQL server. All parameters are OK since it runs under Gambas, that's not the point. Thank you for your answer in advance. -- View this message in context: http://www.nabble.com/MySQL-problem-tp22939033p22939033.html Sent from the gambas-user mailing list archive at Nabble.com. -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] MySQL problem
So does it mean that I have to install the package gambas2-gb-db-mysql plus gambas2 itself and any application will run later in another computer where installed without gambas2? Or does it mean that I must install my application got along with the package gambas2-gb-db-mysql in each installation? Thank you. shordi wrote: I've found same problem. The myapplication_all.deb does not include de gambas2-gb-db-mysql package. I don't know why. You should install it by hand after install you application. Perhaps sombody can explain this... 2009/4/7 agrgal agr1971...@yahoo.es First of all, excuse my poor English. I'm still studying it. :-) I've experienced a problem within an application. It works well under Gambas Environment but when I pack a debian package in order to install it later, I get a mistake. It seems not to have suitable permissions when it connects to MySQL server. All parameters are OK since it runs under Gambas, that's not the point. Thank you for your answer in advance. -- View this message in context: http://www.nabble.com/MySQL-problem-tp22939033p22939033.html Sent from the gambas-user mailing list archive at Nabble.com. -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- View this message in context: http://www.nabble.com/MySQL-problem-tp22939033p22948027.html Sent from the gambas-user mailing list archive at Nabble.com. -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Proper use of containers
See attached project. I think the problem is in the frame object. It doesn't resize it's child objects. Since the hbox inside the frame does not get resized, the hbox cannot resize it's children objects. -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Proper use of containers
Whooops... forgot to actually attach the project Here it is now nester-0.0.1.tar.gz Description: GNU Zip compressed data -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Proper use of containers
See attached project. I think the problem is in the frame object. It doesn't resize it's child objects. Since the hbox inside the frame does not get resized, the hbox cannot resize it's children objects. The Frame control is the only container that does not arrange its contents at all. Maybe it was not a good idea... -- Benoît -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] A random sort of listview
Hi! I can't reproduce your problem. Randomize with seed 12345, I got; From 0 to 9: 4 0 7 9 5 1 2 6 3 8 From 9 to 0: 4 2 7 8 3 0 6 9 1 5 Both correct. So maybe there is a bug in SWAP command with Gambas version... what are you using? With Gambas 2.10 it is working. Jussi P.S. Code I used to test: DIM ii AS Integer DIM jj AS Integer DIM a AS Integer DIM myArray AS Integer[200] DIM checkArray AS NEW Integer[] RANDOMIZE 12345 FOR ii = 0 TO 9 '199 myArray[ii] = ii NEXT FOR ii = 0 TO 9 '199 ' random swap array items a = Int(Rnd(ii + 1)) SWAP myArray[ii], myArray[a] NEXT FOR ii = 0 TO 9 '199 ' Check against duplicates. PRINT myArray[ii] FOR jj = 0 TO 9 '199 IF myArray[ii] = jj THEN IF checkArray.Exist(jj) = FALSE THEN checkArray.Add(jj) ELSE Message.Error(Error!) RETURN ENDIF ENDIF NEXT NEXT PRINT checkArray.Count On Wed, Apr 8, 2009 at 00:12, Simonart Dominique simonart.domini...@wanadoo.fr wrote: Hi, jbskaggs a écrit : Okay, But why does it do that? I don't see why the direction should matter what am I missing ? Becuase maybe this is something that has plagued me and caused me headaches for a while. JB Skaggs You're right! Thanks! My mistake is that I listed the myArray values inside the SAME for next loop that the swap! But of course, the values could change at each next step However, there is differences. Let see a step by step sample CASE 1: Forward FOR NEXT loop * i=0 - Int(Rnd(i+1)) = 0! you could affect only myArray[0] to myArray[0] * i=1 - Int(Rnd(i+1)) = 0-1 you could affect myArray[0] once more * i=2 - Inn(Rnd(i+1)) = 0-2 idem * i=3 ... at each step, ALWAYS you could affect an already selected value CASE 2: Backward FOR NEXT loop * i=199 - Int(Rnd(i+1)) = 0-199 myArray[199] could be any value * i=198 - Int(Rnd(i+1)) = 0-198 myArray[198] could be any of the non selected values myArray[199] will never be affected anymore * i=197 ... at each step, NEVER you could affect an already selected value I found the second case more satisfying for my mind! :) Hope this send your headache away! :) Dominique Simonart Simonart Dominique wrote: Hi, jbskaggs a écrit : When I ran the code it ran fine- why is it important to have it count backwards in the random swap? ie for i =199 to 0 step -1 instead of for i=0 to 199 step 1? JB SKaggs Strange, because it should not :) run a test with 10 numbers 0-9 and fixe the seed with RANDOMIZE 12345 If you run the forward FOR NEXT you will get: 0 0 2 3 1 1 2 6 3 8 which is wrong! but if you run the backward FOR NEXT you will get: 5 1 9 6 0 3 8 7 2 4 which is right! May be you did not notice it because 200 is long enough before you get the same number twice, and before you remark that some are missing? Dominique Simonart Simonart Dominique wrote: Hi, Hmm, did you run exactly this code? If so, there is something wrong with the second FOR NEXT loop jbskaggs a écrit : using your suggestions and the swap command vs manual swapping this is my code: public b as string 'optional string used to hold the array data for file or split later PUBLIC SUB button4_click() ' initialize array DIM myArray AS Integer[200] DIM a AS Integer DIM i AS Integer FOR i = 0 TO 199 STEP 1 'add array items myArray[i] = i NEXT FOR i = 0 TO 199 STEP 1 ' random swap array items a = Int(Rnd(i + 1)) SWAP myArray[i], myArray[a] NEXT the right code is: FOR i = 199 TO 0 STEP -1 ... NEXT FOR i = 0 TO 199 STEP 1 ' write items in listview2 listview1.MoveTo(myArray[i]) c = listview1.Item.Key listview2.add(c, listview1.item.text) NEXT FOR i = 0 TO 199 STEP 1 'optional step to write array as a string for file or whatever use b = slot myArray[i] , NEXT PRINT b END PUBLIC SUB Button1_Click() 'an optional way to load the array values from the variable b and / or a file if b was file loaded DIM egg AS String[] DIM c AS String listview1.Clear egg = Split(b, ,) FOR EACH c IN egg TRY listview1.Add(c, c) IF ERROR THEN RETURN NEXT IF listview1.Count = 200 THEN RETURN END JB Skaggs Dominique Simonart Dominique Simonart -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net
Re: [Gambas-user] A random sort of listview
Hi Jussi, NO, there is no bug, it's my mistake!! I listed the myArray values just after the SWAP instruction. But, as you can see it in a preceeding answer to jbskaggs, this is a bad idea because in the forward FOR NEXT loop case, these values could change any time. You don't make this error :) so you got the good result! Since these values cannot change after they were selected in the Backward FOR NEXT loop case, my mistake had no consequence. We could consider this as a more efficient method since the correct result is available sooner! Dominique Simonart Jussi Lahtinen a écrit : Hi! I can't reproduce your problem. Randomize with seed 12345, I got; From 0 to 9: 4 0 7 9 5 1 2 6 3 8 From 9 to 0: 4 2 7 8 3 0 6 9 1 5 Both correct. So maybe there is a bug in SWAP command with Gambas version... what are you using? With Gambas 2.10 it is working. Jussi P.S. Code I used to test: DIM ii AS Integer DIM jj AS Integer DIM a AS Integer DIM myArray AS Integer[200] DIM checkArray AS NEW Integer[] RANDOMIZE 12345 FOR ii = 0 TO 9 '199 myArray[ii] = ii NEXT FOR ii = 0 TO 9 '199 ' random swap array items a = Int(Rnd(ii + 1)) SWAP myArray[ii], myArray[a] NEXT FOR ii = 0 TO 9 '199 ' Check against duplicates. PRINT myArray[ii] FOR jj = 0 TO 9 '199 IF myArray[ii] = jj THEN IF checkArray.Exist(jj) = FALSE THEN checkArray.Add(jj) ELSE Message.Error(Error!) RETURN ENDIF ENDIF NEXT NEXT PRINT checkArray.Count On Wed, Apr 8, 2009 at 00:12, Simonart Dominique simonart.domini...@wanadoo.fr wrote: Hi, jbskaggs a écrit : Okay, But why does it do that? I don't see why the direction should matter what am I missing ? Becuase maybe this is something that has plagued me and caused me headaches for a while. JB Skaggs You're right! Thanks! My mistake is that I listed the myArray values inside the SAME for next loop that the swap! But of course, the values could change at each next step However, there is differences. Let see a step by step sample CASE 1: Forward FOR NEXT loop * i=0 - Int(Rnd(i+1)) = 0! you could affect only myArray[0] to myArray[0] * i=1 - Int(Rnd(i+1)) = 0-1 you could affect myArray[0] once more * i=2 - Inn(Rnd(i+1)) = 0-2 idem * i=3 ... at each step, ALWAYS you could affect an already selected value CASE 2: Backward FOR NEXT loop * i=199 - Int(Rnd(i+1)) = 0-199 myArray[199] could be any value * i=198 - Int(Rnd(i+1)) = 0-198 myArray[198] could be any of the non selected values myArray[199] will never be affected anymore * i=197 ... at each step, NEVER you could affect an already selected value I found the second case more satisfying for my mind! :) Hope this send your headache away! :) Dominique Simonart Simonart Dominique wrote: Hi, jbskaggs a écrit : When I ran the code it ran fine- why is it important to have it count backwards in the random swap? ie for i =199 to 0 step -1 instead of for i=0 to 199 step 1? JB SKaggs Strange, because it should not :) run a test with 10 numbers 0-9 and fixe the seed with RANDOMIZE 12345 If you run the forward FOR NEXT you will get: 0 0 2 3 1 1 2 6 3 8 which is wrong! but if you run the backward FOR NEXT you will get: 5 1 9 6 0 3 8 7 2 4 which is right! May be you did not notice it because 200 is long enough before you get the same number twice, and before you remark that some are missing? Dominique Simonart Simonart Dominique wrote: Hi, Hmm, did you run exactly this code? If so, there is something wrong with the second FOR NEXT loop jbskaggs a écrit : using your suggestions and the swap command vs manual swapping this is my code: public b as string 'optional string used to hold the array data for file or split later PUBLIC SUB button4_click() ' initialize array DIM myArray AS Integer[200] DIM a AS Integer DIM i AS Integer FOR i = 0 TO 199 STEP 1 'add array items myArray[i] = i NEXT FOR i = 0 TO 199 STEP 1 ' random swap array items a = Int(Rnd(i + 1)) SWAP myArray[i], myArray[a] NEXT the right code is: FOR i = 199 TO 0 STEP -1 ... NEXT FOR i = 0 TO 199 STEP 1 ' write items in listview2 listview1.MoveTo(myArray[i]) c = listview1.Item.Key listview2.add(c, listview1.item.text) NEXT FOR i = 0 TO 199 STEP 1 'optional step to write array as a string for file or whatever use b = slot myArray[i] , NEXT PRINT b END PUBLIC SUB Button1_Click() 'an optional way to load the array values from the variable b and / or a file if b was file loaded DIM egg AS String[] DIM c AS String listview1.Clear egg = Split(b, ,) FOR EACH c IN egg TRY listview1.Add(c, c) IF ERROR THEN RETURN NEXT IF listview1.Count = 200 THEN RETURN END JB Skaggs Dominique Simonart Dominique Simonart -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free
[Gambas-user] working with many formulares
hi, I'm new at Gambas. I'm writting an application with many windows (formulares). I create two formulares at my application. the first formular work's. 1. When I push a button in formular1 I want change to formular 2. What must I do? 2. when the work is done in formular2 I want go back to formular1 and close formular2 What must I do? Can anybody help me? with examples please kind regards Jürgen -- View this message in context: http://www.nabble.com/working-with-many-formulares-tp22953596p22953596.html Sent from the gambas-user mailing list archive at Nabble.com. -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] shared librarry into gambas
hi, I'm new at Gambas. I'm writting an application for Laser. So I need to use the function from a shared librarry into gambas (libFTD2XX.so at /usr/lib). I'm using SuSE Open Linux 11.1 kernel 2.6 How can I fix the problem. Can anybody help with example please. Thank you and kind regards Jürgen -- View this message in context: http://www.nabble.com/shared-librarry-into-gambas-tp22953732p22953732.html Sent from the gambas-user mailing list archive at Nabble.com. -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] MySQL problem
It means that you must provide your clients with you _all.deb package and gambas2_gb_db_mysql.deb package (or tell him how to install it from ubuntu repositories). 2009/4/8 agrgal agr1971...@yahoo.es So does it mean that I have to install the package gambas2-gb-db-mysql plus gambas2 itself and any application will run later in another computer where installed without gambas2? Or does it mean that I must install my application got along with the package gambas2-gb-db-mysql in each installation? Thank you. shordi wrote: I've found same problem. The myapplication_all.deb does not include de gambas2-gb-db-mysql package. I don't know why. You should install it by hand after install you application. Perhaps sombody can explain this... 2009/4/7 agrgal agr1971...@yahoo.es First of all, excuse my poor English. I'm still studying it. :-) I've experienced a problem within an application. It works well under Gambas Environment but when I pack a debian package in order to install it later, I get a mistake. It seems not to have suitable permissions when it connects to MySQL server. All parameters are OK since it runs under Gambas, that's not the point. Thank you for your answer in advance. -- View this message in context: http://www.nabble.com/MySQL-problem-tp22939033p22939033.html Sent from the gambas-user mailing list archive at Nabble.com. -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- View this message in context: http://www.nabble.com/MySQL-problem-tp22939033p22948027.html Sent from the gambas-user mailing list archive at Nabble.com. -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] working with many formulares
In the click event of button in form 1: PUBLIC SUB button1_Click() DIM frForm2 AS NEW formu2 frForm2.ShowModal END 2009/4/8 juelin juergen.lin...@gmx.de hi, I'm new at Gambas. I'm writting an application with many windows (formulares). I create two formulares at my application. the first formular work's. 1. When I push a button in formular1 I want change to formular 2. What must I do? 2. when the work is done in formular2 I want go back to formular1 and close formular2 What must I do? Can anybody help me? with examples please kind regards Jürgen -- View this message in context: http://www.nabble.com/working-with-many-formulares-tp22953596p22953596.html Sent from the gambas-user mailing list archive at Nabble.com. -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] shared librarry into gambas
Hi! Here is my old test project attached: http://www.mail-archive.com/gambas-user@lists.sourceforge.net/msg02551.html Here you can find documentation about External Function Declaration: http://gambasdoc.org/help/lang/extdecl?v3 Hope that helps! Jussi On Wed, Apr 8, 2009 at 18:56, juelin juergen.lin...@gmx.de wrote: hi, I'm new at Gambas. I'm writting an application for Laser. So I need to use the function from a shared librarry into gambas (libFTD2XX.so at /usr/lib). I'm using SuSE Open Linux 11.1 kernel 2.6 How can I fix the problem. Can anybody help with example please. Thank you and kind regards Jürgen -- View this message in context: http://www.nabble.com/shared-librarry-into-gambas-tp22953732p22953732.html Sent from the gambas-user mailing list archive at Nabble.com. -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] MySQL problem
I self-reply my comment: I didn't actually have a bug with MySQL. It turned out to be a wrong access to a non-allowed directory because in the same routine I kept the conection data into a binary file. Anyway, I have another question to get answered, but I think I must open new threads. Thank you. agrgal wrote: First of all, excuse my poor English. I'm still studying it. :-) I've experienced a problem within an application. It works well under Gambas Environment but when I pack a debian package in order to install it later, I get a mistake. It seems not to have suitable permissions when it connects to MySQL server. All parameters are OK since it runs under Gambas, that's not the point. Thank you for your answer in advance. -- View this message in context: http://www.nabble.com/MySQL-problem-tp22939033p22959735.html Sent from the gambas-user mailing list archive at Nabble.com. -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Access to an specific directory.
Any quick way to get the user directory programatically? -- View this message in context: http://www.nabble.com/Access-to-an-specific-directory.-tp22959798p22959798.html Sent from the gambas-user mailing list archive at Nabble.com. -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Access to an specific directory.
On Wednesday 08 April 2009 22:19:02 agrgal wrote: Any quick way to get the user directory programatically? Try User.Home. That should get it for you as in: Dim my_dir AS String my_dir = User.Home -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user