Re: [Gambas-user] Compiling Error
reconf and configure work, but running make gives me this: make[4]: Entering directory `/home/hackney/trunk/gb.db.odbc/src' make[4]: Leaving directory `/home/hackney/trunk/gb.db.odbc/src' make[3]: Leaving directory `/home/hackney/trunk/gb.db.odbc' make[2]: Leaving directory `/home/hackney/trunk/gb.db.odbc' make[1]: Leaving directory `/home/hackney/trunk' make[4]: *** No rule to make target `gb.db.odbc.component', needed by `all-am'. Stop. make[3]: *** [all-recursive] Error 1 make[2]: *** [all] Error 2 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 hack...@seattle:~$ Everything seemed to work prior to this, so I'm confused a bit. What happened? Also, there was no installation of Gambas on this computer prior to this. The libraries (2.2.11-16 Ubuntu) are installed, I double-checked. It should be fixed now. Just some missing files I forgot to commit. -- 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] Form refresh problem
Tomas Eroles i Forner ha scritto: Hi all I'm writing a program to present the results of the ping command in a TableView. The user can select the amount of times the program has to repeat the process. The program executes a While..Wend loop in which executes the ping command, analyzes the result, and inserts a row in the TableView. The problem is that I want that it writes each line before execute the next ping, and it presents the information when it finishes all the loops, if it's made using GTK, but it seems to refresh if made using Qt. I've added the Requery method, both for TableView and for all the form, but I would like it shows the real progress and the real adding rows each loop, and not like this. Is there any way to do it? It seems you only need to add a WAIT instruction inside the loop, just after finished to update the table. Regards, -- Doriano Blengino Listen twice before you speak. This is why we have two ears, but only one mouth. -- 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] Compiling Error
Thanks, 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] Form refresh problem
Grazie mille It seems it works I hope add more things and then publish the program for if anyone wants to add something Thanks Doriano El ds 11 de 04 del 2009 a les 09:53 +0200, en/na Doriano Blengino va escriure: Tomas Eroles i Forner ha scritto: Hi all I'm writing a program to present the results of the ping command in a TableView. The user can select the amount of times the program has to repeat the process. The program executes a While..Wend loop in which executes the ping command, analyzes the result, and inserts a row in the TableView. The problem is that I want that it writes each line before execute the next ping, and it presents the information when it finishes all the loops, if it's made using GTK, but it seems to refresh if made using Qt. I've added the Requery method, both for TableView and for all the form, but I would like it shows the real progress and the real adding rows each loop, and not like this. Is there any way to do it? It seems you only need to add a WAIT instruction inside the loop, just after finished to update the table. Regards, -- 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] LinkedIn
Hey Benoit I thought about setting up a group on LinkedIn for Gambas users. Could help to spread the word. Are you ok with it or would you rather not? LinkedIn? What's that? -- 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] LinkedIn
Hey Benoit I thought about setting up a group on LinkedIn for Gambas users. Could help to spread the word. Are you ok with it or would you rather not? I am ok. :-) -- 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
Okay I thought this was worked out but its still not working- I always end up losing the last two list items. Here is the console output from my print statements: This first list is printing i, a from this command SWAP myArray[i], myArray[a] 21 21 20 13 19 0 18 13 17 11 16 4 15 9 14 12 13 4 12 2 11 6 10 2 9 4 8 0 7 5 6 1 5 3 4 3 3 0 2 0 1 0 0 0 This list shows where listview1 is being copied into listview2: listview1.item.key 21 counter i: 21 total count: 22 listview1.item.key 13 counter i: 20 total count: 22 listview1.item.key 13 counter i: 19 total count: 22 listview1.item.key 20 counter i: 18 total count: 22 listview1.item.key 11 counter i: 17 total count: 22 listview1.item.key 4counter i: 16 total count: 22 listview1.item.key 9counter i: 15 total count: 22 listview1.item.key 12 counter i: 14 total count: 22 listview1.item.key 16 counter i: 13 total count: 22 listview1.item.key 2counter i: 12 total count: 22 listview1.item.key 6counter i: 11 total count: 22 listview1.item.key 14 counter i: 10 total count: 22 listview1.item.key 18 counter i: 9total count: 22 listview1.item.key 19 counter i: 8total count: 22 listview1.item.key 5counter i: 7total count: 22 listview1.item.key 5counter i: 6total count: 22 listview1.item.key 3counter i: 5total count: 22 listview1.item.key 7counter i: 4total count: 22 listview1.item.key 8counter i: 3total count: 22 listview1.item.key 15 counter i: 2total count: 22 listview1.item.key 10 counter i: 1total count: 22 listview1.item.key 17 counter i: 0total count: 22 here is a screen shot of the two lists: listview1 is on the left, you will notice that the last two items are not on the random sorted list on the right. http://www.nabble.com/file/p23005690/ScreenshotBug.png Here is my code: PUBLIC SUB button4_click() DIM myArray AS Integer[ListView1.count] DIM a AS Integer DIM i AS Integer DIM c AS String FOR i = 0 TO ListView1.count - 1 STEP 1 myArray[i] = i NEXT FOR i = ListView1.count - 1 TO 0 STEP -1 a = Int(Rnd(i + 1)) SWAP myArray[i], myArray[a] PRINT i, a NEXT FOR i = ListView1.count - 1 TO 0 STEP -1 ' write items in listview2 - I have also tried running this counting up as well but it changed nothing. listview1.MoveTo(myArray[i]) TRY c = listview1.Item.Key TRY PRINT listview1.item.key , c, counter i: , i, total count: , listview1.Count TRY listview2.add(c, listview1.item.text) NEXT 'fGlobal.show 'FRolldice.Show 'ME.Hide END Sincerly JB SKaggs Simonart Dominique wrote: Simonart Dominique a écrit : 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 But if you prefer incremental loop, you could write: FOR i = 0 TO 199 A = Int(Rnd(i,200)) SWAP ... 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 -- 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
Re: [Gambas-user] Using a list container
Just noticed a control I've not used - the listcontainer but I cannot see a method to add another control to it. I wonder if someone could point out how. thanks. It's a container. Just use it as parent for other controls. Regards, -- 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, jbskaggs a écrit : Okay I thought this was worked out but its still not working- I always end up losing the last two list items. Here is the console output from my print statements: This first list is printing i, a from this command SWAP myArray[i], myArray[a] 21 21 20 13 19 0 18 13 17 11 16 4 15 9 14 12 13 4 12 2 11 6 10 2 9 4 8 0 7 5 6 1 5 3 4 3 3 0 2 0 1 0 0 0 Here, you listed i and a but the interesting values are i and myArray[i] instead This list shows where listview1 is being copied into listview2: listview1.item.key 21 counter i: 21 total count: 22 listview1.item.key 13 counter i: 20 total count: 22 listview1.item.key 13 counter i: 19 total count: 22 listview1.item.key 20 counter i: 18 total count: 22 listview1.item.key 11 counter i: 17 total count: 22 listview1.item.key 4counter i: 16 total count: 22 listview1.item.key 9counter i: 15 total count: 22 listview1.item.key 12 counter i: 14 total count: 22 listview1.item.key 16 counter i: 13 total count: 22 listview1.item.key 2counter i: 12 total count: 22 listview1.item.key 6counter i: 11 total count: 22 listview1.item.key 14 counter i: 10 total count: 22 listview1.item.key 18 counter i: 9total count: 22 listview1.item.key 19 counter i: 8total count: 22 listview1.item.key 5counter i: 7total count: 22 listview1.item.key 5counter i: 6total count: 22 listview1.item.key 3counter i: 5total count: 22 listview1.item.key 7counter i: 4total count: 22 listview1.item.key 8counter i: 3total count: 22 listview1.item.key 15 counter i: 2total count: 22 listview1.item.key 10 counter i: 1total count: 22 listview1.item.key 17 counter i: 0total count: 22 here is a screen shot of the two lists: listview1 is on the left, you will notice that the last two items are not on the random sorted list on the right. First, is it correct that you have twice the keys 13 and 5 in ListView1 and that keys 0 and 1 are missing? I tried to reproduce exactly your keys sequence but as soon as I want to add an identical key, I get a message and the programme stop immediatly. http://www.nabble.com/file/p23005690/ScreenshotBug.png Here is my code: PUBLIC SUB button4_click() DIM myArray AS Integer[ListView1.count] DIM a AS Integer DIM i AS Integer DIM c AS String FOR i = 0 TO ListView1.count - 1 STEP 1 myArray[i] = i NEXT FOR i = ListView1.count - 1 TO 0 STEP -1 a = Int(Rnd(i + 1)) SWAP myArray[i], myArray[a] PRINT i, a NEXT FOR i = ListView1.count - 1 TO 0 STEP -1 ' write items in listview2 - I have also tried running this counting up as well but it changed nothing. listview1.MoveTo(myArray[i]) TRY c = listview1.Item.Key TRY PRINT listview1.item.key , c, counter i: , i, total count: , listview1.Count TRY listview2.add(c, listview1.item.text) NEXT 'fGlobal.show 'FRolldice.Show 'ME.Hide END Sincerly JB SKaggs I run your code and it works quite fine! I think your missing items come from the duplicated keys 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