Re: [Gambas-user] No EXEC Output but Works in Terminal
A Person wrote: Good Day . . . I am using Gambas 2.8.2-1ubuntu1. I wrote a program that randomly displays a line from a text file. The code worked in pure Gambas but then I tried to improve it! (Ho Ho Ho) I searched around and I came up with and modified an executable BASH script (test.sh) that worked substantially faster than my code so I tried to incorporate it into the source code. During my testing I continuously ran tests in a terminal and everything worked perfectly with the script. I tried it in my code using ## EXEC [~/test.sh] to sOutPut or EXEC [~/./test.sh] to sOutPut and nothing worked. sOutPut was always . The attached tar file contained a small program that contains an example EXEC problem code. A modified test.sh script is included along with a dummy data file, words.txt. Any ideas about the EXEC problem? Thanks Paul - - Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user I tried your code and got the same results as you did. Changing the To sOutPut to a WAIT revealed an error message that it couldn't find the script. I corrected the path to the script in the EXEC line and it worked. Hope this helps Richard. Yes. The tilde character ~ means your home directory only inside a shell or inside a Gambas file open command. EXEC executes your command by using the exec system call, and so ~ is not translated to your home directory. Regards, -- Benoît -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] simple replace question
Hi guys, I'm trying to convert a string to float. The string contents are 56½. I've tried both replace(st,½,.5) and replace(st, Chr$(194), .5 ) neither helps. Any ideas? tia ted -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] simple replace question
Il mercoledì 4 marzo 2009 11:55:44 Bruce ha scritto: Hi guys, I'm trying to convert a string to float. The string contents are 56½. I've tried both replace(st,½,.5) and replace(st, Chr$(194), .5 ) neither helps. Any ideas? tia ted Strange. replace(st,½,.5) works on my system. Gambas 2.11.1 Saluti, Stefano --- --- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] simple replace question
Is your string UTF encoded? You should check if your character code is exactly 194 and not wider... 16 Bits perhaps? Any Hex-Viewer will help. regards Emil On Wednesday 04 March 2009 11:55:44 Bruce wrote: Hi guys, I'm trying to convert a string to float. The string contents are 56½. I've tried both replace(st,½,.5) and replace(st, Chr$(194), .5 ) neither helps. Any ideas? tia ted --- --- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] simple replace question
Bruce schrieb: On Wednesday 04 March 2009 23:00:00 Stefano Palmeri wrote: Strange. replace(st,½,.5) works on my system. Gambas 2.11.1 Saluti, Stefano Damn! And I still can't get it working. The only thing I've been able to decipher is that Len(st)=4 not 3. Using gambas 2.9.?? as its the latest available for PCLinuxOS (see below). The version will not matter, I guess. Try converting your string into ASCII before replacing: newString = Conv(st, UTF-8, ASCII) Replace(st, ½, .5) On my old ASCII-table ½ is chr$(171). So it should work with this one, as it's known in ASCII. If you get an error 32, your string wasn't UTF-8. Next idea: use String.Code to find out the Hex-code of each single character in st. Then rewrite the replace function for this combination of characters - something like Replace(st, chr$(30) chr$(1) chr$(123), .5)... Hope it helps... Rolf -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Reply: No EXEC Output but Works in Terminal
Good Day . . . Thank You all except the one that told me to read the EXEC docs. I read that many times and tried many variations including trying getting INPUT and OUTPUT to work. But nothing worked. The one problem that I have with Gambas is that the docs are not adequate to a novice user. I tried writing docs for a project but I did not know enough. Before I submitted this I used the full path but I changed it in the demo so that a tester would not have to change anything. I tried EXEC [full path/test.sh] WAIT to sOutPut but it died. top showed nothing running. Can you show me an example of EXEC . . . WAIT with a variable returned? Thanks Paul -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Feature requests
I have a couple of requests for the gb.gtk component (and maybe even the gb.qt as well) It's about progressbars. I'd like to use a progressbar like alternating progressbar (like the one used in the gparted windows while executing changes (top one)) alternates from left to right I'd like to be able to display some text inside the progressbar ... not just the value, but a way to display my own string in there Is this at all possible? -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] [Help] Package created with autotools
I have gambas package created with autotools under ubuntu hardy, I want to install it to zenwalk. When I run configure command, it shows an error: - root[tes-0.0]# ./configure checking for a BSD-compatible install... /bin/ginstall -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for gambas2 binaries... ./configure: line 2140: gbx2: command not found No configure: error: Failed to find gambas2 utilities ./configure: line 2146: exit: check: numeric argument required ./configure: line 2146: exit: check: numeric argument required root[tes-0.0]# --- Do I have to install dependencies (gambas2 utilities) before compile my package? Or, is dependencies can be include to my package? Sorry I am a newbie in gambas. -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Two little bugs in gambas3
Hi! Two little bugs in Gambas3 IDE. 1. Missing Each command causes wrong error message (loop variable must be local); For SHmh In SHmhCollect Should be something like expected Each or TO. 2. Renaming non empty sub folder causes mouse pointer to show wait icon for ever. When closing gambas, there will be message; WARNING: 2 allocation(s) non freed. No other ill effects noticed... How can I check revision number of installed gambas3 trunk? I can't remember what it was... maybe 1885. Jussi Which version of Gambas do you use? Gambas 3? To check the revision, just type svn info. Regards, -- Benoît -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] XMLRpc maybe a Bug
Peter Lang wrote: Hi, After investigating the Source of xmlrpc i thought i know how to use it... Everything work so far, but the last Step does not work. The line: myStruc.Value(a) has to return the result, but instead of giving back an int i get an RpcStruct again and again. The sample does not much useful, but when it ends it throws the following Errors to the Console: WARNING: circular references detected RpcStruct (1) WARNING: 9 allocation(s) non freed. Is there any additional Documentation i missed? PUBLIC SUB Main() DIM RpcF AS RpcFunction DIM myStruc AS RpcStruct DIM client AS RpcClient DIM hVar AS NEW Variant[] DIM ret AS Variant DIM a AS Integer DIM name AS String DIM dType AS Integer a = 0 RpcF = NEW RpcFunction(sample.sumAndDifference, [XmlRpc.xInteger, XmlRpc.xInteger], XmlRpc.xStruct) client = NEW RpcClient(RpcF) client.URL = http://xmlrpc-c.sourceforge.net/api/sample.php; hVar.Add(5) hVar.Add(3) myStruc = client.Call(hVar) DO WHILE a myStruc.Count name = myStruc.Key(a) dType = myStruc.dataType(a) ret = myStruc.Value(a) INC a LOOP END Peter and all, I think I may have found the problem, it looks like a bug in the gb.xml.rpc component. BUT i'm not a xml guru nor a gambas component wizard, so it could be a bogus fix, and break things. Anyway with this change your example code works without errors and returns the correct values as well ;-) I have added some debug statements to your code to prove this, see below. Just change line 194 in gambas/2.0/gb.xml/src/rpc/gb.xml.rpc/Tools.module from: hAtom.Data.Add(Name, hAtom.Data, hAtom.Type) to: hAtom.Data.Add(Name, bAtom.Data, bAtom.Type) It looks like two typos to me... Then type sudo make install from dir gambas/2.0/gb.xml/src/ to install it. Run code: --- ' Gambas module file PUBLIC SUB Main() DIM RpcF AS RpcFunction DIM myStruc AS RpcStruct DIM client AS RpcClient DIM hVar AS NEW Variant[] DIM ret AS Variant DIM a AS Integer DIM name AS String DIM dType AS Integer a = 0 RpcF = NEW RpcFunction(sample.sumAndDifference, [XmlRpc.xInteger, XmlRpc.xInteger], XmlRpc.xStruct) client = NEW RpcClient(RpcF) client.URL = http://xmlrpc-c.sourceforge.net/api/sample.php; hVar.Add(5) hVar.Add(3) myStruc = client.Call(hVar) DO WHILE a myStruc.Count name = myStruc.Key(a) dType = myStruc.dataType(a) ret = myStruc.Value(a) DEBUG Name = name DEBUG Type = dType DEBUG Value = ret INC a LOOP END It returns: MMain.Main.28: Name = sum MMain.Main.29: Type = 0 MMain.Main.30: Value = 8 MMain.Main.28: Name = difference MMain.Main.29: Type = 0 MMain.Main.30: Value = 2 ;-) Regards, Ron_2nd. Thanks for the patch. I will put it in the next commit. Regards, -- Benoît -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Reply: No EXEC Output but Works in Terminal
I tried your code... (first I did move test.sh to execution folder). With me, this; EXEC [sh, Application.Path / test.sh] TO sOutPut works well. But this; EXEC [sh Application.Path / test.sh] TO sOutPut does NOT work (no output). So EXEC command is pretty picky. Benoit, comments? Also, if words.txt is in wrong place, execution freeze. Do this; PRINT sh Application.Path / test.sh Put the output to terminal to see if you got right paths. Cannot say more... Jussi On Wed, Mar 4, 2009 at 5:24 PM, A Person 5t3c7...@nf.sympatico.ca wrote: Good Day . . . Thank You all except the one that told me to read the EXEC docs. I read that many times and tried many variations including trying getting INPUT and OUTPUT to work. But nothing worked. The one problem that I have with Gambas is that the docs are not adequate to a novice user. I tried writing docs for a project but I did not know enough. Before I submitted this I used the full path but I changed it in the demo so that a tester would not have to change anything. I tried EXEC [full path/test.sh] WAIT to sOutPut but it died. top showed nothing running. Can you show me an example of EXEC . . . WAIT with a variable returned? Thanks Paul -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] simple replace question
Bruce schrieb: On Thursday 05 March 2009 01:34:29 Rolf-Werner Eilert wrote: newString = Conv(st, UTF-8, ASCII) Replace(st, ½, .5) Thanks RW, That got me started at least. So far: TRY wx = Conv(lp1[5], UTF-8, ASCII) TRY wx = Replace(wx, ½, .5) TRY wx = Replace(wx, ¼, .25) TRY wx = Replace(wx, ¾, .75) seems to work. I had to put the TRY's in because 3/4 doesn't seem to handle properly otherwise. No wonder, because 3/4 doesn't exist in ASCII. This is what my character table program says about this character: UTF-8: 0xC2 0xBE UTF-16: 0x00BE C-Oktal terminiertes UTF-8: \302\276 Dezimale XML-Entität: #190; So you should look for a string consisting of C2 and BE, that is chr$(194) and chr$(190) as we can presume this is UTF-8. Try this: xStr = chr$(194) chr$(190) wx = Replace(wx, xStr, .75) Does this run? Or even wx = Replace(wx, chr$(194) chr$(190), .75) should work. At least if I'm right, but I never tried this. Rolf -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] simple replace question
Bruce schrieb: On Thursday 05 March 2009 01:34:29 Rolf-Werner Eilert wrote: newString = Conv(st, UTF-8, ASCII) Replace(st, ½, .5) Thanks RW, That got me started at least. So far: TRY wx = Conv(lp1[5], UTF-8, ASCII) TRY wx = Replace(wx, ½, .5) TRY wx = Replace(wx, ¼, .25) TRY wx = Replace(wx, ¾, .75) seems to work. I had to put the TRY's in because 3/4 doesn't seem to handle properly otherwise. Sorry, I forgot this: you must replace 3/4 to something else before you can Conv to ASCII. Arrrgh - this will not run. Next idea: Look into the string and find out what Conv makes out of 3/4 in ASCII - maybe it just makes 3/4 out of it? This is what you will have to look for. Your thing would then read as follows: TRY wx = Conv(lp1[5], UTF-8, ASCII) TRY wx = Replace(wx, ½, .5) TRY wx = Replace(wx, ¼, .25) TRY wx = Replace(wx, 3/4, .75) We would need a String.Replace() function here... Rolf -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] last instert ID in sqlite3
Hi there. I'm looking for a function or method in the gb.db component to obtain the ID of the last element inserted into the database. With the methods Create, Edit y Find, we can run our Gambas app independently from the chosen engine database. That's why I wanna know if there is any similar solution to get the last insert id (of an autoincrement field in a table). Now I am working with sqlite3 and I don't find the manner. Thus, I did it with the specific sql query: hResult = hConn.Exec(SELECT last_insert_rowid() AS id) RETURN CInt(hResult[id]) But doing it like this is not database engine independent, because in MySQL the query was: SELECT LAST_INSERT_ID(); Searching a little, I've found that the MySQL component includes it already: 22:23 on Oct 25, 2008gambasCommit by dvillalobos :: r1652 /gambas/trunk/gb.db.mysql/src/gb.db.mysql/ (.component .info .project _MySQL.class): (linkhttp://gambas.svn.sourceforge.net/viewvc/gambas?view=revrevision=1652) [GB.DB.MYSQL] NEW: Added the function LastInsertId to _MySQL class, that returns the last insert id for the current user. Then, Gambas lets you to get the last insert id in a transparent manner? Thank you a lot, Jaume -BEGIN GEEK CODE BLOCK- Version: 3.12 GCS/E/IT/M/TW d-- s: a- C+++$ UL++ P L+++ E- W+++$ N- !o(--) K- w--(---) !O M-(+) V?(-) PS PE Y+ PGP+ t@ 5? X+ R tv- b+@ DI-- D G++ e h++(--) r+ y? --END GEEK CODE BLOCK-- -- -- Free software my friend ;-) -- -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Two little bugs in gambas3
Gambas 3 revision 1885. Jussi On Wed, Mar 4, 2009 at 5:42 PM, Benoît Minisini gam...@users.sourceforge.net wrote: Hi! Two little bugs in Gambas3 IDE. 1. Missing Each command causes wrong error message (loop variable must be local); For SHmh In SHmhCollect Should be something like expected Each or TO. 2. Renaming non empty sub folder causes mouse pointer to show wait icon for ever. When closing gambas, there will be message; WARNING: 2 allocation(s) non freed. No other ill effects noticed... How can I check revision number of installed gambas3 trunk? I can't remember what it was... maybe 1885. Jussi Which version of Gambas do you use? Gambas 3? To check the revision, just type svn info. Regards, -- Benoît -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Two little bugs in gambas3
Hmmm why rechecking? Everything seems to work with my installation, so I assumed it is uncorrupted. I did send message about my compilation problems with outputs attached, but it was rejected as too big ( 256 kb). I forget to zip it... So again if necessary, the whole message: I tried to compile Gambas3 at Ubuntu 8.10 (64bit). First I tried it with libtool 2.2.4, it won't work. Then with libtool 1.5.26. ( ./reconf-all ) reconf.txt 21 This fails!! So I tried this; ( autoreconf --install ) autoreconf.txt 21 Success, I think... Then; ( ./configure -C; make; sudo make install ) output.txt 21 Success, I think... at least everything seems to work! See attachments. Please, someone who understands this better than me, quickly check if my install is OK. Do anyone know why ./reconf-all fails? Then one more thing, please tell me your honest opinion, how stupid idea is me to move to gambas3 (with big project) at this moment? Am I begging for troubles? Jussi On Wed, Mar 4, 2009 at 6:34 PM, Jussi Lahtinen jussi.lahti...@gmail.com wrote: Gambas 3 revision 1885. Jussi On Wed, Mar 4, 2009 at 5:42 PM, Benoît Minisini gam...@users.sourceforge.net wrote: Hi! Two little bugs in Gambas3 IDE. 1. Missing Each command causes wrong error message (loop variable must be local); For SHmh In SHmhCollect Should be something like expected Each or TO. 2. Renaming non empty sub folder causes mouse pointer to show wait icon for ever. When closing gambas, there will be message; WARNING: 2 allocation(s) non freed. No other ill effects noticed... How can I check revision number of installed gambas3 trunk? I can't remember what it was... maybe 1885. Jussi Which version of Gambas do you use? Gambas 3? To check the revision, just type svn info. Regards, -- Benoît -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user outputfiles.tar.bz2 Description: BZip2 compressed data -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] simple replace question
On Wednesday 04 March 2009, Rolf-Werner Eilert wrote: Bruce schrieb: On Thursday 05 March 2009 01:34:29 Rolf-Werner Eilert wrote: newString = Conv(st, UTF-8, ASCII) Replace(st, ½, .5) Thanks RW, That got me started at least. So far: TRY wx = Conv(lp1[5], UTF-8, ASCII) TRY wx = Replace(wx, ½, .5) TRY wx = Replace(wx, ¼, .25) TRY wx = Replace(wx, ¾, .75) seems to work. I had to put the TRY's in because 3/4 doesn't seem to handle properly otherwise. No wonder, because 3/4 doesn't exist in ASCII. This is what my character table program says about this character: UTF-8: 0xC2 0xBE UTF-16: 0x00BE C-Oktal terminiertes UTF-8: \302\276 Dezimale XML-Entität: #190; So you should look for a string consisting of C2 and BE, that is chr$(194) and chr$(190) as we can presume this is UTF-8. Try this: xStr = chr$(194) chr$(190) wx = Replace(wx, xStr, .75) Does this run? Or even wx = Replace(wx, chr$(194) chr$(190), .75) should work. At least if I'm right, but I never tried this. Rolf http://www.eki.ee/letter/chardata.cgi?ucode=00BE found in charsets: 8859-1 (BE); 8859-13 (BE); 8859-8 (BE); 8859-9 (BE); CP1116 (F3); CP1122 (B9); CP1252 (BE); CP1254 (BE); CP1255 (BE); CP1256 (BE); CP1257 (BE); CP1258 (BE); CP775 (F3); CP850 (F3); CP857 (F3); CP863 (AD); Dangerous the differences between char sets. I was suprised it is not in ASCII also. I know my Epson fX80 with IBM supplied ROM did have it. (ancient history :) ) Ron -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user Best regards, Ron_1st -- -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] simple replace question
Bruce schrieb: On Thursday 05 March 2009 01:34:29 Rolf-Werner Eilert wrote: newString = Conv(st, UTF-8, ASCII) Replace(st, ½, .5) Thanks RW, That got me started at least. So far: TRY wx = Conv(lp1[5], UTF-8, ASCII) TRY wx = Replace(wx, ½, .5) TRY wx = Replace(wx, ¼, .25) TRY wx = Replace(wx, ¾, .75) seems to work. I had to put the TRY's in because 3/4 doesn't seem to handle properly otherwise. Sorry, I forgot this: you must replace 3/4 to something else before you can Conv to ASCII. Arrrgh - this will not run. Next idea: Look into the string and find out what Conv makes out of 3/4 in ASCII - maybe it just makes 3/4 out of it? This is what you will have to look for. Your thing would then read as follows: TRY wx = Conv(lp1[5], UTF-8, ASCII) TRY wx = Replace(wx, ½, .5) TRY wx = Replace(wx, ¼, .25) TRY wx = Replace(wx, 3/4, .75) We would need a String.Replace() function here... Rolf String.Replace() is not needed, because there is no difference between ASCII and UTF-8 when replacing strings. There is no reason why Replace(st, ½, .5) won't work, unless the st string is not UTF-8 of course. Regards, -- Benoît -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Custom mouse cursor
Hi! Me.Mouse = Mouse.Cross Works fine, but I need custom cursor. Me.Mouse = Mouse.Custom Me.Cursor = Picture.Load(pic.png) This is not working, of course... class cursor has only two properties x, y. Where do I put the picture? Thanks! Jussi -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Two minor bugs
Hi everyone! When converting one of my apps from Gambas1 to Gambas2, I found 2 minor items: 1. The status of Tool Box Collection is not saved and always starts as switched off when starting the Gambas2 IDE. But maybe this is wanted? This bug is now fixed in revision #1894 (for Gambas 2) and #1895 (for Gambas 3). 2. The last (rightmost) column of a TableView is stretched to the ultimate width of the tableview and ignores if a Width value is given for it. Well, it just looks sort of ugly, but I found it worth mentioning anyway. Have a nice day! Rolf I (finally) created a new property in the GridView class (and so in its child class TableView): GridView.AutoResize. When this property is not set, the last column is not automatically stretched anymore. You get it in the revision #1895. The gb.gtk version has not been implemented yet. Enjoy it. :-) -- Benoît -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Feature requests
I'm not sure how to do this... THe progressbar only moves in one direction, and the .label property is a boolean... Dont know how to change any of that. On Wed, Mar 4, 2009 at 11:09 AM, Benoît Minisini gam...@users.sourceforge.net wrote: I have a couple of requests for the gb.gtk component (and maybe even the gb.qt as well) It's about progressbars. I'd like to use a progressbar like alternating progressbar (like the one used in the gparted windows while executing changes (top one)) alternates from left to right I'd like to be able to display some text inside the progressbar ... not just the value, but a way to display my own string in there Is this at all possible? That's something you can do in Gambas easily, isn't it? -- Benoît -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Reply: No EXEC Output but Works in Terminal
On Wednesday 04 March 2009, Jussi Lahtinen wrote: I tried your code... (first I did move test.sh to execution folder). With me, this; EXEC [sh, Application.Path / test.sh] TO sOutPut works well. But this; EXEC [sh Application.Path / test.sh] TO sOutPut does NOT work (no output). So EXEC command is pretty picky. Benoit, comments? Also, if words.txt is in wrong place, execution freeze. Do this; PRINT sh Application.Path / test.sh Put the output to terminal to see if you got right paths. Cannot say more... Jussi On Wed, Mar 4, 2009 at 5:24 PM, A Person 5t3c7...@nf.sympatico.ca wrote: Good Day . . . Thank You all except the one that told me to read the EXEC docs. I read that many times and tried many variations including trying getting INPUT and OUTPUT to work. But nothing worked. The one problem that I have with Gambas is that the docs are not adequate to a novice user. I tried writing docs for a project but I did not know enough. Before I submitted this I used the full path but I changed it in the demo so that a tester would not have to change anything. I tried EXEC [full path/test.sh] WAIT to sOutPut but it died. top showed nothing running. Can you show me an example of EXEC . . . WAIT with a variable returned? Thanks Paul BTW What is the content of the test.sh? Does it start with '#!/bin/bash' or '#!/bin/sh' ? If not your command shouls be '/bin/bash /full path/test.sh' Just a tip, use as command (/home/usr/paul/bin/text.sh) Yes indeed surround your command with () This force all output by bash and command to 1 output for process_read Best regards, Ron_1st -- A: Delete the text you reply on. Q: What to do to get my post on top? --- A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? --- A: Top-posting. Q: What is the most annoying thing in e-mail? -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Feature requests
On Wednesday 04 March 2009, M0E Lnx wrote: I have a couple of requests for the gb.gtk component (and maybe even the gb.qt as well) It's about progressbars. I'd like to use a progressbar like alternating progressbar (like the one used in the gparted windows while executing changes (top one)) alternates from left to right I'd like to be able to display some text inside the progressbar ... not just the value, but a way to display my own string in there Is this at all possible? Yes!! Best regards, Ron_1st -- -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Feature requests
? -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] last instert ID in sqlite3
On Wednesday 04 March 2009, Jaume Casado wrote: Hi there. I'm looking for a function or method in the gb.db component to obtain the ID of the last element inserted into the database. With the methods Create, Edit y Find, we can run our Gambas app independently from the chosen engine database. That's why I wanna know if there is any similar solution to get the last insert id (of an autoincrement field in a table). Now I am working with sqlite3 and I don't find the manner. Thus, I did it with the specific sql query: hResult = hConn.Exec(SELECT last_insert_rowid() AS id) RETURN CInt(hResult[id]) But doing it like this is not database engine independent, because in MySQL the query was: SELECT LAST_INSERT_ID(); Searching a little, I've found that the MySQL component includes it already: 22:23 on Oct 25, 2008gambasCommit by dvillalobos :: r1652 /gambas/trunk/gb.db.mysql/src/gb.db.mysql/ (.component .info .project _MySQL.class): (linkhttp://gambas.svn.sourceforge.net/viewvc/gambas?view=revrevision=1652) [GB.DB.MYSQL] NEW: Added the function LastInsertId to _MySQL class, that returns the last insert id for the current user. Then, Gambas lets you to get the last insert id in a transparent manner? Thank you a lot, Jaume I do belive dvillalobos did use 'LastInsertId' for the gambas name. It is translated in background to the MySQL 'SELECT LAST_INSERT_ID();' and the mantainer of the sqlite version can/should use the same gambas name and translate it to 'SELECT last_insert_rowid()'. Result will be a common name not conflicting with the sql command itself. Best regards, Ron_1st -- A: Delete the text you reply on. Q: What to do to get my post on top? --- A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? --- A: Top-posting. Q: What is the most annoying thing in e-mail? -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Two minor bugs
On Wednesday 04 March 2009, Benoît Minisini wrote: I (finally) created a new property in the GridView class (and so in its child class TableView): GridView.AutoResize. When this property is not set, the last column is not automatically stretched anymore. You get it in the revision #1895. The gb.gtk version has not been implemented yet. Enjoy it. :-) -- Benoît Thank you master of universe :) Best regards, Ron_1st -- -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Nested Socket Write does not work
Hi, I am working in chat program in Gambas that works with TCP sockets. The problem is that the clients that connect to the server need to receive the list of the contacts that are online (as any chat), The Server has the list but cant send it. This is the code: DIM y, x AS Integer FOR x = 0 TO Client.Max FOR y = 0 TO listacontactos.Count - 1 ' Message(“dgdsgfds”) If I uncomment this line everything works WRITE #Client[x], [ y ] listacontactos[y].Text, Len(listacontactos[y].Text) + 4 NEXT NEXT That code with the message instruction commented only send 1 contact, when I uncomment that dummy message line everything works perfect. Another interesting fact is that If I put break points for the nested FORs and see what happens the programs runs perfect even without the dummy message instruction. Hope somebody could help. Thanks in advance -- Nx GTR -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Two minor bugs
Benoît Minisini schrieb: Hi everyone! When converting one of my apps from Gambas1 to Gambas2, I found 2 minor items: 1. The status of Tool Box Collection is not saved and always starts as switched off when starting the Gambas2 IDE. But maybe this is wanted? This bug is now fixed in revision #1894 (for Gambas 2) and #1895 (for Gambas 3). Wow! Thank you. 2. The last (rightmost) column of a TableView is stretched to the ultimate width of the tableview and ignores if a Width value is given for it. Well, it just looks sort of ugly, but I found it worth mentioning anyway. Have a nice day! Rolf I (finally) created a new property in the GridView class (and so in its child class TableView): GridView.AutoResize. When this property is not set, the last column is not automatically stretched anymore. You get it in the revision #1895. The gb.gtk version has not been implemented yet. Enjoy it. :-) Oh, I will, I will enjoy :-) Thank you very much indeed! Regards Rolf -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user