From multiply at ...2407... Thu Apr 1 05:41:06 2010 From: multiply at ...2407... ( Rini Verawati (via Multiply) ) Date: Wed, 31 Mar 2010 23:41:06 -0400 Subject: [Gambas-user] You've been invited to Multiply Message-ID: <201004010341.o313fJSs026826@...2408...> Check out my Multiply site I set up a Multiply site with my pictures, videos and blog and I want to add you as my friend so you can see it. First, you need to join Multiply! Once you join, you can also create your own site and share anything you want, with anyone you want. Here's the link: http://multiply.com/si/s1hyTdxSzYowYBMT7wFgIA Thanks, Rini Stop e-mails, view our privacy policy, or report abuse: http://multiply.com/bl/s1hyTdxSzYowYBMT7wFgIA We haven't added your email address to any lists, nor will we share it with anyone at any time. Copyright 2010 Multiply 6001 Park of Commerce Blvd, Boca Raton, FL From doriano.blengino at ...1909... Thu Apr 1 08:41:19 2010 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Thu, 01 Apr 2010 08:41:19 +0200 Subject: [Gambas-user] Problem with PATH to shared library - part 2 In-Reply-To: <1270070760.5024.8.camel@...2406...> References: <1270063742.3189.35.camel@...2406...> <201003312241.15782.gambas@...1...> <1270070760.5024.8.camel@...2406...> Message-ID: <4BB4400F.6040403@...1909...> craf ha scritto: > >> >> I forgot in the previous mail indicate the steps I have done: >> >> First run the command $ ldd gbr2 to see if there were dependency >> problems, which I produced the following result: >> >> $ Ldd gbr2 >> linux-gate.so.1 => (0xb770d000) >> libm.so.6 => / lib/tls/i686/cmov/libm.so.6 (0xb76db000) >> libdl.so.2 => / lib/tls/i686/cmov/libdl.so.2 (0xb76d7000) >> libpthread.so.0 => / lib/tls/i686/cmov/libpthread.so.0 (0xb76be000) >> libffi.so.5 => not found >> libc.so.6 => / lib/tls/i686/cmov/libc.so.6 (0xb756f000) >> / Lib/ld-linux.so.2 (0xb770e000) >> >> This tells me they can not find the shared library libffi.so.5, for >> which issued the command: >> $ Tree opt >> >> my_project/ >> >> |-- gambas2 >> | >> | |-- bin >> | | >> | | |-- gbr2 >> | | >> | | `-- gbx2 >> | | >> | |-- lib >> | | >> | | `-- gambas2 >> | | >> | | |-- blah blah blah... >> | >> | `-- library_shared >> | >> | |-- lib >> | | >> | | |-- blah blah blah... >> | >> | `-- usr >> | >> | `-- lib >> | >> | |-- blah blah blah... >> | |-- libexpat.so.1 >> | |-- libexpat.so.1.5.2 >> | |-- libffi.so.5- - - - - - - - - - - - - > ?THERE HERE! >> After that... > ?yes! it is as I have on file executable.sh. > > #!/bin/sh > export PATH=/opt/my_project/gambas2/bin > export GB_DIR=/opt/my_project/gambas2 > export LD_LIBRARY_PATH=/opt/my_project/gambas2/library_shared > exec /opt/my_project/my_project.gambas > I think that your LD_LIBRARY_PATH is still erroneous. The correct value should end with "..../usr/lib". >> Save the changes to the file and then running: >> >> $ sudo ldconfig >> I think that is not a good idea to fiddle with files in /etc, unless it is the only remaining way... > >> export LD_LIBRARY_PATH = / opt/my_project/gambas2/library_shared/lib: / >> opt/my_project/gambas2/library_shared/usr/lib >> Ok, this seems correct (apart from bad spaces). ldd(1) is good to see where libraries are searched, and in fact you used it to find a problem. Why not use it again, after your modification to LD_LIBRARY_PATH? "You see an error. You do a correction. You check if the error has gone away". This is called debugging. Set LD_LIBRARY_PATH by hand, then try to do an "ls -l $LD_LIBRARY_PATH/*.so*". Then try again "ldd gbr2". ldd can be run on shared libraries too: try for example "ldd /usr/lib/libncurses.so". May be that gbr2 finds libffi, but then libffi does not find something else... Read carefully the documentation about ld.so(8). It states that if the program is a SETUID/SETGID one, the LD_..PATH variable is ignored. It says also that the variable LD_DEBUG can be set to generate verbose debugging - if you use this facility, by no mean you can miss the error. I can say no more about this, but in the next messages you could first google-translate, and then paste citations of code and similar, which get messed up by google. Hope this helps, regards, Doriano From gambas.fr at ...626... Thu Apr 1 12:29:43 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Thu, 1 Apr 2010 12:29:43 +0200 Subject: [Gambas-user] About data control for gambas In-Reply-To: <860357200-1270068203-cardhu_decombobulator_blackberry.rim.net-1498594452-@...2405...> References: <860357200-1270068203-cardhu_decombobulator_blackberry.rim.net-1498594452-@...2405...> Message-ID: we have these components : gb.db, gb.db.mysql, gb.db.form 2010/3/31 : > Hi > I would like to know wich control have gambas for data access for mysql for example. > Show or taken any information from or to data base > Thanks > Sent on the TELUS Mobility network with BlackBerry > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From robert1juhasz at ...626... Fri Apr 2 01:28:14 2010 From: robert1juhasz at ...626... (yuhej) Date: Thu, 1 Apr 2010 16:28:14 -0700 (PDT) Subject: [Gambas-user] menu In-Reply-To: <68652a0b1003101252j76b9a01fy1d388bca399274cf@...627...> References: <68652a0b1003101252j76b9a01fy1d388bca399274cf@...627...> Message-ID: <28114470.post@...1379...> Hello, No any idea? Maybe there is no any solution to do that? I may need to give up then the idea :-( Robi yuhej wrote: > > Hello List, > > I have a very basic question... when I develop my applications I'd like > them > to appear in the menu under a group (when installed on a machine). When I > do > tha packaging I'm able to set several parameters, but is it possible to > create an own menu (for example myApps) and to put the different > application > under this menu (myApps/app1, myApps/app2, etc)? If yes, where can I > specify > it? > The user PC is Ubuntu. > > Thanks, > Robi > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > -- View this message in context: http://old.nabble.com/menu-tp27855632p28114470.html Sent from the gambas-user mailing list archive at Nabble.com. From robert1juhasz at ...626... Fri Apr 2 01:42:21 2010 From: robert1juhasz at ...626... (yuhej) Date: Thu, 1 Apr 2010 16:42:21 -0700 (PDT) Subject: [Gambas-user] class Message-ID: <28114690.post@...1379...> Hello List, I have no experience with the classes in gambas and just a little in VB. Based on the bult-in example I could get working it when defining the properties as public variable but I don't know how to encapsulate (how to use the get and the set if I have private properties. An other question is if it's possible to overload functions. I tried to make 2 constructors by making 2 _new functions (in one to set the properties by giving the list of the properties, in the second to give a ID to of the record where I store them in a database to get the data from). I got an error message. A very simple example with one parameter and one function would be appretiated! Thanks, Robi -- View this message in context: http://old.nabble.com/class-tp28114690p28114690.html Sent from the gambas-user mailing list archive at Nabble.com. From gambas at ...1... Fri Apr 2 01:44:21 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Fri, 2 Apr 2010 01:44:21 +0200 Subject: [Gambas-user] menu In-Reply-To: <28114470.post@...1379...> References: <68652a0b1003101252j76b9a01fy1d388bca399274cf@...627...> <28114470.post@...1379...> Message-ID: <201004020144.21119.gambas@...1...> > Hello, > > No any idea? Maybe there is no any solution to do that? I may need to give > up then the idea :-( > > Robi > > yuhej wrote: > > Hello List, > > > > I have a very basic question... when I develop my applications I'd like > > them > > to appear in the menu under a group (when installed on a machine). When I > > do > > tha packaging I'm able to set several parameters, but is it possible to > > create an own menu (for example myApps) and to put the different > > application > > under this menu (myApps/app1, myApps/app2, etc)? If yes, where can I > > specify > > it? > > The user PC is Ubuntu. > > > > Thanks, > > Robi I don't think that is possible in the same way you do that on Windows. You can only define application groups, and then the desktop use them to create the menu. But the desktop environment decides, not the application. Regards, -- Beno?t Minisini From kobolds at ...2041... Fri Apr 2 05:34:23 2010 From: kobolds at ...2041... (kobolds) Date: Thu, 1 Apr 2010 20:34:23 -0700 (PDT) Subject: [Gambas-user] probem with user component in GB3 Rev 2851 Message-ID: <28115729.post@...1379...> I realized my program still able to call my component even though that my component is not showing in component list . the problem now is that the changes on my component project is not reflected on my program. -- View this message in context: http://old.nabble.com/probem-with-user-component-in-GB3-Rev-2851-tp28115729p28115729.html Sent from the gambas-user mailing list archive at Nabble.com. From robert1juhasz at ...626... Fri Apr 2 06:19:38 2010 From: robert1juhasz at ...626... (Robert JUHASZ) Date: Fri, 2 Apr 2010 06:19:38 +0200 Subject: [Gambas-user] menu In-Reply-To: <201004020144.21119.gambas@...1...> References: <68652a0b1003101252j76b9a01fy1d388bca399274cf@...627...> <28114470.post@...1379...> <201004020144.21119.gambas@...1...> Message-ID: Thanks Benoit! When you say that I can define application group, dou you mean that I can >> define << (from gambas when packaging or from ubuntu) or do you mean that I can >> choose << from the list provided during the creation of the package ? Robi 2010/4/2 Beno?t Minisini > > Hello, > > > > No any idea? Maybe there is no any solution to do that? I may need to > give > > up then the idea :-( > > > > Robi > > > > yuhej wrote: > > > Hello List, > > > > > > I have a very basic question... when I develop my applications I'd like > > > them > > > to appear in the menu under a group (when installed on a machine). When > I > > > do > > > tha packaging I'm able to set several parameters, but is it possible to > > > create an own menu (for example myApps) and to put the different > > > application > > > under this menu (myApps/app1, myApps/app2, etc)? If yes, where can I > > > specify > > > it? > > > The user PC is Ubuntu. > > > > > > Thanks, > > > Robi > > I don't think that is possible in the same way you do that on Windows. You > can > only define application groups, and then the desktop use them to create the > menu. But the desktop environment decides, not the application. > > Regards, > > -- > Beno?t Minisini > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From bjorn.macintosh at ...626... Fri Apr 2 10:09:58 2010 From: bjorn.macintosh at ...626... (Bjorn Macintosh) Date: Fri, 2 Apr 2010 21:09:58 +1300 Subject: [Gambas-user] Parallel Port - Illegal Seek - Message-ID: Hi All, I am writing a parallel port interface, however I am struggling with how to write to the parallel port. Below I have included the code that I have used. Following that I have included the BASIC code that I am bastardizing. My Gambas version is Gambas2.13 I am running Linux Mint 8 I do have a parallel port on my PC. It is '0378' - '037a' and '0778' - '077a' The error code I am getting is "System error. illegal seek" Thanks in advance for any help anyone can give. ---------------------------------------------------------------------GAMBAS2 CODE FOLLOWS------------------------------------------------------ ' Gambas module file PUBLIC SUB Main() DIM N AS Integer DIM pin AS Integer DIM pinout AS Integer[] = [0, 0, 0, 0, 0, 0, 0, 0] DIM pump AS Integer DIM Ptime AS Integer DIM Clock AS Integer DIM UClock AS Integer DIM DClock AS Integer DIM commit AS Integer DIM poweron AS Integer DIM switch AS Integer DIM gate AS File DIM base0, base1, base2 AS Integer base0 = 0 base1 = 1 base2 = 2 poweron = 64 commit = 144 switch = 17 UClock = 130 DClock = 128 gate = OPEN "/dev/parport0" FOR READ WRITE SEEK #gate, base0 WRITE #gate, poweron FOR Ptime = 1 TO 2000 STEP 1 NEXT SEEK #gate, base2 WRITE #gate, switch GOTO START CommitChanges: FOR N = 0 TO 7 STEP 1 pump = CInt(1000000 & pinout[Fix(N)]) Clock = CInt(1000001 & pinout[Fix(N)]) SEEK #gate, base0 WRITE #gate, pump FOR Ptime = 1 TO 2000 STEP 1 NEXT SEEK #gate, base0 WRITE #gate, Clock FOR Ptime = 1 TO 2000 STEP 1 NEXT SEEK #gate, base0 WRITE #gate, pump NEXT FOR Ptime = 1 TO 2000 STEP 1 NEXT FOR N = 1 TO 16 STEP 1 SEEK #gate, base0 WRITE #gate, UClock FOR Ptime = 1 TO 2000 STEP 1 NEXT SEEK #gate, base0 WRITE #gate, DClock NEXT FOR Ptime = 1 TO 2000 STEP 1 NEXT SEEK #gate, base0 WRITE #gate, commit FOR Ptime = 1 TO 2000 STEP 1 NEXT SEEK #gate, base0 WRITE #gate, poweron GOTO PrintPinout PrintPinout: FOR N = 0 TO 7 STEP 1 PRINT pinout[Fix(N)] NEXT GOTO START PinSelectFail: PRINT "You have selected a pin that does not exist, careful as this may cause a divide by 0 and end the universe, Select between pin 0 and pin 7" GOTO START START: PRINT "What input do you want to toggle? (pins 0 -> 7 are outputs, Pin 8 is the activation sequence)" INPUT pin IF pin < 0 OR pin > 8 THEN GOTO PinSelectFail ELSE IF pin = 8 THEN GOTO CommitChanges ELSE IF pinout[Fix(pin)] = 0 THEN pinout[Fix(pin)] = 1 ELSE IF pinout[Fix(pin)] = 1 THEN pinout[Fix(pin)] = 0 ENDIF GOTO PrintPinout END ---------------------------------------------------------------------Gambas2 END------------------------------------------------------------------------ ---------------------------------------------------------------------BASIC CODE FOLLOWS------------------------------------------------------ BASE0=&H378 'SWITCH POWER AND OUTPUTS ON OUT BASE0, &H80 OUT BASE0 + 2, 11 'DEFINE ALL DIGITAL OUTPUTS [OUT(N)] AS BEING OFF (0) FOR N = 0 TO 7 DOUT(N) = 0 NEXT N DOUT=0 START: INPUT "WHICH DIGITAL OUTPUT DO YOU WANT TO TOGGLE (0 TO 7)...."; N IF N < 0 OR N > 7 THEN GOTO START N = FIX(N) DOUT9N0=ABS(NOT (-DOUT(N))) ' THIS LINE TOGGLES THE OUTPUT 'CREATE COMPLETE BYTE FOR IC3 CALLED DOUT FOR N = 0 TO 7 IF DOUT(N) = 0 THEN DOUT = DOUT AND NOT (2^N) ELSE DOUT = DOUT OR 2^N ENDIF NEXT N 'SEND 8 CLOCK PULSES AND DIGITAL OUT DATA (ALL ZERO'S) FOR BIT = 1 TO 8 B = 8 - BIT BYTE = ((DOUT AND 2^B) / 2^B) OR &H80 OUT BASE0, BYTE OUT BASE0, BYTE OR 2 OUT BASE0 BYTE NEXT BIT 'SEND ANOTHER 16 CLOCK PULSES TO SHIFT THE DATA INTO IC3 FOR BIT = 9 TO 24 OUT BASE0, &H82 OUT BASE0, &H80 NEXT BIT 'LOAD IC3 OUT BASE0, &H90 OUT BASE0, &h80] ---------------------------------------------------------------------BASIC END------------------------------------------------------------------------ Bjorn Macintosh From Karl.Reinl at ...2345... Fri Apr 2 11:31:00 2010 From: Karl.Reinl at ...2345... (Charlie Reinl) Date: Fri, 02 Apr 2010 11:31:00 +0200 Subject: [Gambas-user] probem with user component in GB3 Rev 2851 In-Reply-To: <28115729.post@...1379...> References: <28115729.post@...1379...> Message-ID: <1270200660.6872.5.camel@...40...> Am Donnerstag, den 01.04.2010, 20:34 -0700 schrieb kobolds: > I realized my program still able to call my component even though that my > component is not showing in component list . > > the problem now is that the changes on my component project is not reflected > on my program. > Salut, for gambas2, I posted 21.01.2010 on subject : Using an existing component to create a new version something about, gambas3 I think does the same things! -- Amicalement Charlie From gambas at ...1... Fri Apr 2 14:35:28 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Fri, 2 Apr 2010 14:35:28 +0200 Subject: [Gambas-user] gambas3 Revision 2835. IDE crashes In-Reply-To: <1269715084.8115.5.camel@...40...> References: <1269715084.8115.5.camel@...40...> Message-ID: <201004021435.28876.gambas@...1...> > Salut, > > starting gambas3 Revision 2835 complied today > I get this: > > Desktop.Width_Read.321: #13: Null object > 0: Desktop.Width_Read.321 > 1: FMain._new.22 > 2: Project.Main.202 > That problem should be fixed in revision #2852. Regards, -- Beno?t Minisini From kobolds at ...2041... Fri Apr 2 14:52:58 2010 From: kobolds at ...2041... (kobolds) Date: Fri, 2 Apr 2010 05:52:58 -0700 (PDT) Subject: [Gambas-user] probem with user component in GB3 Rev 2851 In-Reply-To: <1270200660.6872.5.camel@...40...> References: <28115729.post@...1379...> <1270200660.6872.5.camel@...40...> Message-ID: <28118718.post@...1379...> when I move to GB3 , I recreate from scratch my program and all the component . at that time I still see the component show up in component list . I not sure since which rev of GB3 the component disappear from the list , this is because I haven't done any changes to the component until today. I try recompile and make and restart GB3 but no use Charlie Reinl wrote: > > Am Donnerstag, den 01.04.2010, 20:34 -0700 schrieb kobolds: >> I realized my program still able to call my component even though that my >> component is not showing in component list . >> >> the problem now is that the changes on my component project is not >> reflected >> on my program. >> > Salut, > > for gambas2, I posted 21.01.2010 on > subject : Using an existing component to create a new version > something about, > gambas3 I think does the same things! > -- > Amicalement > Charlie > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > -- View this message in context: http://old.nabble.com/probem-with-user-component-in-GB3-Rev-2851-tp28115729p28118718.html Sent from the gambas-user mailing list archive at Nabble.com. From Karl.Reinl at ...2345... Fri Apr 2 16:26:12 2010 From: Karl.Reinl at ...2345... (Charlie Reinl) Date: Fri, 02 Apr 2010 16:26:12 +0200 Subject: [Gambas-user] gambas3 Revision 2835. IDE crashes In-Reply-To: <201004021435.28876.gambas@...1...> References: <1269715084.8115.5.camel@...40...> <201004021435.28876.gambas@...1...> Message-ID: <1270218372.6609.0.camel@...40...> Am Freitag, den 02.04.2010, 14:35 +0200 schrieb Beno?t Minisini: > > Salut, > > > > starting gambas3 Revision 2835 complied today > > I get this: > > > > Desktop.Width_Read.321: #13: Null object > > 0: Desktop.Width_Read.321 > > 1: FMain._new.22 > > 2: Project.Main.202 > > > > That problem should be fixed in revision #2852. > > Regards, > Salut Beno?t, YES, now it also ran on iceWM -- Amicalement Charlie From Karl.Reinl at ...2345... Fri Apr 2 16:33:20 2010 From: Karl.Reinl at ...2345... (Charlie Reinl) Date: Fri, 02 Apr 2010 16:33:20 +0200 Subject: [Gambas-user] probem with user component in GB3 Rev 2851 In-Reply-To: <28118718.post@...1379...> References: <28115729.post@...1379...> <1270200660.6872.5.camel@...40...> <28118718.post@...1379...> Message-ID: <1270218800.6609.8.camel@...40...> Am Freitag, den 02.04.2010, 05:52 -0700 schrieb kobolds: > when I move to GB3 , I recreate from scratch my program and all the component > . > > at that time I still see the component show up in component list . > I not sure since which rev of GB3 the component disappear from the list , > this is because I haven't done any changes to the component until today. > > I try recompile and make and restart GB3 but no use > > -------------8<---------------------------------- Salut, just dated up to revision #2852, and I can see my component created with revision >= #2835. I good idea when it drives wired like that, uninstall gambas3, delete the local svn directory and start from scratch. -- Cordialement Charlie From dunworthsys at ...626... Fri Apr 2 23:34:48 2010 From: dunworthsys at ...626... (Chris Dunworth) Date: Fri, 2 Apr 2010 22:34:48 +0100 Subject: [Gambas-user] UNIX SOCKETS Message-ID: Hi All, Don't know if I'm doing something wrong or there is a bug Using Gambas 2.16 on SLAX 6.1.2 Linux Kernel 2.6.27.27 Graphical application with Network programming option My class file **************************************************************************************************** Gambas class file PUBLIC MySock AS Socket PUBLIC SUB Button1_Click() DIM sBuf AS String MySock = NEW Socket 'MySock.Connect("localhost", 8080) MySock.Connect("/var/run/gtm2") PRINT "status1" & MySock.Status DO WHILE (MySock.Status <> 7) AND (MySock.Status > 0) WAIT 0.1 LOOP PRINT " Status = " & MySock.Status IF MySock.Status <> 7 THEN PRINT "Error <>7 " & MySock.Status QUIT END IF PRINT "socket opened" sBuf = "Hello over there.\n" WRITE #MySock, sBuf, Len(sBuf) DO WHILE Lof(MySock) = 0 WAIT 0.1 LOOP READ #MySock, sBuf, Lof(MySock) PRINT sBuf CLOSE #MySock END '------------------------------------------------------------- PUBLIC SUB Button2_Click() DIM sOutput AS String EXEC ["python", "psock.py"] TO sOutput PRINT sOutput END '>>>>>>>>>>>>> psock.py <<<<<<<<<<<<<<<<<<<<< 'import socket ' 's = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) 's.connect("/var/run/gtm2") ' 'data = s.recv(1024) 's.close() 'PRINT 'recvd ', repr(data) '>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ********************************************************************************************************************** This calls a script via inetd that just sends a message and terminates The script is verified as working using psock.py ( code above ) When run va Button2 works as expected When run via Button1 give errors thus status15 Status = -6 Error <>7 -6 WARNING: circular references detected FMain (1) Mutex destroy failure: Device or resource busy WARNING: 10 allocation(s) non freed. If tcp socket is used to connect to script then Button1 code works OK Can anybody help Thanks Chris Dunworth BTW superb product, keep up the good work From Karl.Reinl at ...2345... Fri Apr 2 23:45:11 2010 From: Karl.Reinl at ...2345... (Charlie Reinl) Date: Fri, 02 Apr 2010 23:45:11 +0200 Subject: [Gambas-user] UNIX SOCKETS In-Reply-To: References: Message-ID: <1270244711.8001.2.camel@...40...> Am Freitag, den 02.04.2010, 22:34 +0100 schrieb Chris Dunworth: > Hi All, > > Don't know if I'm doing something wrong or there is a bug > > Using Gambas 2.16 on SLAX 6.1.2 Linux Kernel 2.6.27.27 > > Graphical application with Network programming option > > My class file > **************************************************************************************************** > Gambas class file > > PUBLIC MySock AS Socket > > PUBLIC SUB Button1_Click() > > DIM sBuf AS String > > MySock = NEW Socket > 'MySock.Connect("localhost", 8080) > MySock.Connect("/var/run/gtm2") > > PRINT "status1" & MySock.Status > > > DO WHILE (MySock.Status <> 7) AND (MySock.Status > 0) > WAIT 0.1 > LOOP > PRINT " Status = " & MySock.Status > > IF MySock.Status <> 7 THEN > PRINT "Error <>7 " & MySock.Status > QUIT > END IF > PRINT "socket opened" > > sBuf = "Hello over there.\n" > WRITE #MySock, sBuf, Len(sBuf) > > DO WHILE Lof(MySock) = 0 > WAIT 0.1 > LOOP > READ #MySock, sBuf, Lof(MySock) > PRINT sBuf > > CLOSE #MySock > > END > '------------------------------------------------------------- > > PUBLIC SUB Button2_Click() > > > DIM sOutput AS String > EXEC ["python", "psock.py"] TO sOutput > > PRINT sOutput > END > > '>>>>>>>>>>>>> psock.py <<<<<<<<<<<<<<<<<<<<< > 'import socket > ' > 's = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) > 's.connect("/var/run/gtm2") > ' > 'data = s.recv(1024) > 's.close() > 'PRINT 'recvd ', repr(data) > '>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> > > ********************************************************************************************************************** > > This calls a script via inetd that just sends a message and terminates > > The script is verified as working using psock.py ( code above ) > > When run va Button2 works as expected > > When run via Button1 give errors thus > > status15 > Status = -6 > Error <>7 -6 > WARNING: circular references detected > FMain (1) > Mutex destroy failure: Device or resource busy------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > WARNING: 10 allocation(s) non freed. > > If tcp socket is used to connect to script then Button1 code works OK > > Can anybody help > > Thanks > > Chris Dunworth > > BTW superb product, keep up the good work Salut, as you use a very old version, please look at http://gambas.sourceforge.net/en/changelog2.html if a new version would not be better to use! -- Amicalement Charlie From prog at ...2177... Sat Apr 3 04:44:36 2010 From: prog at ...2177... (craf) Date: Fri, 02 Apr 2010 23:44:36 -0300 Subject: [Gambas-user] Missing components In-Reply-To: <1269559244.3600.10.camel@...651...> References: <1269553110.14786.7.camel@...651...> <1269556678.3600.1.camel@...651...> <1269557094.3600.5.camel@...651...> <201003252358.52411.gambas@...1...> <1269559244.3600.10.camel@...651...> Message-ID: <1270262676.4152.5.camel@...2406...> -----Mensaje original----- De: craf Reply-to: mailing list for gambas users Para: mailing list for gambas users Asunto: Re: [Gambas-user] Missing components Fecha: Thu, 25 Mar 2010 20:20:44 -0300 -----Mensaje original----- De: Beno?t Minisini Reply-to: mailing list for gambas users Para: mailing list for gambas users Asunto: Re: [Gambas-user] Missing components Fecha: Thu, 25 Mar 2010 23:58:52 +0100 > Fixed issue gb.gtk.ext component. > A problem that remains is that if I add a button, this does not appear > on the form and run the program, it can not stop. > >Can you give more details? I don't see what you are talking about... >First, I apologize for my bad English. Google helps, but not much. >Steps that I perform: >1. New project with gtk + >2. I close Gambas. >3. Change the file. Proyect and delete the reference to the component >gb.gtk.ext >4. Gambas open again but I can not put any control on the form. see a >locked symbol next to the controls. >It is as if the IDE is blocked. >Regards ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user Hi. I managed to solve the problem of not being able to insert components on the form, what I did was deselect the component gb.gtk and select the component gb.gui. Is this a bug in my IDE? or It's just a feature of Gambas 3? Regards From bill-lancaster at ...2231... Sat Apr 3 10:02:07 2010 From: bill-lancaster at ...2231... (Bill-Lancaster) Date: Sat, 3 Apr 2010 01:02:07 -0700 (PDT) Subject: [Gambas-user] Control-P anywhere in programme Message-ID: <28125480.post@...1379...> My programme has many gridview displays in many forms. Instead of having a print button on each form, is there a way of having a Control-P action working throughout the programme? Bill Lancaster -- View this message in context: http://old.nabble.com/Control-P-anywhere-in-programme-tp28125480p28125480.html Sent from the gambas-user mailing list archive at Nabble.com. From gambas.fr at ...626... Sat Apr 3 12:08:56 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Sat, 3 Apr 2010 12:08:56 +0200 Subject: [Gambas-user] Control-P anywhere in programme In-Reply-To: <28125480.post@...1379...> References: <28125480.post@...1379...> Message-ID: i see only one way ... it's to use In Each of you form put this : Public sub Form_KeyPress() FMain.ManageKeys end and in fmain : Public Sub ManageKeys() Select Case Key.Code endselect End 2010/4/3 Bill-Lancaster : > > My programme has many gridview displays in many forms. > Instead of having a print button on each form, is there a way of having a > Control-P action working throughout the programme? > > Bill Lancaster > -- > View this message in context: http://old.nabble.com/Control-P-anywhere-in-programme-tp28125480p28125480.html > Sent from the gambas-user mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas at ...1... Sat Apr 3 15:31:19 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sat, 3 Apr 2010 15:31:19 +0200 Subject: [Gambas-user] Missing components In-Reply-To: <1270262676.4152.5.camel@...2406...> References: <1269553110.14786.7.camel@...651...> <1269559244.3600.10.camel@...651...> <1270262676.4152.5.camel@...2406...> Message-ID: <201004031531.19044.gambas@...1...> > > Hi. > > I managed to solve the problem of not being able to insert components on > the form, what I did was deselect the component gb.gtk and select the > component gb.gui. > Is this a bug in my IDE? or It's just a feature of Gambas 3? > > Regards > Hi, All those problems should have been fixed in revision #2856. Selecting gb.gtk should now behave the same as selection gb.qt4 or gb.gui. Can you confirm ? Regards, -- Beno?t Minisini From bill-lancaster at ...2231... Sat Apr 3 15:41:21 2010 From: bill-lancaster at ...2231... (Bill-Lancaster) Date: Sat, 3 Apr 2010 06:41:21 -0700 (PDT) Subject: [Gambas-user] Control-P anywhere in programme In-Reply-To: <28125480.post@...1379...> References: <28125480.post@...1379...> Message-ID: <28127063.post@...1379...> Thanks Fabien - I'll do it Bill Lancaster -- View this message in context: http://old.nabble.com/Control-P-anywhere-in-programme-tp28125480p28127063.html Sent from the gambas-user mailing list archive at Nabble.com. From prog at ...2177... Sat Apr 3 21:02:31 2010 From: prog at ...2177... (craf) Date: Sat, 03 Apr 2010 16:02:31 -0300 Subject: [Gambas-user] Missing components In-Reply-To: <201004031531.19044.gambas@...1...> References: <1269553110.14786.7.camel@...651...> <1269559244.3600.10.camel@...651...> <1270262676.4152.5.camel@...2406...> <201004031531.19044.gambas@...1...> Message-ID: <1270321351.1941.0.camel@...2406...> -----Mensaje original----- De: Beno?t Minisini Reply-to: mailing list for gambas users Para: mailing list for gambas users Asunto: Re: [Gambas-user] Missing components Fecha: Sat, 3 Apr 2010 15:31:19 +0200 > > Hi. > > I managed to solve the problem of not being able to insert components on > the form, what I did was deselect the component gb.gtk and select the > component gb.gui. > Is this a bug in my IDE? or It's just a feature of Gambas 3? > > Regards > >Hi, >All those problems should have been fixed in revision #2856. Selecting gb.gtk >should now behave the same as selection gb.qt4 or gb.gui. >Can you confirm ? >Regards, Yeah!, I can insert components on a form. Thank you very much, Benoit Regards From dunworthsys at ...626... Sat Apr 3 21:48:32 2010 From: dunworthsys at ...626... (Chris Dunworth) Date: Sat, 3 Apr 2010 20:48:32 +0100 Subject: [Gambas-user] UNIX SOCKETS Message-ID: Hi All, I found the problem. It seems MySock.Connect("/var/run/gtm2") does require a port parameter using MySock.Connect("/var/run/gtm2", Net.local) socket opens and works corectly. I found this info by browsing through cSocket.c source code in the bg.netcomponent. /******************************************************************** Port to connect to. Can be 'Net.Local' for Unix sockets, or 1-65535 for TCP sockets ********************************************************************/ BEGIN_PROPERTY(CSOCKET_Port) if (READ_PROPERTY) { GB.ReturnInteger(THIS->iUsePort); return; } if (THIS->iStatus>0) { GB.Error("Port property can not be changed while working"); return; } if (VPROP(GB_INTEGER)<0) { THIS->iUsePort=0; return; } if (VPROP(GB_INTEGER)>65535) { THIS->iUsePort=65535; return; } THIS->iUsePort=VPROP(GB_INTEGER); END_PROPERTY /********************************************************************* Charlie, using a version that dates from Sep 2009 is hardly 'very old' Regards, Chris Dunworth Date: Fri, 02 Apr 2010 23:45:11 +0200 From: Charlie Reinl Subject: Re: [Gambas-user] UNIX SOCKETS To: mailing list for gambas users Message-ID: <1270244711.8001.2.camel@ localhost> Content-Type: text/plain Am Freitag, den 02.04.2010, 22:34 +0100 schrieb Chris Dunworth: > Hi All, > > Don't know if I'm doing something wrong or there is a bug > > Using Gambas 2.16 on SLAX 6.1.2 Linux Kernel 2.6.27.27 > > Graphical application with Network programming option > > My class file > **************************************************************************************************** > Gambas class file > > PUBLIC MySock AS Socket > > PUBLIC SUB Button1_Click() > > DIM sBuf AS String > > MySock = NEW Socket > 'MySock.Connect("localhost", 8080) > MySock.Connect("/var/run/gtm2") > > PRINT "status1" & MySock.Status > > > DO WHILE (MySock.Status <> 7) AND (MySock.Status > 0) > WAIT 0.1 > LOOP > PRINT " Status = " & MySock.Status > > IF MySock.Status <> 7 THEN > PRINT "Error <>7 " & MySock.Status > QUIT > END IF > PRINT "socket opened" > > sBuf = "Hello over there.\n" > WRITE #MySock, sBuf, Len(sBuf) > > DO WHILE Lof(MySock) = 0 > WAIT 0.1 > LOOP > READ #MySock, sBuf, Lof(MySock) > PRINT sBuf > > CLOSE #MySock > > END > '------------------------------------------------------------- > > PUBLIC SUB Button2_Click() > > > DIM sOutput AS String > EXEC ["python", "psock.py"] TO sOutput > > PRINT sOutput > END > > '>>>>>>>>>>>>> psock.py <<<<<<<<<<<<<<<<<<<<< > 'import socket > ' > 's = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) > 's.connect("/var/run/gtm2") > ' > 'data = s.recv(1024) > 's.close() > 'PRINT 'recvd ', repr(data) > '>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> > > ********************************************************************************************************************** > > This calls a script via inetd that just sends a message and terminates > > The script is verified as working using psock.py ( code above ) > > When run va Button2 works as expected > > When run via Button1 give errors thus > > status15 > Status = -6 > Error <>7 -6 > WARNING: circular references detected > FMain (1) > Mutex destroy failure: Device or resource busy------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > WARNING: 10 allocation(s) non freed. > > If tcp socket is used to connect to script then Button1 code works OK > > Can anybody help > > Thanks > > Chris Dunworth > > BTW superb product, keep up the good work Salut, as you use a very old version, please look at http://gambas.sourceforge.net/en/changelog2.html if a new version would not be better to use! -- Amicalement Charlie From Karl.Reinl at ...2345... Sat Apr 3 22:37:25 2010 From: Karl.Reinl at ...2345... (Charlie Reinl) Date: Sat, 03 Apr 2010 22:37:25 +0200 Subject: [Gambas-user] UNIX SOCKETS In-Reply-To: References: Message-ID: <1270327045.6543.12.camel@...40...> Am Samstag, den 03.04.2010, 20:48 +0100 schrieb Chris Dunworth: > Hi All, > > I found the problem. > > It seems MySock.Connect("/var/run/gtm2") > does require a port parameter > > using > > MySock.Connect("/var/run/gtm2", Net.local) > > socket opens and works corectly. > I found this info by browsing through cSocket.c source code in the > bg.netcomponent. > /******************************************************************** > Port to connect to. Can be 'Net.Local' for Unix sockets, or > 1-65535 for TCP sockets > ********************************************************************/ > BEGIN_PROPERTY(CSOCKET_Port) > > if (READ_PROPERTY) > { > GB.ReturnInteger(THIS->iUsePort); > return; > } > > if (THIS->iStatus>0) > { > GB.Error("Port property can not be changed while working"); > return; > } > if (VPROP(GB_INTEGER)<0) { THIS->iUsePort=0; return; } > if (VPROP(GB_INTEGER)>65535) { THIS->iUsePort=65535; return; } > THIS->iUsePort=VPROP(GB_INTEGER); > > > END_PROPERTY > /********************************************************************* > > > > Charlie, > using a version that dates from Sep 2009 is hardly 'very old' > > Regards, > > Chris Dunworth > > ---------------8><---------------------- May be you think coders are lazy, because they let work machines. But do you remember the speed of light? ;-) you didn't read http://gambas.sourceforge.net/en/changelog2.html because the last entry is version 2.20.2 2.20.2 2.20.1 2.20.0 2.19.0 2.18.0 2.17.0 all these versions and about ~ 160 lines of documentation (not lines of code) between today back to Sep 2009. But you are right. NOT very old, but out dated ! -- Cordialement Charlie From bjorn.macintosh at ...626... Sun Apr 4 00:14:24 2010 From: bjorn.macintosh at ...626... (Bjorn Macintosh) Date: Sun, 4 Apr 2010 10:14:24 +1200 Subject: [Gambas-user] Parallel Port Message-ID: Hi all, Does anyone have a program that interfaces with the parallel port, one written in Gambas. If you do would you be willing to share this program with me as I am trying to write a parallel port interface and am struggling to get my head around a few concepts. mainly how to write to the port and how to select pin's base 0 base1 and base2. Any help would be greatly appreciated. I sent a post two days ago holding the full details on my program and what I am trying to do if you need any clarification. Thanks Bjorn Macintosh From nospam.nospam.nospam at ...626... Sun Apr 4 00:38:43 2010 From: nospam.nospam.nospam at ...626... (Kadaitcha Man) Date: Sun, 4 Apr 2010 08:38:43 +1000 Subject: [Gambas-user] Parallel Port In-Reply-To: References: Message-ID: On 4 April 2010 08:14, Bjorn Macintosh wrote: > Hi all, > > Does anyone have a program that interfaces with the parallel port, one > written in Gambas. ?If you do would you be willing to share this program > with me as I am trying to write a parallel port interface and am struggling > to get my head around a few concepts. ?mainly how to write to the port and > how to select pin's base 0 base1 and base2. > > Any help would be greatly appreciated. http://lmgtfy.com/?q=gambas+%22parallel+port%22 From rterry at ...1946... Sun Apr 4 04:05:49 2010 From: rterry at ...1946... (richard terry) Date: Sun, 4 Apr 2010 12:05:49 +1000 Subject: [Gambas-user] [SPAM] Dialog file names being obscured Message-ID: <201004041205.49623.rterry@...1946...> Hi list/Benoit i posted this previously and non-one answered, so here's a picture. ordinary file select dialog popping up - obscuring the file names Kubuntu qt4 fairly upto date svn within a couple of numbers of the latest. ? any solution. richard -------------- next part -------------- A non-text attachment was scrubbed... Name: benoit_size_dialog.png Type: image/png Size: 42140 bytes Desc: not available URL: From bjorn.macintosh at ...626... Sun Apr 4 05:14:09 2010 From: bjorn.macintosh at ...626... (Bjorn Macintosh) Date: Sun, 4 Apr 2010 15:14:09 +1200 Subject: [Gambas-user] Parallel Port - Kadaitcha Man Message-ID: Hiya, I had already found and gone through the link you sent, it is what part of my code was based on. If you have read it and can fully understand it can you tell me what iPortNumber should be in order for me to access the parallel port. I was thinking it would be 888 as a integer (378 in hex is 888 in dec) however I don't appear to have got a result from this. I tryed 378 aswell without result. I would try polling each and every port however I understand this would potentially break my pc. not my favourite option. Thanks Bjorn Macintosh From doriano.blengino at ...1909... Sun Apr 4 09:49:50 2010 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Sun, 04 Apr 2010 09:49:50 +0200 Subject: [Gambas-user] Parallel Port - Kadaitcha Man In-Reply-To: References: Message-ID: <4BB8449E.2010701@...1909...> Bjorn Macintosh ha scritto: > Hiya, > > My Gambas version is Gambas2.13 > I am running Linux Mint 8 > I do have a parallel port on my PC. It is '0378' - '037a' and '0778' - > '077a' > The error code I am getting is "System error. illegal seek" > > I had already found and gone through the link you sent, it is what part of > my code was based on. If you have read it and can fully understand it can > you tell me what > iPortNumber should be in order for me to access the parallel port. I was > thinking it would be 888 as a integer (378 in hex is 888 in dec) however I > don't appear to have got a result from this. > > I tryed 378 aswell without result. I would try polling each and every port > however I understand this would potentially break my pc. not my favourite > option. > On a standard PC the parallel ports should be on 0x378 (first), 0x278 (second), ox3bc (alternate address). Your address 0x778 sounds strange, even if possible (everything is possible...). Every PC parallel port takes three consecutive I/O address, namely BASE+0, BASE+1 and BASE+2. So the standard first port should be at address 0x378 (to write the eight data bit pins); 0x379 (to read the printer status) and 0x37A (to write some addition I/O). Anyway, this should be of little importance to you, because the linux kernel abstract these addresses, and maps a device which should hide those details. You can take some more info with the command "cat /proc/ioports": if you don't see the addresses you expect, then you should insert some module in the kernel (modprobe parport, modprobe lp, or similar). Once verified that your machine has a parallel port, and that the kernel sees it, you can start to program. I really don't know if the gambas sources you have are correct, at first sight they seem ok, but a seek operation on a character devices is impossible... is your /dev/parport0 a character device? Another thing, may be that to access a device in similar manner you need some privileges - try to run the program as root. Another way would be to use the I/O kernel space directly: in /dev you could find a device (/dev/port?) which gives you access to all the IO space. A third way is to use the IN and OUT instructions, bypassing the kernel completely (but you need to ask permission before, and perhaps gambas does not have IN and OUT instructions). Unfortunately, right now, I am on a machine which lacks a parallel port, so I can't experiment. But you can google for these three methods to access hardware. Regards, -- Doriano Blengino "Listen twice before you speak. This is why we have two ears, but only one mouth." From gambas at ...1... Sun Apr 4 16:49:16 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sun, 4 Apr 2010 16:49:16 +0200 Subject: [Gambas-user] [SPAM] Dialog file names being obscured In-Reply-To: <201004041205.49623.rterry@...1946...> References: <201004041205.49623.rterry@...1946...> Message-ID: <201004041649.16898.gambas@...1...> > Hi list/Benoit > > i posted this previously and non-one answered, so here's a picture. > > ordinary file select dialog popping up - obscuring the file names > > Kubuntu qt4 fairly upto date svn within a couple of numbers of the latest. > > ? any solution. > > richard You mean that the default dialog size make the directory too small, do you ? -- Beno?t Minisini From ronstk at ...239... Sun Apr 4 18:45:03 2010 From: ronstk at ...239... (Ron_1st) Date: Sun, 4 Apr 2010 17:45:03 +0100 Subject: [Gambas-user] Parallel Port - Kadaitcha Man In-Reply-To: References: Message-ID: <201004041845.03998.ronstk@...239...> On Sunday 04 April 2010, Bjorn Macintosh wrote: > Hiya, > > I had already found and gone through the link you sent, it is what part of > my code was based on. If you have read it and can fully understand it can > you tell me what > iPortNumber should be in order for me to access the parallel port. I was > thinking it would be 888 as a integer (378 in hex is 888 in dec) however I > don't appear to have got a result from this. > > I tryed 378 aswell without result. I would try polling each and every port > however I understand this would potentially break my pc. not my favourite > option. > > Thanks > Bjorn Macintosh Read exactly which port you must open in the gambas documentation for your used code. using: 2.2 An alternate method: It is written in the example below. :) Best regards, Ron_1st -- 111.111111 x 111.111111 = 12345.678987654321 -- 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? From gambas at ...1... Sun Apr 4 20:14:08 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sun, 4 Apr 2010 20:14:08 +0200 Subject: [Gambas-user] [SPAM] Dialog file names being obscured In-Reply-To: <201004041649.16898.gambas@...1...> References: <201004041205.49623.rterry@...1946...> <201004041649.16898.gambas@...1...> Message-ID: <201004042014.08520.gambas@...1...> > > Hi list/Benoit > > > > i posted this previously and non-one answered, so here's a picture. > > > > ordinary file select dialog popping up - obscuring the file names > > > > Kubuntu qt4 fairly upto date svn within a couple of numbers of the > > latest. > > > > ? any solution. > > > > richard > > You mean that the default dialog size make the directory too small, do you > ? Read instead: You mean that the default dialog size make the directory view too small, do you ? -- Beno?t Minisini From rterry at ...1946... Mon Apr 5 00:16:41 2010 From: rterry at ...1946... (richard terry) Date: Mon, 5 Apr 2010 08:16:41 +1000 Subject: [Gambas-user] [SPAM] Dialog file names being obscured In-Reply-To: <201004042014.08520.gambas@...1...> References: <201004041205.49623.rterry@...1946...> <201004041649.16898.gambas@...1...> <201004042014.08520.gambas@...1...> Message-ID: <201004050816.41168.rterry@...1946...> On Monday 05 April 2010 04:14:08 Beno?t Minisini wrote: > > > Hi list/Benoit > > > > > > i posted this previously and non-one answered, so here's a picture. > > > > > > ordinary file select dialog popping up - obscuring the file names > > > > > > Kubuntu qt4 fairly upto date svn within a couple of numbers of the > > > latest. > > > > > > ? any solution. > > > > > > richard > > > > You mean that the default dialog size make the directory too small, do > > you ? > > Read instead: You mean that the default dialog size make the directory view > too small, do you ? > Yes, I just wondered if there could be properties exposed for that dialog box - to make it whatever appropriate starting size one wanted, included the internal split between the directory and files, also to be able to set the style of file display before loading the dialog, to icon or names etc. richard From steven at ...2097... Mon Apr 5 03:10:19 2010 From: steven at ...2097... (Steven James Drinnan) Date: Mon, 05 Apr 2010 09:10:19 +0800 Subject: [Gambas-user] menu In-Reply-To: <28114470.post@...1379...> References: <68652a0b1003101252j76b9a01fy1d388bca399274cf@...627...> <28114470.post@...1379...> Message-ID: <1270429820.21931.14.camel@...2273...> I can only give you a start, You should look at the details of how to make a deb package. I googled and found http://www.debian.org/doc/maint-guide/ch-dother.en.html#s-install (section 5.13) This talks about a menu.ex file that is created. Try modifying that file to your sub menu. Not sure if that would work but worth a crack. Tell me how you get on Steven On Thu, 2010-04-01 at 16:28 -0700, yuhej wrote: > Hello, > > No any idea? Maybe there is no any solution to do that? I may need to give > up then the idea :-( > > Robi > > > yuhej wrote: > > > > Hello List, > > > > I have a very basic question... when I develop my applications I'd like > > them > > to appear in the menu under a group (when installed on a machine). When I > > do > > tha packaging I'm able to set several parameters, but is it possible to > > create an own menu (for example myApps) and to put the different > > application > > under this menu (myApps/app1, myApps/app2, etc)? If yes, where can I > > specify > > it? > > The user PC is Ubuntu. > > > > Thanks, > > Robi > > ------------------------------------------------------------------------------ > > Download Intel® Parallel Studio Eval > > Try the new software tools for yourself. Speed compiling, find bugs > > proactively, and fine-tune applications for parallel performance. > > See why Intel Parallel Studio got high marks during beta. > > http://p.sf.net/sfu/intel-sw-dev > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > From kobolds at ...2041... Mon Apr 5 06:22:12 2010 From: kobolds at ...2041... (kobolds) Date: Sun, 4 Apr 2010 21:22:12 -0700 (PDT) Subject: [Gambas-user] problem with alignmet & position in GB3(qt) Message-ID: <28137172.post@...1379...> I post this problem before but until now this issue left unsolved. i try to create a form with many buttons (something like a keyboard). 1. when I try to change the height and width of all the buttons by using align same height and width , it doesn't work . 2. I position each button with small gap next to each other manually from each button property x and y . but when I select all button and try to move up using up arrow . after the move all the gap between buttons become screw up . 3. if I manual enter button position using button property x and y , button always change it own position when I left click on it (it's like snap to grid or something). -- View this message in context: http://old.nabble.com/problem-with-alignmet---position-in-GB3%28qt%29-tp28137172p28137172.html Sent from the gambas-user mailing list archive at Nabble.com. From kobolds at ...2041... Mon Apr 5 06:54:46 2010 From: kobolds at ...2041... (kobolds) Date: Sun, 4 Apr 2010 21:54:46 -0700 (PDT) Subject: [Gambas-user] problem with alignmet & position in GB3(qt) In-Reply-To: <28137172.post@...1379...> References: <28137172.post@...1379...> Message-ID: <28137258.post@...1379...> here I attach the image http://old.nabble.com/file/p28137258/snapshot4.png kobolds wrote: > > I post this problem before but until now this issue left unsolved. > > i try to create a form with many buttons (something like a keyboard). > > 1. when I try to change the height and width of all the buttons by using > align same height and width , it doesn't work . > > 2. I position each button with small gap next to each other manually from > each button property x and y . but when I select all button and try to > move up using up arrow . after the move all the gap between buttons > become screw up . > > 3. if I manual enter button position using button property x and y , > button always change it own position when I left click on it (it's like > snap to grid or something). > > > > -- View this message in context: http://old.nabble.com/problem-with-alignmet---position-in-GB3%28qt%29-tp28137172p28137258.html Sent from the gambas-user mailing list archive at Nabble.com. From rterry at ...1946... Mon Apr 5 08:51:06 2010 From: rterry at ...1946... (richard terry) Date: Mon, 5 Apr 2010 16:51:06 +1000 Subject: [Gambas-user] problem with alignmet & position in GB3(qt) In-Reply-To: <28137172.post@...1379...> References: <28137172.post@...1379...> Message-ID: <201004051651.06311.rterry@...1946...> On Monday 05 April 2010 14:22:12 kobolds wrote: > I post this problem before but until now this issue left unsolved. > > i try to create a form with many buttons (something like a keyboard). > > 1. when I try to change the height and width of all the buttons by using > align same height and width , it doesn't work . > > 2. I position each button with small gap next to each other manually from > each button property x and y . but when I select all button and try to move > up using up arrow . after the move all the gap between buttons become screw > up . > > 3. if I manual enter button position using button property x and y , > button always change it own position when I left click on it (it's like > snap to grid or something). > send use your code and I'll take a look. Why not just design it on a form using the IDE? Richard From kobolds at ...2041... Mon Apr 5 09:03:00 2010 From: kobolds at ...2041... (kobolds) Date: Mon, 5 Apr 2010 00:03:00 -0700 (PDT) Subject: [Gambas-user] problem with alignmet & position in GB3(qt) In-Reply-To: <201004051651.06311.rterry@...1946...> References: <28137172.post@...1379...> <201004051651.06311.rterry@...1946...> Message-ID: <28137682.post@...1379...> the problem is on the ide . you can try todo the same as the picture I attach . you will notice the problem . it's very obvious . richard terry-5 wrote: > > On Monday 05 April 2010 14:22:12 kobolds wrote: >> I post this problem before but until now this issue left unsolved. >> >> i try to create a form with many buttons (something like a keyboard). >> >> 1. when I try to change the height and width of all the buttons by using >> align same height and width , it doesn't work . >> >> 2. I position each button with small gap next to each other manually from >> each button property x and y . but when I select all button and try to >> move >> up using up arrow . after the move all the gap between buttons become >> screw >> up . >> >> 3. if I manual enter button position using button property x and y , >> button always change it own position when I left click on it (it's like >> snap to grid or something). >> > send use your code and I'll take a look. > > Why not just design it on a form using the IDE? > > Richard > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > -- View this message in context: http://old.nabble.com/problem-with-alignmet---position-in-GB3%28qt%29-tp28137172p28137682.html Sent from the gambas-user mailing list archive at Nabble.com. From kobolds at ...2041... Mon Apr 5 09:19:58 2010 From: kobolds at ...2041... (kobolds) Date: Mon, 5 Apr 2010 00:19:58 -0700 (PDT) Subject: [Gambas-user] problem with alignmet & position in GB3(qt) In-Reply-To: <201004051651.06311.rterry@...1946...> References: <28137172.post@...1379...> <201004051651.06311.rterry@...1946...> Message-ID: <28137736.post@...1379...> here how you do the test on IDE 1. create a form (768x1024) 2. drag a panel into the form (make sure it big) 3. drag a picbox into the panel (same size as panel) so the picbox cover the whole panel 4. drag 9 buttons on it ( on top of picbox) 5. change button1 width and height to 100x80 6. select the rest of buttons and do alignment same width and same height 7. check the widthxheight of the buttons . you will notice all change to other value (not 100x80) hope this will help richard terry-5 wrote: > > On Monday 05 April 2010 14:22:12 kobolds wrote: >> I post this problem before but until now this issue left unsolved. >> >> i try to create a form with many buttons (something like a keyboard). >> >> 1. when I try to change the height and width of all the buttons by using >> align same height and width , it doesn't work . >> >> 2. I position each button with small gap next to each other manually from >> each button property x and y . but when I select all button and try to >> move >> up using up arrow . after the move all the gap between buttons become >> screw >> up . >> >> 3. if I manual enter button position using button property x and y , >> button always change it own position when I left click on it (it's like >> snap to grid or something). >> > send use your code and I'll take a look. > > Why not just design it on a form using the IDE? > > Richard > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > -- View this message in context: http://old.nabble.com/problem-with-alignmet---position-in-GB3%28qt%29-tp28137172p28137736.html Sent from the gambas-user mailing list archive at Nabble.com. From nospam.nospam.nospam at ...626... Mon Apr 5 09:29:08 2010 From: nospam.nospam.nospam at ...626... (Kadaitcha Man) Date: Mon, 5 Apr 2010 17:29:08 +1000 Subject: [Gambas-user] problem with alignmet & position in GB3(qt) In-Reply-To: <28137736.post@...1379...> References: <28137172.post@...1379...> <201004051651.06311.rterry@...1946...> <28137736.post@...1379...> Message-ID: On 5 April 2010 17:19, kobolds wrote: > > here how you do the test on IDE > > 1. create a form (768x1024) > 2. drag a panel into the form (make sure it big) > 3. drag a picbox into the panel (same size as panel) so the picbox cover the > whole panel > 4. drag 9 buttons on it ( on top of picbox) > 5. change button1 width and height to 100x80 > 6. select the rest of buttons and do alignment same width and same height > 7. ?check the widthxheight of the buttons . you will notice all change to > other value (not 100x80) > > hope this will help Probably not. Who is going to do all that when you could post the code yourself? From rterry at ...1946... Mon Apr 5 09:54:53 2010 From: rterry at ...1946... (richard terry) Date: Mon, 5 Apr 2010 17:54:53 +1000 Subject: [Gambas-user] problem with alignmet & position in GB3(qt) In-Reply-To: References: <28137172.post@...1379...> <28137736.post@...1379...> Message-ID: <201004051754.53358.rterry@...1946...> On Monday 05 April 2010 17:29:08 Kadaitcha Man wrote: > On 5 April 2010 17:19, kobolds wrote: > > here how you do the test on IDE > > > > 1. create a form (768x1024) > > 2. drag a panel into the form (make sure it big) > > 3. drag a picbox into the panel (same size as panel) so the picbox cover > > the whole panel > > 4. drag 9 buttons on it ( on top of picbox) > > 5. change button1 width and height to 100x80 > > 6. select the rest of buttons and do alignment same width and same height > > 7. check the widthxheight of the buttons . you will notice all change to > > other value (not 100x80) > > > > hope this will help > > Probably not. Who is going to do all that when you could post the code > yourself? Send us the code. personally I never use panels - only ever Vbox/Hbox and set the properties of these to maket my rows/columns expand/keep the same etc. Send us the code,and could you re-post the picture as I trashed it, happy for you to send to me direct. Richard > > --------------------------------------------------------------------------- > --- Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas at ...1... Mon Apr 5 14:22:56 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 5 Apr 2010 14:22:56 +0200 Subject: [Gambas-user] problem with alignmet & position in GB3(qt) In-Reply-To: <28137172.post@...1379...> References: <28137172.post@...1379...> Message-ID: <201004051422.56085.gambas@...1...> > I post this problem before but until now this issue left unsolved. > > i try to create a form with many buttons (something like a keyboard). > > 1. when I try to change the height and width of all the buttons by using > align same height and width , it doesn't work . > > 2. I position each button with small gap next to each other manually from > each button property x and y . but when I select all button and try to move > up using up arrow . after the move all the gap between buttons become screw > up . > > 3. if I manual enter button position using button property x and y , > button always change it own position when I left click on it (it's like > snap to grid or something). Did you disable "snap to grid" before working on your form? -- Beno?t Minisini From gambas.fr at ...626... Mon Apr 5 15:08:34 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Mon, 5 Apr 2010 15:08:34 +0200 Subject: [Gambas-user] problem with alignmet & position in GB3(qt) In-Reply-To: <201004051754.53358.rterry@...1946...> References: <28137172.post@...1379...> <28137736.post@...1379...> <201004051754.53358.rterry@...1946...> Message-ID: > > Send us the code. > > personally I never use panels - only ever Vbox/Hbox and set the properties of > these to maket my rows/columns expand/keep the same etc. > > Send us the code,and could you re-post the picture as I trashed it, happy for > you to send to me direct. > > Richard > hum ... Richard ... he is talking about the desing time not execution ... ;-) From leandrosansilva at ...626... Mon Apr 5 17:16:37 2010 From: leandrosansilva at ...626... (Leandro Santiago) Date: Mon, 5 Apr 2010 12:16:37 -0300 Subject: [Gambas-user] Input command with double enter: is this expected? Message-ID: Hello to all. I'm writing a small command-line app. I'm using the input command to read data from keyboard (stdin), and to finalize the command in gambas, is necessary to press enter key twice, but I never saw this behavior. Usually (in 99% of languages) just one enter is the nedeed. Is there another way to read data from keyboard? I just do: Input name I'm using gambas3 rev. 2840 in Ubuntu Linux. 9.10 (Sorry for my bad English :-)) From jussi.lahtinen at ...626... Mon Apr 5 21:50:01 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Mon, 5 Apr 2010 22:50:01 +0300 Subject: [Gambas-user] Bug with * operator (I think) In-Reply-To: <201003312246.07180.gambas@...1...> References: <201003312246.07180.gambas@...1...> Message-ID: > The '*' operator (like '+' and '-') returns the same datatype as its > arguments. There is no conversion to a bigger datatype if needed, so the > result is truncated. Yes, of course. I was confused because "?3413156131^2" did work. >> I need really big numbers... > > Find a volunteer to implement a Gambas component based on a library that can > manage big integers, like that one: http://gmplib.org/ Seems not to work with 64bit machines yet... I think this would be quite easy to use as external library, but of course component would be much better option. Right now I think I will look at bc. It is default command in many Linux distributions. Something like this; 'echo "3413156131 * 3413156131;" | bc' combined with Gambas shell command. Jussi From ronstk at ...239... Tue Apr 6 00:19:32 2010 From: ronstk at ...239... (Ron_1st) Date: Mon, 5 Apr 2010 23:19:32 +0100 Subject: [Gambas-user] problem with alignmet & position in GB3(qt) In-Reply-To: References: <28137172.post@...1379...> <28137736.post@...1379...> Message-ID: <201004060019.33481.ronstk@...239...> On Monday 05 April 2010, Kadaitcha Man wrote: > On 5 April 2010 17:19, kobolds wrote: > > > > here how you do the test on IDE > > > > 1. create a form (768x1024) > > 2. drag a panel into the form (make sure it big) > > 3. drag a picbox into the panel (same size as panel) so the picbox cover the > > whole panel > > 4. drag 9 buttons on it ( on top of picbox) > > 5. change button1 width and height to 100x80 > > 6. select the rest of buttons and do alignment same width and same height > > 7. ?check the widthxheight of the buttons . you will notice all change to > > other value (not 100x80) > > > > hope this will help > > Probably not. Who is going to do all that when you could post the code yourself? > It is a problem that occurs durring the make of the form. If he send it predone you do not experience the same behviour. Second, when he send it should be a complete project else other people start to complain. It is not a real problem to add a form in one of the many trial and error projects everyone have laying arround for test the told story by Richard. Many times it make sence to do what you suggest but for this one it isn't a absolute must do IMHO. Best regards, Ron_1st -- From ronstk at ...239... Tue Apr 6 00:21:16 2010 From: ronstk at ...239... (Ron_1st) Date: Mon, 5 Apr 2010 23:21:16 +0100 Subject: [Gambas-user] problem with alignmet & position in GB3(qt) In-Reply-To: References: <28137172.post@...1379...> <201004051754.53358.rterry@...1946...> Message-ID: <201004060021.17212.ronstk@...239...> On Monday 05 April 2010, Fabien Bodard wrote: > > > > Send us the code. > > > > personally I never use panels - only ever Vbox/Hbox and set the properties of > > these to maket my rows/columns expand/keep the same etc. > > > > Send us the code,and could you re-post the picture as I trashed it, happy for > > you to send to me direct. > > > > Richard > > > hum ... Richard ... he is talking about the desing time not execution ... ;-) Rightttttttttttt. :) Best regards, Ron_1st -- From prog at ...2177... Tue Apr 6 02:40:21 2010 From: prog at ...2177... (craf) Date: Mon, 05 Apr 2010 20:40:21 -0400 Subject: [Gambas-user] Problems with Library libffi.so.5 using GB_DIR Message-ID: <1270514421.2003.5.camel@...2406...> Hi. I'm still trying to port an application made in Gambas 2.20.2 in a distribution Ubuntu 9.10 to a distribution Ubuntu 8.04, using the variable GB_DIR. My file executable.sh is as follows: #!/bin/sh export PATH=/opt/project/gambas2/bin export GB_DIR=/opt/project/gambas2/lib export LD_LIBRARY_PATH=/opt/project/gambas2/lib_shared/lib:/opt/project/gambas2/lib_shared/usr/lib exec /opt/project/project.gambas When I try to execute it, gives me: "Segmentation fault" When you run the following command: ldd gbr2 I stated: libffi.so.5 => not found This link is really there and points to the library libffi.so.5.0.8 I searched the Internet for a possible solution, but all say that this error is because it is the libffi library, but in this case if. Could it be a problem in the library that comes with Ubuntu 9.10 distribution?. Regards From nospam.nospam.nospam at ...626... Tue Apr 6 09:00:24 2010 From: nospam.nospam.nospam at ...626... (Kadaitcha Man) Date: Tue, 6 Apr 2010 17:00:24 +1000 Subject: [Gambas-user] problem with alignmet & position in GB3(qt) In-Reply-To: <201004060019.33481.ronstk@...239...> References: <28137172.post@...1379...> <28137736.post@...1379...> <201004060019.33481.ronstk@...239...> Message-ID: On 6 April 2010 08:19, Ron_1st wrote: > On Monday 05 April 2010, Kadaitcha Man wrote: >> On 5 April 2010 17:19, kobolds wrote: >> > >> > here how you do the test on IDE >> > >> > 1. create a form (768x1024) >> > 2. drag a panel into the form (make sure it big) >> > 3. drag a picbox into the panel (same size as panel) so the picbox cover the >> > whole panel >> > 4. drag 9 buttons on it ( on top of picbox) >> > 5. change button1 width and height to 100x80 >> > 6. select the rest of buttons and do alignment same width and same height >> > 7. ?check the widthxheight of the buttons . you will notice all change to >> > other value (not 100x80) >> > >> > hope this will help >> >> Probably not. Who is going to do all that when you could post the code yourself? >> > > It is a problem that occurs durring the make of the form. > If he send it predone you do not experience the same behviour. > > Second, when he send it should be a complete project else > other people start to complain. It is not a real problem > to add a form in one of the many trial and error projects > everyone have laying arround for test the told story by Richard. > > Many times it make sence to do what you suggest but for this > one it isn't a absolute must do IMHO. Ok, that's fair. From kobolds at ...2041... Tue Apr 6 10:55:16 2010 From: kobolds at ...2041... (kobolds) Date: Tue, 6 Apr 2010 01:55:16 -0700 (PDT) Subject: [Gambas-user] problem with alignmet & position in GB3(qt) In-Reply-To: <201004051422.56085.gambas@...1...> References: <28137172.post@...1379...> <201004051422.56085.gambas@...1...> Message-ID: <28149016.post@...1379...> I couldn't find the option snap to grid in GB3 but I try on/off the toggle grid . same result . problem align same height and same width. 1. i create a form and drop 3 buttons 2. change the button1 only widthxheight to 80x100 3. select the rest button and do align same height and same width 4. after that button1 become 84x98 , button2 become 84x98 , button3 become 84x98 this is wrong . all the button should become 80x100 problem with align button 1. create form and drag 3 buttons 2. set button1 x-position to 200 3. select the rest of buttons . do alignt to bottom 4. all buttons x-position become 203 . this is wrong . all button x-position suppose to be 200 Beno?t Minisini wrote: > >> I post this problem before but until now this issue left unsolved. >> >> i try to create a form with many buttons (something like a keyboard). >> >> 1. when I try to change the height and width of all the buttons by using >> align same height and width , it doesn't work . >> >> 2. I position each button with small gap next to each other manually from >> each button property x and y . but when I select all button and try to >> move >> up using up arrow . after the move all the gap between buttons become >> screw >> up . >> >> 3. if I manual enter button position using button property x and y , >> button always change it own position when I left click on it (it's like >> snap to grid or something). > > Did you disable "snap to grid" before working on your form? > > -- > Beno?t Minisini > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > -- View this message in context: http://old.nabble.com/problem-with-alignmet---position-in-GB3%28qt%29-tp28137172p28149016.html Sent from the gambas-user mailing list archive at Nabble.com. From nospam.nospam.nospam at ...626... Tue Apr 6 11:54:50 2010 From: nospam.nospam.nospam at ...626... (Kadaitcha Man) Date: Tue, 6 Apr 2010 19:54:50 +1000 Subject: [Gambas-user] problem with alignmet & position in GB3(qt) In-Reply-To: <28149016.post@...1379...> References: <28137172.post@...1379...> <201004051422.56085.gambas@...1...> <28149016.post@...1379...> Message-ID: On 6 April 2010 18:55, kobolds wrote: > > I couldn't find the option snap to grid in GB3 but I try on/off the toggle > grid . same result . > > problem align same height and same width. > 1. i create a form and drop 3 buttons > 2. change the ?button1 ?only widthxheight to 80x100 > 3. select the rest button and do align same height and same width > 4. after that button1 ?become 84x98 , button2 become 84x98 , button3 become > 84x98 > this is wrong . all the button should become 80x100 > > > problem with align button > 1. create form and drag 3 buttons > 2. set button1 x-position to 200 > 3. select the rest of buttons . do alignt to bottom > 4. all buttons ?x-position become 203 . > this is wrong . all button x-position suppose to be 200 I followed those instructions and reproduced the problem. From rterry at ...1946... Tue Apr 6 12:38:40 2010 From: rterry at ...1946... (richard terry) Date: Tue, 6 Apr 2010 20:38:40 +1000 Subject: [Gambas-user] problem with alignmet & position in GB3(qt) In-Reply-To: <28149016.post@...1379...> References: <28137172.post@...1379...> <201004051422.56085.gambas@...1...> <28149016.post@...1379...> Message-ID: <201004062038.40564.rterry@...1946...> On Tuesday 06 April 2010 18:55:16 kobolds wrote: Hi, I'm stuggling to understand what you mean - why not just use vertical box/horizontal box, and set the expand or not expand properties. let the IDE do the work for you I enclose a simple example showing various areas of the screen not-expanding or expanding. perhaps if you told us what you are doing and what the final product could look like it would help. I've never used a panel ever in my project, and I've hundreds of forms and modules on a postgres backend with 30 schemas and hundreds of tables. I've programmed in VB3-6, Python/ wxPython, various IDe's and I reckon gambas is probably the most predictable I've ever encountered in my life - and easiest to use. Let it work for you. Regards richard > I couldn't find the option snap to grid in GB3 but I try on/off the toggle > grid . same result . > > problem align same height and same width. > 1. i create a form and drop 3 buttons > 2. change the button1 only widthxheight to 80x100 > 3. select the rest button and do align same height and same width > 4. after that button1 become 84x98 , button2 become 84x98 , button3 become > 84x98 > this is wrong . all the button should become 80x100 > > > problem with align button > 1. create form and drag 3 buttons > 2. set button1 x-position to 200 > 3. select the rest of buttons . do alignt to bottom > 4. all buttons x-position become 203 . > this is wrong . all button x-position suppose to be 200 > > Beno?t Minisini wrote: > >> I post this problem before but until now this issue left unsolved. > >> > >> i try to create a form with many buttons (something like a keyboard). > >> > >> 1. when I try to change the height and width of all the buttons by using > >> align same height and width , it doesn't work . > >> > >> 2. I position each button with small gap next to each other manually > >> from each button property x and y . but when I select all button and try > >> to move > >> up using up arrow . after the move all the gap between buttons become > >> screw > >> up . > >> > >> 3. if I manual enter button position using button property x and y , > >> button always change it own position when I left click on it (it's like > >> snap to grid or something). > > > > Did you disable "snap to grid" before working on your form? > -------------- next part -------------- A non-text attachment was scrubbed... Name: expand.tar.gz Type: application/x-compressed-tar Size: 4873 bytes Desc: not available URL: From prog at ...2177... Tue Apr 6 18:16:23 2010 From: prog at ...2177... (craf) Date: Tue, 06 Apr 2010 12:16:23 -0400 Subject: [Gambas-user] Problems with Library libffi.so.5 using GB_DIR In-Reply-To: <1270514421.2003.5.camel@...2406...> References: <1270514421.2003.5.camel@...2406...> Message-ID: <1270570583.1919.10.camel@...2406...> -----Mensaje original----- De: craf Reply-to: mailing list for gambas users Para: Lista Gambas Ingles Asunto: [Gambas-user] Problems with Library libffi.so.5 using GB_DIR Fecha: Mon, 05 Apr 2010 20:40:21 -0400 >Hi. >I'm still trying to port an application made in Gambas 2.20.2 in a >distribution Ubuntu 9.10 to a distribution Ubuntu 8.04, using the >variable GB_DIR. >My file executable.sh is as follows: >#!/bin/sh >export PATH=/opt/project/gambas2/bin >export GB_DIR=/opt/project/gambas2/lib >export >LD_LIBRARY_PATH=/opt/project/gambas2/lib_shared/lib:/opt/project/gambas2/lib_shared/usr/lib >exec /opt/project/project.gambas >When I try to execute it, gives me: >"Segmentation fault" >When you run the following command: >ldd gbr2 >I stated: >libffi.so.5 => not found >This link is really there and points to the library libffi.so.5.0.8 >I searched the Internet for a possible solution, but all say that this >error is because it is the libffi library, but in this case if. >Could it be a problem in the library that comes with Ubuntu 9.10 >distribution?. >Regards Hi. Gradually I have been understanding the operation of the variable GB_DIR. As commented in the previous post, GBR2 not find the shared library libffi.so. Since I have little knowledge about C, I can not find you may be failing. As libffi.so.5.0.8 shared library is generated at compile Gambas, is there any option to be added to the configure command?. Do all the tips Doriano kindly told me, but nothing has worked. Any light on this matter is appreciated. Regards ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From gambas at ...1... Tue Apr 6 18:50:35 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 6 Apr 2010 18:50:35 +0200 Subject: [Gambas-user] Problems with Library libffi.so.5 using GB_DIR In-Reply-To: <1270570583.1919.10.camel@...2406...> References: <1270514421.2003.5.camel@...2406...> <1270570583.1919.10.camel@...2406...> Message-ID: <201004061850.35462.gambas@...1...> > -----Mensaje original----- > De: craf > Reply-to: mailing list for gambas users > > Para: Lista Gambas Ingles > Asunto: [Gambas-user] Problems with Library libffi.so.5 using GB_DIR > Fecha: Mon, 05 Apr 2010 20:40:21 -0400 > > >Hi. > > > >I'm still trying to port an application made in Gambas 2.20.2 in a > >distribution Ubuntu 9.10 to a distribution Ubuntu 8.04, using the > >variable GB_DIR. > > > >My file executable.sh is as follows: > > > >#!/bin/sh > >export PATH=/opt/project/gambas2/bin > >export GB_DIR=/opt/project/gambas2/lib > >export > >LD_LIBRARY_PATH=/opt/project/gambas2/lib_shared/lib:/opt/project/gambas2/l > >ib_shared/usr/lib exec /opt/project/project.gambas > > > >When I try to execute it, gives me: > > > >"Segmentation fault" > > > >When you run the following command: > > > >ldd gbr2 > > > >I stated: > > > >libffi.so.5 => not found > > > >This link is really there and points to the library libffi.so.5.0.8 > > > >I searched the Internet for a possible solution, but all say that this > >error is because it is the libffi library, but in this case if. > >Could it be a problem in the library that comes with Ubuntu 9.10 > >distribution?. > > > >Regards > > Hi. > > > Gradually I have been understanding the operation of the variable > GB_DIR. As commented in the previous post, GBR2 not find the shared > library libffi.so. > Since I have little knowledge about C, I can not find you may be > failing. > As libffi.so.5.0.8 shared library is generated at compile Gambas, is > there any option to be added to the configure command?. > Do all the tips Doriano kindly told me, but nothing has worked. > > Any light on this matter is appreciated. > > Regards > 1) GB_DIR must point at the gambas installation directory, i.e. "/opt/project/gambas2/" 2) You must check where the segfault occurs, because a missing shared library should not cause that. To do that, compile Gambas with debugging information enabled (i.e. compile it from sources without changing any option). Then use the "gdb" debugger as explained on the web site ("Reporting a problem" page). 3) libffi is checked at configuration time, so if it is not installed on your system, either not detected, you will have a warning that you won't be able to use extern functions, but that's all. Gambas will work anyway. Regards, -- Beno?t Minisini From gambas at ...1... Tue Apr 6 18:53:48 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 6 Apr 2010 18:53:48 +0200 Subject: [Gambas-user] problem with alignmet & position in GB3(qt) In-Reply-To: <28149016.post@...1379...> References: <28137172.post@...1379...> <201004051422.56085.gambas@...1...> <28149016.post@...1379...> Message-ID: <201004061853.48621.gambas@...1...> > I couldn't find the option snap to grid in GB3 but I try on/off the toggle > grid . same result . > > problem align same height and same width. > 1. i create a form and drop 3 buttons > 2. change the button1 only widthxheight to 80x100 > 3. select the rest button and do align same height and same width > 4. after that button1 become 84x98 , button2 become 84x98 , button3 become > 84x98 > this is wrong . all the button should become 80x100 > > > problem with align button > 1. create form and drag 3 buttons > 2. set button1 x-position to 200 > 3. select the rest of buttons . do alignt to bottom > 4. all buttons x-position become 203 . > this is wrong . all button x-position suppose to be 200 > OK, I see. All align buttons snap the control coordinates to the grid, but they should not! -- Beno?t Minisini From jussi.lahtinen at ...626... Tue Apr 6 19:17:51 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Tue, 6 Apr 2010 20:17:51 +0300 Subject: [Gambas-user] Bug with * operator (I think) In-Reply-To: References: <201003312246.07180.gambas@...1...> Message-ID: If someone is interested, this is how I managed to solve my problem. I converted this; Print (y * (1 + y)) / 2 To this (here y is string, not long); Shell "echo \"(" & y & "*(1+" & y & "))/2\" |bc" To sResult This is not very quick method, but in my case it is fast enough. Jussi On Mon, Apr 5, 2010 at 22:50, Jussi Lahtinen wrote: >> The '*' operator (like '+' and '-') returns the same datatype as its >> arguments. There is no conversion to a bigger datatype if needed, so the >> result is truncated. > > ?Yes, of course. > ?I was confused because "?3413156131^2" did work. > > >>> I need really big numbers... >> >> Find a volunteer to implement a Gambas component based on a library that can >> manage big integers, like that one: http://gmplib.org/ > > ?Seems not to work with 64bit machines yet... > ?I think this would be quite easy to use as external library, but of > course component would be much better option. > ?Right now I think I will look at bc. > ?It is default command in many Linux distributions. > ?Something like this; 'echo "3413156131 * 3413156131;" | bc' combined > with Gambas shell command. > > > Jussi > From prog at ...2177... Tue Apr 6 20:40:27 2010 From: prog at ...2177... (craf) Date: Tue, 06 Apr 2010 14:40:27 -0400 Subject: [Gambas-user] Problems with Library libffi.so.5 using GB_DIR In-Reply-To: <201004061850.35462.gambas@...1...> References: <1270514421.2003.5.camel@...2406...> <1270570583.1919.10.camel@...2406...> <201004061850.35462.gambas@...1...> Message-ID: <1270579227.1919.33.camel@...2406...> -----Mensaje original----- De: Beno?t Minisini Reply-to: mailing list for gambas users Para: mailing list for gambas users Asunto: Re: [Gambas-user] Problems with Library libffi.so.5 using GB_DIR Fecha: Tue, 6 Apr 2010 18:50:35 +0200 > -----Mensaje original----- > De: craf > Reply-to: mailing list for gambas users > > Para: Lista Gambas Ingles > Asunto: [Gambas-user] Problems with Library libffi.so.5 using GB_DIR > Fecha: Mon, 05 Apr 2010 20:40:21 -0400 > > >Hi. > > > >I'm still trying to port an application made in Gambas 2.20.2 in a > >distribution Ubuntu 9.10 to a distribution Ubuntu 8.04, using the > >variable GB_DIR. > > > >My file executable.sh is as follows: > > > >#!/bin/sh > >export PATH=/opt/project/gambas2/bin > >export GB_DIR=/opt/project/gambas2/lib > >export > >LD_LIBRARY_PATH=/opt/project/gambas2/lib_shared/lib:/opt/project/gambas2/l > >ib_shared/usr/lib exec /opt/project/project.gambas > > > >When I try to execute it, gives me: > > > >"Segmentation fault" > > > >When you run the following command: > > > >ldd gbr2 > > > >I stated: > > > >libffi.so.5 => not found > > > >This link is really there and points to the library libffi.so.5.0.8 > > > >I searched the Internet for a possible solution, but all say that this > >error is because it is the libffi library, but in this case if. > >Could it be a problem in the library that comes with Ubuntu 9.10 > >distribution?. > > > >Regards > > Hi. > > > Gradually I have been understanding the operation of the variable > GB_DIR. As commented in the previous post, GBR2 not find the shared > library libffi.so. > Since I have little knowledge about C, I can not find you may be > failing. > As libffi.so.5.0.8 shared library is generated at compile Gambas, is > there any option to be added to the configure command?. > Do all the tips Doriano kindly told me, but nothing has worked. > > Any light on this matter is appreciated. > > Regards > >1) GB_DIR must point at the gambas installation directory, i.e. >"/opt/project/gambas2/" Yes, That's right, this is the path that was provided in the file .sh >2) You must check where the segfault occurs, because a missing shared library >should not cause that. >To do that, compile Gambas with debugging information enabled (i.e. compile it >from sources without changing any option). Then use the "gdb" debugger as >explained on the web site ("Reporting a problem" page). This is what gives me as a result: GNU gdb 6.8-debian Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i486-linux-gnu"... (gdb) set args -p (gdb) run Starting program: /opt/project/gambas2/bin/gbx2 -p /opt/project/gambas2/bin/gbx2: error while loading shared libraries: libffi.so.5: cannot open shared object file: No such file or directory Program exited with code 0177. (gdb) bt No stack. >3) libffi is checked at configuration time, so if it is not installed on your >system, either not detected, you will have a warning that you won't be able to >use extern functions, but that's all. Gambas will work anyway. The libffi library if installed on my system, before compiling and installing Gambas 2. This gives me running the following command: $locate libffi.so .. /usr/lib/libffi.so /usr/lib/libffi.so.5 /usr/lib/libffi.so.5.0.8 The main problem is that I failed to explain my problem. I have Gambas 2.20.2 installed on my computer with Ubuntu 9.10. If I create a project and execute it on the same computer running smoothly. Now, if I want to bring my project to another computer with Ubuntu 9.10 is not installed Gambas 2.20.2, use the variable GB_DIR. I think the routes and folders, copy and gbr2 gbx2. Copy only the libraries of components that need to make the program work, example. gb.gtk.so, la, so.0.0.0, etc. Do not copy the shared libraries needed by libraries Gambas components, as these are installed on the other computer. Run the program and works flawlessly. Now, I wanted to see if this worked for a different distribution of 9.10, ex. 8.04 (the oldest supported by Canonical). For this I installed VirtualBox and I think a clean install of Ubuntu 8.04 on my computer. I copy the previous project, but now I add the shared libraries needed by the libraries of components of Gambas. I run the program and fails. Regards From keithclark at ...2185... Tue Apr 6 20:45:59 2010 From: keithclark at ...2185... (Keith Clark) Date: Tue, 06 Apr 2010 14:45:59 -0400 Subject: [Gambas-user] MySQL query problems with apostropies Message-ID: <1270579559.8564.11.camel@...2186...> I have the following code: $Query = "" QueryArray[0] = "insert into products_description" QueryArray[1] = "(products_id,language_id,products_name,products_description,products_format)" QueryArray[2] = "values (" & NewProductID & ",1,'" & TitleTextBox.Text & "','" & DescriptionTextArea.Text & "'," & FormatID & ")" LengthOfQuery = 2 FOR QueryIndex = 0 TO LengthOfQuery $Query = $Query & QueryArray[QueryIndex] NEXT $Result = DatabaseConnection.$Con.Exec($Query) Now, it works fine until I try to have a value in DescriptionTextArea.Text with punctuation like apostrophes and quotation marks in them. I get an error in mysql query, always near the punctuation. I imagine the same would happen with my value in TitleTextBox as well if it contained the same punctuation marks. Any ideas that I'm probably just overlooking? Keith From ea7dfh at ...2382... Tue Apr 6 21:59:07 2010 From: ea7dfh at ...2382... (EA7DFH) Date: Tue, 06 Apr 2010 21:59:07 +0200 Subject: [Gambas-user] Problem with PATH to shared library - part 2 In-Reply-To: <4BB4400F.6040403@...1909...> References: <1270063742.3189.35.camel@...2406...> <201003312241.15782.gambas@...1...> <1270070760.5024.8.camel@...2406...> <4BB4400F.6040403@...1909...> Message-ID: <4BBB928B.5080902@...2382...> Doriano Blengino escribi?: >>> $ Tree opt >>> >>> my_project/ >>> >>> |-- gambas2 >>> | >>> | |-- bin >>> | | >>> | | |-- gbr2 >>> | | >>> | | `-- gbx2 >>> | | >>> | |-- lib >>> | | >>> | | `-- gambas2 >>> | | >>> | | |-- blah blah blah... >>> | >>> | `-- library_shared >>> | >>> | |-- lib >>> | | >>> | | |-- blah blah blah... >>> | >>> | `-- usr >>> | >>> | `-- lib >>> | >>> | |-- blah blah blah... >>> | |-- libexpat.so.1 >>> | |-- libexpat.so.1.5.2 >>> | |-- libffi.so.5- - - - - - - - - - - - - > ?THERE HERE! >>> > After that... >> ?yes! it is as I have on file executable.sh. >> >> #!/bin/sh >> export PATH=/opt/my_project/gambas2/bin >> export GB_DIR=/opt/my_project/gambas2 >> export LD_LIBRARY_PATH=/opt/my_project/gambas2/library_shared >> exec /opt/my_project/my_project.gambas >> > I think that your LD_LIBRARY_PATH is still erroneous. The correct value > should end with "..../usr/lib". > >>> Save the changes to the file and then running: >>> >>> $ sudo ldconfig >>> > I think that is not a good idea to fiddle with files in /etc, unless it > is the only remaining way... >>> export LD_LIBRARY_PATH = / opt/my_project/gambas2/library_shared/lib: / >>> opt/my_project/gambas2/library_shared/usr/lib >>> > Ok, this seems correct (apart from bad spaces). > ldd(1) is good to see where libraries are searched, and in fact you used > it to find a problem. Why not use it again, after your modification to > LD_LIBRARY_PATH? "You see an error. You do a correction. You check if > the error has gone away". This is called debugging. Set LD_LIBRARY_PATH > by hand, then try to do an "ls -l $LD_LIBRARY_PATH/*.so*". Then try > again "ldd gbr2". > ldd can be run on shared libraries too: try for example "ldd > /usr/lib/libncurses.so". May be that gbr2 finds libffi, but then libffi > does not find something else... > Read carefully the documentation about ld.so(8). It states that if the > program is a SETUID/SETGID one, the LD_..PATH variable is ignored. It > says also that the variable LD_DEBUG can be set to generate verbose > debugging - if you use this facility, by no mean you can miss the error. > > I can say no more about this, but in the next messages you could first > google-translate, and then paste citations of code and similar, which > get messed up by google. > > Hope this helps, regards, > Doriano Hi Moreover, I think you lost the symbolic links of the shared libraries when it has been moved/copied to your custom folder in /opt/.../... May be it is your main problem. Look at my tree command output: jesus at ...2151...:/usr/lib$ tree | grep libffi |-- libffi.a |-- libffi.so -> libffi.so.5.0.8 |-- libffi.so.5 -> libffi.so.5.0.8 |-- libffi.so.5.0.8 |-- libffi_pic.a | |-- libffi.pc jesus at ...2151...:/usr/lib$ Do you notice the "->" symbol pointing to the target lib? Therefore, libffi.so and libffi.so.5 are only symlinks pointing to libffi.so.5.0.8 and it seems they aren't in place. Hope this helps a little, regards. Jes?s Guardon From ea7dfh at ...2382... Tue Apr 6 22:12:47 2010 From: ea7dfh at ...2382... (EA7DFH) Date: Tue, 06 Apr 2010 22:12:47 +0200 Subject: [Gambas-user] Problems with Library libffi.so.5 using GB_DIR In-Reply-To: <1270579227.1919.33.camel@...2406...> References: <1270514421.2003.5.camel@...2406...> <1270570583.1919.10.camel@...2406...> <201004061850.35462.gambas@...1...> <1270579227.1919.33.camel@...2406...> Message-ID: <4BBB95BF.4030403@...2382...> craf escribi?: > -----Mensaje original----- > De: Beno?t Minisini > Reply-to: mailing list for gambas users > > Para: mailing list for gambas users > Asunto: Re: [Gambas-user] Problems with Library libffi.so.5 using GB_DIR > Fecha: Tue, 6 Apr 2010 18:50:35 +0200 > > >> -----Mensaje original----- >> De: craf >> Reply-to: mailing list for gambas users >> >> Para: Lista Gambas Ingles >> Asunto: [Gambas-user] Problems with Library libffi.so.5 using GB_DIR >> Fecha: Mon, 05 Apr 2010 20:40:21 -0400 >> >>> Hi. >>> >>> I'm still trying to port an application made in Gambas 2.20.2 in a >>> distribution Ubuntu 9.10 to a distribution Ubuntu 8.04, using the >>> variable GB_DIR. >>> >>> My file executable.sh is as follows: >>> >>> #!/bin/sh >>> export PATH=/opt/project/gambas2/bin >>> export GB_DIR=/opt/project/gambas2/lib >>> export >>> LD_LIBRARY_PATH=/opt/project/gambas2/lib_shared/lib:/opt/project/gambas2/l >>> ib_shared/usr/lib exec /opt/project/project.gambas >>> >>> When I try to execute it, gives me: >>> >>> "Segmentation fault" >>> >>> When you run the following command: >>> >>> ldd gbr2 >>> >>> I stated: >>> >>> libffi.so.5 => not found >>> >>> This link is really there and points to the library libffi.so.5.0.8 >>> >>> I searched the Internet for a possible solution, but all say that this >>> error is because it is the libffi library, but in this case if. >>> Could it be a problem in the library that comes with Ubuntu 9.10 >>> distribution?. >>> >>> Regards >> Hi. >> >> >> Gradually I have been understanding the operation of the variable >> GB_DIR. As commented in the previous post, GBR2 not find the shared >> library libffi.so. >> Since I have little knowledge about C, I can not find you may be >> failing. >> As libffi.so.5.0.8 shared library is generated at compile Gambas, is >> there any option to be added to the configure command?. >> Do all the tips Doriano kindly told me, but nothing has worked. >> >> Any light on this matter is appreciated. >> >> Regards >> > > >> 1) GB_DIR must point at the gambas installation directory, i.e. >> "/opt/project/gambas2/" > > Yes, That's right, this is the path that was provided in the file .sh > >> 2) You must check where the segfault occurs, because a missing shared library >> should not cause that. > >> To do that, compile Gambas with debugging information enabled (i.e. compile it >>from sources without changing any option). Then use the "gdb" debugger as >> explained on the web site ("Reporting a problem" page). > > This is what gives me as a result: > > GNU gdb 6.8-debian > Copyright (C) 2008 Free Software Foundation, Inc. > License GPLv3+: GNU GPL version 3 or later > This is free software: you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. Type "show copying" > and "show warranty" for details. > This GDB was configured as "i486-linux-gnu"... > > (gdb) set args -p > > (gdb) run > > Starting program: /opt/project/gambas2/bin/gbx2 -p > > /opt/project/gambas2/bin/gbx2: error while loading shared libraries: libffi.so.5: cannot open shared object file: No such file or directory > > Program exited with code 0177. > > (gdb) bt > No stack. > >> 3) libffi is checked at configuration time, so if it is not installed on your >> system, either not detected, you will have a warning that you won't be able to >> use extern functions, but that's all. Gambas will work anyway. > > The libffi library if installed on my system, before compiling and installing Gambas 2. > > This gives me running the following command: > > $locate libffi.so > .. > /usr/lib/libffi.so > /usr/lib/libffi.so.5 > /usr/lib/libffi.so.5.0.8 > > The main problem is that I failed to explain my problem. > > I have Gambas 2.20.2 installed on my computer with Ubuntu 9.10. > > If I create a project and execute it on the same computer running > smoothly. > > Now, if I want to bring my project to another computer with Ubuntu 9.10 > is not installed Gambas 2.20.2, use the variable GB_DIR. I think the > routes and folders, copy and gbr2 gbx2. Copy only the libraries of > components that need to make the program work, example. gb.gtk.so, la, > so.0.0.0, etc. > Do not copy the shared libraries needed by libraries Gambas components, > as these are installed on the other computer. > > Run the program and works flawlessly. > > Now, I wanted to see if this worked for a different distribution of > 9.10, ex. 8.04 (the oldest supported by Canonical). > > For this I installed VirtualBox and I think a clean install of Ubuntu > 8.04 on my computer. > > I copy the previous project, but now I add the shared libraries needed > by the libraries of components of Gambas. > > I run the program and fails. > > > Regards Ooops. I think I replied in the wrong thread. Craf, please, look at your other thread "Problem with PATH to shared library", may be it could help. Regards, Jesus Guardon From nando_f at ...951... Tue Apr 6 23:27:16 2010 From: nando_f at ...951... (nando) Date: Tue, 6 Apr 2010 16:27:16 -0500 Subject: [Gambas-user] MySQL query problems with apostropies In-Reply-To: <1270579559.8564.11.camel@...2186...> References: <1270579559.8564.11.camel@...2186...> Message-ID: <20100406211920.M70972@...951...> Strings that contain these three characters: quote, double quote and backslash need to be escaped. You escape them by having a backslash immediately before it. Example: Patty O'Lantern would be... Patty O\'Lantern One way is to make a small function that will insert a backslash when it finds a quote or double quote or backslash. When you create your SQL string (Insert, Update, Select, etc) you escape the strings for the char, varchar, text, or similar. sql = "SELECT * FROM inventory WHERE part = ' & escape(mypart) & "';" SELECT from the database will not return the 'escape' backslash. It will appear normal. Please note: / (on the question mark key) is not the backslash. \ is the backslash. -Fernando ---------- Original Message ----------- From: Keith Clark To: gambas-user at lists.sourceforge.net Sent: Tue, 06 Apr 2010 14:45:59 -0400 Subject: [Gambas-user] MySQL query problems with apostropies > I have the following code: > > $Query = "" > QueryArray[0] = "insert into products_description" > QueryArray[1] = > "(products_id,language_id,products_name,products_description,products_format)" > QueryArray[2] = "values (" & NewProductID & ",1,'" & TitleTextBox.Text & > "','" & DescriptionTextArea.Text & "'," & FormatID & ")" > LengthOfQuery = 2 > FOR QueryIndex = 0 TO LengthOfQuery > $Query = $Query & QueryArray[QueryIndex] > NEXT > $Result = DatabaseConnection.$Con.Exec($Query) > > Now, it works fine until I try to have a value in > DescriptionTextArea.Text with punctuation like apostrophes and quotation > marks in them. I get an error in mysql query, always near the > punctuation. > > I imagine the same would happen with my value in TitleTextBox as well if > it contained the same punctuation marks. > > Any ideas that I'm probably just overlooking? > > Keith > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user ------- End of Original Message ------- From nando_f at ...951... Tue Apr 6 23:36:05 2010 From: nando_f at ...951... (nando) Date: Tue, 6 Apr 2010 16:36:05 -0500 Subject: [Gambas-user] Parallel Port - Illegal Seek - In-Reply-To: References: Message-ID: <20100406213312.M16416@...951...> Using SEEK is not correct. If you think of the parallel port as a file, you cannot seek. It doesn't make sense. You can only read and write. What are you trying to accomplish ? -Fernando ---------- Original Message ----------- From: Bjorn Macintosh To: gambas-user at lists.sourceforge.net Sent: Fri, 2 Apr 2010 21:09:58 +1300 Subject: [Gambas-user] Parallel Port - Illegal Seek - > Hi All, > > I am writing a parallel port interface, however I am struggling with how to > write to the parallel port. Below I have included the code that I have > used. Following that I have included the BASIC code that I am bastardizing. > > My Gambas version is Gambas2.13 > I am running Linux Mint 8 > I do have a parallel port on my PC. It is '0378' - '037a' and '0778' - > '077a' > The error code I am getting is "System error. illegal seek" > > Thanks in advance for any help anyone can give. > ---------------------------------------------------------------------GAMBAS2 > CODE FOLLOWS------------------------------------------------------ > ' Gambas module file > PUBLIC SUB Main() > > DIM N AS Integer > DIM pin AS Integer > DIM pinout AS Integer[] = [0, 0, 0, 0, 0, 0, 0, 0] > DIM pump AS Integer > DIM Ptime AS Integer > DIM Clock AS Integer > DIM UClock AS Integer > DIM DClock AS Integer > DIM commit AS Integer > DIM poweron AS Integer > DIM switch AS Integer > DIM gate AS File > DIM base0, base1, base2 AS Integer > > base0 = 0 > base1 = 1 > base2 = 2 > poweron = 64 > commit = 144 > switch = 17 > UClock = 130 > DClock = 128 > gate = OPEN "/dev/parport0" FOR READ WRITE > SEEK #gate, base0 > WRITE #gate, poweron > FOR Ptime = 1 TO 2000 STEP 1 > NEXT > > SEEK #gate, base2 > WRITE #gate, switch > > GOTO START > CommitChanges: > FOR N = 0 TO 7 STEP 1 > pump = CInt(1000000 & pinout[Fix(N)]) > Clock = CInt(1000001 & pinout[Fix(N)]) > SEEK #gate, base0 > WRITE #gate, pump > FOR Ptime = 1 TO 2000 STEP 1 > NEXT > SEEK #gate, base0 > WRITE #gate, Clock > FOR Ptime = 1 TO 2000 STEP 1 > NEXT > SEEK #gate, base0 > WRITE #gate, pump > NEXT > FOR Ptime = 1 TO 2000 STEP 1 > NEXT > > FOR N = 1 TO 16 STEP 1 > SEEK #gate, base0 > WRITE #gate, UClock > FOR Ptime = 1 TO 2000 STEP 1 > NEXT > SEEK #gate, base0 > WRITE #gate, DClock > NEXT > FOR Ptime = 1 TO 2000 STEP 1 > NEXT > SEEK #gate, base0 > WRITE #gate, commit > FOR Ptime = 1 TO 2000 STEP 1 > NEXT > SEEK #gate, base0 > WRITE #gate, poweron > GOTO PrintPinout > > PrintPinout: > FOR N = 0 TO 7 STEP 1 > PRINT pinout[Fix(N)] > NEXT > GOTO START > > PinSelectFail: > PRINT "You have selected a pin that does not exist, careful as this may > cause a divide by 0 and end the universe, Select between pin 0 and pin 7" > GOTO START > > START: > PRINT "What input do you want to toggle? (pins 0 -> 7 are outputs, Pin 8 > is the activation sequence)" > INPUT pin > IF pin < 0 OR pin > 8 THEN > GOTO PinSelectFail > ELSE IF pin = 8 THEN > GOTO CommitChanges > ELSE IF pinout[Fix(pin)] = 0 THEN > pinout[Fix(pin)] = 1 > ELSE IF pinout[Fix(pin)] = 1 THEN > pinout[Fix(pin)] = 0 > ENDIF > GOTO PrintPinout > END > ---------------------------------------------------------------------Gambas2 > END------------------------------------------------------------------------ > > ---------------------------------------------------------------------BASIC > CODE FOLLOWS------------------------------------------------------ > > BASE0=&H378 > > 'SWITCH POWER AND OUTPUTS ON > OUT BASE0, &H80 > OUT BASE0 + 2, 11 > > 'DEFINE ALL DIGITAL OUTPUTS [OUT(N)] AS BEING OFF (0) > FOR N = 0 TO 7 > DOUT(N) = 0 > NEXT N > DOUT=0 > > START: > INPUT "WHICH DIGITAL OUTPUT DO YOU WANT TO TOGGLE (0 TO 7)...."; N > IF N < 0 OR N > 7 THEN GOTO START > N = FIX(N) > DOUT9N0=ABS(NOT (-DOUT(N))) ' THIS LINE TOGGLES THE OUTPUT > > 'CREATE COMPLETE BYTE FOR IC3 CALLED DOUT > FOR N = 0 TO 7 > IF DOUT(N) = 0 THEN > DOUT = DOUT AND NOT (2^N) > ELSE > DOUT = DOUT OR 2^N > ENDIF > NEXT N > > 'SEND 8 CLOCK PULSES AND DIGITAL OUT DATA (ALL ZERO'S) > FOR BIT = 1 TO 8 > B = 8 - BIT > BYTE = ((DOUT AND 2^B) / 2^B) OR &H80 > OUT BASE0, BYTE > OUT BASE0, BYTE OR 2 > OUT BASE0 BYTE > NEXT BIT > > 'SEND ANOTHER 16 CLOCK PULSES TO SHIFT THE DATA INTO IC3 > FOR BIT = 9 TO 24 > OUT BASE0, &H82 > OUT BASE0, &H80 > NEXT BIT > > 'LOAD IC3 > OUT BASE0, &H90 > OUT BASE0, &h80] > > ---------------------------------------------------------------------BASIC > END------------------------------------------------------------------------ > > Bjorn Macintosh > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user ------- End of Original Message ------- From gambas at ...1... Wed Apr 7 00:40:12 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 7 Apr 2010 00:40:12 +0200 Subject: [Gambas-user] MySQL query problems with apostropies In-Reply-To: <20100406211920.M70972@...951...> References: <1270579559.8564.11.camel@...2186...> <20100406211920.M70972@...951...> Message-ID: <201004070040.12236.gambas@...1...> > Strings that contain these three characters: quote, double quote and > backslash need to be escaped. > You escape them by having a backslash immediately before it. > Example: > Patty O'Lantern would be... > Patty O\'Lantern > > One way is to make a small function that will insert a backslash > when it finds a quote or double quote or backslash. > > When you create your SQL string (Insert, Update, Select, etc) > you escape the strings for the char, varchar, text, or similar. > > sql = "SELECT * FROM inventory WHERE part = ' & escape(mypart) & "';" > > SELECT from the database will not return the 'escape' backslash. > It will appear normal. > > Please note: / (on the question mark key) is not the backslash. > \ is the backslash. > > -Fernando > > Gambas does escaping for you: DB.Exec("SELECT * FROM inventory WHERE part = &1", mypart) The Exec(), Find(), Edit() and Delete() methods have all that Subst()-like syntax. Each argument substituted in the SQL string is escaped according to the SQL syntax of the underlying database driver. Regards, -- Beno?t Minisini From nospam.nospam.nospam at ...626... Wed Apr 7 09:13:39 2010 From: nospam.nospam.nospam at ...626... (Kadaitcha Man) Date: Wed, 7 Apr 2010 17:13:39 +1000 Subject: [Gambas-user] problem with alignmet & position in GB3(qt) In-Reply-To: <201004062038.40564.rterry@...1946...> References: <28137172.post@...1379...> <201004051422.56085.gambas@...1...> <28149016.post@...1379...> <201004062038.40564.rterry@...1946...> Message-ID: On 6 April 2010 20:38, richard terry wrote: > I've never used a panel ever in my project, and I've hundreds of forms and > modules on a postgres backend with 30 schemas and hundreds of tables. > > I've programmed in VB3-6, Python/ wxPython, various IDe's and I reckon gambas > is probably the most predictable I've ever encountered in my life - and > easiest to use. > > Let it work for you. Wow! You're so cool. From doriano.blengino at ...1909... Wed Apr 7 11:06:42 2010 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Wed, 07 Apr 2010 11:06:42 +0200 Subject: [Gambas-user] Parallel Port - Illegal Seek - In-Reply-To: <20100406213312.M16416@...951...> References: <20100406213312.M16416@...951...> Message-ID: <4BBC4B22.6020103@...1909...> nando ha scritto: > Using SEEK is not correct. > If you think of the parallel port as a file, you cannot seek. > It doesn't make sense. > You can only read and write. > What are you trying to accomplish ? > -Fernando > He is trying to do low level access to the parallel port, which has 3 hardware addresses. In that respect, seek() would make sense to select which IO address to read from/write to. Whether this works or not, depends on how the kernel driver interprets the seeks, but the following listing makes it clear that somewhere (other OSes?) this behavior works. The error could also arise from other problems: permissions, missing modules, wrong major/minor numbers and so on... Regards, Doriano > > > ---------- Original Message ----------- > From: Bjorn Macintosh > To: gambas-user at lists.sourceforge.net > Sent: Fri, 2 Apr 2010 21:09:58 +1300 > Subject: [Gambas-user] Parallel Port - Illegal Seek - > > >> Hi All, >> >> I am writing a parallel port interface, however I am struggling with how to >> write to the parallel port. Below I have included the code that I have >> used. Following that I have included the BASIC code that I am bastardizing. >> >> My Gambas version is Gambas2.13 >> I am running Linux Mint 8 >> I do have a parallel port on my PC. It is '0378' - '037a' and '0778' - >> '077a' >> The error code I am getting is "System error. illegal seek" >> >> Thanks in advance for any help anyone can give. >> ---------------------------------------------------------------------GAMBAS2 >> CODE FOLLOWS------------------------------------------------------ >> ' Gambas module file >> PUBLIC SUB Main() >> >> DIM N AS Integer >> DIM pin AS Integer >> DIM pinout AS Integer[] = [0, 0, 0, 0, 0, 0, 0, 0] >> DIM pump AS Integer >> DIM Ptime AS Integer >> DIM Clock AS Integer >> DIM UClock AS Integer >> DIM DClock AS Integer >> DIM commit AS Integer >> DIM poweron AS Integer >> DIM switch AS Integer >> DIM gate AS File >> DIM base0, base1, base2 AS Integer >> >> base0 = 0 >> base1 = 1 >> base2 = 2 >> poweron = 64 >> commit = 144 >> switch = 17 >> UClock = 130 >> DClock = 128 >> gate = OPEN "/dev/parport0" FOR READ WRITE >> SEEK #gate, base0 >> WRITE #gate, poweron >> FOR Ptime = 1 TO 2000 STEP 1 >> NEXT >> >> SEEK #gate, base2 >> WRITE #gate, switch >> >> GOTO START >> CommitChanges: >> FOR N = 0 TO 7 STEP 1 >> pump = CInt(1000000 & pinout[Fix(N)]) >> Clock = CInt(1000001 & pinout[Fix(N)]) >> SEEK #gate, base0 >> WRITE #gate, pump >> FOR Ptime = 1 TO 2000 STEP 1 >> NEXT >> SEEK #gate, base0 >> WRITE #gate, Clock >> FOR Ptime = 1 TO 2000 STEP 1 >> NEXT >> SEEK #gate, base0 >> WRITE #gate, pump >> NEXT >> FOR Ptime = 1 TO 2000 STEP 1 >> NEXT >> >> FOR N = 1 TO 16 STEP 1 >> SEEK #gate, base0 >> WRITE #gate, UClock >> FOR Ptime = 1 TO 2000 STEP 1 >> NEXT >> SEEK #gate, base0 >> WRITE #gate, DClock >> NEXT >> FOR Ptime = 1 TO 2000 STEP 1 >> NEXT >> SEEK #gate, base0 >> WRITE #gate, commit >> FOR Ptime = 1 TO 2000 STEP 1 >> NEXT >> SEEK #gate, base0 >> WRITE #gate, poweron >> GOTO PrintPinout >> >> PrintPinout: >> FOR N = 0 TO 7 STEP 1 >> PRINT pinout[Fix(N)] >> NEXT >> GOTO START >> >> PinSelectFail: >> PRINT "You have selected a pin that does not exist, careful as this may >> cause a divide by 0 and end the universe, Select between pin 0 and pin 7" >> GOTO START >> >> START: >> PRINT "What input do you want to toggle? (pins 0 -> 7 are outputs, Pin 8 >> is the activation sequence)" >> INPUT pin >> IF pin < 0 OR pin > 8 THEN >> GOTO PinSelectFail >> ELSE IF pin = 8 THEN >> GOTO CommitChanges >> ELSE IF pinout[Fix(pin)] = 0 THEN >> pinout[Fix(pin)] = 1 >> ELSE IF pinout[Fix(pin)] = 1 THEN >> pinout[Fix(pin)] = 0 >> ENDIF >> GOTO PrintPinout >> END >> ---------------------------------------------------------------------Gambas2 >> END------------------------------------------------------------------------ >> >> ---------------------------------------------------------------------BASIC >> CODE FOLLOWS------------------------------------------------------ >> >> BASE0=&H378 >> >> 'SWITCH POWER AND OUTPUTS ON >> OUT BASE0, &H80 >> OUT BASE0 + 2, 11 >> >> 'DEFINE ALL DIGITAL OUTPUTS [OUT(N)] AS BEING OFF (0) >> FOR N = 0 TO 7 >> DOUT(N) = 0 >> NEXT N >> DOUT=0 >> >> START: >> INPUT "WHICH DIGITAL OUTPUT DO YOU WANT TO TOGGLE (0 TO 7)...."; N >> IF N < 0 OR N > 7 THEN GOTO START >> N = FIX(N) >> DOUT9N0=ABS(NOT (-DOUT(N))) ' THIS LINE TOGGLES THE OUTPUT >> >> 'CREATE COMPLETE BYTE FOR IC3 CALLED DOUT >> FOR N = 0 TO 7 >> IF DOUT(N) = 0 THEN >> DOUT = DOUT AND NOT (2^N) >> ELSE >> DOUT = DOUT OR 2^N >> ENDIF >> NEXT N >> >> 'SEND 8 CLOCK PULSES AND DIGITAL OUT DATA (ALL ZERO'S) >> FOR BIT = 1 TO 8 >> B = 8 - BIT >> BYTE = ((DOUT AND 2^B) / 2^B) OR &H80 >> OUT BASE0, BYTE >> OUT BASE0, BYTE OR 2 >> OUT BASE0 BYTE >> NEXT BIT >> >> 'SEND ANOTHER 16 CLOCK PULSES TO SHIFT THE DATA INTO IC3 >> FOR BIT = 9 TO 24 >> OUT BASE0, &H82 >> OUT BASE0, &H80 >> NEXT BIT >> >> 'LOAD IC3 >> OUT BASE0, &H90 >> OUT BASE0, &h80] >> >> ---------------------------------------------------------------------BASIC >> END------------------------------------------------------------------------ >> >> Bjorn Macintosh >> ------------------------------------------------------------------------------ >> From rterry at ...1946... Wed Apr 7 12:41:16 2010 From: rterry at ...1946... (richard terry) Date: Wed, 7 Apr 2010 20:41:16 +1000 Subject: [Gambas-user] problem with alignmet & position in GB3(qt) In-Reply-To: References: <28137172.post@...1379...> <201004062038.40564.rterry@...1946...> Message-ID: <201004072041.16907.rterry@...1946...> On Wednesday 07 April 2010 17:13:39 Kadaitcha Man wrote: > On 6 April 2010 20:38, richard terry wrote: > > I've never used a panel ever in my project, and I've hundreds of forms > > and modules on a postgres backend with 30 schemas and hundreds of tables. > > > > I've programmed in VB3-6, Python/ wxPython, various IDe's and I reckon > > gambas is probably the most predictable I've ever encountered in my life > > - and easiest to use. > > > > Let it work for you. > > Wow! You're so cool. > > --------------------------------------------------------------------------- > --- Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > Didn't anyone tell you sarcasm is the lowest form of wit? From gambas at ...1... Wed Apr 7 17:34:05 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 7 Apr 2010 17:34:05 +0200 Subject: [Gambas-user] problem with alignmet & position in GB3(qt) In-Reply-To: <28137172.post@...1379...> References: <28137172.post@...1379...> Message-ID: <201004071734.05921.gambas@...1...> > I post this problem before but until now this issue left unsolved. > > i try to create a form with many buttons (something like a keyboard). > > 1. when I try to change the height and width of all the buttons by using > align same height and width , it doesn't work . > > 2. I position each button with small gap next to each other manually from > each button property x and y . but when I select all button and try to move > up using up arrow . after the move all the gap between buttons become screw > up . > > 3. if I manual enter button position using button property x and y , > button always change it own position when I left click on it (it's like > snap to grid or something). Hi! The bug should be fixed in revision #2868. For point 3, when interacting with controls on the form with the mouse, press the SHIFT key to prevent snapping to grid. Regards, -- Beno?t Minisini From jussi.lahtinen at ...626... Wed Apr 7 18:31:22 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Wed, 7 Apr 2010 19:31:22 +0300 Subject: [Gambas-user] Input command with double enter: is this expected? In-Reply-To: References: Message-ID: Confirmed with Gambas3 rev 2822, Ubuntu 9.10 64bit. This code; Public Sub Main() Dim a As String Input a Print a End Yields this; " $ gbr3 ~/Desktop/cmdTesti.gambas This will be printed to screen... This " Though, I'm not sure how 'input' should behave... Can you use Application.Args[] ? Jussi On Mon, Apr 5, 2010 at 18:16, Leandro Santiago wrote: > Hello to all. I'm writing a small command-line app. > > I'm using the input command to read data from keyboard (stdin), and to > finalize the command in gambas, is necessary to press enter key twice, but I > never saw this behavior. Usually (in 99% of languages) just one enter is the > nedeed. > > Is there another way to read data from keyboard? > > I just do: > Input name > > I'm using gambas3 rev. 2840 in Ubuntu Linux. 9.10 > > (Sorry for my bad English :-)) > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From keithclark at ...2185... Wed Apr 7 20:35:07 2010 From: keithclark at ...2185... (Keith Clark) Date: Wed, 07 Apr 2010 14:35:07 -0400 Subject: [Gambas-user] TableView Header Names Message-ID: <1270665307.4226.10.camel@...2186...> How do I change the text that is displayed in the TableView Headers? Thanks (still learning!), Keith From gambas at ...1... Wed Apr 7 20:40:12 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 7 Apr 2010 20:40:12 +0200 Subject: [Gambas-user] Input command with double enter: is this expected? In-Reply-To: References: Message-ID: <201004072040.12424.gambas@...1...> > Confirmed with Gambas3 rev 2822, Ubuntu 9.10 64bit. > > This code; > Public Sub Main() > Dim a As String > Input a > Print a > End > > Yields this; > " > $ gbr3 ~/Desktop/cmdTesti.gambas > This will be printed to screen... > > This > " > > Though, I'm not sure how 'input' should behave... > Can you use Application.Args[] ? > > Jussi > > > > On Mon, Apr 5, 2010 at 18:16, Leandro Santiago > > wrote: > > Hello to all. I'm writing a small command-line app. > > > > I'm using the input command to read data from keyboard (stdin), and to > > finalize the command in gambas, is necessary to press enter key twice, > > but I never saw this behavior. Usually (in 99% of languages) just one > > enter is the nedeed. > > > > Is there another way to read data from keyboard? > > > > I just do: > > Input name > > > > I'm using gambas3 rev. 2840 in Ubuntu Linux. 9.10 > > The bug should be fixed in revision #2869. Regards, -- Beno?t Minisini From nando_f at ...951... Wed Apr 7 20:47:39 2010 From: nando_f at ...951... (nando) Date: Wed, 7 Apr 2010 13:47:39 -0500 Subject: [Gambas-user] Parallel Port - Illegal Seek - In-Reply-To: <4BBC4B22.6020103@...1909...> References: <20100406213312.M16416@...951...> <4BBC4B22.6020103@...1909...> Message-ID: <20100407184653.M27214@...951...> Seek will not change the address. ---------- Original Message ----------- From: Doriano Blengino To: nando_f at ...951..., mailing list for gambas users Sent: Wed, 07 Apr 2010 11:06:42 +0200 Subject: Re: [Gambas-user] Parallel Port - Illegal Seek - > nando ha scritto: > > Using SEEK is not correct. > > If you think of the parallel port as a file, you cannot seek. > > It doesn't make sense. > > You can only read and write. > > What are you trying to accomplish ? > > -Fernando > > > He is trying to do low level access to the parallel port, which has 3 > hardware addresses. > In that respect, seek() would make sense to select which IO address to > read from/write to. > Whether this works or not, depends on how the kernel driver interprets > the seeks, but the following listing makes it clear that somewhere > (other OSes?) this behavior works. > The error could also arise from other problems: permissions, missing > modules, wrong major/minor numbers and so on... > > Regards, > Doriano > > > > > > > ---------- Original Message ----------- > > From: Bjorn Macintosh > > To: gambas-user at lists.sourceforge.net > > Sent: Fri, 2 Apr 2010 21:09:58 +1300 > > Subject: [Gambas-user] Parallel Port - Illegal Seek - > > > > > >> Hi All, > >> > >> I am writing a parallel port interface, however I am struggling with how to > >> write to the parallel port. Below I have included the code that I have > >> used. Following that I have included the BASIC code that I am bastardizing. > >> > >> My Gambas version is Gambas2.13 > >> I am running Linux Mint 8 > >> I do have a parallel port on my PC. It is '0378' - '037a' and '0778' - > >> '077a' > >> The error code I am getting is "System error. illegal seek" > >> > >> Thanks in advance for any help anyone can give. > >> ---------------------------------------------------------------------GAMBAS2 > >> CODE FOLLOWS------------------------------------------------------ > >> ' Gambas module file > >> PUBLIC SUB Main() > >> > >> DIM N AS Integer > >> DIM pin AS Integer > >> DIM pinout AS Integer[] = [0, 0, 0, 0, 0, 0, 0, 0] > >> DIM pump AS Integer > >> DIM Ptime AS Integer > >> DIM Clock AS Integer > >> DIM UClock AS Integer > >> DIM DClock AS Integer > >> DIM commit AS Integer > >> DIM poweron AS Integer > >> DIM switch AS Integer > >> DIM gate AS File > >> DIM base0, base1, base2 AS Integer > >> > >> base0 = 0 > >> base1 = 1 > >> base2 = 2 > >> poweron = 64 > >> commit = 144 > >> switch = 17 > >> UClock = 130 > >> DClock = 128 > >> gate = OPEN "/dev/parport0" FOR READ WRITE > >> SEEK #gate, base0 > >> WRITE #gate, poweron > >> FOR Ptime = 1 TO 2000 STEP 1 > >> NEXT > >> > >> SEEK #gate, base2 > >> WRITE #gate, switch > >> > >> GOTO START > >> CommitChanges: > >> FOR N = 0 TO 7 STEP 1 > >> pump = CInt(1000000 & pinout[Fix(N)]) > >> Clock = CInt(1000001 & pinout[Fix(N)]) > >> SEEK #gate, base0 > >> WRITE #gate, pump > >> FOR Ptime = 1 TO 2000 STEP 1 > >> NEXT > >> SEEK #gate, base0 > >> WRITE #gate, Clock > >> FOR Ptime = 1 TO 2000 STEP 1 > >> NEXT > >> SEEK #gate, base0 > >> WRITE #gate, pump > >> NEXT > >> FOR Ptime = 1 TO 2000 STEP 1 > >> NEXT > >> > >> FOR N = 1 TO 16 STEP 1 > >> SEEK #gate, base0 > >> WRITE #gate, UClock > >> FOR Ptime = 1 TO 2000 STEP 1 > >> NEXT > >> SEEK #gate, base0 > >> WRITE #gate, DClock > >> NEXT > >> FOR Ptime = 1 TO 2000 STEP 1 > >> NEXT > >> SEEK #gate, base0 > >> WRITE #gate, commit > >> FOR Ptime = 1 TO 2000 STEP 1 > >> NEXT > >> SEEK #gate, base0 > >> WRITE #gate, poweron > >> GOTO PrintPinout > >> > >> PrintPinout: > >> FOR N = 0 TO 7 STEP 1 > >> PRINT pinout[Fix(N)] > >> NEXT > >> GOTO START > >> > >> PinSelectFail: > >> PRINT "You have selected a pin that does not exist, careful as this may > >> cause a divide by 0 and end the universe, Select between pin 0 and pin 7" > >> GOTO START > >> > >> START: > >> PRINT "What input do you want to toggle? (pins 0 -> 7 are outputs, Pin 8 > >> is the activation sequence)" > >> INPUT pin > >> IF pin < 0 OR pin > 8 THEN > >> GOTO PinSelectFail > >> ELSE IF pin = 8 THEN > >> GOTO CommitChanges > >> ELSE IF pinout[Fix(pin)] = 0 THEN > >> pinout[Fix(pin)] = 1 > >> ELSE IF pinout[Fix(pin)] = 1 THEN > >> pinout[Fix(pin)] = 0 > >> ENDIF > >> GOTO PrintPinout > >> END > >> ---------------------------------------------------------------------Gambas2 > >> END------------------------------------------------------------------------ > >> > >> ---------------------------------------------------------------------BASIC > >> CODE FOLLOWS------------------------------------------------------ > >> > >> BASE0=&H378 > >> > >> 'SWITCH POWER AND OUTPUTS ON > >> OUT BASE0, &H80 > >> OUT BASE0 + 2, 11 > >> > >> 'DEFINE ALL DIGITAL OUTPUTS [OUT(N)] AS BEING OFF (0) > >> FOR N = 0 TO 7 > >> DOUT(N) = 0 > >> NEXT N > >> DOUT=0 > >> > >> START: > >> INPUT "WHICH DIGITAL OUTPUT DO YOU WANT TO TOGGLE (0 TO 7)...."; N > >> IF N < 0 OR N > 7 THEN GOTO START > >> N = FIX(N) > >> DOUT9N0=ABS(NOT (-DOUT(N))) ' THIS LINE TOGGLES THE OUTPUT > >> > >> 'CREATE COMPLETE BYTE FOR IC3 CALLED DOUT > >> FOR N = 0 TO 7 > >> IF DOUT(N) = 0 THEN > >> DOUT = DOUT AND NOT (2^N) > >> ELSE > >> DOUT = DOUT OR 2^N > >> ENDIF > >> NEXT N > >> > >> 'SEND 8 CLOCK PULSES AND DIGITAL OUT DATA (ALL ZERO'S) > >> FOR BIT = 1 TO 8 > >> B = 8 - BIT > >> BYTE = ((DOUT AND 2^B) / 2^B) OR &H80 > >> OUT BASE0, BYTE > >> OUT BASE0, BYTE OR 2 > >> OUT BASE0 BYTE > >> NEXT BIT > >> > >> 'SEND ANOTHER 16 CLOCK PULSES TO SHIFT THE DATA INTO IC3 > >> FOR BIT = 9 TO 24 > >> OUT BASE0, &H82 > >> OUT BASE0, &H80 > >> NEXT BIT > >> > >> 'LOAD IC3 > >> OUT BASE0, &H90 > >> OUT BASE0, &h80] > >> > >> ---------------------------------------------------------------------BASIC > >> END------------------------------------------------------------------------ > >> > >> Bjorn Macintosh > >> ------------------------------------------------------------------------------ > >> > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user ------- End of Original Message ------- From keithclark at ...2185... Wed Apr 7 21:33:12 2010 From: keithclark at ...2185... (Keith Clark) Date: Wed, 07 Apr 2010 15:33:12 -0400 Subject: [Gambas-user] MySQL query problems with apostropies In-Reply-To: <20100406211920.M70972@...951...> References: <1270579559.8564.11.camel@...2186...> <20100406211920.M70972@...951...> Message-ID: <1270668792.4226.12.camel@...2186...> On Tue, 2010-04-06 at 16:27 -0500, nando wrote: > Strings that contain these three characters: quote, double quote and backslash > need to be escaped. > You escape them by having a backslash immediately before it. > Example: > Patty O'Lantern would be... > Patty O\'Lantern > > One way is to make a small function that will insert a backslash > when it finds a quote or double quote or backslash. > > When you create your SQL string (Insert, Update, Select, etc) > you escape the strings for the char, varchar, text, or similar. > > sql = "SELECT * FROM inventory WHERE part = ' & escape(mypart) & "';" > > SELECT from the database will not return the 'escape' backslash. > It will appear normal. > > Please note: / (on the question mark key) is not the backslash. > \ is the backslash. > > -Fernando > Can I not do this with Replace$? I can with the single quote with Replace$($string,"'","\'"), but I cannot do the same with double quotes. I'm not sure I understand this whole escape thing. From nando_f at ...951... Wed Apr 7 21:40:43 2010 From: nando_f at ...951... (nando) Date: Wed, 7 Apr 2010 14:40:43 -0500 Subject: [Gambas-user] MySQL query problems with apostropies In-Reply-To: <1270668792.4226.12.camel@...2186...> References: <1270579559.8564.11.camel@...2186...> <20100406211920.M70972@...951...> <1270668792.4226.12.camel@...2186...> Message-ID: <20100407193805.M5581@...951...> Replace will work for quote and backslash For double quote: doublequote$ is chr$(34) Replace$(mystring, chr$(34), "\" & chr$(34) But, Benoit had an email of the nice solution. -Fernando ---------- Original Message ----------- From: Keith Clark To: nando_f at ...951..., mailing list for gambas users Sent: Wed, 07 Apr 2010 15:33:12 -0400 Subject: Re: [Gambas-user] MySQL query problems with apostropies > On Tue, 2010-04-06 at 16:27 -0500, nando wrote: > > Strings that contain these three characters: quote, double quote and backslash > > need to be escaped. > > You escape them by having a backslash immediately before it. > > Example: > > Patty O'Lantern would be... > > Patty O\'Lantern > > > > One way is to make a small function that will insert a backslash > > when it finds a quote or double quote or backslash. > > > > When you create your SQL string (Insert, Update, Select, etc) > > you escape the strings for the char, varchar, text, or similar. > > > > sql = "SELECT * FROM inventory WHERE part = ' & escape(mypart) & "';" > > > > SELECT from the database will not return the 'escape' backslash. > > It will appear normal. > > > > Please note: / (on the question mark key) is not the backslash. > > \ is the backslash. > > > > -Fernando > > > Can I not do this with Replace$? I can with the single quote with > Replace$($string,"'","\'"), but I cannot do the same with double quotes. > > I'm not sure I understand this whole escape thing. > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user ------- End of Original Message ------- From keithclark at ...2185... Wed Apr 7 21:46:14 2010 From: keithclark at ...2185... (Keith Clark) Date: Wed, 07 Apr 2010 15:46:14 -0400 Subject: [Gambas-user] MySQL query problems with apostropies In-Reply-To: <20100407193805.M5581@...951...> References: <1270579559.8564.11.camel@...2186...> <20100406211920.M70972@...951...> <1270668792.4226.12.camel@...2186...> <20100407193805.M5581@...951...> Message-ID: <1270669574.4226.16.camel@...2186...> On Wed, 2010-04-07 at 14:40 -0500, nando wrote: > Replace will work for quote and backslash > For double quote: > > doublequote$ is chr$(34) > Replace$(mystring, chr$(34), "\" & chr$(34) > > But, Benoit had an email of the nice solution. > -Fernando I did not understand that solution either. From keithclark at ...2185... Wed Apr 7 21:55:06 2010 From: keithclark at ...2185... (Keith Clark) Date: Wed, 07 Apr 2010 15:55:06 -0400 Subject: [Gambas-user] MySQL query problems with apostropies In-Reply-To: <20100407193805.M5581@...951...> References: <1270579559.8564.11.camel@...2186...> <20100406211920.M70972@...951...> <1270668792.4226.12.camel@...2186...> <20100407193805.M5581@...951...> Message-ID: <1270670106.4226.18.camel@...2186...> On Wed, 2010-04-07 at 14:40 -0500, nando wrote: > Replace will work for quote and backslash > For double quote: > > doublequote$ is chr$(34) > Replace$(mystring, chr$(34), "\" & chr$(34) > > But, Benoit had an email of the nice solution. > -Fernando > I don't think this works. This is what I get when I try it: DescriptionTextArea.Text = Replace$(DescriptionTextArea.Text, Chr$(34), "\" & chr$(34))" No matter how I try to type it, it changes the ending characters and does not interpret the chr$ function correctly. From gambas.fr at ...626... Wed Apr 7 21:55:55 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Wed, 7 Apr 2010 21:55:55 +0200 Subject: [Gambas-user] MySQL query problems with apostropies In-Reply-To: <1270669574.4226.16.camel@...2186...> References: <1270579559.8564.11.camel@...2186...> <20100406211920.M70972@...951...> <1270668792.4226.12.camel@...2186...> <20100407193805.M5581@...951...> <1270669574.4226.16.camel@...2186...> Message-ID: 2010/4/7 Keith Clark : > On Wed, 2010-04-07 at 14:40 -0500, nando wrote: >> Replace will work for quote and backslash >> For double quote: >> >> doublequote$ is chr$(34) >> Replace$(mystring, chr$(34), "\" & chr$(34) >> >> But, Benoit had an email of the nice solution. >> -Fernando > > I did not understand that solution either. > > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > did you understand how subst() function work ijn gambas ?? mystring = subst("this is my &1 &2", "black", "dog") print mystring give : this my black dog &1 and &2 are replaced by subst param for the sql queries it work at the same ... but with an automatic escaping. so the argument are corrected in backgroud by an excape function. hresult = db.exec("select &1 From &2 where titi=&3", "titi", "tititable", 1) From keithclark at ...2185... Wed Apr 7 22:02:46 2010 From: keithclark at ...2185... (Keith Clark) Date: Wed, 07 Apr 2010 16:02:46 -0400 Subject: [Gambas-user] MySQL query problems with apostropies In-Reply-To: References: <1270579559.8564.11.camel@...2186...> <20100406211920.M70972@...951...> <1270668792.4226.12.camel@...2186...> <20100407193805.M5581@...951...> <1270669574.4226.16.camel@...2186...> Message-ID: <1270670566.4226.21.camel@...2186...> > did you understand how subst() function work ijn gambas ?? > > mystring = subst("this is my &1 &2", "black", "dog") > > print mystring give : > > this my black dog > > &1 and &2 are replaced by subst param > > for the sql queries it work at the same ... but with an automatic escaping. > so the argument are corrected in backgroud by an excape function. > > > hresult = db.exec("select &1 From &2 where titi=&3", "titi", "tititable", 1) > Yes, but I don't understand how that will help me with my problem. I could have multiple ' and " and / characters all throughout a very lengthy string. Do I have to search for those and break them up? From euph1 at ...734... Wed Apr 7 22:05:08 2010 From: euph1 at ...734... (mike) Date: Wed, 07 Apr 2010 16:05:08 -0400 Subject: [Gambas-user] Parallel Port - Illegal Seek - In-Reply-To: <20100407184653.M27214@...951...> References: <20100406213312.M16416@...951...> <4BBC4B22.6020103@...1909...> <20100407184653.M27214@...951...> Message-ID: <4BBCE574.3030009@...734...> On 04/07/2010 02:47 PM, nando wrote: > Seek will not change the address. > > > ---------- Original Message ----------- > From: Doriano Blengino > To: nando_f at ...951..., mailing list for gambas users > > Sent: Wed, 07 Apr 2010 11:06:42 +0200 > Subject: Re: [Gambas-user] Parallel Port - Illegal Seek - > > >> nando ha scritto: >> >>> Using SEEK is not correct. >>> If you think of the parallel port as a file, you cannot seek. >>> It doesn't make sense. >>> You can only read and write. >>> What are you trying to accomplish ? >>> -Fernando >>> >>> >> He is trying to do low level access to the parallel port, which has 3 >> hardware addresses. >> In that respect, seek() would make sense to select which IO address to >> read from/write to. >> Whether this works or not, depends on how the kernel driver interprets >> the seeks, but the following listing makes it clear that somewhere >> (other OSes?) this behavior works. >> The error could also arise from other problems: permissions, missing >> modules, wrong major/minor numbers and so on... >> >> Regards, >> Doriano >> >> >>> >>> ---------- Original Message ----------- >>> From: Bjorn Macintosh >>> To: gambas-user at lists.sourceforge.net >>> Sent: Fri, 2 Apr 2010 21:09:58 +1300 >>> Subject: [Gambas-user] Parallel Port - Illegal Seek - >>> >>> >>> >>>> Hi All, >>>> >>>> I am writing a parallel port interface, however I am struggling with how to >>>> write to the parallel port. Below I have included the code that I have >>>> used. Following that I have included the BASIC code that I am bastardizing. >>>> >>>> My Gambas version is Gambas2.13 >>>> I am running Linux Mint 8 >>>> I do have a parallel port on my PC. It is '0378' - '037a' and '0778' - >>>> '077a' >>>> The error code I am getting is "System error. illegal seek" >>>> >>>> Thanks in advance for any help anyone can give. >>>> ---------------------------------------------------------------------GAMBAS2 >>>> CODE FOLLOWS------------------------------------------------------ >>>> ' Gambas module file >>>> PUBLIC SUB Main() >>>> >>>> DIM N AS Integer >>>> DIM pin AS Integer >>>> DIM pinout AS Integer[] = [0, 0, 0, 0, 0, 0, 0, 0] >>>> DIM pump AS Integer >>>> DIM Ptime AS Integer >>>> DIM Clock AS Integer >>>> DIM UClock AS Integer >>>> DIM DClock AS Integer >>>> DIM commit AS Integer >>>> DIM poweron AS Integer >>>> DIM switch AS Integer >>>> DIM gate AS File >>>> DIM base0, base1, base2 AS Integer >>>> >>>> base0 = 0 >>>> base1 = 1 >>>> base2 = 2 >>>> poweron = 64 >>>> commit = 144 >>>> switch = 17 >>>> UClock = 130 >>>> DClock = 128 >>>> gate = OPEN "/dev/parport0" FOR READ WRITE >>>> SEEK #gate, base0 >>>> WRITE #gate, poweron >>>> FOR Ptime = 1 TO 2000 STEP 1 >>>> NEXT >>>> >>>> SEEK #gate, base2 >>>> WRITE #gate, switch >>>> >>>> GOTO START >>>> CommitChanges: >>>> FOR N = 0 TO 7 STEP 1 >>>> pump = CInt(1000000& pinout[Fix(N)]) >>>> Clock = CInt(1000001& pinout[Fix(N)]) >>>> SEEK #gate, base0 >>>> WRITE #gate, pump >>>> FOR Ptime = 1 TO 2000 STEP 1 >>>> NEXT >>>> SEEK #gate, base0 >>>> WRITE #gate, Clock >>>> FOR Ptime = 1 TO 2000 STEP 1 >>>> NEXT >>>> SEEK #gate, base0 >>>> WRITE #gate, pump >>>> NEXT >>>> FOR Ptime = 1 TO 2000 STEP 1 >>>> NEXT >>>> >>>> FOR N = 1 TO 16 STEP 1 >>>> SEEK #gate, base0 >>>> WRITE #gate, UClock >>>> FOR Ptime = 1 TO 2000 STEP 1 >>>> NEXT >>>> SEEK #gate, base0 >>>> WRITE #gate, DClock >>>> NEXT >>>> FOR Ptime = 1 TO 2000 STEP 1 >>>> NEXT >>>> SEEK #gate, base0 >>>> WRITE #gate, commit >>>> FOR Ptime = 1 TO 2000 STEP 1 >>>> NEXT >>>> SEEK #gate, base0 >>>> WRITE #gate, poweron >>>> GOTO PrintPinout >>>> >>>> PrintPinout: >>>> FOR N = 0 TO 7 STEP 1 >>>> PRINT pinout[Fix(N)] >>>> NEXT >>>> GOTO START >>>> >>>> PinSelectFail: >>>> PRINT "You have selected a pin that does not exist, careful as this may >>>> cause a divide by 0 and end the universe, Select between pin 0 and pin 7" >>>> GOTO START >>>> >>>> START: >>>> PRINT "What input do you want to toggle? (pins 0 -> 7 are outputs, Pin 8 >>>> is the activation sequence)" >>>> INPUT pin >>>> IF pin< 0 OR pin> 8 THEN >>>> GOTO PinSelectFail >>>> ELSE IF pin = 8 THEN >>>> GOTO CommitChanges >>>> ELSE IF pinout[Fix(pin)] = 0 THEN >>>> pinout[Fix(pin)] = 1 >>>> ELSE IF pinout[Fix(pin)] = 1 THEN >>>> pinout[Fix(pin)] = 0 >>>> ENDIF >>>> GOTO PrintPinout >>>> END >>>> ---------------------------------------------------------------------Gambas2 >>>> END------------------------------------------------------------------------ >>>> >>>> ---------------------------------------------------------------------BASIC >>>> CODE FOLLOWS------------------------------------------------------ >>>> >>>> BASE0=&H378 >>>> >>>> 'SWITCH POWER AND OUTPUTS ON >>>> OUT BASE0,&H80 >>>> OUT BASE0 + 2, 11 >>>> >>>> 'DEFINE ALL DIGITAL OUTPUTS [OUT(N)] AS BEING OFF (0) >>>> FOR N = 0 TO 7 >>>> DOUT(N) = 0 >>>> NEXT N >>>> DOUT=0 >>>> >>>> START: >>>> INPUT "WHICH DIGITAL OUTPUT DO YOU WANT TO TOGGLE (0 TO 7)...."; N >>>> IF N< 0 OR N> 7 THEN GOTO START >>>> N = FIX(N) >>>> DOUT9N0=ABS(NOT (-DOUT(N))) ' THIS LINE TOGGLES THE OUTPUT >>>> >>>> 'CREATE COMPLETE BYTE FOR IC3 CALLED DOUT >>>> FOR N = 0 TO 7 >>>> IF DOUT(N) = 0 THEN >>>> DOUT = DOUT AND NOT (2^N) >>>> ELSE >>>> DOUT = DOUT OR 2^N >>>> ENDIF >>>> NEXT N >>>> >>>> 'SEND 8 CLOCK PULSES AND DIGITAL OUT DATA (ALL ZERO'S) >>>> FOR BIT = 1 TO 8 >>>> B = 8 - BIT >>>> BYTE = ((DOUT AND 2^B) / 2^B) OR&H80 >>>> OUT BASE0, BYTE >>>> OUT BASE0, BYTE OR 2 >>>> OUT BASE0 BYTE >>>> NEXT BIT >>>> >>>> 'SEND ANOTHER 16 CLOCK PULSES TO SHIFT THE DATA INTO IC3 >>>> FOR BIT = 9 TO 24 >>>> OUT BASE0,&H82 >>>> OUT BASE0,&H80 >>>> NEXT BIT >>>> >>>> 'LOAD IC3 >>>> OUT BASE0,&H90 >>>> OUT BASE0,&h80] >>>> >>>> ---------------------------------------------------------------------BASIC >>>> END------------------------------------------------------------------------ >>>> >>>> Bjorn Macintosh >>>> ------------------------------------------------------------------------------ >>>> >>>> >> ------------------------------------------------------------------------------ >> Download Intel® Parallel Studio Eval >> Try the new software tools for yourself. Speed compiling, find bugs >> proactively, and fine-tune applications for parallel performance. >> See why Intel Parallel Studio got high marks during beta. >> http://p.sf.net/sfu/intel-sw-dev >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > ------- End of Original Message ------- > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > What will change the address? From keithclark at ...2185... Wed Apr 7 22:21:14 2010 From: keithclark at ...2185... (Keith Clark) Date: Wed, 07 Apr 2010 16:21:14 -0400 Subject: [Gambas-user] MySQL query problems with apostropies In-Reply-To: <20100407193805.M5581@...951...> References: <1270579559.8564.11.camel@...2186...> <20100406211920.M70972@...951...> <1270668792.4226.12.camel@...2186...> <20100407193805.M5581@...951...> Message-ID: <1270671674.4226.22.camel@...2186...> On Wed, 2010-04-07 at 14:40 -0500, nando wrote: > Replace will work for quote and backslash > For double quote: > > doublequote$ is chr$(34) > Replace$(mystring, chr$(34), "\" & chr$(34) > > But, Benoit had an email of the nice solution. > -Fernando > > Ok, I've tried this: DescriptionTextArea.Text = Replace$(DescriptionTextArea.Text, "'", "\'") DescriptionTextArea.Text = Replace$(DescriptionTextArea.Text, Chr $(34), Chr$(92) & Chr$(34)) But DescriptionTextArea.Text remains unchanged afterwards. From keithclark at ...2185... Wed Apr 7 22:58:36 2010 From: keithclark at ...2185... (Keith Clark) Date: Wed, 07 Apr 2010 16:58:36 -0400 Subject: [Gambas-user] MySQL query problems with apostropies In-Reply-To: References: <1270579559.8564.11.camel@...2186...> <20100406211920.M70972@...951...> <1270668792.4226.12.camel@...2186...> <20100407193805.M5581@...951...> <1270669574.4226.16.camel@...2186...> Message-ID: <1270673916.4226.23.camel@...2186...> On Wed, 2010-04-07 at 21:55 +0200, Fabien Bodard wrote: > 2010/4/7 Keith Clark : > > On Wed, 2010-04-07 at 14:40 -0500, nando wrote: > >> Replace will work for quote and backslash > >> For double quote: > >> > >> doublequote$ is chr$(34) > >> Replace$(mystring, chr$(34), "\" & chr$(34) > >> > >> But, Benoit had an email of the nice solution. > >> -Fernando > > > > I did not understand that solution either. > > > > > > > > ------------------------------------------------------------------------------ > > Download Intel® Parallel Studio Eval > > Try the new software tools for yourself. Speed compiling, find bugs > > proactively, and fine-tune applications for parallel performance. > > See why Intel Parallel Studio got high marks during beta. > > http://p.sf.net/sfu/intel-sw-dev > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > did you understand how subst() function work ijn gambas ?? > > mystring = subst("this is my &1 &2", "black", "dog") > > print mystring give : > > this my black dog > > &1 and &2 are replaced by subst param > > for the sql queries it work at the same ... but with an automatic escaping. > so the argument are corrected in backgroud by an excape function. > > > hresult = db.exec("select &1 From &2 where titi=&3", "titi", "tititable", 1) > Ok, I finally got it now!!!!! Whew, that one took awhile to sink in! Thanks everyone for your help. Keith From leandrosansilva at ...626... Thu Apr 8 01:59:54 2010 From: leandrosansilva at ...626... (Leandro Santiago) Date: Wed, 7 Apr 2010 20:59:54 -0300 Subject: [Gambas-user] Input command with double enter: is this expected? In-Reply-To: <201004072040.12424.gambas@...1...> References: <201004072040.12424.gambas@...1...> Message-ID: Thanks. Now it works :-) 2010/4/7 Beno?t Minisini > > Confirmed with Gambas3 rev 2822, Ubuntu 9.10 64bit. > > > > This code; > > Public Sub Main() > > Dim a As String > > Input a > > Print a > > End > > > > Yields this; > > " > > $ gbr3 ~/Desktop/cmdTesti.gambas > > This will be printed to screen... > > > > This > > " > > > > Though, I'm not sure how 'input' should behave... > > Can you use Application.Args[] ? > > > > Jussi > > > > > > > > On Mon, Apr 5, 2010 at 18:16, Leandro Santiago > > > > wrote: > > > Hello to all. I'm writing a small command-line app. > > > > > > I'm using the input command to read data from keyboard (stdin), and to > > > finalize the command in gambas, is necessary to press enter key twice, > > > but I never saw this behavior. Usually (in 99% of languages) just one > > > enter is the nedeed. > > > > > > Is there another way to read data from keyboard? > > > > > > I just do: > > > Input name > > > > > > I'm using gambas3 rev. 2840 in Ubuntu Linux. 9.10 > > > > > The bug should be fixed in revision #2869. > > Regards, > > -- > Beno?t Minisini > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From robert1juhasz at ...626... Thu Apr 8 03:44:58 2010 From: robert1juhasz at ...626... (Robert JUHASZ) Date: Thu, 8 Apr 2010 03:44:58 +0200 Subject: [Gambas-user] TableView Header Names In-Reply-To: <1270665307.4226.10.camel@...2186...> References: <1270665307.4226.10.camel@...2186...> Message-ID: TableViewName.Columns[columnIindex].Title or TableViewName.Columns[columnIndex].Text (does the same as far as I could see). Robi 2010/4/7 Keith Clark > How do I change the text that is displayed in the TableView Headers? > > Thanks (still learning!), > > Keith > > > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From doriano.blengino at ...1909... Thu Apr 8 10:00:59 2010 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Thu, 08 Apr 2010 10:00:59 +0200 Subject: [Gambas-user] Parallel Port - Illegal Seek - In-Reply-To: <4BBCE574.3030009@...734...> References: <20100406213312.M16416@...951...> <4BBC4B22.6020103@...1909...> <20100407184653.M27214@...951...> <4BBCE574.3030009@...734...> Message-ID: <4BBD8D3B.3070006@...1909...> mike ha scritto: > On 04/07/2010 02:47 PM, nando wrote: > >> Seek will not change the address. >> >> >> ---------- Original Message ----------- >> From: Doriano Blengino >> To: nando_f at ...951..., mailing list for gambas users >> >> Sent: Wed, 07 Apr 2010 11:06:42 +0200 >> Subject: Re: [Gambas-user] Parallel Port - Illegal Seek - >> >> >> >>> nando ha scritto: >>> >>> >>>> Using SEEK is not correct. >>>> If you think of the parallel port as a file, you cannot seek. >>>> It doesn't make sense. >>>> You can only read and write. >>>> What are you trying to accomplish ? >>>> -Fernando >>>> >>>> >>>> >>> He is trying to do low level access to the parallel port, which has 3 >>> hardware addresses. >>> In that respect, seek() would make sense to select which IO address to >>> read from/write to. >>> Whether this works or not, depends on how the kernel driver interprets >>> the seeks, but the following listing makes it clear that somewhere >>> (other OSes?) this behavior works. >>> The error could also arise from other problems: permissions, missing >>> modules, wrong major/minor numbers and so on... >>> >>> Regards, >>> Doriano >>> How already stated in a previous email, it is possible to access I/O ports in different manners. After a research, I discovered two viable ways - direct access (I don't know if gambas has I/O instructions), and /dev/port, which is a device. In this last case seek() is used to address a port. From http://tldp.org/HOWTO/IO-Port-Programming-2.html : > > Another way to access I/O ports is to |open()| |/dev/port| (a > character device, major number 1, minor 4) for reading and/or writing > (the stdio |f*()| functions have internal buffering, so avoid them). > Then |lseek()| to the appropriate byte in the file (file position 0 = > port 0x00, file position 1 = port 0x01, and so on), and |read()| or > |write()| a byte or word from or to it. > > Naturally, for this to work your program needs read/write access to > |/dev/port|. This method is probably slower than the normal method > above, but does not need compiler optimisation nor |ioperm()|. It > doesn't need root access either, if you give a non-root user or group > access to |/dev/port| --- but this is a very bad thing... [about > security]... Using /dev/port can be problematic: can gambas do unbuffered I/O? Other methods would be to use some external program or library (shared object). If gambas does not have I/O (peek & poke), then an external library is the most performant way, though not the simpler. Gambas can interface with external libraries using EXTERNAL declaration. Googling about this issue, I found some interesting page: http://tldp.org/HOWTO/IO-Port-Programming-2.html http://www.epanorama.net/circuits/parallel_output.html http://www.faqs.org/docs/Linux-mini/IO-Port-Programming.html http://cyberelk.net/tim/parport/parport.html http://people.redhat.com/twaugh/parport/html/ppdev.html The best way would be to write a gambas component, having either internal I/O instructions (a C component) or relying to an external library (a gambas component calling an external library; may be there is something already done somewhere). Hey, gambas gurus out there... someone has the time? I do not. Regards, Doriano From gambas at ...1... Thu Apr 8 11:21:14 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Thu, 8 Apr 2010 11:21:14 +0200 Subject: [Gambas-user] Parallel Port - Illegal Seek - In-Reply-To: References: Message-ID: <201004081121.14890.gambas@...1...> > Hi All, > > I am writing a parallel port interface, however I am struggling with how to > write to the parallel port. Below I have included the code that I have > used. Following that I have included the BASIC code that I am > bastardizing. > > My Gambas version is Gambas2.13 > I am running Linux Mint 8 > I do have a parallel port on my PC. It is '0378' - '037a' and '0778' - > '077a' > The error code I am getting is "System error. illegal seek" > > Thanks in advance for any help anyone can give. > ---------------------------------------------------------------------GAMBAS > 2 CODE FOLLOWS------------------------------------------------------ ' > Gambas module file > PUBLIC SUB Main() > > DIM N AS Integer > DIM pin AS Integer > DIM pinout AS Integer[] = [0, 0, 0, 0, 0, 0, 0, 0] > DIM pump AS Integer > DIM Ptime AS Integer > DIM Clock AS Integer > DIM UClock AS Integer > DIM DClock AS Integer > DIM commit AS Integer > DIM poweron AS Integer > DIM switch AS Integer > DIM gate AS File > DIM base0, base1, base2 AS Integer > > base0 = 0 > base1 = 1 > base2 = 2 > poweron = 64 > commit = 144 > switch = 17 > UClock = 130 > DClock = 128 > gate = OPEN "/dev/parport0" FOR READ WRITE > SEEK #gate, base0 > WRITE #gate, poweron > FOR Ptime = 1 TO 2000 STEP 1 > NEXT > > SEEK #gate, base2 > WRITE #gate, switch > > GOTO START > CommitChanges: > FOR N = 0 TO 7 STEP 1 > pump = CInt(1000000 & pinout[Fix(N)]) > Clock = CInt(1000001 & pinout[Fix(N)]) > SEEK #gate, base0 > WRITE #gate, pump > FOR Ptime = 1 TO 2000 STEP 1 > NEXT > SEEK #gate, base0 > WRITE #gate, Clock > FOR Ptime = 1 TO 2000 STEP 1 > NEXT > SEEK #gate, base0 > WRITE #gate, pump > NEXT > FOR Ptime = 1 TO 2000 STEP 1 > NEXT > > FOR N = 1 TO 16 STEP 1 > SEEK #gate, base0 > WRITE #gate, UClock > FOR Ptime = 1 TO 2000 STEP 1 > NEXT > SEEK #gate, base0 > WRITE #gate, DClock > NEXT > FOR Ptime = 1 TO 2000 STEP 1 > NEXT > SEEK #gate, base0 > WRITE #gate, commit > FOR Ptime = 1 TO 2000 STEP 1 > NEXT > SEEK #gate, base0 > WRITE #gate, poweron > GOTO PrintPinout > > PrintPinout: > FOR N = 0 TO 7 STEP 1 > PRINT pinout[Fix(N)] > NEXT > GOTO START > > PinSelectFail: > PRINT "You have selected a pin that does not exist, careful as this may > cause a divide by 0 and end the universe, Select between pin 0 and pin 7" > GOTO START > > START: > PRINT "What input do you want to toggle? (pins 0 -> 7 are outputs, Pin 8 > is the activation sequence)" > INPUT pin > IF pin < 0 OR pin > 8 THEN > GOTO PinSelectFail > ELSE IF pin = 8 THEN > GOTO CommitChanges > ELSE IF pinout[Fix(pin)] = 0 THEN > pinout[Fix(pin)] = 1 > ELSE IF pinout[Fix(pin)] = 1 THEN > pinout[Fix(pin)] = 0 > ENDIF > GOTO PrintPinout > END > ---------------------------------------------------------------------Gambas > 2 > END----------------------------------------------------------------------- > - > > > > > ---------------------------------------------------------------------BASIC > CODE FOLLOWS------------------------------------------------------ > > BASE0=&H378 > > 'SWITCH POWER AND OUTPUTS ON > OUT BASE0, &H80 > OUT BASE0 + 2, 11 > > 'DEFINE ALL DIGITAL OUTPUTS [OUT(N)] AS BEING OFF (0) > FOR N = 0 TO 7 > DOUT(N) = 0 > NEXT N > DOUT=0 > > START: > INPUT "WHICH DIGITAL OUTPUT DO YOU WANT TO TOGGLE (0 TO 7)...."; N > IF N < 0 OR N > 7 THEN GOTO START > N = FIX(N) > DOUT9N0=ABS(NOT (-DOUT(N))) ' THIS LINE TOGGLES THE OUTPUT > > > 'CREATE COMPLETE BYTE FOR IC3 CALLED DOUT > FOR N = 0 TO 7 > IF DOUT(N) = 0 THEN > DOUT = DOUT AND NOT (2^N) > ELSE > DOUT = DOUT OR 2^N > ENDIF > NEXT N > > 'SEND 8 CLOCK PULSES AND DIGITAL OUT DATA (ALL ZERO'S) > FOR BIT = 1 TO 8 > B = 8 - BIT > BYTE = ((DOUT AND 2^B) / 2^B) OR &H80 > OUT BASE0, BYTE > OUT BASE0, BYTE OR 2 > OUT BASE0 BYTE > NEXT BIT > > 'SEND ANOTHER 16 CLOCK PULSES TO SHIFT THE DATA INTO IC3 > FOR BIT = 9 TO 24 > OUT BASE0, &H82 > OUT BASE0, &H80 > NEXT BIT > > 'LOAD IC3 > OUT BASE0, &H90 > OUT BASE0, &h80] > > ---------------------------------------------------------------------BASIC > END------------------------------------------------------------------------ > > > Bjorn Macintosh Have you read http://gambasdoc.org/help/howto/parport? Your program should work as expected if you open "/dev/port", not "/dev/parport0", if you seek at the true port address, and if you write bytes. DIM poweron AS Byte ' <-- note that gate = OPEN "/dev/parport0" FOR READ WRITE SEEK #gate, &H378 poweron = 1 WRITE #gate, poweron And if you need to wait a little, use the SLEEP or WAIT instruction. See the documentation for details on these instructions. I imagine that if you write Integer instead of Byte, then you will actually write the four bytes of the integer to four successive ports. Regards, -- Beno?t Minisini From prog at ...2177... Thu Apr 8 18:04:58 2010 From: prog at ...2177... (craf) Date: Thu, 08 Apr 2010 12:04:58 -0400 Subject: [Gambas-user] Debugging program to find error Message-ID: <1270742698.1985.10.camel@...2406...> Hi Continuing with experiments to try to implement a project of Gambas on a computer that does not have the IDE using the variable GB_DIR. The main problem is to debug the project on the computer that Gambas is not installed because the debugger does not work with the parameters indicated on the website of Benoit. I have tried to solve this by placing the routes where the executable. Example: Edit /etc/environment and added: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/opt/project/gambas2/bin Then run gbc2 -agt and gives me the following: /opt/project/ FMain.class: 15: Unknown identifier: Button any idea? For testing purposes, the project consists of only one form and a button. Note: I'm testing this on a Ubuntu 8.04 distribution without Gambas 2 installed, running through VirtualBox. Regards [OperatingSystem] OperatingSystem=Linux KernelRelease=2.6.28-14-generic DistributionVendor=ubuntu DistributionRelease="Ubuntu 9.04" [System] CPUArchitecture=i686 TotalRam=1026628 kB [Gambas] Gambas1=Not Installed Gambas2=2.20.2 Gambas2Path=/usr/local/bin/gbx2 Gambas3=2.99.0 Gambas3Path=/usr/local/bin/gbx3 From gambas at ...1... Thu Apr 8 18:29:17 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Thu, 8 Apr 2010 18:29:17 +0200 Subject: [Gambas-user] Debugging program to find error In-Reply-To: <1270742698.1985.10.camel@...2406...> References: <1270742698.1985.10.camel@...2406...> Message-ID: <201004081829.17077.gambas@...1...> > Hi > > Continuing with experiments to try to implement a project of Gambas on a > computer that does not have the IDE using the variable GB_DIR. > > The main problem is to debug the project on the computer that Gambas is > not installed because the debugger does not work with the parameters > indicated on the website of Benoit. > > I have tried to solve this by placing the routes where the executable. > Example: > > Edit /etc/environment and added: > > /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/op > t/project/gambas2/bin > > Then run gbc2 -agt and gives me the following: > > /opt/project/ FMain.class: 15: Unknown identifier: Button > > any idea? > > For testing purposes, the project consists of only one form and a > button. > > > Note: > I'm testing this on a Ubuntu 8.04 distribution without Gambas 2 > installed, running through VirtualBox. > > Regards > > [OperatingSystem] > OperatingSystem=Linux > KernelRelease=2.6.28-14-generic > DistributionVendor=ubuntu > DistributionRelease="Ubuntu 9.04" > > [System] > CPUArchitecture=i686 > TotalRam=1026628 kB > > [Gambas] > Gambas1=Not Installed > Gambas2=2.20.2 > Gambas2Path=/usr/local/bin/gbx2 > Gambas3=2.99.0 > Gambas3Path=/usr/local/bin/gbx3 If you want to compile, and debug, you have to install Gambas. What you are doing is step by step creating a script that installs Gambas. You are reinventing the concept of binary package! Why not using them so? -- Beno?t Minisini From les at ...2337... Thu Apr 8 18:04:36 2010 From: les at ...2337... (Les Hardy) Date: Thu, 08 Apr 2010 17:04:36 +0100 Subject: [Gambas-user] Parallel Port In-Reply-To: References: Message-ID: <4BBDFE94.6050002@...2337...> Hi there, I don't have a program to offer you. All my old code is in other languages. I did however write a little working example for you. You will need to use port, not parport0. For some reason that is unknown to me, I too, am unable to get parport to work correctly from gambas. I tested the code below, and it does work. I ran it a few times on a system with Ubuntu 9.04, gambas 2.20, and a little parallel port tester I made 20 years ago. Unless you have already sorted out permission to access 'port', you will need to be root to run it, either start gambas as root, or compile it and then run the executable as root. PUBLIC SUB Main() ' Gambas module file DIM pport AS File DIM bi, bo AS Byte pport = OPEN "/dev/port" FOR READ WRITE FOR bo = 32 TO 122 SEEK #pport, 888 WRITE #pport, bo SEEK #pport, 888 READ #pport, bi PRINT Chr(bi) & " " WAIT 0.05 NEXT CLOSE #pport END Just a quick mention about seek on ports. Seek simply takes you to the port address. Notice I used a seek before each read or write. 888 (0x378): Data 889 (0x379): Status 890 0x37A) : Control Hope this helps Regards Les Hardy Bjorn Macintosh wrote: > Hi all, > > Does anyone have a program that interfaces with the parallel port, one > written in Gambas. If you do would you be willing to share this program > with me as I am trying to write a parallel port interface and am struggling > to get my head around a few concepts. mainly how to write to the port and > how to select pin's base 0 base1 and base2. > > Any help would be greatly appreciated. I sent a post two days ago holding > the full details on my program and what I am trying to do if you need any > clarification. > > Thanks > Bjorn Macintosh > > From gambas at ...1... Thu Apr 8 18:42:39 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Thu, 8 Apr 2010 18:42:39 +0200 Subject: [Gambas-user] Parallel Port In-Reply-To: <4BBDFE94.6050002@...2337...> References: <4BBDFE94.6050002@...2337...> Message-ID: <201004081842.39893.gambas@...1...> > Hi there, I don't have a program to offer you. All my old code is in > other languages. > I did however write a little working example for you. > You will need to use port, not parport0. > For some reason that is unknown to me, I too, am unable to get parport > to work correctly from gambas. > > I tested the code below, and it does work. I ran it a few times on a > system with Ubuntu 9.04, gambas 2.20, and a little parallel port tester > I made 20 years ago. > > Unless you have already sorted out permission to access 'port', you will > need to be root to run it, either start gambas as root, or compile it > and then run the executable as root. > > PUBLIC SUB Main() > ' Gambas module file > DIM pport AS File > DIM bi, bo AS Byte > > pport = OPEN "/dev/port" FOR READ WRITE > > FOR bo = 32 TO 122 > SEEK #pport, 888 > WRITE #pport, bo > SEEK #pport, 888 > READ #pport, bi > PRINT Chr(bi) & " " > WAIT 0.05 > NEXT > CLOSE #pport > > END > > Just a quick mention about seek on ports. > Seek simply takes you to the port address. Notice I used a seek before > each read or write. > > 888 (0x378): Data > 889 (0x379): Status > 890 0x37A) : Control > > > > Hope this helps > Regards > Les Hardy > And you can even look in the Linux kernel source code to see how /dev/port is implemented: a few lines of code in '/usr/src/linux/drivers/char/mem.c'. Regards, -- Beno?t Minisini From prog at ...2177... Thu Apr 8 19:20:35 2010 From: prog at ...2177... (craf) Date: Thu, 08 Apr 2010 13:20:35 -0400 Subject: [Gambas-user] Debugging program to find error In-Reply-To: <201004081829.17077.gambas@...1...> References: <1270742698.1985.10.camel@...2406...> <201004081829.17077.gambas@...1...> Message-ID: <1270747235.1985.21.camel@...2406...> -----Mensaje original----- De: Beno?t Minisini Reply-to: mailing list for gambas users Para: mailing list for gambas users Asunto: Re: [Gambas-user] Debugging program to find error Fecha: Thu, 8 Apr 2010 18:29:17 +0200 > Hi > > Continuing with experiments to try to implement a project of Gambas on a > computer that does not have the IDE using the variable GB_DIR. > > The main problem is to debug the project on the computer that Gambas is > not installed because the debugger does not work with the parameters > indicated on the website of Benoit. > > I have tried to solve this by placing the routes where the executable. > Example: > > Edit /etc/environment and added: > > /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/op > t/project/gambas2/bin > > Then run gbc2 -agt and gives me the following: > > /opt/project/ FMain.class: 15: Unknown identifier: Button > > any idea? > > For testing purposes, the project consists of only one form and a > button. > > > Note: > I'm testing this on a Ubuntu 8.04 distribution without Gambas 2 > installed, running through VirtualBox. > > Regards > > [OperatingSystem] > OperatingSystem=Linux > KernelRelease=2.6.28-14-generic > DistributionVendor=ubuntu > DistributionRelease="Ubuntu 9.04" > > [System] > CPUArchitecture=i686 > TotalRam=1026628 kB > > [Gambas] > Gambas1=Not Installed > Gambas2=2.20.2 > Gambas2Path=/usr/local/bin/gbx2 > Gambas3=2.99.0 > Gambas3Path=/usr/local/bin/gbx3 >If you want to compile, and debug, you have to install Gambas. What you are >doing is step by step creating a script that installs Gambas. You are >reinventing the concept of binary package! Why not using them so? Nooo, I do not reinvent the wheel, I'm not good programmer to do that ;=). I just want to see the possibility of a Gambas project, compiling it and using the variable GB_DIR, take it to another computer without having to download the necessary components to run the application, and be independent if I install it on a distribution 9.10 ,8.10 or 8.04 in Ubuntu (In the first instance).- Please correct me if I understand wrong, but when you generate a deb package and automatically install it on another computer, this request and install the components needed. Now, I imagine that if I want to install a compiled project of Gambas on another computer, without the need to download the packages from the internet, I must use the variable GB_DIR, and pack all the necessary libraries of components, such as gb.draw.so, gb.gtk.so, etc, depending on the components that are described in the file .proyect. Now the problem is that these libraries as I need other necessary shared libraries to run the apliacion, which are different for each distribution. What I want is to carry my application with all dependencies included, either, components and shared libraries. The only problem, that by doing this, the interpreter gbx2 can not find the library libffi.so and that I am trying to solve. I just need to move an entire folder with the interpreter, components and shared libraries to a location, such as / opt / project. Running a file .sh, which is indicated by export routes. Thanks for your time. Regards From fabianfloresvadell at ...626... Thu Apr 8 19:50:13 2010 From: fabianfloresvadell at ...626... (=?ISO-8859-1?Q?Fabi=E1n_Flores_Vadell?=) Date: Thu, 8 Apr 2010 14:50:13 -0300 Subject: [Gambas-user] config dialog box, for a custom control Message-ID: I want to create a config dialog box for a custom control, so that the IDE display a button "..." in the Form Editor ToolBox, like when the property _Properties includes Kind=[Color|Font|Path|...] Is this possible? -- Fabi?n Flores Vadell www.speedbooksargentina.blogspot.com From linuxos at ...1896... Thu Apr 8 21:17:16 2010 From: linuxos at ...1896... (Olivier Cruilles) Date: Thu, 8 Apr 2010 21:17:16 +0200 Subject: [Gambas-user] Usage of Editor object Message-ID: <96D0B428-9D8A-4E8E-9223-35C8F5A9C2EE@...1896...> Hi everybody, I'm working on a new project that use the Editor object. I'm trying to configure the highlight properties and never the event highlight arrive. Does anyone can give me an example or know how to use it please ? I'll build a little editor to convert text file to something like Dokuwiki syntaxe. Not all the syntax, but just to simplify a lot. Thank you in advance. Olivier Cruilles Mail: linuxos at ...1896... From jussi.lahtinen at ...626... Thu Apr 8 21:40:26 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Thu, 8 Apr 2010 22:40:26 +0300 Subject: [Gambas-user] Usage of Editor object In-Reply-To: <96D0B428-9D8A-4E8E-9223-35C8F5A9C2EE@...1896...> References: <96D0B428-9D8A-4E8E-9223-35C8F5A9C2EE@...1896...> Message-ID: Look at Gambas IDE source code. You find related code under FTextEditor.form. Jussi On Thu, Apr 8, 2010 at 22:17, Olivier Cruilles wrote: > Hi everybody, > > I'm working on a new project that use the Editor object. > > I'm trying to configure the highlight properties and never the event highlight arrive. > > Does anyone can give me an example or know how to use it please ? > > I'll build a little editor to convert text file to something like Dokuwiki syntaxe. > Not all the syntax, but just to simplify a lot. > > Thank you in advance. > > > Olivier Cruilles > Mail: linuxos at ...1896... > > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas at ...1... Thu Apr 8 23:13:08 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Thu, 8 Apr 2010 23:13:08 +0200 Subject: [Gambas-user] config dialog box, for a custom control In-Reply-To: References: Message-ID: <201004082313.08902.gambas@...1...> > I want to create a config dialog box for a custom control, so that the > IDE display a button "..." in the Form Editor ToolBox, like when the > property _Properties includes Kind=[Color|Font|Path|...] > > Is this possible? > -- > Fabi?n Flores Vadell > www.speedbooksargentina.blogspot.com > It is not possible, because the IDE does not load any external source code at all. In other words, the special property configuration dialogs code must be inside the IDE. But in the future, it may change, because the interpreter internally can load any gambas executable as a component at runtime. Regards, -- Beno?t Minisini From linuxos at ...1896... Fri Apr 9 00:32:06 2010 From: linuxos at ...1896... (Olivier Cruilles) Date: Fri, 9 Apr 2010 00:32:06 +0200 Subject: [Gambas-user] Usage of Editor object In-Reply-To: References: <96D0B428-9D8A-4E8E-9223-35C8F5A9C2EE@...1896...> Message-ID: <1023BC60-D184-49B2-B2AE-A80D4AEEB374@...1896...> Hi Jussi, Thank's. I'll see inside to understand how it work. Olivier Cruilles Mail: linuxos at ...1896... Le 8 avr. 2010 ? 21:40, Jussi Lahtinen a ?crit : > > Look at Gambas IDE source code. > You find related code under FTextEditor.form. > > Jussi > > > On Thu, Apr 8, 2010 at 22:17, Olivier Cruilles wrote: >> Hi everybody, >> >> I'm working on a new project that use the Editor object. >> >> I'm trying to configure the highlight properties and never the event highlight arrive. >> >> Does anyone can give me an example or know how to use it please ? >> >> I'll build a little editor to convert text file to something like Dokuwiki syntaxe. >> Not all the syntax, but just to simplify a lot. >> >> Thank you in advance. >> >> >> Olivier Cruilles >> Mail: linuxos at ...1896... >> >> >> >> ------------------------------------------------------------------------------ >> Download Intel® Parallel Studio Eval >> Try the new software tools for yourself. Speed compiling, find bugs >> proactively, and fine-tune applications for parallel performance. >> See why Intel Parallel Studio got high marks during beta. >> http://p.sf.net/sfu/intel-sw-dev >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From leandrosansilva at ...626... Fri Apr 9 04:45:15 2010 From: leandrosansilva at ...626... (Leandro Santiago) Date: Thu, 8 Apr 2010 23:45:15 -0300 Subject: [Gambas-user] Where do put translation package for a gambas application (specifically IDE)? Message-ID: Hello to all. I'm continuing the pt_BR translation of Gambas3 IDE, but I'm having a problem. I'm using lokalize (old kbabel) to translate the potfile, but I don't know how "integrate" the translation into gambas IDE. I recreated the .mo file and recompiled gambas3.gambas, but it continues in English lang. The envronment variables (LC_* and LANG) are ok (pt_BR.UTF-8). What is the language structure of a gambas application? Where must I put the .mo file? Something like locale//LC_MESSAGES/ ? Thanks. And sorry my bad English :-) From oceanosoftlapalma at ...626... Sat Apr 10 23:15:04 2010 From: oceanosoftlapalma at ...626... (=?ISO-8859-1?Q?Ricardo_D=EDaz_Mart=EDn?=) Date: Sat, 10 Apr 2010 23:15:04 +0200 Subject: [Gambas-user] using sockets to send binay files Message-ID: Hi, Is there some way to send binary files using gambas sockets? Reading and sending byte per byte is too much slow. I read old post from Benoit about this and I think it's no possible at this time. It's true? Regards, Ricardo D?az From linuxos at ...1896... Sun Apr 11 13:25:04 2010 From: linuxos at ...1896... (Olivier Cruilles) Date: Sun, 11 Apr 2010 13:25:04 +0200 Subject: [Gambas-user] using sockets to send binay files In-Reply-To: References: Message-ID: <8FBC846C-72C3-4D59-BB01-F8AD6832859C@...1896...> Hi, May be this email can help you. --------------------------------------------------------------- On Mon, 1 Dec 2008 06:50:06 am Robert Moss wrote: Robert this may not be much help to you and I'm not sure how related to your problem it is, but just on the off chance. I struggled with saving a picture and retrieving from a postgres field. The code I included worked really well for a long time, but in the last couple of upgrades though it saves the file ok, it retreives a corrupt image. and I get a libpng error (sob sob) and I havn't had time or inclination to re-look at it. Please if/when you figure it out can I have a few pointers. Regards Richard > The ImgData stops writing when it comes to a byte with value &H00 (I > believe) although I'm pretty sure it doesn't matter how I write the stream, > once it's read as a String, it becomes terminated by any NULL char. So my > question is this: How do I read the data from the Socket in binary, write > it to a stream file in binary, but STILL I MUST be able to split the data > based on the 2 CRLF's > > On Sun, Nov 30, 2008 at 11:48 AM, Robert Moss wrote: >> Sorry that's not it, I mis-copied the line, in the actual code it does >> Mid(sData, p1 + 4) >> >> On Sun, Nov 30, 2008 at 2:39 AM, Doriano Blengino < >> >> doriano.blengino at ...1909...> wrote: >>> Robert Moss ha scritto: >>>> I am trying to get an image (or any binary data) downloaded from a >>> >>> website >>> >>>> and into a jpg file. I expect I will need to use the Byte[] datatype, >>> >>> but I >>> >>>> absolutely can NOT use Callbacks when the data comes in this time. >>>> >>>> ... >>>> >>>> DO UNTIL(EOF(#Sock)) >>>> READ #Sock, sBuf, Lof(Sock) >>>> sTotal &= sBuf >>>> LOOP >>>> >>>> CLOSE #Sock >>>> >>>> >>>> p1 = InStr(sTotal, "\r\n\r\n") >>>> >>>> ImgData = Mid(sTotal, p1) >>>> >>>> OPEN "localimg.jpg" FOR OUTPUT CREATE AS #myFile >>>> WRITE #myFile, ImgData, Len(ImgData) >>>> CLOSE #myFile >>> >>> I think there is a problem with InStr(...,"\r\n\r\n"). >>> By taking mid$(...,p1), you retain the two CRLFs, which are not good at >>> the beginning of a jpeg file. >>> You should get rid of the first 4 characters. May be there are still >>> other problems, but this is one for sure. >>> >>> 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 the Moblin Your Move Developer's >>> challenge >>> Build the coolest Linux based applications with Moblin SDK & win great >>> prizes >>> Grand prize is a trip for two to an Open Source event anywhere in the >>> world >>> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >>> _______________________________________________ >>> Gambas-user mailing list >>> Gambas-user at lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/gambas-user > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge Build the coolest Linux based applications with Moblin SDK & win > great prizes Grand prize is a trip for two to an Open Source event anywhere > in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/_______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user Le 10 avr. 2010 ? 23:15, Ricardo D?az Mart?n a ?crit : > > Hi, > > Is there some way to send binary files using gambas sockets? Reading and > sending byte per byte is too much slow. > > I read old post from Benoit about this and I think it's no possible at this > time. It's true? > > Regards, > Ricardo D?az > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > Olivier Cruilles Mail: linuxos at ...1896... From oceanosoftlapalma at ...626... Sun Apr 11 14:22:10 2010 From: oceanosoftlapalma at ...626... (=?ISO-8859-1?Q?Ricardo_D=EDaz_Mart=EDn?=) Date: Sun, 11 Apr 2010 14:22:10 +0200 Subject: [Gambas-user] using sockets to send binay files In-Reply-To: <8FBC846C-72C3-4D59-BB01-F8AD6832859C@...1896...> References: <8FBC846C-72C3-4D59-BB01-F8AD6832859C@...1896...> Message-ID: Thanks Olivier for your reply. I discovered last night binary files can be sent as text files if you "uuencode" on before sending and "uudecode" after files are received. uuencode and uudecode are unix standards commands (they are in Ubuntu repositories and in Mac OX too) The code you put in your mails only works with text files. Regards, Ricardo D?az 2010/4/11 Olivier Cruilles > > Hi, > > May be this email can help you. > > --------------------------------------------------------------- > > > On Mon, 1 Dec 2008 06:50:06 am Robert Moss wrote: > > Robert this may not be much help to you and I'm not sure how related to > your > problem it is, but just on the off chance. I struggled with saving a > picture > and retrieving from a postgres field. > > The code I included worked really well for a long time, but in the last > couple > of upgrades though it saves the file ok, it retreives a corrupt image. and > I > get a libpng error (sob sob) and I havn't had time or inclination to > re-look > at it. > > Please if/when you figure it out can I have a few pointers. > > Regards > > Richard > > > > > The ImgData stops writing when it comes to a byte with value &H00 (I > > believe) although I'm pretty sure it doesn't matter how I write the > stream, > > once it's read as a String, it becomes terminated by any NULL char. So my > > question is this: How do I read the data from the Socket in binary, write > > it to a stream file in binary, but STILL I MUST be able to split the data > > based on the 2 CRLF's > > > > On Sun, Nov 30, 2008 at 11:48 AM, Robert Moss > wrote: > >> Sorry that's not it, I mis-copied the line, in the actual code it does > >> Mid(sData, p1 + 4) > >> > >> On Sun, Nov 30, 2008 at 2:39 AM, Doriano Blengino < > >> > >> doriano.blengino at ...1909...> wrote: > >>> Robert Moss ha scritto: > >>>> I am trying to get an image (or any binary data) downloaded from a > >>> > >>> website > >>> > >>>> and into a jpg file. I expect I will need to use the Byte[] datatype, > >>> > >>> but I > >>> > >>>> absolutely can NOT use Callbacks when the data comes in this time. > >>>> > >>>> ... > >>>> > >>>> DO UNTIL(EOF(#Sock)) > >>>> READ #Sock, sBuf, Lof(Sock) > >>>> sTotal &= sBuf > >>>> LOOP > >>>> > >>>> CLOSE #Sock > >>>> > >>>> > >>>> p1 = InStr(sTotal, "\r\n\r\n") > >>>> > >>>> ImgData = Mid(sTotal, p1) > >>>> > >>>> OPEN "localimg.jpg" FOR OUTPUT CREATE AS #myFile > >>>> WRITE #myFile, ImgData, Len(ImgData) > >>>> CLOSE #myFile > >>> > >>> I think there is a problem with InStr(...,"\r\n\r\n"). > >>> By taking mid$(...,p1), you retain the two CRLFs, which are not good at > >>> the beginning of a jpeg file. > >>> You should get rid of the first 4 characters. May be there are still > >>> other problems, but this is one for sure. > >>> > >>> 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 the Moblin Your Move Developer's > >>> challenge > >>> Build the coolest Linux based applications with Moblin SDK & win great > >>> prizes > >>> Grand prize is a trip for two to an Open Source event anywhere in the > >>> world > >>> http://moblin-contest.org/redirect.php?banner_id=100&url=/ > >>> _______________________________________________ > >>> Gambas-user mailing list > >>> Gambas-user at lists.sourceforge.net > >>> https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > ------------------------------------------------------------------------- > > This SF.Net email is sponsored by the Moblin Your Move Developer's > > challenge Build the coolest Linux based applications with Moblin SDK & > win > > great prizes Grand prize is a trip for two to an Open Source event > anywhere > > in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > > http://moblin-contest.org/redirect.php?banner_id=100&url=/_______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > Le 10 avr. 2010 ? 23:15, Ricardo D?az Mart?n a ?crit : > > > > > Hi, > > > > Is there some way to send binary files using gambas sockets? Reading and > > sending byte per byte is too much slow. > > > > I read old post from Benoit about this and I think it's no possible at > this > > time. It's true? > > > > Regards, > > Ricardo D?az > > > ------------------------------------------------------------------------------ > > Download Intel® Parallel Studio Eval > > Try the new software tools for yourself. Speed compiling, find bugs > > proactively, and fine-tune applications for parallel performance. > > See why Intel Parallel Studio got high marks during beta. > > http://p.sf.net/sfu/intel-sw-dev > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > Olivier Cruilles > Mail: linuxos at ...1896... > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas at ...1... Sun Apr 11 14:46:56 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sun, 11 Apr 2010 14:46:56 +0200 Subject: [Gambas-user] using sockets to send binay files In-Reply-To: References: Message-ID: <201004111446.56097.gambas@...1...> > Hi, > > Is there some way to send binary files using gambas sockets? Reading and > sending byte per byte is too much slow. > > I read old post from Benoit about this and I think it's no possible at this > time. It's true? > > Regards, > Ricardo D?az Use the WRITE or the PRINT instruction. For example: PRINT #MySocket, File.Load("/path/to/myfile"); Don't forget the ";" at the end of the PRINT instruction, otherwise a newline will be added. Regards, -- Beno?t Minisini From gambas at ...1... Sun Apr 11 14:51:46 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sun, 11 Apr 2010 14:51:46 +0200 Subject: [Gambas-user] Where do put translation package for a gambas application (specifically IDE)? In-Reply-To: References: Message-ID: <201004111451.46277.gambas@...1...> > Hello to all. > > I'm continuing the pt_BR translation of Gambas3 IDE, but I'm having a > problem. > > I'm using lokalize (old kbabel) to translate the potfile, but I don't know > how "integrate" the translation into gambas IDE. I recreated the .mo file > and recompiled gambas3.gambas, but it continues in English lang. > > The envronment variables (LC_* and LANG) are ok (pt_BR.UTF-8). > > What is the language structure of a gambas application? Where must I put > the .mo file? Something like locale//LC_MESSAGES/ ? > > Thanks. > > And sorry my bad English :-) You should use the translation dialog of the IDE to translate the IDE. In Gambas 3, you have a tab in this dialog to import a *.po file. The language structure of a gambas application is that: - Every *.po and their *.mo file are stored inside the project ".lang" directory. - When creating an executable, all *.mo files are stored in it, not the *.po file. - When running the program, a standard translation directory is created in /tmp/gambas.//tr//LC_MESSAGES/, and destroyed when the program ends. Regards, -- Beno?t Minisini From gambas at ...1... Sun Apr 11 14:58:18 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sun, 11 Apr 2010 14:58:18 +0200 Subject: [Gambas-user] Debugging program to find error In-Reply-To: <1270747235.1985.21.camel@...2406...> References: <1270742698.1985.10.camel@...2406...> <201004081829.17077.gambas@...1...> <1270747235.1985.21.camel@...2406...> Message-ID: <201004111458.18140.gambas@...1...> > -----Mensaje original----- > De: Beno?t Minisini > Reply-to: mailing list for gambas users > > Para: mailing list for gambas users > Asunto: Re: [Gambas-user] Debugging program to find error > Fecha: Thu, 8 Apr 2010 18:29:17 +0200 > > > Hi > > > > Continuing with experiments to try to implement a project of Gambas on a > > computer that does not have the IDE using the variable GB_DIR. > > > > The main problem is to debug the project on the computer that Gambas is > > not installed because the debugger does not work with the parameters > > indicated on the website of Benoit. > > > > I have tried to solve this by placing the routes where the executable. > > Example: > > > > Edit /etc/environment and added: > > > > /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/ > > op t/project/gambas2/bin > > > > Then run gbc2 -agt and gives me the following: > > > > /opt/project/ FMain.class: 15: Unknown identifier: Button > > > > any idea? > > > > For testing purposes, the project consists of only one form and a > > button. > > > > > > Note: > > I'm testing this on a Ubuntu 8.04 distribution without Gambas 2 > > installed, running through VirtualBox. > > > > Regards > > > > [OperatingSystem] > > OperatingSystem=Linux > > KernelRelease=2.6.28-14-generic > > DistributionVendor=ubuntu > > DistributionRelease="Ubuntu 9.04" > > > > [System] > > CPUArchitecture=i686 > > TotalRam=1026628 kB > > > > [Gambas] > > Gambas1=Not Installed > > Gambas2=2.20.2 > > Gambas2Path=/usr/local/bin/gbx2 > > Gambas3=2.99.0 > > Gambas3Path=/usr/local/bin/gbx3 > > > >If you want to compile, and debug, you have to install Gambas. What you > >are doing is step by step creating a script that installs Gambas. You are > >reinventing the concept of binary package! Why not using them so? > > Nooo, I do not reinvent the wheel, I'm not good programmer to do that ;=). > > I just want to see the possibility of a Gambas project, compiling it and > using the variable GB_DIR, take it to another computer without having to > download the necessary components to run the application, and be > independent if I install it on a distribution 9.10 ,8.10 or 8.04 in > Ubuntu (In the first instance).- > Please correct me if I understand wrong, but when you generate a deb > package and automatically install it on another computer, this request > and install the components needed. Now, I imagine that if I want to > install a compiled project of Gambas on another computer, without the > need to download the packages from the internet, I must use the variable > GB_DIR, and pack all the necessary libraries of components, such as > gb.draw.so, gb.gtk.so, etc, depending on the components that are > described in the file .proyect. > Now the problem is that these libraries as I need other necessary shared > libraries to run the apliacion, which are different for each > distribution. > What I want is to carry my application with all dependencies included, > either, components and shared libraries. The only problem, that by doing > this, the interpreter gbx2 can not find the library libffi.so and that I > am trying to solve. > I just need to move an entire folder with the interpreter, components > and shared libraries to a location, such as / opt / project. Running a > file .sh, which is indicated by export routes. > > Thanks for your time. > > Regards > OK, I see. You have to reinventing the wheel, because your target systems do not have an Internet access. :-) Anyway, if libffi.so is missing, why not just added it to your package? And if you want to use the compiler, you must install all the *.info and *.list files associated with the components. Regards, -- Beno?t Minisini From chrisken0 at ...626... Sun Apr 11 16:25:23 2010 From: chrisken0 at ...626... (chrisken) Date: Sun, 11 Apr 2010 07:25:23 -0700 (PDT) Subject: [Gambas-user] Help with a Gambas version of VB registry settings functions? Message-ID: <28208990.post@...1379...> Hi, everybody. I've been thinking for a while that I'd like to come up with a gambas equivalent for the useful 'registry settings' functions included in visual basic 6 - obviously they couldn't use the registry in the same way, since that doesn't really exist in Linux, but the need for a simple way of saving and reloading the last known state of my programs and other simple details is something that does carry over. The most important routines to me, are: SaveSetting (appname, section, key, value) - saves the given value, filed by appname, section, and key GetSetting (appname, section, key, optional defaultvalue) - returns the previous value saved for the given appname, section, and key. If no previous value is found, returns defaultvalue if it is supplied, or else an empty string. GetAllSettings (which returns a two-dimensional array of all keys and values for a given appname and section) and DeleteSetting (which clears out the previous value for an appname/section/key) would be useful too, but not critical. So - any suggestions for how best to handle this? I've been wondering about the storage medium - if I can actually dynamically write .ini type files, or if it would be easier to handle this in a sqlite database format. Also, I'm not sure about where to put the files so that they'd be found no matter what gambas program is accessing them, (is there a way to find out what the user's home directory path is called?) and if I go with sqlite, I'd need a way to test to see if my table is already in the sqlite file or not. Sorry for the rambling-ness. Any replies would be appreciated. -- View this message in context: http://old.nabble.com/Help-with-a-Gambas-version-of-VB-registry-settings-functions--tp28208990p28208990.html Sent from the gambas-user mailing list archive at Nabble.com. From gambas at ...1... Sun Apr 11 16:39:22 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sun, 11 Apr 2010 16:39:22 +0200 Subject: [Gambas-user] Help with a Gambas version of VB registry settings functions? In-Reply-To: <28208990.post@...1379...> References: <28208990.post@...1379...> Message-ID: <201004111639.22599.gambas@...1...> > Hi, everybody. I've been thinking for a while that I'd like to come up with > a gambas equivalent for the useful 'registry settings' functions included > in visual basic 6 - obviously they couldn't use the registry in the same > way, since that doesn't really exist in Linux, but the need for a simple > way of saving and reloading the last known state of my programs and other > simple details is something that does carry over. The most important > routines to me, are: > > SaveSetting (appname, section, key, value) - saves the given value, filed > by appname, section, and key > GetSetting (appname, section, key, optional defaultvalue) - returns the > previous value saved for the given appname, section, and key. If no > previous value is found, returns defaultvalue if it is supplied, or else > an empty string. > > GetAllSettings (which returns a two-dimensional array of all keys and > values for a given appname and section) and DeleteSetting (which clears > out the previous value for an appname/section/key) would be useful too, > but not critical. > > So - any suggestions for how best to handle this? I've been wondering about > the storage medium - if I can actually dynamically write .ini type files, > or if it would be easier to handle this in a sqlite database format. Also, > I'm not sure about where to put the files so that they'd be found no > matter what gambas program is accessing them, (is there a way to find out > what the user's home directory path is called?) and if I go with sqlite, > I'd need a way to test to see if my table is already in the sqlite file or > not. > > Sorry for the rambling-ness. Any replies would be appreciated. Did you notice the "gb.settings" component? -- Beno?t Minisini From chrisken0 at ...626... Sun Apr 11 16:59:43 2010 From: chrisken0 at ...626... (chrisken) Date: Sun, 11 Apr 2010 07:59:43 -0700 (PDT) Subject: [Gambas-user] Help with a Gambas version of VB registry settings functions? In-Reply-To: <201004111639.22599.gambas@...1...> References: <28208990.post@...1379...> <201004111639.22599.gambas@...1...> Message-ID: <28209276.post@...1379...> No, I didn't - I did look for something similar that was built-in, especially on the 'Differences from Visual Basic' page - but then, I guess you can't list everything there. Thanks muchly for the tip! Beno?t Minisini wrote: > > > Did you notice the "gb.settings" component? > > -- > Beno?t Minisini > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > -- View this message in context: http://old.nabble.com/Help-with-a-Gambas-version-of-VB-registry-settings-functions--tp28208990p28209276.html Sent from the gambas-user mailing list archive at Nabble.com. From leandrosansilva at ...626... Sun Apr 11 18:41:51 2010 From: leandrosansilva at ...626... (Leandro Santiago) Date: Sun, 11 Apr 2010 13:41:51 -0300 Subject: [Gambas-user] Where do put translation package for a gambas application (specifically IDE)? In-Reply-To: <201004111451.46277.gambas@...1...> References: <201004111451.46277.gambas@...1...> Message-ID: Ok. Now I'm doing it. I'm using translation dialog. I opened IDE project into gambas IDE. I translated my lang file and created the .gambas executable. I saw the /tmp/gambas structure and the lang file is there, but the program is yet in English. Until here everything is OK. But even in other languages as default (properties dialog) (like French, fully translated), the program is yet in English. What am I doing wrong? I'm using gambas 3 rev. 2870 in Ubuntu 9.10. 2010/4/11 Beno?t Minisini > > Hello to all. > > > > I'm continuing the pt_BR translation of Gambas3 IDE, but I'm having a > > problem. > > > > I'm using lokalize (old kbabel) to translate the potfile, but I don't > know > > how "integrate" the translation into gambas IDE. I recreated the .mo file > > and recompiled gambas3.gambas, but it continues in English lang. > > > > The envronment variables (LC_* and LANG) are ok (pt_BR.UTF-8). > > > > What is the language structure of a gambas application? Where must I put > > the .mo file? Something like locale//LC_MESSAGES/ ? > > > > Thanks. > > > > And sorry my bad English :-) > > You should use the translation dialog of the IDE to translate the IDE. In > Gambas 3, you have a tab in this dialog to import a *.po file. > > The language structure of a gambas application is that: > > - Every *.po and their *.mo file are stored inside the project ".lang" > directory. > > - When creating an executable, all *.mo files are stored in it, not the > *.po > file. > > - When running the program, a standard translation directory is created in > /tmp/gambas.//tr//LC_MESSAGES/, and destroyed when > the program ends. > > Regards, > > -- > Beno?t Minisini > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From razeghi71 at ...626... Sun Apr 11 19:25:36 2010 From: razeghi71 at ...626... (Mohammad Razeghi) Date: Sun, 11 Apr 2010 21:55:36 +0430 Subject: [Gambas-user] htonl equal Message-ID: Hi I am looking for c++ htonl function equal in gambas can any one help please ? Thanks ... From gambas at ...1... Sun Apr 11 20:26:41 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sun, 11 Apr 2010 20:26:41 +0200 Subject: [Gambas-user] Where do put translation package for a gambas application (specifically IDE)? In-Reply-To: References: <201004111451.46277.gambas@...1...> Message-ID: <201004112026.41498.gambas@...1...> > Ok. Now I'm doing it. I'm using translation dialog. > > I opened IDE project into gambas IDE. > > I translated my lang file and created the .gambas executable. I saw the > /tmp/gambas structure and the lang file is there, but the program is yet in > English. Until here everything is OK. > > But even in other languages as default (properties dialog) (like French, > fully translated), the program is yet in English. What am I doing wrong? > > I'm using gambas 3 rev. 2870 in Ubuntu 9.10. > If you run it from the IDE after having translated it, it is yet in English? If so, do you have a warning message in the console about a missing locale? If you don't, can you tell what are the values of the following environment variables: LANG, LANGUAGE, LC_ALL and LC_MESSAGES? -- Beno?t Minisini From prog at ...2177... Mon Apr 12 01:26:29 2010 From: prog at ...2177... (craf) Date: Sun, 11 Apr 2010 19:26:29 -0400 Subject: [Gambas-user] Debugging program to find error In-Reply-To: <201004111458.18140.gambas@...1...> References: <1270742698.1985.10.camel@...2406...> <201004081829.17077.gambas@...1...> <1270747235.1985.21.camel@...2406...> <201004111458.18140.gambas@...1...> Message-ID: <1271028389.1978.4.camel@...2406...> -----Mensaje original----- De: Beno?t Minisini Reply-to: mailing list for gambas users Para: mailing list for gambas users Asunto: Re: [Gambas-user] Debugging program to find error Fecha: Sun, 11 Apr 2010 14:58:18 +0200 > -----Mensaje original----- > De: Beno?t Minisini > Reply-to: mailing list for gambas users > > Para: mailing list for gambas users > Asunto: Re: [Gambas-user] Debugging program to find error > Fecha: Thu, 8 Apr 2010 18:29:17 +0200 > > > Hi > > > > Continuing with experiments to try to implement a project of Gambas on a > > computer that does not have the IDE using the variable GB_DIR. > > > > The main problem is to debug the project on the computer that Gambas is > > not installed because the debugger does not work with the parameters > > indicated on the website of Benoit. > > > > I have tried to solve this by placing the routes where the executable. > > Example: > > > > Edit /etc/environment and added: > > > > /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/ > > op t/project/gambas2/bin > > > > Then run gbc2 -agt and gives me the following: > > > > /opt/project/ FMain.class: 15: Unknown identifier: Button > > > > any idea? > > > > For testing purposes, the project consists of only one form and a > > button. > > > > > > Note: > > I'm testing this on a Ubuntu 8.04 distribution without Gambas 2 > > installed, running through VirtualBox. > > > > Regards > > > > [OperatingSystem] > > OperatingSystem=Linux > > KernelRelease=2.6.28-14-generic > > DistributionVendor=ubuntu > > DistributionRelease="Ubuntu 9.04" > > > > [System] > > CPUArchitecture=i686 > > TotalRam=1026628 kB > > > > [Gambas] > > Gambas1=Not Installed > > Gambas2=2.20.2 > > Gambas2Path=/usr/local/bin/gbx2 > > Gambas3=2.99.0 > > Gambas3Path=/usr/local/bin/gbx3 > > > >If you want to compile, and debug, you have to install Gambas. What you > >are doing is step by step creating a script that installs Gambas. You are > >reinventing the concept of binary package! Why not using them so? > > Nooo, I do not reinvent the wheel, I'm not good programmer to do that ;=). > > I just want to see the possibility of a Gambas project, compiling it and > using the variable GB_DIR, take it to another computer without having to > download the necessary components to run the application, and be > independent if I install it on a distribution 9.10 ,8.10 or 8.04 in > Ubuntu (In the first instance).- > Please correct me if I understand wrong, but when you generate a deb > package and automatically install it on another computer, this request > and install the components needed. Now, I imagine that if I want to > install a compiled project of Gambas on another computer, without the > need to download the packages from the internet, I must use the variable > GB_DIR, and pack all the necessary libraries of components, such as > gb.draw.so, gb.gtk.so, etc, depending on the components that are > described in the file .proyect. > Now the problem is that these libraries as I need other necessary shared > libraries to run the apliacion, which are different for each > distribution. > What I want is to carry my application with all dependencies included, > either, components and shared libraries. The only problem, that by doing > this, the interpreter gbx2 can not find the library libffi.so and that I > am trying to solve. > I just need to move an entire folder with the interpreter, components > and shared libraries to a location, such as / opt / project. Running a > file .sh, which is indicated by export routes. > > Thanks for your time. > > Regards > >OK, I see. You have to reinventing the wheel, because your target systems do >not have an Internet access. :-) >Anyway, if libffi.so is missing, why not just added it to your package? >And if you want to use the compiler, you must install all the *.info and >*.list files associated with the components. >Regards, >-- >Beno?t Minisini Hello. I see that I can not explain it yet. :=) add email sent by you: Beno?t Minisini write: With the revision #2401, you can define a GB_DIR environment variable that points at the Gambas installation directory. With that, you should be able to run Gambas from your USB key, provided that the destination O.S. has all the needed shared libraries installed. You can put all the needed shared libraries on the USB key too, and run Gambas completely, by using the LD_LIBRARY_PATH environment variable. > Regards you must: 0) Run ldd on the *.so files of all gambas components used by your application to make a list of needed shared libraries. Don't forget to run ldd on the interpreter. 1) Put all detected shared libraries in a folder. Let's name it "/my/ld/dir" 2) Copy a gambas installation directory in another folder. Let's name it "/my/gambas/dir". 3) Create a script like that: #!/bin/sh export LD_LIBRARY_PATH=/my/ld/dir:$LD_LIBRARY_PATH export GB_DIR=/my/gambas/dir exec /my/application.gambas This is just the principle. To make that cleanly, you must detect the current directory in your script, and build /my/ld/dir and /my/gambas/dir absolute paths from path relative to the current directory. You should check that the running system has the good architecture too. If somebody succeeds in doing that, please tell. A good guy would be able to even create a wizard for the IDE that would do the job automatically. I don't have the time for that at the moment! Regards, -- Beno?t Minisini That's what I'm trying to do, a ?Wizzard to do the job automatically!. I appreciate your understanding: Regards. ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From gambas at ...1... Mon Apr 12 01:35:43 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 12 Apr 2010 01:35:43 +0200 Subject: [Gambas-user] Debugging program to find error In-Reply-To: <1271028389.1978.4.camel@...2406...> References: <1270742698.1985.10.camel@...2406...> <201004111458.18140.gambas@...1...> <1271028389.1978.4.camel@...2406...> Message-ID: <201004120135.43724.gambas@...1...> > Hello. > > > I see that I can not explain it yet. :=) > > [...] > > That's what I'm trying to do, a ?Wizzard to do the job automatically!. > > I appreciate your understanding: > > Regards. > I understand. :-) But, if libffi.so.* are missing, why don't you provide them with your package? -- Beno?t Minisini From prog at ...2177... Mon Apr 12 04:05:26 2010 From: prog at ...2177... (craf) Date: Sun, 11 Apr 2010 22:05:26 -0400 Subject: [Gambas-user] Debugging program to find error In-Reply-To: <201004120135.43724.gambas@...1...> References: <1270742698.1985.10.camel@...2406...> <201004111458.18140.gambas@...1...> <1271028389.1978.4.camel@...2406...> <201004120135.43724.gambas@...1...> Message-ID: <1271037926.1966.32.camel@...2406...> -----Mensaje original----- De: Beno?t Minisini Reply-to: mailing list for gambas users Para: mailing list for gambas users Asunto: Re: [Gambas-user] Debugging program to find error Fecha: Mon, 12 Apr 2010 01:35:43 +0200 > Hello. > > > I see that I can not explain it yet. :=) > > [...] > > That's what I'm trying to do, a ?Wizzard to do the job automatically!. > > I appreciate your understanding: > > Regards. > >I understand. :-) >But, if libffi.so.* are missing, why don't you provide them with your package? >-- >Beno?t Minisini Hi Benoit I appreciate your patience The problem of the interpreter gbx2 not find libffi library (gbr2: error while loading shared libraries: libffi.so.5: cannot open shared object file: No such file or directory ), is that the routes included in the file .sh are not taken into account. To fix this I added the following paths to the file .profile (The tests carried out from a project created in gambas2.20 in Ubuntu 9.10 to Ubuntu 8.04 distribution located on the same computer and runs through Virtualbox. #!/bin/sh export PATH=/path/my/proyect/gambas2/bin export LD_LIBRARY_PATH=/path/my/proyect/gambas2/lib_shared/lib:/path/my/proyect/gambas2/lib_shared/usr/lib You see I have to load the variable LD_LIBRARY_PATH when the user start a session, as this is ignored if the file is called from . sh Doriano kindly indicated that this was due to the following: "Read carefully read the documentation about ld.so (8). That if the states It program is a setuid / setgid one, the PATH variable .. LD_ is ignored." Actually, not like seeing if the file has this feature. Now if you log off and go again, Ubuntu throws error. This is because as directed on the path to the shared libraries, is not the path for those that come with Ubuntu 8.04 distribution. To fix this I add them to the path of LD_LIBARRY_PATH: #!/bin/sh export PATH=/path/my/proyect/gambas2/bin export LD_LIBRARY_PATH=/path/my/proyect/gambas2/lib_shared/lib:/path/my/proyect/gambas2/lib_shared/usr/lib:/lib:/usr/lib:/usr/local/lib This solves the problem, but to run the file .sh, which now gives the error is about GTK not find the libraries: The GB_DIR variable in this case is not taken into account: Summing up the problems: 1) The LD_LIBRARY_PATH variable is not taken into account when running the file. sh. 2) The GB_DIR variable is not taken into account. I send back the routes of the project. Sorry so long $ Tree opt my_project/ |-- gambas2 | |-- bin | | |-- gbr2 | | `-- gbx2 | |-- lib | | `-- gambas2 | | |-- gb.draw.la | | |-- gb.draw.so | | |-- gb.draw.so.0 | | |-- gb.draw.so.0.0.0 | | |-- gb.form.component | | |-- gb.form.gambas | | |-- gb.gtk.component | | |-- gb.gtk.ext.component | | |-- gb.gtk.ext.la | | |-- gb.gtk.ext.so | | |-- gb.gtk.ext.so.0 | | |-- gb.gtk.ext.so.0.0.0 | | |-- gb.gtk.gambas | | |-- gb.gtk.la | | |-- gb.gtk.so | | |-- gb.gtk.so.0 | | |-- gb.gtk.so.0.0.0 | | |-- gb.so | | |-- gb.so.0 | | `-- gb.so.0.0.0 | `-- library_shared | |-- lib | | |-- ld-2.9.so | | |-- ld-linux.so.2 | | |-- libgcc_s.so.1 | | |-- libpcre.so.3 | | |-- libpcre.so.3.12.1 | | |-- libselinux.so.1 | | |-- libz.so.1 | | |-- libz.so.1.2.3.3 | | `-- tls | | `-- i686 | | `-- cmov | | |-- libc-2.9.so | | |-- libc.so.6 | | |-- libdl-2.9.so | | |-- libdl.so.2 | | |-- libm-2.9.so | | |-- libm.so.6 | | |-- libpthread-2.9.so | | `-- libpthread.so.0 | `-- usr | `-- lib | |-- libX11.so.6 | |-- libX11.so.6.2.0 | |-- libXau.so.6 | |-- libXau.so.6.0.0 | |-- libXcomposite.so.1 | |-- libXcomposite.so.1.0.0 | |-- libXcursor.so.1 | |-- libXcursor.so.1.0.2 | |-- libXdamage.so.1 | |-- libXdamage.so.1.1.0 | |-- libXdmcp.so.6 | |-- libXdmcp.so.6.0.0 | |-- libXext.so.6 | |-- libXext.so.6.4.0 | |-- libXfixes.so.3 | |-- libXfixes.so.3.1.0 | |-- libXi.so.6 | |-- libXi.so.6.0.0 | |-- libXinerama.so.1 | |-- libXinerama.so.1.0.0 | |-- libXrandr.so.2 | |-- libXrandr.so.2.2.0 | |-- libXrender.so.1 | |-- libXrender.so.1.3.0 | |-- libatk-1.0.so.0 | |-- libatk-1.0.so.0.2609.1 | |-- libcairo.so.2 | |-- libcairo.so.2.10800.6 | |-- libdirect-1.0.so.0 | |-- libdirect-1.0.so.0.1.0 | |-- libdirectfb-1.0.so.0 | |-- libdirectfb-1.0.so.0.1.0 | |-- libexpat.so.1 | |-- libexpat.so.1.5.2 | |-- libffi.so.5 | |-- libffi.so.5.0.8 | |-- libfontconfig.so.1 | |-- libfontconfig.so.1.3.0 | |-- libfreetype.so.6 | |-- libfreetype.so.6.3.20 | |-- libfusion-1.0.so.0 | |-- libfusion-1.0.so.0.1.0 | |-- libgdk-x11-2.0.so.0 | |-- libgdk-x11-2.0.so.0.1600.1 | |-- libgdk_pixbuf-2.0.so.0 | |-- libgdk_pixbuf-2.0.so.0.1600.1 | |-- libgio-2.0.so.0 | |-- libgio-2.0.so.0.2000.1 | |-- libglib-2.0.so.0 | |-- libglib-2.0.so.0.2000.1 | |-- libgmodule-2.0.so.0 | |-- libgmodule-2.0.so.0.2000.1 | |-- libgobject-2.0.so.0 | |-- libgobject-2.0.so.0.2000.1 | |-- libgtk-x11-2.0.so.0 | |-- libgtk-x11-2.0.so.0.1600.1 | |-- libpango-1.0.so.0 | |-- libpango-1.0.so.0.2400.1 | |-- libpangocairo-1.0.so.0 | |-- libpangocairo-1.0.so.0.2400.1 | |-- libpangoft2-1.0.so.0 | |-- libpangoft2-1.0.so.0.2400.1 | |-- libpixman-1.so.0 | |-- libpixman-1.so.0.13.2 | |-- libpng12.so.0 | |-- libpng12.so.0.27.0 | |-- libstdc++.so.6 | |-- libstdc++.so.6.0.10 | |-- libxcb-render-util.so.0 | |-- libxcb-render-util.so.0.0.0 | |-- libxcb-render.so.0 | |-- libxcb-render.so.0.0.0 | |-- libxcb.so.1 | |-- libxcb.so.1.1.0 | |-- libz.so.1 | `-- libz.so.1.2.3.3 `-- my_project.gambas Is it possible to make this installer, or am I wrong in the concept? I would be grateful if you could give me some step to keep trying, and to collaborate with this project installer Gambas. Regards From gambas at ...1... Mon Apr 12 04:19:04 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 12 Apr 2010 04:19:04 +0200 Subject: [Gambas-user] Debugging program to find error In-Reply-To: <1271037926.1966.32.camel@...2406...> References: <1270742698.1985.10.camel@...2406...> <201004120135.43724.gambas@...1...> <1271037926.1966.32.camel@...2406...> Message-ID: <201004120419.04438.gambas@...1...> > -----Mensaje original----- > De: Beno?t Minisini > Reply-to: mailing list for gambas users > > Para: mailing list for gambas users > Asunto: Re: [Gambas-user] Debugging program to find error > Fecha: Mon, 12 Apr 2010 01:35:43 +0200 > > > Hello. > > > > > > I see that I can not explain it yet. :=) > > > > [...] > > > > That's what I'm trying to do, a ?Wizzard to do the job automatically!. > > > > I appreciate your understanding: > > > > Regards. > > > >I understand. :-) > > > >But, if libffi.so.* are missing, why don't you provide them with your > >package? > > Hi Benoit > > I appreciate your patience > > The problem of the interpreter gbx2 not find libffi library (gbr2: error > while loading shared libraries: libffi.so.5: cannot open shared object > file: No such file or directory > ), is that the routes included in the file .sh are not taken into > account. To fix this I added the following paths to the file .profile > (The tests carried out from a project created in gambas2.20 in Ubuntu > 9.10 to Ubuntu 8.04 distribution located on the same computer and runs > through Virtualbox. > > #!/bin/sh > export PATH=/path/my/proyect/gambas2/bin > export > LD_LIBRARY_PATH=/path/my/proyect/gambas2/lib_shared/lib:/path/my/proyect/ga > mbas2/lib_shared/usr/lib > > You see I have to load the variable LD_LIBRARY_PATH when the user start > a session, as this is ignored if the file is called from . sh > > Doriano kindly indicated that this was due to the following: > > "Read carefully read the documentation about ld.so (8). That if the > states It > program is a setuid / setgid one, the PATH variable .. LD_ is ignored." > > Actually, not like seeing if the file has this feature. > > Now if you log off and go again, Ubuntu throws error. This is because as > directed on the path to the shared libraries, is not the path for those > that come with Ubuntu 8.04 distribution. To fix this I add them to the > path of LD_LIBARRY_PATH: > > #!/bin/sh > export PATH=/path/my/proyect/gambas2/bin > export > LD_LIBRARY_PATH=/path/my/proyect/gambas2/lib_shared/lib:/path/my/proyect/ga > mbas2/lib_shared/usr/lib:/lib:/usr/lib:/usr/local/lib > > This solves the problem, but to run the file .sh, which now gives the > error is about GTK not find the libraries: > > The GB_DIR variable in this case is not taken into account: > > Summing up the problems: > > 1) The LD_LIBRARY_PATH variable is not taken into account when running > the file. sh. > 2) The GB_DIR variable is not taken into account. > > > I send back the routes of the project. Sorry so long > > $ Tree opt > > my_project/ > > |-- gambas2 > | > | |-- bin > | | > | | |-- gbr2 > | | > | | `-- gbx2 > | | > | |-- lib > | | > | | `-- gambas2 > | | > | | |-- gb.draw.la > | | |-- gb.draw.so > | | |-- gb.draw.so.0 > | | |-- gb.draw.so.0.0.0 > | | |-- gb.form.component > | | |-- gb.form.gambas > | | |-- gb.gtk.component > | | |-- gb.gtk.ext.component > | | |-- gb.gtk.ext.la > | | |-- gb.gtk.ext.so > | | |-- gb.gtk.ext.so.0 > | | |-- gb.gtk.ext.so.0.0.0 > | | |-- gb.gtk.gambas > | | |-- gb.gtk.la > | | |-- gb.gtk.so > | | |-- gb.gtk.so.0 > | | |-- gb.gtk.so.0.0.0 > | | |-- gb.so > | | |-- gb.so.0 > | | > | | `-- gb.so.0.0.0 > | > | `-- library_shared > | > | |-- lib > | | > | | |-- ld-2.9.so > | | |-- ld-linux.so.2 > | | |-- libgcc_s.so.1 > | | |-- libpcre.so.3 > | | |-- libpcre.so.3.12.1 > | | |-- libselinux.so.1 > | | |-- libz.so.1 > | | |-- libz.so.1.2.3.3 > | | > | | `-- tls > | | > | | `-- i686 > | | > | | `-- cmov > | | > | | |-- libc-2.9.so > | | |-- libc.so.6 > | | |-- libdl-2.9.so > | | |-- libdl.so.2 > | | |-- libm-2.9.so > | | |-- libm.so.6 > | | |-- libpthread-2.9.so > | | > | | `-- libpthread.so.0 > | > | `-- usr > | > | `-- lib > | > | |-- libX11.so.6 > | |-- libX11.so.6.2.0 > | |-- libXau.so.6 > | |-- libXau.so.6.0.0 > | |-- libXcomposite.so.1 > | |-- libXcomposite.so.1.0.0 > | |-- libXcursor.so.1 > | |-- libXcursor.so.1.0.2 > | |-- libXdamage.so.1 > | |-- libXdamage.so.1.1.0 > | |-- libXdmcp.so.6 > | |-- libXdmcp.so.6.0.0 > | |-- libXext.so.6 > | |-- libXext.so.6.4.0 > | |-- libXfixes.so.3 > | |-- libXfixes.so.3.1.0 > | |-- libXi.so.6 > | |-- libXi.so.6.0.0 > | |-- libXinerama.so.1 > | |-- libXinerama.so.1.0.0 > | |-- libXrandr.so.2 > | |-- libXrandr.so.2.2.0 > | |-- libXrender.so.1 > | |-- libXrender.so.1.3.0 > | |-- libatk-1.0.so.0 > | |-- libatk-1.0.so.0.2609.1 > | |-- libcairo.so.2 > | |-- libcairo.so.2.10800.6 > | |-- libdirect-1.0.so.0 > | |-- libdirect-1.0.so.0.1.0 > | |-- libdirectfb-1.0.so.0 > | |-- libdirectfb-1.0.so.0.1.0 > | |-- libexpat.so.1 > | |-- libexpat.so.1.5.2 > | |-- libffi.so.5 > | |-- libffi.so.5.0.8 > | |-- libfontconfig.so.1 > | |-- libfontconfig.so.1.3.0 > | |-- libfreetype.so.6 > | |-- libfreetype.so.6.3.20 > | |-- libfusion-1.0.so.0 > | |-- libfusion-1.0.so.0.1.0 > | |-- libgdk-x11-2.0.so.0 > | |-- libgdk-x11-2.0.so.0.1600.1 > | |-- libgdk_pixbuf-2.0.so.0 > | |-- libgdk_pixbuf-2.0.so.0.1600.1 > | |-- libgio-2.0.so.0 > | |-- libgio-2.0.so.0.2000.1 > | |-- libglib-2.0.so.0 > | |-- libglib-2.0.so.0.2000.1 > | |-- libgmodule-2.0.so.0 > | |-- libgmodule-2.0.so.0.2000.1 > | |-- libgobject-2.0.so.0 > | |-- libgobject-2.0.so.0.2000.1 > | |-- libgtk-x11-2.0.so.0 > | |-- libgtk-x11-2.0.so.0.1600.1 > | |-- libpango-1.0.so.0 > | |-- libpango-1.0.so.0.2400.1 > | |-- libpangocairo-1.0.so.0 > | |-- libpangocairo-1.0.so.0.2400.1 > | |-- libpangoft2-1.0.so.0 > | |-- libpangoft2-1.0.so.0.2400.1 > | |-- libpixman-1.so.0 > | |-- libpixman-1.so.0.13.2 > | |-- libpng12.so.0 > | |-- libpng12.so.0.27.0 > | |-- libstdc++.so.6 > | |-- libstdc++.so.6.0.10 > | |-- libxcb-render-util.so.0 > | |-- libxcb-render-util.so.0.0.0 > | |-- libxcb-render.so.0 > | |-- libxcb-render.so.0.0.0 > | |-- libxcb.so.1 > | |-- libxcb.so.1.1.0 > | |-- libz.so.1 > | > | `-- libz.so.1.2.3.3 > > `-- my_project.gambas > > > Is it possible to make this installer, or am I wrong in the concept? > I would be grateful if you could give me some step to keep trying, and > to collaborate with this project installer Gambas. > > Regards > > Can you make an archive of your package and put it somewhere I can download it? I will test it on my Mandriva and see what happens exactly. Regards, -- Beno?t Minisini From ronstk at ...239... Mon Apr 12 06:50:53 2010 From: ronstk at ...239... (Ron_1st) Date: Mon, 12 Apr 2010 05:50:53 +0100 Subject: [Gambas-user] Debugging program to find error In-Reply-To: <1271037926.1966.32.camel@...2406...> References: <1270742698.1985.10.camel@...2406...> <201004120135.43724.gambas@...1...> <1271037926.1966.32.camel@...2406...> Message-ID: <201004120650.53796.ronstk@...239...> On Monday 12 April 2010, craf wrote: > file: No such file or directory > ), is that the routes included in the file .sh are not taken into > account. To fix this I added the following paths to the file .profile > (The tests carried out from a project created in gambas2.20 in Ubuntu > 9.10 to Ubuntu 8.04 distribution located on the same computer and runs > through Virtualbox. > > #!/bin/sh > export PATH=/path/my/proyect/gambas2/bin > export > LD_LIBRARY_PATH=/path/my/proyect/gambas2/lib_shared/lib:/path/my/proyect/gambas2/lib_shared/usr/lib > From les at ...2337... Mon Apr 12 09:51:47 2010 From: les at ...2337... (Les Hardy) Date: Mon, 12 Apr 2010 08:51:47 +0100 Subject: [Gambas-user] htonl equal In-Reply-To: References: Message-ID: <4BC2D113.2000305@...2337...> I guess *gb.BigEndian* and *gb.LittleEndian* are what you are looking for. *System.ByteOrder* will return the endianness of the operating system. Regards Les Hardy Mohammad Razeghi wrote: > Hi > > I am looking for c++ htonl function equal in gambas can any one help please > ? > > Thanks ... > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > From theo at ...2411... Mon Apr 12 10:34:28 2010 From: theo at ...2411... (Theo Kraai) Date: Mon, 12 Apr 2010 10:34:28 +0200 Subject: [Gambas-user] Gambas on Synolgy DS-209+II Message-ID: <1271061268.2215.140.camel@...2412...> Hi, I'm trying to install gambas on my Synology DS-209+II NAS. So far bad luck. I'm not very experienced in Linux, so it might me my shortcoming ... This is what I did: 1. installed IPKG 2. installed Synology development software (ipkg install optware-devel). See logging: Installing optware-devel (6.8-10) to root... Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/optware-devel_6.8-10_powerpc.ipk package apr-util suggests installing sqlite package apr-util suggests installing openldap-libs package tar suggests installing bzip2 package tar suggests installing gzip package tar suggests installing xz-utils Installing autoconf (2.63-1) to root... Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/autoconf_2.63-1_powerpc.ipk Installing make (3.81-2) to root... Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/make_3.81-2_powerpc.ipk Installing m4 (1.4.14-1) to root... Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/m4_1.4.14-1_powerpc.ipk Installing automake (1.10-2) to root... Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/automake_1.10-2_powerpc.ipk Installing bash (3.2.49-1) to root... Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/bash_3.2.49-1_powerpc.ipk Installing readline (6.1-2) to root... Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/readline_6.1-2_powerpc.ipk Installing ncurses (5.7-1) to root... Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/ncurses_5.7-1_powerpc.ipk Installing bison (2.4.1-1) to root... Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/bison_2.4.1-1_powerpc.ipk Installing bzip2 (1.0.5-2) to root... Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/bzip2_1.0.5-2_powerpc.ipk Installing coreutils (8.4-1) to root... Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/coreutils_8.4-1_powerpc.ipk Installing diffutils (2.9-1) to root... Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/diffutils_2.9-1_powerpc.ipk Installing file (5.04-1) to root... Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/file_5.04-1_powerpc.ipk Installing zlib (1.2.4-1) to root... Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/zlib_1.2.4-1_powerpc.ipk Installing findutils (4.2.32-1) to root... Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/findutils_4.2.32-1_powerpc.ipk Installing flex (2.5.35-1) to root... Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/flex_2.5.35-1_powerpc.ipk Installing gawk (3.1.7-1) to root... Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/gawk_3.1.7-1_powerpc.ipk Installing groff (1.19.2-2) to root... Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/groff_1.19.2-2_powerpc.ipk Installing libstdc++ (6.0.3-6) to root... Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/libstdc++_6.0.3-6_powerpc.ipk Installing gzip (1.2.4a-4) to root... Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/gzip_1.2.4a-4_powerpc.ipk Installing libtool (1.5.26-1) to root... Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/libtool_1.5.26-1_powerpc.ipk Installing openssl (0.9.8n-1) to root... Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/openssl_0.9.8n-1_powerpc.ipk Installing patch (2.6.1-1) to root... Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/patch_2.6.1-1_powerpc.ipk Installing perl (5.8.8-23) to root... Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/perl_5.8.8-23_powerpc.ipk Installing libdb (4.2.52-3) to root... Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/libdb_4.2.52-3_powerpc.ipk Installing gdbm (1.8.3-2) to root... Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/gdbm_1.8.3-2_powerpc.ipk Installing pkgconfig (0.15.0-2) to root... Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/pkgconfig_0.15.0-2_powerpc.ipk Installing python25 (2.5.5-2) to root... Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/python25_2.5.5-2_powerpc.ipk Installing sqlite (3.6.23.1-1) to root... Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/sqlite_3.6.23.1-1_powerpc.ipk Installing ncursesw (5.7-1) to root... Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/ncursesw_5.7-1_powerpc.ipk Installing rsync (3.0.7-1) to root... Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/rsync_3.0.7-1_powerpc.ipk Installing sed (4.2.1-1) to root... Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/sed_4.2.1-1_powerpc.ipk Installing svn (1.6.9-1) to root... Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/svn_1.6.9-1_powerpc.ipk Installing neon (0.29.3-1) to root... Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/neon_0.29.3-1_powerpc.ipk Installing libxml2 (2.7.7-1) to root... Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/libxml2_2.7.7-1_powerpc.ipk Installing apr (1.3.12-1) to root... Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/apr_1.3.12-1_powerpc.ipk Installing apr-util (1.3.9-1) to root... Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/apr-util_1.3.9-1_powerpc.ipk Installing e2fslibs (1.40.3-5) to root... Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/e2fslibs_1.40.3-5_powerpc.ipk Installing expat (2.0.1-1) to root... Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/expat_2.0.1-1_powerpc.ipk Installing cyrus-sasl-libs (2.1.23-1) to root... Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/cyrus-sasl-libs_2.1.23-1_powerpc.ipk Installing openldap-libs (2.3.43-1) to root... Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/openldap-libs_2.3.43-1_powerpc.ipk Installing tar (1.23-1) to root... Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/tar_1.23-1_powerpc.ipk Installing tcl (8.4.19-2) to root... Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/tcl_8.4.19-2_powerpc.ipk Installing wget-ssl (1.12-2) to root... Configuring apr Configuring apr-util Configuring autoconf Configuring automake Configuring bash Configuring bison Configuring bzip2 update-alternatives: Linking //opt/bin/bzip2 to /opt/bin/bzip2-bzip2 Configuring coreutils update-alternatives: Linking //opt/bin/[ to coreutils-lbracket update-alternatives: Linking //opt/bin/base64 to coreutils-base64 update-alternatives: Linking //opt/bin/basename to coreutils-basename update-alternatives: Linking //opt/bin/cat to coreutils-cat update-alternatives: Linking //opt/bin/chcon to coreutils-chcon update-alternatives: Linking //opt/bin/chgrp to coreutils-chgrp update-alternatives: Linking //opt/bin/chmod to coreutils-chmod update-alternatives: Linking //opt/bin/chown to coreutils-chown update-alternatives: Linking //opt/bin/chroot to coreutils-chroot update-alternatives: Linking //opt/bin/cksum to coreutils-cksum update-alternatives: Linking //opt/bin/comm to coreutils-comm update-alternatives: Linking //opt/bin/cp to coreutils-cp update-alternatives: Linking //opt/bin/csplit to coreutils-csplit update-alternatives: Linking //opt/bin/cut to coreutils-cut update-alternatives: Linking //opt/bin/date to coreutils-date update-alternatives: Linking //opt/bin/dd to coreutils-dd update-alternatives: Linking //opt/bin/df to coreutils-df update-alternatives: Linking //opt/bin/dir to coreutils-dir update-alternatives: Linking //opt/bin/dircolors to coreutils-dircolors update-alternatives: Linking //opt/bin/dirname to coreutils-dirname update-alternatives: Linking //opt/bin/du to coreutils-du update-alternatives: Linking //opt/bin/echo to coreutils-echo update-alternatives: Linking //opt/bin/env to coreutils-env update-alternatives: Linking //opt/bin/expand to coreutils-expand update-alternatives: Linking //opt/bin/expr to coreutils-expr update-alternatives: Linking //opt/bin/factor to coreutils-factor update-alternatives: Linking //opt/bin/false to coreutils-false update-alternatives: Linking //opt/bin/fmt to coreutils-fmt update-alternatives: Linking //opt/bin/fold to coreutils-fold update-alternatives: Linking //opt/bin/groups to coreutils-groups update-alternatives: Linking //opt/bin/head to coreutils-head update-alternatives: Linking //opt/bin/hostid to coreutils-hostid update-alternatives: Linking //opt/bin/id to coreutils-id update-alternatives: Linking //opt/bin/install to coreutils-install update-alternatives: Linking //opt/bin/join to coreutils-join update-alternatives: Linking //opt/bin/kill to coreutils-kill update-alternatives: Linking //opt/bin/link to coreutils-link update-alternatives: Linking //opt/bin/ln to coreutils-ln update-alternatives: Linking //opt/bin/logname to coreutils-logname update-alternatives: Linking //opt/bin/ls to coreutils-ls update-alternatives: Linking //opt/bin/md5sum to coreutils-md5sum update-alternatives: Linking //opt/bin/mkdir to coreutils-mkdir update-alternatives: Linking //opt/bin/mkfifo to coreutils-mkfifo update-alternatives: Linking //opt/bin/mknod to coreutils-mknod update-alternatives: Linking //opt/bin/mktemp to coreutils-mktemp update-alternatives: Linking //opt/bin/mv to coreutils-mv update-alternatives: Linking //opt/bin/nice to coreutils-nice update-alternatives: Linking //opt/bin/nl to coreutils-nl update-alternatives: Linking //opt/bin/nohup to coreutils-nohup update-alternatives: Linking //opt/bin/nproc to coreutils-nproc update-alternatives: Linking //opt/bin/od to coreutils-od update-alternatives: Linking //opt/bin/paste to coreutils-paste update-alternatives: Linking //opt/bin/pathchk to coreutils-pathchk update-alternatives: Linking //opt/bin/pinky to coreutils-pinky update-alternatives: Linking //opt/bin/pr to coreutils-pr update-alternatives: Linking //opt/bin/printenv to coreutils-printenv update-alternatives: Linking //opt/bin/printf to coreutils-printf update-alternatives: Linking //opt/bin/ptx to coreutils-ptx update-alternatives: Linking //opt/bin/pwd to coreutils-pwd update-alternatives: Linking //opt/bin/readlink to coreutils-readlink update-alternatives: Linking //opt/bin/rm to coreutils-rm update-alternatives: Linking //opt/bin/rmdir to coreutils-rmdir update-alternatives: Linking //opt/bin/runcon to coreutils-runcon update-alternatives: Linking //opt/bin/seq to coreutils-seq update-alternatives: Linking //opt/bin/sha1sum to coreutils-sha1sum update-alternatives: Linking //opt/bin/sha224sum to coreutils-sha224sum update-alternatives: Linking //opt/bin/sha256sum to coreutils-sha256sum update-alternatives: Linking //opt/bin/sha384sum to coreutils-sha384sum update-alternatives: Linking //opt/bin/sha512sum to coreutils-sha512sum update-alternatives: Linking //opt/bin/shred to coreutils-shred update-alternatives: Linking //opt/bin/shuf to coreutils-shuf update-alternatives: Linking //opt/bin/sleep to coreutils-sleep update-alternatives: Linking //opt/bin/sort to coreutils-sort update-alternatives: Linking //opt/bin/split to coreutils-split update-alternatives: Linking //opt/bin/stat to coreutils-stat update-alternatives: Linking //opt/bin/stdbuf to coreutils-stdbuf update-alternatives: Linking //opt/bin/stty to coreutils-stty update-alternatives: Linking //opt/bin/su to coreutils-su update-alternatives: Linking //opt/bin/sum to coreutils-sum update-alternatives: Linking //opt/bin/sync to coreutils-sync update-alternatives: Linking //opt/bin/tac to coreutils-tac update-alternatives: Linking //opt/bin/tail to coreutils-tail update-alternatives: Linking //opt/bin/tee to coreutils-tee update-alternatives: Linking //opt/bin/test to coreutils-test update-alternatives: Linking //opt/bin/timeout to coreutils-timeout update-alternatives: Linking //opt/bin/touch to coreutils-touch update-alternatives: Linking //opt/bin/tr to coreutils-tr update-alternatives: Linking //opt/bin/true to coreutils-true update-alternatives: Linking //opt/bin/truncate to coreutils-truncate update-alternatives: Linking //opt/bin/tsort to coreutils-tsort update-alternatives: Linking //opt/bin/tty to coreutils-tty update-alternatives: Linking //opt/bin/uname to coreutils-uname update-alternatives: Linking //opt/bin/unexpand to coreutils-unexpand update-alternatives: Linking //opt/bin/uniq to coreutils-uniq update-alternatives: Linking //opt/bin/unlink to coreutils-unlink update-alternatives: Linking //opt/bin/uptime to coreutils-uptime update-alternatives: Linking //opt/bin/users to coreutils-users update-alternatives: Linking //opt/bin/vdir to coreutils-vdir update-alternatives: Linking //opt/bin/wc to coreutils-wc update-alternatives: Linking //opt/bin/who to coreutils-who update-alternatives: Linking //opt/bin/whoami to coreutils-whoami update-alternatives: Linking //opt/bin/yes to coreutils-yes Configuring cyrus-sasl-libs Configuring diffutils update-alternatives: Linking //opt/bin/cmp to /opt/bin/diffutils-cmp update-alternatives: Linking //opt/bin/diff to /opt/bin/diffutils-diff update-alternatives: Linking //opt/bin/diff3 to /opt/bin/diffutils-diff3 update-alternatives: Linking //opt/bin/sdiff to /opt/bin/diffutils-sdiff Configuring e2fslibs Configuring expat Configuring file Configuring findutils update-alternatives: Linking //opt/bin/find to /opt/bin/findutils-find update-alternatives: Linking //opt/bin/xargs to /opt/bin/findutils-xargs Configuring flex Configuring gawk update-alternatives: Linking //opt/bin/awk to /opt/bin/gawk Configuring gdbm Configuring groff Configuring gzip update-alternatives: Linking //opt/bin/gunzip to /opt/bin/gzip-gunzip update-alternatives: Linking //opt/bin/gzip to /opt/bin/gzip-gzip update-alternatives: Linking //opt/bin/zcat to /opt/bin/gzip-zcat Configuring libdb Configuring libstdc++ Configuring libtool Configuring libxml2 Configuring m4 Configuring make Configuring ncurses update-alternatives: Linking //opt/bin/clear to /opt/bin/ncurses-clear Configuring ncursesw Configuring neon Configuring openldap-libs Configuring openssl Configuring patch update-alternatives: Linking //opt/bin/patch to /opt/bin/patch-patch Configuring perl Configuring pkgconfig Configuring python25 Configuring readline Configuring rsync Configuring sed update-alternatives: Linking //opt/bin/sed to /opt/bin/gnu-sed Configuring sqlite Configuring svn Configuring tar update-alternatives: Linking //opt/bin/tar to /opt/bin/gnutar Configuring tcl Configuring zlib An error ocurred, return value: 1. Collected errors: ERROR: The following packages conflict with wget-ssl: wget Synology-RAID1> 3. download gambas and configure. See logging below: Synology-RAID1> env CC=/usr/local/powerpc-linux-gnuspe/bin/powerpc-linux-gnuspe-gcc Synology-RAID1> LD=/usr/local/powerpc-linux-gnuspe/bin/powerpc-linux-gnuspe-ld Synology-RAID1> RANLIB=/usr/local/powerpc-linux-gnuspe/bin/powerpc-linux-gnuspe-ranlib Synology-RAID1> CFLAGS="-I/usr/local/powerpc-linux-gnuspe/include -mcpu=8548 -mhard-float -mfloat-gprs=double" Synology-RAID1> LDFLAGS="-L/usr/local/powerpc-linux-gnuspe/lib" Synology-RAID1> ./configure --host=powerpc-unknown-linux --target=powerpc-unknown-linux --build=i686-pc-linux --prefix=/usr/local Synology-RAID1> ./configure -C ................ checking for g++ option to produce PIC... -fPIC -DPIC checking if g++ PIC flag -fPIC -DPIC works... yes checking if g++ static flag -static works... no checking if g++ supports -c -o file.o... yes checking if g++ supports -c -o file.o... (cached) yes checking whether the g++ linker (/opt/powerpc-linux-gnuspe/bin/ld) supports shared libraries... yes checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking for CORBA component headers... no configure: WARNING: Unable to find file: CORBA.h checking for CORBA component libraries... no configure: WARNING: Unable to find file: libomniORB4.so configure: WARNING: Unable to find file: libomniDynamic4.so configure: WARNING: *** CORBA component is disabled configure: creating ./config.status config.status: creating Makefile config.status: creating src/Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands config.status: executing libtool commands === configuring in gb.image (/volume1/homes/admin/gambas/2.0/gb.image) configure: running /opt/bin/bash ./configure --disable-option-checking '--prefix=/usr/local' '--host=powerpc-unknown-linux' '--target=powerpc-unknown-linux' '--build=i686-pc-linux' 'build_alias=i686-pc-linux' 'host_alias=powerpc-unknown-linux' 'target_alias=powerpc-unknown-linux' --cache-file=/dev/null --srcdir=. checking for a BSD-compatible install... /opt/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /opt/bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking build system type... i686-pc-linux-gnu checking for style of include used by make... GNU checking for powerpc-unknown-linux-gcc... no checking for gcc... gcc configure: WARNING: using cross tools not prefixed with host triplet checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... yes checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking dependency style of gcc... gcc3 checking whether to enable maintainer-specific portions of Makefiles... no checking for powerpc-unknown-linux-strip... no checking for strip... strip checking host system type... powerpc-unknown-linux-gnu checking for a BSD-compatible install... /opt/bin/install -c checking whether ln -s works... yes checking how to run the C preprocessor... gcc -E checking for powerpc-unknown-linux-g++... no checking for powerpc-unknown-linux-c++... no checking for powerpc-unknown-linux-gpp... no checking for powerpc-unknown-linux-aCC... no checking for powerpc-unknown-linux-CC... no checking for powerpc-unknown-linux-cxx... no checking for powerpc-unknown-linux-cc++... no checking for powerpc-unknown-linux-cl.exe... no checking for powerpc-unknown-linux-FCC... no checking for powerpc-unknown-linux-KCC... no checking for powerpc-unknown-linux-RCC... no checking for powerpc-unknown-linux-xlC_r... no checking for powerpc-unknown-linux-xlC... no checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking dependency style of g++... gcc3 checking for powerpc-unknown-linux-gcc... gcc checking whether we are using the GNU C compiler... (cached) yes checking whether gcc accepts -g... (cached) yes checking for gcc option to accept ISO C89... (cached) none needed checking dependency style of gcc... (cached) gcc3 checking whether make sets $(MAKE)... (cached) yes checking for long double with more range or precision than double... no checking for setenv... yes checking for unsetenv... yes checking for getdomainname... yes checking for getpt... yes checking for ccache... no checking for main in -lm... yes checking for main in -lz... yes checking for main in -lgcc_s... yes checking for main in -lstdc++... yes checking target system... LINUX checking target architecture... UNKNOWN checking which extension is used for shared libraries... .so checking for threading compiler options... -D_REENTRANT checking for threading linker options... -lpthread checking for mathematic libraries... -lm checking for external gettext library... checking CFLAGS for gcc -fvisibility=hidden... no, unknown checking for a sed that does not truncate output... /opt/bin/sed checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for fgrep... /bin/grep -F checking for ld used by gcc... /opt/powerpc-linux-gnuspe/bin/ld checking if the linker (/opt/powerpc-linux-gnuspe/bin/ld) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... no checking for powerpc-unknown-linux-dumpbin... no checking for powerpc-unknown-linux-link... no checking for dumpbin... no checking for link... link -dump -symbols checking the name lister (link -dump -symbols) interface... BSD nm checking the maximum length of command line arguments... 32768 checking whether the shell understands some XSI constructs... yes checking whether the shell understands "+="... yes checking for /opt/powerpc-linux-gnuspe/bin/ld option to reload object files... -r checking for powerpc-unknown-linux-objdump... objdump checking how to recognize dependent libraries... pass_all checking for powerpc-unknown-linux-ar... no checking for ar... ar checking for powerpc-unknown-linux-strip... strip checking for powerpc-unknown-linux-ranlib... no checking for ranlib... ranlib checking command to parse link -dump -symbols output from gcc object... failed ./configure: line 8609: /usr/bin/file: No such file or directory checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for dlfcn.h... yes checking whether we are using the GNU C++ compiler... (cached) yes checking whether g++ accepts -g... (cached) yes checking dependency style of g++... (cached) gcc3 checking how to run the C++ preprocessor... g++ -E checking for objdir... .libs checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC -DPIC checking if gcc PIC flag -fPIC -DPIC works... yes checking if gcc static flag -static works... no checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.o... (cached) yes checking whether the gcc linker (/opt/powerpc-linux-gnuspe/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking for shl_load... no checking for shl_load in -ldld... no checking for dlopen... no checking for dlopen in -ldl... yes checking whether a program can dlopen itself... cross checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for ld used by g++... /opt/powerpc-linux-gnuspe/bin/ld checking if the linker (/opt/powerpc-linux-gnuspe/bin/ld) is GNU ld... yes checking whether the g++ linker (/opt/powerpc-linux-gnuspe/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC -DPIC checking if g++ PIC flag -fPIC -DPIC works... yes checking if g++ static flag -static works... no checking if g++ supports -c -o file.o... yes checking if g++ supports -c -o file.o... (cached) yes checking whether the g++ linker (/opt/powerpc-linux-gnuspe/bin/ld) supports shared libraries... yes checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking for Image processing component headers... checking for Image processing component libraries... configure: creating ./config.status config.status: creating Makefile config.status: creating src/Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands config.status: executing libtool commands === configuring in gb.desktop (/volume1/homes/admin/gambas/2.0/gb.desktop) configure: running /opt/bin/bash ./configure --disable-option-checking '--prefix=/usr/local' '--host=powerpc-unknown-linux' '--target=powerpc-unknown-linux' '--build=i686-pc-linux' 'build_alias=i686-pc-linux' 'host_alias=powerpc-unknown-linux' 'target_alias=powerpc-unknown-linux' --cache-file=/dev/null --srcdir=. checking for a BSD-compatible install... /opt/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /opt/bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking build system type... i686-pc-linux-gnu checking for style of include used by make... GNU checking for powerpc-unknown-linux-gcc... no checking for gcc... gcc configure: WARNING: using cross tools not prefixed with host triplet checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... yes checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking dependency style of gcc... gcc3 checking whether to enable maintainer-specific portions of Makefiles... no checking for powerpc-unknown-linux-strip... no checking for strip... strip checking host system type... powerpc-unknown-linux-gnu checking for a BSD-compatible install... /opt/bin/install -c checking whether ln -s works... yes checking how to run the C preprocessor... gcc -E checking for powerpc-unknown-linux-g++... no checking for powerpc-unknown-linux-c++... no checking for powerpc-unknown-linux-gpp... no checking for powerpc-unknown-linux-aCC... no checking for powerpc-unknown-linux-CC... no checking for powerpc-unknown-linux-cxx... no checking for powerpc-unknown-linux-cc++... no checking for powerpc-unknown-linux-cl.exe... no checking for powerpc-unknown-linux-FCC... no checking for powerpc-unknown-linux-KCC... no checking for powerpc-unknown-linux-RCC... no checking for powerpc-unknown-linux-xlC_r... no checking for powerpc-unknown-linux-xlC... no checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking dependency style of g++... gcc3 checking for powerpc-unknown-linux-gcc... gcc checking whether we are using the GNU C compiler... (cached) yes checking whether gcc accepts -g... (cached) yes checking for gcc option to accept ISO C89... (cached) none needed checking dependency style of gcc... (cached) gcc3 checking whether make sets $(MAKE)... (cached) yes checking for long double with more range or precision than double... no checking for setenv... yes checking for unsetenv... yes checking for getdomainname... yes checking for getpt... yes checking for ccache... no checking for main in -lm... yes checking for main in -lz... yes checking for main in -lgcc_s... yes checking for main in -lstdc++... yes checking target system... LINUX checking target architecture... UNKNOWN checking which extension is used for shared libraries... .so checking for threading compiler options... -D_REENTRANT checking for threading linker options... -lpthread checking for mathematic libraries... -lm checking for external gettext library... checking CFLAGS for gcc -fvisibility=hidden... no, unknown checking for a sed that does not truncate output... /opt/bin/sed checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for fgrep... /bin/grep -F checking for ld used by gcc... /opt/powerpc-linux-gnuspe/bin/ld checking if the linker (/opt/powerpc-linux-gnuspe/bin/ld) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... no checking for powerpc-unknown-linux-dumpbin... no checking for powerpc-unknown-linux-link... no checking for dumpbin... no checking for link... link -dump -symbols checking the name lister (link -dump -symbols) interface... BSD nm checking the maximum length of command line arguments... 32768 checking whether the shell understands some XSI constructs... yes checking whether the shell understands "+="... yes checking for /opt/powerpc-linux-gnuspe/bin/ld option to reload object files... -r checking for powerpc-unknown-linux-objdump... objdump checking how to recognize dependent libraries... pass_all checking for powerpc-unknown-linux-ar... no checking for ar... ar checking for powerpc-unknown-linux-strip... strip checking for powerpc-unknown-linux-ranlib... no checking for ranlib... ranlib checking command to parse link -dump -symbols output from gcc object... failed ./configure: line 8622: /usr/bin/file: No such file or directory checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for dlfcn.h... yes checking whether we are using the GNU C++ compiler... (cached) yes checking whether g++ accepts -g... (cached) yes checking dependency style of g++... (cached) gcc3 checking how to run the C++ preprocessor... g++ -E checking for objdir... .libs checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC -DPIC checking if gcc PIC flag -fPIC -DPIC works... yes checking if gcc static flag -static works... no checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.o... (cached) yes checking whether the gcc linker (/opt/powerpc-linux-gnuspe/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking for shl_load... no checking for shl_load in -ldld... no checking for dlopen... no checking for dlopen in -ldl... yes checking whether a program can dlopen itself... cross checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for ld used by g++... /opt/powerpc-linux-gnuspe/bin/ld checking if the linker (/opt/powerpc-linux-gnuspe/bin/ld) is GNU ld... yes checking whether the g++ linker (/opt/powerpc-linux-gnuspe/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC -DPIC checking if g++ PIC flag -fPIC -DPIC works... yes checking if g++ static flag -static works... no checking if g++ supports -c -o file.o... yes checking if g++ supports -c -o file.o... (cached) yes checking whether the g++ linker (/opt/powerpc-linux-gnuspe/bin/ld) supports shared libraries... yes checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking for X... no checking for XTestQueryExtension in -lXtst... no configure: WARNING: *** Desktop-neutral routines is disabled configure: creating ./config.status config.status: creating Makefile config.status: creating src/Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands config.status: executing libtool commands === configuring in comp (/volume1/homes/admin/gambas/2.0/comp) configure: running /opt/bin/bash ./configure --disable-option-checking '--prefix=/usr/local' '--host=powerpc-unknown-linux' '--target=powerpc-unknown-linux' '--build=i686-pc-linux' 'build_alias=i686-pc-linux' 'host_alias=powerpc-unknown-linux' 'target_alias=powerpc-unknown-linux' --cache-file=/dev/null --srcdir=. checking for a BSD-compatible install... /opt/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /opt/bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking build system type... i686-pc-linux-gnu checking whether to enable maintainer-specific portions of Makefiles... no checking for powerpc-unknown-linux-strip... no checking for strip... strip configure: WARNING: using cross tools not prefixed with host triplet checking host system type... powerpc-unknown-linux-gnu checking for a BSD-compatible install... /opt/bin/install -c checking whether ln -s works... yes configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged === configuring in app (/volume1/homes/admin/gambas/2.0/app) configure: running /opt/bin/bash ./configure --disable-option-checking '--prefix=/usr/local' '--host=powerpc-unknown-linux' '--target=powerpc-unknown-linux' '--build=i686-pc-linux' 'build_alias=i686-pc-linux' 'host_alias=powerpc-unknown-linux' 'target_alias=powerpc-unknown-linux' --cache-file=/dev/null --srcdir=. checking for a BSD-compatible install... /opt/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /opt/bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking build system type... i686-pc-linux-gnu checking whether to enable maintainer-specific portions of Makefiles... no checking for powerpc-unknown-linux-strip... no checking for strip... strip configure: WARNING: using cross tools not prefixed with host triplet checking host system type... powerpc-unknown-linux-gnu checking for a BSD-compatible install... /opt/bin/install -c checking whether ln -s works... yes checking for xdg-mime... no checking for xdg-icon-resource... no configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged === configuring in examples (/volume1/homes/admin/gambas/2.0/examples) configure: running /opt/bin/bash ./configure --disable-option-checking '--prefix=/usr/local' '--host=powerpc-unknown-linux' '--target=powerpc-unknown-linux' '--build=i686-pc-linux' 'build_alias=i686-pc-linux' 'host_alias=powerpc-unknown-linux' 'target_alias=powerpc-unknown-linux' --cache-file=/dev/null --srcdir=. checking for a BSD-compatible install... /opt/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /opt/bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking build system type... i686-pc-linux-gnu checking whether to enable maintainer-specific portions of Makefiles... no checking for powerpc-unknown-linux-strip... no checking for strip... strip configure: WARNING: using cross tools not prefixed with host triplet checking host system type... powerpc-unknown-linux-gnu checking for a BSD-compatible install... /opt/bin/install -c checking whether ln -s works... yes configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged === configuring in help (/volume1/homes/admin/gambas/2.0/help) configure: running /opt/bin/bash ./configure --disable-option-checking '--prefix=/usr/local' '--host=powerpc-unknown-linux' '--target=powerpc-unknown-linux' '--build=i686-pc-linux' 'build_alias=i686-pc-linux' 'host_alias=powerpc-unknown-linux' 'target_alias=powerpc-unknown-linux' --cache-file=/dev/null --srcdir=. checking for a BSD-compatible install... /opt/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /opt/bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking build system type... i686-pc-linux-gnu checking whether to enable maintainer-specific portions of Makefiles... no checking for powerpc-unknown-linux-strip... no checking for strip... strip configure: WARNING: using cross tools not prefixed with host triplet checking host system type... powerpc-unknown-linux-gnu checking for a BSD-compatible install... /opt/bin/install -c checking whether ln -s works... yes configure: creating ./config.status config.status: creating Makefile config.status: creating help/Makefile config.status: creating config.h config.status: config.h is unchanged ************************************************************ THESE COMPONENTS ARE DISABLED: - gb.corba - gb.crypt - gb.db.firebird - gb.db.odbc - gb.db.postgresql - gb.db.sqlite2 - gb.desktop - gb.gtk - gb.gtk.svg - gb.net.curl - gb.net.smtp - gb.opengl - gb.pcre - gb.pdf - gb.qt - gb.qt.kde - gb.qte - gb.sdl - gb.sdl.sound - gb.v4l ************************************************************ 4. make. See logging below: Synology-RAID1> make make all-recursive make[1]: Entering directory `/volume1/homes/admin/gambas/2.0' Making all in main make[2]: Entering directory `/volume1/homes/admin/gambas/2.0/main' make all-recursive make[3]: Entering directory `/volume1/homes/admin/gambas/2.0/main' Making all in gbx make[4]: Entering directory `/volume1/homes/admin/gambas/2.0/main/gbx' /opt/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -DGBX_INFO -pipe -Wall -Wno-unused-value -Wcast-align -fsigned-char -g -Os -I../share -D_REENTRANT -O0 -MT gb_la-gbx_c_class.lo -MD -MP -MF .deps/gb_la-gbx_c_class.Tpo -c -o gb_la-gbx_c_class.lo `test -f 'gbx_c_class.c' || echo './'`gbx_c_class.c ../libtool: line 847: X--tag=CC: command not found ../libtool: line 880: libtool: ignoring unknown tag : command not found ../libtool: line 847: X--mode=compile: command not found ../libtool: line 1014: *** Warning: inferring the mode of operation is deprecated.: command not found ../libtool: line 1015: *** Future versions of Libtool will require --mode=MODE be specified.: command not found ../libtool: line 1158: Xgcc: command not found ../libtool: line 1158: X-DHAVE_CONFIG_H: command not found ../libtool: line 1158: X-I.: command not found ../libtool: line 1158: X-I..: command not found ../libtool: line 1158: X-DGBX_INFO: command not found ../libtool: line 1158: X-pipe: command not found ../libtool: line 1158: X-Wall: command not found ../libtool: line 1158: X-Wno-unused-value: command not found ../libtool: line 1158: X-Wcast-align: command not found ../libtool: line 1158: X-fsigned-char: command not found ../libtool: line 1158: X-g: command not found ../libtool: line 1158: X-Os: command not found ../libtool: line 1158: X-I../share: No such file or directory ../libtool: line 1158: X-D_REENTRANT: command not found ../libtool: line 1158: X-O0: command not found ../libtool: line 1158: X-MT: command not found ../libtool: line 1158: Xgb_la-gbx_c_class.lo: command not found ../libtool: line 1158: X-MD: command not found ../libtool: line 1158: X-MP: command not found ../libtool: line 1158: X-MF: command not found ../libtool: line 1158: X.deps/gb_la-gbx_c_class.Tpo: No such file or directory ../libtool: line 1158: X-c: command not found ../libtool: line 1211: Xgb_la-gbx_c_class.lo: command not found ../libtool: line 1216: libtool: compile: cannot determine name of library object from `': command not found make[4]: *** [gb_la-gbx_c_class.lo] Error 1 make[4]: Leaving directory `/volume1/homes/admin/gambas/2.0/main/gbx' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/volume1/homes/admin/gambas/2.0/main' make[2]: *** [all] Error 2 make[2]: Leaving directory `/volume1/homes/admin/gambas/2.0/main' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/volume1/homes/admin/gambas/2.0' make: *** [all] Error 2 Synology-RAID1> uname -a Linux Synology-RAID1 2.6.24 #1141 Sat Mar 13 00:50:14 CST 2010 ppc GNU/Linux -- m.vr.gr. Theo ;-) From gambas at ...1... Mon Apr 12 13:27:17 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 12 Apr 2010 13:27:17 +0200 Subject: [Gambas-user] Gambas on Synolgy DS-209+II In-Reply-To: <1271061268.2215.140.camel@...2412...> References: <1271061268.2215.140.camel@...2412...> Message-ID: <201004121327.18538.gambas@...1...> > Hi, I'm trying to install gambas on my Synology DS-209+II NAS. So far > bad luck. I'm not very experienced in Linux, so it might me my > shortcoming ... This is what I did: > [...] You need libtool 2. Gambas does not compile anymore with libtool 1.5. Regards, -- Beno?t Minisini From leandrosansilva at ...626... Mon Apr 12 14:36:16 2010 From: leandrosansilva at ...626... (Leandro Santiago) Date: Mon, 12 Apr 2010 09:36:16 -0300 Subject: [Gambas-user] Where do put translation package for a gambas application (specifically IDE)? In-Reply-To: <201004112026.41498.gambas@...1...> References: <201004111451.46277.gambas@...1...> <201004112026.41498.gambas@...1...> Message-ID: Ow, now I see the program: the LANGUAGE environment var. By default, in Ubuntu (pt_BR), its value is pt_BR:pt:en, but i needed to change this to pt_BR.UTF-8. Is this LANGUAGE variable in POSIX spec? Thx 2010/4/11 Beno?t Minisini > > Ok. Now I'm doing it. I'm using translation dialog. > > > > I opened IDE project into gambas IDE. > > > > I translated my lang file and created the .gambas executable. I saw the > > /tmp/gambas structure and the lang file is there, but the program is yet > in > > English. Until here everything is OK. > > > > But even in other languages as default (properties dialog) (like French, > > fully translated), the program is yet in English. What am I doing wrong? > > > > I'm using gambas 3 rev. 2870 in Ubuntu 9.10. > > > > If you run it from the IDE after having translated it, it is yet in > English? > If so, do you have a warning message in the console about a missing locale? > If > you don't, can you tell what are the values of the following environment > variables: LANG, LANGUAGE, LC_ALL and LC_MESSAGES? > > -- > Beno?t Minisini > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From prog at ...2177... Mon Apr 12 17:05:21 2010 From: prog at ...2177... (craf) Date: Mon, 12 Apr 2010 11:05:21 -0400 Subject: [Gambas-user] Debugging program to find error In-Reply-To: <201004120419.04438.gambas@...1...> References: <1270742698.1985.10.camel@...2406...> <201004120135.43724.gambas@...1...> <1271037926.1966.32.camel@...2406...> <201004120419.04438.gambas@...1...> Message-ID: <1271084721.1957.5.camel@...2406...> >Can you make an archive of your package and put it somewhere I can download >it? I will test it on my Mandriva and see what happens exactly. >Regards, >-- >Beno?t Minisini Of course, and thanks again Here is the link: http://www.tecleandocodigo.webcindario.com/ Regards ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From prog at ...2177... Mon Apr 12 17:31:42 2010 From: prog at ...2177... (craf) Date: Mon, 12 Apr 2010 11:31:42 -0400 Subject: [Gambas-user] Debugging program to find error In-Reply-To: <201004120650.53796.ronstk@...239...> References: <1270742698.1985.10.camel@...2406...> <201004120135.43724.gambas@...1...> <1271037926.1966.32.camel@...2406...> <201004120650.53796.ronstk@...239...> Message-ID: <1271086302.1957.31.camel@...2406...> -----Mensaje original----- De: Ron_1st Reply-to: mailing list for gambas users Para: gambas-user at lists.sourceforge.net Asunto: Re: [Gambas-user] Debugging program to find error Fecha: Mon, 12 Apr 2010 05:50:53 +0100 On Monday 12 April 2010, craf wrote: > file: No such file or directory > ), is that the routes included in the file .sh are not taken into > account. To fix this I added the following paths to the file .profile > (The tests carried out from a project created in gambas2.20 in Ubuntu > 9.10 to Ubuntu 8.04 distribution located on the same computer and runs > through Virtualbox. > > #!/bin/sh > export PATH=/path/my/proyect/gambas2/bin > export > LD_LIBRARY_PATH=/path/my/proyect/gambas2/lib_shared/lib:/path/my/proyect/gambas2/lib_shared/usr/lib > >From some early mail >export LD_LIBRARY_PATH=/my/ld/dir:$LD_LIBRARY_PATH >This will add your path in front of the current one, pointing to i.e. gtk libs >In thecode you present here the current to other libraries is killed. >So add on the line at the end ':$LD_LIBRARY_PATH' (whitout quotes :) Yes, thanks, also I tried that, but unfortunately did not work > You see I have to load the variable LD_LIBRARY_PATH when the user start > a session, as this is ignored if the file is called from . sh > > Doriano kindly indicated that this was due to the following: > >Best regards, >Ron_1st Regards. From gambas at ...1... Mon Apr 12 17:57:21 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 12 Apr 2010 17:57:21 +0200 Subject: [Gambas-user] Debugging program to find error In-Reply-To: <1271084721.1957.5.camel@...2406...> References: <1270742698.1985.10.camel@...2406...> <201004120419.04438.gambas@...1...> <1271084721.1957.5.camel@...2406...> Message-ID: <201004121757.21617.gambas@...1...> > >Can you make an archive of your package and put it somewhere I can > >download it? I will test it on my Mandriva and see what happens exactly. > > > >Regards, > > Of course, and thanks again > > Here is the link: > > http://www.tecleandocodigo.webcindario.com/ > > Regards > I got it. I suggest you install "googleearth" (for example) in your home directory, and look in the "googlearth" shell script to see how they locate the executable path, and how they define the shared library path. Regards, -- Beno?t Minisini From prog at ...2177... Mon Apr 12 18:20:57 2010 From: prog at ...2177... (craf) Date: Mon, 12 Apr 2010 12:20:57 -0400 Subject: [Gambas-user] Debugging program to find error In-Reply-To: <201004121757.21617.gambas@...1...> References: <1270742698.1985.10.camel@...2406...> <201004120419.04438.gambas@...1...> <1271084721.1957.5.camel@...2406...> <201004121757.21617.gambas@...1...> Message-ID: <1271089257.1959.0.camel@...2406...> -----Mensaje original----- De: Beno?t Minisini Reply-to: mailing list for gambas users Para: mailing list for gambas users Asunto: Re: [Gambas-user] Debugging program to find error Fecha: Mon, 12 Apr 2010 17:57:21 +0200 > >Can you make an archive of your package and put it somewhere I can > >download it? I will test it on my Mandriva and see what happens exactly. > > > >Regards, > > Of course, and thanks again > > Here is the link: > > http://www.tecleandocodigo.webcindario.com/ > > Regards > >I got it. >I suggest you install "googleearth" (for example) in your home directory, and >look in the "googlearth" shell script to see how they locate the executable >path, and how they define the shared library path. >Regards, ok,I'll try googleearth Regards. From gambas at ...1... Mon Apr 12 18:24:09 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 12 Apr 2010 18:24:09 +0200 Subject: [Gambas-user] Debugging program to find error In-Reply-To: <201004121757.21617.gambas@...1...> References: <1270742698.1985.10.camel@...2406...> <1271084721.1957.5.camel@...2406...> <201004121757.21617.gambas@...1...> Message-ID: <201004121824.09558.gambas@...1...> > > >Can you make an archive of your package and put it somewhere I can > > >download it? I will test it on my Mandriva and see what happens exactly. > > > > > >Regards, > > > > Of course, and thanks again > > > > Here is the link: > > > > http://www.tecleandocodigo.webcindario.com/ > > > > Regards > > I got it. > > I suggest you install "googleearth" (for example) in your home directory, > and look in the "googlearth" shell script to see how they locate the > executable path, and how they define the shared library path. > > Regards, I think you didn't put all the needed libraries in the archive. To know which libraries are loaded by your program, run it with 'strace', and look at all the "*.so" files that are opened successfully by the open() system call. I noticed that some *.so files were taken in the system path, and not in the archive. Regards, -- Beno?t Minisini From prog at ...2177... Mon Apr 12 18:29:37 2010 From: prog at ...2177... (craf) Date: Mon, 12 Apr 2010 12:29:37 -0400 Subject: [Gambas-user] Debugging program to find error In-Reply-To: <201004121824.09558.gambas@...1...> References: <1270742698.1985.10.camel@...2406...> <1271084721.1957.5.camel@...2406...> <201004121757.21617.gambas@...1...> <201004121824.09558.gambas@...1...> Message-ID: <1271089777.1959.2.camel@...2406...> -----Mensaje original----- De: Beno?t Minisini Reply-to: mailing list for gambas users Para: mailing list for gambas users Asunto: Re: [Gambas-user] Debugging program to find error Fecha: Mon, 12 Apr 2010 18:24:09 +0200 > > >Can you make an archive of your package and put it somewhere I can > > >download it? I will test it on my Mandriva and see what happens exactly. > > > > > >Regards, > > > > Of course, and thanks again > > > > Here is the link: > > > > http://www.tecleandocodigo.webcindario.com/ > > > > Regards > > I got it. > > I suggest you install "googleearth" (for example) in your home directory, > and look in the "googlearth" shell script to see how they locate the > executable path, and how they define the shared library path. > > Regards, >I think you didn't put all the needed libraries in the archive. >To know which libraries are loaded by your program, run it with 'strace', and >look at all the "*.so" files that are opened successfully by the open() system >call. I noticed that some *.so files were taken in the system path, and not in >the archive. >Regards, Ok. I will check Regards From les at ...2337... Mon Apr 12 17:35:53 2010 From: les at ...2337... (Les Hardy) Date: Mon, 12 Apr 2010 16:35:53 +0100 Subject: [Gambas-user] htonl equal In-Reply-To: References: Message-ID: <4BC33DD9.5080905@...2337...> You can use htonl/ntohl from external libs. A very quick example below. Please correct me if I got it wrong. ' Gambas module file PUBLIC EXTERN htonl(ln AS Long) AS Long IN "libc:6" PUBLIC EXTERN ntohl(ln AS Long) AS Long IN "libc:6" PUBLIC SUB Main() DIM ln, lh AS Integer ln = 1193046 PRINT "Input: " & ln PRINT "Input (hex): " & Hex(ln, 8) lh = htonl(ln) ' to BigEndian PRINT "BigEndian: " & lh PRINT "BigEndian (hex): " & Hex$(lh, 8) ln = ntohl(lh) ' back to LittleEndian PRINT "LittleEndian: " & ln PRINT "LittleEndian (hex): " & Hex$(ln, 8) END Regards Les Hardy Mohammad Razeghi wrote: > Hi > > I am looking for c++ htonl function equal in gambas can any one help please > ? > > Thanks ... > From gambas at ...1... Mon Apr 12 23:11:11 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 12 Apr 2010 23:11:11 +0200 Subject: [Gambas-user] htonl equal In-Reply-To: <4BC33DD9.5080905@...2337...> References: <4BC33DD9.5080905@...2337...> Message-ID: <201004122311.11779.gambas@...1...> > You can use htonl/ntohl from external libs. > A very quick example below. Please correct me if I got it wrong. > > ' Gambas module file > PUBLIC EXTERN htonl(ln AS Long) AS Long IN "libc:6" > PUBLIC EXTERN ntohl(ln AS Long) AS Long IN "libc:6" > > PUBLIC SUB Main() > DIM ln, lh AS Integer > > ln = 1193046 > > PRINT "Input: " & ln > PRINT "Input (hex): " & Hex(ln, 8) > > lh = htonl(ln) ' to BigEndian > PRINT "BigEndian: " & lh > PRINT "BigEndian (hex): " & Hex$(lh, 8) > > ln = ntohl(lh) ' back to LittleEndian > PRINT "LittleEndian: " & ln > PRINT "LittleEndian (hex): " & Hex$(ln, 8) > END > > > > Regards > Les Hardy > > Mohammad Razeghi wrote: > > Hi > > > > I am looking for c++ htonl function equal in gambas can any one help > > please ? > > > > Thanks ... > As the network byte order seems to be Big Endian, you can set the ByteOrder property of your socket to gb.BigEndian. Logically, you should not have to use htonl() or ntohl(), so I'm curious why you need these functions. Regards, -- Beno?t Minisini From fabianfloresvadell at ...626... Tue Apr 13 00:52:33 2010 From: fabianfloresvadell at ...626... (=?ISO-8859-1?Q?Fabi=E1n_Flores_Vadell?=) Date: Mon, 12 Apr 2010 19:52:33 -0300 Subject: [Gambas-user] There are errors in the class "Key", and in the events KeyPress / KeyRelease? Message-ID: Using Gambas 2.20, Ubuntu 9.10 with KDE 4.3.5 and GTK+ libraries Key.Code is not returned? Key.Text is lost? KeyRelease is not raised? Put a TextBox in a Form, then write the code to catch the pressed key. Run it and press a number o letter key. PUBLIC SUB TextBox1_KeyPress() PRINT Key.Code PRINT Key.Text END PUBLIC SUB TextBox1_KeyRelease() PRINT Key.Code PRINT Key.Text END Result Tests (gb.qt) ---------------------------- pressed the '5' key KeyPress: Key.Code = 53, Key.Text = "5" KeyRelease: Key.Code = 53, Key.Text = "" Randomly KeyRelease wasn't raised. Result Test (gb.qt) -------------------------- pressed the '5' key KeyPress: Key.Code = 0, Key.Text = "5" KeyRelease: Key.Code = 53, Key.Text = "5" Randomly KeyRelease wasn't raised. Issues in two real proyects (I'm trying to isolate the problem): --------------------------------------- KeyPress never is raised when gb.gtk is used. KeyPress sometimes is not raised when gb.qt is used. Key.Text is lost when the event KeyRelease is raised. -- Fabi?n Flores Vadell www.speedbooksargentina.blogspot.com From rterry at ...1946... Tue Apr 13 12:40:42 2010 From: rterry at ...1946... (richard terry) Date: Tue, 13 Apr 2010 20:40:42 +1000 Subject: [Gambas-user] Showing the Form's Gui Message-ID: <201004132040.42997.rterry@...1946...> Often with forms one wants to start some processing after the form has loaded - in my case, as my app is quite database intensive, it could involve loading sometimes quite large amounts of data. I'd ideally like to have the form load visually, and then the data loading to take place once the form is visible to the user, but if one includes this loading in the usual events of _new, show() , then the gui-dosn't appear until after the database loading and putting a Wait command before the processing starts dosn't seem to help. Any idea's how to put this sort of activity into the background so the gui appears instantly to the user. Regards Richard From doriano.blengino at ...1909... Tue Apr 13 12:50:26 2010 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Tue, 13 Apr 2010 12:50:26 +0200 Subject: [Gambas-user] Showing the Form's Gui In-Reply-To: <201004132040.42997.rterry@...1946...> References: <201004132040.42997.rterry@...1946...> Message-ID: <4BC44C72.5000207@...1909...> richard terry ha scritto: > Often with forms one wants to start some processing after the form has loaded > - in my case, as my app is quite database intensive, it could involve loading > sometimes quite large amounts of data. > > I'd ideally like to have the form load visually, and then the data loading to > take place once the form is visible to the user, but if one includes this > loading in the usual events of _new, show() , then the gui-dosn't appear until > after the database loading and putting a Wait command before the processing > starts dosn't seem to help. > > Any idea's how to put this sort of activity into the background so the gui > appears instantly to the user. > I found that a good solution is to use a timer: any short delay is good (50 ms?). You activate the timer in the show() event and, in the timer event, you disable it and proceed with the lenghty operations. Regards, Doriano From rterry at ...1946... Tue Apr 13 14:01:19 2010 From: rterry at ...1946... (richard terry) Date: Tue, 13 Apr 2010 22:01:19 +1000 Subject: [Gambas-user] Showing the Form's Gui In-Reply-To: <4BC44C72.5000207@...1909...> References: <201004132040.42997.rterry@...1946...> <4BC44C72.5000207@...1909...> Message-ID: <201004132201.19767.rterry@...1946...> On Tuesday 13 April 2010 20:50:26 Doriano Blengino wrote: Thanks doriano, that worked a treat, looks much better, will try with some other forms which have the same problem. > richard terry ha scritto: > > Often with forms one wants to start some processing after the form has > > loaded - in my case, as my app is quite database intensive, it could > > involve loading sometimes quite large amounts of data. > > > > I'd ideally like to have the form load visually, and then the data > > loading to take place once the form is visible to the user, but if one > > includes this loading in the usual events of _new, show() , then the > > gui-dosn't appear until after the database loading and putting a Wait > > command before the processing starts dosn't seem to help. > > > > Any idea's how to put this sort of activity into the background so the > > gui appears instantly to the user. > > I found that a good solution is to use a timer: any short delay is good > (50 ms?). You activate the timer in the show() event and, in the timer > event, you disable it and proceed with the lenghty operations. > > Regards, > Doriano > > > --------------------------------------------------------------------------- > --- Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas.fr at ...626... Tue Apr 13 15:19:28 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Tue, 13 Apr 2010 15:19:28 +0200 Subject: [Gambas-user] Showing the Form's Gui In-Reply-To: <201004132201.19767.rterry@...1946...> References: <201004132040.42997.rterry@...1946...> <4BC44C72.5000207@...1909...> <201004132201.19767.rterry@...1946...> Message-ID: just remember to put a flag to say when the data are loaded ! 2010/4/13 richard terry : > On Tuesday 13 April 2010 20:50:26 Doriano Blengino wrote: > > Thanks doriano, that worked a treat, looks much better, will try with some > other ?forms which have the same problem. > > >> richard terry ha scritto: >> > Often with forms one wants to start some processing after the form has >> > loaded - in my case, as my app is quite database intensive, it could >> > involve loading sometimes quite large amounts of data. >> > >> > I'd ideally like to have the form load visually, and then the data >> > loading to take place once the form is visible to the user, but if one >> > includes this loading in the usual events of _new, show() , then the >> > gui-dosn't appear until after the database loading and putting a Wait >> > command before the processing starts dosn't seem to help. >> > >> > Any idea's how to put this sort of activity into the background so the >> > gui appears instantly to the user. >> >> I found that a good solution is to use a timer: any short delay is good >> (50 ms?). You activate the timer in the show() event and, in the timer >> event, you disable it and proceed with the lenghty operations. >> >> Regards, >> Doriano >> >> >> --------------------------------------------------------------------------- >> --- Download Intel® Parallel Studio Eval >> Try the new software tools for yourself. Speed compiling, find bugs >> proactively, and fine-tune applications for parallel performance. >> See why Intel Parallel Studio got high marks during beta. >> http://p.sf.net/sfu/intel-sw-dev >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From doriano.blengino at ...1909... Tue Apr 13 15:36:16 2010 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Tue, 13 Apr 2010 15:36:16 +0200 Subject: [Gambas-user] Showing the Form's Gui In-Reply-To: References: <201004132040.42997.rterry@...1946...> <4BC44C72.5000207@...1909...> <201004132201.19767.rterry@...1946...> Message-ID: <4BC47350.8070501@...1909...> Fabien Bodard ha scritto: > just remember to put a flag to say when the data are loaded ! > What would be the reason for this flag? > 2010/4/13 richard terry : > >> On Tuesday 13 April 2010 20:50:26 Doriano Blengino wrote: >> >> Thanks doriano, that worked a treat, looks much better, will try with some >> other forms which have the same problem. >> >> >> >>> richard terry ha scritto: >>> >>>> Often with forms one wants to start some processing after the form has >>>> loaded - in my case, as my app is quite database intensive, it could >>>> involve loading sometimes quite large amounts of data. >>>> >>>> I'd ideally like to have the form load visually, and then the data >>>> loading to take place once the form is visible to the user, but if one >>>> includes this loading in the usual events of _new, show() , then the >>>> gui-dosn't appear until after the database loading and putting a Wait >>>> command before the processing starts dosn't seem to help. >>>> >>>> Any idea's how to put this sort of activity into the background so the >>>> gui appears instantly to the user. >>>> >>> I found that a good solution is to use a timer: any short delay is good >>> (50 ms?). You activate the timer in the show() event and, in the timer >>> event, you disable it and proceed with the lenghty operations. >>> >>> Regards, >>> Doriano >>> From jussi.lahtinen at ...626... Tue Apr 13 15:39:55 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Tue, 13 Apr 2010 16:39:55 +0300 Subject: [Gambas-user] There are errors in the class "Key", and in the events KeyPress / KeyRelease? In-Reply-To: References: Message-ID: Confirmed with Gambas 2.20 rev 2890 @ Ubuntu 9.10 64bit. With GTK+: KeyPress, Key.Code: 0 Key.Text: a KeyRealease, Key.Code: 97 Key.Text: a With Qt: KeyPress, Key.Code: 65 Key.Text: a KeyRealease, Key.Code: 65 Key.Text: <-- BTW, there seems to be space. Code used for test: PUBLIC SUB TextBox1_KeyPress() PRINT "KeyPress, Key.Code: " & Key.Code & " Key.Text: " & Key.Text END PUBLIC SUB TextBox1_KeyRelease() PRINT "KeyRealease, Key.Code: " & Key.Code & " Key.Text: " & Key.Text END Jussi 2010/4/13 Fabi?n Flores Vadell : > Using Gambas 2.20, Ubuntu 9.10 with KDE 4.3.5 and GTK+ libraries > > Key.Code is not returned? Key.Text is lost? KeyRelease is not raised? > > Put a TextBox in a Form, then write the code to catch the pressed key. > Run it and press a number o letter key. > > PUBLIC SUB TextBox1_KeyPress() > ?PRINT Key.Code > ?PRINT Key.Text > END > > PUBLIC SUB TextBox1_KeyRelease() > ?PRINT Key.Code > ?PRINT Key.Text > END > > Result Tests (gb.qt) > ---------------------------- > > pressed the '5' key > > KeyPress: Key.Code = 53, Key.Text = "5" > > KeyRelease: Key.Code = 53, Key.Text = "" > > Randomly KeyRelease wasn't raised. > > > Result Test (gb.qt) > -------------------------- > > pressed the '5' key > > KeyPress: Key.Code = 0, Key.Text = "5" > > KeyRelease: Key.Code = 53, Key.Text = "5" > > Randomly KeyRelease wasn't raised. > > > Issues in two real proyects (I'm trying to isolate the problem): > --------------------------------------- > > KeyPress never is raised when gb.gtk is used. > > KeyPress sometimes is not raised when gb.qt is used. > > Key.Text is lost when the event KeyRelease is raised. > > -- > Fabi?n Flores Vadell > www.speedbooksargentina.blogspot.com > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas.fr at ...626... Tue Apr 13 15:42:54 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Tue, 13 Apr 2010 15:42:54 +0200 Subject: [Gambas-user] Showing the Form's Gui In-Reply-To: <4BC47350.8070501@...1909...> References: <201004132040.42997.rterry@...1946...> <4BC44C72.5000207@...1909...> <201004132201.19767.rterry@...1946...> <4BC47350.8070501@...1909...> Message-ID: 2010/4/13 Doriano Blengino : > Fabien Bodard ha scritto: >> just remember to put a flag to say when the data are loaded ! >> > What would be the reason for this flag? if the form is showed and the data not accessible ? > >> 2010/4/13 richard terry : >> >>> On Tuesday 13 April 2010 20:50:26 Doriano Blengino wrote: >>> >>> Thanks doriano, that worked a treat, looks much better, will try with some >>> other ?forms which have the same problem. >>> >>> >>> >>>> richard terry ha scritto: >>>> >>>>> Often with forms one wants to start some processing after the form has >>>>> loaded - in my case, as my app is quite database intensive, it could >>>>> involve loading sometimes quite large amounts of data. >>>>> >>>>> I'd ideally like to have the form load visually, and then the data >>>>> loading to take place once the form is visible to the user, but if one >>>>> includes this loading in the usual events of _new, show() , then the >>>>> gui-dosn't appear until after the database loading and putting a Wait >>>>> command before the processing starts dosn't seem to help. >>>>> >>>>> Any idea's how to put this sort of activity into the background so the >>>>> gui appears instantly to the user. >>>>> >>>> I found that a good solution is to use a timer: any short delay is good >>>> (50 ms?). You activate the timer in the show() event and, in the timer >>>> event, you disable it and proceed with the lenghty operations. >>>> >>>> Regards, >>>> Doriano >>>> > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From doriano.blengino at ...1909... Tue Apr 13 16:17:01 2010 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Tue, 13 Apr 2010 16:17:01 +0200 Subject: [Gambas-user] Showing the Form's Gui In-Reply-To: References: <201004132040.42997.rterry@...1946...> <4BC44C72.5000207@...1909...> <201004132201.19767.rterry@...1946...> <4BC47350.8070501@...1909...> Message-ID: <4BC47CDD.3060901@...1909...> Fabien Bodard ha scritto: > 2010/4/13 Doriano Blengino : > >> Fabien Bodard ha scritto: >> >>> just remember to put a flag to say when the data are loaded ! >>> >>> >> What would be the reason for this flag? >> > if the form is showed and the data not accessible ? > Really, there could be a problem if the user clicks a button 50 ms after the button (and the whole form) is visible. A remote possibility, and application-dependent. But I know users enough to imagine that someone could do it... :-) Reducing the interval of the one-shot timer can help, but does not solve (interval=0 could?). The better way is to disable actions the user could do with invalid data (application dependent: who says that the form is intended to receive clicks?), and perhaps add a nice label stating "Loading data, please wait..." and so on. Anyway, the flag is the worse solution. Supposing you use a flag, and the user clicks or types too fast, what would you do? A Message.Info("You clicked too fast. Go to have a coffee and come back later.")? :-) Better to disable some controls, so the user is informed before; in addition, controls are already "global variables" which carry informations with them. Well, this is my opinion - I hate to duplicate informations around, but someone else on this list, time ago, said "never use the GUI to store information". The problem with global (or class) variables is that you can forget them more easily than some property of a visible control. Regards, Doriano From fabianfloresvadell at ...626... Tue Apr 13 17:18:18 2010 From: fabianfloresvadell at ...626... (=?ISO-8859-1?Q?Fabi=E1n_Flores_Vadell?=) Date: Tue, 13 Apr 2010 12:18:18 -0300 Subject: [Gambas-user] static const? Message-ID: Hi everybody. Well, all us knows that a constant is something that can't change. Then, constants would be class members. So, when a class is instantiated, constants should be shared by all instances. The online help exclude the use of STATIC keyword in the declaration of constants, so the STATIC keyword would be innecesary. Is this really the case or is it necessary to declare the constants by the STATIC keyword? (STATIC [PUBLIC | PRIVATE] CONST) -- Fabi?n Flores Vadell www.speedbooksargentina.blogspot.com From fabianfloresvadell at ...626... Tue Apr 13 17:25:44 2010 From: fabianfloresvadell at ...626... (=?ISO-8859-1?Q?Fabi=E1n_Flores_Vadell?=) Date: Tue, 13 Apr 2010 12:25:44 -0300 Subject: [Gambas-user] There are errors in the class "Key", and in the events KeyPress / KeyRelease? In-Reply-To: References: Message-ID: > Confirmed with Gambas 2.20 rev 2890 @ Ubuntu 9.10 64bit. Thanks Jussi. In my tests the first set results corresponds to gb.gtk (erroneously I indicated gb.qt) -- Fabi?n Flores Vadell www.speedbooksargentina.blogspot.com From gambas at ...1... Tue Apr 13 18:31:18 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 13 Apr 2010 18:31:18 +0200 Subject: [Gambas-user] =?utf-8?q?There_are_errors_in_the_class_=22Key=22?= =?utf-8?q?=2C_and_in_the_events_KeyPress_/_=09KeyRelease=3F?= In-Reply-To: References: Message-ID: <201004131831.18817.gambas@...1...> > Using Gambas 2.20, Ubuntu 9.10 with KDE 4.3.5 and GTK+ libraries > > Key.Code is not returned? Key.Text is lost? KeyRelease is not raised? > > Put a TextBox in a Form, then write the code to catch the pressed key. > Run it and press a number o letter key. > > PUBLIC SUB TextBox1_KeyPress() > PRINT Key.Code > PRINT Key.Text > END > > PUBLIC SUB TextBox1_KeyRelease() > PRINT Key.Code > PRINT Key.Text > END > > Result Tests (gb.qt) > ---------------------------- > > pressed the '5' key > > KeyPress: Key.Code = 53, Key.Text = "5" > > KeyRelease: Key.Code = 53, Key.Text = "" Key.Text is not guaranteed to be set during a KeyRelease. > > Randomly KeyRelease wasn't raised. Please specify, I didn't notice any problem about that. > > > Result Test (gb.qt) I think you meant gb.gtk instead. > -------------------------- > > pressed the '5' key > > KeyPress: Key.Code = 0, Key.Text = "5" Yep, this is a bug I fixed in revision #2891. I'm almost sure that it worked before, so maybe a recent change in GTK+ made my code fail. > > KeyRelease: Key.Code = 53, Key.Text = "5" > > Randomly KeyRelease wasn't raised. Please specify, I didn't notice any problem about that. > > > Issues in two real proyects (I'm trying to isolate the problem): > --------------------------------------- > > KeyPress never is raised when gb.gtk is used. No, it is raised, but Key.Code was zero. > > KeyPress sometimes is not raised when gb.qt is used. As I said before, I didn't notice that. So if you can tell me how to reproduce it, it would be a great thing. > > Key.Text is lost when the event KeyRelease is raised. It is actually not lost, it is just that it should be set only during a KeyPress event. gb.gtk is just more clever there. Regards, -- Beno?t Minisini From gambas at ...1... Tue Apr 13 18:33:16 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 13 Apr 2010 18:33:16 +0200 Subject: [Gambas-user] static const? In-Reply-To: References: Message-ID: <201004131833.16852.gambas@...1...> > Hi everybody. > > Well, all us knows that a constant is something that can't change. > Then, constants would be class members. So, when a class is > instantiated, constants should be shared by all instances. > > The online help exclude the use of STATIC keyword in the declaration > of constants, so the STATIC keyword would be innecesary. Is this > really the case or is it necessary to declare the constants by the > STATIC keyword? (STATIC [PUBLIC | PRIVATE] CONST) No STATIC with CONST. Or maybe the compiler is more tolerant than that? -- Beno?t Minisini From oceanosoftlapalma at ...626... Tue Apr 13 20:04:04 2010 From: oceanosoftlapalma at ...626... (=?ISO-8859-1?Q?Ricardo_D=EDaz_Mart=EDn?=) Date: Tue, 13 Apr 2010 20:04:04 +0200 Subject: [Gambas-user] Showing the Form's Gui In-Reply-To: <4BC47CDD.3060901@...1909...> References: <201004132040.42997.rterry@...1946...> <4BC44C72.5000207@...1909...> <201004132201.19767.rterry@...1946...> <4BC47350.8070501@...1909...> <4BC47CDD.3060901@...1909...> Message-ID: If It can help to someone, this is I always do: When I'm going to open a form, I always call my own OpenForm(FormName as String, Parameters as String) sub. This sub is not inside the form I'm going to open. It's a public sub that's is inside a utilities module. OpenForm() sub create new object with the form (f.e. FRMMain) and put its reference inside a public collection called OpenedForms. Before to show form to the user, I show other form with a progress bar and a label showing "Loading..." and I'm going executing SQL, show/hid controls, etc... with no show anything. If there are a fixed steps to data load, I updated progress bar and when load process finish I show the form. I use this in all my apps (since lot of years when I never eared about gambas and I was programing in VB, Access, Java, etc...) and for me is the best option. For sure there is a lot of ways to do this. Regards, Ricardo D?az 2010/4/13 Doriano Blengino > Fabien Bodard ha scritto: > > 2010/4/13 Doriano Blengino : > > > >> Fabien Bodard ha scritto: > >> > >>> just remember to put a flag to say when the data are loaded ! > >>> > >>> > >> What would be the reason for this flag? > >> > > if the form is showed and the data not accessible ? > > > Really, there could be a problem if the user clicks a button 50 ms after > the button (and the whole form) is visible. A remote possibility, and > application-dependent. But I know users enough to imagine that someone > could do it... :-) > > Reducing the interval of the one-shot timer can help, but does not solve > (interval=0 could?). The better way is to disable actions the user could > do with invalid data (application dependent: who says that the form is > intended to receive clicks?), and perhaps add a nice label stating > "Loading data, please wait..." and so on. > > Anyway, the flag is the worse solution. Supposing you use a flag, and > the user clicks or types too fast, what would you do? A > Message.Info("You clicked too fast. Go to have a coffee and come back > later.")? :-) Better to disable some controls, so the user is informed > before; in addition, controls are already "global variables" which carry > informations with them. Well, this is my opinion - I hate to duplicate > informations around, but someone else on this list, time ago, said > "never use the GUI to store information". The problem with global (or > class) variables is that you can forget them more easily than some > property of a visible control. > > Regards, > Doriano > > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From jussi.lahtinen at ...626... Tue Apr 13 20:13:46 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Tue, 13 Apr 2010 21:13:46 +0300 Subject: [Gambas-user] There are errors in the class "Key", and in the events KeyPress / KeyRelease? In-Reply-To: <201004131831.18817.gambas@...1...> References: <201004131831.18817.gambas@...1...> Message-ID: I wasn't very accurate... I couldn't reproduce random missed events either. Just missing Key.Code. I think that Key.Text behaviour should be consistent between GTK+ and Qt. Jussi 2010/4/13 Beno?t Minisini : >> Using Gambas 2.20, Ubuntu 9.10 with KDE 4.3.5 and GTK+ libraries >> >> Key.Code is not returned? Key.Text is lost? KeyRelease is not raised? >> >> Put a TextBox in a Form, then write the code to catch the pressed key. >> Run it and press a number o letter key. >> >> PUBLIC SUB TextBox1_KeyPress() >> ? PRINT Key.Code >> ? PRINT Key.Text >> END >> >> PUBLIC SUB TextBox1_KeyRelease() >> ? PRINT Key.Code >> ? PRINT Key.Text >> END >> >> Result Tests (gb.qt) >> ---------------------------- >> >> pressed the '5' key >> >> KeyPress: Key.Code = 53, Key.Text = "5" >> >> KeyRelease: Key.Code = 53, Key.Text = "" > > Key.Text is not guaranteed to be set during a KeyRelease. > >> >> Randomly KeyRelease wasn't raised. > > Please specify, I didn't notice any problem about that. > >> >> >> Result Test (gb.qt) > > I think you meant gb.gtk instead. > >> -------------------------- >> >> pressed the '5' key >> >> KeyPress: Key.Code = 0, Key.Text = "5" > > Yep, this is a bug I fixed in revision #2891. I'm almost sure that it worked > before, so maybe a recent change in GTK+ made my code fail. > >> >> KeyRelease: Key.Code = 53, Key.Text = "5" >> >> Randomly KeyRelease wasn't raised. > > Please specify, I didn't notice any problem about that. > >> >> >> Issues in two real proyects (I'm trying to isolate the problem): >> --------------------------------------- >> >> KeyPress never is raised when gb.gtk is used. > > No, it is raised, but Key.Code was zero. > >> >> KeyPress sometimes is not raised when gb.qt is used. > > As I said before, I didn't notice that. So if you can tell me how to reproduce > it, it would be a great thing. > >> >> Key.Text is lost when the event KeyRelease is raised. > > It is actually not lost, it is just that it should be set only during a > KeyPress event. gb.gtk is just more clever there. > > Regards, > > -- > Beno?t Minisini > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From fabianfloresvadell at ...626... Tue Apr 13 21:11:10 2010 From: fabianfloresvadell at ...626... (=?ISO-8859-1?Q?Fabi=E1n_Flores_Vadell?=) Date: Tue, 13 Apr 2010 16:11:10 -0300 Subject: [Gambas-user] static const? In-Reply-To: <201004131833.16852.gambas@...1...> References: <201004131833.16852.gambas@...1...> Message-ID: > No STATIC with CONST. Or maybe the compiler is more tolerant than that? Maybe the compiler is a too much good guy :) I think that the compiler shouldn't allow to do something like that: PUBLIC FUNCTION ScanTab(IdCaption AS Integer) AS Integer ??DIM a AS Integer = 0 ??DIM b AS Integer = 0 ??FOR a = 1 TO TabStrip3.Count STEP 1 ?? ? ?IF TabStrip3[(a - 1)].Caption = IdCaption THEN ?? ? ? ? b = a ?? ? ? ? a = TabStrip3.Count ?? ? ? ? RETURN a ?? ? ?ENDIF ??NEXT END Someone thought that this code is good one. Leaving aside the obvious conceptual confusion of the author, and that the routine doesn't do what it claims, it is important to note that it is possible to change the variable that controls the FOR structure, and included the return statement inside the loop. I think the compiler should not allow these things, at least for mercy through the eyes of those who are finally forced to read code like this. -- Fabi?n Flores Vadell www.speedbooksargentina.blogspot.com From gambas at ...1... Tue Apr 13 21:22:41 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 13 Apr 2010 21:22:41 +0200 Subject: [Gambas-user] static const? In-Reply-To: References: <201004131833.16852.gambas@...1...> Message-ID: <201004132122.41117.gambas@...1...> > > No STATIC with CONST. Or maybe the compiler is more tolerant than that? > > Maybe the compiler is a too much good guy :) > > I think that the compiler shouldn't allow to do something like that: > > > PUBLIC FUNCTION ScanTab(IdCaption AS Integer) AS Integer > > DIM a AS Integer = 0 > DIM b AS Integer = 0 > > FOR a = 1 TO TabStrip3.Count STEP 1 > IF TabStrip3[(a - 1)].Caption = IdCaption THEN > b = a > a = TabStrip3.Count > RETURN a > ENDIF > NEXT > > END > > > Someone thought that this code is good one. > > Leaving aside the obvious conceptual confusion of the author, and that > the routine doesn't do what it claims, it is important to note that it > is possible to change the variable that controls the FOR structure, > and included the return statement inside the loop. > > I think the compiler should not allow these things, at least for mercy > through the eyes of those who are finally forced to read code like > this. Why shouldn't the compiler allow to modify a loop variable? It is sometimes useful. Why shouldn't the compiler allow to return from inside a loop? It is perfectly valid to do that. A bad programmer using some syntax for writing bad code does not necessary imply that that syntax should be forbidden. Regards, -- Beno?t Minisini From jussi.lahtinen at ...626... Tue Apr 13 21:29:30 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Tue, 13 Apr 2010 22:29:30 +0300 Subject: [Gambas-user] static const? In-Reply-To: References: <201004131833.16852.gambas@...1...> Message-ID: Generally bad code... What that supposed to do? Either it will return TabStrip3.Count or zero. This would do exactly same thing: PUBLIC FUNCTION ScanTab(IdCaption AS Integer) AS Integer FOR a = 0 TO TabStrip3.Count - 1 IF TabStrip3[a].Caption = IdCaption THEN RETURN TabStrip3.Count ENDIF NEXT END Jussi 2010/4/13 Fabi?n Flores Vadell : >> No STATIC with CONST. Or maybe the compiler is more tolerant than that? > > Maybe the compiler is a too much good guy :) > > I think that the compiler shouldn't allow to do something like that: > > > PUBLIC FUNCTION ScanTab(IdCaption AS Integer) AS Integer > > ??DIM a AS Integer = 0 > ??DIM b AS Integer = 0 > > ??FOR a = 1 TO TabStrip3.Count STEP 1 > ?? ? ?IF TabStrip3[(a - 1)].Caption = IdCaption THEN > ?? ? ? ? b = a > ?? ? ? ? a = TabStrip3.Count > ?? ? ? ? RETURN a > ?? ? ?ENDIF > ??NEXT > > END > > > Someone thought that this code is good one. > > Leaving aside the obvious conceptual confusion of the author, and that > the routine doesn't do what it claims, it is important to note that it > is possible to change the variable that controls the FOR structure, > and included the return statement inside the loop. > > I think the compiler should not allow these things, at least for mercy > through the eyes of those who are finally forced to read code like > this. > > > -- > Fabi?n Flores Vadell > www.speedbooksargentina.blogspot.com > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From jussi.lahtinen at ...626... Tue Apr 13 21:31:48 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Tue, 13 Apr 2010 22:31:48 +0300 Subject: [Gambas-user] static const? In-Reply-To: References: <201004131833.16852.gambas@...1...> Message-ID: I forgot "Dim a as integer" but you got the point. Jussi On Tue, Apr 13, 2010 at 22:29, Jussi Lahtinen wrote: > Generally bad code... > What that supposed to do? > Either it will return TabStrip3.Count or zero. > > This would do exactly same thing: > > PUBLIC FUNCTION ScanTab(IdCaption AS Integer) AS Integer > > ?FOR a = 0 TO TabStrip3.Count - 1 > ? ? ?IF TabStrip3[a].Caption = IdCaption THEN > ? ? ? ? RETURN TabStrip3.Count > ? ? ?ENDIF > ?NEXT > > END > > Jussi > > > 2010/4/13 Fabi?n Flores Vadell : >>> No STATIC with CONST. Or maybe the compiler is more tolerant than that? >> >> Maybe the compiler is a too much good guy :) >> >> I think that the compiler shouldn't allow to do something like that: >> >> >> PUBLIC FUNCTION ScanTab(IdCaption AS Integer) AS Integer >> >> ??DIM a AS Integer = 0 >> ??DIM b AS Integer = 0 >> >> ??FOR a = 1 TO TabStrip3.Count STEP 1 >> ?? ? ?IF TabStrip3[(a - 1)].Caption = IdCaption THEN >> ?? ? ? ? b = a >> ?? ? ? ? a = TabStrip3.Count >> ?? ? ? ? RETURN a >> ?? ? ?ENDIF >> ??NEXT >> >> END >> >> >> Someone thought that this code is good one. >> >> Leaving aside the obvious conceptual confusion of the author, and that >> the routine doesn't do what it claims, it is important to note that it >> is possible to change the variable that controls the FOR structure, >> and included the return statement inside the loop. >> >> I think the compiler should not allow these things, at least for mercy >> through the eyes of those who are finally forced to read code like >> this. >> >> >> -- >> Fabi?n Flores Vadell >> www.speedbooksargentina.blogspot.com >> >> ------------------------------------------------------------------------------ >> Download Intel® Parallel Studio Eval >> Try the new software tools for yourself. Speed compiling, find bugs >> proactively, and fine-tune applications for parallel performance. >> See why Intel Parallel Studio got high marks during beta. >> http://p.sf.net/sfu/intel-sw-dev >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > From fabianfloresvadell at ...626... Tue Apr 13 21:43:31 2010 From: fabianfloresvadell at ...626... (=?ISO-8859-1?Q?Fabi=E1n_Flores_Vadell?=) Date: Tue, 13 Apr 2010 16:43:31 -0300 Subject: [Gambas-user] There are errors in the class "Key", and in the events KeyPress / KeyRelease? In-Reply-To: <201004131831.18817.gambas@...1...> References: <201004131831.18817.gambas@...1...> Message-ID: > Key.Text is not guaranteed to be set during a KeyRelease. (Do you means readed? Ok, you are look at from compiler dev perspective. Right?) Why it's in that way? >> Result Test (gb.qt) > > I think you meant gb.gtk instead. Yes. >> Issues in two real proyects (I'm trying to isolate the problem): >> --------------------------------------- >> >> KeyPress never is raised when gb.gtk is used. > > No, it is raised, but Key.Code was zero. Uhmm, I don't think so. In the project at I'm refering, event manager is never executed. (I put a breakpoint at the beginning of event handler and the execution flow never went there.). The project isn't mine, and for now the code a little dirty. So, I will try to found time for cleaning the code and isolate the problem. >> Key.Text is lost when the event KeyRelease is raised. > > It is actually not lost, it is just that it should be set only during a > KeyPress event. gb.gtk is just more clever there. I don't understand. This a QT problem? If so, then can not be fixed? >> KeyPress sometimes is not raised when gb.qt is used. > > As I said before, I didn't notice that. So if you can tell me how to reproduce > it, it would be a great thing. Uhhmmm, an aditional problem is the random nature of the error. But, I try to confirm it. (Maybe it was an error of appreciation on my part). -- Fabi?n Flores Vadell www.speedbooksargentina.blogspot.com From fabianfloresvadell at ...626... Tue Apr 13 23:24:46 2010 From: fabianfloresvadell at ...626... (=?ISO-8859-1?Q?Fabi=E1n_Flores_Vadell?=) Date: Tue, 13 Apr 2010 18:24:46 -0300 Subject: [Gambas-user] static const? In-Reply-To: <201004132122.41117.gambas@...1...> References: <201004131833.16852.gambas@...1...> <201004132122.41117.gambas@...1...> Message-ID: > Why shouldn't the compiler allow to modify a loop variable? It is sometimes > useful. I'm refering to the loop FOR only. IMHO, WHILE and REPEAT are good structures that allow at programmer take absolute control over iterations, objective of FOR is iterate all items of a memory structure. At least, I think that was of the original design purpose (distorted after). In fact, the need of FOR structure is relative. Any need can be easily cover with WHILE and REPEAT. I don't see the need for break a iteration structure from inside, in any way (even break and continue). This would be done from conditional input or output of the structure. But I see the consecuences. May be, the exeption to this is FOR EACH structure. > Why shouldn't the compiler allow to return from inside a loop? It is perfectly > valid to do that. Why allow break a loop in this way? That often leads to write multiple statements RETURN in a function. That does not comply with the theorem of structured programming (that have as one of its premises allow only a input point and unique exit). I think that in practice this difficults the tests; if necesary to port the code, this could be an aditional problem; among other things. > A bad programmer using some syntax for writing bad code does not necessary > imply that that syntax should be forbidden. I agree, but actually I was thinking that this affect more to those who approach programming in an informal way. -- Fabi?n Flores Vadell www.speedbooksargentina.blogspot.com From fabianfloresvadell at ...626... Tue Apr 13 23:29:58 2010 From: fabianfloresvadell at ...626... (=?ISO-8859-1?Q?Fabi=E1n_Flores_Vadell?=) Date: Tue, 13 Apr 2010 18:29:58 -0300 Subject: [Gambas-user] static const? In-Reply-To: References: <201004131833.16852.gambas@...1...> Message-ID: 2010/4/13 Jussi Lahtinen : > I forgot "Dim a as integer" but you got the point. > > Jussi Yes Jussi. But my point isn't to do that the code work, it's show a bad use of language resources. -- Fabi?n Flores Vadell www.speedbooksargentina.blogspot.com From jussi.lahtinen at ...626... Wed Apr 14 00:55:29 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Wed, 14 Apr 2010 01:55:29 +0300 Subject: [Gambas-user] static const? In-Reply-To: References: <201004131833.16852.gambas@...1...> <201004132122.41117.gambas@...1...> Message-ID: First you referred to FOR loop only, but with case of return command you are talking more generally about loops? Or so I understand as you are speaking about it's influence to code structure. Consider this, if you have VERY long iteration and but you are done with first element of iteration. Then there is no reason to continue iteration anymore, because it is just waste of time. Let's take your example (I did clean it up): PUBLIC FUNCTION ScanTab(IdCaption AS Integer) AS Integer Dim a as Integer FOR a = 0 TO TabStrip3.Count - 1 IF TabStrip3[a].Caption = IdCaption THEN RETURN TabStrip3.Count ENDIF NEXT RETURN 0 END Now this is not very realistic case with this example, but let's pretend it is so. Let's say that this iteration takes 10 second to run trough and there are 10 items. When first item is what is needed, then this function takes only 1 second to execute. If we do not break that loop it will always take 10 seconds. Just to make sure, you meant it should be like this? PUBLIC FUNCTION ScanTab(IdCaption AS Integer) AS Integer Dim a as Integer Dim b as Integer FOR a = 0 TO TabStrip3.Count - 1 IF TabStrip3[a].Caption = IdCaption THEN b = TabStrip3.Count ENDIF NEXT RETURN b END Also you should notice, that this is normal practice in Basic languages. And therefore also question of portability. Jussi 2010/4/14 Fabi?n Flores Vadell : >> Why shouldn't the compiler allow to modify a loop variable? It is sometimes >> useful. > > I'm refering to the loop FOR only. IMHO, WHILE and REPEAT are good > structures that allow at programmer take absolute control over > iterations, objective of FOR is iterate all items of a memory > structure. At least, I think that was of the original design purpose > (distorted after). > > In fact, the need of FOR structure is relative. Any need can be easily > cover with WHILE and REPEAT. > > I don't see the need for break a iteration structure from inside, in > any way (even break and continue). This would be done from conditional > input or output of the structure. But I see the consecuences. > > May be, the exeption to this is FOR EACH structure. > >> Why shouldn't the compiler allow to return from inside a loop? It is perfectly >> valid to do that. > > Why allow break a loop in this way? That often leads to write multiple > statements ?RETURN in a function. That does not comply with the > theorem of structured programming (that have as one of its premises > allow only a input point and unique exit). I think that in practice > this difficults the tests; if necesary to port the code, this could be > an aditional problem; among other things. > >> A bad programmer using some syntax for writing bad code does not necessary >> imply that that syntax should be forbidden. > > I agree, but actually I was thinking that this affect more to those > who approach programming in an informal way. > > > -- > Fabi?n Flores Vadell > www.speedbooksargentina.blogspot.com > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From jussi.lahtinen at ...626... Wed Apr 14 00:59:37 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Wed, 14 Apr 2010 01:59:37 +0300 Subject: [Gambas-user] static const? In-Reply-To: References: <201004131833.16852.gambas@...1...> <201004132122.41117.gambas@...1...> Message-ID: Aaa.... I think you meant it this way: PUBLIC FUNCTION ScanTab(IdCaption AS Integer) AS Integer Dim a as Integer Dim b as Integer REPEAT IF TabStrip3[a].Caption = IdCaption THEN b = TabStrip3.Count BREAK ENDIF WHILE a < TabStrip3.Count RETURN b END Jussi On Wed, Apr 14, 2010 at 01:55, Jussi Lahtinen wrote: > First you referred to FOR loop only, > but with case of return command you are talking more generally about loops? > Or so I understand as you are speaking about it's influence to code structure. > > Consider this, if you have VERY long iteration and but you are done > with first element of iteration. > Then there is no reason to continue iteration anymore, because it is > just waste of time. > > Let's take your example (I did clean it up): > > PUBLIC FUNCTION ScanTab(IdCaption AS Integer) AS Integer > Dim a as Integer > > ?FOR a = 0 TO TabStrip3.Count - 1 > ? ? IF TabStrip3[a].Caption = IdCaption THEN > ? ? ? ?RETURN TabStrip3.Count > ? ? ENDIF > ?NEXT > > RETURN 0 > END > > Now this is not very realistic case with this example, but let's > pretend it is so. > Let's say that this iteration takes 10 second to run trough and there > are 10 items. > When first item is what is needed, then this function takes only 1 > second to execute. > If we do not break that loop it will always take 10 seconds. > > Just to make sure, you meant it should be like this? > > PUBLIC FUNCTION ScanTab(IdCaption AS Integer) AS Integer > Dim a as Integer > Dim b as Integer > > ?FOR a = 0 TO TabStrip3.Count - 1 > ? ? IF TabStrip3[a].Caption = IdCaption THEN > ? ? ? ?b = TabStrip3.Count > ? ? ENDIF > ?NEXT > > RETURN b > END > > > Also you should notice, that this is normal practice in Basic languages. > And therefore also question of portability. > > Jussi > > > > 2010/4/14 Fabi?n Flores Vadell : >>> Why shouldn't the compiler allow to modify a loop variable? It is sometimes >>> useful. >> >> I'm refering to the loop FOR only. IMHO, WHILE and REPEAT are good >> structures that allow at programmer take absolute control over >> iterations, objective of FOR is iterate all items of a memory >> structure. At least, I think that was of the original design purpose >> (distorted after). >> >> In fact, the need of FOR structure is relative. Any need can be easily >> cover with WHILE and REPEAT. >> >> I don't see the need for break a iteration structure from inside, in >> any way (even break and continue). This would be done from conditional >> input or output of the structure. But I see the consecuences. >> >> May be, the exeption to this is FOR EACH structure. >> >>> Why shouldn't the compiler allow to return from inside a loop? It is perfectly >>> valid to do that. >> >> Why allow break a loop in this way? That often leads to write multiple >> statements ?RETURN in a function. That does not comply with the >> theorem of structured programming (that have as one of its premises >> allow only a input point and unique exit). I think that in practice >> this difficults the tests; if necesary to port the code, this could be >> an aditional problem; among other things. >> >>> A bad programmer using some syntax for writing bad code does not necessary >>> imply that that syntax should be forbidden. >> >> I agree, but actually I was thinking that this affect more to those >> who approach programming in an informal way. >> >> >> -- >> Fabi?n Flores Vadell >> www.speedbooksargentina.blogspot.com >> >> ------------------------------------------------------------------------------ >> Download Intel® Parallel Studio Eval >> Try the new software tools for yourself. Speed compiling, find bugs >> proactively, and fine-tune applications for parallel performance. >> See why Intel Parallel Studio got high marks during beta. >> http://p.sf.net/sfu/intel-sw-dev >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > From jussi.lahtinen at ...626... Wed Apr 14 01:01:36 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Wed, 14 Apr 2010 02:01:36 +0300 Subject: [Gambas-user] static const? In-Reply-To: References: <201004131833.16852.gambas@...1...> <201004132122.41117.gambas@...1...> Message-ID: Always forgetting something... "INC a". Jussi On Wed, Apr 14, 2010 at 01:59, Jussi Lahtinen wrote: > Aaa.... I think you meant it this way: > > PUBLIC FUNCTION ScanTab(IdCaption AS Integer) AS Integer > Dim a as Integer > Dim b as Integer > > REPEAT > ? IF TabStrip3[a].Caption = IdCaption THEN > ? ? ?b = TabStrip3.Count > ? ? ?BREAK > ? ENDIF > WHILE a < TabStrip3.Count > > RETURN b > END > > Jussi > > > On Wed, Apr 14, 2010 at 01:55, Jussi Lahtinen wrote: >> First you referred to FOR loop only, >> but with case of return command you are talking more generally about loops? >> Or so I understand as you are speaking about it's influence to code structure. >> >> Consider this, if you have VERY long iteration and but you are done >> with first element of iteration. >> Then there is no reason to continue iteration anymore, because it is >> just waste of time. >> >> Let's take your example (I did clean it up): >> >> PUBLIC FUNCTION ScanTab(IdCaption AS Integer) AS Integer >> Dim a as Integer >> >> ?FOR a = 0 TO TabStrip3.Count - 1 >> ? ? IF TabStrip3[a].Caption = IdCaption THEN >> ? ? ? ?RETURN TabStrip3.Count >> ? ? ENDIF >> ?NEXT >> >> RETURN 0 >> END >> >> Now this is not very realistic case with this example, but let's >> pretend it is so. >> Let's say that this iteration takes 10 second to run trough and there >> are 10 items. >> When first item is what is needed, then this function takes only 1 >> second to execute. >> If we do not break that loop it will always take 10 seconds. >> >> Just to make sure, you meant it should be like this? >> >> PUBLIC FUNCTION ScanTab(IdCaption AS Integer) AS Integer >> Dim a as Integer >> Dim b as Integer >> >> ?FOR a = 0 TO TabStrip3.Count - 1 >> ? ? IF TabStrip3[a].Caption = IdCaption THEN >> ? ? ? ?b = TabStrip3.Count >> ? ? ENDIF >> ?NEXT >> >> RETURN b >> END >> >> >> Also you should notice, that this is normal practice in Basic languages. >> And therefore also question of portability. >> >> Jussi >> >> >> >> 2010/4/14 Fabi?n Flores Vadell : >>>> Why shouldn't the compiler allow to modify a loop variable? It is sometimes >>>> useful. >>> >>> I'm refering to the loop FOR only. IMHO, WHILE and REPEAT are good >>> structures that allow at programmer take absolute control over >>> iterations, objective of FOR is iterate all items of a memory >>> structure. At least, I think that was of the original design purpose >>> (distorted after). >>> >>> In fact, the need of FOR structure is relative. Any need can be easily >>> cover with WHILE and REPEAT. >>> >>> I don't see the need for break a iteration structure from inside, in >>> any way (even break and continue). This would be done from conditional >>> input or output of the structure. But I see the consecuences. >>> >>> May be, the exeption to this is FOR EACH structure. >>> >>>> Why shouldn't the compiler allow to return from inside a loop? It is perfectly >>>> valid to do that. >>> >>> Why allow break a loop in this way? That often leads to write multiple >>> statements ?RETURN in a function. That does not comply with the >>> theorem of structured programming (that have as one of its premises >>> allow only a input point and unique exit). I think that in practice >>> this difficults the tests; if necesary to port the code, this could be >>> an aditional problem; among other things. >>> >>>> A bad programmer using some syntax for writing bad code does not necessary >>>> imply that that syntax should be forbidden. >>> >>> I agree, but actually I was thinking that this affect more to those >>> who approach programming in an informal way. >>> >>> >>> -- >>> Fabi?n Flores Vadell >>> www.speedbooksargentina.blogspot.com >>> >>> ------------------------------------------------------------------------------ >>> Download Intel® Parallel Studio Eval >>> Try the new software tools for yourself. Speed compiling, find bugs >>> proactively, and fine-tune applications for parallel performance. >>> See why Intel Parallel Studio got high marks during beta. >>> http://p.sf.net/sfu/intel-sw-dev >>> _______________________________________________ >>> Gambas-user mailing list >>> Gambas-user at lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>> >> > From fabianfloresvadell at ...626... Wed Apr 14 02:04:19 2010 From: fabianfloresvadell at ...626... (=?ISO-8859-1?Q?Fabi=E1n_Flores_Vadell?=) Date: Tue, 13 Apr 2010 21:04:19 -0300 Subject: [Gambas-user] static const? In-Reply-To: References: <201004131833.16852.gambas@...1...> <201004132122.41117.gambas@...1...> Message-ID: 2010/4/13 Jussi Lahtinen : > Aaa.... I think you meant it this way: > > PUBLIC FUNCTION ScanTab(IdCaption AS Integer) AS Integer > Dim a as Integer > Dim b as Integer > > REPEAT > ? IF TabStrip3[a].Caption = IdCaption THEN > ? ? ?b = TabStrip3.Count > ? ? ?BREAK > ? ENDIF > WHILE a < TabStrip3.Count > > RETURN b > END > > Jussi You're getting close. But, I think that is no need to break the loop using the BREAK sentence. Just you must find the right condition to the loop. I don't refer to that example anymore, because is easier explain it in a more abstract level: REPEAT 'do something UNTIL cond1 OR (cond2 AND cond3) ... WHILE cond1 AND cond2 OR cond3 'do something WEND Where one of the above conditions (condX) is that usually is write inside the loop to allow the BREAK or CONTINUE sentence (or RETURN). Just in case: REPEAT b = TabStrip3.Count ' In fact, this does nothing usefull INC a UNTIL a < TabStrip3.Count OR TabStrip3[a].Caption = IdCaption -- Fabi?n Flores Vadell www.speedbooksargentina.blogspot.com From jussi.lahtinen at ...626... Wed Apr 14 02:17:27 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Wed, 14 Apr 2010 03:17:27 +0300 Subject: [Gambas-user] static const? In-Reply-To: References: <201004131833.16852.gambas@...1...> <201004132122.41117.gambas@...1...> Message-ID: > Just in case: > > REPEAT > ? ? b = TabStrip3.Count ' In fact, this does nothing usefull > ? ? INC a > UNTIL a < TabStrip3.Count OR TabStrip3[a].Caption = IdCaption This doesn't make same functionality. Because if ldCaption doesn't match to any of tabstrip captions, function will still answer TabStrip3.Count instead of zero. In short, you cannot remove IF THEN construct. I think I have done enough errors for this day (I'm going to sleep). Jussi From fabianfloresvadell at ...626... Wed Apr 14 04:31:50 2010 From: fabianfloresvadell at ...626... (=?ISO-8859-1?Q?Fabi=E1n_Flores_Vadell?=) Date: Tue, 13 Apr 2010 23:31:50 -0300 Subject: [Gambas-user] static const? In-Reply-To: References: <201004131833.16852.gambas@...1...> <201004132122.41117.gambas@...1...> Message-ID: 2010/4/13 Jussi Lahtinen : >> Just in case: >> >> REPEAT >> ? ? b = TabStrip3.Count ' In fact, this does nothing usefull >> ? ? INC a >> UNTIL a < TabStrip3.Count OR TabStrip3[a].Caption = IdCaption > > ?This doesn't make same functionality. That is why I did not want to follow the example anymore. This function never had has any functionality, due to their errors. Neither, your version of the function, because it returns TabStrip3.Count which is the amount of tabs containing the control, ie always return the same value. > ?Because if ldCaption doesn't match to any of tabstrip captions, > ?function will still answer TabStrip3.Count instead of zero. > ?In short, you cannot remove IF THEN construct. Put it out of loop. The correct code: ------------------------ PRIVATE FUNCTION ScanTab(IdCaption AS String) AS Byte DIM a AS Byte = 0 WHILE (a < TabStrip1.Count - 1) AND (TabStrip1[a].Text <> IdCaption) INC a WEND RETURN IF(TabStrip1[a].Caption = IdCaption, a, -1) END > ?I think I have done enough errors for this day (I'm going to sleep). Sweet dreams (my childs are going to sleep right now, too). -- Fabi?n Flores Vadell www.speedbooksargentina.blogspot.com From doriano.blengino at ...1909... Wed Apr 14 10:55:18 2010 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Wed, 14 Apr 2010 10:55:18 +0200 Subject: [Gambas-user] static const? In-Reply-To: References: <201004131833.16852.gambas@...1...> <201004132122.41117.gambas@...1...> Message-ID: <4BC582F6.3010407@...1909...> Fabi?n Flores Vadell ha scritto: > 2010/4/13 Jussi Lahtinen: > >>> Just in case: >>> >>> REPEAT >>> b = TabStrip3.Count ' In fact, this does nothing usefull >>> INC a >>> UNTIL a< TabStrip3.Count OR TabStrip3[a].Caption = IdCaption >>> >> This doesn't make same functionality. >> I can't resist to add my mis-contribute... Back to the beginning: a CONST declaration is something that uses no memory, so it can not have instances, and hence it can not be STATIC. The C language, in facts, does not even have CONSTs - it goes with #define. So, it would be correct to forbid STATIC when declaring CONSTs. On the other hand, a CONST is always static, because the effective data it describes reside in a memory outside the program - they reside in the compiler memory. About the cycles WHILE, FOR, REPEAT and so on, I think the statements BREAK and CONTINUE are very useful (I would add a third statement: RESTART): they permit a finer control and many times they are clearer than complex tests. . Your example only has two test, against COUNT and the CAPTION. What kind of test would you write if the conditions were 15? Perhaps concatenated (I mean, some test are only meaningful when other conditions are met). Finally, your last lines of code do not work: > PRIVATE FUNCTION ScanTab(IdCaption AS String) AS Byte > DIM a AS Byte = 0 > > WHILE (a< TabStrip1.Count - 1) AND (TabStrip1[a].Text<> IdCaption) > INC a > WEND > > RETURN IF(TabStrip1[a].Caption = IdCaption, a, -1) > END > Suppose you have a tabstrip with three tabs, and last, Tabstrip1[2] has the caption we want. In the first cycle, we test Tabstrip1[0]: does not match, and "a" turns 1 In the secon cycle, we test tabstrip1[1]: does not match and "a" turns 2 The third cycle does not get executed - "a" is 2, which is not less than "3-1" (it is equal). Moreover, your algorithm does a double test on caption, which could be avoided. Doing an additional test is not an important thing if the test is quick and the routine is called not too much often. What if the routine is called millions time, or the test is more heavy? About not using RETURN or BREAK inside cycles, we must think at different kind of cycles. The WHILE and alike, where no variables are directly involved in the cycle declaration, never have problems - the semantic of the declaration does not imply anything about variable allocation. In the FOR cycles instead, other languages can do strange things, both on allocation and code optimization, so it is effectively a bad idea to fiddle with the loop control variable; in other languages this is not stressed the same way (basic, for example), but actually is, at least, ugly. It seems to me that you have said that an exception would be the FOR EACH cycle... why? Regards, Doriano From shordi at ...626... Wed Apr 14 11:59:03 2010 From: shordi at ...626... (=?ISO-8859-1?Q?Jorge_Carri=F3n?=) Date: Wed, 14 Apr 2010 11:59:03 +0200 Subject: [Gambas-user] Showing the Form's Gui In-Reply-To: References: <201004132040.42997.rterry@...1946...> <4BC44C72.5000207@...1909...> <201004132201.19767.rterry@...1946...> <4BC47350.8070501@...1909...> <4BC47CDD.3060901@...1909...> Message-ID: Ricardo: Could you post a example of your open forms method? I'm very interested on it. It sound like something I have searching for a long time. Gracias Jorge 2010/4/13 Ricardo D?az Mart?n > If It can help to someone, this is I always do: > > When I'm going to open a form, I always call my own OpenForm(FormName as > String, Parameters as String) sub. This sub is not inside the form I'm > going > to open. It's a public sub that's is inside a utilities module. > > OpenForm() sub create new object with the form (f.e. FRMMain) and put its > reference inside a public collection called OpenedForms. Before to show > form > to the user, I show other form with a progress bar and a label showing > "Loading..." and I'm going executing SQL, show/hid controls, etc... with no > show anything. If there are a fixed steps to data load, I updated progress > bar and when load process finish I show the form. > > I use this in all my apps (since lot of years when I never eared about > gambas and I was programing in VB, Access, Java, etc...) and for me is the > best option. For sure there is a lot of ways to do this. > > Regards, > Ricardo D?az > > > > 2010/4/13 Doriano Blengino > > > Fabien Bodard ha scritto: > > > 2010/4/13 Doriano Blengino : > > > > > >> Fabien Bodard ha scritto: > > >> > > >>> just remember to put a flag to say when the data are loaded ! > > >>> > > >>> > > >> What would be the reason for this flag? > > >> > > > if the form is showed and the data not accessible ? > > > > > Really, there could be a problem if the user clicks a button 50 ms after > > the button (and the whole form) is visible. A remote possibility, and > > application-dependent. But I know users enough to imagine that someone > > could do it... :-) > > > > Reducing the interval of the one-shot timer can help, but does not solve > > (interval=0 could?). The better way is to disable actions the user could > > do with invalid data (application dependent: who says that the form is > > intended to receive clicks?), and perhaps add a nice label stating > > "Loading data, please wait..." and so on. > > > > Anyway, the flag is the worse solution. Supposing you use a flag, and > > the user clicks or types too fast, what would you do? A > > Message.Info("You clicked too fast. Go to have a coffee and come back > > later.")? :-) Better to disable some controls, so the user is informed > > before; in addition, controls are already "global variables" which carry > > informations with them. Well, this is my opinion - I hate to duplicate > > informations around, but someone else on this list, time ago, said > > "never use the GUI to store information". The problem with global (or > > class) variables is that you can forget them more easily than some > > property of a visible control. > > > > Regards, > > Doriano > > > > > > > > > ------------------------------------------------------------------------------ > > Download Intel® Parallel Studio Eval > > Try the new software tools for yourself. Speed compiling, find bugs > > proactively, and fine-tune applications for parallel performance. > > See why Intel Parallel Studio got high marks during beta. > > http://p.sf.net/sfu/intel-sw-dev > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From Gambas at ...1950... Wed Apr 14 13:09:47 2010 From: Gambas at ...1950... (Caveat) Date: Wed, 14 Apr 2010 13:09:47 +0200 Subject: [Gambas-user] Showing the Form's Gui In-Reply-To: References: <201004132040.42997.rterry@...1946...> <4BC44C72.5000207@...1909...> <201004132201.19767.rterry@...1946...> <4BC47350.8070501@...1909...> <4BC47CDD.3060901@...1909...> Message-ID: <1271243387.14901.541.camel@...2413...> Hi Jorge, While we wait to see if Ricardo wants to share his open forms method (I'm also interested to see it), here's some code I have used before (see attachment) where the opening/closing of forms is handled by a module, which I've called RunController. The module is set as the Startup Class (normally that's by default the first Form you declare I think) and must have a Main() method. Right-clicking on the module brings up a context menu where you can click on the Startup Class checkbox. You can see that the RunController module can decide when it opens each form (so you could have some long-running data extraction go on in the background), and handles events raised by the forms (in conjunction with Attach, making sure RunController actually gets the events). One of the first things RunController does is to decide "should I first open up the settings form (no Dragons defined yet)?" or "should I show the main form already (at least one Dragon exists in settings)?": IF theSettings.getDragonCount() = 0 THEN settingsFrm = NEW SettingsForm settingsFrm.Show Object.Attach(settingsFrm, ME, "SettingsFrm") ELSE Logger.logMessage("RunController.Main() dragon found, so starting Remote Control", FALSE) remC = NEW RemoteControl remC.Show Object.Attach(remC, ME, "Remote") tCop = NEW TrafficCop tCop.show Object.Attach(tCop, ME, "Cop") END IF One limitation of my approach is that you need to explicitly declare each form you're going to use up-front, so I'm interested to see if Ricardo's approach avoids that. Regards, Caveat On Wed, 2010-04-14 at 11:59 +0200, Jorge Carri?n wrote: > Ricardo: > Could you post a example of your open forms method? I'm very interested on > it. It sound like something I have searching for a long time. > > Gracias > > Jorge > > > 2010/4/13 Ricardo D?az Mart?n > > > If It can help to someone, this is I always do: > > > > When I'm going to open a form, I always call my own OpenForm(FormName as > > String, Parameters as String) sub. This sub is not inside the form I'm > > going > > to open. It's a public sub that's is inside a utilities module. > > > > OpenForm() sub create new object with the form (f.e. FRMMain) and put its > > reference inside a public collection called OpenedForms. Before to show > > form > > to the user, I show other form with a progress bar and a label showing > > "Loading..." and I'm going executing SQL, show/hid controls, etc... with no > > show anything. If there thrownare a fixed steps to data load, I updated progress > > bar and when load process finish I show the form. > > > > I use this in all my apps (since lot of years when I never eared about > > gambas and I was programing in VB, Access, Java, etc...) and for me is the > > best option. For sure there is a lot of ways to do this. > > > > Regards, > > Ricardo D?az > > > > > > > > 2010/4/13 Doriano Blengino > > > > > Fabien Bodard ha scritto: > > > > 2010/4/13 Doriano Blengino : > > > > > > > >> Fabien Bodard ha scritto: > > > >> > > > >>> just remember to put a flag to say when the data are loaded ! > > > >>> > > > >>> > > > >> What would be the reason for this flag? > > > >> > > > > if the form is showed and the data not accessible ? > > > > > > > Really, there could be a problem if the user clicks a button 50 ms after > > > the button (and the whole form) is visible. A remote possibility, and > > > application-dependent. But I know users enough to imagine that someone > > > could do it... :-) > > > > > > Reducing the interval of the one-shot timer can help, but does not solve > > > (interval=0 could?). The better way is to disable actions the user could > > > do with invalid data (application dependent: who says that the form is > > > intended to receive clicks?), and perhaps add a nice label stating > > > "Loading data, please wait..." and so on. > > > > > > Anyway, the flag is the worse solution. Supposing you use a flag, and > > > the user clicks or types too fast, what would you do? A > > > Message.Info("You clicked too fast. Go to have a coffee and come back > > > later.")? :-) Better to disable some controls, so the user is informed > > > before; in addition, controls are already "global variables" which carry > > > informations with them. Well, this is my opinion - I hate to duplicate > > > informations around, but someone else on this list, time ago, said > > > "never use the GUI to store information". The problem with global (or > > > class) variables is that you can forget them more easily than some > > > property of a visible control. > > > > > > Regards, > > > Doriano > > > > > > > > > > > > > > ------------------------------------------------------------------------------ > > > Download Intel® Parallel Studio Eval > > > Try the new software tools for yourself. Speed compiling, find bugs > > > proactively, and fine-tune applications for parallel performance. > > > See why Intel Parallel Studio got high marks during beta. > > > http://p.sf.net/sfu/intel-sw-dev > > > _______________________________________________ > > > Gambas-user mailing list > > > Gambas-user at lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > > ------------------------------------------------------------------------------ > > Download Intel® Parallel Studio Eval > > Try the new software tools for yourself. Speed compiling, find bugs > > proactively, and fine-tune applications for parallel performance. > > See why Intel Parallel Studio got high marks during beta. > > http://p.sf.net/sfu/intel-sw-dev > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user -------------- next part -------------- ' Gambas module file CONST VERSION AS String = "v.0.9.9" ' Forms used in this App PRIVATE settingsFrm AS SettingsForm PRIVATE shoutCastFrm AS ShoutCast PRIVATE remC AS RemoteControl PRIVATE streamerFrm AS Streamer PRIVATE tCop AS TrafficCop ' AllSettings is the master settings holder, contains last window size and position for the main App, ' as well as a collection of DragonSettings objects for each Dragon that's been defined PRIVATE theSettings AS AllSettings PUBLIC SUB Main() Logger.setDebugMode(Logger.DEBUG_LOG_AND_PRINT) Logger.logMessage("RunController.Main() The beginning of it all!! **************", FALSE) theSettings = NEW AllSettings IF theSettings.getDragonCount() = 0 THEN settingsFrm = NEW SettingsForm settingsFrm.Show Object.Attach(settingsFrm, ME, "SettingsFrm") ELSE Logger.logMessage("RunController.Main() dragon found, so starting Remote Control", FALSE) remC = NEW RemoteControl remC.Show Object.Attach(remC, ME, "Remote") tCop = NEW TrafficCop tCop.show Object.Attach(tCop, ME, "Cop") END IF END PUBLIC SUB SettingsFrm_OK_Clicked() Logger.logMessage("RunController.SettingsFrm_OK_Clicked EVENT Caught!", FALSE) theSettings.save() object.Detach(settingsFrm) settingsFrm.Close() remC = NEW RemoteControl Logger.logMessage("RunController.SettingsFrm_OK_Clicked() created new RemoteControl instance", FALSE) remC.Show Object.Attach(remC, ME, "Remote") END PUBLIC SUB Remote_changeSettings() Logger.logMessage("RunController.Remote_changeSettings EVENT Caught!", FALSE) object.Detach(remC) remC.Close() remC = NULL settingsFrm = NEW SettingsForm settingsFrm.Show Object.Attach(settingsFrm, ME, "SettingsFrm") END PUBLIC SUB Remote_changeShoutCast() Logger.logMessage("RunController.Remote_changeShoutCast EVENT Caught!", FALSE) object.Detach(remC) remC.Close() shoutCastFrm = NEW ShoutCast shoutCastFrm.Show Object.Attach(shoutCastFrm, ME, "ShoutCastFrm") END PUBLIC SUB Remote_changeStreaming() Logger.logMessage("RunController.Remote_changeStreaming EVENT Caught!", FALSE) object.Detach(remC) remC.Close() streamerFrm = NEW Streamer streamerFrm.Show Object.Attach(streamerFrm, ME, "StreamerFrm") END PUBLIC SUB Remote_logChanged(newValue AS Boolean) Logger.logMessage("RunController.Remote_logChanged EVENT Caught!", FALSE) Logger.logMessage("RunController.Remote_logChanged new value: " & Utils.booleanToString(newValue), FALSE) IF newValue THEN Logger.setDebugMode(Logger.DEBUG_LOG_AND_PRINT) ELSE Logger.setDebugMode(Logger.NO_DEBUG) END IF Settings["Dragon/ShowLog"] = newValue END PUBLIC SUB Remote_showLogChanged(newValue AS Boolean) Logger.logMessage("RunController.Remote_showLogChanged EVENT Caught!", FALSE) Logger.logMessage("RunController.Remote_showLogChanged new value: " & Utils.booleanToString(newValue), FALSE) IF newValue THEN IF tCop = NULL THEN tCop = NEW TrafficCop Object.Attach(tCop, ME, "Cop") END IF tCop.Show ELSE IF tCop = NULL THEN RETURN ELSE tCop.Hide END IF END IF Settings["Dragon/ShowLog"] = newValue END PUBLIC SUB Remote_shoutyChanged(newValue AS Boolean) Logger.logMessage("RunController.Remote_shoutyChanged EVENT Caught!", FALSE) Logger.logMessage("RunController.Remote_shoutyChanged new value: " & Utils.booleanToString(newValue), FALSE) Settings["Dragon/Shouty"] = newValue END PUBLIC SUB Remote_requestSent(requestData AS String) Logger.logMessage("RunController.Remote_requestSent EVENT Caught!", FALSE) Logger.logMessage("RunController.Remote_requestSent request data: " & requestData, FALSE) IF tCop = NULL THEN RETURN END IF tCop.requestSent(requestData) tCop.Refresh END PUBLIC SUB Remote_responseReceived(requestData AS String, responseData AS String) Logger.logMessage("RunController.Remote_responseReceived EVENT Caught!", FALSE) Logger.logMessage("RunController.Remote_responseReceived request data: " & requestData, FALSE) Logger.logMessage("RunController.Remote_responseReceived response data: " & responseData, FALSE) IF tCop = NULL THEN RETURN END IF tCop.responseReceived(responseData) tCop.Refresh END PUBLIC SUB Remote_Move() getSettings(FALSE).setXCoord(remC.X) getSettings(FALSE).setYCoord(remC.Y) END PUBLIC SUB Remote_Close() Logger.logMessage("RunController.Remote_Close() EVENT Caught!", FALSE) theSettings.save() QUIT END PUBLIC SUB Cop_Close() Logger.logMessage("RunController.Cop_Close() EVENT Caught!", FALSE) 'Remote_showLogChanged(FALSE) IF remC <> NULL THEN remC.setShowLog(FALSE) END IF tCop = NULL END PUBLIC SUB Remote_Resize() getSettings(FALSE).setWidth(remC.Width) getSettings(FALSE).setHeight(remC.Height) remC.Form_Resize END PUBLIC FUNCTION getSettings(refresh AS Boolean) AS AllSettings IF theSettings = NULL OR refresh THEN theSettings = NEW AllSettings END IF RETURN theSettings END From les at ...2337... Wed Apr 14 14:43:20 2010 From: les at ...2337... (Les Hardy) Date: Wed, 14 Apr 2010 13:43:20 +0100 Subject: [Gambas-user] static const? In-Reply-To: <4BC582F6.3010407@...1909...> References: <201004131833.16852.gambas@...1...> <201004132122.41117.gambas@...1...> <4BC582F6.3010407@...1909...> Message-ID: <4BC5B868.9060700@...2337...> > > The C language, in facts, does not even have CONSTs - it goes with > #define. So, it would be correct to forbid STATIC when declaring CONSTs. Surely this is not correct. ANSI C uses const, and C++ also uses the const keyword. #define (a preprocessor directive) is a relic from old C, and const is now recommended use instead. Also, it would be correct to use static with const, the line below would be correct use. static const int daysPerMonth[13] = {0,31,28,31,30,31,30,31,31,30,31,30,31}; Having said that, The original question was not about C, I think Fabian was simply asking about the scope of constants in classes (in Gambas) Regards Les Hardy From doriano.blengino at ...1909... Wed Apr 14 18:42:11 2010 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Wed, 14 Apr 2010 18:42:11 +0200 Subject: [Gambas-user] static const? In-Reply-To: <4BC5B868.9060700@...2337...> References: <201004131833.16852.gambas@...1...> <201004132122.41117.gambas@...1...> <4BC582F6.3010407@...1909...> <4BC5B868.9060700@...2337...> Message-ID: <4BC5F063.6050500@...1909...> Les Hardy ha scritto: > >> The C language, in facts, does not even have CONSTs - it goes with >> #define. So, it would be correct to forbid STATIC when declaring CONSTs. >> > Surely this is not correct. ANSI C uses const, and C++ also uses the > const keyword. > #define (a preprocessor directive) is a relic from old C, and const is > now recommended use instead. > Surely, according to http://www.ericgiguere.com/articles/ansi-c-summary.html > The declaration: > enum colours { RED, BLUE, GREEN }; > > > would declare colours as an enumeration tag representing the integer > constants RED, BLUE and GREEN. These enumeration constants are given > integer values starting at 0 and increasing by 1 with each identifier. > > An enumeration constant may be used wherever an integer is expected. > The following is equivalent to the above enumerated type: > > #define RED 0 > #define BLUE 1 > #define GREEN 2 > Moreover, from http://tigcc.ticalc.org/doc/keywords.html > > > _const_ > > *Makes variable value or pointer parameter unmodifiable.* > > When |const| is used with a variable, it uses the following syntax: > > const/variable-name/ [ =/value/]; > > > In this case, the |const| modifier allows you to assign an initial > value to a variable that cannot later be changed by the program. For > example, > > const my_age = 32; > > > Any assignments to |'my_age'| will result in a compiler error. > However, such declaration is quite different than using > > #define my_age 32 > > In the first case, the compiler allocates a memory for |'my_age'| and > stores the initial value 32 there, but it will not allow any later > assignment to this variable. But, in the second case, all occurences > of |'my_age'| are simply replaced with 32 by the preprocessor > , and no memory will be > allocated for it. You perhaps refer to "const" modifier, which is different from declaring a constant, like in > public: > WinEDA_VertexCtrl( wxWindow* parent, const wxString& title, > wxBoxSizer* BoxSizer, int units, int > internal_unit ); > Also, it would be correct to use static with const, the line below would > be correct use. > > static const int daysPerMonth[13] = {0,31,28,31,30,31,30,31,31,30,31,30,31}; > In this case - talking about C and not C++: > |static| tells that a function or data element is only known within > the scope of the current compile. In addition, if you use the |static| > keyword with a variable that is local to a function, it allows the > last value of the variable to be preserved between successive calls to > that function. "const" says that data is not modifiable, so "static" would say the same thing. Note also the ambiguity of the keyword when applied to data global to a module, and data local to a function - the same keyword does two very different things. > > Having said that, The original question was not about C, I think Fabian > was simply asking about the scope of constants in classes (in Gambas) > Uhm... is it forbidden to cite other languages to better explain a concept? So why you cited C++? Anyway, you are right, the original question was about scope. In gambas scope is governed by PRIVATE and PUBLIC. Full stop. If you feel that my reply is a little hurting, excuse me; it is because your reply seemed hurting to me. Prove to me that I am wrong and I will publicly apologize. Regards, Doriano From shordi at ...626... Wed Apr 14 18:48:49 2010 From: shordi at ...626... (=?ISO-8859-1?Q?Jorge_Carri=F3n?=) Date: Wed, 14 Apr 2010 18:48:49 +0200 Subject: [Gambas-user] Showing the Form's Gui In-Reply-To: <1271243387.14901.541.camel@...2413...> References: <201004132040.42997.rterry@...1946...> <4BC44C72.5000207@...1909...> <201004132201.19767.rterry@...1946...> <4BC47350.8070501@...1909...> <4BC47CDD.3060901@...1909...> <1271243387.14901.541.camel@...2413...> Message-ID: Caveat: Thank you very much for you module. I'll read it carefully. Regards 2010/4/14 Caveat > Hi Jorge, > > While we wait to see if Ricardo wants to share his open forms method > (I'm also interested to see it), here's some code I have used before > (see attachment) where the opening/closing of forms is handled by a > module, which I've called RunController. > > The module is set as the Startup Class (normally that's by default the > first Form you declare I think) and must have a Main() method. > Right-clicking on the module brings up a context menu where you can > click on the Startup Class checkbox. > > You can see that the RunController module can decide when it opens each > form (so you could have some long-running data extraction go on in the > background), and handles events raised by the forms (in conjunction with > Attach, making sure RunController actually gets the events). > > One of the first things RunController does is to decide "should I first > open up the settings form (no Dragons defined yet)?" or "should I show > the main form already (at least one Dragon exists in settings)?": > > IF theSettings.getDragonCount() = 0 THEN > settingsFrm = NEW SettingsForm > settingsFrm.Show > Object.Attach(settingsFrm, ME, "SettingsFrm") > ELSE > Logger.logMessage("RunController.Main() dragon found, so starting > Remote Control", FALSE) > remC = NEW RemoteControl > remC.Show > Object.Attach(remC, ME, "Remote") > tCop = NEW TrafficCop > tCop.show > Object.Attach(tCop, ME, "Cop") > END IF > > One limitation of my approach is that you need to explicitly declare > each form you're going to use up-front, so I'm interested to see if > Ricardo's approach avoids that. > > Regards, > Caveat > > > > On Wed, 2010-04-14 at 11:59 +0200, Jorge Carri?n wrote: > > Ricardo: > > Could you post a example of your open forms method? I'm very interested > on > > it. It sound like something I have searching for a long time. > > > > Gracias > > > > Jorge > > > > > > 2010/4/13 Ricardo D?az Mart?n > > > > > If It can help to someone, this is I always do: > > > > > > When I'm going to open a form, I always call my own OpenForm(FormName > as > > > String, Parameters as String) sub. This sub is not inside the form I'm > > > going > > > to open. It's a public sub that's is inside a utilities module. > > > > > > OpenForm() sub create new object with the form (f.e. FRMMain) and put > its > > > reference inside a public collection called OpenedForms. Before to show > > > form > > > to the user, I show other form with a progress bar and a label showing > > > "Loading..." and I'm going executing SQL, show/hid controls, etc... > with no > > > show anything. If there thrownare a fixed steps to data load, I updated > progress > > > bar and when load process finish I show the form. > > > > > > I use this in all my apps (since lot of years when I never eared about > > > gambas and I was programing in VB, Access, Java, etc...) and for me is > the > > > best option. For sure there is a lot of ways to do this. > > > > > > Regards, > > > Ricardo D?az > > > > > > > > > > > > 2010/4/13 Doriano Blengino > > > > > > > Fabien Bodard ha scritto: > > > > > 2010/4/13 Doriano Blengino : > > > > > > > > > >> Fabien Bodard ha scritto: > > > > >> > > > > >>> just remember to put a flag to say when the data are loaded ! > > > > >>> > > > > >>> > > > > >> What would be the reason for this flag? > > > > >> > > > > > if the form is showed and the data not accessible ? > > > > > > > > > Really, there could be a problem if the user clicks a button 50 ms > after > > > > the button (and the whole form) is visible. A remote possibility, and > > > > application-dependent. But I know users enough to imagine that > someone > > > > could do it... :-) > > > > > > > > Reducing the interval of the one-shot timer can help, but does not > solve > > > > (interval=0 could?). The better way is to disable actions the user > could > > > > do with invalid data (application dependent: who says that the form > is > > > > intended to receive clicks?), and perhaps add a nice label stating > > > > "Loading data, please wait..." and so on. > > > > > > > > Anyway, the flag is the worse solution. Supposing you use a flag, and > > > > the user clicks or types too fast, what would you do? A > > > > Message.Info("You clicked too fast. Go to have a coffee and come back > > > > later.")? :-) Better to disable some controls, so the user is > informed > > > > before; in addition, controls are already "global variables" which > carry > > > > informations with them. Well, this is my opinion - I hate to > duplicate > > > > informations around, but someone else on this list, time ago, said > > > > "never use the GUI to store information". The problem with global (or > > > > class) variables is that you can forget them more easily than some > > > > property of a visible control. > > > > > > > > Regards, > > > > Doriano > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------------ > > > > Download Intel® Parallel Studio Eval > > > > Try the new software tools for yourself. Speed compiling, find bugs > > > > proactively, and fine-tune applications for parallel performance. > > > > See why Intel Parallel Studio got high marks during beta. > > > > http://p.sf.net/sfu/intel-sw-dev > > > > _______________________________________________ > > > > Gambas-user mailing list > > > > Gambas-user at lists.sourceforge.net > > > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > > > > > > ------------------------------------------------------------------------------ > > > Download Intel® Parallel Studio Eval > > > Try the new software tools for yourself. Speed compiling, find bugs > > > proactively, and fine-tune applications for parallel performance. > > > See why Intel Parallel Studio got high marks during beta. > > > http://p.sf.net/sfu/intel-sw-dev > > > _______________________________________________ > > > Gambas-user mailing list > > > Gambas-user at lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > ------------------------------------------------------------------------------ > > Download Intel® Parallel Studio Eval > > Try the new software tools for yourself. Speed compiling, find bugs > > proactively, and fine-tune applications for parallel performance. > > See why Intel Parallel Studio got high marks during beta. > > http://p.sf.net/sfu/intel-sw-dev > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > From fabianfloresvadell at ...626... Wed Apr 14 19:33:20 2010 From: fabianfloresvadell at ...626... (=?ISO-8859-1?Q?Fabi=E1n_Flores_Vadell?=) Date: Wed, 14 Apr 2010 14:33:20 -0300 Subject: [Gambas-user] static const? In-Reply-To: <4BC582F6.3010407@...1909...> References: <201004132122.41117.gambas@...1...> <4BC582F6.3010407@...1909...> Message-ID: 2010/4/14 Doriano Blengino : > Back to the beginning: a CONST declaration is something that uses no > memory, so it can not have instances, and hence it can not be STATIC. > On the other hand, a CONST is always static, because the effective data > it describes reside in a memory outside the program - they reside in the > compiler memory. Thanks Doriano. I understand that. My question was caused by the fact that the compiler allows use the keyword STATIC in the declaration of constants, even though the online help and a very basic logical reasoning indicate that use the keyword STATIC is unnecesary in this situation > About the cycles WHILE, FOR, REPEAT and so on, I think the statements > BREAK and CONTINUE are very useful (I would add a third statement: > RESTART): they permit a finer control and many times they are clearer > than complex tests. You do not give arguments to support your opinion. Can you give me some examples? I think, that these can be obvious for you, but not for me. > Your example only has two test, against COUNT and > the CAPTION. What kind of test would you write if the conditions were > 15? Perhaps concatenated (I mean, some test are only meaningful when > other conditions are met). Assign the results of logical expressions to Boolean variables, it is often the way to manage the complexity of conditionals expressions. And in the loops, to use these variables instead of those logical expressions. But I think that you are knowing well this, and you points to the performance of programs. If so, my answer is that the performance isn't a priority in many types of programs, and the evaluation of logical expressions have a little cost in comparation with other operations (I/O, compression, among many others). > Finally, your last lines of code do not work: Yes, it works. >> PRIVATE FUNCTION ScanTab(IdCaption AS String) AS Byte >> DIM a AS Byte = 0 >> >> ? ?WHILE (a< ?TabStrip1.Count - 1) AND (TabStrip1[a].Text<> ?IdCaption) >> ? ? ?INC a >> ? ?WEND >> >> ? ?RETURN IF(TabStrip1[a].Caption = IdCaption, a, -1) >> END > The third cycle does not get executed - "a" is 2, which is not less than > "3-1" (it is equal). That's irrelevant because the external comprobation (the logical expression in the return sentence) > Moreover, your algorithm does a double test on caption, which could be > avoided. I think that the second test can't to be avoided. If it isn't put out the loop, you have to put into the loop. The reason for include the test (TabStrip1[a].Text<> IdCaption) in conditional expression is only stop the loop if there's match before get the last item. I think that this code can to write in many ways, but with no significant variations. How would you do? > Doing an additional test is not an important thing if the test > is quick and the routine is called not too much often. What if the > routine is called millions time, or the test is more heavy? I think that the computational cost of evaluate complex logical expressions, generally is insignificant. But if not, then the first thing to be considerated is the language to use, and I see few alternatives: assembler, C, C++, someone else; the second thing is the many optimizations to do. But, what kind the system would be? One that is not possible to do with Gambas. > About not using RETURN or BREAK inside cycles, we must think at > different kind of cycles. The WHILE and alike, where no variables are > directly involved in the cycle declaration, never have problems - the > semantic of the declaration does not imply anything about variable > allocation. In the FOR cycles instead, other languages can do strange > things, both on allocation and code optimization, so it is effectively a > bad idea to fiddle with the loop control variable; in other languages > this is not stressed the same way (basic, for example), but actually is, > at least, ugly. Yep, but I not was thinking in possible collateral effects, derived from implementation of language. (To those, the corresponding compiler would let in evidence, or would become a logical error isn't very difficult to detect and correct). I was thinking in conceptuals implications. This conceptuals implications derives in to use of the language resources in any ways, instead to use them in the correct situations. > It seems to me that you have said that an exception would be the FOR > EACH cycle... why? FOR EACH really iterates through all items, so there's only way to stop the loop when it's goal is achieved, is by the BREAK sentence used in a conditonal sentence inside the loop. But it might think that if it is necessary to do this, then the iterative structure FOR EACH is not adequate. And I hope that my very ugly english, does not cause tears. -- Fabi?n Flores Vadell www.speedbooksargentina.blogspot.com From les at ...2337... Wed Apr 14 20:51:52 2010 From: les at ...2337... (Les Hardy) Date: Wed, 14 Apr 2010 19:51:52 +0100 Subject: [Gambas-user] static const? In-Reply-To: <4BC5F063.6050500@...1909...> References: <201004131833.16852.gambas@...1...> <201004132122.41117.gambas@...1...> <4BC582F6.3010407@...1909...> <4BC5B868.9060700@...2337...> <4BC5F063.6050500@...1909...> Message-ID: <4BC60EC8.9010207@...2337...> If you feel hurt I am sorry for that, it was not my intention to hurt you, and I have no wish to prove you wrong. I do still stand by my statement. Regards Les Hardy Doriano Blengino wrote: > Les Hardy ha scritto: > >> >> >>> The C language, in facts, does not even have CONSTs - it goes with >>> #define. So, it would be correct to forbid STATIC when declaring CONSTs. >>> >>> >> Surely this is not correct. ANSI C uses const, and C++ also uses the >> const keyword. >> #define (a preprocessor directive) is a relic from old C, and const is >> now recommended use instead. >> >> > Surely, according to http://www.ericgiguere.com/articles/ansi-c-summary.html > >> The declaration: >> enum colours { RED, BLUE, GREEN }; >> >> >> would declare colours as an enumeration tag representing the integer >> constants RED, BLUE and GREEN. These enumeration constants are given >> integer values starting at 0 and increasing by 1 with each identifier. >> >> An enumeration constant may be used wherever an integer is expected. >> The following is equivalent to the above enumerated type: >> >> #define RED 0 >> #define BLUE 1 >> #define GREEN 2 >> >> > > Moreover, from http://tigcc.ticalc.org/doc/keywords.html > >> _const_ >> >> *Makes variable value or pointer parameter unmodifiable.* >> >> When |const| is used with a variable, it uses the following syntax: >> >> const/variable-name/ [ =/value/]; >> >> >> In this case, the |const| modifier allows you to assign an initial >> value to a variable that cannot later be changed by the program. For >> example, >> >> const my_age = 32; >> >> >> Any assignments to |'my_age'| will result in a compiler error. >> However, such declaration is quite different than using >> >> #define my_age 32 >> >> In the first case, the compiler allocates a memory for |'my_age'| and >> stores the initial value 32 there, but it will not allow any later >> assignment to this variable. But, in the second case, all occurences >> of |'my_age'| are simply replaced with 32 by the preprocessor >> , and no memory will be >> allocated for it. >> > > You perhaps refer to "const" modifier, which is different from declaring > a constant, like in > >> public: >> WinEDA_VertexCtrl( wxWindow* parent, const wxString& title, >> wxBoxSizer* BoxSizer, int units, int >> internal_unit ); >> > > >> Also, it would be correct to use static with const, the line below would >> be correct use. >> >> static const int daysPerMonth[13] = {0,31,28,31,30,31,30,31,31,30,31,30,31}; >> >> > In this case - talking about C and not C++: > >> |static| tells that a function or data element is only known within >> the scope of the current compile. In addition, if you use the |static| >> keyword with a variable that is local to a function, it allows the >> last value of the variable to be preserved between successive calls to >> that function. >> > "const" says that data is not modifiable, so "static" would say the same > thing. Note also the ambiguity of the keyword when applied to data > global to a module, and data local to a function - the same keyword does > two very different things. > > >> Having said that, The original question was not about C, I think Fabian >> was simply asking about the scope of constants in classes (in Gambas) >> >> > Uhm... is it forbidden to cite other languages to better explain a > concept? So why you cited C++? > > Anyway, you are right, the original question was about scope. In gambas > scope is governed by PRIVATE and PUBLIC. Full stop. > > If you feel that my reply is a little hurting, excuse me; it is because > your reply seemed hurting to me. Prove to me that I am wrong and I will > publicly apologize. > > Regards, > Doriano > > From oceanosoftlapalma at ...626... Wed Apr 14 21:58:01 2010 From: oceanosoftlapalma at ...626... (=?ISO-8859-1?Q?Ricardo_D=EDaz_Mart=EDn?=) Date: Wed, 14 Apr 2010 21:58:01 +0200 Subject: [Gambas-user] Showing the Form's Gui In-Reply-To: References: <201004132040.42997.rterry@...1946...> <201004132201.19767.rterry@...1946...> <4BC47350.8070501@...1909...> <4BC47CDD.3060901@...1909...> <1271243387.14901.541.camel@...2413...> Message-ID: This is a gb2 project example about we were talking. Excuse me but is in Spanish (I got no enough time to do something better than this). I was cutting/pasting for a while and deleting extra thinks to get this example. If not exactly the same I use but I hope It can help you. Caveat, I need an explicit form declaration too because gambas can't create a object by name (or I think so). Please note it's only an example. Regards, Ricardo D?az El 14 de abril de 2010 18:48, Jorge Carri?n escribi?: > Caveat: > Thank you very much for you module. I'll read it carefully. > Regards > > 2010/4/14 Caveat > > > Hi Jorge, > > > > While we wait to see if Ricardo wants to share his open forms method > > (I'm also interested to see it), here's some code I have used before > > (see attachment) where the opening/closing of forms is handled by a > > module, which I've called RunController. > > > > The module is set as the Startup Class (normally that's by default the > > first Form you declare I think) and must have a Main() method. > > Right-clicking on the module brings up a context menu where you can > > click on the Startup Class checkbox. > > > > You can see that the RunController module can decide when it opens each > > form (so you could have some long-running data extraction go on in the > > background), and handles events raised by the forms (in conjunction with > > Attach, making sure RunController actually gets the events). > > > > One of the first things RunController does is to decide "should I first > > open up the settings form (no Dragons defined yet)?" or "should I show > > the main form already (at least one Dragon exists in settings)?": > > > > IF theSettings.getDragonCount() = 0 THEN > > settingsFrm = NEW SettingsForm > > settingsFrm.Show > > Object.Attach(settingsFrm, ME, "SettingsFrm") > > ELSE > > Logger.logMessage("RunController.Main() dragon found, so starting > > Remote Control", FALSE) > > remC = NEW RemoteControl > > remC.Show > > Object.Attach(remC, ME, "Remote") > > tCop = NEW TrafficCop > > tCop.show > > Object.Attach(tCop, ME, "Cop") > > END IF > > > > One limitation of my approach is that you need to explicitly declare > > each form you're going to use up-front, so I'm interested to see if > > Ricardo's approach avoids that. > > > > Regards, > > Caveat > > > > > > > > On Wed, 2010-04-14 at 11:59 +0200, Jorge Carri?n wrote: > > > Ricardo: > > > Could you post a example of your open forms method? I'm very interested > > on > > > it. It sound like something I have searching for a long time. > > > > > > Gracias > > > > > > Jorge > > > > > > > > > 2010/4/13 Ricardo D?az Mart?n > > > > > > > If It can help to someone, this is I always do: > > > > > > > > When I'm going to open a form, I always call my own OpenForm(FormName > > as > > > > String, Parameters as String) sub. This sub is not inside the form > I'm > > > > going > > > > to open. It's a public sub that's is inside a utilities module. > > > > > > > > OpenForm() sub create new object with the form (f.e. FRMMain) and put > > its > > > > reference inside a public collection called OpenedForms. Before to > show > > > > form > > > > to the user, I show other form with a progress bar and a label > showing > > > > "Loading..." and I'm going executing SQL, show/hid controls, etc... > > with no > > > > show anything. If there thrownare a fixed steps to data load, I > updated > > progress > > > > bar and when load process finish I show the form. > > > > > > > > I use this in all my apps (since lot of years when I never eared > about > > > > gambas and I was programing in VB, Access, Java, etc...) and for me > is > > the > > > > best option. For sure there is a lot of ways to do this. > > > > > > > > Regards, > > > > Ricardo D?az > > > > > > > > > > > > > > > > 2010/4/13 Doriano Blengino > > > > > > > > > Fabien Bodard ha scritto: > > > > > > 2010/4/13 Doriano Blengino : > > > > > > > > > > > >> Fabien Bodard ha scritto: > > > > > >> > > > > > >>> just remember to put a flag to say when the data are loaded ! > > > > > >>> > > > > > >>> > > > > > >> What would be the reason for this flag? > > > > > >> > > > > > > if the form is showed and the data not accessible ? > > > > > > > > > > > Really, there could be a problem if the user clicks a button 50 ms > > after > > > > > the button (and the whole form) is visible. A remote possibility, > and > > > > > application-dependent. But I know users enough to imagine that > > someone > > > > > could do it... :-) > > > > > > > > > > Reducing the interval of the one-shot timer can help, but does not > > solve > > > > > (interval=0 could?). The better way is to disable actions the user > > could > > > > > do with invalid data (application dependent: who says that the form > > is > > > > > intended to receive clicks?), and perhaps add a nice label stating > > > > > "Loading data, please wait..." and so on. > > > > > > > > > > Anyway, the flag is the worse solution. Supposing you use a flag, > and > > > > > the user clicks or types too fast, what would you do? A > > > > > Message.Info("You clicked too fast. Go to have a coffee and come > back > > > > > later.")? :-) Better to disable some controls, so the user is > > informed > > > > > before; in addition, controls are already "global variables" which > > carry > > > > > informations with them. Well, this is my opinion - I hate to > > duplicate > > > > > informations around, but someone else on this list, time ago, said > > > > > "never use the GUI to store information". The problem with global > (or > > > > > class) variables is that you can forget them more easily than some > > > > > property of a visible control. > > > > > > > > > > Regards, > > > > > Doriano > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------------ > > > > > Download Intel® Parallel Studio Eval > > > > > Try the new software tools for yourself. Speed compiling, find bugs > > > > > proactively, and fine-tune applications for parallel performance. > > > > > See why Intel Parallel Studio got high marks during beta. > > > > > http://p.sf.net/sfu/intel-sw-dev > > > > > _______________________________________________ > > > > > Gambas-user mailing list > > > > > Gambas-user at lists.sourceforge.net > > > > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > > > > > > > > > > > ------------------------------------------------------------------------------ > > > > Download Intel® Parallel Studio Eval > > > > Try the new software tools for yourself. Speed compiling, find bugs > > > > proactively, and fine-tune applications for parallel performance. > > > > See why Intel Parallel Studio got high marks during beta. > > > > http://p.sf.net/sfu/intel-sw-dev > > > > _______________________________________________ > > > > Gambas-user mailing list > > > > Gambas-user at lists.sourceforge.net > > > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > > > > > ------------------------------------------------------------------------------ > > > Download Intel® Parallel Studio Eval > > > Try the new software tools for yourself. Speed compiling, find bugs > > > proactively, and fine-tune applications for parallel performance. > > > See why Intel Parallel Studio got high marks during beta. > > > http://p.sf.net/sfu/intel-sw-dev > > > _______________________________________________ > > > Gambas-user mailing list > > > Gambas-user at lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > > > > ------------------------------------------------------------------------------ > > Download Intel® Parallel Studio Eval > > Try the new software tools for yourself. Speed compiling, find bugs > > proactively, and fine-tune applications for parallel performance. > > See why Intel Parallel Studio got high marks during beta. > > http://p.sf.net/sfu/intel-sw-dev > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -------------- next part -------------- A non-text attachment was scrubbed... Name: OpenFormExample.tar.gz Type: application/x-gzip Size: 19765 bytes Desc: not available URL: From doriano.blengino at ...1909... Wed Apr 14 23:00:48 2010 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Wed, 14 Apr 2010 23:00:48 +0200 Subject: [Gambas-user] static const? In-Reply-To: References: <201004132122.41117.gambas@...1...> <4BC582F6.3010407@...1909...> Message-ID: <4BC62D00.6020900@...1909...> Fabi?n Flores Vadell ha scritto: > 2010/4/14 Doriano Blengino: > > >> Back to the beginning: a CONST declaration is something that uses no >> memory, so it can not have instances, and hence it can not be STATIC. >> > Thanks Doriano. I understand that. My question was caused by the fact > that the compiler allows use the keyword STATIC in the declaration of > constants, even though the online help and a very basic logical > reasoning indicate that use the keyword STATIC is unnecesary in this > situation > And here we return on your idea about a good compiler - and it is mine idea too. A good compiler should be very precise about things that have sense, and can be done, and things that can not be done, or have no meaning. In this respect, it is a nonsense to let the user write a "CONST STATIC". But compilers sometimes must keep compatibility with other, older, compilers. So, in this case, may be that VB(tm) was accepting this, and so does gambas. But I don't know VB(tm). Anyway, this issue is harmless, so I don't see it as a big problem. > >> About the cycles WHILE, FOR, REPEAT and so on, I think the statements >> BREAK and CONTINUE are very useful (I would add a third statement: >> RESTART): they permit a finer control and many times they are clearer >> than complex tests. >> > You do not give arguments to support your opinion. Can you give me > some examples? I think, that these can be obvious for you, but not for > me. > First of all, I must say that I see your point. May be that all the issue is about personal style. But I did a quick research in my sources to let you see some example. I have little code in gambas - I use a lot C, about which I could have many examples but, as stated by someone other, it is forbidden to talk about C... First example. I store some bookmarks in a file by using the Settings class. Every bookmark is stored with a name like "Bmark1", "Bmark2" and so on, but I don't know how many of them are in the file. I know when there are no more values, instead. So the routine is the following: i = 1 DO st = settings["Bmark" & i, ""] IF st = "" THEN BREAK men = NEW Menu(mnBooks) AS "chgBook" men.Caption = st INC i LOOP Now, to understand if there are more bookmarks to read, I must try to read it. If the value is NULL, then the job is finished. Clearly, a FOR-NEXT is no good (or, one can write a for-next from 1 to 1000... misleading...). I could break out the loop using a logic variable, but this way I save a variable. Or I could test the variable in the loop construct, like this: i = 1 DO st = settings["Bmark" & i, ""] if st<>"" then men = NEW Menu(mnBooks) AS "chgBook" men.Caption = st ENDIF INC i while st<>"" but, as you see, there are TWO tests instead of one, and there is an added line of code. May be that I am missing something, but the BREAK instruction is really useful here. The second example is a textual search on a treeview. If the user types some text, the selection is moved on the next item beginning with that text. If no more items satisfy the criterium, the search must start again at the top, but only once. So the code (there is a ME.MoveBelow() just before this code, I omitted it for simplicity): i = Len(searchstring) FOR tries = 1 TO 2 ' to search again from the top DO IF Upper(Left(ME.item.Text, i)) = searchstring THEN ' found item RETURN ENDIF IF ME.MoveBelow() THEN BREAK LOOP ME.MoveFirst NEXT Here, the FOR-NEXT is a quick way to execute some code for no more than two times... Again, I could have used a variable to store the result of the test, but I saved it... And again this is not, perhaps, the best code you can see around - but it works, and it is reasonably fast and short. > >> Your example only has two test, against COUNT and >> the CAPTION. What kind of test would you write if the conditions were >> 15? Perhaps concatenated (I mean, some test are only meaningful when >> other conditions are met). >> > Assign the results of logical expressions to Boolean variables, it is > often the way to manage the complexity of conditionals expressions. > And in the loops, to use these variables instead of those logical > expressions. > > But I think that you are knowing well this, and you points to the > performance of programs. If so, my answer is that the performance > isn't a priority in many types of programs, and the evaluation of > logical expressions have a little cost in comparation with other > operations (I/O, compression, among many others). > I agree, and partly not. I think that clearness and beatiful code is to prefer against speed, but only when speed is not an issue. In the text-search example speed *is* an issue. Never tried to open a directory with some 30000 files in it, and perform a textual search? KDE solves elegantly... it does textual search *only* if the sort order is "by name". Ridicolous... > >> Finally, your last lines of code do not work: >> > Yes, it works. > > >>> PRIVATE FUNCTION ScanTab(IdCaption AS String) AS Byte >>> DIM a AS Byte = 0 >>> >>> WHILE (a< TabStrip1.Count - 1) AND (TabStrip1[a].Text<> IdCaption) >>> INC a >>> WEND >>> >>> RETURN IF(TabStrip1[a].Caption = IdCaption, a, -1) >>> END >>> > >> The third cycle does not get executed - "a" is 2, which is not less than >> "3-1" (it is equal). >> > That's irrelevant because the external comprobation (the logical > expression in the return sentence) > May be that I am missing something, but... how can you say that it works if it omits to test the last item? > >> Moreover, your algorithm does a double test on caption, which could be >> avoided. >> > I think that the second test can't to be avoided. If it isn't put out > the loop, you have to put into the loop. The reason for include the > test (TabStrip1[a].Text<> IdCaption) in conditional expression is > only stop the loop if there's match before get the last item. > > I think that this code can to write in many ways, but with no > significant variations. How would you do? > I would do so: PRIVATE FUNCTION ScanTab(IdCaption AS String) AS Byte DIM a AS Byte = 0 WHILE a< TabStrip1.Count if TabStrip1[a].Text = IdCaption then return a INC a WEND return -1 END -or- PRIVATE FUNCTION ScanTab(IdCaption AS String) AS Byte DIM a AS Byte for a = 0 to TabStrip1.Count-1 if TabStrip1[a].Text = IdCaption then return a next return -1 END >> Doing an additional test is not an important thing if the test >> is quick and the routine is called not too much often. What if the >> routine is called millions time, or the test is more heavy? >> > I think that the computational cost of evaluate complex logical > expressions, generally is insignificant. But if not, then the first > thing to be considerated is the language to use, and I see few > alternatives: assembler, C, C++, someone else; the second thing is the > many optimizations to do. But, what kind the system would be? One that > is not possible to do with Gambas. > No, the issue is different. Giving any language and any cpu, every operation has a cost. Comparing two times the same two strings is a cost which can be avoided. *If* the speed is not important, *and* the code is more clear, *then* one can even do it [compare two times the same data]. > >> About not using RETURN or BREAK inside cycles, we must think at >> different kind of cycles. The WHILE and alike, where no variables are >> directly involved in the cycle declaration, never have problems - the >> semantic of the declaration does not imply anything about variable >> allocation. In the FOR cycles instead, other languages can do strange >> things, both on allocation and code optimization, so it is effectively a >> bad idea to fiddle with the loop control variable; in other languages >> this is not stressed the same way (basic, for example), but actually is, >> at least, ugly. >> > Yep, but I not was thinking in possible collateral effects, derived > from implementation of language. (To those, the corresponding compiler > would let in evidence, or would become a logical error isn't very > difficult to detect and correct). I was thinking in conceptuals > implications. > > This conceptuals implications derives in to use of the language > resources in any ways, instead to use them in the correct situations. > I am not sure to understand what you are saying. Anyway, I cited "other languages" just for completeness. Why should be ugly to modify the control variable of a loop? Perhaps because, historically, it was forbidden... so the teachers say the scholars it is ugly (or wrong), and the scholars, when turned teachers themselves, continue to say that it is ugly, and so on. After citing "other languages", I came back to gambas saying "in other languages this is not stressed the same way (basic, for example)". I wanted to say that in basic, and hence in gambas too, it is possible to modify the value of the control variable. Who thinks this is ugly, simply has to abstain from it... >> It seems to me that you have said that an exception would be the FOR >> EACH cycle... why? >> > FOR EACH really iterates through all items, so there's only way to > stop the loop when it's goal is achieved, is by the BREAK sentence > used in a conditonal sentence inside the loop. But it might think that > if it is necessary to do this, then the iterative structure FOR EACH > is not adequate. > Yes, I follow your mind. It's your style, mostly pure... I try to be more pure - but often I choose the quick way; so, break and continue are welcome for me. This is the kind of things I like to speak of - other people on this list have a different point of view about this. I beg for mercy in a pre-emptive, anticipative way. Regards, Doriano From gambas.fr at ...626... Thu Apr 15 00:07:56 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Thu, 15 Apr 2010 00:07:56 +0200 Subject: [Gambas-user] Showing the Form's Gui In-Reply-To: <4BC47CDD.3060901@...1909...> References: <201004132040.42997.rterry@...1946...> <4BC44C72.5000207@...1909...> <201004132201.19767.rterry@...1946...> <4BC47350.8070501@...1909...> <4BC47CDD.3060901@...1909...> Message-ID: i don't know if richard want the user to be able to do anything on the showed form before the tatal loading ... the better way will be to do the loading in the timer by use the timer.trigger function the form .enabled will be set to false and the timer just set the form.enabled to true when the loading is ok when you set a contained enabled to false all the form content is set to false too. So the form is showed but not editable. 2010/4/13 Doriano Blengino : > Fabien Bodard ha scritto: >> 2010/4/13 Doriano Blengino : >> >>> Fabien Bodard ha scritto: >>> >>>> just remember to put a flag to say when the data are loaded ! >>>> >>>> >>> What would be the reason for this flag? >>> >> if the form is showed and the data not accessible ? >> > Really, there could be a problem if the user clicks a button 50 ms after > the button (and the whole form) is visible. A remote possibility, and > application-dependent. But I know users enough to imagine that someone > could do it... :-) > > Reducing the interval of the one-shot timer can help, but does not solve > (interval=0 could?). The better way is to disable actions the user could > do with invalid data (application dependent: who says that the form is > intended to receive clicks?), and perhaps add a nice label stating > "Loading data, please wait..." and so on. > > Anyway, the flag is the worse solution. Supposing you use a flag, and > the user clicks or types too fast, what would you do? A > Message.Info("You clicked too fast. Go to have a coffee and come back > later.")? :-) Better to disable some controls, so the user is informed > before; in addition, controls are already "global variables" which carry > informations with them. Well, this is my opinion - I hate to duplicate > informations around, but someone else on this list, time ago, said > "never use the GUI to store information". The problem with global (or > class) variables is that you can forget them more easily than some > property of a visible control. > > Regards, > Doriano > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From doriano.blengino at ...1909... Thu Apr 15 00:20:41 2010 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Thu, 15 Apr 2010 00:20:41 +0200 Subject: [Gambas-user] static const? In-Reply-To: <4BC62D00.6020900@...1909...> References: <201004132122.41117.gambas@...1...> <4BC582F6.3010407@...1909...> <4BC62D00.6020900@...1909...> Message-ID: <4BC63FB9.30304@...1909...> Errata corrige: >> >> >>> Finally, your last lines of code do not work: >>> >>> >> Yes, it works. >> >> >> >>>> PRIVATE FUNCTION ScanTab(IdCaption AS String) AS Byte >>>> DIM a AS Byte = 0 >>>> >>>> WHILE (a< TabStrip1.Count - 1) AND (TabStrip1[a].Text<> IdCaption) >>>> INC a >>>> WEND >>>> >>>> RETURN IF(TabStrip1[a].Caption = IdCaption, a, -1) >>>> END >>>> >>>> >> >> >>> The third cycle does not get executed - "a" is 2, which is not less than >>> "3-1" (it is equal). >>> >>> >> That's irrelevant because the external comprobation (the logical >> expression in the return sentence) >> >> > May be that I am missing something, but... how can you say that it works > if it omits to test the last item? > Time later, driving to home and still thinking about this routine, I finally recalled what you wanted to say with "comprobation". Yes, you are right - your code works. If I would have payed more attention to the routine, I would have noticed. But, stupidly, I concentrated only on the cycle, noting that it was missing a test on the last item. That last item is managed by the last test before exiting. Still I don't like this routine. What happens if TabStrip1.Count=0 (emtpy tabstrip)? Ok, now I'am home, it's late - so good night to everybody (in Europe, of course). Regards, -- Doriano Blengino "Listen twice before you speak. This is why we have two ears, but only one mouth." From gambas at ...1... Thu Apr 15 00:24:15 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Thu, 15 Apr 2010 00:24:15 +0200 Subject: [Gambas-user] =?utf-8?q?There_are_errors_in_the_class_=22Key=22?= =?utf-8?q?=2C_and_in_the_=09events_KeyPress_/_KeyRelease=3F?= In-Reply-To: References: <201004131831.18817.gambas@...1...> Message-ID: <201004150024.15553.gambas@...1...> > > Key.Text is not guaranteed to be set during a KeyRelease. > > (Do you means readed? Ok, you are look at from compiler dev perspective. > Right?) > > Why it's in that way? > Because Qt loses some information needed by the KeyRelease event when some compound keys are used. -- Beno?t Minisini From fabianfloresvadell at ...626... Thu Apr 15 02:13:43 2010 From: fabianfloresvadell at ...626... (=?ISO-8859-1?Q?Fabi=E1n_Flores_Vadell?=) Date: Wed, 14 Apr 2010 21:13:43 -0300 Subject: [Gambas-user] static const? In-Reply-To: <4BC62D00.6020900@...1909...> References: <4BC582F6.3010407@...1909...> <4BC62D00.6020900@...1909...> Message-ID: 2010/4/14 Doriano Blengino : > And here we return on your idea about a good compiler - and it is mine > idea too. I don't want judge if the Gambas compiler is good or not, I feel that I don't have the knowledge or experience required for do that. But, I shared with you about the taste for a compiler that to say at programmer: "This is right. That's not a good idea". > First of all, I must say that I see your point. May be that all the > issue is about personal style. Yes, I have to admit that the style surely have influence in the beauty criteria. > But I did a quick research in my sources > to let you see some example. I have little code in gambas - I use a lot > C, about which I could have many examples but, as stated by someone > other, it is forbidden to talk about C... Ha! Is forbidden if you want that I can understand you. That is true :) > First example. I store some bookmarks in a file by using the Settings > class. Every bookmark is stored with a name like "Bmark1", "Bmark2" and > so on, but I don't know how many of them are in the file. I know when > there are no more values, instead. So the routine is the following: > > ? i = 1 > ? DO > ? ? st = settings["Bmark" & i, ""] > ? ? IF st = "" THEN BREAK > ? ? men = NEW Menu(mnBooks) AS "chgBook" > ? ? men.Caption = st > ? ? INC i > ? LOOP > ... > > I could break out the loop using a logic variable, but this way I save a > variable. Or I could test the variable in the loop construct, like this: > ... > > but, as you see, there are TWO tests instead of one, and there is an > added line of code. I don't agree the criteria for saving one variable or one expresion if it is not justified. > May be that I am missing something, but the BREAK > instruction is really useful here. I don't say that BREAK (and other sentences) haven't utility, but that isn't strictly necessary (perhaps I said unnecesary and this word may be incorrect). > The second example is a textual search on a treeview. If the user types > some text, the selection is moved on the next item beginning with that > text. If no more items satisfy the criterium, the search must start > again at the top, but only once. So the code (there is a ME.MoveBelow() > just before this code, I omitted it for simplicity): > > ? i = Len(searchstring) > ? FOR tries = 1 TO 2 ? ?' to search again from the top > ? ? DO > ? ? ? IF Upper(Left(ME.item.Text, i)) = searchstring THEN > ? ? ? ? ' found item > ? ? ? ? RETURN > ? ? ? ENDIF > ? ? ? IF ME.MoveBelow() THEN BREAK > ? ? LOOP > ? ? ME.MoveFirst > ? NEXT > > Here, the FOR-NEXT is a quick way to execute some code for no more than > two times... > Again, I could have used a variable to store the result of the test, but > I saved it... I think that you use a structure FOR-NEXT that requires to you knowing the amount of iterations to do. But, in this case you know that is likely the number of iterations declared could be unnecesary. So, conceptually, the correct loop would be one that allow control the number of iterations. There isn't a practical problem here. Just a conceptual consideration. This doesn't matter if you understand what you do, like in you case. But I think that's important for who is learning to programming. (I'm sorry, I'm a teacher -and may be some day I have to teach programming-). However, I don't want keep with older patterns of thought. So, will I keep open my mind. Now, image an hypothetical case in that you have to do several conditional actions inside the loop. If you resolves it in that way, the code become hard to understand. Catch the joke: FOR tries = 1 TO 2 ' to search again from the top DO IF Upper(Left(ME.item.Text, i)) = searchstring THEN ' found item RETURN ENDIF IF ME.MoveBelow() THEN BREAK IF (YOU DONT LIKE) THEN RETURN IF (YOU WANT) THEN RETURN IF (NOT ME ..). THEN BREAK IF (YOU DONT...) THEN BREAK IF (YOU WRITE IN C) THEN RETURN ... LOOP ME.MoveFirst NEXT Ok, I know you wouldn't write something like that. Just I want to serve to show what I mean. > I think that clearness and beatiful code is to prefer against speed, but > only when speed is not an issue. I agree. > In the text-search example speed *is* an issue. Never tried to open a > directory with some 30000 files in it, and perform a textual search? Ok, I agree. > I would do so: > > PRIVATE FUNCTION ScanTab(IdCaption AS String) AS Byte > DIM a AS Byte = 0 > > ? WHILE a< ?TabStrip1.Count > ? ? ?if TabStrip1[a].Text = IdCaption then return a > ? ? INC a > ? WEND > ? return -1 > END > PRIVATE FUNCTION ScanTab(IdCaption AS String) AS Byte > DIM a AS Byte > > ? for a = 0 to TabStrip1.Count-1 > ? ? ?if TabStrip1[a].Text = IdCaption then return a > ? next > ? return -1 > END If you have to do tests (like unit tests) and you have routines with multiple exit points, maybe you will have some coverage problems. What do you think? > No, the issue is different. Giving any language and any cpu, every > operation has a cost. Comparing two times the same two strings is a cost > which can be avoided. *If* the speed is not important, *and* the code is > more clear, *then* one can even do it [compare two times the same data]. [compare two times the same data] I think that to say this Isn't fair, because the logical test just after a loop often do a test "one 2 one", ie one data value against one test value. So, almost there's no cost to access to one data item. I would say that, "if" the speed is important, "and" code not become unclear, you can do efforts to not add one test more (or to keep worried about performance). > ... > Why should be ugly to modify the > control variable of a loop? Perhaps because, historically, it was > forbidden... so the teachers say the scholars it is ugly (or wrong), and > the scholars, when turned teachers themselves, continue to say that it > is ugly, and so on. Yep, I think these things have influence. > After citing "other languages", I came back to > gambas saying "in other languages this is not stressed the same way > (basic, for example)". I wanted to say that in basic, and hence in > gambas too, it is possible to modify the value of the control variable. > Who thinks this is ugly, simply has to abstain from it... Except that often isn't a good thing for the students. Someone could say that everybody can use the sentence GOTO, and if you are a good programmer you will haven't problems. I think that the subject here is identify practices that have potential to bring problems. >> FOR EACH really iterates through all items, so there's only way to >> stop the loop when it's goal is achieved, is by the BREAK sentence >> used in a conditonal sentence inside the loop. But it might think that >> if it is necessary to do this, then the iterative structure FOR EACH >> is not adequate. >> > Yes, I follow your mind. It's your style, mostly pure... I try to be > more pure - but often I choose the quick way; so, break and continue are > welcome for me. I haven't objection with this, if who do this really knows what is doing, ie if then the code is easily understandable, and if this not brings errors. > This is the kind of things I like to speak of - other people on this > list have a different point of view about this. I beg for mercy in a > pre-emptive, anticipative way. Me too. Regards. -- Fabi?n Flores Vadell www.speedbooksargentina.blogspot.com From fabianfloresvadell at ...626... Thu Apr 15 02:38:10 2010 From: fabianfloresvadell at ...626... (=?ISO-8859-1?Q?Fabi=E1n_Flores_Vadell?=) Date: Wed, 14 Apr 2010 21:38:10 -0300 Subject: [Gambas-user] static const? In-Reply-To: <4BC63FB9.30304@...1909...> References: <4BC582F6.3010407@...1909...> <4BC62D00.6020900@...1909...> <4BC63FB9.30304@...1909...> Message-ID: 2010/4/14 Doriano Blengino : > Errata corrige: >> May be that I am missing something, but... how can you say that it works >> if it omits to test the last item? >> > Time later, driving to home and still thinking about this routine, I > finally recalled what you wanted to say with "comprobation". > Yes, you are right - your code works. If I would have payed more > attention to the routine, I would have noticed. But, stupidly, I > concentrated only on the cycle, noting that it was missing a test on the > last item. That last item is managed by the last test before exiting. > > Still I don't like this routine. What happens if TabStrip1.Count=0 > (emtpy tabstrip)? Ouch! TabStrip without tabs doesn't fit in my mind, ie Why somebody want a TabStrip without at least one tab? Moreover, by default TabStrip have one tab. (design time and execution time). > "Listen twice before you speak. > This is why we have two ears, but only one mouth." ha! Very funny. I like it. Regards. -- Fabi?n Flores Vadell www.speedbooksargentina.blogspot.com From fabianfloresvadell at ...626... Thu Apr 15 02:51:32 2010 From: fabianfloresvadell at ...626... (=?ISO-8859-1?Q?Fabi=E1n_Flores_Vadell?=) Date: Wed, 14 Apr 2010 21:51:32 -0300 Subject: [Gambas-user] There are errors in the class "Key", and in the events KeyPress / KeyRelease? In-Reply-To: <201004150024.15553.gambas@...1...> References: <201004131831.18817.gambas@...1...> <201004150024.15553.gambas@...1...> Message-ID: 2010/4/14 Beno?t Minisini : >> > Key.Text is not guaranteed to be set during a KeyRelease. But, refering to the values provided by the key class, is guaranted their availability within the routines that are called from KeyPress? >> Why it's in that way? > Because Qt loses some information needed by the KeyRelease event when some > compound keys are used. Ok. Thanks. -- Fabi?n Flores Vadell www.speedbooksargentina.blogspot.com From shordi at ...626... Thu Apr 15 10:23:45 2010 From: shordi at ...626... (=?ISO-8859-1?Q?Jorge_Carri=F3n?=) Date: Thu, 15 Apr 2010 10:23:45 +0200 Subject: [Gambas-user] Showing the Form's Gui In-Reply-To: References: <201004132040.42997.rterry@...1946...> <4BC44C72.5000207@...1909...> <201004132201.19767.rterry@...1946...> <4BC47350.8070501@...1909...> <4BC47CDD.3060901@...1909...> Message-ID: Gracias Ricardo. Es lo que estaba buscando para un par de formularios rebeldes. Con alg?n retoque me vale. Un saludo. 2010/4/15 Fabien Bodard > i don't know if richard want the user to be able to do anything on the > showed form before the tatal loading ... > > > the better way will be to do the loading in the timer by use the > timer.trigger function > > the form .enabled will be set to false > > and the timer just set the form.enabled to true when the loading is ok > > when you set a contained enabled to false all the form content is set > to false too. So the form is showed but not editable. > > > > 2010/4/13 Doriano Blengino : > > Fabien Bodard ha scritto: > >> 2010/4/13 Doriano Blengino : > >> > >>> Fabien Bodard ha scritto: > >>> > >>>> just remember to put a flag to say when the data are loaded ! > >>>> > >>>> > >>> What would be the reason for this flag? > >>> > >> if the form is showed and the data not accessible ? > >> > > Really, there could be a problem if the user clicks a button 50 ms after > > the button (and the whole form) is visible. A remote possibility, and > > application-dependent. But I know users enough to imagine that someone > > could do it... :-) > > > > Reducing the interval of the one-shot timer can help, but does not solve > > (interval=0 could?). The better way is to disable actions the user could > > do with invalid data (application dependent: who says that the form is > > intended to receive clicks?), and perhaps add a nice label stating > > "Loading data, please wait..." and so on. > > > > Anyway, the flag is the worse solution. Supposing you use a flag, and > > the user clicks or types too fast, what would you do? A > > Message.Info("You clicked too fast. Go to have a coffee and come back > > later.")? :-) Better to disable some controls, so the user is informed > > before; in addition, controls are already "global variables" which carry > > informations with them. Well, this is my opinion - I hate to duplicate > > informations around, but someone else on this list, time ago, said > > "never use the GUI to store information". The problem with global (or > > class) variables is that you can forget them more easily than some > > property of a visible control. > > > > Regards, > > Doriano > > > > > > > ------------------------------------------------------------------------------ > > Download Intel® Parallel Studio Eval > > Try the new software tools for yourself. Speed compiling, find bugs > > proactively, and fine-tune applications for parallel performance. > > See why Intel Parallel Studio got high marks during beta. > > http://p.sf.net/sfu/intel-sw-dev > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From doriano.blengino at ...1909... Thu Apr 15 10:46:02 2010 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Thu, 15 Apr 2010 10:46:02 +0200 Subject: [Gambas-user] static const? In-Reply-To: References: <4BC582F6.3010407@...1909...> <4BC62D00.6020900@...1909...> Message-ID: <4BC6D24A.8030303@...1909...> Fabi?n Flores Vadell ha scritto: > 2010/4/14 Doriano Blengino : > > >> First example. I store some bookmarks... >> ... >> >> I could break out the loop using a logic variable, but this way I save a >> variable. Or I could test the variable in the loop construct, like this: >> > I don't agree the criteria for saving one variable or one expresion if > it is not justified. > Well, perhaps my daily work with little CPUs (some have 32 bytes of ram!) drives me to professional bias, but why use a variable if can be avoided? There is more than one reason for this (reported without an order). One: variables have to be declared at the beginning of a block; when I write code, if I want to use a variable I must go back to the start of the code and add the declaration, leaving the old "road of my mind". Then I must go back to the relevant part and concentrate again on the code. Two: saving a state to later break a loop is less straightforward than doing it "in place". If the logic of an algorithm is "concentrated" in a single point, instead of being spread around, it is easier to revise - at least for me. Three: I think that fast algorithms are always better than slow ones. It is the duty of a good programmer to write good code: and good code is fast and easy to read. Perhaps, if I was a teacher, I would say different things. But teachers sometimes are a little distant from the reality; and scholars will face it later - when they will be programmers. Speed *is* important, the battle on computer hardware and software is all around performances. That said, using a variable is a cost (even more for interpreted languages like gambas). Well - we must understand each other. By no mean I want to say that using variables is awful - is a technique with pros and cons. > > Now, image an hypothetical case in that you have to do several > conditional actions inside the loop. If you resolves it in that way, > the code become hard to understand. > > Catch the joke: > > FOR tries = 1 TO 2 ' to search again from the top > DO > IF Upper(Left(ME.item.Text, i)) = searchstring THEN > ' found item > RETURN > ENDIF > IF ME.MoveBelow() THEN BREAK > IF (YOU DONT LIKE) THEN RETURN > IF (YOU WANT) THEN RETURN > IF (NOT ME ..). THEN BREAK > IF (YOU DONT...) THEN BREAK > IF (YOU WRITE IN C) THEN RETURN > ... > LOOP > ME.MoveFirst > NEXT > > Ok, I know you wouldn't write something like that. Just I want to > serve to show what I mean. > Ah ah ah! You are wrong... this is my preferred style. I actually *write* things like that, especially when conditions are related. I mean - suppose you want to test the caption of a tabstrip (oh! what a coincidence...). You must read Tabstrip[i].Caption, but first you have to make sure that Tabstrip[i] really exists. So the test becomes: if (i=tabstrip.count then break if tabstrip[i].caption ... then ... Here, the focus about the counter "i", and the usage of ".caption" is even more separated - two statements instead of one - because they are at two different levels. This is only an example I stretched beyond the reality, but you got it. > > If you have to do tests (like unit tests) and you have routines with > multiple exit points, maybe you will have some coverage problems. What > do you think? > I think that it is exactly the same thing. If you use a variable to break a loop, or return from a function, then that variable "is" an exit point. With an additional problem - that the variable can be changed later... a RETURN is always a RETURN instead. At this point, I would add that "single return points" are, for me, worse than multiple exit point. Excuse me again if I pull in other languages, but now they are very useful. Modern Pascal can use the variable RESULT to hold the returned result of a function. This sub: function doit as integer return 1 end can be written (in "pascalized" gambas) as function doit as integer result = 1 end Now I will write a subroutine to move a file. The result is TRUE if the operation is successful, and false if it is not. Pseudocode, single exit point: function movefile(src, dst as string) as boolean DIM ok as boolean ok = false if exists(src) then if open_and_read(src) then close(src) if open_and_write(dst) then close(dst) ok = true endif endif endif return ok end Pseudocode, using "result pascalism", multiple exit point: function movefile(src, dst as string) as boolean result = false if not exists(src) then return if not open_and_read(src) then return close(src) if not open_and_write(dst) then return close(dst) result = true end Now comes personal taste. The second routine, for you, is a joke. For me, it looks simpler, shorter, and faster. The only problem I see are those repeated "not" and "return". They are ugly to see, but very clear in saying "if this operation fails, then stop". The code coverage should be simpler to do, but I am not really sure. > > I would say that, "if" the speed is important, "and" code not become > unclear, you can do efforts to not add one test more (or to keep > worried about performance). > Ok, these are two opposite point of view that can meet in a region called "personal style". > >> After citing "other languages", I came back to >> gambas saying "in other languages this is not stressed the same way >> (basic, for example)". I wanted to say that in basic, and hence in >> gambas too, it is possible to modify the value of the control variable. >> Who thinks this is ugly, simply has to abstain from it... >> > > Except that often isn't a good thing for the students. Someone could > say that everybody can use the sentence GOTO, and if you are a good > programmer you will haven't problems. > > I think that the subject here is identify practices that have > potential to bring problems. > Yes. And about GOTOs, I use them too. Here we come to the basics of many arts and sciences... one must learn the rules and use them. When one is really a master, he is entitled to break them - then he turns (perhaps) into a genius. What is the differences in breaking rules, between a stupid and a genius? The first does not know what he is doing, the second does know very very well... GOTOs were the only mean to control the program flow, once upon a time. When some genius broke the rules and invented structural programming, GOTOs were rewarded as evil, and we are still in the long wave of this thought. But Pascal (and C, - sorry - the most important language of all times, until now), still retained GOTOs. Strange... may be that they are, after all, not so evil? We don't want spaghetti outside our food, but there is a way in between - ok for a GOTO, when you have a reason for that. Practices that have potential to bring problems are not simple things like "using GOTO", or "using object oriented programming". The issue is far more complicated. Going on, I would say that, in certain cases, it *is* an error to not use GOTOs. In some situations, it is an error to use objects. And so on. Nothing is perfect, and nothing is totally bad. Well. I really enjoyed to discuss with you. Because I feel that we both have slightly changed our mind - we have had an improvement. Even If we didn't change our thought, it seems to me that we, at least, had understand each other. Not a bad thing. Regards, and best wishes for your teacher job. We need good teachers. Doriano From rterry at ...1946... Thu Apr 15 11:41:22 2010 From: rterry at ...1946... (richard terry) Date: Thu, 15 Apr 2010 19:41:22 +1000 Subject: [Gambas-user] Showing the Form's Gui In-Reply-To: References: <201004132040.42997.rterry@...1946...> <4BC47CDD.3060901@...1909...> Message-ID: <201004151941.22159.rterry@...1946...> On Thursday 15 April 2010 08:07:56 Fabien Bodard wrote: The method suggested using the timer works for my use really well, and really simply. Users are much more tolerant if the gui is showing and processing going on in the background even if the busy cursor is showing briefly. This particular form in my program is a document inbox - where incoming messages - ranging from hl7 messages to scanned documents or internal messages have ended up in the users inbox. As it will usually only have a dozen or so entries a day, timing is not a ususally problem. Just for interest I loaded it with parsed messages, containing documents for 160 patients/640 odd documents, with 45,000 individual components to construct the documents final html (many were pathology reports hence granular in nature) and it took 1.6 seconds from postgres in yet to be indexed tables. Nothing needing to be done prior to loading. The delay in the gambas gui appearing is an interesting question, as in some other forms involving no such processing, loading is also slow - must investigate. Regards richard > i don't know if richard want the user to be able to do anything on the > showed form before the tatal loading ... > > > the better way will be to do the loading in the timer by use the > timer.trigger function > > the form .enabled will be set to false > > and the timer just set the form.enabled to true when the loading is ok > > when you set a contained enabled to false all the form content is set > to false too. So the form is showed but not editable. > > 2010/4/13 Doriano Blengino : > > Fabien Bodard ha scritto: > >> 2010/4/13 Doriano Blengino : > >>> Fabien Bodard ha scritto: > >>>> just remember to put a flag to say when the data are loaded ! > >>> > >>> What would be the reason for this flag? > >> > >> if the form is showed and the data not accessible ? > > > > Really, there could be a problem if the user clicks a button 50 ms after > > the button (and the whole form) is visible. A remote possibility, and > > application-dependent. But I know users enough to imagine that someone > > could do it... :-) > > > > Reducing the interval of the one-shot timer can help, but does not solve > > (interval=0 could?). The better way is to disable actions the user could > > do with invalid data (application dependent: who says that the form is > > intended to receive clicks?), and perhaps add a nice label stating > > "Loading data, please wait..." and so on. > > > > Anyway, the flag is the worse solution. Supposing you use a flag, and > > the user clicks or types too fast, what would you do? A > > Message.Info("You clicked too fast. Go to have a coffee and come back > > later.")? :-) Better to disable some controls, so the user is informed > > before; in addition, controls are already "global variables" which carry > > informations with them. Well, this is my opinion - I hate to duplicate > > informations around, but someone else on this list, time ago, said > > "never use the GUI to store information". The problem with global (or > > class) variables is that you can forget them more easily than some > > property of a visible control. > > > > Regards, > > Doriano > > > > > > ------------------------------------------------------------------------- > >----- Download Intel® Parallel Studio Eval > > Try the new software tools for yourself. Speed compiling, find bugs > > proactively, and fine-tune applications for parallel performance. > > See why Intel Parallel Studio got high marks during beta. > > http://p.sf.net/sfu/intel-sw-dev > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > --------------------------------------------------------------------------- > --- Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From jussi.lahtinen at ...626... Thu Apr 15 19:00:36 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Thu, 15 Apr 2010 20:00:36 +0300 Subject: [Gambas-user] static const? In-Reply-To: <4BC6D24A.8030303@...1909...> References: <4BC582F6.3010407@...1909...> <4BC62D00.6020900@...1909...> <4BC6D24A.8030303@...1909...> Message-ID: > Back to gambas - I don't know if the documentation says anything about > short-circuit and things like that. May be we can assume it as a > standard, that modern languages always do short-circuit, but the concept > remains. Gambas doesn't have short-circuits, you have to write like this: IF a=1 AND IF b=2 THEN Jussi From doriano.blengino at ...1909... Thu Apr 15 19:28:00 2010 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Thu, 15 Apr 2010 19:28:00 +0200 Subject: [Gambas-user] static const? In-Reply-To: References: <4BC582F6.3010407@...1909...> <4BC62D00.6020900@...1909...> <4BC6D24A.8030303@...1909...> Message-ID: <4BC74CA0.5050607@...1909...> Jussi Lahtinen ha scritto: >> Back to gambas - I don't know if the documentation says anything about >> short-circuit and things like that. May be we can assume it as a >> standard, that modern languages always do short-circuit, but the concept >> remains. >> > > Gambas doesn't have short-circuits, you have to write like this: > IF a=1 AND IF b=2 THEN > > Ah! Thanks. So, a statement like this: if i References: <4BC582F6.3010407@...1909...> <4BC62D00.6020900@...1909...> <4BC6D24A.8030303@...1909...> <4BC74CA0.5050607@...1909...> Message-ID: <1271354192.6520.6.camel@...40...> Am Donnerstag, den 15.04.2010, 19:28 +0200 schrieb Doriano Blengino: > Jussi Lahtinen ha scritto: > >> Back to gambas - I don't know if the documentation says anything about > >> short-circuit and things like that. May be we can assume it as a > >> standard, that modern languages always do short-circuit, but the concept > >> remains. > >> > > > > Gambas doesn't have short-circuits, you have to write like this: > > IF a=1 AND IF b=2 THEN > > > > > Ah! Thanks. So, a statement like this: > > if i > can fail, if I understand well. Perhaps I must check a few lines of code... > > Regards, > Doriano Salut, I'v never done it like that (IF a=1 AND IF b=2 THEN), are you sure ? -- Amicalement Charlie From jussi.lahtinen at ...626... Thu Apr 15 20:07:32 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Thu, 15 Apr 2010 21:07:32 +0300 Subject: [Gambas-user] static const? In-Reply-To: <1271354192.6520.6.camel@...40...> References: <4BC582F6.3010407@...1909...> <4BC62D00.6020900@...1909...> <4BC6D24A.8030303@...1909...> <4BC74CA0.5050607@...1909...> <1271354192.6520.6.camel@...40...> Message-ID: Yes, you can test it. This should generate error: If 1 = 2 And 1 / 0 Then Print "test" This should not.: If 1 = 2 And If 1 / 0 Then Print "test" Jussi On Thu, Apr 15, 2010 at 20:56, Charlie Reinl wrote: > Am Donnerstag, den 15.04.2010, 19:28 +0200 schrieb Doriano Blengino: >> Jussi Lahtinen ha scritto: >> >> Back to gambas - I don't know if the documentation says anything about >> >> short-circuit and things like that. May be we can assume it as a >> >> standard, that modern languages always do short-circuit, but the concept >> >> remains. >> >> >> > >> > ?Gambas doesn't have short-circuits, you have to write like this: >> > ?IF a=1 AND IF b=2 THEN >> > >> > >> Ah! Thanks. So, a statement like this: >> >> ? ? if i> >> can fail, if I understand well. Perhaps I must check a few lines of code... >> >> Regards, >> Doriano > > Salut, > > I'v never done it like that (IF a=1 AND IF b=2 THEN), are you sure ? > -- > Amicalement > Charlie > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From les at ...2337... Thu Apr 15 20:12:35 2010 From: les at ...2337... (Les Hardy) Date: Thu, 15 Apr 2010 19:12:35 +0100 Subject: [Gambas-user] static const? In-Reply-To: <1271354192.6520.6.camel@...40...> References: <4BC582F6.3010407@...1909...> <4BC62D00.6020900@...1909...> <4BC6D24A.8030303@...1909...> <4BC74CA0.5050607@...1909...> <1271354192.6520.6.camel@...40...> Message-ID: <4BC75713.9090604@...2337...> Charlie Reinl wrote: > Am Donnerstag, den 15.04.2010, 19:28 +0200 schrieb Doriano Blengino: > >> Jussi Lahtinen ha scritto: >> >>>> Back to gambas - I don't know if the documentation says anything about >>>> short-circuit and things like that. May be we can assume it as a >>>> standard, that modern languages always do short-circuit, but the concept >>>> remains. >>>> >>>> >>> Gambas doesn't have short-circuits, you have to write like this: >>> IF a=1 AND IF b=2 THEN >>> >>> >>> >> Ah! Thanks. So, a statement like this: >> >> if i> >> can fail, if I understand well. Perhaps I must check a few lines of code... >> >> Regards, >> Doriano >> > > Salut, > > I'v never done it like that (IF a=1 AND IF b=2 THEN), are you sure ? > Yes, It is clearly there in the manual. *IF* _Expression_ [ { *AND IF* | *OR IF* } _Expression_ ... ] [ *THEN* ] ... [ *ELSE IF* _Expression_ [ { *AND IF* | *OR IF* } _Expression_ ... ] [ *THEN* ] ... ] [ *ELSE* ... ] *ENDIF* From fabianfloresvadell at ...626... Thu Apr 15 21:00:27 2010 From: fabianfloresvadell at ...626... (=?ISO-8859-1?Q?Fabi=E1n_Flores_Vadell?=) Date: Thu, 15 Apr 2010 16:00:27 -0300 Subject: [Gambas-user] static const? In-Reply-To: <4BC6D24A.8030303@...1909...> References: <4BC582F6.3010407@...1909...> <4BC62D00.6020900@...1909...> <4BC6D24A.8030303@...1909...> Message-ID: >> I don't agree the criteria for saving one variable or one expresion if >> it is not justified. >> > Well, perhaps my daily work with little CPUs (some have 32 bytes of > ram!) drives me to professional bias, but why use a variable if can be > avoided? There is more than one reason for this (reported without an > order). One: variables have to be declared at the beginning of a block; > when I write code, if I want to use a variable I must go back to the > start of the code and add the declaration, leaving the old "road of my > mind". Then I must go back to the relevant part and concentrate again on > the code. I don't see the problem here. When you think about create a variable (or any other memory structure), you never let to think about your algorithm. In fact, if the language require previous variable declaration is a good thing because forces to think about on resources you will use and how you will do that. I think that the choices about memory structures is one of the critical parts when you write an algorithm. So, when you think about variables far away of divert attention, actually you are deepening your understanding about the problem and your algorithmic solution. > Two: saving a state to later break a loop is less > straightforward than doing it "in place". If the logic of an algorithm > is "concentrated" in a single point, instead of being spread around, it > is easier to revise - at least for me. > > Three: I think that fast > algorithms are always better than slow ones. I think that if the speed is a requeriment, that's right. But if not, just is right if is to easy to do. So, not always a faster algorithm is better. Let me quote to Donald Knuth when he said "premature optimization is the root of all evil (or at least most of it) in programming". > It is the duty of a good > programmer to write good code: and good code is fast and easy to read. I believe that a good code is one that is simple, and to achieve this goal at least must (sure I forget something): - Uses the correct structures of memory and control - Have high cohesion and low coupling - Be correctly modularized - Uses good names - Be written in order that it is easy to understand it > Perhaps, if I was a teacher, I would say different things. But teachers > sometimes are a little distant from the reality; and scholars will face > it later - when they will be programmers. The industry insists in that the most important things are compliance of requirements and easy maintenance. > That said, using a variable is a cost (even more for interpreted > languages like gambas). Well - we must understand each other. By no mean > I want to say that using variables is awful - is a technique with pros > and cons. Easy, I understand you. > ? ?if (i blahblahblah > > This is a logical mislead, because it puts together two unrelated > concepts: the test on the relevant thing (we look for caption), and a > "good precaution" which has little to do with the algorithm. In fact, I > would rewrite it as > > ? ?if i > There is no difference in the final (machine) code, but the second > statement looks to me more explanatory. I agree. > And, to be sincere, there is > more. The ambiguity of the first statement is well stressed in other > languages (sorry, they exist), where sometimes there is no warranty > about the order of evaluation of expressions. For whatever reason, a > compiler could evaluate tabstrip[i].caption *before* tabstrip.count. > And, of course, the compiler is right - the AND operation is commutative > (the two terms can be swapped), like addition and multiplication. Back > to gambas - I don't know if the documentation says anything about > short-circuit and things like that. May be we can assume it as a > standard, that modern languages always do short-circuit, but the concept > remains. I agree. > ?function movefile(src, dst as string) as boolean > ? ?result = false > ? ?if not exists(src) then return > ? ?if not open_and_read(src) then return > ? ?close(src) > ? ?if not open_and_write(dst) then return > ? ?close(dst) > ? ?result = true > ?end > > Now comes personal taste. The second routine, for you, is a joke. Oh, no. The joke was: IF (YouWriteInC) THEN RETURN. Maybe, we not share the same humor sense. > For > me, it looks simpler, shorter, and faster. The only problem I see are > those repeated "not" and "return". They are ugly to see, but very clear > in saying "if this operation fails, then stop". The code coverage should > be simpler to do, but I am not really sure. When I have to write many logical tests, I separates them in a new function. That allow me keep the code short and self explanatory. I do this in a extremist way especially when I want to anybody can understand my code. I know this is even more expensive than using a variable. I don't care, I never seen a penalization over performance for that, and if I have to do some optimization, I would do later. >> I think that the subject here is identify practices that have >> potential to bring problems. >> > GOTOs were the only mean to control the program flow, once upon a time. > When some genius broke the rules and invented structural programming, > GOTOs were rewarded as evil, and we are still in the long wave of this > thought. > But Pascal (and C, - sorry - the most important language of all times, > until now), still retained GOTOs. Strange... may be that they are, after > all, not so evil? Clearly, this was done to maintain backward compatibility (the root of the rest of evils). > We don't want spaghetti outside our food, but there is > a way in between - ok for a GOTO, when you have a reason for that. > Practices that have potential to bring problems are not simple things > like "using GOTO", or "using object oriented programming". The issue is > far more complicated. Going on, I would say that, in certain cases, it > *is* an error to not use GOTOs. In some situations, it is an error to > use objects. And so on. Nothing is perfect, and nothing is totally bad. I understand. Maybe, you express that with too much relativism. > Well. I really enjoyed to discuss with you. Because I feel that we both > have slightly changed our mind - we have had an improvement. Even If we > didn't change our thought, it seems to me that we, at least, had > understand each other. Not a bad thing. This was a productive discussion to me. I learned new things. Regards. -- Fabi?n Flores Vadell www.speedbooksargentina.blogspot.com From Karl.Reinl at ...2345... Fri Apr 16 00:02:24 2010 From: Karl.Reinl at ...2345... (Charlie Reinl) Date: Fri, 16 Apr 2010 00:02:24 +0200 Subject: [Gambas-user] static const? In-Reply-To: References: <4BC582F6.3010407@...1909...> <4BC62D00.6020900@...1909...> <4BC6D24A.8030303@...1909...> <4BC74CA0.5050607@...1909...> <1271354192.6520.6.camel@...40...> Message-ID: <1271368944.6520.17.camel@...40...> Am Donnerstag, den 15.04.2010, 21:07 +0300 schrieb Jussi Lahtinen: > Yes, you can test it. > > This should generate error: > If 1 = 2 And 1 / 0 Then Print "test" > > This should not.: > If 1 = 2 And If 1 / 0 Then Print "test" > > Jussi > > > On Thu, Apr 15, 2010 at 20:56, Charlie Reinl wrote: > > Am Donnerstag, den 15.04.2010, 19:28 +0200 schrieb Doriano Blengino: > >> Jussi Lahtinen ha scritto: > >> >> Back to gambas - I don't know if the documentation says anything about > >> >> short-circuit and things like that. May be we can assume it as a > >> >> standard, that modern languages always do short-circuit, but the concept > >> >> remains. > >> >> > >> > > >> > Gambas doesn't have short-circuits, you have to write like this: > >> > IF a=1 AND IF b=2 THEN > >> > > >> > > >> Ah! Thanks. So, a statement like this: > >> > >> if i >> > >> can fail, if I understand well. Perhaps I must check a few lines of code... > >> > >> Regards, > >> Doriano > > > > Salut, > > > > I'v never done it like that (IF a=1 AND IF b=2 THEN), are you sure ? > > -- > > Amicalement > > Charlie > > Salut, yes you are right for that example (my teacher said never try to divide something by 0). And I do not understand why/what/where.... that condition is/could be good for ... 1/0 !? but If 1 = 1 And 1 <> 2 Then Print "test" and If 1 = 1 And If 1 <> 2 Then Print "test" works the same way. -- Amicalement Charlie From doriano.blengino at ...1909... Fri Apr 16 10:11:46 2010 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Fri, 16 Apr 2010 10:11:46 +0200 Subject: [Gambas-user] static const? In-Reply-To: <1271368944.6520.17.camel@...40...> References: <4BC582F6.3010407@...1909...> <4BC62D00.6020900@...1909...> <4BC6D24A.8030303@...1909...> <4BC74CA0.5050607@...1909...> <1271354192.6520.6.camel@...40...> <1271368944.6520.17.camel@...40...> Message-ID: <4BC81BC2.1020900@...1909...> Charlie Reinl ha scritto: > Am Donnerstag, den 15.04.2010, 21:07 +0300 schrieb Jussi Lahtinen: > >> Yes, you can test it. >> >> This should generate error: >> If 1 = 2 And 1 / 0 Then Print "test" >> >> This should not.: >> If 1 = 2 And If 1 / 0 Then Print "test" >> >> >>>> >>>> if i>>> >>>> can fail, if I understand well. Perhaps I must check a few lines of code... >>>> >>>> > yes you are right for that example > > (my teacher said never try to divide something by 0). > > And I do not understand why/what/where.... that condition is/could be > good for ... 1/0 !? > > but > If 1 = 1 And 1<> 2 Then Print "test" > and > If 1 = 1 And If 1<> 2 Then Print "test" > > works the same way. > The problem is this. Suppose you have to test a property of a object; if the object exists, and its property value is "1" you do something: if theobject<>NULL and theobject.number=1 THEN ... The above statement is wrong, because gambas evaluates the second expression even if the first is false; doing so, it tries to read a property of a non-existent object. I checked the documentation (perhaps a little old), and this behavior is not specified. It is true that you find an alternative syntax, looking strange at first but nice, like "IF expr and IF otherexpr THEN ...", but this does say nothing about the classic syntax. Coming from years of programming in C and pascal, I gave for normal that short-circuit is common practice, but this is not the case. So I must check a few lines of code. Better explanation can be found on wikipedia: http://en.wikipedia.org/wiki/Short-circuit_evaluation Ciao, Doriano From gambas.fr at ...626... Fri Apr 16 10:56:32 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Fri, 16 Apr 2010 10:56:32 +0200 Subject: [Gambas-user] Showing the Form's Gui In-Reply-To: <201004151941.22159.rterry@...1946...> References: <201004132040.42997.rterry@...1946...> <4BC47CDD.3060901@...1909...> <201004151941.22159.rterry@...1946...> Message-ID: you can use a loading form that you manage from the backend ... LaodingForm.Load LoaddingForm.TopOnly = true LoadingForm.SHow 'loop in the loading process Do loadingForm.Value = x wait 0.1 loop loadingform.Close if you want you can set this form persistant for the global loading idea i think there is more simple way than registered all the loaded forms. 2010/4/15 richard terry : > On Thursday 15 April 2010 08:07:56 Fabien Bodard wrote: > > The method suggested using the timer works for my use really well, and really > simply. > > Users are much more tolerant if the gui is showing and processing going on in > the background even if the busy cursor is showing briefly. > > This particular form in my program is a document inbox - where incoming > messages - ranging from hl7 messages to scanned documents or internal messages > have ended up in the users ?inbox. > > As it will usually only have a dozen or so entries a day, timing is not a > ususally problem. > > Just for interest I loaded it with parsed messages, containing documents for > 160 patients/640 odd documents, with 45,000 individual components to construct > the ?documents final html (many were pathology reports hence granular in > nature) ?and it took 1.6 seconds from postgres in yet to be indexed tables. > > Nothing needing to be done prior to ?loading. > > The delay in the gambas gui appearing is an interesting question, as in some > other forms involving no such processing, loading is also slow - must > investigate. > > > Regards > > richard > >> i don't know if richard want the user to be able to do anything on the >> showed form before the tatal loading ... >> >> >> the better way will be to do the loading in the timer by use the >> timer.trigger function >> >> the form .enabled will be set to false >> >> and the timer just set the form.enabled to true when the loading is ok >> >> when you set a contained enabled to false all the form content is set >> to false too. So the form is showed but not editable. >> >> 2010/4/13 Doriano Blengino : >> > Fabien Bodard ha scritto: >> >> 2010/4/13 Doriano Blengino : >> >>> Fabien Bodard ha scritto: >> >>>> just remember to put a flag to say when the data are loaded ! >> >>> >> >>> What would be the reason for this flag? >> >> >> >> if the form is showed and the data not accessible ? >> > >> > Really, there could be a problem if the user clicks a button 50 ms after >> > the button (and the whole form) is visible. A remote possibility, and >> > application-dependent. But I know users enough to imagine that someone >> > could do it... :-) >> > >> > Reducing the interval of the one-shot timer can help, but does not solve >> > (interval=0 could?). The better way is to disable actions the user could >> > do with invalid data (application dependent: who says that the form is >> > intended to receive clicks?), and perhaps add a nice label stating >> > "Loading data, please wait..." and so on. >> > >> > Anyway, the flag is the worse solution. Supposing you use a flag, and >> > the user clicks or types too fast, what would you do? A >> > Message.Info("You clicked too fast. Go to have a coffee and come back >> > later.")? :-) Better to disable some controls, so the user is informed >> > before; in addition, controls are already "global variables" which carry >> > informations with them. Well, this is my opinion - I hate to duplicate >> > informations around, but someone else on this list, time ago, said >> > "never use the GUI to store information". The problem with global (or >> > class) variables is that you can forget them more easily than some >> > property of a visible control. >> > >> > Regards, >> > Doriano >> > >> > >> > ------------------------------------------------------------------------- >> >----- Download Intel® Parallel Studio Eval >> > Try the new software tools for yourself. Speed compiling, find bugs >> > proactively, and fine-tune applications for parallel performance. >> > See why Intel Parallel Studio got high marks during beta. >> > http://p.sf.net/sfu/intel-sw-dev >> > _______________________________________________ >> > Gambas-user mailing list >> > Gambas-user at lists.sourceforge.net >> > https://lists.sourceforge.net/lists/listinfo/gambas-user >> >> --------------------------------------------------------------------------- >> --- Download Intel® Parallel Studio Eval >> Try the new software tools for yourself. Speed compiling, find bugs >> proactively, and fine-tune applications for parallel performance. >> See why Intel Parallel Studio got high marks during beta. >> http://p.sf.net/sfu/intel-sw-dev >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From demosthenesk at ...626... Fri Apr 16 13:38:46 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Fri, 16 Apr 2010 14:38:46 +0300 Subject: [Gambas-user] Date var and message output Message-ID: Hi i want to ask why there is a difference when i print a date var and when i Message the var example code dNow = Time(Now) PRINT dNow 'output 14:37:10 Message(dNow) 'output 14:37:10.658 what is the 658 at the end if Messagebox output? -- ???? ???? ?? ?????!!! Regards, Demosthenes Koptsis From gambas at ...1... Fri Apr 16 14:16:03 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Fri, 16 Apr 2010 14:16:03 +0200 Subject: [Gambas-user] Date var and message output In-Reply-To: References: Message-ID: <201004161416.03296.gambas@...1...> > Hi i want to ask why there is a difference when i print a date var and when > i Message the var > example code > > dNow = Time(Now) > PRINT dNow 'output 14:37:10 > Message(dNow) 'output 14:37:10.658 > > what is the 658 at the end if Messagebox output? Because the default Date -> String conversion use the CStr() function. Message(dNow) is equivalent to Message(CStr(dNow)). On the other hand, PRINT uses the Str$() function to convert its arguments. Look in the documentation to see the difference between Str() and CStr(). Regards, -- Beno?t Minisini From oceanosoftlapalma at ...626... Fri Apr 16 15:34:47 2010 From: oceanosoftlapalma at ...626... (=?ISO-8859-1?Q?Ricardo_D=EDaz_Mart=EDn?=) Date: Fri, 16 Apr 2010 15:34:47 +0200 Subject: [Gambas-user] Date var and message output In-Reply-To: <201004161416.03296.gambas@...1...> References: <201004161416.03296.gambas@...1...> Message-ID: 658 are the miliseconds at time of now() Regards, Ricardo D?az 2010/4/16 Beno?t Minisini > > Hi i want to ask why there is a difference when i print a date var and > when > > i Message the var > > example code > > > > dNow = Time(Now) > > PRINT dNow 'output 14:37:10 > > Message(dNow) 'output 14:37:10.658 > > > > what is the 658 at the end if Messagebox output? > > Because the default Date -> String conversion use the CStr() function. > Message(dNow) is equivalent to Message(CStr(dNow)). > > On the other hand, PRINT uses the Str$() function to convert its arguments. > > Look in the documentation to see the difference between Str() and CStr(). > > Regards, > > -- > Beno?t Minisini > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From demosthenesk at ...626... Fri Apr 16 17:19:07 2010 From: demosthenesk at ...626... (Demosthenes Koptsis) Date: Fri, 16 Apr 2010 18:19:07 +0300 Subject: [Gambas-user] Date var and message output In-Reply-To: References: <201004161416.03296.gambas@...1...> Message-ID: thanks both of you! 2010/4/16 Ricardo D?az Mart?n > 658 are the miliseconds at time of now() > > Regards, > Ricardo D?az > > 2010/4/16 Beno?t Minisini > > > > Hi i want to ask why there is a difference when i print a date var and > > when > > > i Message the var > > > example code > > > > > > dNow = Time(Now) > > > PRINT dNow 'output 14:37:10 > > > Message(dNow) 'output 14:37:10.658 > > > > > > what is the 658 at the end if Messagebox output? > > > > Because the default Date -> String conversion use the CStr() function. > > Message(dNow) is equivalent to Message(CStr(dNow)). > > > > On the other hand, PRINT uses the Str$() function to convert its > arguments. > > > > Look in the documentation to see the difference between Str() and CStr(). > > > > Regards, > > > > -- > > Beno?t Minisini > > > > > > > ------------------------------------------------------------------------------ > > Download Intel® Parallel Studio Eval > > Try the new software tools for yourself. Speed compiling, find bugs > > proactively, and fine-tune applications for parallel performance. > > See why Intel Parallel Studio got high marks during beta. > > http://p.sf.net/sfu/intel-sw-dev > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- ???? ???? ?? ?????!!! Regards, Demosthenes Koptsis From wdahn at ...1000... Fri Apr 16 13:54:01 2010 From: wdahn at ...1000... (Werner) Date: Fri, 16 Apr 2010 19:54:01 +0800 Subject: [Gambas-user] Date var and message output In-Reply-To: References: Message-ID: <4BC84FD9.7060000@...1000...> On 16/04/10 19:38, Demosthenes Koptsis wrote: > Hi i want to ask why there is a difference when i print a date var and when > i Message the var > example code > > dNow = Time(Now) > PRINT dNow 'output 14:37:10 > Message(dNow) 'output 14:37:10.658 > > what is the 658 at the end if Messagebox output? > > The .658 is the milliseconds. Presumably Print and Message use a Format$ slightly differently. See http://gambasdoc.org/help/lang/format Regards Werner From oceanosoftlapalma at ...626... Fri Apr 16 21:37:17 2010 From: oceanosoftlapalma at ...626... (=?ISO-8859-1?Q?Ricardo_D=EDaz_Mart=EDn?=) Date: Fri, 16 Apr 2010 21:37:17 +0200 Subject: [Gambas-user] showing changelog in your application Message-ID: Hi, Looking inside a file.gambas with a text editor, I can see part of changelog text. I was searching in gambas doc but I didn't found anything about this (maybe not enough time) . Is there some way to show to the user changelog text getting this info from an gambas object? I know if I deploy the application with file changelog.txt I can read this with no problem. I'm asking for something like sChangeLog = Application.ChangeLog() Thanks in advance. Ricardo D?az From jussi.lahtinen at ...626... Fri Apr 16 23:37:29 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sat, 17 Apr 2010 00:37:29 +0300 Subject: [Gambas-user] static const? In-Reply-To: <1271368944.6520.17.camel@...40...> References: <4BC62D00.6020900@...1909...> <4BC6D24A.8030303@...1909...> <4BC74CA0.5050607@...1909...> <1271354192.6520.6.camel@...40...> <1271368944.6520.17.camel@...40...> Message-ID: > (my teacher said never try to divide something by 0). > > And I do not understand why/what/where.... that condition is/could be > good for ... 1/0 !? Dividing by zero is guaranteed error. That is exactly reason why I used it to test if Gambas has short-circuits or not. This is for test purpose only, not for real useful code. > but > If 1 = 1 And 1 <> 2 Then Print "test" > and > If 1 = 1 And If 1 <> 2 Then Print "test" This doesn't test for short-circuits, because both of them will print "test". No indication. My code; If 1 = 2 And If 1 / 0 Then Print "test" does not create error IF language is short-circuit capable, because execute of statement will stop at 1 = 2. Jussi From robert1juhasz at ...626... Sat Apr 17 15:09:57 2010 From: robert1juhasz at ...626... (Robert JUHASZ) Date: Sat, 17 Apr 2010 15:09:57 +0200 Subject: [Gambas-user] form_resize issue Message-ID: Hello List, When the user resizes the main form of my application I try to follow the form size with the controls on the form. I use the Form_resize event and I modify the controls' position accordingly. My hierarchy is something like that: Form TabStrip1 TabStrip11 TableView111 TabStrib12 TableView121 TableView122 It seems working correctly for any control I'm looking at... but not always for the others. For instance if I'm on the TabStrip11 and I resize the form then the TableView111 behaves normally but if I go to check the TableView122 then I can see the previous size. I call the refresh method for each item after modifying it's position or size. Do I miss something or is it a bug? I use Ubuntu 9.10 (64 bit), Gambas 2.20. Robi From gambas.fr at ...626... Sat Apr 17 15:28:41 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Sat, 17 Apr 2010 15:28:41 +0200 Subject: [Gambas-user] form_resize issue In-Reply-To: References: Message-ID: The resize event is used really not often on gambas ... it's not VB ! you need to use the container system to automagiquely resize the elements in your form ... all is managed with the mouse... Nothing to do by code :) look at VBox, HBox, Panel, and all other containers like form, etc and properties : arrangement , spacing, padding, expand, ignore 2010/4/17 Robert JUHASZ : > Hello List, > > When the user resizes the main form of my application I try to follow the > form size with the controls on the form. I use the Form_resize event and I > modify the controls' position accordingly. > > My hierarchy is something like that: > > Form > ?TabStrip1 > ? ? TabStrip11 > ? ? ? ?TableView111 > ? ? TabStrib12 > ? ? ? ?TableView121 > ? ? ? ?TableView122 > > > It seems working correctly for any control I'm looking at... but not always > for the others. > For instance if I'm on the TabStrip11 and I resize the form then the > TableView111 behaves normally but if I go to check the TableView122 then I > can see the previous size. > I call the refresh method for each item after modifying it's position or > size. > > Do I miss something or is it a bug? > I use Ubuntu 9.10 (64 bit), Gambas 2.20. > > > Robi > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From zelimir_ikovic at ...43... Sat Apr 17 21:04:40 2010 From: zelimir_ikovic at ...43... (Zelimir Ikovic) Date: Sat, 17 Apr 2010 12:04:40 -0700 (PDT) Subject: [Gambas-user] Those pic with donkey on gambas website are great. Message-ID: <78656.8786.qm@...2414...> Those pic with donkey on gambas website are great. Probably you should rename gambas to KickAssBasic, Ass is for donkey in english. KickAss means something that really kick ass :) Ass is not a rude word. In Bible: ... And Jesus, when he had found a young ass ... Regards, Ike From gambas.fr at ...626... Sat Apr 17 21:10:16 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Sat, 17 Apr 2010 21:10:16 +0200 Subject: [Gambas-user] Those pic with donkey on gambas website are great. In-Reply-To: <78656.8786.qm@...2414...> References: <78656.8786.qm@...2414...> Message-ID: witch donkey ? 2010/4/17 Zelimir Ikovic : > Those pic with donkey on gambas website are great. > Probably you should rename gambas to KickAssBasic, > > Ass is for donkey in english. > KickAss means something that really kick ass :) > > Ass is not a rude word. In Bible: > > ... And Jesus, when he had found a young ass ... > > > Regards, > Ike > > > > ------------------------------------------------------------------------------ > Download Intel? Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From rafadose at ...626... Sat Apr 17 21:14:12 2010 From: rafadose at ...626... (Rafa Domenech) Date: Sat, 17 Apr 2010 21:14:12 +0200 Subject: [Gambas-user] Those pic with donkey on gambas website are great. In-Reply-To: References: <78656.8786.qm@...2414...> Message-ID: Nice bible passage. Find here the donkeys. Rafa On 17 April 2010 21:10, Fabien Bodard wrote: > witch donkey ? > > 2010/4/17 Zelimir Ikovic : > > Those pic with donkey on gambas website are great. > > Probably you should rename gambas to KickAssBasic, > > > > Ass is for donkey in english. > > KickAss means something that really kick ass :) > > > > Ass is not a rude word. In Bible: > > > > ... And Jesus, when he had found a young ass ... > > > > > > Regards, > > Ike > > > > > > > > > ------------------------------------------------------------------------------ > > Download Intel? Parallel Studio Eval > > Try the new software tools for yourself. Speed compiling, find bugs > > proactively, and fine-tune applications for parallel performance. > > See why Intel Parallel Studio got high marks during beta. > > http://p.sf.net/sfu/intel-sw-dev > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas.fr at ...626... Sat Apr 17 21:20:21 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Sat, 17 Apr 2010 21:20:21 +0200 Subject: [Gambas-user] Those pic with donkey on gambas website are great. In-Reply-To: References: <78656.8786.qm@...2414...> Message-ID: lol my fault you say Donkey and i search for Monkey :/ sorry 2010/4/17 Rafa Domenech : > Nice bible passage. Find here > the donkeys. > Rafa > > > On 17 April 2010 21:10, Fabien Bodard wrote: > >> witch donkey ? >> >> 2010/4/17 Zelimir Ikovic : >> > Those pic with donkey on gambas website are great. >> > Probably you should rename gambas to KickAssBasic, >> > >> > Ass is for donkey in english. >> > KickAss means something that really kick ass :) >> > >> > Ass is not a rude word. In Bible: >> > >> > ... And Jesus, when he had found a young ass ... >> > >> > >> > Regards, >> > Ike >> > >> > >> > >> > >> ------------------------------------------------------------------------------ >> > Download Intel? Parallel Studio Eval >> > Try the new software tools for yourself. Speed compiling, find bugs >> > proactively, and fine-tune applications for parallel performance. >> > See why Intel Parallel Studio got high marks during beta. >> > http://p.sf.net/sfu/intel-sw-dev >> > _______________________________________________ >> > Gambas-user mailing list >> > Gambas-user at lists.sourceforge.net >> > https://lists.sourceforge.net/lists/listinfo/gambas-user >> > >> >> >> ------------------------------------------------------------------------------ >> Download Intel® Parallel Studio Eval >> Try the new software tools for yourself. Speed compiling, find bugs >> proactively, and fine-tune applications for parallel performance. >> See why Intel Parallel Studio got high marks during beta. >> http://p.sf.net/sfu/intel-sw-dev >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From twopilots at ...2415... Sun Apr 18 01:00:35 2010 From: twopilots at ...2415... (Ed & Clare Kelm) Date: Sat, 17 Apr 2010 16:00:35 -0700 Subject: [Gambas-user] EOF problem Message-ID: <4BCA3D93.3040607@...2415...> Hi! I'm having a problem reliably reading a text file. I am using: Panasonic CF-51 Toughbook Ubuntu 9.04 , Kernel 2.6.28-18 Gambas 2.8, QT Below is the code for a test program which demonstrates the problem. This is a simple form, with one button, and one label. The only code is the Button1_click event shown. The file "testdat.txt" contained in Fname is a text file with one short line of text, created with GEDIT. One would expect that clicking Button1 would open the file, read the line of text, and place it into label1. Indeed, this is exactly what happens roughly 4 times out of 5. However, sometimes the file comes up empty, with an immediate EOF. When the program is first started from the IDE, if it works correctly the first time, it will do so every time the button is clicked. However, if it fails (indicates EOF) the first time, it will fail everytime the button is clicked. Stopping the program and restarting it will roll the dice anew. There does not seem to be any pattern to the failure. It might happen twice in a row, it might not happen for 10 starts. Does anybody have any ideas? Is this an Ubuntu issue? Thanks! Ed K. PUBLIC SUB Button1_Click() DIM tfile AS File DIM Fname AS String Fname = "/home/us/Documents/testdat.txt" tfile = OPEN Fname FOR READ label1.Text = "" IF Eof(tfile) THEN label1.Text = "EOF" ELSE LINE INPUT #tfile, label1.Text END IF CLOSE #tfile END From gambas at ...1... Sun Apr 18 01:08:35 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sun, 18 Apr 2010 01:08:35 +0200 Subject: [Gambas-user] EOF problem In-Reply-To: <4BCA3D93.3040607@...2415...> References: <4BCA3D93.3040607@...2415...> Message-ID: <201004180108.35632.gambas@...1...> > Hi! > > I'm having a problem reliably reading a text file. > > I am using: > > Panasonic CF-51 Toughbook > Ubuntu 9.04 , Kernel 2.6.28-18 > Gambas 2.8, QT > > Below is the code for a test program which demonstrates the problem. > This is a simple form, with one button, and one label. The only code is > the Button1_click event shown. The file "testdat.txt" contained in > Fname is a text file with one short line of text, created with GEDIT. > > One would expect that clicking Button1 would open the file, read the > line of text, and place it into label1. Indeed, this is exactly what > happens roughly 4 times out of 5. However, sometimes the file comes up > empty, with an immediate EOF. When the program is first started from > the IDE, if it works correctly the first time, it will do so every time > the button is clicked. However, if it fails (indicates EOF) the first > time, it will fail everytime the button is clicked. Stopping the > program and restarting it will roll the dice anew. There does not seem > to be any pattern to the failure. It might happen twice in a row, it > might not happen for 10 starts. > > Does anybody have any ideas? Is this an Ubuntu issue? > > Thanks! > > Ed K. > > > PUBLIC SUB Button1_Click() > > DIM tfile AS File > DIM Fname AS String > > Fname = "/home/us/Documents/testdat.txt" > > tfile = OPEN Fname FOR READ > > label1.Text = "" > > IF Eof(tfile) THEN > label1.Text = "EOF" > ELSE > LINE INPUT #tfile, label1.Text > END IF > > CLOSE #tfile > > END > I cannot reproduce the problem with the same code. Does it occur whatever the contents of 'testdat.txt' is? Can you try the latest version of Gambas 2? -- Beno?t Minisini From twopilots at ...2415... Sun Apr 18 01:25:02 2010 From: twopilots at ...2415... (Ed & Clare Kelm) Date: Sat, 17 Apr 2010 16:25:02 -0700 Subject: [Gambas-user] EOF problem In-Reply-To: <201004180108.35632.gambas@...1...> References: <4BCA3D93.3040607@...2415...> <201004180108.35632.gambas@...1...> Message-ID: <4BCA434E.6050404@...2415...> Thanks for the quick reply! 1. The problem is independent of the contents of the text file. 2. I tried a more complicated test program in which there are TWO buttons, and TWO different text files. This behaves similarly; most of the time, failure of one button/file will be accompanied by failure of the other, but not always. Very occasionally, one button/file will work, one will fail. 3. According to Synaptics Package Manager I have the latest version of Gambas available, called 2.8.2-1build1 - if there is a newer version, how would I find and install it? 4. Would it be worth trying an upgrade to Ubuntu 9.10? Regards, Ed K. Beno?t Minisini wrote: >> Hi! >> >> I'm having a problem reliably reading a text file. >> >> I am using: >> >> Panasonic CF-51 Toughbook >> Ubuntu 9.04 , Kernel 2.6.28-18 >> Gambas 2.8, QT >> >> Below is the code for a test program which demonstrates the problem. >> This is a simple form, with one button, and one label. The only code is >> the Button1_click event shown. The file "testdat.txt" contained in >> Fname is a text file with one short line of text, created with GEDIT. >> >> One would expect that clicking Button1 would open the file, read the >> line of text, and place it into label1. Indeed, this is exactly what >> happens roughly 4 times out of 5. However, sometimes the file comes up >> empty, with an immediate EOF. When the program is first started from >> the IDE, if it works correctly the first time, it will do so every time >> the button is clicked. However, if it fails (indicates EOF) the first >> time, it will fail everytime the button is clicked. Stopping the >> program and restarting it will roll the dice anew. There does not seem >> to be any pattern to the failure. It might happen twice in a row, it >> might not happen for 10 starts. >> >> Does anybody have any ideas? Is this an Ubuntu issue? >> >> Thanks! >> >> Ed K. >> >> >> PUBLIC SUB Button1_Click() >> >> DIM tfile AS File >> DIM Fname AS String >> >> Fname = "/home/us/Documents/testdat.txt" >> >> tfile = OPEN Fname FOR READ >> >> label1.Text = "" >> >> IF Eof(tfile) THEN >> label1.Text = "EOF" >> ELSE >> LINE INPUT #tfile, label1.Text >> END IF >> >> CLOSE #tfile >> >> END >> >> > > I cannot reproduce the problem with the same code. Does it occur whatever the > contents of 'testdat.txt' is? Can you try the latest version of Gambas 2? > > From zelimir_ikovic at ...43... Sun Apr 18 02:04:26 2010 From: zelimir_ikovic at ...43... (Zelimir Ikovic) Date: Sat, 17 Apr 2010 17:04:26 -0700 (PDT) Subject: [Gambas-user] Did anybody try to run stepper motors through paralel port Message-ID: <234133.36229.qm@...2416...> I have VB6 program that run CNC plasma machine. It work very well and smooth under win200, but in WinXP machine motion is not good. It doesnot help if I set REALTIME prority for the process ... How about Linux and Gambas? Daes it depent on version of Linux ... What is resolution for Gambas Timer? Can I wait 10 microsec do something wait 10 microsec and so on ... Regards From gambas at ...1... Sun Apr 18 02:20:48 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sun, 18 Apr 2010 02:20:48 +0200 Subject: [Gambas-user] Did anybody try to run stepper motors through paralel port In-Reply-To: <234133.36229.qm@...2416...> References: <234133.36229.qm@...2416...> Message-ID: <201004180220.48355.gambas@...1...> > I have VB6 program that run CNC plasma machine. It work very well and > smooth under win200, but in WinXP machine motion is not good. > > It doesnot help if I set REALTIME prority for the process ... > > How about Linux and Gambas? Daes it depent on version of Linux ... > > What is resolution for Gambas Timer? Can I wait 10 microsec do something > wait 10 microsec and so on ... > > Regards > If you use timers, then the interpreter maintains a list of all timers, and knows how long it should wait before the next timer must be raised. If the interpreter must wait more than 10 ms, then he sleeps inside the select() system call. If he must wait less than 10 ms, then he enters a busy loop that takes 100% CPU before doing the select() system call once with a timeout of zero. Otherwise, if you don't use timers, you can use: - The WAIT instruction. This instruction runs an event loop, so you have the same behaviour as above. - The SLEEP instruction, which uses the nanosleep() system call. At the moment, SLEEP does not do busy loops for very small delays. This may change in the future, in Gambas 3. Regards, -- Beno?t Minisini From dosida at ...626... Sun Apr 18 04:39:16 2010 From: dosida at ...626... (Dimitris Anogiatis) Date: Sun, 18 Apr 2010 05:39:16 +0300 Subject: [Gambas-user] EOF problem In-Reply-To: <4BCA434E.6050404@...2415...> References: <4BCA3D93.3040607@...2415...> <201004180108.35632.gambas@...1...> <4BCA434E.6050404@...2415...> Message-ID: Ed can you try this and tell us if it still doesn't work? PUBLIC SUB Button1_Click() DIM tfile AS File DIM Fname AS String Dim temp AS String Fname = "/home/us/Documents/testdat.txt" tfile = OPEN Fname FOR READ label1.Text = "" IF Eof(tfile) THEN label1.Text = "EOF" Print "EOF" ELSE LINE INPUT #tfile, temp Print temp END IF CLOSE #tfile END Watch the IDE's debug window to see what's being printed as the file is being read If this doesn't work too then you could try to update your version of Gambas2 since the latest stable version is 2.20.2 I hope this helps Regard Dimitris On Sun, Apr 18, 2010 at 2:25 AM, Ed & Clare Kelm wrote: > Thanks for the quick reply! > > 1. The problem is independent of the contents of the text file. > > 2. I tried a more complicated test program in which there are TWO > buttons, and TWO different text files. This behaves similarly; most of > the time, failure of one button/file will be accompanied by failure of > the other, but not always. Very occasionally, one button/file will > work, one will fail. > > 3. According to Synaptics Package Manager I have the latest version of > Gambas available, called 2.8.2-1build1 - if there is a newer version, > how would I find and install it? > > 4. Would it be worth trying an upgrade to Ubuntu 9.10? > > Regards, > > Ed K. > > Beno?t Minisini wrote: > >> Hi! > >> > >> I'm having a problem reliably reading a text file. > >> > >> I am using: > >> > >> Panasonic CF-51 Toughbook > >> Ubuntu 9.04 , Kernel 2.6.28-18 > >> Gambas 2.8, QT > >> > >> Below is the code for a test program which demonstrates the problem. > >> This is a simple form, with one button, and one label. The only code is > >> the Button1_click event shown. The file "testdat.txt" contained in > >> Fname is a text file with one short line of text, created with GEDIT. > >> > >> One would expect that clicking Button1 would open the file, read the > >> line of text, and place it into label1. Indeed, this is exactly what > >> happens roughly 4 times out of 5. However, sometimes the file comes up > >> empty, with an immediate EOF. When the program is first started from > >> the IDE, if it works correctly the first time, it will do so every time > >> the button is clicked. However, if it fails (indicates EOF) the first > >> time, it will fail everytime the button is clicked. Stopping the > >> program and restarting it will roll the dice anew. There does not seem > >> to be any pattern to the failure. It might happen twice in a row, it > >> might not happen for 10 starts. > >> > >> Does anybody have any ideas? Is this an Ubuntu issue? > >> > >> Thanks! > >> > >> Ed K. > >> > >> > >> PUBLIC SUB Button1_Click() > >> > >> DIM tfile AS File > >> DIM Fname AS String > >> > >> Fname = "/home/us/Documents/testdat.txt" > >> > >> tfile = OPEN Fname FOR READ > >> > >> label1.Text = "" > >> > >> IF Eof(tfile) THEN > >> label1.Text = "EOF" > >> ELSE > >> LINE INPUT #tfile, label1.Text > >> END IF > >> > >> CLOSE #tfile > >> > >> END > >> > >> > > > > I cannot reproduce the problem with the same code. Does it occur whatever > the > > contents of 'testdat.txt' is? Can you try the latest version of Gambas 2? > > > > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From robert1juhasz at ...626... Sun Apr 18 05:02:51 2010 From: robert1juhasz at ...626... (Robert JUHASZ) Date: Sun, 18 Apr 2010 05:02:51 +0200 Subject: [Gambas-user] form_resize issue In-Reply-To: References: Message-ID: Salut Fabien, Thanks for the idea. From one side it's a pity if the resize event doesn't work as I imagined, form the other side it's a good opportunity to learn how containers work in Gambas. Is there any good tutorial which shows how the different controls work? Their description is quite brief and in the built-in examples I didn't find any. Thanks, Robi 2010/4/17 Fabien Bodard > The resize event is used really not often on gambas ... it's not VB ! > > you need to use the container system to automagiquely resize the > elements in your form ... all is managed with the mouse... Nothing to > do by code :) > > look at VBox, HBox, Panel, > > and all other containers like form, etc > > and properties : arrangement , spacing, padding, expand, ignore > > > > 2010/4/17 Robert JUHASZ : > > Hello List, > > > > When the user resizes the main form of my application I try to follow the > > form size with the controls on the form. I use the Form_resize event and > I > > modify the controls' position accordingly. > > > > My hierarchy is something like that: > > > > Form > > TabStrip1 > > TabStrip11 > > TableView111 > > TabStrib12 > > TableView121 > > TableView122 > > > > > > It seems working correctly for any control I'm looking at... but not > always > > for the others. > > For instance if I'm on the TabStrip11 and I resize the form then the > > TableView111 behaves normally but if I go to check the TableView122 then > I > > can see the previous size. > > I call the refresh method for each item after modifying it's position or > > size. > > > > Do I miss something or is it a bug? > > I use Ubuntu 9.10 (64 bit), Gambas 2.20. > > > > > > Robi > > > ------------------------------------------------------------------------------ > > Download Intel® Parallel Studio Eval > > Try the new software tools for yourself. Speed compiling, find bugs > > proactively, and fine-tune applications for parallel performance. > > See why Intel Parallel Studio got high marks during beta. > > http://p.sf.net/sfu/intel-sw-dev > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From les at ...2337... Sun Apr 18 09:30:26 2010 From: les at ...2337... (Les Hardy) Date: Sun, 18 Apr 2010 08:30:26 +0100 Subject: [Gambas-user] Did anybody try to run stepper motors through paralel port In-Reply-To: <234133.36229.qm@...2416...> References: <234133.36229.qm@...2416...> Message-ID: <4BCAB512.1090802@...2337...> Zelimir Ikovic wrote: > I have VB6 program that run CNC plasma machine. It work very well and smooth under win200, but in WinXP machine motion is not good. > > It doesnot help if I set REALTIME prority for the process ... > > How about Linux and Gambas? Daes it depent on version of Linux ... > > What is resolution for Gambas Timer? Can I wait 10 microsec do something wait 10 microsec and so on ... > > Regards > > > > > Hi, First of all, I apologise for giving winxp help in a Gambas mailing list, I will make it brief. Parallel port access change when winxp came along. It was not so easy to get direct access to the port, and some versions of winxp look for devices by periodically writing to the port. This is may be the cause of poor motion. This can be fixed by setting the 'DisableWarmPoll' key in the registry. || From gambas at ...1... Sun Apr 18 10:19:07 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sun, 18 Apr 2010 10:19:07 +0200 Subject: [Gambas-user] form_resize issue In-Reply-To: References: Message-ID: <201004181019.07388.gambas@...1...> > Hello List, > > When the user resizes the main form of my application I try to follow the > form size with the controls on the form. I use the Form_resize event and I > modify the controls' position accordingly. > > My hierarchy is something like that: > > Form > TabStrip1 > TabStrip11 > TableView111 > TabStrib12 > TableView121 > TableView122 > > > It seems working correctly for any control I'm looking at... but not always > for the others. > For instance if I'm on the TabStrip11 and I resize the form then the > TableView111 behaves normally but if I go to check the TableView122 then I > can see the previous size. > I call the refresh method for each item after modifying it's position or > size. > > Do I miss something or is it a bug? > I use Ubuntu 9.10 (64 bit), Gambas 2.20. > > > Robi Your explanation are not clear. Can you provide a little project that shows the problem? -- Beno?t Minisini From robert1juhasz at ...626... Sun Apr 18 10:38:00 2010 From: robert1juhasz at ...626... (Robert JUHASZ) Date: Sun, 18 Apr 2010 10:38:00 +0200 Subject: [Gambas-user] form_resize issue In-Reply-To: <201004181019.07388.gambas@...1...> References: <201004181019.07388.gambas@...1...> Message-ID: For the moment I just have a big one. I try to build a small example which shows the problem. Robi 2010/4/18 Beno?t Minisini > > Hello List, > > > > When the user resizes the main form of my application I try to follow the > > form size with the controls on the form. I use the Form_resize event and > I > > modify the controls' position accordingly. > > > > My hierarchy is something like that: > > > > Form > > TabStrip1 > > TabStrip11 > > TableView111 > > TabStrib12 > > TableView121 > > TableView122 > > > > > > It seems working correctly for any control I'm looking at... but not > always > > for the others. > > For instance if I'm on the TabStrip11 and I resize the form then the > > TableView111 behaves normally but if I go to check the TableView122 then > I > > can see the previous size. > > I call the refresh method for each item after modifying it's position or > > size. > > > > Do I miss something or is it a bug? > > I use Ubuntu 9.10 (64 bit), Gambas 2.20. > > > > > > Robi > > Your explanation are not clear. Can you provide a little project that shows > the problem? > > -- > Beno?t Minisini > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From les at ...2337... Sun Apr 18 10:32:32 2010 From: les at ...2337... (Les Hardy) Date: Sun, 18 Apr 2010 09:32:32 +0100 Subject: [Gambas-user] EOF problem In-Reply-To: <4BCA3D93.3040607@...2415...> References: <4BCA3D93.3040607@...2415...> Message-ID: <4BCAC3A0.9010401@...2337...> Hi Ed, After many tries, I managed to recreate your problem. It happens with your code and the code supplied by Dimitris. I am using Ubuntu 9.04, Kernel 2.6.28-18, Gambas 2.20.2, QT I have not managed to figure out the cause yet. I will do more tests and get back to you. Regards Les Hardy Ed & Clare Kelm wrote: > Hi! > > I'm having a problem reliably reading a text file. > > I am using: > > Panasonic CF-51 Toughbook > Ubuntu 9.04 , Kernel 2.6.28-18 > Gambas 2.8, QT > > Below is the code for a test program which demonstrates the problem. > This is a simple form, with one button, and one label. The only code is > the Button1_click event shown. The file "testdat.txt" contained in > Fname is a text file with one short line of text, created with GEDIT. > > One would expect that clicking Button1 would open the file, read the > line of text, and place it into label1. Indeed, this is exactly what > happens roughly 4 times out of 5. However, sometimes the file comes up > empty, with an immediate EOF. When the program is first started from > the IDE, if it works correctly the first time, it will do so every time > the button is clicked. However, if it fails (indicates EOF) the first > time, it will fail everytime the button is clicked. Stopping the > program and restarting it will roll the dice anew. There does not seem > to be any pattern to the failure. It might happen twice in a row, it > might not happen for 10 starts. > > Does anybody have any ideas? Is this an Ubuntu issue? > > Thanks! > > Ed K. > > > PUBLIC SUB Button1_Click() > > DIM tfile AS File > DIM Fname AS String > > Fname = "/home/us/Documents/testdat.txt" > > tfile = OPEN Fname FOR READ > > label1.Text = "" > > IF Eof(tfile) THEN > label1.Text = "EOF" > ELSE > LINE INPUT #tfile, label1.Text > END IF > > CLOSE #tfile > > END > > > From les at ...2337... Sun Apr 18 11:54:11 2010 From: les at ...2337... (Les Hardy) Date: Sun, 18 Apr 2010 10:54:11 +0100 Subject: [Gambas-user] EOF problem In-Reply-To: <4BCA3D93.3040607@...2415...> References: <4BCA3D93.3040607@...2415...> Message-ID: <4BCAD6C3.1000805@...2337...> Hi Ed, I figured it out. First of all, depending how the text file was emptied/created, the contents may not be truely empty. Gedit for example leaves the 0A (end-of-line) character in the 'empty' file. This is recognised by eof() as a character, so, end-of-file is not found. I am not sure if this can be considered a bug in Gambas, but it does mean an eof() is only good for preventing read errors, and is not reliable for testing if a file is empty. The following code gets around the problem. It's not ideal, but it does work. Maybe someone else can improve on it. Regards Les Hardy PUBLIC SUB Button1_Click() DIM tfile AS File DIM Fname AS String DIM t, txt AS String Label1.text = "" Fname = "/home/les/Documents/testdat.txt" tfile = OPEN Fname FOR READ IF NOT Eof(tfile) THEN LINE INPUT #tfile, t txt = IIf(Trim(t) > "", t, "EOF") Label1.text = txt ELSE Label1.text = "EOF" ENDIF CLOSE #tfile END Ed & Clare Kelm wrote: > Hi! > > I'm having a problem reliably reading a text file. > > I am using: > > Panasonic CF-51 Toughbook > Ubuntu 9.04 , Kernel 2.6.28-18 > Gambas 2.8, QT > > Below is the code for a test program which demonstrates the problem. > This is a simple form, with one button, and one label. The only code is > the Button1_click event shown. The file "testdat.txt" contained in > Fname is a text file with one short line of text, created with GEDIT. > > One would expect that clicking Button1 would open the file, read the > line of text, and place it into label1. Indeed, this is exactly what > happens roughly 4 times out of 5. However, sometimes the file comes up > empty, with an immediate EOF. When the program is first started from > the IDE, if it works correctly the first time, it will do so every time > the button is clicked. However, if it fails (indicates EOF) the first > time, it will fail everytime the button is clicked. Stopping the > program and restarting it will roll the dice anew. There does not seem > to be any pattern to the failure. It might happen twice in a row, it > might not happen for 10 starts. > > Does anybody have any ideas? Is this an Ubuntu issue? > > Thanks! > > Ed K. > > > PUBLIC SUB Button1_Click() > > DIM tfile AS File > DIM Fname AS String > > Fname = "/home/us/Documents/testdat.txt" > > tfile = OPEN Fname FOR READ > > label1.Text = "" > > IF Eof(tfile) THEN > label1.Text = "EOF" > ELSE > LINE INPUT #tfile, label1.Text > END IF > > CLOSE #tfile > > END > > > From gambas.fr at ...626... Sun Apr 18 13:35:52 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Sun, 18 Apr 2010 13:35:52 +0200 Subject: [Gambas-user] form_resize issue In-Reply-To: References: <201004181019.07388.gambas@...1...> Message-ID: just do that to try : make a form and add 3 panel in it then in each panel add 3 other panels give an unique color for each panels and then try each properties and run the form ... it's the better way to understand 2010/4/18 Robert JUHASZ : > For the moment I just have a big one. I try to build a small example which > shows the problem. > > Robi > > 2010/4/18 Beno?t Minisini > >> > Hello List, >> > >> > When the user resizes the main form of my application I try to follow the >> > form size with the controls on the form. I use the Form_resize event and >> I >> > modify the controls' position accordingly. >> > >> > My hierarchy is something like that: >> > >> > Form >> > ? TabStrip1 >> > ? ? ?TabStrip11 >> > ? ? ? ? TableView111 >> > ? ? ?TabStrib12 >> > ? ? ? ? TableView121 >> > ? ? ? ? TableView122 >> > >> > >> > It seems working correctly for any control I'm looking at... but not >> always >> > for the others. >> > For instance if I'm on the TabStrip11 and I resize the form then the >> > TableView111 behaves normally but if I go to check the TableView122 then >> I >> > can see the previous size. >> > I call the refresh method for each item after modifying it's position or >> > size. >> > >> > Do I miss something or is it a bug? >> > I use Ubuntu 9.10 (64 bit), Gambas 2.20. >> > >> > >> > Robi >> >> Your explanation are not clear. Can you provide a little project that shows >> the problem? >> >> -- >> Beno?t Minisini >> >> >> ------------------------------------------------------------------------------ >> Download Intel® Parallel Studio Eval >> Try the new software tools for yourself. Speed compiling, find bugs >> proactively, and fine-tune applications for parallel performance. >> See why Intel Parallel Studio got high marks during beta. >> http://p.sf.net/sfu/intel-sw-dev >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From robert1juhasz at ...626... Sun Apr 18 15:17:05 2010 From: robert1juhasz at ...626... (Robert JUHASZ) Date: Sun, 18 Apr 2010 15:17:05 +0200 Subject: [Gambas-user] form_resize issue In-Reply-To: <201004181019.07388.gambas@...1...> References: <201004181019.07388.gambas@...1...> Message-ID: Hi Benoit, I put together the small project with 2 level of TabStrip controls and with tableview controls on some of them. First it seemed to work perfectly... but finally I could reproduce the effect on my computer. When the app starts up then (normally) the controls resize correctly. Just after keep your eyes on one of the tableviews and resize the form (I just change from maximized to normal window and back). The tableview I look at behaves normally. But when I check the others they have the size corresponds to the normal window size. Will be interesting to see if the same happens for you or if you find a silly mistake in the code. For the moment I didn't put any refreshing - I did it in the project I work on but didn't help. Regards, Robi 2010/4/18 Beno?t Minisini > > Hello List, > > > > When the user resizes the main form of my application I try to follow the > > form size with the controls on the form. I use the Form_resize event and > I > > modify the controls' position accordingly. > > > > My hierarchy is something like that: > > > > Form > > TabStrip1 > > TabStrip11 > > TableView111 > > TabStrib12 > > TableView121 > > TableView122 > > > > > > It seems working correctly for any control I'm looking at... but not > always > > for the others. > > For instance if I'm on the TabStrip11 and I resize the form then the > > TableView111 behaves normally but if I go to check the TableView122 then > I > > can see the previous size. > > I call the refresh method for each item after modifying it's position or > > size. > > > > Do I miss something or is it a bug? > > I use Ubuntu 9.10 (64 bit), Gambas 2.20. > > > > > > Robi > > Your explanation are not clear. Can you provide a little project that shows > the problem? > > -- > Beno?t Minisini > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -------------- next part -------------- A non-text attachment was scrubbed... Name: resize-0.0.1.tar.gz Type: application/x-gzip Size: 8036 bytes Desc: not available URL: From robert1juhasz at ...626... Sun Apr 18 15:18:17 2010 From: robert1juhasz at ...626... (Robert JUHASZ) Date: Sun, 18 Apr 2010 15:18:17 +0200 Subject: [Gambas-user] form_resize issue In-Reply-To: References: <201004181019.07388.gambas@...1...> Message-ID: OK, I play a little tonight! But there is a risk that I ask questions tomorrow :D Thx a lot, Robi 2010/4/18 Fabien Bodard > just do that to try : > > make a form > and add 3 panel in it > > then in each panel add 3 other panels > > give an unique color for each panels and then try each properties and > run the form ... > > it's the better way to understand > > 2010/4/18 Robert JUHASZ : > > For the moment I just have a big one. I try to build a small example > which > > shows the problem. > > > > Robi > > > > 2010/4/18 Beno?t Minisini > > > >> > Hello List, > >> > > >> > When the user resizes the main form of my application I try to follow > the > >> > form size with the controls on the form. I use the Form_resize event > and > >> I > >> > modify the controls' position accordingly. > >> > > >> > My hierarchy is something like that: > >> > > >> > Form > >> > TabStrip1 > >> > TabStrip11 > >> > TableView111 > >> > TabStrib12 > >> > TableView121 > >> > TableView122 > >> > > >> > > >> > It seems working correctly for any control I'm looking at... but not > >> always > >> > for the others. > >> > For instance if I'm on the TabStrip11 and I resize the form then the > >> > TableView111 behaves normally but if I go to check the TableView122 > then > >> I > >> > can see the previous size. > >> > I call the refresh method for each item after modifying it's position > or > >> > size. > >> > > >> > Do I miss something or is it a bug? > >> > I use Ubuntu 9.10 (64 bit), Gambas 2.20. > >> > > >> > > >> > Robi > >> > >> Your explanation are not clear. Can you provide a little project that > shows > >> the problem? > >> > >> -- > >> Beno?t Minisini > >> > >> > >> > ------------------------------------------------------------------------------ > >> Download Intel® Parallel Studio Eval > >> Try the new software tools for yourself. Speed compiling, find bugs > >> proactively, and fine-tune applications for parallel performance. > >> See why Intel Parallel Studio got high marks during beta. > >> http://p.sf.net/sfu/intel-sw-dev > >> _______________________________________________ > >> Gambas-user mailing list > >> Gambas-user at lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/gambas-user > >> > > > ------------------------------------------------------------------------------ > > Download Intel® Parallel Studio Eval > > Try the new software tools for yourself. Speed compiling, find bugs > > proactively, and fine-tune applications for parallel performance. > > See why Intel Parallel Studio got high marks during beta. > > http://p.sf.net/sfu/intel-sw-dev > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From doriano.blengino at ...1909... Sun Apr 18 20:16:48 2010 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Sun, 18 Apr 2010 20:16:48 +0200 Subject: [Gambas-user] EOF problem In-Reply-To: <4BCAD6C3.1000805@...2337...> References: <4BCA3D93.3040607@...2415...> <4BCAD6C3.1000805@...2337...> Message-ID: <4BCB4C90.6090209@...1909...> Les Hardy ha scritto: > Hi Ed, > I figured it out. > First of all, depending how the text file was emptied/created, the > contents may not be truely empty. > Gedit for example leaves the 0A (end-of-line) character in the 'empty' > file. This is recognised by eof() as a character, so, end-of-file is not > found. > I am not sure if this can be considered a bug in Gambas, but it does > mean an eof() is only good for preventing read errors, and is not > reliable for testing if a file is empty. > Just breaking in to say that a file with a EOL in it is not an empty file - it is a file with an empty line in it... Given such a file, at first EOF is false; doing a LINE INPUT an empty line is read, then EOF turns true. Or, at least, it should go this way. Regards, -- Doriano Blengino "Listen twice before you speak. This is why we have two ears, but only one mouth." From doriano.blengino at ...1909... Sun Apr 18 20:27:50 2010 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Sun, 18 Apr 2010 20:27:50 +0200 Subject: [Gambas-user] Did anybody try to run stepper motors through paralel port In-Reply-To: <4BCAB512.1090802@...2337...> References: <234133.36229.qm@...2416...> <4BCAB512.1090802@...2337...> Message-ID: <4BCB4F26.50905@...1909...> Les Hardy ha scritto: > Zelimir Ikovic wrote: > >> I have VB6 program that run CNC plasma machine. It work very well and smooth under win200, but in WinXP machine motion is not good. >> >> It doesnot help if I set REALTIME prority for the process ... >> >> How about Linux and Gambas? Daes it depent on version of Linux ... >> >> What is resolution for Gambas Timer? Can I wait 10 microsec do something wait 10 microsec and so on ... >> >> Regards >> Uhm... under linux, no matter what version, you can use the parallel port and high resolution timers, but... 10 us? What is the speed of your motor(s)? Anyway, I see it difficult to do it in gambas, mainly because of tight GUI integration and impossibility to use interrupts; the best way would be to separate hi-level logic from lo-level timing, perhaps through a library written in C. -- Doriano Blengino "Listen twice before you speak. This is why we have two ears, but only one mouth." From twopilots at ...2415... Sun Apr 18 20:41:31 2010 From: twopilots at ...2415... (Ed & Clare Kelm) Date: Sun, 18 Apr 2010 11:41:31 -0700 Subject: [Gambas-user] EOF problem In-Reply-To: <4BCAD6C3.1000805@...2337...> References: <4BCA3D93.3040607@...2415...> <4BCAD6C3.1000805@...2337...> Message-ID: <4BCB525B.7090305@...2415...> Dimitris & Les: First Dimitris: OK, I pasted in your code. I had to change "temp" to "tmp", because Temp seems to be a Keyword. With that out of the way, the problem persists. When it fails, I get "EOF" both in label1 and the debug window. When it works OK, I get a blank label1 and the text appears in the debug window. The state of being at EOF seems to arise (randomly) as soon as the file is opened. After that, everthing happens as one would expect - an EOF directs execution to the EOF stuff, and lack of EOF executes the text reading stuff. I can't believe this is a common problem - by now hundreds of people would have noticed that their database and any other programs reading a text file don't work reliably. There's got to be something peculiar about my installation. Now to Les: It still fails for me with your code. To clarify a little, the problem is that the file is detected as empty when it's not, not the other way around. Your code works like mine - when the file is opened it may randomly immediately come up as being at EOF. The "IF not EOF..." statement then sends it directly to the ELSE, and the game is over. If you can reproduce my problem by reading the same file over and over, closing the program after every try, but using Gambas 2.20.2, then I've got to suspect Ubuntu, at least the 9.04 I have. If you cannot, then I should upgrade Gambas. I suppose a shotgun approach might be to upgrade to Ubuntu 9.10 AND Gambas 2.20.2. Lastly, I don't think having a file with just a single 0A should be called empty. To me EOF means just that, End of File - no more data to be read. I would consider the 0A to be data, a blank line if you like. So, I think Gambas not raising EOF on such a file until the line is read is appropriate. Both: I'll chew on this for a few days, and then think about upgrading something. Thanks for your efforts! Ed K. Les Hardy wrote: > Hi Ed, > I figured it out. > First of all, depending how the text file was emptied/created, the > contents may not be truely empty. > Gedit for example leaves the 0A (end-of-line) character in the 'empty' > file. This is recognised by eof() as a character, so, end-of-file is not > found. > I am not sure if this can be considered a bug in Gambas, but it does > mean an eof() is only good for preventing read errors, and is not > reliable for testing if a file is empty. > > The following code gets around the problem. > It's not ideal, but it does work. Maybe someone else can improve on it. > Regards > Les Hardy > > PUBLIC SUB Button1_Click() > > DIM tfile AS File > DIM Fname AS String > DIM t, txt AS String > > Label1.text = "" > Fname = "/home/les/Documents/testdat.txt" > tfile = OPEN Fname FOR READ > > IF NOT Eof(tfile) THEN > LINE INPUT #tfile, t > txt = IIf(Trim(t) > "", t, "EOF") > Label1.text = txt > ELSE > Label1.text = "EOF" > > ENDIF > CLOSE #tfile > END > > > > > > Ed & Clare Kelm wrote: > >> Hi! >> >> I'm having a problem reliably reading a text file. >> >> I am using: >> >> Panasonic CF-51 Toughbook >> Ubuntu 9.04 , Kernel 2.6.28-18 >> Gambas 2.8, QT >> >> Below is the code for a test program which demonstrates the problem. >> This is a simple form, with one button, and one label. The only code is >> the Button1_click event shown. The file "testdat.txt" contained in >> Fname is a text file with one short line of text, created with GEDIT. >> >> One would expect that clicking Button1 would open the file, read the >> line of text, and place it into label1. Indeed, this is exactly what >> happens roughly 4 times out of 5. However, sometimes the file comes up >> empty, with an immediate EOF. When the program is first started from >> the IDE, if it works correctly the first time, it will do so every time >> the button is clicked. However, if it fails (indicates EOF) the first >> time, it will fail everytime the button is clicked. Stopping the >> program and restarting it will roll the dice anew. There does not seem >> to be any pattern to the failure. It might happen twice in a row, it >> might not happen for 10 starts. >> >> Does anybody have any ideas? Is this an Ubuntu issue? >> >> Thanks! >> >> Ed K. >> >> >> PUBLIC SUB Button1_Click() >> >> DIM tfile AS File >> DIM Fname AS String >> >> Fname = "/home/us/Documents/testdat.txt" >> >> tfile = OPEN Fname FOR READ >> >> label1.Text = "" >> >> IF Eof(tfile) THEN >> label1.Text = "EOF" >> ELSE >> LINE INPUT #tfile, label1.Text >> END IF >> >> CLOSE #tfile >> >> END >> >> >> >> > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > From zelimir_ikovic at ...43... Sun Apr 18 20:59:27 2010 From: zelimir_ikovic at ...43... (Zelimir Ikovic) Date: Sun, 18 Apr 2010 11:59:27 -0700 (PDT) Subject: [Gambas-user] Did anybody try to run stepper motors through paralel port In-Reply-To: <4BCB4F26.50905@...1909...> Message-ID: <542593.46084.qm@...2417...> To run a stepper we need 2 pins: one for direction: 0 is clckwise, 5V is CounterClockWise. Second pin is for stepping. I have to bring 5V and keep it for 200 nanosec or more with WAIT1 SUB then bring 0V, and then I need precise amount of time to wait. It has to be precise because speed of machine depends on it I have to wait let say between 100 and 10000 microsec. If I wait 100microsec machine will move at 10 inch per sec which is maximum I need Here is how I do it in VB6 on win2000 (On winXP it is not smooth I feel machine will fall apart, and there is not help for this I try everything, only solution is WinXPembedded): ============================================== Public Sub WAIT1(w As Long) Dim kf As Long For kf = 1 To w Next kf End Sub ====================================== Public Sub WAIT2(s As Double) Dim c1 As Currency Dim c2 As Currency QueryPerformanceCounter c1 Do QueryPerformanceCounter c2 Loop Until ((c2 - c1 - overhead) / freq) > s End Sub ====================================== 'run this at begining of the program to measure freq Public Sub OVER() Dim CT1 As Currency Dim CT2 As Currency QueryPerformanceFrequency freq QueryPerformanceCounter CT1 QueryPerformanceCounter CT2 overhead = (CT2 - CT1) / freq End Sub ==== Public freq As Currency Public overhead As Currency ====================================================================== --- On Sun, 4/18/10, Doriano Blengino wrote: > From: Doriano Blengino > Subject: Re: [Gambas-user] Did anybody try to run stepper motors through paralel port > To: "mailing list for gambas users" > Received: Sunday, April 18, 2010, 11:27 AM > Les Hardy ha scritto: > > Zelimir Ikovic wrote: > >??? > >> I have VB6 program that run CNC plasma machine. It > work very well and smooth under win200, but in WinXP machine > motion is not good. > >> > >> It doesnot help if I set REALTIME prority for the > process ... > >> > >> How about Linux and Gambas? Daes it depent on > version of Linux ... > >> > >> What is resolution for Gambas Timer? Can I wait 10 > microsec do something wait 10 microsec and so on ... > >> > >> Regards > >>? ??? > Uhm... under linux, no matter what version, you can use the > parallel > port and high resolution timers, but... 10 us? What is the > speed of your > motor(s)? > Anyway, I see it difficult to do it in gambas, mainly > because of tight > GUI integration and impossibility to use interrupts; the > best way would > be to separate hi-level logic from lo-level timing, perhaps > through a > library written in C. > > -- > Doriano Blengino > > "Listen twice before you speak. > This is why we have two ears, but only one mouth." > > > ------------------------------------------------------------------------------ > Download Intel? Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, > find bugs > proactively, and fine-tune applications for parallel > performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From les at ...2337... Sun Apr 18 21:27:13 2010 From: les at ...2337... (Les Hardy) Date: Sun, 18 Apr 2010 20:27:13 +0100 Subject: [Gambas-user] Did anybody try to run stepper motors through paralel port In-Reply-To: <4BCB4F26.50905@...1909...> References: <234133.36229.qm@...2416...> <4BCAB512.1090802@...2337...> <4BCB4F26.50905@...1909...> Message-ID: <4BCB5D11.8040209@...2337...> Doriano Blengino wrote: > Les Hardy ha scritto: > >> Zelimir Ikovic wrote: >> >> >>> I have VB6 program that run CNC plasma machine. It work very well and smooth under win200, but in WinXP machine motion is not good. >>> >>> It doesnot help if I set REALTIME prority for the process ... >>> >>> How about Linux and Gambas? Daes it depent on version of Linux ... >>> >>> What is resolution for Gambas Timer? Can I wait 10 microsec do something wait 10 microsec and so on ... >>> >>> Regards >>> >>> > Uhm... under linux, no matter what version, you can use the parallel > port and high resolution timers, but... 10 us? What is the speed of your > motor(s)? > Anyway, I see it difficult to do it in gambas, mainly because of tight > GUI integration and impossibility to use interrupts; the best way would > be to separate hi-level logic from lo-level timing, perhaps through a > library written in C. > > Yes, I agree. I did a lot of work with parallel ports in the past, but I would not attempt a serious application for that job in Gambas. Since I retired, I have been building my own hobby CNC machines, but I just use EMC2. It is GPL, and very efficient, so I figured I had no need to write my own app. Les Hardy From les at ...2337... Sun Apr 18 21:11:29 2010 From: les at ...2337... (Les Hardy) Date: Sun, 18 Apr 2010 20:11:29 +0100 Subject: [Gambas-user] EOF problem In-Reply-To: <4BCB4C90.6090209@...1909...> References: <4BCA3D93.3040607@...2415...> <4BCAD6C3.1000805@...2337...> <4BCB4C90.6090209@...1909...> Message-ID: <4BCB5961.9040506@...2337...> Doriano Blengino wrote: > Les Hardy ha scritto: > >> Hi Ed, >> I figured it out. >> First of all, depending how the text file was emptied/created, the >> contents may not be truely empty. >> Gedit for example leaves the 0A (end-of-line) character in the 'empty' >> file. This is recognised by eof() as a character, so, end-of-file is not >> found. >> I am not sure if this can be considered a bug in Gambas, but it does >> mean an eof() is only good for preventing read errors, and is not >> reliable for testing if a file is empty. >> >> > Just breaking in to say that a file with a EOL in it is not an empty > file - it is a file with an empty line in it... > Given such a file, at first EOF is false; doing a LINE INPUT an empty > line is read, then EOF turns true. Or, at least, it should go this way. > > Regards, > > Your correct, I agree completely, but the original code Ed supplied, ' IF Eof(tfile) ' cannot work , as it checks eof before a read. When I saw he was using eof() that way, and knowing empty files are not always empty, I thought I had found his problem, so I just added a bit of code that should have got around it. I am sure you will agree, that, whatever other problems he may have, he needs not to use eof() the way he is. Regards Les Hardy From zelimir_ikovic at ...43... Sun Apr 18 22:17:12 2010 From: zelimir_ikovic at ...43... (Zelimir Ikovic) Date: Sun, 18 Apr 2010 13:17:12 -0700 (PDT) Subject: [Gambas-user] Did anybody try to run stepper motors through paralel port In-Reply-To: <4BCB5D11.8040209@...2337...> Message-ID: <314725.34200.qm@...2418...> I wanted to know how predictable and reliable GAMBAS is when a reaction to real-world events is required. Let say that Java RealTimeSystem is intended only for suitable operating systems, which means that only a real-time operating system, such as QNX, is appropriate for implementing the JVM. So that means it depends on underlynig OS version ... Simply installing an RTS extension and renaming java.lang.Thread instances to javax.realtime.RealtimeThread will not turn the application into a real-time app. I just wanted to know what is Gamas reaction to real world compared under different underlyng OS. FreeBSD, OpenBSD and Linux are not he same. --- On Sun, 4/18/10, Les Hardy wrote: > From: Les Hardy > Subject: Re: [Gambas-user] Did anybody try to run stepper motors through paralel port > To: "mailing list for gambas users" > Received: Sunday, April 18, 2010, 12:27 PM > Doriano Blengino wrote: > > Les Hardy ha scritto: > >??? > >> Zelimir Ikovic wrote: > >>??? > >>? ??? > >>> I have VB6 program that run CNC plasma > machine. It work very well and smooth under win200, but in > WinXP machine motion is not good. > >>> > >>> It doesnot help if I set REALTIME prority for > the process ... > >>> > >>> How about Linux and Gambas? Daes it depent on > version of Linux ... > >>> > >>> What is resolution for Gambas Timer? Can I > wait 10 microsec do something wait 10 microsec and so on > ... > >>> > >>> Regards > >>>? ??? > >>>? ? ??? > > Uhm... under linux, no matter what version, you can > use the parallel > > port and high resolution timers, but... 10 us? What is > the speed of your > > motor(s)? > > Anyway, I see it difficult to do it in gambas, mainly > because of tight > > GUI integration and impossibility to use interrupts; > the best way would > > be to separate hi-level logic from lo-level timing, > perhaps through a > > library written in C. > > > >??? > Yes, I agree. I did a lot of work with parallel ports in > the past, but I > would not attempt a serious application for that job in > Gambas. > > Since I retired, I have been building my own hobby CNC > machines, but I > just use EMC2. It is GPL, and very efficient, so I figured > I had no need > to write my own app. > > Les Hardy > > > > > > > ------------------------------------------------------------------------------ > Download Intel? Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, > find bugs > proactively, and fine-tune applications for parallel > performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From doriano.blengino at ...1909... Sun Apr 18 22:50:37 2010 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Sun, 18 Apr 2010 22:50:37 +0200 Subject: [Gambas-user] EOF problem In-Reply-To: <4BCB5961.9040506@...2337...> References: <4BCA3D93.3040607@...2415...> <4BCAD6C3.1000805@...2337...> <4BCB4C90.6090209@...1909...> <4BCB5961.9040506@...2337...> Message-ID: <4BCB709D.9070609@...1909...> Les Hardy ha scritto: > Doriano Blengino wrote: > >> Les Hardy ha scritto: >> >> >>> Hi Ed, >>> I figured it out. >>> First of all, depending how the text file was emptied/created, the >>> contents may not be truely empty. >>> Gedit for example leaves the 0A (end-of-line) character in the 'empty' >>> file. This is recognised by eof() as a character, so, end-of-file is not >>> found. >>> I am not sure if this can be considered a bug in Gambas, but it does >>> mean an eof() is only good for preventing read errors, and is not >>> reliable for testing if a file is empty. >>> >>> >>> >> Just breaking in to say that a file with a EOL in it is not an empty >> file - it is a file with an empty line in it... >> >> > Your correct, I agree completely, but the original code Ed supplied, ' > IF Eof(tfile) ' cannot work , as it checks eof before a read. > When I saw he was using eof() that way, and knowing empty files are not > always empty, I thought I had found his problem, so I just added a bit > of code that should have got around it. > > I am sure you will agree, that, whatever other problems he may have, he > needs not to use eof() the way he is. > Here is the original code. I think it is perfectly right: > PUBLIC SUB Button1_Click() > > DIM tfile AS File > DIM Fname AS String > > Fname = "/home/us/Documents/testdat.txt" > > tfile = OPEN Fname FOR READ > > label1.Text = "" > > IF Eof(tfile) THEN > label1.Text = "EOF" > ELSE > LINE INPUT #tfile, label1.Text > END IF > > CLOSE #tfile > > END > > If eof() is not checked *before* reading, then when? I see only two things I would not do (but it depends a lot). First, why use the "fname" variable, if it is used only once... second, why set label1.text if that .text will be anyway written shortly later? But, apart from these two very little things, that can also have some good reason, the rest of the code is the only possible, I think. Note also that label1.text can get 3 different values: "EOF" is the file is empty; "" if the first line of the file is empty; something else if the first line of the file contains some data. These three cases cover all the cases we talked about (empty and not empty files), and I think our friends know what they are doing. Of course I may be wrong, but that use of eof() seems to me fully ok. Regards, -- Doriano Blengino "Listen twice before you speak. This is why we have two ears, but only one mouth." From wdahn at ...1000... Sun Apr 18 22:54:55 2010 From: wdahn at ...1000... (Werner) Date: Mon, 19 Apr 2010 04:54:55 +0800 Subject: [Gambas-user] Did anybody try to run stepper motors through paralel port In-Reply-To: <314725.34200.qm@...2418...> References: <314725.34200.qm@...2418...> Message-ID: <4BCB719F.2060301@...1000...> On 19/04/10 04:17, Zelimir Ikovic wrote: > I wanted to know how predictable and reliable GAMBAS is when a reaction to real-world events is required. > > Let say that Java RealTimeSystem is intended only for suitable operating systems, which means that only a > real-time operating system, such as QNX, is appropriate for implementing the JVM. > So that means it depends on underlynig OS version ... > > Simply installing an RTS extension > and renaming java.lang.Thread instances to > javax.realtime.RealtimeThread will not turn the > application into a real-time app. > > I just wanted to know what is Gamas reaction to real world compared under different underlyng OS. > FreeBSD, OpenBSD and Linux are not he same. > > > --- On Sun, 4/18/10, Les Hardy wrote: > > >> From: Les Hardy >> Subject: Re: [Gambas-user] Did anybody try to run stepper motors through paralel port >> To: "mailing list for gambas users" >> Received: Sunday, April 18, 2010, 12:27 PM >> Doriano Blengino wrote: >> >>> Les Hardy ha scritto: >>> >>> >>>> Zelimir Ikovic wrote: >>>> >>>> >>>> >>>>> I have VB6 program that run CNC plasma >>>>> >> machine. It work very well and smooth under win200, but in >> WinXP machine motion is not good. >> >>>>> It doesnot help if I set REALTIME prority for >>>>> >> the process ... >> >>>>> How about Linux and Gambas? Daes it depent on >>>>> >> version of Linux ... >> >>>>> What is resolution for Gambas Timer? Can I >>>>> >> wait 10 microsec do something wait 10 microsec and so on >> ... >> >>>>> Regards >>>>> >>>>> >>>>> >>> Uhm... under linux, no matter what version, you can >>> >> use the parallel >> >>> port and high resolution timers, but... 10 us? What is >>> >> the speed of your >> >>> motor(s)? >>> Anyway, I see it difficult to do it in gambas, mainly >>> >> because of tight >> >>> GUI integration and impossibility to use interrupts; >>> >> the best way would >> >>> be to separate hi-level logic from lo-level timing, >>> >> perhaps through a >> >>> library written in C. >>> >>> >>> >> Yes, I agree. I did a lot of work with parallel ports in >> the past, but I >> would not attempt a serious application for that job in >> Gambas. >> >> Since I retired, I have been building my own hobby CNC >> machines, but I >> just use EMC2. It is GPL, and very efficient, so I figured >> I had no need >> to write my own app. >> >> Les Hardy >> >> >> >> I have used Gambas for on-screen scrolling of large screens with a 3ms tick rate and it was pleasing to the eye (meaning no discernible jitter). The minimum time resolution - as I understand it - is 1 ms at present. You can of course calibrate your own timing loops if your application is the only job the computer has to do. Regards Werner Dahn From doriano.blengino at ...1909... Sun Apr 18 23:07:55 2010 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Sun, 18 Apr 2010 23:07:55 +0200 Subject: [Gambas-user] Did anybody try to run stepper motors through paralel port In-Reply-To: <314725.34200.qm@...2418...> References: <314725.34200.qm@...2418...> Message-ID: <4BCB74AB.9010000@...1909...> Zelimir Ikovic ha scritto: > I wanted to know how predictable and reliable GAMBAS is when a reaction to real-world events is required. > > Let say that Java RealTimeSystem is intended only for suitable operating systems, which means that only a > real-time operating system, such as QNX, is appropriate for implementing the JVM. > So that means it depends on underlynig OS version ... > > Simply installing an RTS extension > and renaming java.lang.Thread instances to > javax.realtime.RealtimeThread will not turn the > application into a real-time app. > > I just wanted to know what is Gamas reaction to real world compared under different underlyng OS. > FreeBSD, OpenBSD and Linux are not he same. > I understand but, let me say, your sample code had nothing to do with realtime... it was simply "fast as much as possible", without any mechanism to ensure some kind of real-time response to some event. To only read a counter is not enough. I can run 4 stepper motors directly (no step+direction, but driving the phases directly instead) with a CPU more than 100 times slower than a x86 CPU. But this is possible using interrupts. Practically every OS can, in some way, use interrupts - gambas can not. So, the only way in gambas to do precise timing is to let it run alone, with maximum priority and privileges. Or, to delegate high timing precision to some external piece of software (a libray or a driver) which can take advantage of interrupts, or callbacks, or signals. On the other hand I think that gambas can, with tight loops, do delays like you did in the original source. Surely it is predictable enough to let you calculate in some way the correct amount of cycling to obtain the needed delay - the fact is that gambas will never be the only thing running on the system, and you have little control about that. The same problem of windows xp - if you want precise timing, you must obtain privileges, either for the program or using a driver. I must also add that, without particular precautions, linux is more predictable about sleep() than win2000 or xp. Regards, -- Doriano Blengino "Listen twice before you speak. This is why we have two ears, but only one mouth." From twopilots at ...2415... Mon Apr 19 00:17:26 2010 From: twopilots at ...2415... (Ed & Clare Kelm) Date: Sun, 18 Apr 2010 15:17:26 -0700 Subject: [Gambas-user] EOF problem In-Reply-To: <4BCB709D.9070609@...1909...> References: <4BCA3D93.3040607@...2415...> <4BCAD6C3.1000805@...2337...> <4BCB4C90.6090209@...1909...> <4BCB5961.9040506@...2337...> <4BCB709D.9070609@...1909...> Message-ID: <4BCB84F6.7090401@...2415...> Hi all: A couple of comments about the discussions below: 1. The test program was written with EOF at the start, because the actual program I am working on has this structure, for reading in multiple lines of text: WHILE NOT EOF(tfile) (bunch of code for reading the lines in and putting the data in the proper places) WEND CLOSE #tfile When that failed, I wrote the test program to see if I was actually sometimes getting an EOF immediately after opening the file, since the first thing WHILE does is test EOF. 2. Clearing label1 after every button click is just a little insurance. Given that things weren't working as expected, I wanted to make sure what I saw in label1 was new info, not something left from the previous button click. I know that shouldn't be necessary, because the IF-THEN-ELSE structure will always write to the label - but then there shouldn't be an immediate EOF either. 3. Using Fname like that is just a little habit I've developed. It allows me to try a different file by commenting out one setting of Fname and writing a new one, without erasing the previous one. And it makes the OPEN statement more compact and easy to read. It is also sometimes useful to put such equates all in one place, so it's easy to find and change parameters, rather than rummaging around in the code. You are correct, it is sort of a waste if I am only using the variable once. In my actual program, Fname also gets used when the database gets modified and the file then has to be re-written. I am not a professional programmer, so I'm sure I have some ways of doing things that make professionals cringe! Thanks again for thinking about my problem! Regards, Ed K. Doriano Blengino wrote: > Les Hardy ha scritto: > >> Doriano Blengino wrote: >> >> >>> Les Hardy ha scritto: >>> >>> >>> >>>> Hi Ed, >>>> I figured it out. >>>> First of all, depending how the text file was emptied/created, the >>>> contents may not be truely empty. >>>> Gedit for example leaves the 0A (end-of-line) character in the 'empty' >>>> file. This is recognised by eof() as a character, so, end-of-file is not >>>> found. >>>> I am not sure if this can be considered a bug in Gambas, but it does >>>> mean an eof() is only good for preventing read errors, and is not >>>> reliable for testing if a file is empty. >>>> >>>> >>>> >>>> >>> Just breaking in to say that a file with a EOL in it is not an empty >>> file - it is a file with an empty line in it... >>> >>> >>> >> Your correct, I agree completely, but the original code Ed supplied, ' >> IF Eof(tfile) ' cannot work , as it checks eof before a read. >> When I saw he was using eof() that way, and knowing empty files are not >> always empty, I thought I had found his problem, so I just added a bit >> of code that should have got around it. >> >> I am sure you will agree, that, whatever other problems he may have, he >> needs not to use eof() the way he is. >> >> > Here is the original code. I think it is perfectly right: > >> PUBLIC SUB Button1_Click() >> >> DIM tfile AS File >> DIM Fname AS String >> >> Fname = "/home/us/Documents/testdat.txt" >> >> tfile = OPEN Fname FOR READ >> >> label1.Text = "" >> >> IF Eof(tfile) THEN >> label1.Text = "EOF" >> ELSE >> LINE INPUT #tfile, label1.Text >> END IF >> >> CLOSE #tfile >> >> END >> >> >> > If eof() is not checked *before* reading, then when? I see only two > things I would not do (but it depends a lot). First, why use the "fname" > variable, if it is used only once... second, why set label1.text if that > .text will be anyway written shortly later? > > But, apart from these two very little things, that can also have some > good reason, the rest of the code is the only possible, I think. Note > also that label1.text can get 3 different values: "EOF" is the file is > empty; "" if the first line of the file is empty; something else if the > first line of the file contains some data. These three cases cover all > the cases we talked about (empty and not empty files), and I think our > friends know what they are doing. > > Of course I may be wrong, but that use of eof() seems to me fully ok. > > Regards, > > From dosida at ...626... Mon Apr 19 00:49:26 2010 From: dosida at ...626... (Dimitris Anogiatis) Date: Mon, 19 Apr 2010 01:49:26 +0300 Subject: [Gambas-user] EOF problem In-Reply-To: <4BCB84F6.7090401@...2415...> References: <4BCA3D93.3040607@...2415...> <4BCAD6C3.1000805@...2337...> <4BCB4C90.6090209@...1909...> <4BCB5961.9040506@...2337...> <4BCB709D.9070609@...1909...> <4BCB84F6.7090401@...2415...> Message-ID: Ed, if reading a text file and extracting information from it is what you're trying to do, why not just use tmp = File.Load(Fname) File.Load is documented over here http://www.gambasdoc.org/help/comp/gb/file/load after loading the contents of Fname in tmp you can do your magic, without using an OPEN statement and a loop unless the file you're reading is a few megabytes, File.Load should be sufficiently fast to cover your needs. I am sure that there's more than one ways to skin a cat, and professionals didn't exactly drop out of the sky one day knowing everything about programming :) It takes practice and more practice and even more practice :) we all learn in different ways and we're all here to help each other :) Whether we are professionals,amateurs hobbyists or plain curious As they say in my country, One hand washes the other and both wash the face :) Hope this helps Regards, Dimitris On Mon, Apr 19, 2010 at 1:17 AM, Ed & Clare Kelm wrote: > Hi all: > > A couple of comments about the discussions below: > > 1. The test program was written with EOF at the start, because the > actual program I am working on has this structure, for reading in > multiple lines of text: > > WHILE NOT EOF(tfile) > (bunch of code for reading the lines in and putting the data in the > proper places) > WEND > > CLOSE #tfile > > When that failed, I wrote the test program to see if I was actually > sometimes getting an EOF immediately after opening the file, since the > first thing WHILE does is test EOF. > > 2. Clearing label1 after every button click is just a little > insurance. Given that things weren't working as expected, I wanted to > make sure what I saw in label1 was new info, not something left from the > previous button click. I know that shouldn't be necessary, because the > IF-THEN-ELSE structure will always write to the label - but then there > shouldn't be an immediate EOF either. > > 3. Using Fname like that is just a little habit I've developed. It > allows me to try a different file by commenting out one setting of Fname > and writing a new one, without erasing the previous one. And it makes > the OPEN statement more compact and easy to read. It is also sometimes > useful to put such equates all in one place, so it's easy to find and > change parameters, rather than rummaging around in the code. You are > correct, it is sort of a waste if I am only using the variable once. In > my actual program, Fname also gets used when the database gets modified > and the file then has to be re-written. > > I am not a professional programmer, so I'm sure I have some ways of > doing things that make professionals cringe! > > Thanks again for thinking about my problem! > > Regards, > > Ed K. > > Doriano Blengino wrote: > > Les Hardy ha scritto: > > > >> Doriano Blengino wrote: > >> > >> > >>> Les Hardy ha scritto: > >>> > >>> > >>> > >>>> Hi Ed, > >>>> I figured it out. > >>>> First of all, depending how the text file was emptied/created, the > >>>> contents may not be truely empty. > >>>> Gedit for example leaves the 0A (end-of-line) character in the 'empty' > >>>> file. This is recognised by eof() as a character, so, end-of-file is > not > >>>> found. > >>>> I am not sure if this can be considered a bug in Gambas, but it does > >>>> mean an eof() is only good for preventing read errors, and is not > >>>> reliable for testing if a file is empty. > >>>> > >>>> > >>>> > >>>> > >>> Just breaking in to say that a file with a EOL in it is not an empty > >>> file - it is a file with an empty line in it... > >>> > >>> > >>> > >> Your correct, I agree completely, but the original code Ed supplied, ' > >> IF Eof(tfile) ' cannot work , as it checks eof before a read. > >> When I saw he was using eof() that way, and knowing empty files are not > >> always empty, I thought I had found his problem, so I just added a bit > >> of code that should have got around it. > >> > >> I am sure you will agree, that, whatever other problems he may have, he > >> needs not to use eof() the way he is. > >> > >> > > Here is the original code. I think it is perfectly right: > > > >> PUBLIC SUB Button1_Click() > >> > >> DIM tfile AS File > >> DIM Fname AS String > >> > >> Fname = "/home/us/Documents/testdat.txt" > >> > >> tfile = OPEN Fname FOR READ > >> > >> label1.Text = "" > >> > >> IF Eof(tfile) THEN > >> label1.Text = "EOF" > >> ELSE > >> LINE INPUT #tfile, label1.Text > >> END IF > >> > >> CLOSE #tfile > >> > >> END > >> > >> > >> > > If eof() is not checked *before* reading, then when? I see only two > > things I would not do (but it depends a lot). First, why use the "fname" > > variable, if it is used only once... second, why set label1.text if that > > .text will be anyway written shortly later? > > > > But, apart from these two very little things, that can also have some > > good reason, the rest of the code is the only possible, I think. Note > > also that label1.text can get 3 different values: "EOF" is the file is > > empty; "" if the first line of the file is empty; something else if the > > first line of the file contains some data. These three cases cover all > > the cases we talked about (empty and not empty files), and I think our > > friends know what they are doing. > > > > Of course I may be wrong, but that use of eof() seems to me fully ok. > > > > Regards, > > > > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From nando_f at ...951... Mon Apr 19 00:50:20 2010 From: nando_f at ...951... (nando) Date: Sun, 18 Apr 2010 18:50:20 -0400 Subject: [Gambas-user] Did anybody try to run stepper motors through paralel port In-Reply-To: <4BCB74AB.9010000@...1909...> References: <314725.34200.qm@...2418...> <4BCB74AB.9010000@...1909...> Message-ID: <20100418224354.M9801@...951...> I use Gambas for nearly real-time work and it performs remarkably well, actually quite impressed. Far better than VB I have a data stream at 13.5 Kbps coming in from a remote modem requiring immediate work and turn around output. It might not seem like a fast stream, but the remote end requires a response immediately otherwise there are resends. It works! Gambas 1.0.19 graphical, FC4, samba Longest running time was about 420 days sans error. Some rules to follow: multiple core if you have it: good! remove unneed cron jobs. reduce overhead. turn swap off. Very clean efficient programming as possible -Fernando ---------- Original Message ----------- From: Doriano Blengino To: mailing list for gambas users Sent: Sun, 18 Apr 2010 23:07:55 +0200 Subject: Re: [Gambas-user] Did anybody try to run stepper motors through paralel port > Zelimir Ikovic ha scritto: > > I wanted to know how predictable and reliable GAMBAS is when a reaction to real-world events is required. > > > > Let say that Java RealTimeSystem is intended only for suitable operating systems, which means that only a > > real-time operating system, such as QNX, is appropriate for implementing the JVM. > > So that means it depends on underlynig OS version ... > > > > Simply installing an RTS extension > > and renaming java.lang.Thread instances to > > javax.realtime.RealtimeThread will not turn the > > application into a real-time app. > > > > I just wanted to know what is Gamas reaction to real world compared under different underlyng OS. > > FreeBSD, OpenBSD and Linux are not he same. > > > I understand but, let me say, your sample code had nothing to do with > realtime... it was simply "fast as much as possible", without any > mechanism to ensure some kind of real-time response to some event. To > only read a counter is not enough. I can run 4 stepper motors directly > (no step+direction, but driving the phases directly instead) with a CPU > more than 100 times slower than a x86 CPU. But this is possible using > interrupts. Practically every OS can, in some way, use interrupts - > gambas can not. So, the only way in gambas to do precise timing is to > let it run alone, with maximum priority and privileges. Or, to delegate > high timing precision to some external piece of software (a libray or a > driver) which can take advantage of interrupts, or callbacks, or signals. > > On the other hand I think that gambas can, with tight loops, do delays > like you did in the original source. Surely it is predictable enough to > let you calculate in some way the correct amount of cycling to obtain > the needed delay - the fact is that gambas will never be the only thing > running on the system, and you have little control about that. The same > problem of windows xp - if you want precise timing, you must obtain > privileges, either for the program or using a driver. I must also add > that, without particular precautions, linux is more predictable about > sleep() than win2000 or xp. > > Regards, > > -- > Doriano Blengino > > "Listen twice before you speak. > This is why we have two ears, but only one mouth." > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user ------- End of Original Message ------- From twopilots at ...2415... Mon Apr 19 01:24:49 2010 From: twopilots at ...2415... (Ed & Clare Kelm) Date: Sun, 18 Apr 2010 16:24:49 -0700 Subject: [Gambas-user] EOF problem In-Reply-To: References: <4BCA3D93.3040607@...2415...> <4BCAD6C3.1000805@...2337...> <4BCB4C90.6090209@...1909...> <4BCB5961.9040506@...2337...> <4BCB709D.9070609@...1909...> <4BCB84F6.7090401@...2415...> Message-ID: <4BCB94C1.7000104@...2415...> Dimitris: Oooh! That works! Weird. I'll have to write a little code to parse out my data from the single string variable, but that's a great work-around if I can't get EOF to work. Thanks! Ed K. Dimitris Anogiatis wrote: > Ed, > if reading a text file and extracting information from it is what you're > trying to do, why not just use > > tmp = File.Load(Fname) > > File.Load is documented over here > http://www.gambasdoc.org/help/comp/gb/file/load > > after loading the contents of Fname in tmp you can do your magic, without > using an OPEN statement and a loop > unless the file you're reading is a few megabytes, File.Load should be > sufficiently fast to cover your needs. > > I am sure that there's more than one ways to skin a cat, and professionals > didn't exactly drop out of the sky one day > knowing everything about programming :) It takes practice and more practice > and even more practice :) we all learn > in different ways and we're all here to help each other :) Whether we are > professionals,amateurs hobbyists or plain curious > > As they say in my country, One hand washes the other and both wash the face > :) > > Hope this helps > Regards, > Dimitris > > On Mon, Apr 19, 2010 at 1:17 AM, Ed & Clare Kelm > wrote: > > >> Hi all: >> >> A couple of comments about the discussions below: >> >> 1. The test program was written with EOF at the start, because the >> actual program I am working on has this structure, for reading in >> multiple lines of text: >> >> WHILE NOT EOF(tfile) >> (bunch of code for reading the lines in and putting the data in the >> proper places) >> WEND >> >> CLOSE #tfile >> >> When that failed, I wrote the test program to see if I was actually >> sometimes getting an EOF immediately after opening the file, since the >> first thing WHILE does is test EOF. >> >> 2. Clearing label1 after every button click is just a little >> insurance. Given that things weren't working as expected, I wanted to >> make sure what I saw in label1 was new info, not something left from the >> previous button click. I know that shouldn't be necessary, because the >> IF-THEN-ELSE structure will always write to the label - but then there >> shouldn't be an immediate EOF either. >> >> 3. Using Fname like that is just a little habit I've developed. It >> allows me to try a different file by commenting out one setting of Fname >> and writing a new one, without erasing the previous one. And it makes >> the OPEN statement more compact and easy to read. It is also sometimes >> useful to put such equates all in one place, so it's easy to find and >> change parameters, rather than rummaging around in the code. You are >> correct, it is sort of a waste if I am only using the variable once. In >> my actual program, Fname also gets used when the database gets modified >> and the file then has to be re-written. >> >> I am not a professional programmer, so I'm sure I have some ways of >> doing things that make professionals cringe! >> >> Thanks again for thinking about my problem! >> >> Regards, >> >> Ed K. >> >> Doriano Blengino wrote: >> >>> Les Hardy ha scritto: >>> >>> >>>> Doriano Blengino wrote: >>>> >>>> >>>> >>>>> Les Hardy ha scritto: >>>>> >>>>> >>>>> >>>>> >>>>>> Hi Ed, >>>>>> I figured it out. >>>>>> First of all, depending how the text file was emptied/created, the >>>>>> contents may not be truely empty. >>>>>> Gedit for example leaves the 0A (end-of-line) character in the 'empty' >>>>>> file. This is recognised by eof() as a character, so, end-of-file is >>>>>> >> not >> >>>>>> found. >>>>>> I am not sure if this can be considered a bug in Gambas, but it does >>>>>> mean an eof() is only good for preventing read errors, and is not >>>>>> reliable for testing if a file is empty. >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>> Just breaking in to say that a file with a EOL in it is not an empty >>>>> file - it is a file with an empty line in it... >>>>> >>>>> >>>>> >>>>> >>>> Your correct, I agree completely, but the original code Ed supplied, ' >>>> IF Eof(tfile) ' cannot work , as it checks eof before a read. >>>> When I saw he was using eof() that way, and knowing empty files are not >>>> always empty, I thought I had found his problem, so I just added a bit >>>> of code that should have got around it. >>>> >>>> I am sure you will agree, that, whatever other problems he may have, he >>>> needs not to use eof() the way he is. >>>> >>>> >>>> >>> Here is the original code. I think it is perfectly right: >>> >>> >>>> PUBLIC SUB Button1_Click() >>>> >>>> DIM tfile AS File >>>> DIM Fname AS String >>>> >>>> Fname = "/home/us/Documents/testdat.txt" >>>> >>>> tfile = OPEN Fname FOR READ >>>> >>>> label1.Text = "" >>>> >>>> IF Eof(tfile) THEN >>>> label1.Text = "EOF" >>>> ELSE >>>> LINE INPUT #tfile, label1.Text >>>> END IF >>>> >>>> CLOSE #tfile >>>> >>>> END >>>> >>>> >>>> >>>> >>> If eof() is not checked *before* reading, then when? I see only two >>> things I would not do (but it depends a lot). First, why use the "fname" >>> variable, if it is used only once... second, why set label1.text if that >>> .text will be anyway written shortly later? >>> >>> But, apart from these two very little things, that can also have some >>> good reason, the rest of the code is the only possible, I think. Note >>> also that label1.text can get 3 different values: "EOF" is the file is >>> empty; "" if the first line of the file is empty; something else if the >>> first line of the file contains some data. These three cases cover all >>> the cases we talked about (empty and not empty files), and I think our >>> friends know what they are doing. >>> >>> Of course I may be wrong, but that use of eof() seems to me fully ok. >>> >>> Regards, >>> >>> >>> >> ------------------------------------------------------------------------------ >> Download Intel® Parallel Studio Eval >> Try the new software tools for yourself. Speed compiling, find bugs >> proactively, and fine-tune applications for parallel performance. >> See why Intel Parallel Studio got high marks during beta. >> http://p.sf.net/sfu/intel-sw-dev >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> >> > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > From zelimir_ikovic at ...43... Mon Apr 19 01:43:39 2010 From: zelimir_ikovic at ...43... (Zelimir Ikovic) Date: Sun, 18 Apr 2010 16:43:39 -0700 (PDT) Subject: [Gambas-user] Did anybody try to run stepper motors through paralel port In-Reply-To: <4BCB74AB.9010000@...1909...> Message-ID: <918808.17560.qm@...2419...> Thank you all, in last few emails is answer! --- On Sun, 4/18/10, Doriano Blengino wrote: > From: Doriano Blengino > Subject: Re: [Gambas-user] Did anybody try to run stepper motors through paralel port > To: "mailing list for gambas users" > Received: Sunday, April 18, 2010, 2:07 PM > Zelimir Ikovic ha scritto: > > I wanted to know how predictable and reliable GAMBAS > is when a reaction to real-world events is required. > > > > Let say that Java RealTimeSystem is intended only for > suitable? operating systems, which means that only a > > real-time operating system, such as QNX, is > appropriate for implementing the JVM. > > So that means it depends on underlynig OS version ... > >? > >? Simply installing an RTS extension > >? and renaming java.lang.Thread instances to > >? javax.realtime.RealtimeThread will not turn the > > >? application into a real-time app. > >? > >? I just wanted to know what is Gamas reaction to > real world compared under different underlyng OS. > >? FreeBSD, OpenBSD and Linux are not he same. > >??? > I understand but, let me say, your sample code had nothing > to do with > realtime... it was simply "fast as much as possible", > without any > mechanism to ensure some kind of real-time response to some > event. To > only read a counter is not enough. I can run 4 stepper > motors directly > (no step+direction, but driving the phases directly > instead) with a CPU > more than 100 times slower than a x86 CPU. But this is > possible using > interrupts. Practically every OS can, in some way, use > interrupts - > gambas can not. So, the only way in gambas to do precise > timing is to > let it run alone, with maximum priority and privileges. Or, > to delegate > high timing precision to some external piece of software (a > libray or a > driver) which can take advantage of interrupts, or > callbacks, or signals. > > On the other hand I think that gambas can, with tight > loops, do delays > like you did in the original source. Surely it is > predictable enough to > let you calculate in some way the correct amount of cycling > to obtain > the needed delay - the fact is that gambas will never be > the only thing > running on the system, and you have little control about > that. The same > problem of windows xp - if you want precise timing, you > must obtain > privileges, either for the program or using a driver. I > must also add > that, without particular precautions, linux is more > predictable about > sleep() than win2000 or xp. > > Regards, > > -- > Doriano Blengino > > "Listen twice before you speak. > This is why we have two ears, but only one mouth." > > > ------------------------------------------------------------------------------ > Download Intel? Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, > find bugs > proactively, and fine-tune applications for parallel > performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From zelimir_ikovic at ...43... Mon Apr 19 06:58:52 2010 From: zelimir_ikovic at ...43... (Zelimir Ikovic) Date: Sun, 18 Apr 2010 21:58:52 -0700 (PDT) Subject: [Gambas-user] Some links I have found on The Net: Message-ID: <425799.22196.qm@...2420...> http://www.linux.com/archive/articles/40666 http://linuxfocus.org/English/March2004/article329.shtml http://www.linuxjournal.com/node/8481/print http://www.learnlinux.co.cc/gambas/ http://www.awce.com/gp3-gambas.html http://toko.baliwae.com/product_info.php?products_id=759 http://toko.baliwae.com/product_info.php?products_id=369 http://www.linux-magazine.com/w3/issue/26/Gambas.pdf http://www.linuxexpres.cz/software/gambas-visual-basic-pro-linux http://www.linux-magazine.it/Siamo-tutti-programmatori.htm From doriano.blengino at ...1909... Mon Apr 19 10:05:53 2010 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Mon, 19 Apr 2010 10:05:53 +0200 Subject: [Gambas-user] EOF problem In-Reply-To: <4BCB84F6.7090401@...2415...> References: <4BCA3D93.3040607@...2415...> <4BCAD6C3.1000805@...2337...> <4BCB4C90.6090209@...1909...> <4BCB5961.9040506@...2337...> <4BCB709D.9070609@...1909...> <4BCB84F6.7090401@...2415...> Message-ID: <4BCC0EE1.5080008@...1909...> Ed & Clare Kelm ha scritto: I was feeling that my words could be seemed not appropriate. In fact, I added that "our friends know what they are doing", and labeled those things as "very little thing", knowing in my mind that was experimental code to debug some strange behavior. Sorry for that. I did that to stress that this code: > Hi all: > > A couple of comments about the discussions below: > > 1. The test program was written with EOF at the start, because the > actual program I am working on has this structure, for reading in > multiple lines of text: > > WHILE NOT EOF(tfile) > (bunch of code for reading the lines in and putting the data in the > proper places) > WEND > > CLOSE #tfile > has nothing wrong for me. And if the previous code "was written with EOF at the start", it is simply because there is no other way to go. Happy to know that file.load() seems to solve - anyway if that EOF has a bug, it is a harmful one. Regards, Doriano > When that failed, I wrote the test program to see if I was actually > sometimes getting an EOF immediately after opening the file, since the > first thing WHILE does is test EOF. > > 2. Clearing label1 after every button click is just a little > insurance. Given that things weren't working as expected, I wanted to > make sure what I saw in label1 was new info, not something left from the > previous button click. I know that shouldn't be necessary, because the > IF-THEN-ELSE structure will always write to the label - but then there > shouldn't be an immediate EOF either. > > 3. Using Fname like that is just a little habit I've developed. It > allows me to try a different file by commenting out one setting of Fname > and writing a new one, without erasing the previous one. And it makes > the OPEN statement more compact and easy to read. It is also sometimes > useful to put such equates all in one place, so it's easy to find and > change parameters, rather than rummaging around in the code. You are > correct, it is sort of a waste if I am only using the variable once. In > my actual program, Fname also gets used when the database gets modified > and the file then has to be re-written. > > I am not a professional programmer, so I'm sure I have some ways of > doing things that make professionals cringe! > > Thanks again for thinking about my problem! > > Regards, > > Ed K. > > Doriano Blengino wrote: > >> Les Hardy ha scritto: >> >> >>> Doriano Blengino wrote: >>> >>> >>> >>>> Les Hardy ha scritto: >>>> >>>> >>>> >>>> >>>>> Hi Ed, >>>>> I figured it out. >>>>> First of all, depending how the text file was emptied/created, the >>>>> contents may not be truely empty. >>>>> Gedit for example leaves the 0A (end-of-line) character in the 'empty' >>>>> file. This is recognised by eof() as a character, so, end-of-file is not >>>>> found. >>>>> I am not sure if this can be considered a bug in Gambas, but it does >>>>> mean an eof() is only good for preventing read errors, and is not >>>>> reliable for testing if a file is empty. >>>>> >>>>> >>>>> >>>>> >>>>> >>>> Just breaking in to say that a file with a EOL in it is not an empty >>>> file - it is a file with an empty line in it... >>>> >>>> >>>> >>>> >>> Your correct, I agree completely, but the original code Ed supplied, ' >>> IF Eof(tfile) ' cannot work , as it checks eof before a read. >>> When I saw he was using eof() that way, and knowing empty files are not >>> always empty, I thought I had found his problem, so I just added a bit >>> of code that should have got around it. >>> >>> I am sure you will agree, that, whatever other problems he may have, he >>> needs not to use eof() the way he is. >>> >>> >>> >> Here is the original code. I think it is perfectly right: >> >> >>> PUBLIC SUB Button1_Click() >>> >>> DIM tfile AS File >>> DIM Fname AS String >>> >>> Fname = "/home/us/Documents/testdat.txt" >>> >>> tfile = OPEN Fname FOR READ >>> >>> label1.Text = "" >>> >>> IF Eof(tfile) THEN >>> label1.Text = "EOF" >>> ELSE >>> LINE INPUT #tfile, label1.Text >>> END IF >>> >>> CLOSE #tfile >>> >>> END >>> >>> >>> >>> >> If eof() is not checked *before* reading, then when? I see only two >> things I would not do (but it depends a lot). First, why use the "fname" >> variable, if it is used only once... second, why set label1.text if that >> .text will be anyway written shortly later? >> >> But, apart from these two very little things, that can also have some >> good reason, the rest of the code is the only possible, I think. Note >> also that label1.text can get 3 different values: "EOF" is the file is >> empty; "" if the first line of the file is empty; something else if the >> first line of the file contains some data. These three cases cover all >> the cases we talked about (empty and not empty files), and I think our >> friends know what they are doing. >> >> Of course I may be wrong, but that use of eof() seems to me fully ok. >> >> Regards, >> >> >> > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From wdahn at ...1000... Mon Apr 19 15:28:33 2010 From: wdahn at ...1000... (Werner) Date: Mon, 19 Apr 2010 21:28:33 +0800 Subject: [Gambas-user] Did anybody try to run stepper motors through paralel port In-Reply-To: <314725.34200.qm@...2418...> References: <314725.34200.qm@...2418...> Message-ID: <4BCC5A81.3070409@...1000...> On 19/04/10 04:17, Zelimir Ikovic wrote: > I wanted to know how predictable and reliable GAMBAS is when a reaction to real-world events is required. > > Let say that Java RealTimeSystem is intended only for suitable operating systems, which means that only a > real-time operating system, such as QNX, is appropriate for implementing the JVM. > So that means it depends on underlynig OS version ... > > Simply installing an RTS extension > and renaming java.lang.Thread instances to > javax.realtime.RealtimeThread will not turn the > application into a real-time app. > > I just wanted to know what is Gamas reaction to real world compared under different underlyng OS. > FreeBSD, OpenBSD and Linux are not he same. > > > --- On Sun, 4/18/10, Les Hardy wrote: > > >> From: Les Hardy >> Subject: Re: [Gambas-user] Did anybody try to run stepper motors through paralel port >> To: "mailing list for gambas users" >> Received: Sunday, April 18, 2010, 12:27 PM >> Doriano Blengino wrote: >> >>> Les Hardy ha scritto: >>> >>> >>>> Zelimir Ikovic wrote: >>>> >>>> >>>> >>>>> I have VB6 program that run CNC plasma >>>>> >> machine. It work very well and smooth under win200, but in >> WinXP machine motion is not good. >> >>>>> It doesnot help if I set REALTIME prority for >>>>> >> the process ... >> >>>>> How about Linux and Gambas? Daes it depent on >>>>> >> version of Linux ... >> >>>>> What is resolution for Gambas Timer? Can I >>>>> >> wait 10 microsec do something wait 10 microsec and so on >> ... >> >>>>> Regards >>>>> >>>>> >>>>> >>> Uhm... under linux, no matter what version, you can >>> >> use the parallel >> >>> port and high resolution timers, but... 10 us? What is >>> >> the speed of your >> >>> motor(s)? >>> Anyway, I see it difficult to do it in gambas, mainly >>> >> because of tight >> >>> GUI integration and impossibility to use interrupts; >>> >> the best way would >> >>> be to separate hi-level logic from lo-level timing, >>> >> perhaps through a >> >>> library written in C. >>> >>> >>> >> Yes, I agree. I did a lot of work with parallel ports in >> the past, but I >> would not attempt a serious application for that job in >> Gambas. >> >> Since I retired, I have been building my own hobby CNC >> machines, but I >> just use EMC2. It is GPL, and very efficient, so I figured >> I had no need >> to write my own app. >> >> Les Hardy >> >> To get a feeling what is doable you can use the timer command for benchmarking. Example: PUBLIC SUB Benchmark() DIM startTime AS Float DIM stoptime AS Float DIM i AS Integer FOR i = 1 TO 10 startTime = Timer 'whatever you want to benchmark comes next 'in this case we time a wait for an empty event queue WAIT 'end of benchmarked code stoptime = Timer PRINT "Waiting took " & ((stoptime - startTime) * 1000) & " msecs" NEXT END The above benchmark takes between 8 and 18 microseconds on my machine. Regards Werner From prog at ...2177... Mon Apr 19 17:15:32 2010 From: prog at ...2177... (craf) Date: Mon, 19 Apr 2010 11:15:32 -0400 Subject: [Gambas-user] Problem with directory /lib Message-ID: <1271690132.2028.7.camel@...2406...> Hi. I managed to install a console program compiled on Ubuntu 9.04 to Ubuntu 8.04, using shared libraries. The problem is with a program that uses the GTK or QT library, and they require the libraries that are in the lib folder, and take into account that come with the PC and not those that are packaged with the project. Example. If I provide shared libraries are located in the lib folder, should be exported with the following: export LD_LIBRARY_PATH =/opt/proyect/gambas2/lib_shared/lib:/opt/proyect/gambas2/lib_shared/usr/lib The path /usr/lib is taken into account, but the path /lib, and take the PC where you are installing the program. I also tested: export LD_LIBRARY_PATH = $LD_LIBRARY_PATH:/opt/proyect/gambas2/lib_shared/lib:/opt/proyect/gambas2/lib_shared/usr/lib export LD_LIBRARY_PATH =/opt/proyect/gambas2/lib_shared/lib:/opt/proyect/gambas2/lib_shared/usr/lib:$LD_LIBRARY_PATH but nothing... Is there any way to force you to take the path /lib specified in the file .sh by one and not the PC? Regards From twopilots at ...2415... Mon Apr 19 17:38:10 2010 From: twopilots at ...2415... (Ed & Clare Kelm) Date: Mon, 19 Apr 2010 08:38:10 -0700 Subject: [Gambas-user] EOF problem In-Reply-To: <4BCC0EE1.5080008@...1909...> References: <4BCA3D93.3040607@...2415...> <4BCAD6C3.1000805@...2337...> <4BCB4C90.6090209@...1909...> <4BCB5961.9040506@...2337...> <4BCB709D.9070609@...1909...> <4BCB84F6.7090401@...2415...> <4BCC0EE1.5080008@...1909...> Message-ID: <4BCC78E2.3080401@...2415...> Doriano: Your words were perfectly appropriate, and I understood them and appreciate the support! Thanks! Yes, I wish EOF would work properly - it would make moving the code from VB6 to Gambas less trouble, since the VB6 code uses EOF. I really need to try updating Ubuntu and Gambas I guess, to see if the problem can be cured that way. Regards, Ed K. Doriano Blengino wrote: > Ed & Clare Kelm ha scritto: > I was feeling that my words could be seemed not appropriate. In fact, I > added that "our friends know what they are doing", and labeled those > things as "very little thing", knowing in my mind that was experimental > code to debug some strange behavior. Sorry for that. I did that to > stress that this code: > >> Hi all: >> >> A couple of comments about the discussions below: >> >> 1. The test program was written with EOF at the start, because the >> actual program I am working on has this structure, for reading in >> multiple lines of text: >> >> WHILE NOT EOF(tfile) >> (bunch of code for reading the lines in and putting the data in the >> proper places) >> WEND >> >> CLOSE #tfile >> >> > has nothing wrong for me. And if the previous code "was written with EOF > at the start", it is simply because there is no other way to go. Happy > to know that file.load() seems to solve - anyway if that EOF has a bug, > it is a harmful one. > > Regards, > Doriano > >> When that failed, I wrote the test program to see if I was actually >> sometimes getting an EOF immediately after opening the file, since the >> first thing WHILE does is test EOF. >> >> 2. Clearing label1 after every button click is just a little >> insurance. Given that things weren't working as expected, I wanted to >> make sure what I saw in label1 was new info, not something left from the >> previous button click. I know that shouldn't be necessary, because the >> IF-THEN-ELSE structure will always write to the label - but then there >> shouldn't be an immediate EOF either. >> >> 3. Using Fname like that is just a little habit I've developed. It >> allows me to try a different file by commenting out one setting of Fname >> and writing a new one, without erasing the previous one. And it makes >> the OPEN statement more compact and easy to read. It is also sometimes >> useful to put such equates all in one place, so it's easy to find and >> change parameters, rather than rummaging around in the code. You are >> correct, it is sort of a waste if I am only using the variable once. In >> my actual program, Fname also gets used when the database gets modified >> and the file then has to be re-written. >> >> I am not a professional programmer, so I'm sure I have some ways of >> doing things that make professionals cringe! >> >> Thanks again for thinking about my problem! >> >> Regards, >> >> Ed K. >> >> Doriano Blengino wrote: >> >> >>> Les Hardy ha scritto: >>> >>> >>> >>>> Doriano Blengino wrote: >>>> >>>> >>>> >>>> >>>>> Les Hardy ha scritto: >>>>> >>>>> >>>>> >>>>> >>>>> >>>>>> Hi Ed, >>>>>> I figured it out. >>>>>> First of all, depending how the text file was emptied/created, the >>>>>> contents may not be truely empty. >>>>>> Gedit for example leaves the 0A (end-of-line) character in the 'empty' >>>>>> file. This is recognised by eof() as a character, so, end-of-file is not >>>>>> found. >>>>>> I am not sure if this can be considered a bug in Gambas, but it does >>>>>> mean an eof() is only good for preventing read errors, and is not >>>>>> reliable for testing if a file is empty. >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>> Just breaking in to say that a file with a EOL in it is not an empty >>>>> file - it is a file with an empty line in it... >>>>> >>>>> >>>>> >>>>> >>>>> >>>> Your correct, I agree completely, but the original code Ed supplied, ' >>>> IF Eof(tfile) ' cannot work , as it checks eof before a read. >>>> When I saw he was using eof() that way, and knowing empty files are not >>>> always empty, I thought I had found his problem, so I just added a bit >>>> of code that should have got around it. >>>> >>>> I am sure you will agree, that, whatever other problems he may have, he >>>> needs not to use eof() the way he is. >>>> >>>> >>>> >>>> >>> Here is the original code. I think it is perfectly right: >>> >>> >>> >>>> PUBLIC SUB Button1_Click() >>>> >>>> DIM tfile AS File >>>> DIM Fname AS String >>>> >>>> Fname = "/home/us/Documents/testdat.txt" >>>> >>>> tfile = OPEN Fname FOR READ >>>> >>>> label1.Text = "" >>>> >>>> IF Eof(tfile) THEN >>>> label1.Text = "EOF" >>>> ELSE >>>> LINE INPUT #tfile, label1.Text >>>> END IF >>>> >>>> CLOSE #tfile >>>> >>>> END >>>> >>>> >>>> >>>> >>>> >>> If eof() is not checked *before* reading, then when? I see only two >>> things I would not do (but it depends a lot). First, why use the "fname" >>> variable, if it is used only once... second, why set label1.text if that >>> .text will be anyway written shortly later? >>> >>> But, apart from these two very little things, that can also have some >>> good reason, the rest of the code is the only possible, I think. Note >>> also that label1.text can get 3 different values: "EOF" is the file is >>> empty; "" if the first line of the file is empty; something else if the >>> first line of the file contains some data. These three cases cover all >>> the cases we talked about (empty and not empty files), and I think our >>> friends know what they are doing. >>> >>> Of course I may be wrong, but that use of eof() seems to me fully ok. >>> >>> Regards, >>> >>> >>> >>> >> ------------------------------------------------------------------------------ >> Download Intel® Parallel Studio Eval >> Try the new software tools for yourself. Speed compiling, find bugs >> proactively, and fine-tune applications for parallel performance. >> See why Intel Parallel Studio got high marks during beta. >> http://p.sf.net/sfu/intel-sw-dev >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> >> > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > From matteo.pasotti at ...626... Mon Apr 19 20:22:53 2010 From: matteo.pasotti at ...626... (Matteo Pasotti) Date: Mon, 19 Apr 2010 20:22:53 +0200 Subject: [Gambas-user] Compiling Gambas3 on Fedora 12 Message-ID: <4BCC9F7D.7000204@...626...> Hi All, I'm trying to compile gambas3 on Fedora 12 x86_64 and I can't understand which package I must install to enable gb.gtk. Currently I've installed gtk+-devel, gtk2-devel and gtk+extra-devel but nothing change. Does anyone has any tips? -- Matteo From prog at ...2177... Tue Apr 20 02:09:56 2010 From: prog at ...2177... (craf) Date: Mon, 19 Apr 2010 20:09:56 -0400 Subject: [Gambas-user] Problem with directory /lib In-Reply-To: <1271690132.2028.7.camel@...2406...> References: <1271690132.2028.7.camel@...2406...> Message-ID: <1271722196.2028.27.camel@...2406...> -----Mensaje original----- De: craf Reply-to: mailing list for gambas users Para: Lista Gambas Ingles Asunto: [Gambas-user] Problem with directory /lib Fecha: Mon, 19 Apr 2010 11:15:32 -0400 >Hi. >I managed to install a console program compiled on Ubuntu 9.04 to Ubuntu >8.04, using shared libraries. >The problem is with a program that uses the GTK or QT library, and they >require the libraries that are in the lib folder, and take into account >that come with the PC and not those that are packaged with the project. >Example. If I provide shared libraries are located in the lib folder, >should be exported with the following: >export LD_LIBRARY_PATH >=/opt/proyect/gambas2/lib_shared/lib:/opt/proyect/gambas2/lib_shared/usr/lib >The path /usr/lib is taken into account, but the path /lib, and take the >PC where you are installing the program. >I also tested: >export LD_LIBRARY_PATH = >$LD_LIBRARY_PATH:/opt/proyect/gambas2/lib_shared/lib:/opt/proyect/gambas2/lib_shared/usr/lib >export LD_LIBRARY_PATH >=/opt/proyect/gambas2/lib_shared/lib:/opt/proyect/gambas2/lib_shared/usr/lib:$LD_LIBRARY_PATH >but nothing... >Is there any way to force you to take the path /lib specified in the >file .sh by one and not the PC? >Regards >------------------------------------------------------------------------------ >Download Intel® Parallel Studio Eval >Try the new software tools for yourself. Speed compiling, find bugs >proactively, and fine-tune applications for parallel performance. >See why Intel Parallel Studio got high marks during beta. >http://p.sf.net/sfu/intel-sw-dev >_______________________________________________ >Gambas-user mailing list >Gambas-user at lists.sourceforge.net >https://lists.sourceforge.net/lists/listinfo/gambas-user Hi. Searching the Internet the reason why the put the path to the folder /lib in the LD_LIBRARY_PATH variable is not taken into account, if you take into account the /lib of the computer where the program is being installed with shared libraries. He added explanation found: ---------------------------------------------------------------------- "It is very possible to have multiple versions of glibc on the same system (we do that every day). However, you need to know that glibc consists of many pieces (200+ shared libraries) which all must match. One of the pieces is ld-linux.so.2, and it must match libc.so.6, or you'll see the errors you are seeing. The absolute path to ld-linux.so.2 is hard-coded into the executable at link time, and can not be easily changed after the link is done.<---THAT IS THE PROBLEM??? To build an executable that will work with the new glibc, do this: g++ main.o -o myapp ... \ -Wl,-rpath=/path/to/newglibc \ -Wl,-dynamic-linker=/path/to/newglibc/ld-linux.so.2 The -rpath linker option will make the runtime loader search for libraries in /path/to/newglibc (so you wouldn't have to set LD_LIBRARY_PATH before running it), and the -dynamic-linker option will "bake" path to correct ld-linux.so.2 into the application." source:http://stackoverflow.com/questions/847179/multiple-glibc-libraries-on-a-single-host/851229#851229 ---------------------------------------------------------------------------------------- In short, if I want to be transported for example ld-linux.so.2 file from a computer with Ubuntu 9.10 to another distribution that does not have the same version. I can only do so if at compile Gambas added routes where I have copied my shared libraries, so that then can be called with the variable LD_LIBRARY_PATH. Now, I saw also that you can use the LD_PRELOAD variable, Can I use?. Regards. From eilert-sprachen at ...221... Tue Apr 20 09:42:37 2010 From: eilert-sprachen at ...221... (Rolf-Werner Eilert) Date: Tue, 20 Apr 2010 09:42:37 +0200 Subject: [Gambas-user] TextBox and CR Message-ID: <4BCD5AED.8010907@...221...> Good morning everyone! In one of my programs there is a TextBox enabling the user to type in a search word. The TextBox seems to ignore a Return at the end, so I chose a "?" at the end of the string to indicate "go and search". It's a bit roundabout, however, isn't there a way to tell TextBox to include a CR in the string when Return is pressed? This is the code now ("Suche" means "Search"): PUBLIC SUB Suche_Change() IF trim(Suche.Text) = "" THEN RETURN IF String.Right(Suche.Text, 1) <> "?" THEN RETURN SucheStarten(Suche.Text) END Any easy way to make this react to a CR? Thanks for your ideas! Rolf From Gambas at ...1950... Tue Apr 20 10:58:26 2010 From: Gambas at ...1950... (Caveat) Date: Tue, 20 Apr 2010 10:58:26 +0200 Subject: [Gambas-user] TextBox and CR In-Reply-To: <4BCD5AED.8010907@...221...> References: <4BCD5AED.8010907@...221...> Message-ID: <1271753906.17146.3.camel@...2413...> Hi Rolf You could try this: PUBLIC SUB TextBox1_KeyPress() DIM lcode AS Variant lcode = Key.Code IF NOT IsNull(lcode) THEN IF lcode = Key.Enter OR lcode = Key.Return THEN Message.Info("Go SEARCH buddy!") END IF END IF END Regards, Caveat On Tue, 2010-04-20 at 09:42 +0200, Rolf-Werner Eilert wrote: > Good morning everyone! > > In one of my programs there is a TextBox enabling the user to type in a > search word. The TextBox seems to ignore a Return at the end, so I chose > a "?" at the end of the string to indicate "go and search". > > It's a bit roundabout, however, isn't there a way to tell TextBox to > include a CR in the string when Return is pressed? > > This is the code now ("Suche" means "Search"): > > PUBLIC SUB Suche_Change() > > > IF trim(Suche.Text) = "" THEN RETURN > > IF String.Right(Suche.Text, 1) <> "?" THEN RETURN > > SucheStarten(Suche.Text) > > END > > Any easy way to make this react to a CR? > > Thanks for your ideas! > > Rolf > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From gambas at ...1... Tue Apr 20 11:09:08 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 20 Apr 2010 11:09:08 +0200 Subject: [Gambas-user] Problem with directory /lib In-Reply-To: <1271722196.2028.27.camel@...2406...> References: <1271690132.2028.7.camel@...2406...> <1271722196.2028.27.camel@...2406...> Message-ID: <201004201109.08824.gambas@...1...> > -----Mensaje original----- > De: craf > Reply-to: mailing list for gambas users > > Para: Lista Gambas Ingles > Asunto: [Gambas-user] Problem with directory /lib > Fecha: Mon, 19 Apr 2010 11:15:32 -0400 > > >Hi. > > > >I managed to install a console program compiled on Ubuntu 9.04 to Ubuntu > >8.04, using shared libraries. > >The problem is with a program that uses the GTK or QT library, and they > >require the libraries that are in the lib folder, and take into account > >that come with the PC and not those that are packaged with the project. > >Example. If I provide shared libraries are located in the lib folder, > >should be exported with the following: > > > >export LD_LIBRARY_PATH > >=/opt/proyect/gambas2/lib_shared/lib:/opt/proyect/gambas2/lib_shared/usr/l > >ib > > > >The path /usr/lib is taken into account, but the path /lib, and take the > >PC where you are installing the program. > > > >I also tested: > > > >export LD_LIBRARY_PATH = > >$LD_LIBRARY_PATH:/opt/proyect/gambas2/lib_shared/lib:/opt/proyect/gambas2/ > >lib_shared/usr/lib > > > >export LD_LIBRARY_PATH > >=/opt/proyect/gambas2/lib_shared/lib:/opt/proyect/gambas2/lib_shared/usr/l > >ib:$LD_LIBRARY_PATH > > > >but nothing... > > > >Is there any way to force you to take the path /lib specified in the > >file .sh by one and not the PC? > > > >Regards > >-------------------------------------------------------------------------- > >---- Download Intel® Parallel Studio Eval > >Try the new software tools for yourself. Speed compiling, find bugs > >proactively, and fine-tune applications for parallel performance. > >See why Intel Parallel Studio got high marks during beta. > >http://p.sf.net/sfu/intel-sw-dev > >_______________________________________________ > >Gambas-user mailing list > >Gambas-user at lists.sourceforge.net > >https://lists.sourceforge.net/lists/listinfo/gambas-user > > Hi. > > Searching the Internet the reason why the put the path to the > folder /lib in the LD_LIBRARY_PATH variable is not taken into account, > if you take into account the /lib of the computer where the program is > being installed with shared libraries. > > He added explanation found: > > ---------------------------------------------------------------------- > "It is very possible to have multiple versions of glibc on the same > system (we do that every day). > > However, you need to know that glibc consists of many pieces (200+ > shared libraries) which all must match. One of the pieces is > ld-linux.so.2, and it must match libc.so.6, or you'll see the errors you > are seeing. > > The absolute path to ld-linux.so.2 is hard-coded into the executable at > link time, and can not be easily changed after the link is done.<---THAT > IS THE PROBLEM??? > > To build an executable that will work with the new glibc, do this: > > g++ main.o -o myapp ... \ > -Wl,-rpath=/path/to/newglibc \ > -Wl,-dynamic-linker=/path/to/newglibc/ld-linux.so.2 > > The -rpath linker option will make the runtime loader search for > libraries in /path/to/newglibc (so you wouldn't have to set > LD_LIBRARY_PATH before running it), and the -dynamic-linker option will > "bake" path to correct ld-linux.so.2 into the application." > > source:http://stackoverflow.com/questions/847179/multiple-glibc-libraries-o > n-a-single-host/851229#851229 > -------------------------------------------------------------------------- > -------------- > > In short, if I want to be transported for example ld-linux.so.2 file > from a computer with Ubuntu 9.10 to another distribution that does not > have the same version. I can only do so if at compile Gambas added > routes where I have copied my shared libraries, so that then can be > called with the variable LD_LIBRARY_PATH. > > Now, I saw also that you can use the LD_PRELOAD variable, Can I use?. > > Regards. > So I suggest that you always use the glibc stuff of the target system (libc.so, ld-linux.so, libffi.so...), and provide the other shared libraries only. Apparently only the ld-linux.so path is hardcoded (at least on my Mandriva), and points at /lib. I think this should be the path used by all distributions, so that should not be the problem. All other shared libraries used by the interpreter are resolved at runtime. $ ldd gbx3 linux-gate.so.1 => (0xffffe000) libm.so.6 => /lib/i686/libm.so.6 (0xb786e000) libintl.so.8 => /lib/libintl.so.8 (0xb7863000) libc.so.6 => /lib/i686/libc.so.6 (0xb7702000) libdl.so.2 => /lib/libdl.so.2 (0xb76fd000) libpthread.so.0 => /lib/i686/libpthread.so.0 (0xb76e2000) libffi.so.5 => /usr/lib/libffi.so.5 (0xb76db000) /lib/ld-linux.so.2 (0xb78b5000) Regards, -- Beno?t Minisini From eilert-sprachen at ...221... Tue Apr 20 11:39:02 2010 From: eilert-sprachen at ...221... (Rolf-Werner Eilert) Date: Tue, 20 Apr 2010 11:39:02 +0200 Subject: [Gambas-user] TextBox and CR In-Reply-To: <1271753906.17146.3.camel@...2413...> References: <4BCD5AED.8010907@...221...> <1271753906.17146.3.camel@...2413...> Message-ID: <4BCD7636.7010305@...221...> Great, thanks! I just wonder why you load Key.Code into a variable before examining it - isn't Key.Code a "variable" itself? (Or is it a function, and you wanted to avoid calling it more than once?) Rolf Am 20.04.2010 10:58, schrieb Caveat: > Hi Rolf > > You could try this: > PUBLIC SUB TextBox1_KeyPress() > > DIM lcode AS Variant > lcode = Key.Code > > > IF NOT IsNull(lcode) THEN > IF lcode = Key.Enter OR lcode = Key.Return THEN > Message.Info("Go SEARCH buddy!") > END IF > END IF > > > END > > Regards, > Caveat > > On Tue, 2010-04-20 at 09:42 +0200, Rolf-Werner Eilert wrote: >> Good morning everyone! >> >> In one of my programs there is a TextBox enabling the user to type in a >> search word. The TextBox seems to ignore a Return at the end, so I chose >> a "?" at the end of the string to indicate "go and search". >> >> It's a bit roundabout, however, isn't there a way to tell TextBox to >> include a CR in the string when Return is pressed? >> >> This is the code now ("Suche" means "Search"): >> >> PUBLIC SUB Suche_Change() >> >> >> IF trim(Suche.Text) = "" THEN RETURN >> >> IF String.Right(Suche.Text, 1)<> "?" THEN RETURN >> >> SucheStarten(Suche.Text) >> >> END >> >> Any easy way to make this react to a CR? >> >> Thanks for your ideas! >> >> Rolf >> >> ------------------------------------------------------------------------------ >> Download Intel® Parallel Studio Eval >> Try the new software tools for yourself. Speed compiling, find bugs >> proactively, and fine-tune applications for parallel performance. >> See why Intel Parallel Studio got high marks during beta. >> http://p.sf.net/sfu/intel-sw-dev >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From Gambas at ...1950... Tue Apr 20 14:44:12 2010 From: Gambas at ...1950... (Caveat) Date: Tue, 20 Apr 2010 14:44:12 +0200 Subject: [Gambas-user] TextBox and CR In-Reply-To: <4BCD7636.7010305@...221...> References: <4BCD5AED.8010907@...221...> <1271753906.17146.3.camel@...2413...> <4BCD7636.7010305@...221...> Message-ID: <1271767452.30993.5.camel@...2413...> Hi Rolf, I guess you're right. I threw the code together very quickly, just to make a working example for you. But 100% correct, you don't need lcode or AS Variant or DIM or lcode = Key.Code... :-) Let's just hope this doesn't turn into another marathon "static const?" thread ;-) Regards, Caveat On Tue, 2010-04-20 at 11:39 +0200, Rolf-Werner Eilert wrote: > Great, thanks! > > I just wonder why you load Key.Code into a variable before examining it > - isn't Key.Code a "variable" itself? (Or is it a function, and you > wanted to avoid calling it more than once?) > > Rolf > > > Am 20.04.2010 10:58, schrieb Caveat: > > Hi Rolf > > > > You could try this: > > PUBLIC SUB TextBox1_KeyPress() > > > > DIM lcode AS Variant > > lcode = Key.Code > > > > > > IF NOT IsNull(lcode) THEN > > IF lcode = Key.Enter OR lcode = Key.Return THEN > > Message.Info("Go SEARCH buddy!") > > END IF > > END IF > > > > > > END > > > > Regards, > > Caveat > > > > On Tue, 2010-04-20 at 09:42 +0200, Rolf-Werner Eilert wrote: > >> Good morning everyone! > >> > >> In one of my programs there is a TextBox enabling the user to type in a > >> search word. The TextBox seems to ignore a Return at the end, so I chose > >> a "?" at the end of the string to indicate "go and search". > >> > >> It's a bit roundabout, however, isn't there a way to tell TextBox to > >> include a CR in the string when Return is pressed? > >> > >> This is the code now ("Suche" means "Search"): > >> > >> PUBLIC SUB Suche_Change() > >> > >> > >> IF trim(Suche.Text) = "" THEN RETURN > >> > >> IF String.Right(Suche.Text, 1)<> "?" THEN RETURN > >> > >> SucheStarten(Suche.Text) > >> > >> END > >> > >> Any easy way to make this react to a CR? > >> > >> Thanks for your ideas! > >> > >> Rolf > >> > >> ------------------------------------------------------------------------------ > >> Download Intel® Parallel Studio Eval > >> Try the new software tools for yourself. Speed compiling, find bugs > >> proactively, and fine-tune applications for parallel performance. > >> See why Intel Parallel Studio got high marks during beta. > >> http://p.sf.net/sfu/intel-sw-dev > >> _______________________________________________ > >> Gambas-user mailing list > >> Gambas-user at lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > > > ------------------------------------------------------------------------------ > > Download Intel® Parallel Studio Eval > > Try the new software tools for yourself. Speed compiling, find bugs > > proactively, and fine-tune applications for parallel performance. > > See why Intel Parallel Studio got high marks during beta. > > http://p.sf.net/sfu/intel-sw-dev > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From matteo.pasotti at ...626... Tue Apr 20 16:27:30 2010 From: matteo.pasotti at ...626... (Matteo Pasotti) Date: Tue, 20 Apr 2010 16:27:30 +0200 Subject: [Gambas-user] Compiling Gambas3 on Fedora 12 In-Reply-To: <4BCC9F7D.7000204@...626...> References: <4BCC9F7D.7000204@...626...> Message-ID: <4BCDB9D2.5060006@...626...> Il 19/04/2010 20:22, Matteo Pasotti ha scritto: > Hi All, > I'm trying to compile gambas3 on Fedora 12 x86_64 and I can't > understand which package I must install to enable gb.gtk. > Currently I've installed gtk+-devel, gtk2-devel and gtk+extra-devel > but nothing change. > Does anyone has any tips? > -- > Matteo I'm still trying without success. The currently installed packages (gtk related) on my system are the following: ################# GConf2-gtk.x86_64 2.28.0-4.fc12.2 @updates PackageKit-gtk-module.x86_64 0.5.7-2.fc12 @updates authconfig-gtk.x86_64 6.0.0-2.fc12 @updates clutter-gtk.x86_64 0.10.2-1.fc12 @fedora-local gambas2-gb-gtk.x86_64 2.19.0-2.fc12 @updates gambas2-gb-gtk-ext.x86_64 2.19.0-2.fc12 @updates gambas2-gb-gtk-svg.x86_64 2.19.0-2.fc12 @updates gnome-python2-gtkhtml2.x86_64 2.25.3-17.fc12 @updates gtk+.x86_64 1:1.2.10-69.fc12 @fedora gtk+-devel.x86_64 1:1.2.10-69.fc12 @fedora gtk+extra.x86_64 2.1.1-13.fc12 @updates gtk+extra-devel.x86_64 2.1.1-13.fc12 @updates gtk-doc.noarch 1.11-5.fc12 @fedora gtk-sharp2.x86_64 2.12.9-1.fc12 @anaconda-InstallationRepo-200911081904.x86_64 gtk-vnc.x86_64 0.3.10-2.fc12 @updates gtk2.x86_64 2.18.9-3.fc12 @updates gtk2-debuginfo.x86_64 2.18.9-3.fc12 @updates-debuginfo gtk2-devel.x86_64 2.18.9-3.fc12 @updates gtk2-engines.x86_64 2.18.4-4.fc12 @fedora gtk2-immodule-xim.x86_64 2.18.9-3.fc12 @updates gtkglext-devel.x86_64 1.2.0-10.fc12 @fedora gtkglext-libs.x86_64 1.2.0-10.fc12 @fedora gtkhtml2.x86_64 2.11.1-6.fc12 @anaconda-InstallationRepo-200911081904.x86_64 gtkhtml2-devel.x86_64 2.11.1-6.fc12 @fedora gtkhtml3.x86_64 3.28.3-1.fc12 @updates gtkimageview.x86_64 1.6.3-2.fc12 @fedora gtkmm24.x86_64 2.18.2-1.fc12 @updates gtkmm24-devel.x86_64 2.18.2-1.fc12 @updates gtksourceview.x86_64 1:1.8.5-7.fc12 @fedora gtksourceview-devel.x86_64 1:1.8.5-7.fc12 @fedora gtksourceview2.x86_64 2.8.2-1.fc12 @updates gtkspell.x86_64 2.0.16-1.fc12 @updates libcanberra-gtk2.x86_64 0.22-1.fc12 @fedora libchamplain-gtk.x86_64 0.4.3-1.fc12 @updates libgtkhotkey.x86_64 0.2.1-3.fc12 @fedora libgtkhotkey-devel.x86_64 0.2.1-3.fc12 @fedora libgtksourceviewmm.x86_64 1:0.3.1-5.fc12 @fedora libgtksourceviewmm-devel.x86_64 1:0.3.1-5.fc12 @fedora libunicapgtk.x86_64 0.9.8-1.fc12 @updates pinentry-gtk.x86_64 0.7.6-4.fc12 @fedora-local pygtk2.x86_64 2.16.0-1.fc12 @anaconda-InstallationRepo-200911081904.x86_64 pygtk2-libglade.x86_64 2.16.0-1.fc12 @anaconda-InstallationRepo-200911081904.x86_64 pygtksourceview.x86_64 2.8.0-1.fc12 @fedora-local python-slip-gtk.noarch 0.2.8-1.fc12 @updates pywebkitgtk.x86_64 1.1.6-2.fc12 @fedora report-gtk.x86_64 0.10-5.fc12 @updates usermode-gtk.x86_64 1.104-1.fc12 @updates webkitgtk.x86_64 1.1.15.4-1.fc12 @updates glib.x86_64 1:1.2.10-33.fc12 @fedora glib-devel.x86_64 1:1.2.10-33.fc12 @fedora glib2.x86_64 2.22.5-1.fc12 @updates glib2-debuginfo.x86_64 2.22.5-1.fc12 @updates-debuginfo glib2-devel.x86_64 2.22.5-1.fc12 @updates glibc.x86_64 2.11.1-4 @updates glibc-common.x86_64 2.11.1-4 @updates glibc-debuginfo.x86_64 2.11.1-4 @updates-debuginfo glibc-devel.x86_64 2.11.1-4 @updates glibc-headers.x86_64 2.11.1-4 @updates glibmm24.x86_64 2.22.1-1.fc12 @fedora-local glibmm24-devel.x86_64 2.22.1-1.fc12 @fedora ################# The ./configure output, if it can be useful: ################# checking for GTK+ toolkit component with pkg-config... no configure: WARNING: *** GTK+ toolkit is disabled no configure: WARNING: *** GTKglext toolkit is disabled ################# Maybe the problem could be in the path of the gtk libs on fedora (maybe not standard) because with the firebird component I had a similar problem and I solved symlinking to a default path, but I'm not so skilled so I could be wrong :P I'm still hoping in some tips. Regards -- Matteo From gambas at ...1... Tue Apr 20 16:35:39 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 20 Apr 2010 16:35:39 +0200 Subject: [Gambas-user] Compiling Gambas3 on Fedora 12 In-Reply-To: <4BCDB9D2.5060006@...626...> References: <4BCC9F7D.7000204@...626...> <4BCDB9D2.5060006@...626...> Message-ID: <201004201635.39942.gambas@...1...> > Il 19/04/2010 20:22, Matteo Pasotti ha scritto: > > Hi All, > > I'm trying to compile gambas3 on Fedora 12 x86_64 and I can't > > understand which package I must install to enable gb.gtk. > > Currently I've installed gtk+-devel, gtk2-devel and gtk+extra-devel > > but nothing change. > > Does anyone has any tips? > > I'm still trying without success. > The currently installed packages (gtk related) on my system are the > following: > > ################# > GConf2-gtk.x86_64 2.28.0-4.fc12.2 @updates > PackageKit-gtk-module.x86_64 0.5.7-2.fc12 @updates > authconfig-gtk.x86_64 6.0.0-2.fc12 @updates > clutter-gtk.x86_64 0.10.2-1.fc12 > @fedora-local > gambas2-gb-gtk.x86_64 2.19.0-2.fc12 @updates > gambas2-gb-gtk-ext.x86_64 2.19.0-2.fc12 @updates > gambas2-gb-gtk-svg.x86_64 2.19.0-2.fc12 @updates > gnome-python2-gtkhtml2.x86_64 2.25.3-17.fc12 @updates > gtk+.x86_64 1:1.2.10-69.fc12 @fedora > gtk+-devel.x86_64 1:1.2.10-69.fc12 @fedora > gtk+extra.x86_64 2.1.1-13.fc12 @updates > gtk+extra-devel.x86_64 2.1.1-13.fc12 @updates > gtk-doc.noarch 1.11-5.fc12 @fedora > gtk-sharp2.x86_64 2.12.9-1.fc12 > @anaconda-InstallationRepo-200911081904.x86_64 > gtk-vnc.x86_64 0.3.10-2.fc12 @updates > gtk2.x86_64 2.18.9-3.fc12 @updates > gtk2-debuginfo.x86_64 2.18.9-3.fc12 > @updates-debuginfo > gtk2-devel.x86_64 2.18.9-3.fc12 @updates > gtk2-engines.x86_64 2.18.4-4.fc12 @fedora > gtk2-immodule-xim.x86_64 2.18.9-3.fc12 @updates > gtkglext-devel.x86_64 1.2.0-10.fc12 @fedora > gtkglext-libs.x86_64 1.2.0-10.fc12 @fedora > gtkhtml2.x86_64 2.11.1-6.fc12 > @anaconda-InstallationRepo-200911081904.x86_64 > gtkhtml2-devel.x86_64 2.11.1-6.fc12 @fedora > gtkhtml3.x86_64 3.28.3-1.fc12 @updates > gtkimageview.x86_64 1.6.3-2.fc12 @fedora > gtkmm24.x86_64 2.18.2-1.fc12 @updates > gtkmm24-devel.x86_64 2.18.2-1.fc12 @updates > gtksourceview.x86_64 1:1.8.5-7.fc12 @fedora > gtksourceview-devel.x86_64 1:1.8.5-7.fc12 @fedora > gtksourceview2.x86_64 2.8.2-1.fc12 @updates > gtkspell.x86_64 2.0.16-1.fc12 @updates > libcanberra-gtk2.x86_64 0.22-1.fc12 @fedora > libchamplain-gtk.x86_64 0.4.3-1.fc12 @updates > libgtkhotkey.x86_64 0.2.1-3.fc12 @fedora > libgtkhotkey-devel.x86_64 0.2.1-3.fc12 @fedora > libgtksourceviewmm.x86_64 1:0.3.1-5.fc12 @fedora > libgtksourceviewmm-devel.x86_64 1:0.3.1-5.fc12 @fedora > libunicapgtk.x86_64 0.9.8-1.fc12 @updates > pinentry-gtk.x86_64 0.7.6-4.fc12 > @fedora-local > pygtk2.x86_64 2.16.0-1.fc12 > @anaconda-InstallationRepo-200911081904.x86_64 > pygtk2-libglade.x86_64 2.16.0-1.fc12 > @anaconda-InstallationRepo-200911081904.x86_64 > pygtksourceview.x86_64 2.8.0-1.fc12 > @fedora-local > python-slip-gtk.noarch 0.2.8-1.fc12 @updates > pywebkitgtk.x86_64 1.1.6-2.fc12 @fedora > report-gtk.x86_64 0.10-5.fc12 @updates > usermode-gtk.x86_64 1.104-1.fc12 @updates > webkitgtk.x86_64 1.1.15.4-1.fc12 @updates > glib.x86_64 1:1.2.10-33.fc12 @fedora > glib-devel.x86_64 1:1.2.10-33.fc12 @fedora > glib2.x86_64 2.22.5-1.fc12 @updates > glib2-debuginfo.x86_64 2.22.5-1.fc12 > @updates-debuginfo > glib2-devel.x86_64 2.22.5-1.fc12 @updates > glibc.x86_64 2.11.1-4 @updates > glibc-common.x86_64 2.11.1-4 @updates > glibc-debuginfo.x86_64 2.11.1-4 > @updates-debuginfo > glibc-devel.x86_64 2.11.1-4 @updates > glibc-headers.x86_64 2.11.1-4 @updates > glibmm24.x86_64 2.22.1-1.fc12 > @fedora-local > glibmm24-devel.x86_64 2.22.1-1.fc12 @fedora > ################# > > The ./configure output, if it can be useful: > > ################# > checking for GTK+ toolkit component with pkg-config... no Did you install pkg-config ? -- Beno?t Minisini From ronstk at ...239... Tue Apr 20 16:45:13 2010 From: ronstk at ...239... (Ron_1st) Date: Tue, 20 Apr 2010 15:45:13 +0100 Subject: [Gambas-user] TextBox and CR In-Reply-To: <1271767452.30993.5.camel@...2413...> References: <4BCD5AED.8010907@...221...> <4BCD7636.7010305@...221...> <1271767452.30993.5.camel@...2413...> Message-ID: <201004201645.13913.ronstk@...239...> On Tuesday 20 April 2010, Caveat wrote: > Hi Rolf, > I guess you're right. ?I threw the code together very quickly, just to > make a working example for you. ?But 100% correct, you don't need lcode > or AS Variant or DIM or lcode = Key.Code... :-) In general I should say the same. But Key.Code is in a way dynamic and a new KeyPress could occur before the related subroutine is finished. So otherwise I say it is not wrong but playing the safe way taht it is and stay the same for sure. Just my two cents :) > > Let's just hope this doesn't turn into another marathon "static const?" > thread ;-) LOL (still it was interesting and I did learn something too) > > Regards, > Caveat > Best regards, Ron_1st -- From gambas at ...1... Tue Apr 20 16:48:47 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 20 Apr 2010 16:48:47 +0200 Subject: [Gambas-user] TextBox and CR In-Reply-To: <201004201645.13913.ronstk@...239...> References: <4BCD5AED.8010907@...221...> <1271767452.30993.5.camel@...2413...> <201004201645.13913.ronstk@...239...> Message-ID: <201004201648.47763.gambas@...1...> > On Tuesday 20 April 2010, Caveat wrote: > > Hi Rolf, > > I guess you're right. I threw the code together very quickly, just to > > make a working example for you. But 100% correct, you don't need lcode > > or AS Variant or DIM or lcode = Key.Code... :-) > > In general I should say the same. But Key.Code is in a way dynamic and a > new KeyPress could occur before the related subroutine is finished. No, unless you explicitely call the event loop (with WAIT). -- Beno?t Minisini From matteo.pasotti at ...626... Tue Apr 20 16:58:44 2010 From: matteo.pasotti at ...626... (Matteo Pasotti) Date: Tue, 20 Apr 2010 16:58:44 +0200 Subject: [Gambas-user] Compiling Gambas3 on Fedora 12 In-Reply-To: <201004201635.39942.gambas@...1...> References: <4BCC9F7D.7000204@...626...> <4BCDB9D2.5060006@...626...> <201004201635.39942.gambas@...1...> Message-ID: <4BCDC124.8040006@...626...> Il 20/04/2010 16:35, Beno?t Minisini ha scritto: >> Il 19/04/2010 20:22, Matteo Pasotti ha scritto: >> >>> Hi All, >>> I'm trying to compile gambas3 on Fedora 12 x86_64 and I can't >>> understand which package I must install to enable gb.gtk. >>> Currently I've installed gtk+-devel, gtk2-devel and gtk+extra-devel >>> but nothing change. >>> Does anyone has any tips? >>> >> I'm still trying without success. >> The currently installed packages (gtk related) on my system are the >> following: >> >> ################# >> GConf2-gtk.x86_64 2.28.0-4.fc12.2 @updates >> PackageKit-gtk-module.x86_64 0.5.7-2.fc12 @updates >> authconfig-gtk.x86_64 6.0.0-2.fc12 @updates >> clutter-gtk.x86_64 0.10.2-1.fc12 >> @fedora-local >> gambas2-gb-gtk.x86_64 2.19.0-2.fc12 @updates >> gambas2-gb-gtk-ext.x86_64 2.19.0-2.fc12 @updates >> gambas2-gb-gtk-svg.x86_64 2.19.0-2.fc12 @updates >> gnome-python2-gtkhtml2.x86_64 2.25.3-17.fc12 @updates >> gtk+.x86_64 1:1.2.10-69.fc12 @fedora >> gtk+-devel.x86_64 1:1.2.10-69.fc12 @fedora >> gtk+extra.x86_64 2.1.1-13.fc12 @updates >> gtk+extra-devel.x86_64 2.1.1-13.fc12 @updates >> gtk-doc.noarch 1.11-5.fc12 @fedora >> gtk-sharp2.x86_64 2.12.9-1.fc12 >> @anaconda-InstallationRepo-200911081904.x86_64 >> gtk-vnc.x86_64 0.3.10-2.fc12 @updates >> gtk2.x86_64 2.18.9-3.fc12 @updates >> gtk2-debuginfo.x86_64 2.18.9-3.fc12 >> @updates-debuginfo >> gtk2-devel.x86_64 2.18.9-3.fc12 @updates >> gtk2-engines.x86_64 2.18.4-4.fc12 @fedora >> gtk2-immodule-xim.x86_64 2.18.9-3.fc12 @updates >> gtkglext-devel.x86_64 1.2.0-10.fc12 @fedora >> gtkglext-libs.x86_64 1.2.0-10.fc12 @fedora >> gtkhtml2.x86_64 2.11.1-6.fc12 >> @anaconda-InstallationRepo-200911081904.x86_64 >> gtkhtml2-devel.x86_64 2.11.1-6.fc12 @fedora >> gtkhtml3.x86_64 3.28.3-1.fc12 @updates >> gtkimageview.x86_64 1.6.3-2.fc12 @fedora >> gtkmm24.x86_64 2.18.2-1.fc12 @updates >> gtkmm24-devel.x86_64 2.18.2-1.fc12 @updates >> gtksourceview.x86_64 1:1.8.5-7.fc12 @fedora >> gtksourceview-devel.x86_64 1:1.8.5-7.fc12 @fedora >> gtksourceview2.x86_64 2.8.2-1.fc12 @updates >> gtkspell.x86_64 2.0.16-1.fc12 @updates >> libcanberra-gtk2.x86_64 0.22-1.fc12 @fedora >> libchamplain-gtk.x86_64 0.4.3-1.fc12 @updates >> libgtkhotkey.x86_64 0.2.1-3.fc12 @fedora >> libgtkhotkey-devel.x86_64 0.2.1-3.fc12 @fedora >> libgtksourceviewmm.x86_64 1:0.3.1-5.fc12 @fedora >> libgtksourceviewmm-devel.x86_64 1:0.3.1-5.fc12 @fedora >> libunicapgtk.x86_64 0.9.8-1.fc12 @updates >> pinentry-gtk.x86_64 0.7.6-4.fc12 >> @fedora-local >> pygtk2.x86_64 2.16.0-1.fc12 >> @anaconda-InstallationRepo-200911081904.x86_64 >> pygtk2-libglade.x86_64 2.16.0-1.fc12 >> @anaconda-InstallationRepo-200911081904.x86_64 >> pygtksourceview.x86_64 2.8.0-1.fc12 >> @fedora-local >> python-slip-gtk.noarch 0.2.8-1.fc12 @updates >> pywebkitgtk.x86_64 1.1.6-2.fc12 @fedora >> report-gtk.x86_64 0.10-5.fc12 @updates >> usermode-gtk.x86_64 1.104-1.fc12 @updates >> webkitgtk.x86_64 1.1.15.4-1.fc12 @updates >> glib.x86_64 1:1.2.10-33.fc12 @fedora >> glib-devel.x86_64 1:1.2.10-33.fc12 @fedora >> glib2.x86_64 2.22.5-1.fc12 @updates >> glib2-debuginfo.x86_64 2.22.5-1.fc12 >> @updates-debuginfo >> glib2-devel.x86_64 2.22.5-1.fc12 @updates >> glibc.x86_64 2.11.1-4 @updates >> glibc-common.x86_64 2.11.1-4 @updates >> glibc-debuginfo.x86_64 2.11.1-4 >> @updates-debuginfo >> glibc-devel.x86_64 2.11.1-4 @updates >> glibc-headers.x86_64 2.11.1-4 @updates >> glibmm24.x86_64 2.22.1-1.fc12 >> @fedora-local >> glibmm24-devel.x86_64 2.22.1-1.fc12 @fedora >> ################# >> >> The ./configure output, if it can be useful: >> >> ################# >> checking for GTK+ toolkit component with pkg-config... no >> > Did you install pkg-config ? > > Yes, I forgot to insert it into the list ################ pkgconfig.x86_64 1:0.23-9.fc12 @anaconda-InstallationRepo-200911081904.x86_64 ################ -- Matteo From eilert-sprachen at ...221... Tue Apr 20 17:08:56 2010 From: eilert-sprachen at ...221... (Rolf-Werner Eilert) Date: Tue, 20 Apr 2010 17:08:56 +0200 Subject: [Gambas-user] TextBox and CR In-Reply-To: <1271767452.30993.5.camel@...2413...> References: <4BCD5AED.8010907@...221...> <1271753906.17146.3.camel@...2413...> <4BCD7636.7010305@...221...> <1271767452.30993.5.camel@...2413...> Message-ID: <4BCDC388.6060609@...221...> No, don't worry :-) So, this is my code now: PUBLIC SUB Suche_KeyPress() DIM t$ AS String IF Key.Code = Key.Return OR Key.Code = Key.Enter THEN t$ = Trim$(Suche.Text) IF t$ <> "" THEN SucheStarten(t$) END IF END IF END I introduced t$ (old BASIC manners, I know :-) ) to avoid calling trim for several times, and I feel it's shorter and reads easier. Then I set Key.Return first as it would be pressed more probably, and this routine is called for each key. Later I realized that this is nonsense as it will check for Key.Enter with every key typed other than Return ;-) anyway... Regards Rolf Am 20.04.2010 14:44, schrieb Caveat: > Hi Rolf, > I guess you're right. I threw the code together very quickly, just to > make a working example for you. But 100% correct, you don't need lcode > or AS Variant or DIM or lcode = Key.Code... :-) > > Let's just hope this doesn't turn into another marathon "static const?" > thread ;-) > > Regards, > Caveat > > On Tue, 2010-04-20 at 11:39 +0200, Rolf-Werner Eilert wrote: >> Great, thanks! >> >> I just wonder why you load Key.Code into a variable before examining it >> - isn't Key.Code a "variable" itself? (Or is it a function, and you >> wanted to avoid calling it more than once?) >> >> Rolf >> >> >> Am 20.04.2010 10:58, schrieb Caveat: >>> Hi Rolf >>> >>> You could try this: >>> PUBLIC SUB TextBox1_KeyPress() >>> >>> DIM lcode AS Variant >>> lcode = Key.Code >>> >>> >>> IF NOT IsNull(lcode) THEN >>> IF lcode = Key.Enter OR lcode = Key.Return THEN >>> Message.Info("Go SEARCH buddy!") >>> END IF >>> END IF >>> >>> >>> END >>> >>> Regards, >>> Caveat >>> >>> On Tue, 2010-04-20 at 09:42 +0200, Rolf-Werner Eilert wrote: >>>> Good morning everyone! >>>> >>>> In one of my programs there is a TextBox enabling the user to type in a >>>> search word. The TextBox seems to ignore a Return at the end, so I chose >>>> a "?" at the end of the string to indicate "go and search". >>>> >>>> It's a bit roundabout, however, isn't there a way to tell TextBox to >>>> include a CR in the string when Return is pressed? >>>> >>>> This is the code now ("Suche" means "Search"): >>>> >>>> PUBLIC SUB Suche_Change() >>>> >>>> >>>> IF trim(Suche.Text) = "" THEN RETURN >>>> >>>> IF String.Right(Suche.Text, 1)<> "?" THEN RETURN >>>> >>>> SucheStarten(Suche.Text) >>>> >>>> END >>>> >>>> Any easy way to make this react to a CR? >>>> >>>> Thanks for your ideas! >>>> >>>> Rolf >>>> >>>> ------------------------------------------------------------------------------ >>>> Download Intel® Parallel Studio Eval >>>> Try the new software tools for yourself. Speed compiling, find bugs >>>> proactively, and fine-tune applications for parallel performance. >>>> See why Intel Parallel Studio got high marks during beta. >>>> http://p.sf.net/sfu/intel-sw-dev >>>> _______________________________________________ >>>> Gambas-user mailing list >>>> Gambas-user at lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Download Intel® Parallel Studio Eval >>> Try the new software tools for yourself. Speed compiling, find bugs >>> proactively, and fine-tune applications for parallel performance. >>> See why Intel Parallel Studio got high marks during beta. >>> http://p.sf.net/sfu/intel-sw-dev >>> _______________________________________________ >>> Gambas-user mailing list >>> Gambas-user at lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>> >> >> >> ------------------------------------------------------------------------------ >> Download Intel® Parallel Studio Eval >> Try the new software tools for yourself. Speed compiling, find bugs >> proactively, and fine-tune applications for parallel performance. >> See why Intel Parallel Studio got high marks during beta. >> http://p.sf.net/sfu/intel-sw-dev >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From doriano.blengino at ...1909... Tue Apr 20 19:30:25 2010 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Tue, 20 Apr 2010 19:30:25 +0200 Subject: [Gambas-user] TextBox and CR In-Reply-To: <4BCDC388.6060609@...221...> References: <4BCD5AED.8010907@...221...> <1271753906.17146.3.camel@...2413...> <4BCD7636.7010305@...221...> <1271767452.30993.5.camel@...2413...> <4BCDC388.6060609@...221...> Message-ID: <4BCDE4B1.10402@...1909...> Rolf-Werner Eilert ha scritto: > No, don't worry :-) > > So, this is my code now: > > PUBLIC SUB Suche_KeyPress() > DIM t$ AS String > > IF Key.Code = Key.Return OR Key.Code = Key.Enter THEN > t$ = Trim$(Suche.Text) > IF t$<> "" THEN > SucheStarten(t$) > END IF > END IF > > END > > I introduced t$ (old BASIC manners, I know :-) ) to avoid calling trim > for several times, and I feel it's shorter and reads easier. Then I set > Key.Return first as it would be pressed more probably, and this routine > is called for each key. > > Later I realized that this is nonsense as it will check for Key.Enter > with every key typed other than Return ;-) anyway... > No... it will check for Key.Enter every key you press, be it Return or not! Just kidding, but it's true... :-) Regards, Doriano From wspinto at ...1405... Tue Apr 20 22:37:58 2010 From: wspinto at ...1405... (Wellington de Souza Pinto) Date: Tue, 20 Apr 2010 17:37:58 -0300 Subject: [Gambas-user] smtp question Message-ID: <1271795878.4bce10a64a045@...1589...> Hi everyone! Any idea when the smtpclient work with password property?? I need send email on my program. Any idea about?? Other method??? Tks --------------------------------------------------------------- |||||/ Wellington de Souza Pinto C o o ] wspinto at ...1405... ^ -x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x- ___________________________________________________________________________________ Para fazer uma liga??o DDD pra perto ou pra longe, faz um 21. A Embratel tem tarifas muito baratas esperando por voc?. Aproveite! From gambas at ...1... Tue Apr 20 22:40:02 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 20 Apr 2010 22:40:02 +0200 Subject: [Gambas-user] User components in Gambas 3 Message-ID: <201004202240.02466.gambas@...1...> Hi, I post this mail on both mailing-lists: please answer on the developer mailing-list if possible, as this is related to the development version! I'm currently thinking about how user components should work in Gambas 3, as I dislike the way it was designed in Gambas 2. In Gambas 2, user components work the same way as normal components made with Gambas, except that they are symbolic located in the home directory that point at the real executables. That design lead to many problems: you can't make packages of user components easily, and if the real executable moves, the symbolic link is broken while the IDE think the component is there. So, for Gambas 3, I propose a different design: - There are no "user" components anymore. - Instead, a project will be able to depend on other projects. - The list of associated projects will be defined in the IDE project option dialog. - That list will be just a list of project *names*. - At design time, these project will be search inside one or more directories that will be defined as a IDE global option. - At run time, the associated projects will be searched by using the $PATH environmental variable, as any other executables. Consequently: - The IDE global option will tell where you store the projects you want to use as components. - These projects will be packaged separately and installed like any other Gambas projects. - They should have a special name, because they are not real executables, but some sort of "Gambas" libraries instead. - So the project executables should be in the $PATH. And so the main project will find them easily. - When creating the main project packages, it will be easy to add a dependency on the associated project packages. I need to find a good term for these "associated" projects. I'd like to find something different than "component". Even if internally the interpreter will use the same code to load them, I want the user to understand easily that they do not work the same way. Maybe "library" would be a good term... What do you think about the new design? -- Beno?t Minisini From gambas at ...1... Tue Apr 20 22:42:47 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 20 Apr 2010 22:42:47 +0200 Subject: [Gambas-user] smtp question In-Reply-To: <1271795878.4bce10a64a045@...1589...> References: <1271795878.4bce10a64a045@...1589...> Message-ID: <201004202242.47848.gambas@...1...> > Hi everyone! > > Any idea when the smtpclient work with password property?? > I need send email on my program. > Any idea about?? Other method??? > > Tks > That was implemented a few days ago in Gambas 3 (revision #2866). Fabien had some problem with it, but I couldn't find why. It works there! -- Beno?t Minisini From gambas at ...1... Tue Apr 20 22:47:04 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 20 Apr 2010 22:47:04 +0200 Subject: [Gambas-user] smtp question In-Reply-To: <201004202242.47848.gambas@...1...> References: <1271795878.4bce10a64a045@...1589...> <201004202242.47848.gambas@...1...> Message-ID: <201004202247.04568.gambas@...1...> > > Hi everyone! > > > > Any idea when the smtpclient work with password property?? > > I need send email on my program. > > Any idea about?? Other method??? > > > > Tks > > That was implemented a few days ago in Gambas 3 (revision #2866). Fabien > had some problem with it, but I couldn't find why. It works there! Not all authentication method were implemented: only PLAIN with TLS or SSL for the crypting. Regards, -- Beno?t Minisini From matteo.pasotti at ...626... Wed Apr 21 01:33:27 2010 From: matteo.pasotti at ...626... (Matteo Pasotti) Date: Wed, 21 Apr 2010 01:33:27 +0200 Subject: [Gambas-user] Compiling Gambas3 on Fedora 12 In-Reply-To: <4BCDC124.8040006@...626...> References: <4BCC9F7D.7000204@...626...> <4BCDB9D2.5060006@...626...> <201004201635.39942.gambas@...1...> <4BCDC124.8040006@...626...> Message-ID: <4BCE39C7.8020808@...626...> Il 20/04/2010 16:58, Matteo Pasotti ha scritto: > Il 20/04/2010 16:35, Beno?t Minisini ha scritto: >>> Il 19/04/2010 20:22, Matteo Pasotti ha scritto: >>>> Hi All, >>>> I'm trying to compile gambas3 on Fedora 12 x86_64 and I can't >>>> understand which package I must install to enable gb.gtk. >>>> Currently I've installed gtk+-devel, gtk2-devel and gtk+extra-devel >>>> but nothing change. >>>> Does anyone has any tips? >>> I'm still trying without success. >>> The currently installed packages (gtk related) on my system are the >>> following: >>> >>> ################# >>> GConf2-gtk.x86_64 2.28.0-4.fc12.2 >>> @updates >>> PackageKit-gtk-module.x86_64 0.5.7-2.fc12 >>> @updates >>> authconfig-gtk.x86_64 6.0.0-2.fc12 >>> @updates >>> clutter-gtk.x86_64 0.10.2-1.fc12 >>> @fedora-local >>> gambas2-gb-gtk.x86_64 2.19.0-2.fc12 >>> @updates >>> gambas2-gb-gtk-ext.x86_64 2.19.0-2.fc12 >>> @updates >>> gambas2-gb-gtk-svg.x86_64 2.19.0-2.fc12 >>> @updates >>> gnome-python2-gtkhtml2.x86_64 2.25.3-17.fc12 >>> @updates >>> gtk+.x86_64 1:1.2.10-69.fc12 >>> @fedora >>> gtk+-devel.x86_64 1:1.2.10-69.fc12 >>> @fedora >>> gtk+extra.x86_64 2.1.1-13.fc12 >>> @updates >>> gtk+extra-devel.x86_64 2.1.1-13.fc12 >>> @updates >>> gtk-doc.noarch 1.11-5.fc12 >>> @fedora >>> gtk-sharp2.x86_64 2.12.9-1.fc12 >>> @anaconda-InstallationRepo-200911081904.x86_64 >>> gtk-vnc.x86_64 0.3.10-2.fc12 >>> @updates >>> gtk2.x86_64 2.18.9-3.fc12 >>> @updates >>> gtk2-debuginfo.x86_64 2.18.9-3.fc12 >>> @updates-debuginfo >>> gtk2-devel.x86_64 2.18.9-3.fc12 >>> @updates >>> gtk2-engines.x86_64 2.18.4-4.fc12 >>> @fedora >>> gtk2-immodule-xim.x86_64 2.18.9-3.fc12 >>> @updates >>> gtkglext-devel.x86_64 1.2.0-10.fc12 >>> @fedora >>> gtkglext-libs.x86_64 1.2.0-10.fc12 >>> @fedora >>> gtkhtml2.x86_64 2.11.1-6.fc12 >>> @anaconda-InstallationRepo-200911081904.x86_64 >>> gtkhtml2-devel.x86_64 2.11.1-6.fc12 >>> @fedora >>> gtkhtml3.x86_64 3.28.3-1.fc12 >>> @updates >>> gtkimageview.x86_64 1.6.3-2.fc12 >>> @fedora >>> gtkmm24.x86_64 2.18.2-1.fc12 >>> @updates >>> gtkmm24-devel.x86_64 2.18.2-1.fc12 >>> @updates >>> gtksourceview.x86_64 1:1.8.5-7.fc12 >>> @fedora >>> gtksourceview-devel.x86_64 1:1.8.5-7.fc12 >>> @fedora >>> gtksourceview2.x86_64 2.8.2-1.fc12 >>> @updates >>> gtkspell.x86_64 2.0.16-1.fc12 >>> @updates >>> libcanberra-gtk2.x86_64 0.22-1.fc12 >>> @fedora >>> libchamplain-gtk.x86_64 0.4.3-1.fc12 >>> @updates >>> libgtkhotkey.x86_64 0.2.1-3.fc12 >>> @fedora >>> libgtkhotkey-devel.x86_64 0.2.1-3.fc12 >>> @fedora >>> libgtksourceviewmm.x86_64 1:0.3.1-5.fc12 >>> @fedora >>> libgtksourceviewmm-devel.x86_64 1:0.3.1-5.fc12 >>> @fedora >>> libunicapgtk.x86_64 0.9.8-1.fc12 >>> @updates >>> pinentry-gtk.x86_64 0.7.6-4.fc12 >>> @fedora-local >>> pygtk2.x86_64 2.16.0-1.fc12 >>> @anaconda-InstallationRepo-200911081904.x86_64 >>> pygtk2-libglade.x86_64 2.16.0-1.fc12 >>> @anaconda-InstallationRepo-200911081904.x86_64 >>> pygtksourceview.x86_64 2.8.0-1.fc12 >>> @fedora-local >>> python-slip-gtk.noarch 0.2.8-1.fc12 >>> @updates >>> pywebkitgtk.x86_64 1.1.6-2.fc12 >>> @fedora >>> report-gtk.x86_64 0.10-5.fc12 >>> @updates >>> usermode-gtk.x86_64 1.104-1.fc12 >>> @updates >>> webkitgtk.x86_64 1.1.15.4-1.fc12 >>> @updates >>> glib.x86_64 1:1.2.10-33.fc12 >>> @fedora >>> glib-devel.x86_64 1:1.2.10-33.fc12 >>> @fedora >>> glib2.x86_64 2.22.5-1.fc12 >>> @updates >>> glib2-debuginfo.x86_64 2.22.5-1.fc12 >>> @updates-debuginfo >>> glib2-devel.x86_64 2.22.5-1.fc12 >>> @updates >>> glibc.x86_64 2.11.1-4 >>> @updates >>> glibc-common.x86_64 2.11.1-4 >>> @updates >>> glibc-debuginfo.x86_64 2.11.1-4 >>> @updates-debuginfo >>> glibc-devel.x86_64 2.11.1-4 >>> @updates >>> glibc-headers.x86_64 2.11.1-4 >>> @updates >>> glibmm24.x86_64 2.22.1-1.fc12 >>> @fedora-local >>> glibmm24-devel.x86_64 2.22.1-1.fc12 >>> @fedora >>> ################# >>> >>> The ./configure output, if it can be useful: >>> >>> ################# >>> checking for GTK+ toolkit component with pkg-config... no >> Did you install pkg-config ? >> > Yes, I forgot to insert it into the list > ################ > pkgconfig.x86_64 1:0.23-9.fc12 > @anaconda-InstallationRepo-200911081904.x86_64 > ################ > Now I've enabled all components except gb.gtk. The ./configure output follows: ************************************************************ THESE COMPONENTS ARE DISABLED: - gb.gtk ************************************************************ I can't understand which package is missing, I've installed almost everything. -- Matteo From gambas at ...1... Wed Apr 21 01:38:27 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 21 Apr 2010 01:38:27 +0200 Subject: [Gambas-user] Compiling Gambas3 on Fedora 12 In-Reply-To: <4BCE39C7.8020808@...626...> References: <4BCC9F7D.7000204@...626...> <4BCDC124.8040006@...626...> <4BCE39C7.8020808@...626...> Message-ID: <201004210138.27530.gambas@...1...> > Il 20/04/2010 16:58, Matteo Pasotti ha scritto: > > Il 20/04/2010 16:35, Beno?t Minisini ha scritto: > >>> Il 19/04/2010 20:22, Matteo Pasotti ha scritto: > >>>> Hi All, > >>>> I'm trying to compile gambas3 on Fedora 12 x86_64 and I can't > >>>> understand which package I must install to enable gb.gtk. > >>>> Currently I've installed gtk+-devel, gtk2-devel and gtk+extra-devel > >>>> but nothing change. > >>>> Does anyone has any tips? > >>> > >>> I'm still trying without success. > >>> The currently installed packages (gtk related) on my system are the > >>> following: > >>> > >>> ################# > >>> GConf2-gtk.x86_64 2.28.0-4.fc12.2 > >>> @updates > >>> PackageKit-gtk-module.x86_64 0.5.7-2.fc12 > >>> @updates > >>> authconfig-gtk.x86_64 6.0.0-2.fc12 > >>> @updates > >>> clutter-gtk.x86_64 0.10.2-1.fc12 > >>> @fedora-local > >>> gambas2-gb-gtk.x86_64 2.19.0-2.fc12 > >>> @updates > >>> gambas2-gb-gtk-ext.x86_64 2.19.0-2.fc12 > >>> @updates > >>> gambas2-gb-gtk-svg.x86_64 2.19.0-2.fc12 > >>> @updates > >>> gnome-python2-gtkhtml2.x86_64 2.25.3-17.fc12 > >>> @updates > >>> gtk+.x86_64 1:1.2.10-69.fc12 > >>> @fedora > >>> gtk+-devel.x86_64 1:1.2.10-69.fc12 > >>> @fedora > >>> gtk+extra.x86_64 2.1.1-13.fc12 > >>> @updates > >>> gtk+extra-devel.x86_64 2.1.1-13.fc12 > >>> @updates > >>> gtk-doc.noarch 1.11-5.fc12 > >>> @fedora > >>> gtk-sharp2.x86_64 2.12.9-1.fc12 > >>> @anaconda-InstallationRepo-200911081904.x86_64 > >>> gtk-vnc.x86_64 0.3.10-2.fc12 > >>> @updates > >>> gtk2.x86_64 2.18.9-3.fc12 > >>> @updates > >>> gtk2-debuginfo.x86_64 2.18.9-3.fc12 > >>> @updates-debuginfo > >>> gtk2-devel.x86_64 2.18.9-3.fc12 > >>> @updates > >>> gtk2-engines.x86_64 2.18.4-4.fc12 > >>> @fedora > >>> gtk2-immodule-xim.x86_64 2.18.9-3.fc12 > >>> @updates > >>> gtkglext-devel.x86_64 1.2.0-10.fc12 > >>> @fedora > >>> gtkglext-libs.x86_64 1.2.0-10.fc12 > >>> @fedora > >>> gtkhtml2.x86_64 2.11.1-6.fc12 > >>> @anaconda-InstallationRepo-200911081904.x86_64 > >>> gtkhtml2-devel.x86_64 2.11.1-6.fc12 > >>> @fedora > >>> gtkhtml3.x86_64 3.28.3-1.fc12 > >>> @updates > >>> gtkimageview.x86_64 1.6.3-2.fc12 > >>> @fedora > >>> gtkmm24.x86_64 2.18.2-1.fc12 > >>> @updates > >>> gtkmm24-devel.x86_64 2.18.2-1.fc12 > >>> @updates > >>> gtksourceview.x86_64 1:1.8.5-7.fc12 > >>> @fedora > >>> gtksourceview-devel.x86_64 1:1.8.5-7.fc12 > >>> @fedora > >>> gtksourceview2.x86_64 2.8.2-1.fc12 > >>> @updates > >>> gtkspell.x86_64 2.0.16-1.fc12 > >>> @updates > >>> libcanberra-gtk2.x86_64 0.22-1.fc12 > >>> @fedora > >>> libchamplain-gtk.x86_64 0.4.3-1.fc12 > >>> @updates > >>> libgtkhotkey.x86_64 0.2.1-3.fc12 > >>> @fedora > >>> libgtkhotkey-devel.x86_64 0.2.1-3.fc12 > >>> @fedora > >>> libgtksourceviewmm.x86_64 1:0.3.1-5.fc12 > >>> @fedora > >>> libgtksourceviewmm-devel.x86_64 1:0.3.1-5.fc12 > >>> @fedora > >>> libunicapgtk.x86_64 0.9.8-1.fc12 > >>> @updates > >>> pinentry-gtk.x86_64 0.7.6-4.fc12 > >>> @fedora-local > >>> pygtk2.x86_64 2.16.0-1.fc12 > >>> @anaconda-InstallationRepo-200911081904.x86_64 > >>> pygtk2-libglade.x86_64 2.16.0-1.fc12 > >>> @anaconda-InstallationRepo-200911081904.x86_64 > >>> pygtksourceview.x86_64 2.8.0-1.fc12 > >>> @fedora-local > >>> python-slip-gtk.noarch 0.2.8-1.fc12 > >>> @updates > >>> pywebkitgtk.x86_64 1.1.6-2.fc12 > >>> @fedora > >>> report-gtk.x86_64 0.10-5.fc12 > >>> @updates > >>> usermode-gtk.x86_64 1.104-1.fc12 > >>> @updates > >>> webkitgtk.x86_64 1.1.15.4-1.fc12 > >>> @updates > >>> glib.x86_64 1:1.2.10-33.fc12 > >>> @fedora > >>> glib-devel.x86_64 1:1.2.10-33.fc12 > >>> @fedora > >>> glib2.x86_64 2.22.5-1.fc12 > >>> @updates > >>> glib2-debuginfo.x86_64 2.22.5-1.fc12 > >>> @updates-debuginfo > >>> glib2-devel.x86_64 2.22.5-1.fc12 > >>> @updates > >>> glibc.x86_64 2.11.1-4 > >>> @updates > >>> glibc-common.x86_64 2.11.1-4 > >>> @updates > >>> glibc-debuginfo.x86_64 2.11.1-4 > >>> @updates-debuginfo > >>> glibc-devel.x86_64 2.11.1-4 > >>> @updates > >>> glibc-headers.x86_64 2.11.1-4 > >>> @updates > >>> glibmm24.x86_64 2.22.1-1.fc12 > >>> @fedora-local > >>> glibmm24-devel.x86_64 2.22.1-1.fc12 > >>> @fedora > >>> ################# > >>> > >>> The ./configure output, if it can be useful: > >>> > >>> ################# > >>> checking for GTK+ toolkit component with pkg-config... no > >> > >> Did you install pkg-config ? > > > > Yes, I forgot to insert it into the list > > ################ > > pkgconfig.x86_64 1:0.23-9.fc12 > > @anaconda-InstallationRepo-200911081904.x86_64 > > ################ > > Now I've enabled all components except gb.gtk. > The ./configure output follows: > > ************************************************************ > THESE COMPONENTS ARE DISABLED: > - gb.gtk > ************************************************************ > > I can't understand which package is missing, I've installed almost > everything. If pkg-config does not give the GTK+ paths, then something need to be install, but I can't tell you what as I don't know Fedora at all. Maybe a Fedora user can help you? -- Beno?t Minisini From matteo.pasotti at ...626... Wed Apr 21 01:58:02 2010 From: matteo.pasotti at ...626... (Matteo Pasotti) Date: Wed, 21 Apr 2010 01:58:02 +0200 Subject: [Gambas-user] Compiling Gambas3 on Fedora 12 In-Reply-To: <201004210138.27530.gambas@...1...> References: <4BCC9F7D.7000204@...626...> <4BCDC124.8040006@...626...> <4BCE39C7.8020808@...626...> <201004210138.27530.gambas@...1...> Message-ID: <4BCE3F8A.8020303@...626...> Il 21/04/2010 01:38, Beno?t Minisini ha scritto: > If pkg-config does not give the GTK+ paths, then something need to be install, > but I can't tell you what as I don't know Fedora at all. Maybe a Fedora user > can help you? > > Thanks Beno?t, finally I've discovered the package missing: gettext-devel. When I've two minutes I'll try to write down a list of the packages for fedora, considering that there's no docs about it and fedora has strange packaging conventions. Regards -- Matteo From gambas at ...1... Wed Apr 21 02:08:25 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 21 Apr 2010 02:08:25 +0200 Subject: [Gambas-user] Compiling Gambas3 on Fedora 12 In-Reply-To: <4BCE3F8A.8020303@...626...> References: <4BCC9F7D.7000204@...626...> <201004210138.27530.gambas@...1...> <4BCE3F8A.8020303@...626...> Message-ID: <201004210208.25909.gambas@...1...> > Il 21/04/2010 01:38, Beno?t Minisini ha scritto: > > If pkg-config does not give the GTK+ paths, then something need to be > > install, but I can't tell you what as I don't know Fedora at all. Maybe > > a Fedora user can help you? > > Thanks Beno?t, finally I've discovered the package missing: gettext-devel. > > When I've two minutes I'll try to write down a list of the packages for > fedora, considering that there's no docs about it and fedora has strange > packaging conventions. > > Regards Indeed: gettext-devel and pkg-config for gtk+ should not have any relation at all! -- Beno?t Minisini From matteo.pasotti at ...626... Wed Apr 21 02:51:17 2010 From: matteo.pasotti at ...626... (Matteo Pasotti) Date: Wed, 21 Apr 2010 02:51:17 +0200 Subject: [Gambas-user] Compiling Gambas3 on Fedora 12 In-Reply-To: <201004210208.25909.gambas@...1...> References: <4BCC9F7D.7000204@...626...> <201004210138.27530.gambas@...1...> <4BCE3F8A.8020303@...626...> <201004210208.25909.gambas@...1...> Message-ID: <4BCE4C05.3070202@...626...> Il 21/04/2010 02:08, Beno?t Minisini ha scritto: >> Il 21/04/2010 01:38, Beno?t Minisini ha scritto: >> >>> If pkg-config does not give the GTK+ paths, then something need to be >>> install, but I can't tell you what as I don't know Fedora at all. Maybe >>> a Fedora user can help you? >>> >> Thanks Beno?t, finally I've discovered the package missing: gettext-devel. >> >> When I've two minutes I'll try to write down a list of the packages for >> fedora, considering that there's no docs about it and fedora has strange >> packaging conventions. >> >> Regards >> > Indeed: gettext-devel and pkg-config for gtk+ should not have any relation at > all! > > I still don't know in the details the relations between the fedora packages and the gb components, I was reading [1] and [2] and my last command was yum install librsvg2-devel gettext-devel Reading the documentation on the site [1], I've concluded that gtk doesn't depends from librsvg2 and viceversa, maybe incorrectly? It's for this reason that I wrote only gettext-devel in the previous mail. Before the last command specified above, ./configure doesn't enable gb.gtk. After that it does. Beno?t, I'm sorry, I rarely compile from sources. If You need more details let me know. [1] http://gambasdoc.org/help/install?view&en [2] http://gambasdoc.org/help/install/mandriva?view -- Matteo From gambas at ...1... Wed Apr 21 03:12:12 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 21 Apr 2010 03:12:12 +0200 Subject: [Gambas-user] Compiling Gambas3 on Fedora 12 In-Reply-To: <4BCE4C05.3070202@...626...> References: <4BCC9F7D.7000204@...626...> <201004210208.25909.gambas@...1...> <4BCE4C05.3070202@...626...> Message-ID: <201004210312.12941.gambas@...1...> > Il 21/04/2010 02:08, Beno?t Minisini ha scritto: > >> Il 21/04/2010 01:38, Beno?t Minisini ha scritto: > >>> If pkg-config does not give the GTK+ paths, then something need to be > >>> install, but I can't tell you what as I don't know Fedora at all. Maybe > >>> a Fedora user can help you? > >> > >> Thanks Beno?t, finally I've discovered the package missing: > >> gettext-devel. > >> > >> When I've two minutes I'll try to write down a list of the packages for > >> fedora, considering that there's no docs about it and fedora has strange > >> packaging conventions. > >> > >> Regards > > > > Indeed: gettext-devel and pkg-config for gtk+ should not have any > > relation at all! > > I still don't know in the details the relations between the fedora > packages and the gb components, I was reading [1] and [2] and my last > command was > > yum install librsvg2-devel gettext-devel > > Reading the documentation on the site [1], I've concluded that gtk > doesn't depends from librsvg2 and viceversa, maybe incorrectly? > It's for this reason that I wrote only gettext-devel in the previous mail. > > Before the last command specified above, ./configure doesn't enable > gb.gtk. After that it does. > > Beno?t, I'm sorry, I rarely compile from sources. If You need more > details let me know. > > [1] http://gambasdoc.org/help/install?view&en > [2] http://gambasdoc.org/help/install/mandriva?view Ha, I see now: librsvg2 is now a dependency of the GTK+ command, with cairo. gb.gtk now has native support for SVG files! The wiki is not up to date. If you want to create a "Fedora" page at http://gambasdoc.org/help/install, do not hesitate! Regards, -- Beno?t Minisini From zelimir_ikovic at ...43... Wed Apr 21 06:51:36 2010 From: zelimir_ikovic at ...43... (Zelimir Ikovic) Date: Tue, 20 Apr 2010 21:51:36 -0700 (PDT) Subject: [Gambas-user] Compiling Gambas3 on Fedora 12 In-Reply-To: <201004210312.12941.gambas@...1...> Message-ID: <890068.58668.qm@...2420...> Is it possible to make LiveCD Linux+Gambas for windows programmers to try, play with it and decide? Regards --- On Tue, 4/20/10, Beno?t Minisini wrote: > From: Beno?t Minisini > Subject: Re: [Gambas-user] Compiling Gambas3 on Fedora 12 > To: "mailing list for gambas users" > Received: Tuesday, April 20, 2010, 6:12 PM > > Il 21/04/2010 02:08, Beno?t > Minisini ha scritto: > > >> Il 21/04/2010 01:38, Beno?t Minisini ha > scritto: > > >>> If pkg-config does not give the GTK+ > paths, then something need to be > > >>> install, but I can't tell you what as I > don't know Fedora at all. Maybe > > >>> a Fedora user can help you? > > >> > > >> Thanks Beno?t, finally I've discovered the > package missing: > > >> gettext-devel. > > >> > > >> When I've two minutes I'll try to write down > a list of the packages for > > >> fedora, considering that there's no docs > about it and fedora has strange > > >> packaging conventions. > > >> > > >> Regards > > > > > > Indeed: gettext-devel and pkg-config for gtk+ > should not have any > > > relation at all! > > > > I still don't know in the details the relations > between the fedora > > packages and the gb components, I was reading [1] and > [2] and my last > > command was > > > > yum install librsvg2-devel gettext-devel > > > > Reading the documentation on the site [1], I've > concluded that gtk > > doesn't depends from librsvg2 and viceversa, maybe > incorrectly? > > It's for this reason that I wrote only gettext-devel > in the previous mail. > > > > Before the last command specified above, ./configure > doesn't enable > > gb.gtk. After that it does. > > > > Beno?t, I'm sorry, I rarely compile from sources. If > You need more > > details let me know. > > > > [1] http://gambasdoc.org/help/install?view&en > > [2] http://gambasdoc.org/help/install/mandriva?view > > Ha, I see now: librsvg2 is now a dependency of the GTK+ > command, with cairo. > gb.gtk now has native support for SVG files! The wiki is > not up to date. > > If you want to create a "Fedora" page at http://gambasdoc.org/help/install, do > not hesitate! > > Regards, > > -- > Beno?t Minisini > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From ron at ...1740... Wed Apr 21 08:15:01 2010 From: ron at ...1740... (Ron) Date: Wed, 21 Apr 2010 08:15:01 +0200 Subject: [Gambas-user] Compiling Gambas3 on Fedora 12 In-Reply-To: <890068.58668.qm@...2420...> References: <890068.58668.qm@...2420...> Message-ID: <4BCE97E5.4050306@...1740...> I have build one for stable version Gambas2, not Gambas3, you can download it here: http://code.google.com/p/domotiga-livecd I have created it for people who want to try out DomotiGa (my Gambas home automation project) But it includes Ubuntu 9.10 32 bits Desktop and a complete Gambas 2.18.0, so you can use it for testing Gambas too. I'm working on building a new one based on Ubuntu Lucid Lynx and the latest stable version of Gambas. But it takes a while before I have time to finish and Lucid Lynx is released. Because it's a live cd (dvd) all you do, doesn't survive a reboot, unless you save your projects on a USB key. It doesn't change anything on your computer unless you choose to install it via the desktop icon. Look here for password and other information: http://www.domotiga.nl/wiki/Domotiga/Downloads Regards, Ron. > Is it possible to make LiveCD Linux+Gambas for windows programmers to try, > play with it and decide? > Regards > > --- On Tue, 4/20/10, Beno?t Minisini wrote: > > >> From: Beno?t Minisini >> Subject: Re: [Gambas-user] Compiling Gambas3 on Fedora 12 >> To: "mailing list for gambas users" >> Received: Tuesday, April 20, 2010, 6:12 PM >> >>> Il 21/04/2010 02:08, Beno?t >>> >> Minisini ha scritto: >> >>>>> Il 21/04/2010 01:38, Beno?t Minisini ha >>>>> >> scritto: >> >>>>>> If pkg-config does not give the GTK+ >>>>>> >> paths, then something need to be >> >>>>>> install, but I can't tell you what as I >>>>>> >> don't know Fedora at all. Maybe >> >>>>>> a Fedora user can help you? >>>>>> >>>>> Thanks Beno?t, finally I've discovered the >>>>> >> package missing: >> >>>>> gettext-devel. >>>>> >>>>> When I've two minutes I'll try to write down >>>>> >> a list of the packages for >> >>>>> fedora, considering that there's no docs >>>>> >> about it and fedora has strange >> >>>>> packaging conventions. >>>>> >>>>> Regards >>>>> >>>> Indeed: gettext-devel and pkg-config for gtk+ >>>> >> should not have any >> >>>> relation at all! >>>> >>> I still don't know in the details the relations >>> >> between the fedora >> >>> packages and the gb components, I was reading [1] and >>> >> [2] and my last >> >>> command was >>> >>> yum install librsvg2-devel gettext-devel >>> >>> Reading the documentation on the site [1], I've >>> >> concluded that gtk >> >>> doesn't depends from librsvg2 and viceversa, maybe >>> >> incorrectly? >> >>> It's for this reason that I wrote only gettext-devel >>> >> in the previous mail. >> >>> Before the last command specified above, ./configure >>> >> doesn't enable >> >>> gb.gtk. After that it does. >>> >>> Beno?t, I'm sorry, I rarely compile from sources. If >>> >> You need more >> >>> details let me know. >>> >>> [1] http://gambasdoc.org/help/install?view&en >>> [2] http://gambasdoc.org/help/install/mandriva?view >>> >> Ha, I see now: librsvg2 is now a dependency of the GTK+ >> command, with cairo. >> gb.gtk now has native support for SVG files! The wiki is >> not up to date. >> >> If you want to create a "Fedora" page at http://gambasdoc.org/help/install, do >> not hesitate! >> >> Regards, >> >> -- >> Beno?t Minisini >> >> ------------------------------------------------------------------------------ >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> >> > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From eilert-sprachen at ...221... Wed Apr 21 08:44:02 2010 From: eilert-sprachen at ...221... (Rolf-Werner Eilert) Date: Wed, 21 Apr 2010 08:44:02 +0200 Subject: [Gambas-user] TextBox and CR In-Reply-To: <4BCDE4B1.10402@...1909...> References: <4BCD5AED.8010907@...221...> <1271753906.17146.3.camel@...2413...> <4BCD7636.7010305@...221...> <1271767452.30993.5.camel@...2413...> <4BCDC388.6060609@...221...> <4BCDE4B1.10402@...1909...> Message-ID: <4BCE9EB2.4000602@...221...> Am 20.04.2010 19:30, schrieb Doriano Blengino: > Rolf-Werner Eilert ha scritto: >> No, don't worry :-) >> >> So, this is my code now: >> >> PUBLIC SUB Suche_KeyPress() >> DIM t$ AS String >> >> IF Key.Code = Key.Return OR Key.Code = Key.Enter THEN >> t$ = Trim$(Suche.Text) >> IF t$<> "" THEN >> SucheStarten(t$) >> END IF >> END IF >> >> END >> >> I introduced t$ (old BASIC manners, I know :-) ) to avoid calling trim >> for several times, and I feel it's shorter and reads easier. Then I set >> Key.Return first as it would be pressed more probably, and this routine >> is called for each key. >> >> Later I realized that this is nonsense as it will check for Key.Enter >> with every key typed other than Return ;-) anyway... >> > No... it will check for Key.Enter every key you press, be it Return or not! > > Just kidding, but it's true... :-) > > Regards, > Doriano > > Oh - I thought when the first condition is fulfilled, the IF clause will jump out and deliver TRUE (only with OR - not with AND, XOR etc... of course) :-) Regards Rolf From matteo.pasotti at ...626... Wed Apr 21 08:58:57 2010 From: matteo.pasotti at ...626... (Matteo Pasotti) Date: Wed, 21 Apr 2010 08:58:57 +0200 Subject: [Gambas-user] Compiling Gambas3 on Fedora 12 In-Reply-To: <890068.58668.qm@...2420...> References: <890068.58668.qm@...2420...> Message-ID: <4BCEA231.7030301@...626...> Il 21/04/2010 06:51, Zelimir Ikovic ha scritto: > Is it possible to make LiveCD Linux+Gambas for windows programmers to try, > play with it and decide? > Regards > > http://www.informaticiliberi.org/yaflat/index.php?mod=fiulinux http://www.webdinamico.net/piumos/ They are both experimental and so they have some problem to solve. Both based on ubuntu 9.10. -- Matteo From shordi at ...626... Wed Apr 21 09:29:01 2010 From: shordi at ...626... (=?ISO-8859-1?Q?Jorge_Carri=F3n?=) Date: Wed, 21 Apr 2010 09:29:01 +0200 Subject: [Gambas-user] User components in Gambas 3 In-Reply-To: <201004202240.02466.gambas@...1...> References: <201004202240.02466.gambas@...1...> Message-ID: If this structure means that all dependencies will be solved in package time, It sounds fine. Installation of gambas applications on clients machines is, perhaps, one of the greater weakness of gambas, I think... You ara doing a fine work Beno?t. Regards 2010/4/20 Beno?t Minisini > Hi, > > I post this mail on both mailing-lists: please answer on the developer > mailing-list if possible, as this is related to the development version! > > I'm currently thinking about how user components should work in Gambas 3, > as I > dislike the way it was designed in Gambas 2. > > In Gambas 2, user components work the same way as normal components made > with > Gambas, except that they are symbolic located in the home directory that > point > at the real executables. > > That design lead to many problems: you can't make packages of user > components > easily, and if the real executable moves, the symbolic link is broken while > the IDE think the component is there. > > So, for Gambas 3, I propose a different design: > > - There are no "user" components anymore. > > - Instead, a project will be able to depend on other projects. > > - The list of associated projects will be defined in the IDE project option > dialog. > > - That list will be just a list of project *names*. > > - At design time, these project will be search inside one or more > directories > that will be defined as a IDE global option. > > - At run time, the associated projects will be searched by using the $PATH > environmental variable, as any other executables. > > Consequently: > > - The IDE global option will tell where you store the projects you want to > use > as components. > > - These projects will be packaged separately and installed like any other > Gambas projects. > > - They should have a special name, because they are not real executables, > but > some sort of "Gambas" libraries instead. > > - So the project executables should be in the $PATH. And so the main > project > will find them easily. > > - When creating the main project packages, it will be easy to add a > dependency > on the associated project packages. > > I need to find a good term for these "associated" projects. I'd like to > find > something different than "component". > > Even if internally the interpreter will use the same code to load them, I > want > the user to understand easily that they do not work the same way. > > Maybe "library" would be a good term... > > What do you think about the new design? > > -- > Beno?t Minisini > > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From robert1juhasz at ...626... Wed Apr 21 10:23:48 2010 From: robert1juhasz at ...626... (Robert JUHASZ) Date: Wed, 21 Apr 2010 10:23:48 +0200 Subject: [Gambas-user] serial port issue Message-ID: Hello List, This may not be a fully gambas question just I don't know who to ask for help - sorry for posting it here. I try to switch my measurement from windows XP (VB) to Ubuntu 9.10. This program takes several (3, for the moment) equipments connected to a PC through serial ports. It works correctly under XP and I succeeded to make (an even nicer :-) program in gambas for ubuntu. It also works well... as long as I use the serial ports integrated on the motherboard. I have some serial port cards we added later for having enough interface. >From the gtkterm they seems working with short commands so I was optimistic. But when I send more data from my program they seems not arriving correctly. Is there anybody who works with serial ports under ubuntu (with gambas)? A little help would be highly appreciated. Robi From ron at ...1740... Wed Apr 21 10:30:57 2010 From: ron at ...1740... (Ron) Date: Wed, 21 Apr 2010 10:30:57 +0200 Subject: [Gambas-user] serial port issue In-Reply-To: References: Message-ID: <4BCEB7C1.2090006@...1740...> Maybe try to see if there are any differences between the ports with the setserial command. $ setserial -a /dev/ttyS1 /dev/ttyS1, Line 1, UART: unknown, Port: 0x02f8, IRQ: 3 Baud_base: 115200, close_delay: 50, divisor: 0 closing_wait: 3000 Flags: spd_normal skip_test $ setserial -a /dev/ttyUSB1 /dev/ttyUSB1, Line 0, UART: unknown, Port: 0x0000, IRQ: 0 Baud_base: 24000000, close_delay: 0, divisor: 0 closing_wait: infinite Flags: spd_normal low_latency > Hello List, > > This may not be a fully gambas question just I don't know who to ask for > help - sorry for posting it here. > > I try to switch my measurement from windows XP (VB) to Ubuntu 9.10. This > program takes several (3, for the moment) equipments connected to a PC > through serial ports. > It works correctly under XP and I succeeded to make (an even nicer :-) > program in gambas for ubuntu. It also works well... as long as I use the > serial ports integrated on the motherboard. > > I have some serial port cards we added later for having enough interface. > >From the gtkterm they seems working with short commands so I was optimistic. > But when I send more data from my program they seems not arriving correctly. > > Is there anybody who works with serial ports under ubuntu (with gambas)? A > little help would be highly appreciated. > > Robi > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From robert1juhasz at ...626... Wed Apr 21 10:59:24 2010 From: robert1juhasz at ...626... (Robert JUHASZ) Date: Wed, 21 Apr 2010 10:59:24 +0200 Subject: [Gambas-user] serial port issue In-Reply-To: <4BCEB7C1.2090006@...1740...> References: <4BCEB7C1.2090006@...1740...> Message-ID: All the parameters are the same obtained by autoconfig, except the UART which was undefined for the added ports. I set this parameter to the same value as for the working one: 16550A (in fact I tried all the possible UART parameters and where the port was working it behaves always the same: short test messages pass but in the real work environment it crashes). :-( Robi 2010/4/21 Ron > Maybe try to see if there are any differences between the ports with the > setserial command. > > > $ setserial -a /dev/ttyS1 > /dev/ttyS1, Line 1, UART: unknown, Port: 0x02f8, IRQ: 3 > Baud_base: 115200, close_delay: 50, divisor: 0 > closing_wait: 3000 > Flags: spd_normal skip_test > > $ setserial -a /dev/ttyUSB1 > /dev/ttyUSB1, Line 0, UART: unknown, Port: 0x0000, IRQ: 0 > Baud_base: 24000000, close_delay: 0, divisor: 0 > closing_wait: infinite > Flags: spd_normal low_latency > > > Hello List, > > > > This may not be a fully gambas question just I don't know who to ask for > > help - sorry for posting it here. > > > > I try to switch my measurement from windows XP (VB) to Ubuntu 9.10. This > > program takes several (3, for the moment) equipments connected to a PC > > through serial ports. > > It works correctly under XP and I succeeded to make (an even nicer :-) > > program in gambas for ubuntu. It also works well... as long as I use the > > serial ports integrated on the motherboard. > > > > I have some serial port cards we added later for having enough interface. > > >From the gtkterm they seems working with short commands so I was > optimistic. > > But when I send more data from my program they seems not arriving > correctly. > > > > Is there anybody who works with serial ports under ubuntu (with gambas)? > A > > little help would be highly appreciated. > > > > Robi > > > ------------------------------------------------------------------------------ > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From doriano.blengino at ...1909... Wed Apr 21 11:13:20 2010 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Wed, 21 Apr 2010 11:13:20 +0200 Subject: [Gambas-user] serial port issue In-Reply-To: References: <4BCEB7C1.2090006@...1740...> Message-ID: <4BCEC1B0.4070404@...1909...> Robert JUHASZ ha scritto: > All the parameters are the same obtained by autoconfig, except the UART > which was undefined for the added ports. > I set this parameter to the same value as for the working one: 16550A (in > fact I tried all the possible UART parameters and where the port was working > it behaves always the same: short test messages pass but in the real work > environment it crashes). > Do you have some sort of handshaking? From bill-lancaster at ...2231... Wed Apr 21 11:20:39 2010 From: bill-lancaster at ...2231... (Bill-Lancaster) Date: Wed, 21 Apr 2010 02:20:39 -0700 (PDT) Subject: [Gambas-user] Gambas in background Message-ID: <28287978.post@...1379...> Is it possible to run a Gambas programme with only a trayicon showing? Bill Lancaster -- View this message in context: http://old.nabble.com/Gambas-in-background-tp28287978p28287978.html Sent from the gambas-user mailing list archive at Nabble.com. From ronstk at ...239... Wed Apr 21 11:59:31 2010 From: ronstk at ...239... (Ron_1st) Date: Wed, 21 Apr 2010 10:59:31 +0100 Subject: [Gambas-user] TextBox and CR In-Reply-To: <201004201648.47763.gambas@...1...> References: <4BCD5AED.8010907@...221...> <201004201645.13913.ronstk@...239...> <201004201648.47763.gambas@...1...> Message-ID: <201004211159.31706.ronstk@...239...> On Tuesday 20 April 2010, Beno?t Minisini wrote: > > On Tuesday 20 April 2010, Caveat wrote: > > > Hi Rolf, > > > I guess you're right. I threw the code together very quickly, just to > > > make a working example for you. But 100% correct, you don't need lcode > > > or AS Variant or DIM or lcode = Key.Code... :-) > > > > In general I should say the same. But Key.Code is in a way dynamic and a > > new KeyPress could occur before the related subroutine is finished. > > No, unless you explicitely call the event loop (with WAIT). > So it "could" happen. Not in the given example but in another project that is using WAIT. i.e. output keybaoard characters to a 24 character LCD display that need that WAIT. Best regards, Ron_1st -- From gambas at ...1... Wed Apr 21 12:04:08 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 21 Apr 2010 12:04:08 +0200 Subject: [Gambas-user] TextBox and CR In-Reply-To: <201004211159.31706.ronstk@...239...> References: <4BCD5AED.8010907@...221...> <201004201648.47763.gambas@...1...> <201004211159.31706.ronstk@...239...> Message-ID: <201004211204.08122.gambas@...1...> > On Tuesday 20 April 2010, Beno?t Minisini wrote: > > > On Tuesday 20 April 2010, Caveat wrote: > > > > Hi Rolf, > > > > I guess you're right. I threw the code together very quickly, just > > > > to make a working example for you. But 100% correct, you don't need > > > > lcode or AS Variant or DIM or lcode = Key.Code... :-) > > > > > > In general I should say the same. But Key.Code is in a way dynamic and > > > a new KeyPress could occur before the related subroutine is finished. > > > > No, unless you explicitely call the event loop (with WAIT). > > So it "could" happen. Not in the given example but in another > project that is using WAIT. i.e. output keybaoard characters to a > 24 character LCD display that need that WAIT. > Why do you need to call WAIT? You should only use it when you want to refresh your GUI during some heavy processin. Otherwise, if you should use SLEEP. Regards, -- Beno?t Minisini From robert1juhasz at ...626... Wed Apr 21 13:05:12 2010 From: robert1juhasz at ...626... (Robert JUHASZ) Date: Wed, 21 Apr 2010 13:05:12 +0200 Subject: [Gambas-user] serial port issue In-Reply-To: <4BCEC1B0.4070404@...1909...> References: <4BCEB7C1.2090006@...1740...> <4BCEC1B0.4070404@...1909...> Message-ID: The communication parameters are 9600, 8, n, 1, Xon/Xoff. 2010/4/21 Doriano Blengino > Robert JUHASZ ha scritto: > > All the parameters are the same obtained by autoconfig, except the UART > > which was undefined for the added ports. > > I set this parameter to the same value as for the working one: 16550A (in > > fact I tried all the possible UART parameters and where the port was > working > > it behaves always the same: short test messages pass but in the real work > > environment it crashes). > > > Do you have some sort of handshaking? > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From ron at ...1740... Wed Apr 21 13:12:08 2010 From: ron at ...1740... (Ron) Date: Wed, 21 Apr 2010 13:12:08 +0200 Subject: [Gambas-user] serial port issue In-Reply-To: References: <4BCEB7C1.2090006@...1740...> <4BCEC1B0.4070404@...1909...> Message-ID: <4BCEDD88.9090205@...1740...> You mean crashing like in signal #11 core dump or the application doesn't do what's wanted? Which version of Gambas? There where a few serial port related bug fixes. http://gambas.sourceforge.net/en/changelog2.html I use a lot (10) serial ports in my gambas app. 24/7 but I do not use xon/off. Regards, Ron. > The communication parameters are 9600, 8, n, 1, Xon/Xoff. > > 2010/4/21 Doriano Blengino > > >> Robert JUHASZ ha scritto: >> >>> All the parameters are the same obtained by autoconfig, except the UART >>> which was undefined for the added ports. >>> I set this parameter to the same value as for the working one: 16550A (in >>> fact I tried all the possible UART parameters and where the port was >>> >> working >> >>> it behaves always the same: short test messages pass but in the real work >>> environment it crashes). >>> >>> >> Do you have some sort of handshaking? >> >> >> >> ------------------------------------------------------------------------------ >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> >> > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From doriano.blengino at ...1909... Wed Apr 21 13:35:39 2010 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Wed, 21 Apr 2010 13:35:39 +0200 Subject: [Gambas-user] serial port issue In-Reply-To: References: <4BCEB7C1.2090006@...1740...> <4BCEC1B0.4070404@...1909...> Message-ID: <4BCEE30B.10405@...1909...> Robert JUHASZ ha scritto: > The communication parameters are 9600, 8, n, 1, Xon/Xoff. > >> Do you have some sort of handshaking? >> Then it /could/ happen that the device sends an Xoff, but the software does not see it at the correct time. There has been a similar issue when the new UARTs with fifo came out - some application recommended to disable the fifo, because instead of a single char to test for an Xoff, the software sometimes received a bunch of bytes. The USB is not really bidirectional like a true serial port, and buffers data. So the situation looks similar. Not an easy question. You could try hardware flow control, if possible (perhaps you hate it like me). Or you can read all the pending incoming data before sending. You can also try to break outgoing data in small pieces, to let the driver peek at incoming Xoffs. Or you can disable flow control entirely, and implement it in your own code. If you have a serial scope (data tester?) try to see what happens. If you don't have one, a PC with two (real!) serial ports can do. If you describe or send parts of the code, may be that someone can see some caveat in it. Regards, Doriano From robert1juhasz at ...626... Wed Apr 21 13:59:25 2010 From: robert1juhasz at ...626... (Robert JUHASZ) Date: Wed, 21 Apr 2010 13:59:25 +0200 Subject: [Gambas-user] serial port issue In-Reply-To: <4BCEDD88.9090205@...1740...> References: <4BCEB7C1.2090006@...1740...> <4BCEC1B0.4070404@...1909...> <4BCEDD88.9090205@...1740...> Message-ID: Ron, I mean that the app doesn't do what I wish him to do :-) Unfortunately it works as expected with the serial port on the motherboard (ttyS0, same equipment connected, same data sent and should have been received) so it should not be a bug in my code. The connection parameters (including Xon/Xoff) are required by the equipment I use. Physically, how did you connect 10 serial ports to your machine? With a card or do you use virtual ports with USB connector? Robi 2010/4/21 Ron > You mean crashing like in signal #11 core dump or the application > doesn't do what's wanted? > > Which version of Gambas? > > There where a few serial port related bug fixes. > http://gambas.sourceforge.net/en/changelog2.html > > I use a lot (10) serial ports in my gambas app. 24/7 but I do not use > xon/off. > > Regards, > Ron. > > The communication parameters are 9600, 8, n, 1, Xon/Xoff. > > > > 2010/4/21 Doriano Blengino > > > > > >> Robert JUHASZ ha scritto: > >> > >>> All the parameters are the same obtained by autoconfig, except the UART > >>> which was undefined for the added ports. > >>> I set this parameter to the same value as for the working one: 16550A > (in > >>> fact I tried all the possible UART parameters and where the port was > >>> > >> working > >> > >>> it behaves always the same: short test messages pass but in the real > work > >>> environment it crashes). > >>> > >>> > >> Do you have some sort of handshaking? > >> > >> > >> > >> > ------------------------------------------------------------------------------ > >> _______________________________________________ > >> Gambas-user mailing list > >> Gambas-user at lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/gambas-user > >> > >> > > > ------------------------------------------------------------------------------ > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From ron at ...1740... Wed Apr 21 14:16:07 2010 From: ron at ...1740... (Ron) Date: Wed, 21 Apr 2010 14:16:07 +0200 Subject: [Gambas-user] serial port issue In-Reply-To: References: <4BCEB7C1.2090006@...1740...> <4BCEC1B0.4070404@...1909...> <4BCEDD88.9090205@...1740...> Message-ID: <4BCEEC87.7080708@...1740...> I use a ten ports usb hub and seperate usb to serial cables. I have written some udev rules to lock the serial device names to the physical ports.. otherwise they change after a reboot. To bad I just found these guys afterwards: http://www.picco.nl/product_info.php?products_id=2338 Regards, Ron. > Ron, > > I mean that the app doesn't do what I wish him to do :-) > Unfortunately it works as expected with the serial port on the motherboard > (ttyS0, same equipment connected, same data sent and should have been > received) so it should not be a bug in my code. > The connection parameters (including Xon/Xoff) are required by the equipment > I use. > > Physically, how did you connect 10 serial ports to your machine? With a card > or do you use virtual ports with USB connector? > > Robi > > 2010/4/21 Ron > > >> You mean crashing like in signal #11 core dump or the application >> doesn't do what's wanted? >> >> Which version of Gambas? >> >> There where a few serial port related bug fixes. >> http://gambas.sourceforge.net/en/changelog2.html >> >> I use a lot (10) serial ports in my gambas app. 24/7 but I do not use >> xon/off. >> >> Regards, >> Ron. >> >>> The communication parameters are 9600, 8, n, 1, Xon/Xoff. >>> >>> 2010/4/21 Doriano Blengino >>> >>> >>> >>>> Robert JUHASZ ha scritto: >>>> >>>> >>>>> All the parameters are the same obtained by autoconfig, except the UART >>>>> which was undefined for the added ports. >>>>> I set this parameter to the same value as for the working one: 16550A >>>>> >> (in >> >>>>> fact I tried all the possible UART parameters and where the port was >>>>> >>>>> >>>> working >>>> >>>> >>>>> it behaves always the same: short test messages pass but in the real >>>>> >> work >> >>>>> environment it crashes). >>>>> >>>>> >>>>> >>>> Do you have some sort of handshaking? >>>> >>>> >>>> >>>> >>>> >> ------------------------------------------------------------------------------ >> >>>> _______________________________________________ >>>> Gambas-user mailing list >>>> Gambas-user at lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>> >>>> >>>> >> ------------------------------------------------------------------------------ >> >>> _______________________________________________ >>> Gambas-user mailing list >>> Gambas-user at lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>> >>> >> >> ------------------------------------------------------------------------------ >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> >> > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From ihaywood at ...1979... Wed Apr 21 14:22:58 2010 From: ihaywood at ...1979... (Ian Haywood) Date: Wed, 21 Apr 2010 22:22:58 +1000 Subject: [Gambas-user] User components in Gambas 3 In-Reply-To: <201004202240.02466.gambas@...1...> References: <201004202240.02466.gambas@...1...> Message-ID: 2010/4/21 Beno?t Minisini : > - At run time, the associated projects will be searched by using the $PATH > environmental variable, as any other executables. Not sure about $PATH: gambas components/libraries generally won't be in the same directories as general system executables, and vice versa. I'd consider a specific variable, say $GAMBASPATH (in the same pattern as Python's $PYTHONPATH and Java's $CLASSPATH) If this variable doesn't exist, the interpreter should search a hardwired set of directories, which may vary by distro, on Debian and like systems it would be .:/usr/lib/gambas/:/usr/local/lib/gambas/ > - When creating the main project packages, it will be easy to add a dependency > on the associated project packages. What would be nice is for the IDE to scan the $GAMBASPATH and list the installed libraries available. Ideally this would be a common system for both 'standard' and third-party libraries. It would mean some fields within the library binary format to store a small amount of metadata (say a one-paragraph description, a licence and a URL to their API documentation) > Maybe "library" would be a good term... Yep, "library" is good. Ian From robert1juhasz at ...626... Wed Apr 21 15:08:35 2010 From: robert1juhasz at ...626... (Robert JUHASZ) Date: Wed, 21 Apr 2010 15:08:35 +0200 Subject: [Gambas-user] serial port issue In-Reply-To: <4BCEEC87.7080708@...1740...> References: <4BCEB7C1.2090006@...1740...> <4BCEC1B0.4070404@...1909...> <4BCEDD88.9090205@...1740...> <4BCEEC87.7080708@...1740...> Message-ID: Thanks for the info! I may need to find some reliable hardware, this can be an issue (the one installed by my Chinese informatics colleague doesn't give me too much confidence :-) Did you have to install any driver to get it working? Robi 2010/4/21 Ron > I use a ten ports usb hub and seperate usb to serial cables. > I have written some udev rules to lock the serial device names to the > physical ports.. otherwise they change after a reboot. > > To bad I just found these guys afterwards: > http://www.picco.nl/product_info.php?products_id=2338 > > Regards, > Ron. > > Ron, > > > > I mean that the app doesn't do what I wish him to do :-) > > Unfortunately it works as expected with the serial port on the > motherboard > > (ttyS0, same equipment connected, same data sent and should have been > > received) so it should not be a bug in my code. > > The connection parameters (including Xon/Xoff) are required by the > equipment > > I use. > > > > Physically, how did you connect 10 serial ports to your machine? With a > card > > or do you use virtual ports with USB connector? > > > > Robi > > > > 2010/4/21 Ron > > > > > >> You mean crashing like in signal #11 core dump or the application > >> doesn't do what's wanted? > >> > >> Which version of Gambas? > >> > >> There where a few serial port related bug fixes. > >> http://gambas.sourceforge.net/en/changelog2.html > >> > >> I use a lot (10) serial ports in my gambas app. 24/7 but I do not use > >> xon/off. > >> > >> Regards, > >> Ron. > >> > >>> The communication parameters are 9600, 8, n, 1, Xon/Xoff. > >>> > >>> 2010/4/21 Doriano Blengino > >>> > >>> > >>> > >>>> Robert JUHASZ ha scritto: > >>>> > >>>> > >>>>> All the parameters are the same obtained by autoconfig, except the > UART > >>>>> which was undefined for the added ports. > >>>>> I set this parameter to the same value as for the working one: 16550A > >>>>> > >> (in > >> > >>>>> fact I tried all the possible UART parameters and where the port was > >>>>> > >>>>> > >>>> working > >>>> > >>>> > >>>>> it behaves always the same: short test messages pass but in the real > >>>>> > >> work > >> > >>>>> environment it crashes). > >>>>> > >>>>> > >>>>> > >>>> Do you have some sort of handshaking? > >>>> > >>>> > >>>> > >>>> > >>>> > >> > ------------------------------------------------------------------------------ > >> > >>>> _______________________________________________ > >>>> Gambas-user mailing list > >>>> Gambas-user at lists.sourceforge.net > >>>> https://lists.sourceforge.net/lists/listinfo/gambas-user > >>>> > >>>> > >>>> > >> > ------------------------------------------------------------------------------ > >> > >>> _______________________________________________ > >>> Gambas-user mailing list > >>> Gambas-user at lists.sourceforge.net > >>> https://lists.sourceforge.net/lists/listinfo/gambas-user > >>> > >>> > >> > >> > ------------------------------------------------------------------------------ > >> _______________________________________________ > >> Gambas-user mailing list > >> Gambas-user at lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/gambas-user > >> > >> > > > ------------------------------------------------------------------------------ > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From ron at ...1740... Wed Apr 21 15:29:37 2010 From: ron at ...1740... (Ron) Date: Wed, 21 Apr 2010 15:29:37 +0200 Subject: [Gambas-user] serial port issue In-Reply-To: References: <4BCEB7C1.2090006@...1740...> <4BCEC1B0.4070404@...1909...> <4BCEDD88.9090205@...1740...> <4BCEEC87.7080708@...1740...> Message-ID: <4BCEFDC1.4090605@...1740...> I have no experience with the cable in my link, I just found it yesterday, but make sure your usb to serial converters have a FTDI chip inside. Not (like most of mine) an Prolific PL2303 chip since they all have the same device id and serial number, so you have a small problem identifing them. I have not installed any drivers, but I had to lock them like this: http://www.domotiga.nl/wiki/Linux/InstallOpt#Lockserialdevicenames Here is an old photo of my test server showing some of them: http://www.domotiga.nl/wiki/Domotiga/SetupPics Using Ubuntu 9.10 Regards, Ron. > Thanks for the info! I may need to find some reliable hardware, this can be > an issue (the one installed by my Chinese informatics colleague doesn't give > me too much confidence :-) > > Did you have to install any driver to get it working? > > Robi > > 2010/4/21 Ron > > >> I use a ten ports usb hub and seperate usb to serial cables. >> I have written some udev rules to lock the serial device names to the >> physical ports.. otherwise they change after a reboot. >> >> To bad I just found these guys afterwards: >> http://www.picco.nl/product_info.php?products_id=2338 >> >> Regards, >> Ron. >> >>> Ron, >>> >>> I mean that the app doesn't do what I wish him to do :-) >>> Unfortunately it works as expected with the serial port on the >>> >> motherboard >> >>> (ttyS0, same equipment connected, same data sent and should have been >>> received) so it should not be a bug in my code. >>> The connection parameters (including Xon/Xoff) are required by the >>> >> equipment >> >>> I use. >>> >>> Physically, how did you connect 10 serial ports to your machine? With a >>> >> card >> >>> or do you use virtual ports with USB connector? >>> >>> Robi >>> >>> 2010/4/21 Ron >>> >>> >>> >>>> You mean crashing like in signal #11 core dump or the application >>>> doesn't do what's wanted? >>>> >>>> Which version of Gambas? >>>> >>>> There where a few serial port related bug fixes. >>>> http://gambas.sourceforge.net/en/changelog2.html >>>> >>>> I use a lot (10) serial ports in my gambas app. 24/7 but I do not use >>>> xon/off. >>>> >>>> Regards, >>>> Ron. >>>> >>>> >>>>> The communication parameters are 9600, 8, n, 1, Xon/Xoff. >>>>> >>>>> 2010/4/21 Doriano Blengino >>>>> >>>>> >>>>> >>>>> >>>>>> Robert JUHASZ ha scritto: >>>>>> >>>>>> >>>>>> >>>>>>> All the parameters are the same obtained by autoconfig, except the >>>>>>> >> UART >> >>>>>>> which was undefined for the added ports. >>>>>>> I set this parameter to the same value as for the working one: 16550A >>>>>>> >>>>>>> >>>> (in >>>> >>>> >>>>>>> fact I tried all the possible UART parameters and where the port was >>>>>>> >>>>>>> >>>>>>> >>>>>> working >>>>>> >>>>>> >>>>>> >>>>>>> it behaves always the same: short test messages pass but in the real >>>>>>> >>>>>>> >>>> work >>>> >>>> >>>>>>> environment it crashes). >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>> Do you have some sort of handshaking? >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >> ------------------------------------------------------------------------------ >> >>>>>> _______________________________________________ >>>>>> Gambas-user mailing list >>>>>> Gambas-user at lists.sourceforge.net >>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>> >>>>>> >>>>>> >>>>>> >> ------------------------------------------------------------------------------ >> >>>>> _______________________________________________ >>>>> Gambas-user mailing list >>>>> Gambas-user at lists.sourceforge.net >>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>> >>>>> >>>>> >>>> >> ------------------------------------------------------------------------------ >> >>>> _______________________________________________ >>>> Gambas-user mailing list >>>> Gambas-user at lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>> >>>> >>>> >> ------------------------------------------------------------------------------ >> >>> _______________________________________________ >>> Gambas-user mailing list >>> Gambas-user at lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>> >>> >> >> ------------------------------------------------------------------------------ >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> >> > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From Gambas at ...1950... Wed Apr 21 15:45:34 2010 From: Gambas at ...1950... (Caveat) Date: Wed, 21 Apr 2010 15:45:34 +0200 Subject: [Gambas-user] TextBox and CR In-Reply-To: <4BCE9EB2.4000602@...221...> References: <4BCD5AED.8010907@...221...> <1271753906.17146.3.camel@...2413...> <4BCD7636.7010305@...221...> <1271767452.30993.5.camel@...2413...> <4BCDC388.6060609@...221...> <4BCDE4B1.10402@...1909...> <4BCE9EB2.4000602@...221...> Message-ID: <1271857534.3459.40.camel@...2413...> > the IF clause will jump out and deliver TRUE Don't think this applies to Gambas. It's quite common in Java for example to use something like if (myvar != null && myvar.equals(somestring)) as we know that java WILL jump out of the evaluation with FALSE as soon as it finds myvar is null (hence avoiding the dreaded NullPointerException). You can get java to work in a non-short-circuited way by using & in place of && but I rarely see that in practice. (only with OR - not with AND, XOR etc... of course) :-) Well, for AND... errrm see above ;-) Regards, Caveat > > On Wed, 2010-04-21 at 08:44 +0200, Rolf-Werner Eilert wrote: > Am 20.04.2010 19:30, schrieb Doriano Blengino: > > Rolf-Werner Eilert ha scritto: > >> No, don't worry :-) > >> > >> So, this is my code now: > >> > >> PUBLIC SUB Suche_KeyPress() > >> DIM t$ AS String > >> > >> IF Key.Code = Key.Return OR Key.Code = Key.Enter THEN > >> t$ = Trim$(Suche.Text) > >> IF t$<> "" THEN > >> SucheStarten(t$) > >> END IF > >> END IF > >> > >> END > >> > >> I introduced t$ (old BASIC manners, I know :-) ) to avoid calling trim > >> for several times, and I feel it's shorter and reads easier. Then I set > >> Key.Return first as it would be pressed more probably, and this routine > >> is called for each key. > >> > >> Later I realized that this is nonsense as it will check for Key.Enter > >> with every key typed other than Return ;-) anyway... > >> > > No... it will check for Key.Enter every key you press, be it Return or not! > > > > Just kidding, but it's true... :-) > > > > Regards, > > Doriano > > > > > > > Oh - I thought when the first condition is fulfilled, the IF clause will > jump out and deliver TRUE (only with OR - not with AND, XOR etc... of > course) :-) > > Regards > > Rolf > > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From Gambas at ...1950... Wed Apr 21 15:31:56 2010 From: Gambas at ...1950... (Caveat) Date: Wed, 21 Apr 2010 15:31:56 +0200 Subject: [Gambas-user] Gambas in background In-Reply-To: <28287978.post@...1379...> References: <28287978.post@...1379...> Message-ID: <1271856716.3459.31.camel@...2413...> Hi Bill, Yes, it is. I have developed a little test app for you that shows this in action. Module1 is set as the Startup Class, in place of the more normal Form. As it's the Startup Class, main() gets run automatically when you start the program. First thing it does is instantiate the TrayIcon and give it a tool tip so you know it's working. Very important is the following Object.Attach line as this ensures your module captures the events raised by the TrayIcon. This is normally not necessary when you stick a control on a Form, as the Attach is automatic. Then we make sure the TrayIcon gets Shown. After this, we instantiate a dummy form (I couldn't see any way around this... Benoit??) and then start to define our menus. The top-level menu has the dummy form set as its parent (also important that the dummy form has been instantiated (using NEW Form)...but it doesn't need to be Shown or Loaded). The subsequent menus (MySubMenu 1,2,3) get the top-level menu as a parent. Very important again is to Attach all the sub menus to your module (ME meaning literally me/myself... so when you write that code in Module1, it means Module1). When the Menu event from the TrayIcon gets fired, we call Popup on our home-made menu MyMenu. This pops up the 3 sub menu items in a little box near the TrayIcon... Status, Show Main, Exit. As each sub-menu has been Attached to Module1, when one of the sub-menus gets a Click event, it can be trapped by Module1 in MyMenu1_Click(), MyMenu2_Click()... Note that the SUB to catch the event must be named according to the last param of the Attach method... so MyMenu1, MyMenu2, MyMenu3 in this case (you'll probably make much better names than this...) My FMain is the same FMain as I used for Rolf's question. There is nothing special about my FMain, there are no secret menu widgets or TrayIcons defined in FMain. Including "Show Main" on MyMenu2 just demonstrates that you *could* have a program running in background where you might occasionally want to open up a form and see how it's doing/respond to problems... Hope this helps, and above all... have fun! :-) Regards, Caveat P.S. The full code for Module1 is as follows: ' Gambas module file PRIVATE MyTrayIcon AS TrayIcon PRIVATE MyMenu AS Menu PRIVATE MySubMenu1 AS Menu PRIVATE MySubMenu2 AS Menu PRIVATE MySubMenu3 AS Menu PRIVATE MyDummyForm AS Form PUBLIC SUB main() MyTrayIcon = NEW TrayIcon MyTrayIcon.Tooltip = "Hi from Gambas" Object.Attach(MyTrayIcon, ME, "MyTrayIcon") MyTrayIcon.Show MyDummyForm = NEW Form MyMenu = NEW Menu(MyDummyForm, FALSE) MyMenu.Caption = "TrayMenu" MyMenu.Tag = "TrayMenu" MyMenu.Name = "TrayMenu" MySubMenu1 = NEW Menu(MyMenu, FALSE) MySubMenu1.Caption = "Status" MySubMenu1.Tag = "Status" MySubMenu1.Name = "mnuStatus" Object.Attach(MySubMenu1, ME, "MyMenu1") MySubMenu2 = NEW Menu(MyMenu, FALSE) MySubMenu2.Caption = "Show Main" MySubMenu2.Tag = "ShowMain" MySubMenu2.Name = "mnuShowMain" Object.Attach(MySubMenu2, ME, "MyMenu2") MySubMenu3 = NEW Menu(MyMenu, FALSE) MySubMenu3.Caption = "Exit Program" MySubMenu3.Tag = "Exit" MySubMenu3.Name = "mnuExit" Object.Attach(MySubMenu3, ME, "MyMenu3") END PUBLIC SUB MyTrayIcon_Menu() MyMenu.Popup() END PUBLIC SUB MyMenu1_Click() Message.Info("Your program is: RUNNING") END PUBLIC SUB MyMenu2_Click() FMain.Show END PUBLIC SUB MyMenu3_Click() QUIT END On Wed, 2010-04-21 at 02:20 -0700, Bill-Lancaster wrote: > Is it possible to run a Gambas programme with only a trayicon showing? > > Bill Lancaster From gambas at ...1... Wed Apr 21 16:07:30 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 21 Apr 2010 16:07:30 +0200 Subject: [Gambas-user] Gambas in background In-Reply-To: <1271856716.3459.31.camel@...2413...> References: <28287978.post@...1379...> <1271856716.3459.31.camel@...2413...> Message-ID: <201004211607.30694.gambas@...1...> > Hi Bill, > > Yes, it is. > > I have developed a little test app for you that shows this in action. > > Module1 is set as the Startup Class, in place of the more normal Form. > As it's the Startup Class, main() gets run automatically when you start > the program. First thing it does is instantiate the TrayIcon and give > it a tool tip so you know it's working. > Very important is the following Object.Attach line as this ensures your > module captures the events raised by the TrayIcon. No need to use Object.Attach(), as there is a syntax for that. Look at the documentation of the NEW instruction. > This is normally not > necessary when you stick a control on a Form, as the Attach is > automatic. Then we make sure the TrayIcon gets Shown. > > After this, we instantiate a dummy form (I couldn't see any way around > this... Benoit??) You need a window to create a menu, that's true. > and then start to define our menus. The top-level > menu has the dummy form set as its parent (also important that the dummy > form has been instantiated (using NEW Form)...but it doesn't need to be > > [...] > > P.S. The full code for Module1 is as follows: > ' Gambas module file > PRIVATE MyTrayIcon AS TrayIcon > PRIVATE MyMenu AS Menu > PRIVATE MySubMenu1 AS Menu > PRIVATE MySubMenu2 AS Menu > PRIVATE MySubMenu3 AS Menu > PRIVATE MyDummyForm AS Form > > PUBLIC SUB main() > > MyTrayIcon = NEW TrayIcon -----------------------------> AS "MyTrayIcon" > MyTrayIcon.Tooltip = "Hi from Gambas" > Object.Attach(MyTrayIcon, ME, "MyTrayIcon") ...and you can remove the previous line. You can do that for all instanciations below. > MyTrayIcon.Show > > MyDummyForm = NEW Form > > MyMenu = NEW Menu(MyDummyForm, FALSE) > MyMenu.Caption = "TrayMenu" > MyMenu.Tag = "TrayMenu" > MyMenu.Name = "TrayMenu" > > MySubMenu1 = NEW Menu(MyMenu, FALSE) > MySubMenu1.Caption = "Status" > MySubMenu1.Tag = "Status" > MySubMenu1.Name = "mnuStatus" > Object.Attach(MySubMenu1, ME, "MyMenu1") > > MySubMenu2 = NEW Menu(MyMenu, FALSE) > MySubMenu2.Caption = "Show Main" > MySubMenu2.Tag = "ShowMain" > MySubMenu2.Name = "mnuShowMain" > Object.Attach(MySubMenu2, ME, "MyMenu2") > > MySubMenu3 = NEW Menu(MyMenu, FALSE) > MySubMenu3.Caption = "Exit Program" > MySubMenu3.Tag = "Exit" > MySubMenu3.Name = "mnuExit" > Object.Attach(MySubMenu3, ME, "MyMenu3") > > END > > PUBLIC SUB MyTrayIcon_Menu() > > MyMenu.Popup() > > END > > PUBLIC SUB MyMenu1_Click() > > Message.Info("Your program is: RUNNING") > > END > > PUBLIC SUB MyMenu2_Click() > > FMain.Show > > END > > PUBLIC SUB MyMenu3_Click() > > QUIT Do not use QUIT in GUI programs. Just close your form. > > END > Regards, -- Beno?t Minisini From Gambas at ...1950... Wed Apr 21 16:21:57 2010 From: Gambas at ...1950... (Caveat) Date: Wed, 21 Apr 2010 16:21:57 +0200 Subject: [Gambas-user] Gambas in background In-Reply-To: <201004211607.30694.gambas@...1...> References: <28287978.post@...1379...> <1271856716.3459.31.camel@...2413...> <201004211607.30694.gambas@...1...> Message-ID: <1271859717.3459.62.camel@...2413...> Thanks for the tips Benoit. I never realised I could avoid all those ugly Attaches. :-) But that comment... Do not use QUIT in GUI programs. Just close your form. I was going to argue about this, as the point is that we are creating an application that runs in background and kind of "officially has no forms". But then I tested it and found, of course, you're absolutely right... the second I close MyDummyForm the app closes (even though we never Load or Show that form). It's always nice to help someone learn something new, and in the process learn something new yourself. :-) Regards, Caveat On Wed, 2010-04-21 at 16:07 +0200, Beno?t Minisini wrote: > > Hi Bill, > > > > Yes, it is. > > > > I have developed a little test app for you that shows this in action. > > > > Module1 is set as the Startup Class, in place of the more normal Form. > > As it's the Startup Class, main() gets run automatically when you start > > the program. First thing it does is instantiate the TrayIcon and give > > it a tool tip so you know it's working. > > Very important is the following Object.Attach line as this ensures your > > module captures the events raised by the TrayIcon. > > No need to use Object.Attach(), as there is a syntax for that. Look at the > documentation of the NEW instruction. > > > This is normally not > > necessary when you stick a control on a Form, as the Attach is > > automatic. Then we make sure the TrayIcon gets Shown. > > > > After this, we instantiate a dummy form (I couldn't see any way around > > this... Benoit??) > > You need a window to create a menu, that's true. > > > and then start to define our menus. The top-level > > menu has the dummy form set as its parent (also important that the dummy > > form has been instantiated (using NEW Form)...but it doesn't need to be > > > > [...] > > > > P.S. The full code for Module1 is as follows: > > ' Gambas module file > > PRIVATE MyTrayIcon AS TrayIcon > > PRIVATE MyMenu AS Menu > > PRIVATE MySubMenu1 AS Menu > > PRIVATE MySubMenu2 AS Menu > > PRIVATE MySubMenu3 AS Menu > > PRIVATE MyDummyForm AS Form > > > > PUBLIC SUB main() > > > > MyTrayIcon = NEW TrayIcon > > -----------------------------> AS "MyTrayIcon" > > > MyTrayIcon.Tooltip = "Hi from Gambas" > > Object.Attach(MyTrayIcon, ME, "MyTrayIcon") > > ...and you can remove the previous line. > > You can do that for all instanciations below. > > > MyTrayIcon.Show > > > > MyDummyForm = NEW Form > > > > MyMenu = NEW Menu(MyDummyForm, FALSE) > > MyMenu.Caption = "TrayMenu" > > MyMenu.Tag = "TrayMenu" > > MyMenu.Name = "TrayMenu" > > > > MySubMenu1 = NEW Menu(MyMenu, FALSE) > > MySubMenu1.Caption = "Status" > > MySubMenu1.Tag = "Status" > > MySubMenu1.Name = "mnuStatus" > > Object.Attach(MySubMenu1, ME, "MyMenu1") > > > > MySubMenu2 = NEW Menu(MyMenu, FALSE) > > MySubMenu2.Caption = "Show Main" > > MySubMenu2.Tag = "ShowMain" > > MySubMenu2.Name = "mnuShowMain" > > Object.Attach(MySubMenu2, ME, "MyMenu2") > > > > MySubMenu3 = NEW Menu(MyMenu, FALSE) > > MySubMenu3.Caption = "Exit Program" > > MySubMenu3.Tag = "Exit" > > MySubMenu3.Name = "mnuExit" > > Object.Attach(MySubMenu3, ME, "MyMenu3") > > > > END > > > > PUBLIC SUB MyTrayIcon_Menu() > > > > MyMenu.Popup() > > > > END > > > > PUBLIC SUB MyMenu1_Click() > > > > Message.Info("Your program is: RUNNING") > > > > END > > > > PUBLIC SUB MyMenu2_Click() > > > > FMain.Show > > > > END > > > > PUBLIC SUB MyMenu3_Click() > > > > QUIT > > Do not use QUIT in GUI programs. Just close your form. > > > > > END > > > > Regards, > From ron at ...1740... Wed Apr 21 17:10:38 2010 From: ron at ...1740... (Ron) Date: Wed, 21 Apr 2010 17:10:38 +0200 Subject: [Gambas-user] TextBox and CR In-Reply-To: <1271857534.3459.40.camel@...2413...> References: <4BCD5AED.8010907@...221...> <1271753906.17146.3.camel@...2413...> <4BCD7636.7010305@...221...> <1271767452.30993.5.camel@...2413...> <4BCDC388.6060609@...221...> <4BCDE4B1.10402@...1909...> <4BCE9EB2.4000602@...221...> <1271857534.3459.40.camel@...2413...> Message-ID: <4BCF156E.3010002@...1740...> If I mis understood the issue please ignore me but... I have seen occasions in my Gambas project where: IF this AND that THEN didn't always do what it was suppose to do. I had to do: IF this AND IF that THEN Most of the times the first one worked ok, but not always... Regards, Ron_2nd. >> the IF clause will jump out and deliver TRUE >> > > Don't think this applies to Gambas. It's quite common in Java for > example to use something like if (myvar != null && > myvar.equals(somestring)) as we know that java WILL jump out of the > evaluation with FALSE as soon as it finds myvar is null (hence avoiding > the dreaded NullPointerException). You can get java to work in a > non-short-circuited way by using & in place of && but I rarely see that > in practice. > > (only with OR - not with AND, XOR etc... of course) :-) > Well, for AND... errrm see above ;-) > > Regards, > Caveat > > >> > On Wed, 2010-04-21 at 08:44 +0200, Rolf-Werner Eilert wrote: > >> Am 20.04.2010 19:30, schrieb Doriano Blengino: >> >>> Rolf-Werner Eilert ha scritto: >>> >>>> No, don't worry :-) >>>> >>>> So, this is my code now: >>>> >>>> PUBLIC SUB Suche_KeyPress() >>>> DIM t$ AS String >>>> >>>> IF Key.Code = Key.Return OR Key.Code = Key.Enter THEN >>>> t$ = Trim$(Suche.Text) >>>> IF t$<> "" THEN >>>> SucheStarten(t$) >>>> END IF >>>> END IF >>>> >>>> END >>>> >>>> I introduced t$ (old BASIC manners, I know :-) ) to avoid calling trim >>>> for several times, and I feel it's shorter and reads easier. Then I set >>>> Key.Return first as it would be pressed more probably, and this routine >>>> is called for each key. >>>> >>>> Later I realized that this is nonsense as it will check for Key.Enter >>>> with every key typed other than Return ;-) anyway... >>>> >>>> >>> No... it will check for Key.Enter every key you press, be it Return or not! >>> >>> Just kidding, but it's true... :-) >>> >>> Regards, >>> Doriano >>> >>> >>> >> Oh - I thought when the first condition is fulfilled, the IF clause will >> jump out and deliver TRUE (only with OR - not with AND, XOR etc... of >> course) :-) >> >> Regards >> >> Rolf >> >> >> ------------------------------------------------------------------------------ >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From nando_f at ...951... Wed Apr 21 17:53:13 2010 From: nando_f at ...951... (nando) Date: Wed, 21 Apr 2010 11:53:13 -0400 Subject: [Gambas-user] serial port issue In-Reply-To: <4BCEFDC1.4090605@...1740...> References: <4BCEB7C1.2090006@...1740...> <4BCEC1B0.4070404@...1909...> <4BCEDD88.9090205@...1740...> <4BCEEC87.7080708@...1740...> <4BCEFDC1.4090605@...1740...> Message-ID: <20100421155218.M30715@...951...> I use 6 serial ports, sometimes usb mixed in, No problem in Gambas whatsoever -Fernando ---------- Original Message ----------- From: Ron To: mailing list for gambas users Sent: Wed, 21 Apr 2010 15:29:37 +0200 Subject: Re: [Gambas-user] serial port issue > I have no experience with the cable in my link, I just found it > yesterday, but make sure your usb to serial converters have a FTDI chip > inside. > Not (like most of mine) an Prolific PL2303 chip since they all have the > same device id and serial number, so you have a small problem identifing > them. > > I have not installed any drivers, but I had to lock them like this: > http://www.domotiga.nl/wiki/Linux/InstallOpt#Lockserialdevicenames > > Here is an old photo of my test server showing some of them: > http://www.domotiga.nl/wiki/Domotiga/SetupPics > > Using Ubuntu 9.10 > > Regards, > Ron. > > Thanks for the info! I may need to find some reliable hardware, this can be > > an issue (the one installed by my Chinese informatics colleague doesn't give > > me too much confidence :-) > > > > Did you have to install any driver to get it working? > > > > Robi > > > > 2010/4/21 Ron > > > > > >> I use a ten ports usb hub and seperate usb to serial cables. > >> I have written some udev rules to lock the serial device names to the > >> physical ports.. otherwise they change after a reboot. > >> > >> To bad I just found these guys afterwards: > >> http://www.picco.nl/product_info.php?products_id=2338 > >> > >> Regards, > >> Ron. > >> > >>> Ron, > >>> > >>> I mean that the app doesn't do what I wish him to do :-) > >>> Unfortunately it works as expected with the serial port on the > >>> > >> motherboard > >> > >>> (ttyS0, same equipment connected, same data sent and should have been > >>> received) so it should not be a bug in my code. > >>> The connection parameters (including Xon/Xoff) are required by the > >>> > >> equipment > >> > >>> I use. > >>> > >>> Physically, how did you connect 10 serial ports to your machine? With a > >>> > >> card > >> > >>> or do you use virtual ports with USB connector? > >>> > >>> Robi > >>> > >>> 2010/4/21 Ron > >>> > >>> > >>> > >>>> You mean crashing like in signal #11 core dump or the application > >>>> doesn't do what's wanted? > >>>> > >>>> Which version of Gambas? > >>>> > >>>> There where a few serial port related bug fixes. > >>>> http://gambas.sourceforge.net/en/changelog2.html > >>>> > >>>> I use a lot (10) serial ports in my gambas app. 24/7 but I do not use > >>>> xon/off. > >>>> > >>>> Regards, > >>>> Ron. > >>>> > >>>> > >>>>> The communication parameters are 9600, 8, n, 1, Xon/Xoff. > >>>>> > >>>>> 2010/4/21 Doriano Blengino > >>>>> > >>>>> > >>>>> > >>>>> > >>>>>> Robert JUHASZ ha scritto: > >>>>>> > >>>>>> > >>>>>> > >>>>>>> All the parameters are the same obtained by autoconfig, except the > >>>>>>> > >> UART > >> > >>>>>>> which was undefined for the added ports. > >>>>>>> I set this parameter to the same value as for the working one: 16550A > >>>>>>> > >>>>>>> > >>>> (in > >>>> > >>>> > >>>>>>> fact I tried all the possible UART parameters and where the port was > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>> working > >>>>>> > >>>>>> > >>>>>> > >>>>>>> it behaves always the same: short test messages pass but in the real > >>>>>>> > >>>>>>> > >>>> work > >>>> > >>>> > >>>>>>> environment it crashes). > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>> Do you have some sort of handshaking? > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >> ------------------------------------------------------------------------------ > >> > >>>>>> _______________________________________________ > >>>>>> Gambas-user mailing list > >>>>>> Gambas-user at lists.sourceforge.net > >>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >> ------------------------------------------------------------------------------ > >> > >>>>> _______________________________________________ > >>>>> Gambas-user mailing list > >>>>> Gambas-user at lists.sourceforge.net > >>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user > >>>>> > >>>>> > >>>>> > >>>> > >> ------------------------------------------------------------------------------ > >> > >>>> _______________________________________________ > >>>> Gambas-user mailing list > >>>> Gambas-user at lists.sourceforge.net > >>>> https://lists.sourceforge.net/lists/listinfo/gambas-user > >>>> > >>>> > >>>> > >> ------------------------------------------------------------------------------ > >> > >>> _______________________________________________ > >>> Gambas-user mailing list > >>> Gambas-user at lists.sourceforge.net > >>> https://lists.sourceforge.net/lists/listinfo/gambas-user > >>> > >>> > >> > >> ------------------------------------------------------------------------------ > >> _______________________________________________ > >> Gambas-user mailing list > >> Gambas-user at lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/gambas-user > >> > >> > > ------------------------------------------------------------------------------ > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user ------- End of Original Message ------- From zelimir_ikovic at ...43... Wed Apr 21 18:14:08 2010 From: zelimir_ikovic at ...43... (Zelimir Ikovic) Date: Wed, 21 Apr 2010 09:14:08 -0700 (PDT) Subject: [Gambas-user] Please help Message-ID: <97484.29937.qm@...2414...> http://code.google.com/p/domotiga-livecd/downloads/list When I download Live CD there is 8 files, what is next to do From dunworthsys at ...626... Wed Apr 21 19:22:44 2010 From: dunworthsys at ...626... (Chris Dunworth) Date: Wed, 21 Apr 2010 18:22:44 +0100 Subject: [Gambas-user] serial port issue (Robert JUHASZ) Message-ID: Hi, Have you looked at device/terminal servers such as 'nport server' from MOXA http://www.moxa.com/product/NPort_5410.htm These devices facilitate RS232 serial comms with devices using TCP/IP sockets. Very useful where application does not have serial drivers Not cheap , but very flexible & expandable. However if you have existing hardware ............... Chris From joshiggins at ...1601... Wed Apr 21 19:29:31 2010 From: joshiggins at ...1601... (Joshua Higgins) Date: Wed, 21 Apr 2010 18:29:31 +0100 Subject: [Gambas-user] Please help In-Reply-To: <97484.29937.qm@...2414...> References: <97484.29937.qm@...2414...> Message-ID: The CD image is split up into multiple RAR archives. You'll need to install unrar to be able to extract it and get the image file from inside. On 21 April 2010 17:14, Zelimir Ikovic wrote: > http://code.google.com/p/domotiga-livecd/downloads/list > > When I download Live CD there is 8 files, what is next to do > > > > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- joshua higgins >>>>>>------ From sourceforge-raindog2 at ...94... Wed Apr 21 19:31:28 2010 From: sourceforge-raindog2 at ...94... (Rob) Date: Wed, 21 Apr 2010 13:31:28 -0400 Subject: [Gambas-user] Please help In-Reply-To: <97484.29937.qm@...2414...> References: <97484.29937.qm@...2414...> Message-ID: <201004211331.28540.sourceforge-raindog2@...94...> On Wednesday 21 April 2010 12:14 pm, Zelimir Ikovic wrote: > http://code.google.com/p/domotiga-livecd/downloads/list > When I download Live CD there is 8 files, what is next to do I can't tell what operating system you're using, so here are a few guesses. In Ubuntu, you would install "unrar" in System/Administration/Synaptic package manager, open the folder into which you downloaded the files, and double click the first file. In the window that comes up should be the CD image. Drag that into another folder, right click on it, and select "Write to Disc". If you're running Windows, you'll want to google for 7zip (I think it's www.7-zip.org), download and install it. Open the folder into which you downloaded the files, and double click the first file. In the window that comes up should be the CD image. Drag that into another folder. Unfortunately, I don't know what Windows software is best to use for burning CD images to disc, so you'd have to google around for that. Rob From gambas.fr at ...626... Wed Apr 21 22:16:18 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Wed, 21 Apr 2010 22:16:18 +0200 Subject: [Gambas-user] User components in Gambas 3 In-Reply-To: References: <201004202240.02466.gambas@...1...> Message-ID: and there is a way to dynamiquely add these dependence during the execution ... i meen use this 'library' like dynamic plugins ? I've in mind some projects that will need that. so it need a way to list, linked library, and load new one at runtime. 2010/4/21 Ian Haywood : > 2010/4/21 Beno?t Minisini : > >> - At run time, the associated projects will be searched by using the $PATH >> environmental variable, as any other executables. > Not sure about $PATH: gambas components/libraries generally won't be > in the same directories as general system > executables, and vice versa. I'd consider a specific variable, say > $GAMBASPATH (in the same pattern as Python's $PYTHONPATH and Java's > $CLASSPATH) > > If this variable doesn't exist, the interpreter should search a > hardwired set of directories, which may vary by distro, on Debian and > like systems it would be > .:/usr/lib/gambas/:/usr/local/lib/gambas/ > >> - When creating the main project packages, it will be easy to add a dependency >> on the associated project packages. > What would be nice is for the IDE to scan the $GAMBASPATH and list the > installed libraries available. Ideally this would be a common > system for both 'standard' and third-party libraries. > It would mean some fields within the library binary format to store a > small amount of metadata (say a one-paragraph description, a licence > and a URL to their API documentation) > >> Maybe "library" would be a good term... > Yep, "library" is good. > > Ian > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas.fr at ...626... Wed Apr 21 22:18:49 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Wed, 21 Apr 2010 22:18:49 +0200 Subject: [Gambas-user] smtp question In-Reply-To: <201004202247.04568.gambas@...1...> References: <1271795878.4bce10a64a045@...1589...> <201004202242.47848.gambas@...1...> <201004202247.04568.gambas@...1...> Message-ID: i need to do some test on the server with direct connection Le 20 avril 2010 22:47, Beno?t Minisini a ?crit : >> > Hi everyone! >> > >> > Any idea when the smtpclient work with password property?? >> > I need send email on my program. >> > Any idea about?? Other method??? >> > >> > Tks >> >> That was implemented a few days ago in Gambas 3 (revision #2866). Fabien >> had some problem with it, but I couldn't find why. It works there! > > Not all authentication method were implemented: only PLAIN with TLS or SSL for > the crypting. > > Regards, > > -- > Beno?t Minisini > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From dickfrost at ...2291... Wed Apr 21 22:35:46 2010 From: dickfrost at ...2291... (Richard Frost) Date: Wed, 21 Apr 2010 16:35:46 -0400 Subject: [Gambas-user] Gambas3 - file or directory does not exist (run error) Message-ID: <4BCF61A2.9010007@...2291...> I am using Ubuntu Karmic, and just tried to update to the most recent svn Gambas3 version (2906) .... compile appears OK, but when I try to run it I get: CRecentFile._new.15: #45: File or directory does not exist 0: CRecentFile._new.15 1: CRecentFile.Load.82 2: Project.Mail.199 I had installed an older version last fall which had been working OK ... Thanks for any help, Dick Frost From gambas.fr at ...626... Wed Apr 21 22:55:04 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Wed, 21 Apr 2010 22:55:04 +0200 Subject: [Gambas-user] smtp question In-Reply-To: References: <1271795878.4bce10a64a045@...1589...> <201004202242.47848.gambas@...1...> <201004202247.04568.gambas@...1...> Message-ID: ok i've found the problem on the server ... it was my fault ... the curl version was too old ... 2010/4/21 Fabien Bodard : > i need to do some test on the server with direct connection > > > Le 20 avril 2010 22:47, Beno?t Minisini a ?crit : >>> > Hi everyone! >>> > >>> > Any idea when the smtpclient work with password property?? >>> > I need send email on my program. >>> > Any idea about?? Other method??? >>> > >>> > Tks >>> >>> That was implemented a few days ago in Gambas 3 (revision #2866). Fabien >>> had some problem with it, but I couldn't find why. It works there! >> >> Not all authentication method were implemented: only PLAIN with TLS or SSL for >> the crypting. >> >> Regards, >> >> -- >> Beno?t Minisini >> >> ------------------------------------------------------------------------------ >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > From gambas.fr at ...626... Wed Apr 21 22:55:27 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Wed, 21 Apr 2010 22:55:27 +0200 Subject: [Gambas-user] smtp question In-Reply-To: References: <1271795878.4bce10a64a045@...1589...> <201004202242.47848.gambas@...1...> <201004202247.04568.gambas@...1...> Message-ID: all work fine. 2010/4/21 Fabien Bodard : > ok i've found the problem on the server ... it was my fault ... the > curl version was too old ... > > > 2010/4/21 Fabien Bodard : >> i need to do some test on the server with direct connection >> >> >> Le 20 avril 2010 22:47, Beno?t Minisini a ?crit : >>>> > Hi everyone! >>>> > >>>> > Any idea when the smtpclient work with password property?? >>>> > I need send email on my program. >>>> > Any idea about?? Other method??? >>>> > >>>> > Tks >>>> >>>> That was implemented a few days ago in Gambas 3 (revision #2866). Fabien >>>> had some problem with it, but I couldn't find why. It works there! >>> >>> Not all authentication method were implemented: only PLAIN with TLS or SSL for >>> the crypting. >>> >>> Regards, >>> >>> -- >>> Beno?t Minisini >>> >>> ------------------------------------------------------------------------------ >>> _______________________________________________ >>> Gambas-user mailing list >>> Gambas-user at lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>> >> > From prog at ...2177... Thu Apr 22 00:27:11 2010 From: prog at ...2177... (craf) Date: Wed, 21 Apr 2010 18:27:11 -0400 Subject: [Gambas-user] Problem with directory /lib In-Reply-To: <201004201109.08824.gambas@...1...> References: <1271690132.2028.7.camel@...2406...> <1271722196.2028.27.camel@...2406...> <201004201109.08824.gambas@...1...> Message-ID: <1271888831.1964.4.camel@...2406...> -----Mensaje original----- De: Beno?t Minisini Reply-to: mailing list for gambas users Para: mailing list for gambas users Asunto: Re: [Gambas-user] Problem with directory /lib Fecha: Tue, 20 Apr 2010 11:09:08 +0200 > -----Mensaje original----- > De: craf > Reply-to: mailing list for gambas users > > Para: Lista Gambas Ingles > Asunto: [Gambas-user] Problem with directory /lib > Fecha: Mon, 19 Apr 2010 11:15:32 -0400 > > >Hi. > > > >I managed to install a console program compiled on Ubuntu 9.04 to Ubuntu > >8.04, using shared libraries. > >The problem is with a program that uses the GTK or QT library, and they > >require the libraries that are in the lib folder, and take into account > >that come with the PC and not those that are packaged with the project. > >Example. If I provide shared libraries are located in the lib folder, > >should be exported with the following: > > > >export LD_LIBRARY_PATH > >=/opt/proyect/gambas2/lib_shared/lib:/opt/proyect/gambas2/lib_shared/usr/l > >ib > > > >The path /usr/lib is taken into account, but the path /lib, and take the > >PC where you are installing the program. > > > >I also tested: > > > >export LD_LIBRARY_PATH = > >$LD_LIBRARY_PATH:/opt/proyect/gambas2/lib_shared/lib:/opt/proyect/gambas2/ > >lib_shared/usr/lib > > > >export LD_LIBRARY_PATH > >=/opt/proyect/gambas2/lib_shared/lib:/opt/proyect/gambas2/lib_shared/usr/l > >ib:$LD_LIBRARY_PATH > > > >but nothing... > > > >Is there any way to force you to take the path /lib specified in the > >file .sh by one and not the PC? > > > >Regards > >-------------------------------------------------------------------------- > >---- Download Intel® Parallel Studio Eval > >Try the new software tools for yourself. Speed compiling, find bugs > >proactively, and fine-tune applications for parallel performance. > >See why Intel Parallel Studio got high marks during beta. > >http://p.sf.net/sfu/intel-sw-dev > >_______________________________________________ > >Gambas-user mailing list > >Gambas-user at lists.sourceforge.net > >https://lists.sourceforge.net/lists/listinfo/gambas-user > > Hi. > > Searching the Internet the reason why the put the path to the > folder /lib in the LD_LIBRARY_PATH variable is not taken into account, > if you take into account the /lib of the computer where the program is > being installed with shared libraries. > > He added explanation found: > > ---------------------------------------------------------------------- > "It is very possible to have multiple versions of glibc on the same > system (we do that every day). > > However, you need to know that glibc consists of many pieces (200+ > shared libraries) which all must match. One of the pieces is > ld-linux.so.2, and it must match libc.so.6, or you'll see the errors you > are seeing. > > The absolute path to ld-linux.so.2 is hard-coded into the executable at > link time, and can not be easily changed after the link is done.<---THAT > IS THE PROBLEM??? > > To build an executable that will work with the new glibc, do this: > > g++ main.o -o myapp ... \ > -Wl,-rpath=/path/to/newglibc \ > -Wl,-dynamic-linker=/path/to/newglibc/ld-linux.so.2 > > The -rpath linker option will make the runtime loader search for > libraries in /path/to/newglibc (so you wouldn't have to set > LD_LIBRARY_PATH before running it), and the -dynamic-linker option will > "bake" path to correct ld-linux.so.2 into the application." > > source:http://stackoverflow.com/questions/847179/multiple-glibc-libraries-o > n-a-single-host/851229#851229 > -------------------------------------------------------------------------- > -------------- > > In short, if I want to be transported for example ld-linux.so.2 file > from a computer with Ubuntu 9.10 to another distribution that does not > have the same version. I can only do so if at compile Gambas added > routes where I have copied my shared libraries, so that then can be > called with the variable LD_LIBRARY_PATH. > > Now, I saw also that you can use the LD_PRELOAD variable, Can I use?. > > Regards. > >So I suggest that you always use the glibc stuff of the target system >(libc.so, ld-linux.so, libffi.so...), and provide the other shared libraries >only. >Apparently only the ld-linux.so path is hardcoded (at least on my Mandriva), >and points at /lib. I think this should be the path used by all distributions, >so that should not be the problem. All other shared libraries used by the >interpreter are resolved at runtime. >$ ldd gbx3 > linux-gate.so.1 => (0xffffe000) > libm.so.6 => /lib/i686/libm.so.6 (0xb786e000) > libintl.so.8 => /lib/libintl.so.8 (0xb7863000) > libc.so.6 => /lib/i686/libc.so.6 (0xb7702000) > libdl.so.2 => /lib/libdl.so.2 (0xb76fd000) > libpthread.so.0 => /lib/i686/libpthread.so.0 (0xb76e2000) > libffi.so.5 => /usr/lib/libffi.so.5 (0xb76db000) > /lib/ld-linux.so.2 (0xb78b5000) >Regards, Thanks for the information Benoit. As you say it is better to use the glibc team where you are installing the program. The problem that arises is that in my case, the component gb.gtk.so needs libgio-2.0.so library, which in turn requires libc.so.6 GLIBC 2.9 or 2.10. On the computer I want to install the program libc.so.6 points to an older version of GLIBC, 2.7. Is there any way to change the link that points to the old version of libc.so.6, or definitely have to compile with the new library.? I tried the LD_PRELOAD variable without success. Regards From ronstk at ...239... Thu Apr 22 10:13:54 2010 From: ronstk at ...239... (Ron_1st) Date: Thu, 22 Apr 2010 09:13:54 +0100 Subject: [Gambas-user] TextBox and CR In-Reply-To: <201004211204.08122.gambas@...1...> References: <4BCD5AED.8010907@...221...> <201004211159.31706.ronstk@...239...> <201004211204.08122.gambas@...1...> Message-ID: <201004221013.54235.ronstk@...239...> On Wednesday 21 April 2010, Beno?t Minisini wrote: > > 24 character LCD display that need that WAIT. > > > > Why do you need to call WAIT? You should only use it when you want to refresh > your GUI during some heavy processin. Otherwise, if you should use SLEEP. > > Regards, > > -- > Beno?t Minisini > OK. I need the sleep to tell the interface in first byte what to do with second byte It needs some time to interpret the first byte and send some info back. The wait is to update the screen and then send th secon byte. Just as a possible/hypo way there could be time for the second keypress. When the event manager does not fire new events before the current subroutine has ended then I asume no problem. But alway better to prevent then try to find why o why it does not work anymore after a update of some component. (maybe this is from my very old multy tread VB findings in the past) Best regards, Ron_1st -- From bill-lancaster at ...2231... Thu Apr 22 18:08:20 2010 From: bill-lancaster at ...2231... (Bill-Lancaster) Date: Thu, 22 Apr 2010 09:08:20 -0700 (PDT) Subject: [Gambas-user] Gambas in background In-Reply-To: <1271859717.3459.62.camel@...2413...> References: <28287978.post@...1379...> <1271856716.3459.31.camel@...2413...> <201004211607.30694.gambas@...1...> <1271859717.3459.62.camel@...2413...> Message-ID: <28331072.post@...1379...> Dear Caveat & Benoit - fantastic, just what I needed Thanks Bill Lancaster -- View this message in context: http://old.nabble.com/Gambas-in-background-tp28287978p28331072.html Sent from the gambas-user mailing list archive at Nabble.com. From matteo.pasotti at ...626... Thu Apr 22 20:04:49 2010 From: matteo.pasotti at ...626... (Matteo Pasotti) Date: Thu, 22 Apr 2010 20:04:49 +0200 Subject: [Gambas-user] Compiling Gambas3 on Fedora 12 In-Reply-To: <201004210312.12941.gambas@...1...> References: <4BCC9F7D.7000204@...626...> <201004210208.25909.gambas@...1...> <4BCE4C05.3070202@...626...> <201004210312.12941.gambas@...1...> Message-ID: <4BD08FC1.9040206@...626...> Il 21/04/2010 03:12, Beno?t Minisini ha scritto: > > If you want to create a "Fedora" page at http://gambasdoc.org/help/install, do > not hesitate! > > Regards, > > Hi Beno?t, I've made the request to have access to the documentation wiki but I didn't received any reply. I've sent the email to gambas at ...1... with the required subject. What am I missing? If I can't access the wiki, I can send to you the compilation instructions for fedora. It makes no differences to me. Regards -- Matteo From gambas at ...1... Thu Apr 22 23:16:22 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Thu, 22 Apr 2010 23:16:22 +0200 Subject: [Gambas-user] Compiling Gambas3 on Fedora 12 In-Reply-To: <4BD08FC1.9040206@...626...> References: <4BCC9F7D.7000204@...626...> <201004210312.12941.gambas@...1...> <4BD08FC1.9040206@...626...> Message-ID: <201004222316.22264.gambas@...1...> > Il 21/04/2010 03:12, Beno?t Minisini ha scritto: > > If you want to create a "Fedora" page at > > http://gambasdoc.org/help/install, do not hesitate! > > > > Regards, > > Hi Beno?t, > I've made the request to have access to the documentation wiki but I > didn't received any reply. > I've sent the email to gambas at ...1... with the required > subject. > What am I missing? > If I can't access the wiki, I can send to you the compilation > instructions for fedora. It makes no differences to me. > Regards I was working all the day, so I didn't had the time to create your account until now. You should receive it soon! Regards, -- Beno?t Minisini From eilert-sprachen at ...221... Fri Apr 23 08:09:42 2010 From: eilert-sprachen at ...221... (Rolf-Werner Eilert) Date: Fri, 23 Apr 2010 08:09:42 +0200 Subject: [Gambas-user] Gambas in background In-Reply-To: <28331072.post@...1379...> References: <28287978.post@...1379...> <1271856716.3459.31.camel@...2413...> <201004211607.30694.gambas@...1...> <1271859717.3459.62.camel@...2413...> <28331072.post@...1379...> Message-ID: <4BD139A6.9040700@...221...> Am 22.04.2010 18:08, schrieb Bill-Lancaster: > > Dear Caveat& Benoit - fantastic, just what I needed > Thanks > Bill Lancaster Maybe we should include this to the examples - that way it might help more folks... :-) Regards Rolf From david.villalobos.c at ...626... Fri Apr 23 18:31:21 2010 From: david.villalobos.c at ...626... (David Villalobos Cambronero) Date: Fri, 23 Apr 2010 10:31:21 -0600 Subject: [Gambas-user] Find a ( with a Regexp Message-ID: Hi, I need to find a ( with an a Regexp. Does anybody knows how to? I've tried but I could not :( -- Regards --- David From jussi.lahtinen at ...626... Fri Apr 23 20:18:38 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Fri, 23 Apr 2010 21:18:38 +0300 Subject: [Gambas-user] Find a ( with a Regexp In-Reply-To: References: Message-ID: Please elaborate... you can't use InStr() ? Jussi 2010/4/23 David Villalobos Cambronero : > Hi, I need to find a ( with an a Regexp. > > Does anybody knows how to? I've tried but I could not :( > > -- > Regards > --- > David > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From david.villalobos.c at ...626... Fri Apr 23 21:43:33 2010 From: david.villalobos.c at ...626... (David Villalobos Cambronero) Date: Fri, 23 Apr 2010 13:43:33 -0600 Subject: [Gambas-user] Find a ( with a Regexp In-Reply-To: References: Message-ID: No, it has to be inside a Regexp $hRexEpr = New Regexp($sLineSymbol, "^function \(") But it does no work :( -- Gracias --- David From jussi.lahtinen at ...626... Sat Apr 24 00:11:39 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sat, 24 Apr 2010 01:11:39 +0300 Subject: [Gambas-user] Find a ( with a Regexp In-Reply-To: References: Message-ID: Component status is experimental... maybe there are bug? Jussi On Fri, Apr 23, 2010 at 22:43, David Villalobos Cambronero wrote: > No, it has to be inside a Regexp > > $hRexEpr = New Regexp($sLineSymbol, "^function \(") > > But it does no work :( > > -- > Gracias > --- > David > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas at ...1... Sat Apr 24 00:17:39 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sat, 24 Apr 2010 00:17:39 +0200 Subject: [Gambas-user] Find a ( with a Regexp In-Reply-To: References: Message-ID: <201004240017.39303.gambas@...1...> > Component status is experimental... maybe there are bug? > > Jussi > > On Fri, Apr 23, 2010 at 22:43, David Villalobos Cambronero > > wrote: > > No, it has to be inside a Regexp > > > > $hRexEpr = New Regexp($sLineSymbol, "^function \(") > > > > But it does no work :( > > > > -- > > Gracias > > --- > > David \( is Gambas quoting, the regexp does not see it. To use regexp quoting you must quote the slash too: $hRegEpr = New Regexp($sLineSymbol, "^function \\(") Regards, -- Beno?t Minisini From svitoos at ...626... Sun Apr 25 08:48:54 2010 From: svitoos at ...626... (sviroos) Date: Sun, 25 Apr 2010 10:48:54 +0400 Subject: [Gambas-user] When you use RETURN the FINALLY block not start In-Reply-To: <4BCB709D.9070609@...1909...> References: <4BCA3D93.3040607@...2415...> <4BCB5961.9040506@...2337...> <4BCB709D.9070609@...1909...> Message-ID: <201004251048.55845.svitoos@...626...> Code: ' Gambas module file PUBLIC SUB Main() PRINT F1() PRINT F2() PRINT "END" END SUB F1() AS Integer PRINT "F1" FINALLY PRINT "F1-FIANLLY" END SUB F2() AS Integer PRINT "F2" RETURN 2 FINALLY PRINT "F2-FIANLLY" END Output: F1 F1-FINALLY 0 F2 2 END bug or a feature? From gambas at ...1... Sun Apr 25 12:34:38 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sun, 25 Apr 2010 12:34:38 +0200 Subject: [Gambas-user] When you use RETURN the FINALLY block not start In-Reply-To: <201004251048.55845.svitoos@...626...> References: <4BCA3D93.3040607@...2415...> <4BCB709D.9070609@...1909...> <201004251048.55845.svitoos@...626...> Message-ID: <201004251234.38263.gambas@...1...> > Code: > ' Gambas module file > > PUBLIC SUB Main() > PRINT F1() > PRINT F2() > PRINT "END" > END > > SUB F1() AS Integer > PRINT "F1" > FINALLY > PRINT "F1-FIANLLY" > END > > SUB F2() AS Integer > PRINT "F2" > RETURN 2 > FINALLY > PRINT "F2-FIANLLY" > END > > Output: > F1 > F1-FINALLY > 0 > F2 > 2 > END > > bug or a feature? > Feature ! RETURN is stronger than anything. You must put it inside the FINALLY block. Regards, -- Beno?t Minisini From jussi.lahtinen at ...626... Sun Apr 25 14:43:09 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sun, 25 Apr 2010 15:43:09 +0300 Subject: [Gambas-user] When you use RETURN the FINALLY block not start In-Reply-To: <201004251234.38263.gambas@...1...> References: <4BCA3D93.3040607@...2415...> <4BCB709D.9070609@...1909...> <201004251048.55845.svitoos@...626...> <201004251234.38263.gambas@...1...> Message-ID: Little bit of topic but: SUB F1() AS Integer Shouldn't this be FUNCTION? I didn't know subs can return value. New to me... Jussi 2010/4/25 Beno?t Minisini : >> Code: >> ' Gambas module file >> >> PUBLIC SUB Main() >> ? PRINT F1() >> ? PRINT F2() >> ? PRINT "END" >> END >> >> SUB F1() AS Integer >> ? PRINT "F1" >> ? FINALLY >> ? ? PRINT "F1-FIANLLY" >> END >> >> SUB F2() AS Integer >> ? PRINT "F2" >> ? RETURN 2 >> ? FINALLY >> ? ? PRINT "F2-FIANLLY" >> END >> >> Output: >> F1 >> F1-FINALLY >> 0 >> F2 >> 2 >> END >> >> ?bug or a feature? >> > > Feature ! RETURN is stronger than anything. You must put it inside the FINALLY > block. > > Regards, > > -- > Beno?t Minisini > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas at ...1... Sun Apr 25 18:50:38 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sun, 25 Apr 2010 18:50:38 +0200 Subject: [Gambas-user] "User components" replaced by "Libraries" in Gambas 3 Message-ID: <201004251850.38369.gambas@...1...> Hi, In the last revision, I added the implementation of "libraries" in Gambas 3. That libraries completely replace the "user components" concept of Gambas 2. How does it work? You have a new tab named "libraries" in the IDE project property dialog. In that tab, you can define a list of gambas executables (*.gambas files) that will be used as libraries. When adding a library to a project, the IDE will extract from it all the information needed for the automatic completion, as for the normal components. These libraries will be loaded at program startup by the interpreter exactly like any component written in Gambas. When your project in run in debugging mode, i.e. from the IDE, the libraries are located by using the absolute path specified in the project property dialog. But when running the project normally, the library is searched in the following directory only: - The same directory as the project. - /usr/bin - /bin So, a Gambas executable that must act as a library for another program must be installed in /bin, /usr/bin, or in the same directory as the program using it. Now I'm waiting for your comments about this new feature! Regards, -- Beno?t Minisini From jussi.lahtinen at ...626... Sun Apr 25 19:06:38 2010 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sun, 25 Apr 2010 20:06:38 +0300 Subject: [Gambas-user] Problem with float value Message-ID: Hi! I have problem with my code, there is point where x = rx[31-ii] should be true, but it's not. So I added this for debug (variables x and rx are float and ii is integer): Print x - rx[31 - ii] Print rx[31 - ii] Print x Result: 1.110223024625E-16 0.377913931573 0.377913931573 So, I tried this: Print x - rx[31 - ii] Print Format$(rx[31 - ii], "#.###########################") Print Format$(x, "#.###########################") Result: 1.110223024625E-16 .377913931572549 .377913931572549 So, I guess my problem is how to print whole content of float variable? Mean while I'm trying to guess where is my error with math... Jussi Gambas3 rev 2879 Ubuntu 9.10 64bit From gambas at ...1... Sun Apr 25 19:53:25 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sun, 25 Apr 2010 19:53:25 +0200 Subject: [Gambas-user] Problem with float value In-Reply-To: References: Message-ID: <201004251953.25766.gambas@...1...> > Hi! > I have problem with my code, there is point where x = rx[31-ii] should > be true, but it's not. > So I added this for debug (variables x and rx are float and ii is integer): > > Print x - rx[31 - ii] > Print rx[31 - ii] > Print x > > Result: > 1.110223024625E-16 > 0.377913931573 > 0.377913931573 > > So, I tried this: > Print x - rx[31 - ii] > Print Format$(rx[31 - ii], "#.###########################") > Print Format$(x, "#.###########################") > > Result: > 1.110223024625E-16 > .377913931572549 > .377913931572549 > > So, I guess my problem is how to print whole content of float variable? > Mean while I'm trying to guess where is my error with math... > > Jussi > Gambas3 rev 2879 > Ubuntu 9.10 64bit > Format$() does not print more digits than the precision given by the Float format. But as floating point numbers are stored in binary, the precision is actually a bit greater. So I will add one more possible digit in the next revision, and you will be able to see that the two numbers you thought equal actually differ by the 16th digit. Regards, -- Beno?t Minisini From svitoos at ...626... Sun Apr 25 21:02:10 2010 From: svitoos at ...626... (svitoos) Date: Sun, 25 Apr 2010 23:02:10 +0400 Subject: [Gambas-user] "User components" replaced by "Libraries" in Gambas 3 In-Reply-To: <201004251850.38369.gambas@...1...> References: <201004251850.38369.gambas@...1...> Message-ID: <201004252302.10722.svitoos@...626...> On Sunday 25 April 2010 20:50:38 Beno?t Minisini wrote: > You have a new tab named "libraries" in the IDE project property dialog. In > that tab, you can define a list of gambas executables (*.gambas files) that > will be used as libraries. > > When adding a library to a project, the IDE will extract from it all the > information needed for the automatic completion, as for the normal > components. > > These libraries will be loaded at program startup by the interpreter > exactly like any component written in Gambas. > This is very good. The *.info and *.list files will be included in the library files? > But when running the project normally, the library is searched in the > following directory only: > - The same directory as the project. > - /usr/bin > - /bin > > So, a Gambas executable that must act as a library for another program must > be installed in /bin, /usr/bin, or in the same directory as the program > using it. I think it is better to look for libraries in the directories listed in GB3_LIBRARY_PATH, and if this variable is not defined then "/usr/lib/gambas3:/usr/local/lib/gambas3":~/.local/lib/gambas3 From gambas at ...1... Sun Apr 25 21:38:19 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sun, 25 Apr 2010 21:38:19 +0200 Subject: [Gambas-user] "User components" replaced by "Libraries" in Gambas 3 In-Reply-To: <201004252302.10722.svitoos@...626...> References: <201004251850.38369.gambas@...1...> <201004252302.10722.svitoos@...626...> Message-ID: <201004252138.19340.gambas@...1...> > On Sunday 25 April 2010 20:50:38 Beno?t Minisini wrote: > > You have a new tab named "libraries" in the IDE project property dialog. > > In that tab, you can define a list of gambas executables (*.gambas > > files) that will be used as libraries. > > > > When adding a library to a project, the IDE will extract from it all the > > information needed for the automatic completion, as for the normal > > components. > > > > These libraries will be loaded at program startup by the interpreter > > exactly like any component written in Gambas. > > This is very good. > The *.info and *.list files will be included in the library files? Yes. As soon as some of the project classes are exported, a .info and a .list file are generated by the compiler, and these files are included in the executable. The "gba3" command, which creates executable, can now extract file from an archive, if you want to check. For example, do: $ gba3 -x .list to get the .list file. > > > But when running the project normally, the library is searched in the > > following directory only: > > - The same directory as the project. > > - /usr/bin > > - /bin > > > > So, a Gambas executable that must act as a library for another program > > must be installed in /bin, /usr/bin, or in the same directory as the > > program using it. > > I think it is better to look for libraries in the directories listed in > GB3_LIBRARY_PATH, and if this variable is not defined > then "/usr/lib/gambas3:/usr/local/lib/gambas3":~/.local/lib/gambas3 > I don't want to multiply the directories where libraries must be searched for. But I agree that /usr/bin and /bin are not necessarily a good solution. As they are libraries, looking inside /lib/gambas3 may be a good solution, but Gambas executables are architecture-independant, so maybe they should go into /share? Something to thing about... -- Beno?t Minisini From dr.diesel at ...626... Mon Apr 26 00:28:20 2010 From: dr.diesel at ...626... (Dr.Diesel) Date: Sun, 25 Apr 2010 15:28:20 -0700 (PDT) Subject: [Gambas-user] Mouse Clicks become unresponsive on form? Message-ID: <28359348.post@...1379...> Running SVN 2910. After a few mouse click, either switching a few TabStrips or a few button clicks the mouse clicks become ineffective. Sometimes I can click around and one click will take, but then it drops out again. I have these components: Component=gb.image Component=gb.gtk Component=gb.form Component=gb.db Component=gb.db.form Component=gb.db.mysql Component=gb.settings Component=gb.info Component=gb.net On Fedora 12_64bit with gtk version: gtk+-devel-1.2.10-69.fc12.x86_64 gtk2-devel-2.18.9-3.fc12.x86_64 gtk2-2.18.9-3.fc12.x86_64 gtk2-devel-docs-2.18.9-3.fc12.x86_64 gtk+-1.2.10-69.fc12.x86_64 This was compiled with ./reconf-all and ./configure -C with no errors. Gambas reported that all components will be installed. I can send my project if that helps. Many Thanks! -- View this message in context: http://old.nabble.com/Mouse-Clicks-become-unresponsive-on-form--tp28359348p28359348.html Sent from the gambas-user mailing list archive at Nabble.com. From dr.diesel at ...626... Mon Apr 26 00:32:54 2010 From: dr.diesel at ...626... (Dr.Diesel) Date: Sun, 25 Apr 2010 15:32:54 -0700 (PDT) Subject: [Gambas-user] Mouse Clicks become unresponsive on form? In-Reply-To: <28359348.post@...1379...> References: <28359348.post@...1379...> Message-ID: <28359374.post@...1379...> Dr.Diesel wrote: > > Running SVN 2910. After a few mouse click, either switching a few > TabStrips or a few button clicks the mouse clicks become ineffective. > Sometimes I can click around and one click will take, but then it drops > out again. > > I have these components: > > Component=gb.image > Component=gb.gtk > Component=gb.form > Component=gb.db > Component=gb.db.form > Component=gb.db.mysql > Component=gb.settings > Component=gb.info > Component=gb.net > > On Fedora 12_64bit with gtk version: > > gtk+-devel-1.2.10-69.fc12.x86_64 > gtk2-devel-2.18.9-3.fc12.x86_64 > gtk2-2.18.9-3.fc12.x86_64 > gtk2-devel-docs-2.18.9-3.fc12.x86_64 > gtk+-1.2.10-69.fc12.x86_64 > > This was compiled with ./reconf-all and ./configure -C with no errors. > Gambas reported that all components will be installed. > > I can send my project if that helps. > > Many Thanks! > > FYI, I just thought to try qt4 and this problem is gone! So maybe some issue with gtk. -- View this message in context: http://old.nabble.com/Mouse-Clicks-become-unresponsive-on-form--tp28359348p28359374.html Sent from the gambas-user mailing list archive at Nabble.com. From ihaywood at ...1979... Mon Apr 26 02:53:22 2010 From: ihaywood at ...1979... (Ian Haywood) Date: Mon, 26 Apr 2010 10:53:22 +1000 Subject: [Gambas-user] "User components" replaced by "Libraries" in Gambas 3 In-Reply-To: <201004252138.19340.gambas@...1...> References: <201004251850.38369.gambas@...1...> <201004252302.10722.svitoos@...626...> <201004252138.19340.gambas@...1...> Message-ID: svitoos wrote: > I think it is better to look for libraries in the directories listed in > GB3_LIBRARY_PATH, and if this variable is not defined > then "/usr/lib/gambas3:/usr/local/lib/gambas3":~/.local/lib/gambas3 I think this is a good idea, because gambas should behave like other POSIX-based interpreted languages (python, ruby, perl, etc.) unless there is a good reason not to. Benoit wrote: > As they are libraries, looking inside /lib/gambas3 > may be a good solution, but Gambas executables are architecture-independant, > so maybe they should go into /share? "lib" is where python and ruby libraries go, even though technically their bytecodes are architecture-independent too, this is probably because "lib" has all the other system libraries and its more confusing to make an exception. > I don't want to multiply the directories where libraries must be searched for I think there is a good reason for the three directories suggested above. It is important to search both /usr/ and /usr/local/ to provide a clear separation between default libraries managed by the OS installation system (apt-get, rpm, or whatever) and third-party libraries installed by the system admin, plus it is useful to have a third directory under $HOME so libraries can be installed without being the superuser. Ian From gambas at ...1... Mon Apr 26 02:56:45 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 26 Apr 2010 02:56:45 +0200 Subject: [Gambas-user] Mouse Clicks become unresponsive on form? In-Reply-To: <28359348.post@...1379...> References: <28359348.post@...1379...> Message-ID: <201004260256.45730.gambas@...1...> > Running SVN 2910. After a few mouse click, either switching a few > TabStrips or a few button clicks the mouse clicks become ineffective. > Sometimes I can click around and one click will take, but then it drops > out again. > > I have these components: > > Component=gb.image > Component=gb.gtk > Component=gb.form > Component=gb.db > Component=gb.db.form > Component=gb.db.mysql > Component=gb.settings > Component=gb.info > Component=gb.net > > On Fedora 12_64bit with gtk version: > > gtk+-devel-1.2.10-69.fc12.x86_64 > gtk2-devel-2.18.9-3.fc12.x86_64 > gtk2-2.18.9-3.fc12.x86_64 > gtk2-devel-docs-2.18.9-3.fc12.x86_64 > gtk+-1.2.10-69.fc12.x86_64 > > This was compiled with ./reconf-all and ./configure -C with no errors. > Gambas reported that all components will be installed. > > I can send my project if that helps. > > Many Thanks! Yes, please send your project, and explain exactly how to reproduce the bug! Regards, -- Beno?t Minisini From doriano.blengino at ...1909... Mon Apr 26 08:19:03 2010 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Mon, 26 Apr 2010 08:19:03 +0200 Subject: [Gambas-user] "User components" replaced by "Libraries" in Gambas 3 In-Reply-To: References: <201004251850.38369.gambas@...1...> <201004252302.10722.svitoos@...626...> <201004252138.19340.gambas@...1...> Message-ID: <4BD53057.3050309@...1909...> Ian Haywood ha scritto: > svitoos wrote: > >> I think it is better to look for libraries in the directories listed in >> GB3_LIBRARY_PATH, and if this variable is not defined >> then "/usr/lib/gambas3:/usr/local/lib/gambas3":~/.local/lib/gambas3 >> > I think this is a good idea, because gambas should behave like other > POSIX-based interpreted languages (python, ruby, perl, etc.) unless > there is a good reason not to. > I agree too. > Benoit wrote: > >> As they are libraries, looking inside /lib/gambas3 >> may be a good solution, but Gambas executables are architecture-independant, >> so maybe they should go into /share? >> > > "lib" is where python and ruby libraries go, even though technically > their bytecodes are architecture-independent too, this is probably > because "lib" has all the other > system libraries and its more confusing to make an exception. > Probably I am wrong, but I don't see all this importance about keeping some files in .../share just because they are architecture independent. I don't see any advantage in this convention; it would be more logical if .../share contained files shareable by different applications on the system (and, in fact, you find many of them: icons, fonts, translations...). If so, then gambas libraries are not common to different applications - they are common to gbx3, and .../lib would be more logical. > >> I don't want to multiply the directories where libraries must be searched for >> > > I think there is a good reason for the three directories suggested above. > It is important to search both /usr/ and /usr/local/ to provide a > clear separation between default libraries managed by the OS > installation system (apt-get, rpm, or whatever) > and third-party libraries installed by the system admin, plus it is > useful to have a third directory under $HOME so libraries can be > installed without being the superuser. > > Ian > Agreed again. And now a little curiosity: would be those libraries *true* executable? I mean - I code a project with some class, and the main class contains code to test the other ones. Then I can use the project as a library, and still use it as a standalone program to test the library at any time. In addition, the project/library can be used to configure it... I mean - I use, say, an SMTP library. In my final application, instead of asking the user a lot of parameters about the network, I can simply SHELL ".../libsmtp.gambas" to let the library ask and store all the relevant parameters and preferences... Regards, Doriano From eilert-sprachen at ...221... Mon Apr 26 11:03:11 2010 From: eilert-sprachen at ...221... (Rolf-Werner Eilert) Date: Mon, 26 Apr 2010 11:03:11 +0200 Subject: [Gambas-user] Accent letters blocked Message-ID: <4BD556CF.2070708@...221...> Hi all, One of my Gambas2 projects is a simple app that lets our students learn typing. It blocks all Backspace etc. and counts keys/minute and so on. In TextArea1_KeyPress() there is this part: IF key.Control THEN 'skip Ctrl+Key STOP EVENT ELSE 'skip all those simple keys: SELECT CASE key.Code CASE key.BackSpace, key.BackTab, key.Delete STOP EVENT CASE key.Down, key.Up, key.Left, key.Right STOP EVENT CASE key.Home, key.End, key.PageDown, key.PageUp STOP EVENT CASE key.Control STOP EVENT END SELECT END IF (Everything else there is just for counting and so on) Today we found that it blocks accented keys (like in French) as well, so there is no way to type ? or ? and such... The app has been running under Gambas1 on this machine for several years, and I only upgraded it to Gambas2 couple of weeks ago. So this might be a feature of Gambas2... I cannot find anything wrong in the code above, do you see where the code blocks accents? Thanks for all your ideas! Rolf From gambas at ...1... Mon Apr 26 11:30:01 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 26 Apr 2010 11:30:01 +0200 Subject: [Gambas-user] =?utf-8?q?=22User_components=22_replaced_by_=22Libr?= =?utf-8?q?aries=22_in=09Gambas_3?= In-Reply-To: <4BD53057.3050309@...1909...> References: <201004251850.38369.gambas@...1...> <4BD53057.3050309@...1909...> Message-ID: <201004261130.01407.gambas@...1...> > Ian Haywood ha scritto: > > svitoos wrote: > >> I think it is better to look for libraries in the directories listed in > >> GB3_LIBRARY_PATH, and if this variable is not defined > >> then "/usr/lib/gambas3:/usr/local/lib/gambas3":~/.local/lib/gambas3 > > > > I think this is a good idea, because gambas should behave like other > > POSIX-based interpreted languages (python, ruby, perl, etc.) unless > > there is a good reason not to. > > I agree too. > > > Benoit wrote: > >> As they are libraries, looking inside >> prefix>/lib/gambas3 may be a good solution, but Gambas executables are > >> architecture-independant, so maybe they should go into >> installation prefix>/share? > > > > "lib" is where python and ruby libraries go, even though technically > > their bytecodes are architecture-independent too, this is probably > > because "lib" has all the other > > system libraries and its more confusing to make an exception. > > Probably I am wrong, but I don't see all this importance about keeping > some files in .../share just because they are architecture independent. > I don't see any advantage in this convention; it would be more logical > if .../share contained files shareable by different applications on the > system (and, in fact, you find many of them: icons, fonts, > translations...). If so, then gambas libraries are not common to > different applications - they are common to gbx3, and .../lib would be > more logical. > > >> I don't want to multiply the directories where libraries must be > >> searched for > > > > I think there is a good reason for the three directories suggested above. > > It is important to search both /usr/ and /usr/local/ to provide a > > clear separation between default libraries managed by the OS > > installation system (apt-get, rpm, or whatever) > > and third-party libraries installed by the system admin, plus it is > > useful to have a third directory under $HOME so libraries can be > > installed without being the superuser. > > > > Ian > > Agreed again. > > And now a little curiosity: would be those libraries *true* executable? They are. > I mean - I code a project with some class, and the main class contains > code to test the other ones. Then I can use the project as a library, > and still use it as a standalone program to test the library at any > time. In addition, the project/library can be used to configure it... I > mean - I use, say, an SMTP library. In my final application, instead of > asking the user a lot of parameters about the network, I can simply > SHELL ".../libsmtp.gambas" to let the library ask and store all the > relevant parameters and preferences... > > Regards, > Doriano > There is no difference at all between a library and a executable. A library is just an executable that is used as a component by another executable. So you can do what you want! Regards, -- Beno?t Minisini From gambas at ...1... Mon Apr 26 11:31:05 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 26 Apr 2010 11:31:05 +0200 Subject: [Gambas-user] Accent letters blocked In-Reply-To: <4BD556CF.2070708@...221...> References: <4BD556CF.2070708@...221...> Message-ID: <201004261131.05082.gambas@...1...> > Hi all, > > One of my Gambas2 projects is a simple app that lets our students learn > typing. It blocks all Backspace etc. and counts keys/minute and so on. > > In TextArea1_KeyPress() there is this part: > > IF key.Control THEN 'skip Ctrl+Key > STOP EVENT > > ELSE 'skip all those simple keys: > SELECT CASE key.Code > CASE key.BackSpace, key.BackTab, key.Delete > STOP EVENT > CASE key.Down, key.Up, key.Left, key.Right > STOP EVENT > CASE key.Home, key.End, key.PageDown, key.PageUp > STOP EVENT > CASE key.Control > STOP EVENT > END SELECT > > END IF > > (Everything else there is just for counting and so on) > > Today we found that it blocks accented keys (like in French) as well, so > there is no way to type ? or ? and such... The app has been running > under Gambas1 on this machine for several years, and I only upgraded it > to Gambas2 couple of weeks ago. So this might be a feature of Gambas2... > > I cannot find anything wrong in the code above, do you see where the > code blocks accents? > > Thanks for all your ideas! > > Rolf > Please provide the full code, and note that Key.Control has changed its meaning in Gambas 2 (it is not a key code). Regards, -- Beno?t Minisini From david.villalobos.c at ...626... Mon Apr 26 17:21:37 2010 From: david.villalobos.c at ...626... (David Villalobos Cambronero) Date: Mon, 26 Apr 2010 09:21:37 -0600 Subject: [Gambas-user] Detect a Window closed in Workspace Message-ID: Hi, I got a problem, here is the scenario: I got a WorkSpace, to this work space I add some objects, these objects inherits from Window, and basicaly has an Editor inside of them, I load a text from a file to the Editor, what I need is that when the WorkSpace tab is closed I need to check if there are modification without been saved. How can I know if the ActiveWindow of the Workspace is going to be closed? -- Regards --- David From gambas at ...1... Mon Apr 26 18:00:51 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 26 Apr 2010 18:00:51 +0200 Subject: [Gambas-user] Detect a Window closed in Workspace In-Reply-To: References: Message-ID: <201004261800.51410.gambas@...1...> > Hi, I got a problem, here is the scenario: > > I got a WorkSpace, to this work space I add some objects, these objects > inherits from Window, and basicaly has an Editor inside of them, I load a > text from a file to the Editor, what I need is that when the WorkSpace tab > is closed I need to check if there are modification without been saved. > > How can I know if the ActiveWindow of the Workspace is going to be closed? In the Close event of the window: you can check if your editor is modified there, and then you can stop the event if you want. -- Beno?t Minisini From eilert-sprachen at ...221... Mon Apr 26 18:04:09 2010 From: eilert-sprachen at ...221... (Rolf-Werner Eilert) Date: Mon, 26 Apr 2010 18:04:09 +0200 Subject: [Gambas-user] Accent letters blocked In-Reply-To: <201004261131.05082.gambas@...1...> References: <4BD556CF.2070708@...221...> <201004261131.05082.gambas@...1...> Message-ID: <4BD5B979.3080607@...221...> Am 26.04.2010 11:31, schrieb Beno?t Minisini: >> Hi all, >> >> One of my Gambas2 projects is a simple app that lets our students learn >> typing. It blocks all Backspace etc. and counts keys/minute and so on. >> >> In TextArea1_KeyPress() there is this part: >> >> IF key.Control THEN 'skip Ctrl+Key >> STOP EVENT >> >> ELSE 'skip all those simple keys: >> SELECT CASE key.Code >> CASE key.BackSpace, key.BackTab, key.Delete >> STOP EVENT >> CASE key.Down, key.Up, key.Left, key.Right >> STOP EVENT >> CASE key.Home, key.End, key.PageDown, key.PageUp >> STOP EVENT >> CASE key.Control >> STOP EVENT >> END SELECT >> >> END IF >> >> (Everything else there is just for counting and so on) >> >> Today we found that it blocks accented keys (like in French) as well, so >> there is no way to type ? or ? and such... The app has been running >> under Gambas1 on this machine for several years, and I only upgraded it >> to Gambas2 couple of weeks ago. So this might be a feature of Gambas2... >> >> I cannot find anything wrong in the code above, do you see where the >> code blocks accents? >> >> Thanks for all your ideas! >> >> Rolf >> > > Please provide the full code, and note that Key.Control has changed its > meaning in Gambas 2 (it is not a key code). > > Regards, > > Your answer pointed me to the right thing: the second CASE key.Control STOP EVENT END SELECT was somehow confusing it. No idea what let me including it here, did it have any special effect in Gambas1? Anyway, when I quote it out, the accents are there again. Thank you! Rolf From dosida at ...626... Mon Apr 26 18:17:06 2010 From: dosida at ...626... (Dimitris Anogiatis) Date: Mon, 26 Apr 2010 19:17:06 +0300 Subject: [Gambas-user] "User components" replaced by "Libraries" in Gambas 3 In-Reply-To: <201004261130.01407.gambas@...1...> References: <201004251850.38369.gambas@...1...> <4BD53057.3050309@...1909...> <201004261130.01407.gambas@...1...> Message-ID: Beno?t, Will all the controls that are gambas written, be implemented in this fashion too? if so how will the IDE distinguish between a library and a control? Regards, Dimitris 2010/4/26 Beno?t Minisini > > Ian Haywood ha scritto: > > > svitoos wrote: > > >> I think it is better to look for libraries in the directories listed > in > > >> GB3_LIBRARY_PATH, and if this variable is not defined > > >> then "/usr/lib/gambas3:/usr/local/lib/gambas3":~/.local/lib/gambas3 > > > > > > I think this is a good idea, because gambas should behave like other > > > POSIX-based interpreted languages (python, ruby, perl, etc.) unless > > > there is a good reason not to. > > > > I agree too. > > > > > Benoit wrote: > > >> As they are libraries, looking inside > >> prefix>/lib/gambas3 may be a good solution, but Gambas executables are > > >> architecture-independant, so maybe they should go into > >> installation prefix>/share? > > > > > > "lib" is where python and ruby libraries go, even though technically > > > their bytecodes are architecture-independent too, this is probably > > > because "lib" has all the other > > > system libraries and its more confusing to make an exception. > > > > Probably I am wrong, but I don't see all this importance about keeping > > some files in .../share just because they are architecture independent. > > I don't see any advantage in this convention; it would be more logical > > if .../share contained files shareable by different applications on the > > system (and, in fact, you find many of them: icons, fonts, > > translations...). If so, then gambas libraries are not common to > > different applications - they are common to gbx3, and .../lib would be > > more logical. > > > > >> I don't want to multiply the directories where libraries must be > > >> searched for > > > > > > I think there is a good reason for the three directories suggested > above. > > > It is important to search both /usr/ and /usr/local/ to provide a > > > clear separation between default libraries managed by the OS > > > installation system (apt-get, rpm, or whatever) > > > and third-party libraries installed by the system admin, plus it is > > > useful to have a third directory under $HOME so libraries can be > > > installed without being the superuser. > > > > > > Ian > > > > Agreed again. > > > > And now a little curiosity: would be those libraries *true* executable? > > They are. > > > I mean - I code a project with some class, and the main class contains > > code to test the other ones. Then I can use the project as a library, > > and still use it as a standalone program to test the library at any > > time. In addition, the project/library can be used to configure it... I > > mean - I use, say, an SMTP library. In my final application, instead of > > asking the user a lot of parameters about the network, I can simply > > SHELL ".../libsmtp.gambas" to let the library ask and store all the > > relevant parameters and preferences... > > > > Regards, > > Doriano > > > > There is no difference at all between a library and a executable. A library > is > just an executable that is used as a component by another executable. > > So you can do what you want! > > Regards, > > -- > Beno?t Minisini > > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas at ...1... Mon Apr 26 18:24:45 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 26 Apr 2010 18:24:45 +0200 Subject: [Gambas-user] "User components" replaced by "Libraries" in Gambas 3 In-Reply-To: References: <201004251850.38369.gambas@...1...> <201004261130.01407.gambas@...1...> Message-ID: <201004261824.45325.gambas@...1...> > Beno?t, > > Will all the controls that are gambas written, be implemented in this > fashion too? > if so how will the IDE distinguish between a library and a control? > > Regards, > Dimitris > Nothing changed for components written in Gambas. Components can be considered as part of the language, whereas libraries are there for the final user, so that he can easily share piece of codes between different projects. Otherwise, technically, there is almost no difference between a component written in Gambas and a library. The interpreter loads them the same way. The only difference is where they are searched for. Regards, -- Beno?t Minisini From david.villalobos.c at ...626... Mon Apr 26 18:37:45 2010 From: david.villalobos.c at ...626... (David Villalobos Cambronero) Date: Mon, 26 Apr 2010 10:37:45 -0600 Subject: [Gambas-user] Detect a Window closed in Workspace In-Reply-To: <201004261800.51410.gambas@...1...> References: <201004261800.51410.gambas@...1...> Message-ID: You will have to help out a bit more :) Here is the header of the class Added to the Workspace: ' Gambas class file Inherits Window Private $hPHPEditor As Editor Public Sub _new() Me.Arrangement = Arrange.Fill Me.Expand = True $hPHPEditor = New Editor(Me) As "PHPEditor" $hPHPEditor.Expand = True $hPHPEditor.Highlight = Highlight.Custom End Sub How do I implement the Close event in this case? -- Regards --- David From gambas at ...1... Mon Apr 26 18:51:41 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 26 Apr 2010 18:51:41 +0200 Subject: [Gambas-user] Detect a Window closed in Workspace In-Reply-To: References: <201004261800.51410.gambas@...1...> Message-ID: <201004261851.41146.gambas@...1...> > You will have to help out a bit more :) > > Here is the header of the class Added to the Workspace: > > ' Gambas class file > > Inherits Window > > Private $hPHPEditor As Editor > > Public Sub _new() > > Me.Arrangement = Arrange.Fill > Me.Expand = True > > $hPHPEditor = New Editor(Me) As "PHPEditor" > $hPHPEditor.Expand = True > $hPHPEditor.Highlight = Highlight.Custom > > End Sub > > How do I implement the Close event in this case? As any other object. When you instanciate the Window class, the object where you instanciate it becomes its event observer, provided that you specified an event handler prefix with the AS keyword. Regards, -- Beno?t Minisini From david.villalobos.c at ...626... Mon Apr 26 19:27:00 2010 From: david.villalobos.c at ...626... (David Villalobos Cambronero) Date: Mon, 26 Apr 2010 11:27:00 -0600 Subject: [Gambas-user] Detect a Window closed in Workspace In-Reply-To: <201004261851.41146.gambas@...1...> References: <201004261800.51410.gambas@...1...> <201004261851.41146.gambas@...1...> Message-ID: 2010/4/26 Beno?t Minisini > > You will have to help out a bit more :) > > > > Here is the header of the class Added to the Workspace: > > > > ' Gambas class file > > > > Inherits Window > > > > Private $hPHPEditor As Editor > > > > Public Sub _new() > > > > Me.Arrangement = Arrange.Fill > > Me.Expand = True > > > > $hPHPEditor = New Editor(Me) As "PHPEditor" > > $hPHPEditor.Expand = True > > $hPHPEditor.Highlight = Highlight.Custom > > > > End Sub > > > > How do I implement the Close event in this case? > > As any other object. When you instanciate the Window class, the object > where > you instanciate it becomes its event observer, provided that you specified > an > event handler prefix with the AS keyword. > > Regards, > > -- > Beno?t Minisini > > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > Now I got it, thanks -- Regards --- David From gambas at ...1... Mon Apr 26 23:33:41 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 26 Apr 2010 23:33:41 +0200 Subject: [Gambas-user] Mouse Clicks become unresponsive on form? In-Reply-To: <28359348.post@...1379...> References: <28359348.post@...1379...> Message-ID: <201004262333.41177.gambas@...1...> > Running SVN 2910. After a few mouse click, either switching a few > TabStrips or a few button clicks the mouse clicks become ineffective. > Sometimes I can click around and one click will take, but then it drops > out again. > > I have these components: > > Component=gb.image > Component=gb.gtk > Component=gb.form > Component=gb.db > Component=gb.db.form > Component=gb.db.mysql > Component=gb.settings > Component=gb.info > Component=gb.net > > On Fedora 12_64bit with gtk version: > > gtk+-devel-1.2.10-69.fc12.x86_64 > gtk2-devel-2.18.9-3.fc12.x86_64 > gtk2-2.18.9-3.fc12.x86_64 > gtk2-devel-docs-2.18.9-3.fc12.x86_64 > gtk+-1.2.10-69.fc12.x86_64 > > This was compiled with ./reconf-all and ./configure -C with no errors. > Gambas reported that all components will be installed. > > I can send my project if that helps. > > Many Thanks! Your main form has the Type property set to "Menu". It should be set to "Normal". Can you try with the Type property set to "Normal", and tell me if you have strange click behaviour again? -- Beno?t Minisini From jmcbride at ...2309... Tue Apr 27 00:11:30 2010 From: jmcbride at ...2309... (Jerry McBride) Date: Mon, 26 Apr 2010 18:11:30 -0400 Subject: [Gambas-user] GamBas3 Message-ID: <201004261811.30792.jmcbride@...2309...> A question for you all... :') Just "how usable" is Gambas3? I'm being pushed into dropping Gambas2 due to kde3 and qt3 being deprecated in Gentoo. My only option is to move into Gambas 3.0... and I need to know, just how usable is it? -- ***************************************************************************** From the desk of: Jerome D. McBride 18:09:21 up 32 days, 39 min, 2 users, load average: 0.07, 0.04, 0.00 ***************************************************************************** From dr.diesel at ...626... Tue Apr 27 00:49:20 2010 From: dr.diesel at ...626... (Dr.Diesel) Date: Mon, 26 Apr 2010 15:49:20 -0700 (PDT) Subject: [Gambas-user] Mouse Clicks become unresponsive on form? In-Reply-To: <201004262333.41177.gambas@...1...> References: <28359348.post@...1379...> <201004262333.41177.gambas@...1...> Message-ID: <28370555.post@...1379...> Beno?t Minisini wrote: > >> Running SVN 2910. After a few mouse click, either switching a few > >> >> Many Thanks! > > Your main form has the Type property set to "Menu". It should be set to > "Normal". > > Can you try with the Type property set to "Normal", and tell me if you > have > strange click behaviour again? > > -- > Beno?t Minisini > Yes, still have the same mouse problem with gtk after setting main form type to Normal. Thanks -- View this message in context: http://old.nabble.com/Mouse-Clicks-become-unresponsive-on-form--tp28359348p28370555.html Sent from the gambas-user mailing list archive at Nabble.com. From gambas at ...1... Tue Apr 27 00:58:17 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 27 Apr 2010 00:58:17 +0200 Subject: [Gambas-user] Mouse Clicks become unresponsive on form? In-Reply-To: <28370555.post@...1379...> References: <28359348.post@...1379...> <201004262333.41177.gambas@...1...> <28370555.post@...1379...> Message-ID: <201004270058.17435.gambas@...1...> > Beno?t Minisini wrote: > >> Running SVN 2910. After a few mouse click, either switching a few > >> > >> > >> Many Thanks! > > > > Your main form has the Type property set to "Menu". It should be set to > > "Normal". > > > > Can you try with the Type property set to "Normal", and tell me if you > > have > > strange click behaviour again? > > Yes, still have the same mouse problem with gtk after setting main form > type to Normal. > > Thanks I can't see any problem: can you depict it more precisely please? -- Beno?t Minisini From rterry at ...1946... Tue Apr 27 04:44:46 2010 From: rterry at ...1946... (richard terry) Date: Tue, 27 Apr 2010 12:44:46 +1000 Subject: [Gambas-user] GamBas3 In-Reply-To: <201004261811.30792.jmcbride@...2309...> References: <201004261811.30792.jmcbride@...2309...> Message-ID: <201004271244.46851.rterry@...1946...> On Tuesday 27 April 2010 08:11:30 Jerry McBride wrote: > A question for you all... :') > > > Just "how usable" is Gambas3? > > I'm being pushed into dropping Gambas2 due to kde3 and qt3 being deprecated > in Gentoo. My only option is to move into Gambas 3.0... and I need to > know, just how usable is it? > What can I say, its brilliant, has been for a long time. I find it very stable, and if you do uncover bugs Benoit is pretty quick to fix if you identify them. I have a complicated gui with god knows how many many dozens of forms, modules and classes, a huge postgres backend with hundreds of tables, and 99% of time if it falls over it is my coding. Remember however it is an evolving work in progress. Regards Richard From Karl.Reinl at ...2345... Tue Apr 27 10:31:11 2010 From: Karl.Reinl at ...2345... (Charlie Reinl) Date: Tue, 27 Apr 2010 10:31:11 +0200 Subject: [Gambas-user] GamBas3 In-Reply-To: <201004271244.46851.rterry@...1946...> References: <201004261811.30792.jmcbride@...2309...> <201004271244.46851.rterry@...1946...> Message-ID: <1272357071.6584.5.camel@...40...> Am Dienstag, den 27.04.2010, 12:44 +1000 schrieb richard terry: > On Tuesday 27 April 2010 08:11:30 Jerry McBride wrote: > > A question for you all... :') > > > > > > Just "how usable" is Gambas3? > > > > I'm being pushed into dropping Gambas2 due to kde3 and qt3 being deprecated > > in Gentoo. My only option is to move into Gambas 3.0... and I need to > > know, just how usable is it? > > > What can I say, its brilliant, has been for a long time. I find it very stable, > and if you do uncover bugs Benoit is pretty quick to fix if you identify them. > > I have a complicated gui with god knows how many many dozens of forms, > modules and classes, a huge postgres backend with hundreds of tables, and 99% > of time if it falls over it is my coding. > > Remember however it is an evolving work in progress. > > Regards > > Richard Salut, as Richard says, very stable or as stable as gambas2. But the main question will be, what deeper changes (like last components to library), Beno?t has still planed ? -- Amicalement Charlie From gambas.fr at ...626... Tue Apr 27 10:53:57 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Tue, 27 Apr 2010 10:53:57 +0200 Subject: [Gambas-user] GamBas3 In-Reply-To: <1272357071.6584.5.camel@...40...> References: <201004261811.30792.jmcbride@...2309...> <201004271244.46851.rterry@...1946...> <1272357071.6584.5.camel@...40...> Message-ID: i think we are near to be able to write a full dictionnary (in size), with the change between gambas2 and 3. it's not great things often but a lot of hidden feature are here.... sugars, some other are more important as Paint Class, Reports, DBus support (not finished miss the signal connecting and what about introspection ?), OpenGL, New openGl layer for sdl, New impressive IDE, and i know i miss more that 90 % of the change here :) Gambas3 is as stable as Gambas2 is . It benefit of the gambas2 bug corrections. The only sensibles part are the new components, some of the Ide parts, and your own code. Day after day, year after year, my english still unperfect :( 2010/4/27 Charlie Reinl : > Am Dienstag, den 27.04.2010, 12:44 +1000 schrieb richard terry: >> On Tuesday 27 April 2010 08:11:30 Jerry McBride wrote: >> > A question for you all... :') >> > >> > >> > Just "how usable" is Gambas3? >> > >> > I'm being pushed into dropping Gambas2 due to kde3 and qt3 being deprecated >> > ?in Gentoo. My only option is to move into Gambas 3.0... and I need to >> > ?know, just how usable is it? >> > >> What can I say, its brilliant, has been for a long time. I find it very stable, >> and if you do uncover bugs Benoit is pretty quick to fix if you identify them. >> >> I have a complicated gui with god knows how many many dozens of ?forms, >> modules and classes, a huge postgres backend with hundreds of tables, and 99% >> of time if it falls over it is my coding. >> >> Remember however it is an evolving work in progress. >> >> Regards >> >> Richard > > Salut, > > as Richard says, very stable or as stable as gambas2. > > But the main question will be, what deeper changes (like last components > to library), Beno?t has still planed ? > > > -- > Amicalement > Charlie > > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From karl.reinl at ...9... Tue Apr 27 10:54:30 2010 From: karl.reinl at ...9... (Karl Reinl) Date: Tue, 27 Apr 2010 10:54:30 +0200 Subject: [Gambas-user] infobot@...2386... informs me , when answering gambas user mails Message-ID: <1272358470.6584.9.camel@...40...> Salut, does other have that also, infobot at ...2386... informs me (see attachment), when answering gambas user mails ? -- Amicalement Charlie -------------- next part -------------- An embedded message was scrubbed... From: infobot at ...2386... Subject: Re: [Gambas-user] GamBas3 Date: Tue, 27 Apr 2010 10:31:52 +0200 (CEST) Size: 3469 URL: From charles at ...1784... Tue Apr 27 12:38:02 2010 From: charles at ...1784... (charlesg) Date: Tue, 27 Apr 2010 03:38:02 -0700 (PDT) Subject: [Gambas-user] Cannot load class 'Balloon' Message-ID: <28375384.post@...1379...> hi, Gambas3 2918 compiles fine on Ubuntu 10.04 32bit release candidate. But gives: ERROR: #2: Cannot load class 'Balloon': Unable to load class file when run. any ideas? rgds -- View this message in context: http://old.nabble.com/Cannot-load-class-%27Balloon%27-tp28375384p28375384.html Sent from the gambas-user mailing list archive at Nabble.com. From leandrosansilva at ...626... Tue Apr 27 15:09:56 2010 From: leandrosansilva at ...626... (Leandro Santiago) Date: Tue, 27 Apr 2010 10:09:56 -0300 Subject: [Gambas-user] oxygen border theme and gb.qt4 component visual issues Message-ID: Hello to all. In gambas3 (qt4 component), the main space on apps window is opaque, and don't integrate very well with the oxygen theme (default in KDE). To has a good apparency, the space in window must follow the system style, like native qt4 applications. An image say more than one thousand words: http://www.flickr.com/photos/13180019 at ...2423.../4557786418/sizes/o/ Is that behavior expected? Sorry my bad English :-) From gambas.fr at ...626... Tue Apr 27 16:39:20 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Tue, 27 Apr 2010 16:39:20 +0200 Subject: [Gambas-user] Cannot load class 'Balloon' In-Reply-To: <28375384.post@...1379...> References: <28375384.post@...1379...> Message-ID: have you selected the component ..; if yes ..; try do a make uninstall and make install if there is some problem then ... look in /usr/local/lib/gambas3 and /usr/share/gambas3/info and list if all the needed files are here you can try a gbi3 in console to see if there is no problem during the info and list file generation for the gb.form component. if there is problem it can be from a missing other lib. 2010/4/27 charlesg : > > hi, > > Gambas3 2918 compiles fine on Ubuntu 10.04 32bit release candidate. > > But gives: > ERROR: #2: Cannot load class 'Balloon': Unable to load class file > when run. > > any ideas? > > rgds > -- > View this message in context: http://old.nabble.com/Cannot-load-class-%27Balloon%27-tp28375384p28375384.html > Sent from the gambas-user mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From charles at ...1784... Tue Apr 27 18:48:48 2010 From: charles at ...1784... (charlesg) Date: Tue, 27 Apr 2010 09:48:48 -0700 (PDT) Subject: [Gambas-user] Cannot load class 'Balloon' In-Reply-To: References: <28375384.post@...1379...> Message-ID: <28379147.post@...1379...> Fabien Thank you for that. Gambas 3 used to compile on Ubuntu 10.04 (lucid) using the list of dependencies for 9.10 (Karmic) in the Gambas installation pages. It now also needs intltool (or part of it?) as in sudo apt-get install intltool. Gambas 3 now runs but looks odd. I am way out of my comfort zone. :confused: rgds -- View this message in context: http://old.nabble.com/Cannot-load-class-%27Balloon%27-tp28375384p28379147.html Sent from the gambas-user mailing list archive at Nabble.com. From gambas.fr at ...626... Tue Apr 27 18:59:31 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Tue, 27 Apr 2010 18:59:31 +0200 Subject: [Gambas-user] Cannot load class 'Balloon' In-Reply-To: <28379147.post@...1379...> References: <28375384.post@...1379...> <28379147.post@...1379...> Message-ID: odd? why ? 2010/4/27 charlesg : > > Fabien > > Thank you for that. Gambas 3 used to compile on Ubuntu 10.04 (lucid) using > the list of dependencies for 9.10 (Karmic) in the Gambas installation pages. > It now also needs intltool (or part of it?) as in sudo apt-get install > intltool. > > Gambas 3 now runs but looks odd. I am way out of my comfort zone. :confused: > > rgds > -- > View this message in context: http://old.nabble.com/Cannot-load-class-%27Balloon%27-tp28375384p28379147.html > Sent from the gambas-user mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas at ...1... Tue Apr 27 19:00:18 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 27 Apr 2010 19:00:18 +0200 Subject: [Gambas-user] GamBas3 In-Reply-To: <1272357071.6584.5.camel@...40...> References: <201004261811.30792.jmcbride@...2309...> <201004271244.46851.rterry@...1946...> <1272357071.6584.5.camel@...40...> Message-ID: <201004271900.18868.gambas@...1...> > > Salut, > > as Richard says, very stable or as stable as gambas2. > > But the main question will be, what deeper changes (like last components > to library), Beno?t has still planed ? I thought I had made a mail about that, but maybe I am wrong. Now, as soon as the gb.report is usable (i.e. almost finished), I think an alpha release of Gambas 3 could be made. Otherwise: - There are a lot of not so little things to do, depicted in the TODO file. Not all the TODO file will be made, but there are some features I want to put in Gambas 3, like support for system signals, - As Fabien said, the gb.dbus component allows to use other applications, but is not able to expose your application to dbus yet. - Laurent is currently making a component based on the Ogre 3D engine. I don't know if he can finish it for Gambas 3. - I want the package manager to be really useful, so I will need a lot of people testing it by using different distributions. - If "craf" (what's your real name?) succeeds in running a Gambas application in a standalone way (almost), maybe the packager will be able to make a standalone binary package of a project (like windows). At the moment, it seems we must rely on the libc installed on the target system. All other needed shared libraries can apparently put in the package. Work in progress... - I know now how to make a Gambas profiler (a table in the IDE that will tell you how much relative time you spent in each function), but I think it's for a next version. - There will be of course a lot of tiny problem to fix, but this is not important for an alpha release. Regards, -- Beno?t Minisini From gambas at ...1... Tue Apr 27 19:01:15 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 27 Apr 2010 19:01:15 +0200 Subject: [Gambas-user] oxygen border theme and gb.qt4 component visual issues In-Reply-To: References: Message-ID: <201004271901.15235.gambas@...1...> > Hello to all. > > In gambas3 (qt4 component), the main space on apps window is opaque, > and don't integrate very well with the oxygen theme (default in KDE). > > To has a good apparency, the space in window must follow the system > style, like native qt4 applications. > > An image say more than one thousand words: > http://www.flickr.com/photos/13180019 at ...2423.../4557786418/sizes/o/ > > Is that behavior expected? > Yes, but I don't remember why. I will see if I can do something about that! Regards, -- Beno?t Minisini From gambas.fr at ...626... Tue Apr 27 21:26:56 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Tue, 27 Apr 2010 21:26:56 +0200 Subject: [Gambas-user] GamBas3 In-Reply-To: <201004271900.18868.gambas@...1...> References: <201004261811.30792.jmcbride@...2309...> <201004271244.46851.rterry@...1946...> <1272357071.6584.5.camel@...40...> <201004271900.18868.gambas@...1...> Message-ID: Le 27 avril 2010 19:00, Beno?t Minisini a ?crit : >> >> Salut, >> >> as Richard says, very stable or as stable as gambas2. >> >> But the main question will be, what deeper changes (like last components >> to library), Beno?t has still planed ? > > I thought I had made a mail about that, but maybe I am wrong. > > Now, as soon as the gb.report is usable (i.e. almost finished), I think an > alpha release of Gambas 3 could be made. > > Otherwise: > > - There are a lot of not so little things to do, depicted in the TODO file. > Not all the TODO file will be made, but there are some features I want to put > in Gambas 3, like support for system signals, > > - As Fabien said, the gb.dbus component allows to use other applications, but > is not able to expose your application to dbus yet. > > - Laurent is currently making a component based on the Ogre 3D engine. I don't > know if he can finish it for Gambas 3. Less than not sure... it's just beginning and the work to do is enormous, But the goal is marvellous > - I want the package manager to be really useful, so I will need a lot of > people testing it by using different distributions. > > - If "craf" (what's your real name?) succeeds in running a Gambas application > in a standalone way (almost), maybe the packager will be able to make a > standalone binary package of a project (like windows). At the moment, it seems > we must rely on the libc installed on the target system. All other needed > shared libraries can apparently put in the package. Work in progress... > > - I know now how to make a Gambas profiler (a table in the IDE that will tell > you how much relative time you spent in each function), but I think it's for a > next version. > > - There will be of course a lot of tiny problem to fix, but this is not > important for an alpha release. > > Regards, > > -- > Beno?t Minisini > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From dr.diesel at ...626... Tue Apr 27 22:54:32 2010 From: dr.diesel at ...626... (Dr.Diesel) Date: Tue, 27 Apr 2010 13:54:32 -0700 (PDT) Subject: [Gambas-user] Mouse Clicks become unresponsive on form? In-Reply-To: <201004270058.17435.gambas@...1...> References: <28359348.post@...1379...> <201004262333.41177.gambas@...1...> <28370555.post@...1379...> <201004270058.17435.gambas@...1...> Message-ID: <28381910.post@...1379...> Beno?t Minisini wrote: > >> Beno?t Minisini wrote: >> >> Running SVN 2910. After a few mouse click, either switching a few >> >> >> >> >> >> Many Thanks! >> > >> > Your main form has the Type property set to "Menu". It should be set to >> > "Normal". >> > >> > Can you try with the Type property set to "Normal", and tell me if you >> > have >> > strange click behaviour again? >> >> Yes, still have the same mouse problem with gtk after setting main form >> type to Normal. >> >> Thanks > > I can't see any problem: can you depict it more precisely please? > > -- > Beno?t Minisini > Not much else to say. After clicking the Data, then World, then Data tab, no other mouse clicks work. It is like the app is hung. I seem to recall this happening about 1 year ago with other gtk software, ended up being a gtk bug. It does it on two of my Fedora 12 PCs, so I don't think completely isolated. Any other Fedora users seeing this? -- View this message in context: http://old.nabble.com/Mouse-Clicks-become-unresponsive-on-form--tp28359348p28381910.html Sent from the gambas-user mailing list archive at Nabble.com. From prog at ...2177... Tue Apr 27 22:54:12 2010 From: prog at ...2177... (craf) Date: Tue, 27 Apr 2010 16:54:12 -0400 Subject: [Gambas-user] GamBas3 In-Reply-To: <201004271900.18868.gambas@...1...> References: <201004261811.30792.jmcbride@...2309...> <201004271244.46851.rterry@...1946...> <1272357071.6584.5.camel@...40...> <201004271900.18868.gambas@...1...> Message-ID: <1272401652.1943.6.camel@...2406...> -----Mensaje original----- De: Beno?t Minisini Reply-to: mailing list for gambas users Para: Karl.Reinl at ...9..., mailing list for gambas users Asunto: Re: [Gambas-user] GamBas3 Fecha: Tue, 27 Apr 2010 19:00:18 +0200 > > Salut, > > as Richard says, very stable or as stable as gambas2. > > But the main question will be, what deeper changes (like last components > to library), Beno?t has still planed ? >I thought I had made a mail about that, but maybe I am wrong. >Now, as soon as the gb.report is usable (i.e. almost finished), I think an >alpha release of Gambas 3 could be made. >Otherwise: >- There are a lot of not so little things to do, depicted in the TODO file. >Not all the TODO file will be made, but there are some features I want to put >in Gambas 3, like support for system signals, >- As Fabien said, the gb.dbus component allows to use other applications, but >is not able to expose your application to dbus yet. >- Laurent is currently making a component based on the Ogre 3D engine. I don't >know if he can finish it for Gambas 3. >- I want the package manager to be really useful, so I will need a lot of >people testing it by using different distributions. >- If "craf" (what's your real name?) succeeds in running a Gambas application >in a standalone way (almost), maybe the packager will be able to make a >standalone binary package of a project (like windows). At the moment, it seems >we must rely on the libc installed on the target system. All other needed >shared libraries can apparently put in the package. Work in progress... Well, my name is Cristian. I live in Chile. I was looking for a solution for hard links that are created when compiling glibc with Gambas and found this page: http://www.bitwagon.com/rtldi/rtldi.html I think there the road goes, but I do not know very well C, not find a way to connect with Gambas. Any ideas? Regards >- I know now how to make a Gambas profiler (a table in the IDE that will tell >you how much relative time you spent in each function), but I think it's for a >next version. >- There will be of course a lot of tiny problem to fix, but this is not >important for an alpha release. >Regards, From gambas at ...1... Tue Apr 27 23:01:13 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 27 Apr 2010 23:01:13 +0200 Subject: [Gambas-user] Mouse Clicks become unresponsive on form? In-Reply-To: <28381910.post@...1379...> References: <28359348.post@...1379...> <201004270058.17435.gambas@...1...> <28381910.post@...1379...> Message-ID: <201004272301.13461.gambas@...1...> > Beno?t Minisini wrote: > >> Beno?t Minisini wrote: > >> >> Running SVN 2910. After a few mouse click, either switching a few > >> >> > >> >> > >> >> Many Thanks! > >> > > >> > Your main form has the Type property set to "Menu". It should be set > >> > to "Normal". > >> > > >> > Can you try with the Type property set to "Normal", and tell me if you > >> > have > >> > strange click behaviour again? > >> > >> Yes, still have the same mouse problem with gtk after setting main form > >> type to Normal. > >> > >> Thanks > > > > I can't see any problem: can you depict it more precisely please? > > Not much else to say. After clicking the Data, then World, then Data tab, > no other mouse clicks work. It is like the app is hung. Is it really hung, or is it something else ? Can you pause the program from the IDE ? Can you stop it with gdb ? -- Beno?t Minisini From gambas at ...1... Tue Apr 27 23:08:18 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 27 Apr 2010 23:08:18 +0200 Subject: [Gambas-user] oxygen border theme and gb.qt4 component visual issues In-Reply-To: <201004271901.15235.gambas@...1...> References: <201004271901.15235.gambas@...1...> Message-ID: <201004272308.18561.gambas@...1...> > > Hello to all. > > > > In gambas3 (qt4 component), the main space on apps window is opaque, > > and don't integrate very well with the oxygen theme (default in KDE). > > > > To has a good apparency, the space in window must follow the system > > style, like native qt4 applications. > > > > An image say more than one thousand words: > > http://www.flickr.com/photos/13180019 at ...2423.../4557786418/sizes/o/ > > > > Is that behavior expected? > > Yes, but I don't remember why. I will see if I can do something about that! > > Regards, It should be better with revision #2919. In that revision, controls were made non-opaque as much as possible, so that gradients are displayed correctly. Regards, -- Beno?t Minisini From dr.diesel at ...626... Tue Apr 27 23:09:34 2010 From: dr.diesel at ...626... (Dr.Diesel) Date: Tue, 27 Apr 2010 14:09:34 -0700 (PDT) Subject: [Gambas-user] Mouse Clicks become unresponsive on form? In-Reply-To: <201004272301.13461.gambas@...1...> References: <28359348.post@...1379...> <201004262333.41177.gambas@...1...> <28370555.post@...1379...> <201004270058.17435.gambas@...1...> <28381910.post@...1379...> <201004272301.13461.gambas@...1...> Message-ID: <28382083.post@...1379...> Beno?t Minisini wrote: > >> Beno?t Minisini wrote: >> >> Beno?t Minisini wrote: >> >> >> Running SVN 2910. After a few mouse click, either switching a few >> >> >> >> >> >> >> >> >> Many Thanks! >> >> > >> >> > Your main form has the Type property set to "Menu". It should be set >> >> > to "Normal". >> >> > >> >> > Can you try with the Type property set to "Normal", and tell me if >> you >> >> > have >> >> > strange click behaviour again? >> >> >> >> Yes, still have the same mouse problem with gtk after setting main >> form >> >> type to Normal. >> >> >> >> Thanks >> > >> > I can't see any problem: can you depict it more precisely please? >> >> Not much else to say. After clicking the Data, then World, then Data >> tab, >> no other mouse clicks work. It is like the app is hung. > > Is it really hung, or is it something else ? Can you pause the program > from > the IDE ? Can you stop it with gdb ? > > -- > Beno?t Minisini > No it is not truly hung cause the menus still work, just you can't click on any tabs or buttons. Pausing/stopping from the IDE works fine. If it helps any I can get you VNC access to poke around? -- View this message in context: http://old.nabble.com/Mouse-Clicks-become-unresponsive-on-form--tp28359348p28382083.html Sent from the gambas-user mailing list archive at Nabble.com. From gambas at ...1... Tue Apr 27 23:12:14 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 27 Apr 2010 23:12:14 +0200 Subject: [Gambas-user] GamBas3 In-Reply-To: <1272401652.1943.6.camel@...2406...> References: <201004261811.30792.jmcbride@...2309...> <201004271900.18868.gambas@...1...> <1272401652.1943.6.camel@...2406...> Message-ID: <201004272312.14405.gambas@...1...> > > Well, my name is Cristian. I live in Chile. > I was looking for a solution for hard links that are created when > compiling glibc with Gambas and found this page: > > http://www.bitwagon.com/rtldi/rtldi.html > > I think there the road goes, but I do not know very well C, not find a > way to connect with Gambas. > Any ideas? > > Regards Mmm, I don't think this is a good idea. Did you look at how, for example, Google packaged GoogleEarth ? -- Beno?t Minisini From gambas at ...1... Tue Apr 27 23:23:46 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 27 Apr 2010 23:23:46 +0200 Subject: [Gambas-user] GamBas3 In-Reply-To: <201004272312.14405.gambas@...1...> References: <201004261811.30792.jmcbride@...2309...> <1272401652.1943.6.camel@...2406...> <201004272312.14405.gambas@...1...> Message-ID: <201004272323.46717.gambas@...1...> > > Well, my name is Cristian. I live in Chile. > > I was looking for a solution for hard links that are created when > > compiling glibc with Gambas and found this page: > > > > http://www.bitwagon.com/rtldi/rtldi.html > > > > I think there the road goes, but I do not know very well C, not find a > > way to connect with Gambas. > > Any ideas? > > > > Regards > > Mmm, I don't think this is a good idea. Did you look at how, for example, > Google packaged GoogleEarth ? GoogleEarth is provided with all almost its shared library in the same directory as the executable. That executable is run by a script that adds "." at the beginning of the LD_LIBRARY_PATH environment variable. More interesting, it relies on the system for the following libraries: libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7839000) libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7749000) libm.so.6 => /lib/i686/libm.so.6 (0xb5ff1000) libc.so.6 => /lib/i686/libc.so.6 (0xb5e90000) /lib/ld-linux.so.2 (0xb7875000) libz.so.1 => /lib/libz.so.1 (0xb5aa5000) libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0xb5a9e000) librt.so.1 => /lib/i686/librt.so.1 (0xb5a94000) libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0xb59d0000) libpthread.so.0 => /lib/i686/libpthread.so.0 (0xb59b6000) libdl.so.2 => /lib/libdl.so.2 (0xb59b1000) libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb592d000) libSM.so.6 => /usr/lib/libSM.so.6 (0xb5923000) libICE.so.6 => /usr/lib/libICE.so.6 (0xb5909000) libXrender.so.1 => /usr/lib/libXrender.so.1 (0xb58ff000) libXext.so.6 => /usr/lib/libXext.so.6 (0xb58ed000) libX11.so.6 => /usr/lib/libX11.so.6 (0xb57bb000) libpcre.so.0 => /lib/libpcre.so.0 (0xb5315000) libxcb.so.1 => /usr/lib/libxcb.so.1 (0xb52f7000) libGL.so.1 => /usr/lib/libGL.so.1 (0xb5286000) libXau.so.6 => /usr/lib/libXau.so.6 (0xb51cc000) libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb51c5000) libXxf86vm.so.1 => /usr/lib/libXxf86vm.so.1 (0xb51bf000) libXdamage.so.1 => /usr/lib/libXdamage.so.1 (0xb51ba000) libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0xb51b4000) libdrm.so.2 => /usr/lib/libdrm.so.2 (0xb51a8000) These are gcc, libc, libz, glib, pcre, freetype, X11 and OpenGL (except libGLU) libraries. All other shared libraries are included in the package. I suggest you do almost the same: not providing gcc, libc, X11 and OpenGL libraries, and including all other needed shared libraries in the package. Regards, -- Beno?t Minisini From gambas at ...1... Tue Apr 27 23:28:30 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 27 Apr 2010 23:28:30 +0200 Subject: [Gambas-user] GamBas3 In-Reply-To: <201004272323.46717.gambas@...1...> References: <201004261811.30792.jmcbride@...2309...> <201004272312.14405.gambas@...1...> <201004272323.46717.gambas@...1...> Message-ID: <201004272328.30912.gambas@...1...> > > > Well, my name is Cristian. I live in Chile. > > > I was looking for a solution for hard links that are created when > > > compiling glibc with Gambas and found this page: > > > > > > http://www.bitwagon.com/rtldi/rtldi.html > > > > > > I think there the road goes, but I do not know very well C, not find a > > > way to connect with Gambas. > > > Any ideas? > > > > > > Regards > > > > Mmm, I don't think this is a good idea. Did you look at how, for example, > > Google packaged GoogleEarth ? > > GoogleEarth is provided with all almost its shared library in the same > directory as the executable. That executable is run by a script that adds > "." at the beginning of the LD_LIBRARY_PATH environment variable. > > More interesting, it relies on the system for the following libraries: > > libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7839000) > libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7749000) > libm.so.6 => /lib/i686/libm.so.6 (0xb5ff1000) > libc.so.6 => /lib/i686/libc.so.6 (0xb5e90000) > /lib/ld-linux.so.2 (0xb7875000) > libz.so.1 => /lib/libz.so.1 (0xb5aa5000) > libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0xb5a9e000) > librt.so.1 => /lib/i686/librt.so.1 (0xb5a94000) > libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0xb59d0000) > libpthread.so.0 => /lib/i686/libpthread.so.0 (0xb59b6000) > libdl.so.2 => /lib/libdl.so.2 (0xb59b1000) > libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb592d000) > libSM.so.6 => /usr/lib/libSM.so.6 (0xb5923000) > libICE.so.6 => /usr/lib/libICE.so.6 (0xb5909000) > libXrender.so.1 => /usr/lib/libXrender.so.1 (0xb58ff000) > libXext.so.6 => /usr/lib/libXext.so.6 (0xb58ed000) > libX11.so.6 => /usr/lib/libX11.so.6 (0xb57bb000) > libpcre.so.0 => /lib/libpcre.so.0 (0xb5315000) > libxcb.so.1 => /usr/lib/libxcb.so.1 (0xb52f7000) > libGL.so.1 => /usr/lib/libGL.so.1 (0xb5286000) > libXau.so.6 => /usr/lib/libXau.so.6 (0xb51cc000) > libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb51c5000) > libXxf86vm.so.1 => /usr/lib/libXxf86vm.so.1 (0xb51bf000) > libXdamage.so.1 => /usr/lib/libXdamage.so.1 (0xb51ba000) > libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0xb51b4000) > libdrm.so.2 => /usr/lib/libdrm.so.2 (0xb51a8000) > > These are gcc, libc, libz, glib, pcre, freetype, X11 and OpenGL (except > libGLU) libraries. > > All other shared libraries are included in the package. > > I suggest you do almost the same: not providing gcc, libc, X11 and OpenGL > libraries, and including all other needed shared libraries in the package. > > Regards, As for your problem with gb.gtk, maybe you can provide as requirement that the system should have a GTK+ based desktop installed (or KDE for gb.qt4)? Then you won't have to provide any GTK+ library. -- Beno?t Minisini From prog at ...2177... Tue Apr 27 23:39:13 2010 From: prog at ...2177... (craf) Date: Tue, 27 Apr 2010 17:39:13 -0400 Subject: [Gambas-user] GamBas3 In-Reply-To: <201004272328.30912.gambas@...1...> References: <201004261811.30792.jmcbride@...2309...> <201004272312.14405.gambas@...1...> <201004272323.46717.gambas@...1...> <201004272328.30912.gambas@...1...> Message-ID: <1272404353.1943.8.camel@...2406...> -----Mensaje original----- De: Beno?t Minisini Reply-to: mailing list for gambas users Para: mailing list for gambas users Asunto: Re: [Gambas-user] GamBas3 Fecha: Tue, 27 Apr 2010 23:28:30 +0200 > > > Well, my name is Cristian. I live in Chile. > > > I was looking for a solution for hard links that are created when > > > compiling glibc with Gambas and found this page: > > > > > > http://www.bitwagon.com/rtldi/rtldi.html > > > > > > I think there the road goes, but I do not know very well C, not find a > > > way to connect with Gambas. > > > Any ideas? > > > > > > Regards > > > > Mmm, I don't think this is a good idea. Did you look at how, for example, > > Google packaged GoogleEarth ? > > GoogleEarth is provided with all almost its shared library in the same > directory as the executable. That executable is run by a script that adds > "." at the beginning of the LD_LIBRARY_PATH environment variable. > > More interesting, it relies on the system for the following libraries: > > libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7839000) > libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7749000) > libm.so.6 => /lib/i686/libm.so.6 (0xb5ff1000) > libc.so.6 => /lib/i686/libc.so.6 (0xb5e90000) > /lib/ld-linux.so.2 (0xb7875000) > libz.so.1 => /lib/libz.so.1 (0xb5aa5000) > libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0xb5a9e000) > librt.so.1 => /lib/i686/librt.so.1 (0xb5a94000) > libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0xb59d0000) > libpthread.so.0 => /lib/i686/libpthread.so.0 (0xb59b6000) > libdl.so.2 => /lib/libdl.so.2 (0xb59b1000) > libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb592d000) > libSM.so.6 => /usr/lib/libSM.so.6 (0xb5923000) > libICE.so.6 => /usr/lib/libICE.so.6 (0xb5909000) > libXrender.so.1 => /usr/lib/libXrender.so.1 (0xb58ff000) > libXext.so.6 => /usr/lib/libXext.so.6 (0xb58ed000) > libX11.so.6 => /usr/lib/libX11.so.6 (0xb57bb000) > libpcre.so.0 => /lib/libpcre.so.0 (0xb5315000) > libxcb.so.1 => /usr/lib/libxcb.so.1 (0xb52f7000) > libGL.so.1 => /usr/lib/libGL.so.1 (0xb5286000) > libXau.so.6 => /usr/lib/libXau.so.6 (0xb51cc000) > libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb51c5000) > libXxf86vm.so.1 => /usr/lib/libXxf86vm.so.1 (0xb51bf000) > libXdamage.so.1 => /usr/lib/libXdamage.so.1 (0xb51ba000) > libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0xb51b4000) > libdrm.so.2 => /usr/lib/libdrm.so.2 (0xb51a8000) > > These are gcc, libc, libz, glib, pcre, freetype, X11 and OpenGL (except > libGLU) libraries. > > All other shared libraries are included in the package. > > I suggest you do almost the same: not providing gcc, libc, X11 and OpenGL > libraries, and including all other needed shared libraries in the package. > > Regards, >As for your problem with gb.gtk, maybe you can provide as requirement that the >system should have a GTK+ based desktop installed (or KDE for gb.qt4)? Then >you won't have to provide any GTK+ library. Sorry if you do not understand is for my poor understanding of English. Did I say you should not add in the wrapper components gb.gtk and gb.gtk.ext ?, Can run a Gambas application without these components on another computer, even with GTK? Regards From gambas at ...1... Tue Apr 27 23:43:45 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 27 Apr 2010 23:43:45 +0200 Subject: [Gambas-user] GamBas3 In-Reply-To: <1272404353.1943.8.camel@...2406...> References: <201004261811.30792.jmcbride@...2309...> <201004272328.30912.gambas@...1...> <1272404353.1943.8.camel@...2406...> Message-ID: <201004272343.45994.gambas@...1...> > -----Mensaje original----- > De: Beno?t Minisini > Reply-to: mailing list for gambas users > > Para: mailing list for gambas users > Asunto: Re: [Gambas-user] GamBas3 > Fecha: Tue, 27 Apr 2010 23:28:30 +0200 > > > > > Well, my name is Cristian. I live in Chile. > > > > I was looking for a solution for hard links that are created when > > > > compiling glibc with Gambas and found this page: > > > > > > > > http://www.bitwagon.com/rtldi/rtldi.html > > > > > > > > I think there the road goes, but I do not know very well C, not find > > > > a way to connect with Gambas. > > > > Any ideas? > > > > > > > > Regards > > > > > > Mmm, I don't think this is a good idea. Did you look at how, for > > > example, Google packaged GoogleEarth ? > > > > GoogleEarth is provided with all almost its shared library in the same > > directory as the executable. That executable is run by a script that adds > > "." at the beginning of the LD_LIBRARY_PATH environment variable. > > > > More interesting, it relies on the system for the following libraries: > > libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7839000) > > libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7749000) > > libm.so.6 => /lib/i686/libm.so.6 (0xb5ff1000) > > libc.so.6 => /lib/i686/libc.so.6 (0xb5e90000) > > /lib/ld-linux.so.2 (0xb7875000) > > libz.so.1 => /lib/libz.so.1 (0xb5aa5000) > > libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0xb5a9e000) > > librt.so.1 => /lib/i686/librt.so.1 (0xb5a94000) > > libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0xb59d0000) > > libpthread.so.0 => /lib/i686/libpthread.so.0 (0xb59b6000) > > libdl.so.2 => /lib/libdl.so.2 (0xb59b1000) > > libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb592d000) > > libSM.so.6 => /usr/lib/libSM.so.6 (0xb5923000) > > libICE.so.6 => /usr/lib/libICE.so.6 (0xb5909000) > > libXrender.so.1 => /usr/lib/libXrender.so.1 (0xb58ff000) > > libXext.so.6 => /usr/lib/libXext.so.6 (0xb58ed000) > > libX11.so.6 => /usr/lib/libX11.so.6 (0xb57bb000) > > libpcre.so.0 => /lib/libpcre.so.0 (0xb5315000) > > libxcb.so.1 => /usr/lib/libxcb.so.1 (0xb52f7000) > > libGL.so.1 => /usr/lib/libGL.so.1 (0xb5286000) > > libXau.so.6 => /usr/lib/libXau.so.6 (0xb51cc000) > > libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb51c5000) > > libXxf86vm.so.1 => /usr/lib/libXxf86vm.so.1 (0xb51bf000) > > libXdamage.so.1 => /usr/lib/libXdamage.so.1 (0xb51ba000) > > libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0xb51b4000) > > libdrm.so.2 => /usr/lib/libdrm.so.2 (0xb51a8000) > > > > These are gcc, libc, libz, glib, pcre, freetype, X11 and OpenGL (except > > libGLU) libraries. > > > > All other shared libraries are included in the package. > > > > I suggest you do almost the same: not providing gcc, libc, X11 and OpenGL > > libraries, and including all other needed shared libraries in the > > package. > > > > Regards, > > > >As for your problem with gb.gtk, maybe you can provide as requirement that > >the system should have a GTK+ based desktop installed (or KDE for > >gb.qt4)? Then you won't have to provide any GTK+ library. > > Sorry if you do not understand is for my poor understanding of English. > Did I say you should not add in the wrapper components gb.gtk and > gb.gtk.ext ?, Can run a Gambas application without these components on > another computer, even with GTK? > > Regards > Of course you must provide the Gambas component shared libraries (gb.gtk.so, and so on...). I said that you may not provide the underlying GTK+ libraries (libgtk-x11-2.0.so, and so on...) -- Beno?t Minisini From prog at ...2177... Tue Apr 27 23:51:59 2010 From: prog at ...2177... (craf) Date: Tue, 27 Apr 2010 17:51:59 -0400 Subject: [Gambas-user] GamBas3 In-Reply-To: <201004272343.45994.gambas@...1...> References: <201004261811.30792.jmcbride@...2309...> <201004272328.30912.gambas@...1...> <1272404353.1943.8.camel@...2406...> <201004272343.45994.gambas@...1...> Message-ID: <1272405119.1943.9.camel@...2406...> -----Mensaje original----- De: Beno?t Minisini Reply-to: mailing list for gambas users Para: mailing list for gambas users Asunto: Re: [Gambas-user] GamBas3 Fecha: Tue, 27 Apr 2010 23:43:45 +0200 > -----Mensaje original----- > De: Beno?t Minisini > Reply-to: mailing list for gambas users > > Para: mailing list for gambas users > Asunto: Re: [Gambas-user] GamBas3 > Fecha: Tue, 27 Apr 2010 23:28:30 +0200 > > > > > Well, my name is Cristian. I live in Chile. > > > > I was looking for a solution for hard links that are created when > > > > compiling glibc with Gambas and found this page: > > > > > > > > http://www.bitwagon.com/rtldi/rtldi.html > > > > > > > > I think there the road goes, but I do not know very well C, not find > > > > a way to connect with Gambas. > > > > Any ideas? > > > > > > > > Regards > > > > > > Mmm, I don't think this is a good idea. Did you look at how, for > > > example, Google packaged GoogleEarth ? > > > > GoogleEarth is provided with all almost its shared library in the same > > directory as the executable. That executable is run by a script that adds > > "." at the beginning of the LD_LIBRARY_PATH environment variable. > > > > More interesting, it relies on the system for the following libraries: > > libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7839000) > > libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7749000) > > libm.so.6 => /lib/i686/libm.so.6 (0xb5ff1000) > > libc.so.6 => /lib/i686/libc.so.6 (0xb5e90000) > > /lib/ld-linux.so.2 (0xb7875000) > > libz.so.1 => /lib/libz.so.1 (0xb5aa5000) > > libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0xb5a9e000) > > librt.so.1 => /lib/i686/librt.so.1 (0xb5a94000) > > libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0xb59d0000) > > libpthread.so.0 => /lib/i686/libpthread.so.0 (0xb59b6000) > > libdl.so.2 => /lib/libdl.so.2 (0xb59b1000) > > libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb592d000) > > libSM.so.6 => /usr/lib/libSM.so.6 (0xb5923000) > > libICE.so.6 => /usr/lib/libICE.so.6 (0xb5909000) > > libXrender.so.1 => /usr/lib/libXrender.so.1 (0xb58ff000) > > libXext.so.6 => /usr/lib/libXext.so.6 (0xb58ed000) > > libX11.so.6 => /usr/lib/libX11.so.6 (0xb57bb000) > > libpcre.so.0 => /lib/libpcre.so.0 (0xb5315000) > > libxcb.so.1 => /usr/lib/libxcb.so.1 (0xb52f7000) > > libGL.so.1 => /usr/lib/libGL.so.1 (0xb5286000) > > libXau.so.6 => /usr/lib/libXau.so.6 (0xb51cc000) > > libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb51c5000) > > libXxf86vm.so.1 => /usr/lib/libXxf86vm.so.1 (0xb51bf000) > > libXdamage.so.1 => /usr/lib/libXdamage.so.1 (0xb51ba000) > > libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0xb51b4000) > > libdrm.so.2 => /usr/lib/libdrm.so.2 (0xb51a8000) > > > > These are gcc, libc, libz, glib, pcre, freetype, X11 and OpenGL (except > > libGLU) libraries. > > > > All other shared libraries are included in the package. > > > > I suggest you do almost the same: not providing gcc, libc, X11 and OpenGL > > libraries, and including all other needed shared libraries in the > > package. > > > > Regards, > > > >As for your problem with gb.gtk, maybe you can provide as requirement that > >the system should have a GTK+ based desktop installed (or KDE for > >gb.qt4)? Then you won't have to provide any GTK+ library. > > Sorry if you do not understand is for my poor understanding of English. > Did I say you should not add in the wrapper components gb.gtk and > gb.gtk.ext ?, Can run a Gambas application without these components on > another computer, even with GTK? > > Regards > >Of course you must provide the Gambas component shared libraries (gb.gtk.so, >and so on...). I said that you may not provide the underlying GTK+ libraries >(libgtk-x11-2.0.so, and so on...) Ok, I got it Regards From linuxos at ...1896... Wed Apr 28 01:05:33 2010 From: linuxos at ...1896... (linus) Date: Wed, 28 Apr 2010 01:05:33 +0200 Subject: [Gambas-user] Problem to use a TextArea Message-ID: <1272409533.3348.27.camel@...2157...> Hi all, I'm using a TextArea in a little project like a Text Editor. When I add the part of code to search in the text of this TextArea, I have a problem during search text whith the command 'instr'. In fact, when this command find accented characters, it count 2 characters instead of 1 and the position of the search at the end it false. Does any body have an explication about this problem please ? Joined the code to search in the TextArea --------------------------------------------------------------------- Public SAVMARKER as Interger Public Button1_Click() SearchTextInEditor(1) End PUBLIC SUB SearchTextInEditor(MODE AS Integer) ' MODE: 0 => From the beginning of the text ' MODE: 1 => After the last search DIM IndexCarac AS Integer DIM CaracTexte AS String DIM IndexRecherche AS Integer DIM LongueurRecherche AS Integer TextBox39.Text = Replace(TextBox39.Text, "\"", "") TextBox40.text = Replace(TextBox40.text, "\"", "") IF TextArea1.Length > 0 THEN IF TextBox39.text = "" THEN Message.Warning(("Please entrer text to search !"), ("Close")) RETURN END IF Application.Busy = 1 SELECT CASE MODE CASE 0 ' search from the beginning of the text SAVMARKER = 0 IF ToggleButton5.Value = TRUE THEN ' Use the case sensitive IndexRecherche = InStr(TextArea1.Text, TextBox39.Text, SAVMARKER, gb.Text) ELSE ' No case sensitive IndexRecherche = InStr(Lower$(TextArea1.Text), Lower $(TextBox39.Text), SAVMARKER, gb.Text) END IF IF IndexRecherche > 0 THEN $TextEditor.Select(IndexRecherche - 1, Len(TextBox39.Text)) $TextEditor.EnsureVisible() SAVMARKER = IndexRecherche + Len(TextBox39.Text) PRINT "IndexRecherche=" & IndexRecherche IF SAVMARKER > TextArea1.Length THEN SAVMARKER = TextArea1.Length END IF LongueurRecherche = Len(TextBox39.Text) ELSE Application.Busy = 0 Message.Info(("Search finished. End of list attained."), ("Close")) RETURN END IF CASE 1 ' Search following ... IF ToggleButton5.Value = TRUE THEN ' Use the case sensitive IndexRecherche = InStr(TextArea1.Text, TextBox39.Text, SAVMARKER, gb.Text) ELSE ' Ne pas tenir compte de la casse IndexRecherche = InStr(Lower$(TextArea1.Text), Lower $(TextBox39.Text), SAVMARKER, gb.Text) END IF IF IndexRecherche > 0 THEN TextArea1.Select((IndexRecherche - 1), Len(TextBox39.Text)) SAVMARKER = IndexRecherche + Len(TextBox39.Text) IF SAVMARKER > TextArea1.Length THEN SAVMARKER = TextArea1.Length END IF ELSE Application.Busy = 0 Message.Info(("Search finished. End of list attained."), ("Close")) RETURN END IF END SELECT END IF Application.Busy = 0 END ----------------------------------------------------------------------------- Thank you in advance. -- Olivier CRUILLES Email: linuxos at ...1896... From gambas.fr at ...626... Wed Apr 28 01:09:09 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Wed, 28 Apr 2010 01:09:09 +0200 Subject: [Gambas-user] Problem to use a TextArea In-Reply-To: <1272409533.3348.27.camel@...2157...> References: <1272409533.3348.27.camel@...2157...> Message-ID: it's utf8 use : String.Instr instead Intr http://gambasdoc.org/help/comp/gb/string/instr 2010/4/28 linus : > > Hi all, > > I'm using a TextArea in a little project like a Text Editor. > > When I add the part of code to search in the text of this TextArea, I > have a problem during search text whith the command 'instr'. > > In fact, when this command find accented characters, it count 2 > characters instead of 1 and the position of the search at the end it > false. > > Does any body have an explication about this problem please ? > > Joined the code to search in the TextArea > > --------------------------------------------------------------------- > > > Public SAVMARKER as Interger > > > Public Button1_Click() > > ?SearchTextInEditor(1) > > End > > > PUBLIC SUB SearchTextInEditor(MODE AS Integer) > > ?' MODE: 0 ?=> From the beginning of the text > ?' MODE: 1 ?=> After the last search > > ?DIM IndexCarac AS Integer > ?DIM CaracTexte AS String > ?DIM IndexRecherche AS Integer > ?DIM LongueurRecherche AS Integer > > ?TextBox39.Text = Replace(TextBox39.Text, "\"", "") > ?TextBox40.text = Replace(TextBox40.text, "\"", "") > > ?IF TextArea1.Length > 0 THEN > > ? ?IF TextBox39.text = "" THEN > ? ? ?Message.Warning(("Please entrer text to search !"), ("Close")) > ? ? ?RETURN > ? ?END IF > > ? ?Application.Busy = 1 > > ? ?SELECT CASE MODE > ? ? ?CASE 0 > ? ? ? ?' search from the beginning of the text > ? ? ? ?SAVMARKER = 0 > ? ? ? ?IF ToggleButton5.Value = TRUE THEN > ? ? ? ? ?' Use the case sensitive > ? ? ? ? ?IndexRecherche = InStr(TextArea1.Text, TextBox39.Text, > SAVMARKER, gb.Text) > ? ? ? ?ELSE > ? ? ? ? ?' No case sensitive > ? ? ? ? ?IndexRecherche = InStr(Lower$(TextArea1.Text), Lower > $(TextBox39.Text), SAVMARKER, gb.Text) > ? ? ? ?END IF > > ? ? ? ?IF IndexRecherche > 0 THEN > > ? ? ? ? ?$TextEditor.Select(IndexRecherche - 1, Len(TextBox39.Text)) > ? ? ? ? ?$TextEditor.EnsureVisible() > ? ? ? ? ?SAVMARKER = IndexRecherche + Len(TextBox39.Text) > ? ? ? ? ?PRINT "IndexRecherche=" & IndexRecherche > ? ? ? ? ?IF SAVMARKER > TextArea1.Length THEN > ? ? ? ? ? ?SAVMARKER = TextArea1.Length > ? ? ? ? ?END IF > > ? ? ? ? ?LongueurRecherche = Len(TextBox39.Text) > > ? ? ? ?ELSE > ? ? ? ? ?Application.Busy = 0 > ? ? ? ? ?Message.Info(("Search finished. End of list attained."), > ("Close")) > ? ? ? ? ?RETURN > ? ? ? ?END IF > > ? ? ?CASE 1 > ? ? ? ?' Search following ... > ? ? ? ?IF ToggleButton5.Value = TRUE THEN > ? ? ? ? ?' Use the case sensitive > ? ? ? ? ?IndexRecherche = InStr(TextArea1.Text, TextBox39.Text, > SAVMARKER, gb.Text) > ? ? ? ?ELSE > ? ? ? ? ?' Ne pas tenir compte de la casse > ? ? ? ? ?IndexRecherche = InStr(Lower$(TextArea1.Text), Lower > $(TextBox39.Text), SAVMARKER, gb.Text) > ? ? ? ?END IF > > ? ? ? ?IF IndexRecherche > 0 THEN > ? ? ? ? ?TextArea1.Select((IndexRecherche - 1), Len(TextBox39.Text)) > ? ? ? ? ?SAVMARKER = IndexRecherche + Len(TextBox39.Text) > ? ? ? ? ?IF SAVMARKER > TextArea1.Length THEN > ? ? ? ? ? ?SAVMARKER = TextArea1.Length > ? ? ? ? ?END IF > > ? ? ? ?ELSE > ? ? ? ? ?Application.Busy = 0 > ? ? ? ? ?Message.Info(("Search finished. End of list attained."), > ("Close")) > ? ? ? ? ?RETURN > ? ? ? ?END IF > ? ?END SELECT > ?END IF > > ?Application.Busy = 0 > > > END > > ----------------------------------------------------------------------------- > > Thank you in advance. > > -- > Olivier CRUILLES > Email: linuxos at ...1896... > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From linuxos at ...1896... Wed Apr 28 01:09:31 2010 From: linuxos at ...1896... (linus) Date: Wed, 28 Apr 2010 01:09:31 +0200 Subject: [Gambas-user] ERRATUM: Problem to use a TextArea Message-ID: <1272409771.3348.29.camel@...2157...> Hi all, I'm using a TextArea in a little project like a Text Editor. When I add the part of code to search in the text of this TextArea, I have a problem during search text whith the command 'instr'. In fact, when this command find accented characters, it count 2 characters instead of 1 and the position of the search at the end it false. Does any body have an explication about this problem please ? Joined the code to search in the TextArea --------------------------------------------------------------------- Public SAVMARKER as Interger Public Button1_Click() SearchTextInEditor(1) End PUBLIC SUB SearchTextInEditor(MODE AS Integer) ' MODE: 0 => From the beginning of the text ' MODE: 1 => After the last search DIM IndexCarac AS Integer DIM CaracTexte AS String DIM IndexRecherche AS Integer DIM LongueurRecherche AS Integer TextBox39.Text = Replace(TextBox39.Text, "\"", "") TextBox40.text = Replace(TextBox40.text, "\"", "") IF TextArea1.Length > 0 THEN IF TextBox39.text = "" THEN Message.Warning(("Please entrer text to search !"), ("Close")) RETURN END IF Application.Busy = 1 SELECT CASE MODE CASE 0 ' search from the beginning of the text SAVMARKER = 0 IF ToggleButton5.Value = TRUE THEN ' Use the case sensitive IndexRecherche = InStr(TextArea1.Text, TextBox39.Text, SAVMARKER, gb.Text) ELSE ' No case sensitive IndexRecherche = InStr(Lower$(TextArea1.Text), Lower $(TextBox39.Text), SAVMARKER, gb.Text) END IF IF IndexRecherche > 0 THEN TextArea1.Select(IndexRecherche - 1, Len(TextBox39.Text)) TextArea1.EnsureVisible() SAVMARKER = IndexRecherche + Len(TextBox39.Text) PRINT "IndexRecherche=" & IndexRecherche IF SAVMARKER > TextArea1.Length THEN SAVMARKER = TextArea1.Length END IF LongueurRecherche = Len(TextBox39.Text) ELSE Application.Busy = 0 Message.Info(("Search finished. End of list attained."), ("Close")) RETURN END IF CASE 1 ' Search following ... IF ToggleButton5.Value = TRUE THEN ' Use the case sensitive IndexRecherche = InStr(TextArea1.Text, TextBox39.Text, SAVMARKER, gb.Text) ELSE ' Ne pas tenir compte de la casse IndexRecherche = InStr(Lower$(TextArea1.Text), Lower $(TextBox39.Text), SAVMARKER, gb.Text) END IF IF IndexRecherche > 0 THEN TextArea1.Select((IndexRecherche - 1), Len(TextBox39.Text)) SAVMARKER = IndexRecherche + Len(TextBox39.Text) IF SAVMARKER > TextArea1.Length THEN SAVMARKER = TextArea1.Length END IF ELSE Application.Busy = 0 Message.Info(("Search finished. End of list attained."), ("Close")) RETURN END IF END SELECT END IF Application.Busy = 0 END ----------------------------------------------------------------------------- Thank you in advance. -- Olivier CRUILLES Email: linuxos at ...1896... From linuxos at ...1896... Wed Apr 28 01:16:30 2010 From: linuxos at ...1896... (linus) Date: Wed, 28 Apr 2010 01:16:30 +0200 Subject: [Gambas-user] Problem to use a TextArea In-Reply-To: References: <1272409533.3348.27.camel@...2157...> Message-ID: <1272410190.3348.32.camel@...2157...> Thank's Fabien it works fine now. so cool.. Olivier Le mercredi 28 avril 2010 ? 01:09 +0200, Fabien Bodard a ?crit : > it's utf8 use : > > String.Instr instead Intr > > http://gambasdoc.org/help/comp/gb/string/instr > > 2010/4/28 linus : > > > > Hi all, > > > > I'm using a TextArea in a little project like a Text Editor. > > > > When I add the part of code to search in the text of this TextArea, I > > have a problem during search text whith the command 'instr'. > > > > In fact, when this command find accented characters, it count 2 > > characters instead of 1 and the position of the search at the end it > > false. > > > > Does any body have an explication about this problem please ? > > > > Joined the code to search in the TextArea > > > > --------------------------------------------------------------------- > > > > > > Public SAVMARKER as Interger > > > > > > Public Button1_Click() > > > > SearchTextInEditor(1) > > > > End > > > > > > PUBLIC SUB SearchTextInEditor(MODE AS Integer) > > > > ' MODE: 0 => From the beginning of the text > > ' MODE: 1 => After the last search > > > > DIM IndexCarac AS Integer > > DIM CaracTexte AS String > > DIM IndexRecherche AS Integer > > DIM LongueurRecherche AS Integer > > > > TextBox39.Text = Replace(TextBox39.Text, "\"", "") > > TextBox40.text = Replace(TextBox40.text, "\"", "") > > > > IF TextArea1.Length > 0 THEN > > > > IF TextBox39.text = "" THEN > > Message.Warning(("Please entrer text to search !"), ("Close")) > > RETURN > > END IF > > > > Application.Busy = 1 > > > > SELECT CASE MODE > > CASE 0 > > ' search from the beginning of the text > > SAVMARKER = 0 > > IF ToggleButton5.Value = TRUE THEN > > ' Use the case sensitive > > IndexRecherche = InStr(TextArea1.Text, TextBox39.Text, > > SAVMARKER, gb.Text) > > ELSE > > ' No case sensitive > > IndexRecherche = InStr(Lower$(TextArea1.Text), Lower > > $(TextBox39.Text), SAVMARKER, gb.Text) > > END IF > > > > IF IndexRecherche > 0 THEN > > > > $TextEditor.Select(IndexRecherche - 1, Len(TextBox39.Text)) > > $TextEditor.EnsureVisible() > > SAVMARKER = IndexRecherche + Len(TextBox39.Text) > > PRINT "IndexRecherche=" & IndexRecherche > > IF SAVMARKER > TextArea1.Length THEN > > SAVMARKER = TextArea1.Length > > END IF > > > > LongueurRecherche = Len(TextBox39.Text) > > > > ELSE > > Application.Busy = 0 > > Message.Info(("Search finished. End of list attained."), > > ("Close")) > > RETURN > > END IF > > > > CASE 1 > > ' Search following ... > > IF ToggleButton5.Value = TRUE THEN > > ' Use the case sensitive > > IndexRecherche = InStr(TextArea1.Text, TextBox39.Text, > > SAVMARKER, gb.Text) > > ELSE > > ' Ne pas tenir compte de la casse > > IndexRecherche = InStr(Lower$(TextArea1.Text), Lower > > $(TextBox39.Text), SAVMARKER, gb.Text) > > END IF > > > > IF IndexRecherche > 0 THEN > > TextArea1.Select((IndexRecherche - 1), Len(TextBox39.Text)) > > SAVMARKER = IndexRecherche + Len(TextBox39.Text) > > IF SAVMARKER > TextArea1.Length THEN > > SAVMARKER = TextArea1.Length > > END IF > > > > ELSE > > Application.Busy = 0 > > Message.Info(("Search finished. End of list attained."), > > ("Close")) > > RETURN > > END IF > > END SELECT > > END IF > > > > Application.Busy = 0 > > > > > > END > > > > ----------------------------------------------------------------------------- > > > > Thank you in advance. > > > > -- > > Olivier CRUILLES > > Email: linuxos at ...1896... > > > > > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Olivier CRUILLES Email: linuxos at ...1896... * hypoaristerolactotherapie : methode de depannage des machines par le coup de pied en bas a gauche. * Mais si, Linux est user-friendly. Mais Linux il choisit ses amis, lui ! * Software is like sex, it's better when it's free (Linus Torvalds) From leandrosansilva at ...626... Wed Apr 28 04:17:55 2010 From: leandrosansilva at ...626... (Leandro Santiago) Date: Tue, 27 Apr 2010 23:17:55 -0300 Subject: [Gambas-user] oxygen border theme and gb.qt4 component visual issues In-Reply-To: <201004272308.18561.gambas@...1...> References: <201004271901.15235.gambas@...1...> <201004272308.18561.gambas@...1...> Message-ID: Thanks very much. Now it looks better :-) But now there is another problem :-) When menubar is hidden, it looks "below" of toolbar. The toolbar buttons work fine, but I can see the menubar yet, below them. 2010/4/27 Beno?t Minisini : >> > Hello to all. >> > >> > In gambas3 (qt4 component), the main space on apps window is opaque, >> > and don't integrate very well with the oxygen theme (default in KDE). >> > >> > To has a good apparency, the space in window must ?follow the system >> > style, like native qt4 applications. >> > >> > An image say more than one thousand words: >> > http://www.flickr.com/photos/13180019 at ...2423.../4557786418/sizes/o/ >> > >> > Is that behavior expected? >> >> Yes, but I don't remember why. I will see if I can do something about that! >> >> Regards, > > It should be better with revision #2919. > > In that revision, controls were made non-opaque as much as possible, so that > gradients are displayed correctly. > > Regards, > > -- > Beno?t Minisini > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From leandrosansilva at ...626... Wed Apr 28 04:21:26 2010 From: leandrosansilva at ...626... (Leandro Santiago) Date: Tue, 27 Apr 2010 23:21:26 -0300 Subject: [Gambas-user] oxygen border theme and gb.qt4 component visual issues In-Reply-To: References: <201004271901.15235.gambas@...1...> <201004272308.18561.gambas@...1...> Message-ID: Ow, I forgot to say: I saw this behavior in the gambas3 IDE. 2010/4/27 Leandro Santiago : > Thanks very much. > Now it looks better :-) > > But now there is another problem :-) When menubar is hidden, it looks > "below" of toolbar. The toolbar buttons work fine, but I can see the > menubar yet, below them. > > 2010/4/27 Beno?t Minisini : >>> > Hello to all. >>> > >>> > In gambas3 (qt4 component), the main space on apps window is opaque, >>> > and don't integrate very well with the oxygen theme (default in KDE). >>> > >>> > To has a good apparency, the space in window must ?follow the system >>> > style, like native qt4 applications. >>> > >>> > An image say more than one thousand words: >>> > http://www.flickr.com/photos/13180019 at ...2423.../4557786418/sizes/o/ >>> > >>> > Is that behavior expected? >>> >>> Yes, but I don't remember why. I will see if I can do something about that! >>> >>> Regards, >> >> It should be better with revision #2919. >> >> In that revision, controls were made non-opaque as much as possible, so that >> gradients are displayed correctly. >> >> Regards, >> >> -- >> Beno?t Minisini >> >> ------------------------------------------------------------------------------ >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > From dag.jarle.johansen at ...2312... Wed Apr 28 06:14:33 2010 From: dag.jarle.johansen at ...2312... (Dag Jarle Johansen) Date: Wed, 28 Apr 2010 01:14:33 -0300 Subject: [Gambas-user] [SPAM] SVN-Problem In-Reply-To: <201004261131.05082.gambas@...1...> References: <4BD556CF.2070708@...221...> <201004261131.05082.gambas@...1...> Message-ID: Hi, I installed the latest SVN from the scratch, now having a problem starting Gambas. Removed all existing files as follows: sudo rm -f /usr/local/bin/gbx3 /usr/local/bin/gbc3 /usr/local/bin/gba3 /usr/local/bin/gbi3 sudo rm -rf /usr/local/lib/gambas3 sudo rm -rf /usr/local/share/gambas3 sudo rm -r trunk Then mkdir trunk sudo svn checkout https://gambas.svn.sourceforge.net/svnroot/gambas/gambas/trunk/ cd trunk sudo ./reconf-all sudo apt-get install build-essential autoconf libbz2-dev libfbclient2 libmysqlclient15-dev unixodbc-dev libpq-dev libsqlite0-dev libsqlite3-dev libgtk2.0-dev libldap2-dev libcurl4-gnutls-dev libgtkglext1-dev libpcre3-dev libsdl-sound1.2-dev libsdl-mixer1.2-dev libsdl-image1.2-dev libsage-dev libxml2-dev libxslt1-dev libbonobo2-dev libcos4-dev libomniorb4-dev librsvg2-dev libpoppler-dev libpoppler-glib-dev libasound2-dev libesd0-dev libesd-alsa0 libdirectfb-dev libaa1-dev libxtst-dev libffi-dev kdelibs4-dev firebird2.1-dev libqt4-dev libglew1.5-dev libimlib2-dev libv4l-dev libsdl-ttf2.0-dev sudo ./configure -C sudo make sudo make install I did not see any errors, but off course it I could have missed some, is though a lot of messages. When starting gambas3 I get the message: dag at ...2352...:~/rep/trunk$ gambas3 ERROR: #2: Cannot load class 'Balloon': Unable to load class file Anyone help? Thanks in advance, regards Dag From gambas at ...1... Wed Apr 28 11:01:59 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 28 Apr 2010 11:01:59 +0200 Subject: [Gambas-user] [SPAM] SVN-Problem In-Reply-To: References: <4BD556CF.2070708@...221...> <201004261131.05082.gambas@...1...> Message-ID: <201004281101.59696.gambas@...1...> > Hi, > > I installed the latest SVN from the scratch, now having a problem > starting Gambas. > > Removed all existing files as follows: > > sudo rm > -f /usr/local/bin/gbx3 /usr/local/bin/gbc3 /usr/local/bin/gba3 > /usr/local/bin/gbi3 sudo rm -rf /usr/local/lib/gambas3 > sudo rm -rf /usr/local/share/gambas3 > sudo rm -r trunk > > Then > > mkdir trunk > sudo svn checkout > https://gambas.svn.sourceforge.net/svnroot/gambas/gambas/trunk/ > > cd trunk > sudo ./reconf-all > > > sudo apt-get install build-essential autoconf libbz2-dev libfbclient2 > libmysqlclient15-dev unixodbc-dev libpq-dev libsqlite0-dev > libsqlite3-dev libgtk2.0-dev libldap2-dev libcurl4-gnutls-dev > libgtkglext1-dev libpcre3-dev libsdl-sound1.2-dev libsdl-mixer1.2-dev > libsdl-image1.2-dev libsage-dev libxml2-dev libxslt1-dev libbonobo2-dev > libcos4-dev libomniorb4-dev librsvg2-dev libpoppler-dev > libpoppler-glib-dev libasound2-dev libesd0-dev libesd-alsa0 > libdirectfb-dev libaa1-dev libxtst-dev libffi-dev kdelibs4-dev > firebird2.1-dev libqt4-dev libglew1.5-dev libimlib2-dev libv4l-dev > libsdl-ttf2.0-dev > > sudo ./configure -C > sudo make > sudo make install > > I did not see any errors, but off course it I could have missed some, is > though a lot of messages. > Please provide the output of './configure -C', 'make' and 'make install'. And note that you must not run './configure -C' and 'make' as root. Only 'make install'! Regards, -- Beno?t Minisini From Karl.Reinl at ...2345... Wed Apr 28 13:27:02 2010 From: Karl.Reinl at ...2345... (Charlie Reinl) Date: Wed, 28 Apr 2010 13:27:02 +0200 Subject: [Gambas-user] Mouse Clicks become unresponsive on form? In-Reply-To: <201004272301.13461.gambas@...1...> References: <28359348.post@...1379...> <201004270058.17435.gambas@...1...> <28381910.post@...1379...> <201004272301.13461.gambas@...1...> Message-ID: <1272454022.6514.6.camel@...40...> Am Dienstag, den 27.04.2010, 23:01 +0200 schrieb Beno?t Minisini: > > Beno?t Minisini wrote: > > >> Beno?t Minisini wrote: > > >> >> Running SVN 2910. After a few mouse click, either switching a few > > >> >> > > >> >> > > >> >> Many Thanks! > > >> > > > >> > Your main form has the Type property set to "Menu". It should be set > > >> > to "Normal". > > >> > > > >> > Can you try with the Type property set to "Normal", and tell me if you > > >> > have > > >> > strange click behaviour again? > > >> > > >> Yes, still have the same mouse problem with gtk after setting main form > > >> type to Normal. > > >> > > >> Thanks > > > > > > I can't see any problem: can you depict it more precisely please? > > > > Not much else to say. After clicking the Data, then World, then Data tab, > > no other mouse clicks work. It is like the app is hung. > > Is it really hung, or is it something else ? Can you pause the program from > the IDE ? Can you stop it with gdb ? > Salut, have sometimes on Ubuntu 8.04.4 LTS a "lost mouse" on two FS-Scenic Computer, for me the mouse comes back when changing windows by ALT-TAB. And it is not only with gambas (I use mostly gambas2) -- Amicalement Charlie From gambas at ...1... Wed Apr 28 13:59:09 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 28 Apr 2010 13:59:09 +0200 Subject: [Gambas-user] oxygen border theme and gb.qt4 component visual issues In-Reply-To: References: <201004272308.18561.gambas@...1...> Message-ID: <201004281359.09289.gambas@...1...> > Thanks very much. > Now it looks better :-) > > But now there is another problem :-) When menubar is hidden, it looks > "below" of toolbar. The toolbar buttons work fine, but I can see the > menubar yet, below them. > Fixed in revision #2922. Regards, -- Beno?t Minisini From dag.jarle.johansen at ...2312... Wed Apr 28 13:59:47 2010 From: dag.jarle.johansen at ...2312... (Dag Jarle Johansen) Date: Wed, 28 Apr 2010 08:59:47 -0300 Subject: [Gambas-user] [SPAM] SVN-Problem In-Reply-To: <201004281101.59696.gambas@...1...> References: <4BD556CF.2070708@...221...> <201004261131.05082.gambas@...1...> <201004281101.59696.gambas@...1...> Message-ID: Hi Benoit, thanks. I'll try what you told me before sending the output, so you don't have to mess with something that perhaps though works... And still do not understand that I get SPAM in the Mail-Address, but I soon will change provider, have to look then... regards, Dag Am Mittwoch, den 28.04.2010, 11:01 +0200 schrieb Beno?t Minisini: > > Hi, > > > > I installed the latest SVN from the scratch, now having a problem > > starting Gambas. > > > > Removed all existing files as follows: > > > > sudo rm > > -f /usr/local/bin/gbx3 /usr/local/bin/gbc3 /usr/local/bin/gba3 > > /usr/local/bin/gbi3 sudo rm -rf /usr/local/lib/gambas3 > > sudo rm -rf /usr/local/share/gambas3 > > sudo rm -r trunk > > > > Then > > > > mkdir trunk > > sudo svn checkout > > https://gambas.svn.sourceforge.net/svnroot/gambas/gambas/trunk/ > > > > cd trunk > > sudo ./reconf-all > > > > > > sudo apt-get install build-essential autoconf libbz2-dev libfbclient2 > > libmysqlclient15-dev unixodbc-dev libpq-dev libsqlite0-dev > > libsqlite3-dev libgtk2.0-dev libldap2-dev libcurl4-gnutls-dev > > libgtkglext1-dev libpcre3-dev libsdl-sound1.2-dev libsdl-mixer1.2-dev > > libsdl-image1.2-dev libsage-dev libxml2-dev libxslt1-dev libbonobo2-dev > > libcos4-dev libomniorb4-dev librsvg2-dev libpoppler-dev > > libpoppler-glib-dev libasound2-dev libesd0-dev libesd-alsa0 > > libdirectfb-dev libaa1-dev libxtst-dev libffi-dev kdelibs4-dev > > firebird2.1-dev libqt4-dev libglew1.5-dev libimlib2-dev libv4l-dev > > libsdl-ttf2.0-dev > > > > sudo ./configure -C > > sudo make > > sudo make install > > > > I did not see any errors, but off course it I could have missed some, is > > though a lot of messages. > > > > Please provide the output of './configure -C', 'make' and 'make install'. And > note that you must not run './configure -C' and 'make' as root. Only 'make > install'! > > Regards, > From dickfrost at ...2291... Wed Apr 28 15:43:40 2010 From: dickfrost at ...2291... (Richard Frost) Date: Wed, 28 Apr 2010 09:43:40 -0400 Subject: [Gambas-user] Gambas3 - file or directory does not exist (run error), (Richard Frost) In-Reply-To: References: Message-ID: <4BD83B8C.9070708@...2291...> gambas-user-request at lists.sourceforge.net wrote: > Message: 3 > Date: Wed, 21 Apr 2010 16:35:46 -0400 > From: Richard Frost > Subject: [Gambas-user] Gambas3 - file or directory does not exist (run > error) > To: gambas-user at lists.sourceforge.net > Message-ID: <4BCF61A2.9010007 at ...2291...> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > I am using Ubuntu Karmic, and just tried to update to the most recent > svn Gambas3 version (2906) .... compile appears OK, but when I try to > run it I get: > > CRecentFile._new.15: #45: File or directory does not exist > 0: CRecentFile._new.15 > 1: CRecentFile.Load.82 > 2: Project.Mail.199 > > I had installed an older version last fall which had been working OK ... > > Thanks for any help, Dick Frost > > Maybe everyone else knows this, but what I eventually found was a Gambas3.conf file which contains the list of recent projects, and some of these no longer existed after I installed the new svn version ... simply removing them from the config file fixed the problem. Dick Frost From gambas at ...1... Wed Apr 28 15:48:43 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 28 Apr 2010 15:48:43 +0200 Subject: [Gambas-user] Gambas3 - file or directory does not exist (run error), (Richard Frost) In-Reply-To: <4BD83B8C.9070708@...2291...> References: <4BD83B8C.9070708@...2291...> Message-ID: <201004281548.43717.gambas@...1...> > gambas-user-request at lists.sourceforge.net wrote: > > Message: 3 > > Date: Wed, 21 Apr 2010 16:35:46 -0400 > > From: Richard Frost > > Subject: [Gambas-user] Gambas3 - file or directory does not exist (run > > > > error) > > > > To: gambas-user at lists.sourceforge.net > > Message-ID: <4BCF61A2.9010007 at ...2291...> > > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > > > I am using Ubuntu Karmic, and just tried to update to the most recent > > svn Gambas3 version (2906) .... compile appears OK, but when I try to > > run it I get: > > > > CRecentFile._new.15: #45: File or directory does not exist > > 0: CRecentFile._new.15 > > 1: CRecentFile.Load.82 > > 2: Project.Mail.199 > > > > I had installed an older version last fall which had been working OK ... > > > > Thanks for any help, Dick Frost > > Maybe everyone else knows this, but what I eventually found was a > Gambas3.conf file which contains the list of recent projects, and some > of these no longer existed after I installed the new svn version ... > simply removing them from the config file fixed the problem. > > Dick Frost > Oops, I thought I have fixed that bug, and I have actually forgotten a corner case. I will fix it in a next revision. Regards, -- Beno?t Minisini From dag.jarle.johansen at ...2312... Wed Apr 28 16:23:31 2010 From: dag.jarle.johansen at ...2312... (Dag Jarle Johansen) Date: Wed, 28 Apr 2010 11:23:31 -0300 Subject: [Gambas-user] [SPAM] SVN-Problem In-Reply-To: <201004281101.59696.gambas@...1...> References: <4BD556CF.2070708@...221...> <201004261131.05082.gambas@...1...> <201004281101.59696.gambas@...1...> Message-ID: Hi Benoit, I tried as you told me, but I get errors. First, without root I do not get the trunk; it loads but trunk ist almost empty after getting the SVN. SO I tried with sudo .... This worked, but then I seem to get permission problems. Here the output of ./configure -C dag at ...2352...:~/rep/trunk$ ./configure -C configure: creating cache config.cache checking whether to enable maintainer-specific portions of Makefiles... no checking for a BSD-compatible install... /usr/bin/install -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 build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu configure: updating cache config.cache configure: creating ./config.status config.status: creating Makefile config.status: creating config.h === configuring in main (/home/dag/rep/trunk/main) configure: running /bin/bash ./configure --disable-option-checking '--prefix=/usr/local' --cache-file=../config.cache --srcdir=. ./configure: line 2078: config.log: Permission denied ./configure: line 2088: config.log: Permission denied configure: error: ./configure failed for main dag at ...2352...:~/rep/trunk$ ./configure -C> configure.output.txt ./configure: line 2078: config.log: Permission denied ./configure: line 2088: config.log: Permission denied configure: error: ./configure failed for main I made mkdir trunk without sudo, so it is not clear to me, why the SVN is not loading properly regards, dag Am Mittwoch, den 28.04.2010, 11:01 +0200 schrieb Beno?t Minisini: > > Hi, > > > > I installed the latest SVN from the scratch, now having a problem > > starting Gambas. > > > > Removed all existing files as follows: > > > > sudo rm > > -f /usr/local/bin/gbx3 /usr/local/bin/gbc3 /usr/local/bin/gba3 > > /usr/local/bin/gbi3 sudo rm -rf /usr/local/lib/gambas3 > > sudo rm -rf /usr/local/share/gambas3 > > sudo rm -r trunk > > > > Then > > > > mkdir trunk > > sudo svn checkout > > https://gambas.svn.sourceforge.net/svnroot/gambas/gambas/trunk/ > > > > cd trunk > > sudo ./reconf-all > > > > > > sudo apt-get install build-essential autoconf libbz2-dev > libfbclient2 > > libmysqlclient15-dev unixodbc-dev libpq-dev libsqlite0-dev > > libsqlite3-dev libgtk2.0-dev libldap2-dev libcurl4-gnutls-dev > > libgtkglext1-dev libpcre3-dev libsdl-sound1.2-dev > libsdl-mixer1.2-dev > > libsdl-image1.2-dev libsage-dev libxml2-dev libxslt1-dev > libbonobo2-dev > > libcos4-dev libomniorb4-dev librsvg2-dev libpoppler-dev > > libpoppler-glib-dev libasound2-dev libesd0-dev libesd-alsa0 > > libdirectfb-dev libaa1-dev libxtst-dev libffi-dev kdelibs4-dev > > firebird2.1-dev libqt4-dev libglew1.5-dev libimlib2-dev libv4l-dev > > libsdl-ttf2.0-dev > > > > sudo ./configure -C > > sudo make > > sudo make install > > > > I did not see any errors, but off course it I could have missed > some, is > > though a lot of messages. > > > > Please provide the output of './configure -C', 'make' and 'make > install'. And > note that you must not run './configure -C' and 'make' as root. Only > 'make > install'! > > Regards, > > -- > Beno?t Minisini > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > From dag.jarle.johansen at ...2312... Wed Apr 28 16:42:56 2010 From: dag.jarle.johansen at ...2312... (Dag Jarle Johansen) Date: Wed, 28 Apr 2010 11:42:56 -0300 Subject: [Gambas-user] [SPAM] SVN-Problem In-Reply-To: References: <4BD556CF.2070708@...221...> <201004261131.05082.gambas@...1...> <201004281101.59696.gambas@...1...> Message-ID: Hi Benoit, don't ask me why, now it worked, did all with sudo. just repeated the routines from yesterday, I have no idea what happened. Thanks anyway, regards Dag Am Mittwoch, den 28.04.2010, 11:23 -0300 schrieb Dag Jarle Johansen: > Hi Benoit, > > I tried as you told me, but I get errors. > First, without root I do not get the trunk; it loads but trunk ist > almost empty after getting the SVN. SO I tried with sudo .... > This worked, but then I seem to get permission problems. > > Here the output of ./configure -C > > dag at ...2352...:~/rep/trunk$ ./configure -C > configure: creating cache config.cache > checking whether to enable maintainer-specific portions of Makefiles... > no > checking for a BSD-compatible install... /usr/bin/install -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 build system type... x86_64-unknown-linux-gnu > checking host system type... x86_64-unknown-linux-gnu > configure: updating cache config.cache > configure: creating ./config.status > config.status: creating Makefile > config.status: creating config.h > === configuring in main (/home/dag/rep/trunk/main) > configure: running /bin/bash ./configure --disable-option-checking > '--prefix=/usr/local' --cache-file=../config.cache --srcdir=. > ./configure: line 2078: config.log: Permission denied > ./configure: line 2088: config.log: Permission denied > configure: error: ./configure failed for main > dag at ...2352...:~/rep/trunk$ ./configure -C> configure.output.txt > ./configure: line 2078: config.log: Permission denied > ./configure: line 2088: config.log: Permission denied > configure: error: ./configure failed for main > > I made mkdir trunk without sudo, so it is not clear to me, why the SVN > is not loading properly > > regards, dag > > > > > > Am Mittwoch, den 28.04.2010, 11:01 +0200 schrieb Beno?t Minisini: > > > Hi, > > > > > > I installed the latest SVN from the scratch, now having a problem > > > starting Gambas. > > > > > > Removed all existing files as follows: > > > > > > sudo rm > > > -f /usr/local/bin/gbx3 /usr/local/bin/gbc3 /usr/local/bin/gba3 > > > /usr/local/bin/gbi3 sudo rm -rf /usr/local/lib/gambas3 > > > sudo rm -rf /usr/local/share/gambas3 > > > sudo rm -r trunk > > > > > > Then > > > > > > mkdir trunk > > > sudo svn checkout > > > https://gambas.svn.sourceforge.net/svnroot/gambas/gambas/trunk/ > > > > > > cd trunk > > > sudo ./reconf-all > > > > > > > > > sudo apt-get install build-essential autoconf libbz2-dev > > libfbclient2 > > > libmysqlclient15-dev unixodbc-dev libpq-dev libsqlite0-dev > > > libsqlite3-dev libgtk2.0-dev libldap2-dev libcurl4-gnutls-dev > > > libgtkglext1-dev libpcre3-dev libsdl-sound1.2-dev > > libsdl-mixer1.2-dev > > > libsdl-image1.2-dev libsage-dev libxml2-dev libxslt1-dev > > libbonobo2-dev > > > libcos4-dev libomniorb4-dev librsvg2-dev libpoppler-dev > > > libpoppler-glib-dev libasound2-dev libesd0-dev libesd-alsa0 > > > libdirectfb-dev libaa1-dev libxtst-dev libffi-dev kdelibs4-dev > > > firebird2.1-dev libqt4-dev libglew1.5-dev libimlib2-dev libv4l-dev > > > libsdl-ttf2.0-dev > > > > > > sudo ./configure -C > > > sudo make > > > sudo make install > > > > > > I did not see any errors, but off course it I could have missed > > some, is > > > though a lot of messages. > > > > > > > Please provide the output of './configure -C', 'make' and 'make > > install'. And > > note that you must not run './configure -C' and 'make' as root. Only > > 'make > > install'! > > > > Regards, > > > > -- > > Beno?t Minisini > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From Karl.Reinl at ...2345... Wed Apr 28 16:47:04 2010 From: Karl.Reinl at ...2345... (Charlie Reinl) Date: Wed, 28 Apr 2010 16:47:04 +0200 Subject: [Gambas-user] [SPAM] SVN-Problem In-Reply-To: References: <4BD556CF.2070708@...221...> <201004261131.05082.gambas@...1...> <201004281101.59696.gambas@...1...> Message-ID: <1272466024.7856.5.camel@...40...> Am Mittwoch, den 28.04.2010, 11:23 -0300 schrieb Dag Jarle Johansen: > Hi Benoit, > > I tried as you told me, but I get errors. > First, without root I do not get the trunk; it loads but trunk ist > almost empty after getting the SVN. SO I tried with sudo .... > This worked, but then I seem to get permission problems. > > Here the output of ./configure -C > > dag at ...2352...:~/rep/trunk$ ./configure -C > configure: creating cache config.cache > checking whether to enable maintainer-specific portions of Makefiles... > no > checking for a BSD-compatible install... /usr/bin/install -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 build system type... x86_64-unknown-linux-gnu > checking host system type... x86_64-unknown-linux-gnu > configure: updating cache config.cache > configure: creating ./config.status > config.status: creating Makefile > config.status: creating config.h > === configuring in main (/home/dag/rep/trunk/main) > configure: running /bin/bash ./configure --disable-option-checking > '--prefix=/usr/local' --cache-file=../config.cache --srcdir=. > ./configure: line 2078: config.log: Permission denied > ./configure: line 2088: config.log: Permission denied > configure: error: ./configure failed for main > dag at ...2352...:~/rep/trunk$ ./configure -C> configure.output.txt > ./configure: line 2078: config.log: Permission denied > ./configure: line 2088: config.log: Permission denied > configure: error: ./configure failed for main > > I made mkdir trunk without sudo, so it is not clear to me, why the SVN > is not loading properly > > regards, dag > > > > > > Am Mittwoch, den 28.04.2010, 11:01 +0200 schrieb Beno?t Minisini: > > > Hi, > > > > > > I installed the latest SVN from the scratch, now having a problem > > > starting Gambas. > > > > > > Removed all existing files as follows: > > > > > > sudo rm > > > -f /usr/local/bin/gbx3 /usr/local/bin/gbc3 /usr/local/bin/gba3 > > > /usr/local/bin/gbi3 sudo rm -rf /usr/local/lib/gambas3 > > > sudo rm -rf /usr/local/share/gambas3 > > > sudo rm -r trunk > > > > > > Then > > > > > > mkdir trunk > > > sudo svn checkout > > > https://gambas.svn.sourceforge.net/svnroot/gambas/gambas/trunk/ > > > > > > cd trunk > > > sudo ./reconf-all > > > > > > > > > sudo apt-get install build-essential autoconf libbz2-dev > > libfbclient2 > > > libmysqlclient15-dev unixodbc-dev libpq-dev libsqlite0-dev > > > libsqlite3-dev libgtk2.0-dev libldap2-dev libcurl4-gnutls-dev > > > libgtkglext1-dev libpcre3-dev libsdl-sound1.2-dev > > libsdl-mixer1.2-dev > > > libsdl-image1.2-dev libsage-dev libxml2-dev libxslt1-dev > > libbonobo2-dev > > > libcos4-dev libomniorb4-dev librsvg2-dev libpoppler-dev > > > libpoppler-glib-dev libasound2-dev libesd0-dev libesd-alsa0 > > > libdirectfb-dev libaa1-dev libxtst-dev libffi-dev kdelibs4-dev > > > firebird2.1-dev libqt4-dev libglew1.5-dev libimlib2-dev libv4l-dev > > > libsdl-ttf2.0-dev > > > > > > sudo ./configure -C > > > sudo make > > > sudo make install > > > > > > I did not see any errors, but off course it I could have missed > > some, is > > > though a lot of messages. > > > > > > > Please provide the output of './configure -C', 'make' and 'make > > install'. And > > note that you must not run './configure -C' and 'make' as root. Only > > 'make > > install'! > > > > Regards, > > > > -- > > Beno?t Minisini > > Salut Dag, sent you 2 script (make them executable) copy then to the dir you will work. and call ./update30 ( edit {TARGET} first ) svnMake is copied every time you run ./update30 into {TARGET} so it takes every change you make (and you can clean up by rm {TARGET}) The script is writing every time a log The scripts work for ubuntu with sudo but please before installing the svn version, remove the existing gambas3 version. -- Cordialement Charlie -------------- next part -------------- A non-text attachment was scrubbed... Name: svnMake Type: application/x-shellscript Size: 1033 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: update30 Type: application/x-shellscript Size: 675 bytes Desc: not available URL: From dag.jarle.johansen at ...2312... Wed Apr 28 17:12:33 2010 From: dag.jarle.johansen at ...2312... (Dag Jarle Johansen) Date: Wed, 28 Apr 2010 12:12:33 -0300 Subject: [Gambas-user] [SPAM] SVN-Problem In-Reply-To: <1272466024.7856.5.camel@...40...> References: <4BD556CF.2070708@...221...> <201004261131.05082.gambas@...1...> <201004281101.59696.gambas@...1...> <1272466024.7856.5.camel@...40...> Message-ID: Am Mittwoch, den 28.04.2010, 16:47 +0200 schrieb Charlie Reinl: > Am Mittwoch, den 28.04.2010, 11:23 -0300 schrieb Dag Jarle Johansen: > > Hi Benoit, > > > > I tried as you told me, but I get errors. > > First, without root I do not get the trunk; it loads but trunk ist > > almost empty after getting the SVN. SO I tried with sudo .... > > This worked, but then I seem to get permission problems. > > > > Here the output of ./configure -C > > > > dag at ...2352...:~/rep/trunk$ ./configure -C > > configure: creating cache config.cache > > checking whether to enable maintainer-specific portions of Makefiles... > > no > > checking for a BSD-compatible install... /usr/bin/install -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 build system type... x86_64-unknown-linux-gnu > > checking host system type... x86_64-unknown-linux-gnu > > configure: updating cache config.cache > > configure: creating ./config.status > > config.status: creating Makefile > > config.status: creating config.h > > === configuring in main (/home/dag/rep/trunk/main) > > configure: running /bin/bash ./configure --disable-option-checking > > '--prefix=/usr/local' --cache-file=../config.cache --srcdir=. > > ./configure: line 2078: config.log: Permission denied > > ./configure: line 2088: config.log: Permission denied > > configure: error: ./configure failed for main > > dag at ...2352...:~/rep/trunk$ ./configure -C> configure.output.txt > > ./configure: line 2078: config.log: Permission denied > > ./configure: line 2088: config.log: Permission denied > > configure: error: ./configure failed for main > > > > I made mkdir trunk without sudo, so it is not clear to me, why the SVN > > is not loading properly > > > > regards, dag > > > > > > > > > > > > Am Mittwoch, den 28.04.2010, 11:01 +0200 schrieb Beno?t Minisini: > > > > Hi, > > > > > > > > I installed the latest SVN from the scratch, now having a problem > > > > starting Gambas. > > > > > > > > Removed all existing files as follows: > > > > > > > > sudo rm > > > > -f /usr/local/bin/gbx3 /usr/local/bin/gbc3 /usr/local/bin/gba3 > > > > /usr/local/bin/gbi3 sudo rm -rf /usr/local/lib/gambas3 > > > > sudo rm -rf /usr/local/share/gambas3 > > > > sudo rm -r trunk > > > > > > > > Then > > > > > > > > mkdir trunk > > > > sudo svn checkout > > > > https://gambas.svn.sourceforge.net/svnroot/gambas/gambas/trunk/ > > > > > > > > cd trunk > > > > sudo ./reconf-all > > > > > > > > > > > > sudo apt-get install build-essential autoconf libbz2-dev > > > libfbclient2 > > > > libmysqlclient15-dev unixodbc-dev libpq-dev libsqlite0-dev > > > > libsqlite3-dev libgtk2.0-dev libldap2-dev libcurl4-gnutls-dev > > > > libgtkglext1-dev libpcre3-dev libsdl-sound1.2-dev > > > libsdl-mixer1.2-dev > > > > libsdl-image1.2-dev libsage-dev libxml2-dev libxslt1-dev > > > libbonobo2-dev > > > > libcos4-dev libomniorb4-dev librsvg2-dev libpoppler-dev > > > > libpoppler-glib-dev libasound2-dev libesd0-dev libesd-alsa0 > > > > libdirectfb-dev libaa1-dev libxtst-dev libffi-dev kdelibs4-dev > > > > firebird2.1-dev libqt4-dev libglew1.5-dev libimlib2-dev libv4l-dev > > > > libsdl-ttf2.0-dev > > > > > > > > sudo ./configure -C > > > > sudo make > > > > sudo make install > > > > > > > > I did not see any errors, but off course it I could have missed > > > some, is > > > > though a lot of messages. > > > > > > > > > > Please provide the output of './configure -C', 'make' and 'make > > > install'. And > > > note that you must not run './configure -C' and 'make' as root. Only > > > 'make > > > install'! > > > > > > Regards, > > > > > > -- > > > Beno?t Minisini > > > > Salut Dag, > > sent you 2 script (make them executable) > copy then to the dir you will work. > and call ./update30 ( edit {TARGET} first ) > > svnMake is copied every time you run ./update30 into {TARGET} so it > takes every change you make (and you can clean up by rm {TARGET}) > > The script is writing every time a log > > The scripts work for ubuntu with sudo > > but please before installing the svn version, remove the existing > gambas3 version. > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user Thanks, Charlie, that will help. Somehow I always get messed up when updating, and don't like it at all :) I am greatful for your help. Regards, Dag From zachsmith022 at ...626... Wed Apr 28 17:57:41 2010 From: zachsmith022 at ...626... (zachsmith022 at ...626...) Date: Wed, 28 Apr 2010 10:57:41 -0500 Subject: [Gambas-user] Cannot load class 'Balloon' In-Reply-To: <28375384.post@...1379...> References: <28375384.post@...1379...> Message-ID: <4BD85AF5.6030803@...626...> On 4/27/2010 5:38 AM, charlesg wrote: > Gambas3 2918 compiles fine on Ubuntu 10.04 32bit release candidate. > > But gives: > ERROR: #2: Cannot load class 'Balloon': Unable to load class file > when run. > I have the same problem. Arch, 32 bit, gambas 3, rev. 2922 From gambas at ...1... Wed Apr 28 18:29:39 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 28 Apr 2010 18:29:39 +0200 Subject: [Gambas-user] Cannot load class 'Balloon' In-Reply-To: <4BD85AF5.6030803@...626...> References: <28375384.post@...1379...> <4BD85AF5.6030803@...626...> Message-ID: <201004281829.39351.gambas@...1...> > On 4/27/2010 5:38 AM, charlesg wrote: > > Gambas3 2918 compiles fine on Ubuntu 10.04 32bit release candidate. > > > > But gives: > > ERROR: #2: Cannot load class 'Balloon': Unable to load class file > > when run. > > I have the same problem. > Arch, 32 bit, gambas 3, rev. 2922 > As usual, please provide the full output of './configure', 'make' and 'make install', otherwise I can't guess what the problem is! -- Beno?t Minisini From charles at ...1784... Wed Apr 28 19:04:25 2010 From: charles at ...1784... (charlesg) Date: Wed, 28 Apr 2010 10:04:25 -0700 (PDT) Subject: [Gambas-user] Cannot load class 'Balloon' In-Reply-To: <4BD85AF5.6030803@...626...> References: <28375384.post@...1379...> <4BD85AF5.6030803@...626...> Message-ID: <28391396.post@...1379...> Hi I fixed the balloon error by loading Ubuntu package intltool (don't know the Arch equivalent). Now it loads but still does not run so there must be other unsatisfied dependencies. Somebody on the Ubuntu forum has got it working (Gambas 2.99 on ub10.04 64bit) but has not spilled the beans yet. rgds -- View this message in context: http://old.nabble.com/Cannot-load-class-%27Balloon%27-tp28375384p28391396.html Sent from the gambas-user mailing list archive at Nabble.com. From matteo.pasotti at ...626... Wed Apr 28 19:15:28 2010 From: matteo.pasotti at ...626... (Matteo Pasotti) Date: Wed, 28 Apr 2010 19:15:28 +0200 Subject: [Gambas-user] Cannot load class 'Balloon' In-Reply-To: <28391396.post@...1379...> References: <28375384.post@...1379...> <4BD85AF5.6030803@...626...> <28391396.post@...1379...> Message-ID: <4BD86D30.8070209@...626...> Il 28/04/2010 19:04, charlesg ha scritto: > Hi > > I fixed the balloon error by loading Ubuntu package intltool (don't know the > Arch equivalent). Now it loads but still does not run so there must be other > unsatisfied dependencies. Somebody on the Ubuntu forum has got it working > (Gambas 2.99 on ub10.04 64bit) but has not spilled the beans yet. > > rgds > On Fedora 12 x86_64 the rev. 2922 works fine. Regards -- Matteo From gambas.fr at ...626... Wed Apr 28 20:13:12 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Wed, 28 Apr 2010 20:13:12 +0200 Subject: [Gambas-user] Cannot load class 'Balloon' In-Reply-To: <4BD86D30.8070209@...626...> References: <28375384.post@...1379...> <4BD85AF5.6030803@...626...> <28391396.post@...1379...> <4BD86D30.8070209@...626...> Message-ID: on ubuntu 10.04 work fine for me too have you tryed to remove the all the svn and start from scratch ? 2010/4/28 Matteo Pasotti : > Il 28/04/2010 19:04, charlesg ha scritto: >> Hi >> >> I fixed the balloon error by loading Ubuntu package intltool (don't know the >> Arch equivalent). Now it loads but still does not run so there must be other >> unsatisfied dependencies. Somebody on the Ubuntu forum has got it working >> (Gambas 2.99 on ub10.04 64bit) but has not spilled the beans yet. >> >> rgds >> > On Fedora 12 x86_64 the rev. 2922 works fine. > > Regards > > -- > Matteo > > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From leandrosansilva at ...626... Wed Apr 28 21:41:50 2010 From: leandrosansilva at ...626... (Leandro Santiago) Date: Wed, 28 Apr 2010 16:41:50 -0300 Subject: [Gambas-user] oxygen border theme and gb.qt4 component visual issues In-Reply-To: <201004281359.09289.gambas@...1...> References: <201004272308.18561.gambas@...1...> <201004281359.09289.gambas@...1...> Message-ID: Thx :-) 2010/4/28 Beno?t Minisini : >> Thanks very much. >> Now it looks better :-) >> >> But now there is another problem :-) When menubar is hidden, it looks >> "below" of toolbar. The toolbar buttons work fine, but I can see the >> menubar yet, below them. >> > > Fixed in revision #2922. > > Regards, > > -- > Beno?t Minisini > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From prog at ...2177... Thu Apr 29 04:47:24 2010 From: prog at ...2177... (craf) Date: Wed, 28 Apr 2010 22:47:24 -0400 Subject: [Gambas-user] Installer Message-ID: <1272509244.2001.4.camel@...2406...> Hi Benoit Finally!. I managed to perform an installation of a draft Gambas, only with the shared libraries. Far only tested on Ubuntu from 9.10 to 8.04, version 6.06 does not work by having a GLIC less than 2.7. Well, now to keep trying with other Distro. Greetings and thank you very much Cristian From gambas at ...1... Thu Apr 29 14:55:22 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Thu, 29 Apr 2010 14:55:22 +0200 Subject: [Gambas-user] Installer In-Reply-To: <1272509244.2001.4.camel@...2406...> References: <1272509244.2001.4.camel@...2406...> Message-ID: <201004291455.22998.gambas@...1...> > Hi Benoit > > Finally!. > > I managed to perform an installation of a draft Gambas, only with the > shared libraries. > Far only tested on Ubuntu from 9.10 to 8.04, version 6.06 does not work > by having a GLIC less than 2.7. > Well, now to keep trying with other Distro. > > Greetings and thank you very much > > Cristian Can you make a summary of your work for us? Thanks in advance! Regards, -- Beno?t Minisini From zachsmith022 at ...626... Thu Apr 29 16:26:12 2010 From: zachsmith022 at ...626... (Zach Smith) Date: Thu, 29 Apr 2010 09:26:12 -0500 Subject: [Gambas-user] Cannot load class 'Balloon' In-Reply-To: <201004281829.39351.gambas@...1...> References: <28375384.post@...1379...> <4BD85AF5.6030803@...626...> <201004281829.39351.gambas@...1...> Message-ID: Sorry, here it is. -------------- next part -------------- A non-text attachment was scrubbed... Name: gambas3_svn2923.txt.bz2 Type: application/x-bzip2 Size: 49324 bytes Desc: not available URL: From prog at ...2177... Thu Apr 29 17:26:45 2010 From: prog at ...2177... (craf) Date: Thu, 29 Apr 2010 11:26:45 -0400 Subject: [Gambas-user] Installer In-Reply-To: <201004291455.22998.gambas@...1...> References: <1272509244.2001.4.camel@...2406...> <201004291455.22998.gambas@...1...> Message-ID: <1272554805.1967.1.camel@...2406...> -----Mensaje original----- De: Beno?t Minisini Reply-to: mailing list for gambas users Para: mailing list for gambas users Asunto: Re: [Gambas-user] Installer Fecha: Thu, 29 Apr 2010 14:55:22 +0200 > Hi Benoit > > Finally!. > > I managed to perform an installation of a draft Gambas, only with the > shared libraries. > Far only tested on Ubuntu from 9.10 to 8.04, version 6.06 does not work > by having a GLIC less than 2.7. > Well, now to keep trying with other Distro. > > Greetings and thank you very much > > Cristian >Can you make a summary of your work for us? >Thanks in advance! >Regards, Of course! 1. I searched the minimum components needed by a program with gtk: gb.gt, gb.so.etc. 2. With the command ldd, I searched all the necessary libraries for these components. 3. In the necessary libraries for GTK, I eliminated those that were related to libglib, libgcc, libpcre. (This had to do this by selecting one by one the libraries on a trial and error). 4. Now, I will try the QT libraries, the first idea is to see that a basic application in GTK and QT works, then try them in the most widely used distributions (Mandriva, Ubuntu, Fedora, Suse, Debian, etc) and then try make a sketch of an installer. From gambas.fr at ...626... Thu Apr 29 19:14:54 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Thu, 29 Apr 2010 19:14:54 +0200 Subject: [Gambas-user] Cannot load class 'Balloon' In-Reply-To: References: <28375384.post@...1379...> <4BD85AF5.6030803@...626...> <201004281829.39351.gambas@...1...> Message-ID: Compiling gb.form... gbc: ERROR: Component not found: gb.form Installing gb.form... try with the last svn release please, this bug seem to be resolved 2010/4/29 Zach Smith : > Sorry, here it is. > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > From gambas.fr at ...626... Thu Apr 29 19:20:57 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Thu, 29 Apr 2010 19:20:57 +0200 Subject: [Gambas-user] Installer In-Reply-To: <1272554805.1967.1.camel@...2406...> References: <1272509244.2001.4.camel@...2406...> <201004291455.22998.gambas@...1...> <1272554805.1967.1.camel@...2406...> Message-ID: did you try to store all this libs in an archive or in a directory ? in the second case if you use a personal installer it can be interesting that it have some featue like sharing all the libs in the same directory for more than one apps... but the difficulties is that look like to a package dependency management .. interesting :) 2010/4/29 craf : > -----Mensaje original----- > De: Beno?t Minisini > Reply-to: mailing list for gambas users > > Para: mailing list for gambas users > Asunto: Re: [Gambas-user] Installer > Fecha: Thu, 29 Apr 2010 14:55:22 +0200 > >> Hi Benoit >> >> Finally!. >> >> I managed to perform an installation of a draft Gambas, only with the >> shared libraries. >> Far only tested on Ubuntu from 9.10 to 8.04, version 6.06 does not work >> by having a GLIC less than 2.7. >> Well, now to keep trying with other Distro. >> >> Greetings and thank you very much >> >> Cristian > >>Can you make a summary of your work for us? > >>Thanks in advance! > >>Regards, > > Of course! > > 1. I searched the minimum components needed by a program with gtk: > gb.gt, gb.so.etc. > > 2. With the command ldd, I searched all the necessary libraries for > these components. > > 3. In the necessary libraries for GTK, I eliminated those that were > related to libglib, libgcc, libpcre. (This had to do this by selecting > one by one the libraries on a trial and error). > > 4. Now, I will try the QT libraries, the first idea is to see that a > basic application in GTK and QT works, then try them in the most widely > used distributions (Mandriva, Ubuntu, Fedora, Suse, Debian, etc) and > then try make a sketch of an installer. > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From prog at ...2177... Thu Apr 29 19:56:12 2010 From: prog at ...2177... (craf) Date: Thu, 29 Apr 2010 13:56:12 -0400 Subject: [Gambas-user] Installer In-Reply-To: References: <1272509244.2001.4.camel@...2406...> <201004291455.22998.gambas@...1...> <1272554805.1967.1.camel@...2406...> Message-ID: <1272563772.2030.5.camel@...2406...> -----Mensaje original----- De: Fabien Bodard Reply-to: mailing list for gambas users Para: mailing list for gambas users Asunto: Re: [Gambas-user] Installer Fecha: Thu, 29 Apr 2010 19:20:57 +0200 did you try to store all this libs in an archive or in a directory ? Yes, in a folder called "lib_shared" >in the second case if you use a personal installer it can be >interesting that it have some featue like sharing all the libs in the >same directory for more than one apps... It's a great idea, I had not thought >but the difficulties is that look like to a package dependency >management .. interesting :) 2010/4/29 craf : > -----Mensaje original----- > De: Beno?t Minisini > Reply-to: mailing list for gambas users > > Para: mailing list for gambas users > Asunto: Re: [Gambas-user] Installer > Fecha: Thu, 29 Apr 2010 14:55:22 +0200 > >> Hi Benoit >> >> Finally!. >> >> I managed to perform an installation of a draft Gambas, only with the >> shared libraries. >> Far only tested on Ubuntu from 9.10 to 8.04, version 6.06 does not work >> by having a GLIC less than 2.7. >> Well, now to keep trying with other Distro. >> >> Greetings and thank you very much >> >> Cristian > >>Can you make a summary of your work for us? > >>Thanks in advance! > >>Regards, > > Of course! > > 1. I searched the minimum components needed by a program with gtk: > gb.gt, gb.so.etc. > > 2. With the command ldd, I searched all the necessary libraries for > these components. > > 3. In the necessary libraries for GTK, I eliminated those that were > related to libglib, libgcc, libpcre. (This had to do this by selecting > one by one the libraries on a trial and error). > > 4. Now, I will try the QT libraries, the first idea is to see that a > basic application in GTK and QT works, then try them in the most widely > used distributions (Mandriva, Ubuntu, Fedora, Suse, Debian, etc) and > then try make a sketch of an installer. > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > ------------------------------------------------------------------------------ _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From gambas.fr at ...626... Thu Apr 29 20:45:40 2010 From: gambas.fr at ...626... (Fabien Bodard) Date: Thu, 29 Apr 2010 20:45:40 +0200 Subject: [Gambas-user] Installer In-Reply-To: <1272563772.2030.5.camel@...2406...> References: <1272509244.2001.4.camel@...2406...> <201004291455.22998.gambas@...1...> <1272554805.1967.1.camel@...2406...> <1272563772.2030.5.camel@...2406...> Message-ID: in fact the idea will be to make a Gambas apps self planet. Each application have a list of needed libs, and versions of it. if one app have a more recent lib it replace the older and if not exist, add it. if a lib is not used anymore by all the installed apps it is removed this job is done by the remover application that read all the application liblist make a fullneeded list and compare to the real installed libs in the folder. More simple it is better it is From robert1juhasz at ...626... Fri Apr 30 10:26:10 2010 From: robert1juhasz at ...626... (JUHASZ Robert) Date: Fri, 30 Apr 2010 10:26:10 +0200 Subject: [Gambas-user] 10.04 issue Message-ID: <1272615970.3350.17.camel@...2425...> Hello List, When upgraded* to ubuntu 10.04 my applications using mysql don't work anymore. If I wanna run them from Gambas then I receive unexpected error message, if I start a .gambas file from terminal then I receive something like that: ------------------------------------------------------------------------ juhasz at ...2425...:~$ /home/juhasz/Documents/Gambas/MCT/MCT.gambas ERROR: #27: Cannot load component '/usr/local/lib/gambas2/gb.db.mysql.so': libmysqlclient.so.15: cannot open shared object file: No such file or directory ------------------------------------------------------------------------ Should I try to reinstall Gambas or what do you propose me to do? *: upgrade means clicking on the button "upgrade to 10.04 LTS" from the update manager. I used Ubuntu 9.10 (32 bit) before and I my programs (including Gambas) were installed under 9.10. Regards, Robi From gambas at ...1... Fri Apr 30 10:40:03 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Fri, 30 Apr 2010 10:40:03 +0200 Subject: [Gambas-user] 10.04 issue In-Reply-To: <1272615970.3350.17.camel@...2425...> References: <1272615970.3350.17.camel@...2425...> Message-ID: <201004301040.03874.gambas@...1...> > Hello List, > > When upgraded* to ubuntu 10.04 my applications using mysql don't work > anymore. > If I wanna run them from Gambas then I receive unexpected error message, > if I start a .gambas file from terminal then I receive something like > that: > ------------------------------------------------------------------------ > juhasz at ...2425...:~$ /home/juhasz/Documents/Gambas/MCT/MCT.gambas > ERROR: #27: Cannot load component > '/usr/local/lib/gambas2/gb.db.mysql.so': libmysqlclient.so.15: cannot > open shared object file: No such file or directory > ------------------------------------------------------------------------ > > Should I try to reinstall Gambas or what do you propose me to do? > > > *: upgrade means clicking on the button "upgrade to 10.04 LTS" from the > update manager. I used Ubuntu 9.10 (32 bit) before and I my programs > (including Gambas) were installed under 9.10. > > Regards, > Robi > OK, but please explain exactly how you installed Gambas! -- Beno?t Minisini From robert1juhasz at ...626... Fri Apr 30 11:18:46 2010 From: robert1juhasz at ...626... (JUHASZ Robert) Date: Fri, 30 Apr 2010 11:18:46 +0200 Subject: [Gambas-user] 10.04 issue In-Reply-To: <201004301040.03874.gambas@...1...> References: <1272615970.3350.17.camel@...2425...> <201004301040.03874.gambas@...1...> Message-ID: <1272619126.3350.30.camel@...2425...> Gambas was installed as described for karmic on the link bellow: http://www.domotiga.nl/wiki/Gambas/Install I did it 1 month ago and the version is the latest one: 2.20 It worked perfectly under karmic from the IDE and also the executables generated by Gambas. Robi On Fri, 2010-04-30 at 10:40 +0200, Beno?t Minisini wrote: > > OK, but please explain exactly how you installed Gambas! > > From gambas at ...1... Fri Apr 30 11:39:35 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Fri, 30 Apr 2010 11:39:35 +0200 Subject: [Gambas-user] 10.04 issue In-Reply-To: <1272619126.3350.30.camel@...2425...> References: <1272615970.3350.17.camel@...2425...> <201004301040.03874.gambas@...1...> <1272619126.3350.30.camel@...2425...> Message-ID: <201004301139.35803.gambas@...1...> > Gambas was installed as described for karmic on the link bellow: > > http://www.domotiga.nl/wiki/Gambas/Install > > I did it 1 month ago and the version is the latest one: 2.20 > It worked perfectly under karmic from the IDE and also the executables > generated by Gambas. > > Robi > So you installed it from sources. According to your error message, I think you have to recompile and reinstall gambas, because apparently the libmysqlclient shared library was upgraded to a new version. On Linux, an executable stores the shared libraries it needs with their version. Note that is a "compatibility" version, not necessarily the development version number of the library. For example, the KDE 4 core shared library is "libkdecore.so.5"! When you upgrade a distribution, the shared libraries are upgraded too, but the old versions are not kept, they are removed. So the gambas interpreter that was linked with old shared libraries do not find them anymore! By recompiling it, you will fix the problem. Of course, it could happen that the new shared library is so incompatible, that gambas will not compile anymore. But then it is my problem, and I will fix it for sure! Regards, -- Beno?t Minisini From andreas at ...2139... Fri Apr 30 15:11:17 2010 From: andreas at ...2139... (andreas =?ISO-8859-1?Q?m=FCller?=) Date: Fri, 30 Apr 2010 15:11:17 +0200 Subject: [Gambas-user] Ubuntu 10.04 LTS Message-ID: <1272633077.4844.20.camel@...2426...> Hello all, today I installed Ubuntu 10.04 LTS (lucid lynx). Unfortunatelly Gambas was not part of its repository. Did anybody install it manually on that platform already? best regards andreas From charles at ...1784... Fri Apr 30 16:30:47 2010 From: charles at ...1784... (charlesg) Date: Fri, 30 Apr 2010 07:30:47 -0700 (PDT) Subject: [Gambas-user] Ubuntu 10.04 LTS In-Reply-To: <1272633077.4844.20.camel@...2426...> References: <1272633077.4844.20.camel@...2426...> Message-ID: <28412886.post@...1379...> Hi Gambas 2.20.2 works fine on a raw install (i.e. not upgraded) 10.04 using Karmic (9.10) dependency list. I think there is a problem with Gambas 3 but am sure it will be sorted soon (as ever!) rgds -- View this message in context: http://old.nabble.com/Ubuntu-10.04-LTS-tp28412230p28412886.html Sent from the gambas-user mailing list archive at Nabble.com. From charles at ...1784... Fri Apr 30 17:03:20 2010 From: charles at ...1784... (charlesg) Date: Fri, 30 Apr 2010 08:03:20 -0700 (PDT) Subject: [Gambas-user] Ubuntu 10.04 LTS In-Reply-To: <28412886.post@...1379...> References: <1272633077.4844.20.camel@...2426...> <28412886.post@...1379...> Message-ID: <28413293.post@...1379...> Hi Gambas 2.19.0 is in UB10.04 software centre but last time I tried it gave an incomplete installation. If you don't want to compile rather do sudo apt-get install gambas2 from the terminal and even then check in synaptic by searching on gambas and making sure all the boxes are ticked. rgds -- View this message in context: http://old.nabble.com/Ubuntu-10.04-LTS-tp28412230p28413293.html Sent from the gambas-user mailing list archive at Nabble.com.