From doriano.blengino at ...1909... Fri May 1 08:37:22 2009 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Fri, 01 May 2009 08:37:22 +0200 Subject: [Gambas-user] read a file into a listview - but backwards In-Reply-To: <200904302359.43898.rospolosco@...152...> References: <4247f5440904301046n7167ca8dnb1481db095243d0c@...627...> <200904302359.43898.rospolosco@...152...> Message-ID: <49FA98A2.6010407@...1909...> > Il gioved? 30 aprile 2009 19:46:25 Joshua Higgins ha scritto: > >> Hi all, >> >> Is it possible to read a file and load it line by line into a listview, but >> backwards? I have been using the example from gambasdoc for loading files >> line by line, but I'm writing a logging page and want to show newest items >> first. >> PUBLIC SUB Form_Open() DIM f AS File DIM s AS String DIM n AS Integer ListView1.Add(0, "") f = OPEN "FMain.class" FOR INPUT WHILE NOT Eof(f) LINE INPUT #f, s INC n ListView1.Add(n, s, NULL, 0) WEND CLOSE f END Regards, -- Doriano Blengino "Listen twice before you speak. This is why we have two ears, but only one mouth." From gambas.fr at ...626... Fri May 1 11:03:31 2009 From: gambas.fr at ...626... (Fabien Bodard) Date: Fri, 1 May 2009 11:03:31 +0200 Subject: [Gambas-user] Printing from a PDF In-Reply-To: <200904291133.38999.rterry@...1946...> References: <200904291133.38999.rterry@...1946...> Message-ID: <6324a42a0905010203m7a341d5et767d360f4ba2e67d@...627...> in fact you need to do it by yourself :/ as pdf return a picture ... you can do draw(printer) draw.image(pdf.image, x,y,w,h) draw.end or i've maybe another idea... 2009/4/29 richard terry : > There seems no property to print from a pdf, no example of printing code in > the pdf example. > > I wondered if this was possible. > > Thanks. > > richard > > ------------------------------------------------------------------------------ > Register Now & Save for Velocity, the Web Performance & Operations > Conference from O'Reilly Media. Velocity features a full day of > expert-led, hands-on workshops and two days of sessions from industry > leaders in dedicated Performance & Operations tracks. Use code vel09scf > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From rterry at ...1946... Sat May 2 01:20:30 2009 From: rterry at ...1946... (richard terry) Date: Sat, 2 May 2009 09:20:30 +1000 Subject: [Gambas-user] a Debug question Message-ID: <200905020920.30198.rterry@...1946...> If one puts in a breakpoint, and is stepping through the code one line at a time to check values of variables etc, is there any way or re-setting to a line in the same subroutine prior to the current line you have stopped on. I've found sometimes I'm trying to find a bug, and I put in multiple break points so that I can skip from one to another, and then want to check something in the middle that I've gone past, but have to stop the entire program and start again. perhaps I'm using this tool wrongly. Thanks. From gambas at ...1... Sat May 2 01:28:09 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Sat, 2 May 2009 01:28:09 +0200 Subject: [Gambas-user] a Debug question In-Reply-To: <200905020920.30198.rterry@...1946...> References: <200905020920.30198.rterry@...1946...> Message-ID: <200905020128.09746.gambas@...1...> > If one puts in a breakpoint, and is stepping through the code one line at > a time to check values of variables etc, is there any way or re-setting to > a line in the same subroutine prior to the current line you have stopped > on. > > I've found sometimes I'm trying to find a bug, and I put in multiple break > points so that I can skip from one to another, and then want to check > something in the middle that I've gone past, but have to stop the entire > program and start again. > > perhaps I'm using this tool wrongly. > > Thanks. > Alas you cannot go back in time in debuggers yet. I've heard about people thinking about it, but I don't think you will never see it in Gambas! Regards, -- Beno?t From doriano.blengino at ...1909... Sat May 2 09:02:14 2009 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Sat, 02 May 2009 09:02:14 +0200 Subject: [Gambas-user] a Debug question In-Reply-To: <200905020128.09746.gambas@...1...> References: <200905020920.30198.rterry@...1946...> <200905020128.09746.gambas@...1...> Message-ID: <49FBEFF6.70206@...1909...> Beno?t Minisini ha scritto: >> If one puts in a breakpoint, and is stepping through the code one line at >> a time to check values of variables etc, is there any way or re-setting to >> a line in the same subroutine prior to the current line you have stopped >> on. >> >> I've found sometimes I'm trying to find a bug, and I put in multiple break >> points so that I can skip from one to another, and then want to check >> something in the middle that I've gone past, but have to stop the entire >> program and start again. >> > Alas you cannot go back in time in debuggers yet. I've heard about people > thinking about it, but I don't think you will never see it in Gambas! > > This is a serious problem, tough. There are programs which, for one reason or another, are a little difficult to debug using the internal gambas debugger. For example, think at a data-entry form, with a lot of controls, each having validation (perhaps, put on top of a database). If you want to debug the final action of the form (the Apply button, may be), then you have to fill in all the values. Every time you discover a bug, even a stupid one, you must restart the program from the beginning; and, may be, that form is nested deep in the program logic - you have to step through many menus and dialogs to arrive at the point of interest. Other times, you don't have a clear idea of the algorithm you have to write, so you try again and again. In these situations, the more you can do through the debugger, the more time you save. There could be some improvements to the debugger: - the possibility to assign new values to variables (perhaps not the structured, but only the simplest ones) - the possibility to modify the program text and continue debugging (perhaps without adding/deleting lines) - the possibility to change the program counter (perhaps with constraints) - the possibility to add "debug" code, which is compiled in only when a special "debug run" is invoked - conditional breakpoints / break on the "Nth occurence" ...and may be other which does'nt come to my mind at the moment. We already discussed a little about this: I know this is somehow hard to implement, but having the gambas virtual machine ready in memory should help... I mean: if the debugger "knows" how to obtain the value of a variable, and how to display it, then perhaps it is possible to [relatively] easily assign a new value. Or, the possibility to modify the source and continue debugging, seems to me not very hard to do (but I could be wrong, of course). I know that I am biased, because for my work I go deep to the processor hardware, and the debugger lets me do nearly everything I want, but you could consider whether any improvement could be done to the gambas debugger. Hope I did'nt annoyed you, they were simply ideas. Regards, -- Doriano Blengino "Listen twice before you speak. This is why we have two ears, but only one mouth." From info.geex at ...626... Sat May 2 15:49:16 2009 From: info.geex at ...626... (Sergio A. Hernandez) Date: Sat, 2 May 2009 07:49:16 -0600 Subject: [Gambas-user] a Debug question In-Reply-To: <200905020920.30198.rterry@...1946...> References: <200905020920.30198.rterry@...1946...> Message-ID: <705a68020905020649q42d5f162iedd7d9661cf517e0@...627...> My recommendation is you to print the values on the console to track them at "run-time", I prefer to use this technique more than use the integrated debugger, since you can follow up the overall outcome without start/stops. Some people don't like it, but I find it very useful. On Fri, May 1, 2009 at 5:20 PM, richard terry wrote: > If ?one puts in a breakpoint, and is ?stepping through the code one line at a > time to check values of variables etc, is there any way or re-setting to a > line in the same subroutine prior to the current line you have stopped on. > > I've found sometimes I'm trying to find a bug, and I put in multiple break > points so that I can skip from one to another, and then want to check > something in the middle that I've gone past, but have to stop the entire > program and start again. > > perhaps I'm using this tool wrongly. > > Thanks. > > ------------------------------------------------------------------------------ > Register Now & Save for Velocity, the Web Performance & Operations > Conference from O'Reilly Media. Velocity features a full day of > expert-led, hands-on workshops and two days of sessions from industry > leaders in dedicated Performance & Operations tracks. Use code vel09scf > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From joshiggins at ...1601... Sat May 2 20:37:50 2009 From: joshiggins at ...1601... (Joshua Higgins) Date: Sat, 2 May 2009 19:37:50 +0100 Subject: [Gambas-user] gambas server page. In-Reply-To: <1241108433.49f9cfd198dcb@...1418...> References: <1241108433.49f9cfd198dcb@...1418...> Message-ID: <4247f5440905021137k46db2487i77398ff71ca3ef81@...627...> I have just got this working. Bascially, Apache runs your gambas server page as a CGI script, so drop it in your cgi-bin folder (with a properly configured server of course), give it execute permission and it should work. To call in firefox the page generated, give it the url to the script. Your apache may require it to have a .cgi extension for it to work. Use the example on gambasdoc to test it. 2009/4/30 Wellington de Souza Pinto > Hi everyone!!! > > Please. I'm not understand yet of work the gambas server page. > How begin? > How install? > Work with apache webserver? > How call in my browser (firefox) the page generated by gambasserverwebpage? > > Any samples are welcome! > > Reguards > > Souza, Wellington > > > ___________________________________________________________________________________ > Para fazer uma liga??o DDD pra perto ou pra longe, faz um 21. A Embratel > tem > tarifas muito baratas esperando por voc?. Aproveite! > > > > ------------------------------------------------------------------------------ > Register Now & Save for Velocity, the Web Performance & Operations > Conference from O'Reilly Media. Velocity features a full day of > expert-led, hands-on workshops and two days of sessions from industry > leaders in dedicated Performance & Operations tracks. Use code vel09scf > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- joshua higgins >>>>>>------ From joshiggins at ...1601... Sat May 2 20:52:15 2009 From: joshiggins at ...1601... (Joshua Higgins) Date: Sat, 2 May 2009 19:52:15 +0100 Subject: [Gambas-user] calling gambas server page from html form (post) Message-ID: <4247f5440905021152o14bc59efm64388d2c5524c3ae@...627...> I've been experimenting with Gambas server pages and I must say, its brilliant. At the moment I'm trying to get data entered on a form on a web page to be written to a file on the server. I have got as far as making the html page with a form. Here is an excerpt:

Your Name:

What I'm wondering is how to access the "your_name" variable in the gambas script that this form has under action. I can't figure it out. Thanks. -- joshua higgins >>>>>>------ From gambas at ...1... Sat May 2 22:21:03 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Sat, 2 May 2009 22:21:03 +0200 Subject: [Gambas-user] calling gambas server page from html form (post) In-Reply-To: <4247f5440905021152o14bc59efm64388d2c5524c3ae@...627...> References: <4247f5440905021152o14bc59efm64388d2c5524c3ae@...627...> Message-ID: <200905022221.03759.gambas@...1...> > I've been experimenting with Gambas server pages and I must say, its > brilliant. > > At the moment I'm trying to get data entered on a form on a web page to be > written to a file on the server. I have got as far as making the html page > with a form. Here is an excerpt: > > >

Your Name:

> > What I'm wondering is how to access the "your_name" variable in the gambas > script that this form has under action. I can't figure it out. > > Thanks. You must use the gb.web component and its Request class. Print Request["your_name"] This component has almost the same interface as ASP on Windows, so you should be able to use it easily. Of course if you have more precise questions, ask them! Regards, -- Beno?t From joshiggins at ...1601... Sun May 3 11:40:17 2009 From: joshiggins at ...1601... (Joshua Higgins) Date: Sun, 3 May 2009 10:40:17 +0100 Subject: [Gambas-user] calling gambas server page from html form (post) In-Reply-To: <200905022221.03759.gambas@...1...> References: <4247f5440905021152o14bc59efm64388d2c5524c3ae@...627...> <200905022221.03759.gambas@...1...> Message-ID: <4247f5440905030240n517a52c1mc51581028d2fc048@...627...> > Print Request["your_name"] > Works fantastic. Just one more question: how would I go about helping to write the tutorial on making a cgi web application here http://gambasdoc.org/help/tutorial ? -- joshua higgins >>>>>>------ From joshiggins at ...1601... Sun May 3 11:53:13 2009 From: joshiggins at ...1601... (Joshua Higgins) Date: Sun, 3 May 2009 10:53:13 +0100 Subject: [Gambas-user] server pages again... possible bug Message-ID: <4247f5440905030253u586da5b7o1642ed3f4da7e074@...627...> I'm trying to dynamically change an image. Here is a simple page: #!/usr/bin/env gbw2 <% DIM sEnv AS String %> <% sEnv = "hello.jpg" %> This looks okay to me, but on running, <$= sEnv%> inside the tag is not evaluated, presumably because it is inside the img tag. Is this expected behaviour? -- joshua higgins >>>>>>------ From rterry at ...1946... Sun May 3 11:54:05 2009 From: rterry at ...1946... (richard terry) Date: Sun, 3 May 2009 19:54:05 +1000 Subject: [Gambas-user] http://gambasdoc.org/help/tutorial Message-ID: <200905031954.05962.rterry@...1946...> Hi all, I didn't know this page existed. Can we all put little tutorials on here? 1) How does one get username/password 2) Presumably this page is for anyone to view, however it asks for username/password when one tries to view a link. Regards richard From joshiggins at ...1601... Sun May 3 12:26:54 2009 From: joshiggins at ...1601... (Joshua Higgins) Date: Sun, 3 May 2009 11:26:54 +0100 Subject: [Gambas-user] http://gambasdoc.org/help/tutorial In-Reply-To: <200905031954.05962.rterry@...1946...> References: <200905031954.05962.rterry@...1946...> Message-ID: <4247f5440905030326y66b9a0e1hd65b7c0ccaf95c9c@...627...> I think it asks for a username and password because the page it links to doesn't exist yet. 2009/5/3 richard terry > Hi all, > > I didn't know this page existed. Can we all put little tutorials on here? > > 1) How does one get username/password > > 2) Presumably this page is for anyone to view, however it asks for > username/password when one tries to view a link. > > Regards > > richard > > > > > ------------------------------------------------------------------------------ > Register Now & Save for Velocity, the Web Performance & Operations > Conference from O'Reilly Media. Velocity features a full day of > expert-led, hands-on workshops and two days of sessions from industry > leaders in dedicated Performance & Operations tracks. Use code vel09scf > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- joshua higgins >>>>>>------ From info.geex at ...626... Sun May 3 16:26:18 2009 From: info.geex at ...626... (Sergio A. Hernandez) Date: Sun, 3 May 2009 08:26:18 -0600 Subject: [Gambas-user] a Debug question In-Reply-To: <49FBEFF6.70206@...1909...> References: <200905020920.30198.rterry@...1946...> <200905020128.09746.gambas@...1...> <49FBEFF6.70206@...1909...> Message-ID: <705a68020905030726n597216d0x73768bca375fa3e2@...627...> Doriano, >From my experience programming under languages that don't have any debugger at all like PHP-LAMP, the best thing to do in these cases is to create a debug subclass with a constructor that fills out all the data on a large form (however you want, with static or random data). That way you avoid entry the data and only focus to make sure your application works the way it supposed to. Hope this help you. On Sat, May 2, 2009 at 1:02 AM, Doriano Blengino wrote: > Beno?t Minisini ha scritto: >>> If ?one puts in a breakpoint, and is ?stepping through the code one line at >>> a time to check values of variables etc, is there any way or re-setting to >>> a line in the same subroutine prior to the current line you have stopped >>> on. >>> >>> I've found sometimes I'm trying to find a bug, and I put in multiple break >>> points so that I can skip from one to another, and then want to check >>> something in the middle that I've gone past, but have to stop the entire >>> program and start again. >>> >> Alas you cannot go back in time in debuggers yet. I've heard about people >> thinking about it, but I don't think you will never see it in Gambas! >> >> > This is a serious problem, tough. There are programs which, for one > reason or another, are a little difficult to debug using the internal > gambas debugger. For example, think at a data-entry form, with a lot of > controls, each having validation (perhaps, put on top of a database). If > you want to debug the final action of the form (the Apply button, may > be), then you have to fill in all the values. Every time you discover a > bug, even a stupid one, you must restart the program from the beginning; > and, may be, that form is nested deep in the program logic - you have to > step through many menus and dialogs to arrive at the point of interest. > Other times, you don't have a clear idea of the algorithm you have to > write, so you try again and again. In these situations, the more you can > do through the debugger, the more time you save. > > There could be some improvements to the debugger: > > ? ?- the possibility to assign new values to variables (perhaps not the > structured, but only the simplest ones) > ? ?- the possibility to modify the program text and continue debugging > (perhaps without adding/deleting lines) > ? ?- the possibility to change the program counter (perhaps with > constraints) > ? ?- the possibility to add "debug" code, which is compiled in only > when a special "debug run" is invoked > ? ?- conditional breakpoints / break on the "Nth occurence" > > ...and may be other which does'nt come to my mind at the moment. > > We already discussed a little about this: I know this is somehow hard to > implement, but having the gambas virtual machine ready in memory should > help... I mean: if the debugger "knows" how to obtain the value of a > variable, and how to display it, then perhaps it is possible to > [relatively] easily assign a new value. Or, the possibility to modify > the source and continue debugging, seems to me not very hard to do (but > I could be wrong, of course). > > I know that I am biased, because for my work I go deep to the processor > hardware, and the debugger lets me do nearly everything I want, but you > could consider whether any improvement could be done to the gambas debugger. > > Hope I did'nt annoyed you, they were simply ideas. > > Regards, > > -- > Doriano Blengino > > "Listen twice before you speak. > This is why we have two ears, but only one mouth." > > > ------------------------------------------------------------------------------ > Register Now & Save for Velocity, the Web Performance & Operations > Conference from O'Reilly Media. Velocity features a full day of > expert-led, hands-on workshops and two days of sessions from industry > leaders in dedicated Performance & Operations tracks. Use code vel09scf > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From info.geex at ...626... Sun May 3 16:43:26 2009 From: info.geex at ...626... (Sergio A. Hernandez) Date: Sun, 3 May 2009 08:43:26 -0600 Subject: [Gambas-user] calling gambas server page from html form (post) In-Reply-To: <4247f5440905030240n517a52c1mc51581028d2fc048@...627...> References: <4247f5440905021152o14bc59efm64388d2c5524c3ae@...627...> <200905022221.03759.gambas@...1...> <4247f5440905030240n517a52c1mc51581028d2fc048@...627...> Message-ID: <705a68020905030743h33fcc486rc7ec5615c0d7b2fa@...627...> Joshua, I am writing a Getting Started 24 lessons book, and the part that I did figure out yet is the CGI Web Application lesson. If you are planning to release your tutorial under the terms of the GNU Free Doc License and you are interested, you can be co-author for this section of the book. http://gambas.sourceforge.net/Getting%20Started%20with%20GAMBAS.odt On Sun, May 3, 2009 at 3:40 AM, Joshua Higgins wrote: >> ? ? ? ?Print Request["your_name"] >> > > Works fantastic. Just one more question: how would I go about helping to > write the tutorial on making a cgi web application here > http://gambasdoc.org/help/tutorial ? > > -- > joshua higgins >>>>>>>------ > ------------------------------------------------------------------------------ > Register Now & Save for Velocity, the Web Performance & Operations > Conference from O'Reilly Media. Velocity features a full day of > expert-led, hands-on workshops and two days of sessions from industry > leaders in dedicated Performance & Operations tracks. Use code vel09scf > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From info.geex at ...626... Sun May 3 16:49:48 2009 From: info.geex at ...626... (Sergio A. Hernandez) Date: Sun, 3 May 2009 08:49:48 -0600 Subject: [Gambas-user] calling gambas server page from html form (post) In-Reply-To: <4247f5440905030240n517a52c1mc51581028d2fc048@...627...> References: <4247f5440905021152o14bc59efm64388d2c5524c3ae@...627...> <200905022221.03759.gambas@...1...> <4247f5440905030240n517a52c1mc51581028d2fc048@...627...> Message-ID: <705a68020905030749u184c1aa6x39078c10ed4ebb7c@...627...> So far I remember you need to register use the following link: http://gambasdoc.org/help/register On Sun, May 3, 2009 at 3:40 AM, Joshua Higgins wrote: >> ? ? ? ?Print Request["your_name"] >> > > Works fantastic. Just one more question: how would I go about helping to > write the tutorial on making a cgi web application here > http://gambasdoc.org/help/tutorial ? > > -- > joshua higgins >>>>>>>------ > ------------------------------------------------------------------------------ > Register Now & Save for Velocity, the Web Performance & Operations > Conference from O'Reilly Media. Velocity features a full day of > expert-led, hands-on workshops and two days of sessions from industry > leaders in dedicated Performance & Operations tracks. Use code vel09scf > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From joshiggins at ...1601... Sun May 3 16:53:41 2009 From: joshiggins at ...1601... (Joshua Higgins) Date: Sun, 3 May 2009 15:53:41 +0100 Subject: [Gambas-user] calling gambas server page from html form (post) In-Reply-To: <705a68020905030743h33fcc486rc7ec5615c0d7b2fa@...627...> References: <4247f5440905021152o14bc59efm64388d2c5524c3ae@...627...> <200905022221.03759.gambas@...1...> <4247f5440905030240n517a52c1mc51581028d2fc048@...627...> <705a68020905030743h33fcc486rc7ec5615c0d7b2fa@...627...> Message-ID: <4247f5440905030753u149dde81s61f64fd9a84016e3@...627...> Sergio, I just had a look at the link you sent and it looks good. Once I've finished the tutorial I'd be happy for you to include it in your book, under the GNU Free Doc License. 2009/5/3 Sergio A. Hernandez > Joshua, > I am writing a Getting Started 24 lessons book, and the part that I > did figure out yet is the CGI Web Application lesson. If you are > planning to release your tutorial under the terms of the GNU Free Doc > License and you are interested, you can be co-author for this section > of the book. > > http://gambas.sourceforge.net/Getting%20Started%20with%20GAMBAS.odt > > > On Sun, May 3, 2009 at 3:40 AM, Joshua Higgins > wrote: > >> Print Request["your_name"] > >> > > > > Works fantastic. Just one more question: how would I go about helping to > > write the tutorial on making a cgi web application here > > http://gambasdoc.org/help/tutorial ? > > > > -- > > joshua higgins > >>>>>>>------ > > > ------------------------------------------------------------------------------ > > Register Now & Save for Velocity, the Web Performance & Operations > > Conference from O'Reilly Media. Velocity features a full day of > > expert-led, hands-on workshops and two days of sessions from industry > > leaders in dedicated Performance & Operations tracks. Use code vel09scf > > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > ------------------------------------------------------------------------------ > Register Now & Save for Velocity, the Web Performance & Operations > Conference from O'Reilly Media. Velocity features a full day of > expert-led, hands-on workshops and two days of sessions from industry > leaders in dedicated Performance & Operations tracks. Use code vel09scf > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- joshua higgins >>>>>>------ From wdahn at ...1000... Sun May 3 16:55:47 2009 From: wdahn at ...1000... (Werner) Date: Sun, 03 May 2009 22:55:47 +0800 Subject: [Gambas-user] calling gambas server page from html form (post) In-Reply-To: <705a68020905030743h33fcc486rc7ec5615c0d7b2fa@...627...> References: <4247f5440905021152o14bc59efm64388d2c5524c3ae@...627...> <200905022221.03759.gambas@...1...> <4247f5440905030240n517a52c1mc51581028d2fc048@...627...> <705a68020905030743h33fcc486rc7ec5615c0d7b2fa@...627...> Message-ID: <49FDB073.7020509@...1000...> Sergio A. Hernandez wrote: > Joshua, > I am writing a Getting Started 24 lessons book, and the part that I > did figure out yet is the CGI Web Application lesson. If you are > planning to release your tutorial under the terms of the GNU Free Doc > License and you are interested, you can be co-author for this section > of the book. > > http://gambas.sourceforge.net/Getting%20Started%20with%20GAMBAS.odt > Looks promising. Good job! Werner From weldon_gary at ...67... Sun May 3 17:46:00 2009 From: weldon_gary at ...67... (CelticBhoy) Date: Sun, 3 May 2009 08:46:00 -0700 (PDT) Subject: [Gambas-user] Problem opening project Message-ID: <23356901.post@...1379...> I moved the contents of my project folder to another location. At first I did not realise that there were hidden files in the folder also, and only coppied the files I could see. Then after copying over the hidden files I tried to open the project. It open with the form as expected, but the class file does not load. Can I force this file to load manually. -- View this message in context: http://www.nabble.com/Problem-opening-project-tp23356901p23356901.html Sent from the gambas-user mailing list archive at Nabble.com. From weldon_gary at ...67... Sun May 3 17:54:29 2009 From: weldon_gary at ...67... (CelticBhoy) Date: Sun, 3 May 2009 08:54:29 -0700 (PDT) Subject: [Gambas-user] Problem opening project In-Reply-To: <23356901.post@...1379...> References: <23356901.post@...1379...> Message-ID: <23356958.post@...1379...> Fixed by tinkering with the .settings file. -- View this message in context: http://www.nabble.com/Problem-opening-project-tp23356901p23356958.html Sent from the gambas-user mailing list archive at Nabble.com. From doriano.blengino at ...1909... Sun May 3 19:00:36 2009 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Sun, 03 May 2009 19:00:36 +0200 Subject: [Gambas-user] a Debug question In-Reply-To: <705a68020905030726n597216d0x73768bca375fa3e2@...627...> References: <200905020920.30198.rterry@...1946...> <200905020128.09746.gambas@...1...> <49FBEFF6.70206@...1909...> <705a68020905030726n597216d0x73768bca375fa3e2@...627...> Message-ID: <49FDCDB4.4070807@...1909...> Sergio A. Hernandez ha scritto: > Doriano, > >From my experience programming under languages that don't have any > debugger at all like PHP-LAMP, the best thing to do in these cases is > to create a debug subclass with a constructor that fills out all the > data on a large form (however you want, with static or random data). > That way you avoid entry the data and only focus to make sure your > application works the way it supposed to. > Hope this help you. > This is why I was asking for some compiler switch to include/exclude debugging code. I am afraid to leave in place things which should'nt stay there... Surely you also used the tecnique of logging a lot of informations; but all the debugging code you put in, you don't want to have it in the final release. Gambas has some support for this (DEBUG instruction), but it could be more general. Thanks for the suggestion, Doriano > On Sat, May 2, 2009 at 1:02 AM, Doriano Blengino > wrote: > >> Beno?t Minisini ha scritto: >> >>>> If one puts in a breakpoint, and is stepping through the code one line at >>>> a time to check values of variables etc, is there any way or re-setting to >>>> a line in the same subroutine prior to the current line you have stopped >>>> on. >>>> >>>> I've found sometimes I'm trying to find a bug, and I put in multiple break >>>> points so that I can skip from one to another, and then want to check >>>> something in the middle that I've gone past, but have to stop the entire >>>> program and start again. >>>> >>>> >>> Alas you cannot go back in time in debuggers yet. I've heard about people >>> thinking about it, but I don't think you will never see it in Gambas! >>> >>> >>> >> This is a serious problem, tough. There are programs which, for one >> reason or another, are a little difficult to debug using the internal >> gambas debugger. For example, think at a data-entry form, with a lot of >> controls, each having validation (perhaps, put on top of a database). If >> you want to debug the final action of the form (the Apply button, may >> be), then you have to fill in all the values. Every time you discover a >> bug, even a stupid one, you must restart the program from the beginning; >> and, may be, that form is nested deep in the program logic - you have to >> step through many menus and dialogs to arrive at the point of interest. >> Other times, you don't have a clear idea of the algorithm you have to >> write, so you try again and again. In these situations, the more you can >> do through the debugger, the more time you save. >> >> There could be some improvements to the debugger: >> >> - the possibility to assign new values to variables (perhaps not the >> structured, but only the simplest ones) >> - the possibility to modify the program text and continue debugging >> (perhaps without adding/deleting lines) >> - the possibility to change the program counter (perhaps with >> constraints) >> - the possibility to add "debug" code, which is compiled in only >> when a special "debug run" is invoked >> - conditional breakpoints / break on the "Nth occurence" >> >> ...and may be other which does'nt come to my mind at the moment. >> >> We already discussed a little about this: I know this is somehow hard to >> implement, but having the gambas virtual machine ready in memory should >> help... I mean: if the debugger "knows" how to obtain the value of a >> variable, and how to display it, then perhaps it is possible to >> [relatively] easily assign a new value. Or, the possibility to modify >> the source and continue debugging, seems to me not very hard to do (but >> I could be wrong, of course). >> >> I know that I am biased, because for my work I go deep to the processor >> hardware, and the debugger lets me do nearly everything I want, but you >> could consider whether any improvement could be done to the gambas debugger. >> >> Hope I did'nt annoyed you, they were simply ideas. >> >> Regards, >> >> -- >> Doriano Blengino >> >> "Listen twice before you speak. >> This is why we have two ears, but only one mouth." >> >> >> ------------------------------------------------------------------------------ >> Register Now & Save for Velocity, the Web Performance & Operations >> Conference from O'Reilly Media. Velocity features a full day of >> expert-led, hands-on workshops and two days of sessions from industry >> leaders in dedicated Performance & Operations tracks. Use code vel09scf >> and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> >> > > ------------------------------------------------------------------------------ > Register Now & Save for Velocity, the Web Performance & Operations > Conference from O'Reilly Media. Velocity features a full day of > expert-led, hands-on workshops and two days of sessions from industry > leaders in dedicated Performance & Operations tracks. Use code vel09scf > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Doriano Blengino "Listen twice before you speak. This is why we have two ears, but only one mouth." From gambas at ...1... Sun May 3 19:47:29 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Sun, 3 May 2009 19:47:29 +0200 Subject: [Gambas-user] server pages again... possible bug In-Reply-To: <4247f5440905030253u586da5b7o1642ed3f4da7e074@...627...> References: <4247f5440905030253u586da5b7o1642ed3f4da7e074@...627...> Message-ID: <200905031947.29843.gambas@...1...> > I'm trying to dynamically change an image. Here is a simple page: > > > #!/usr/bin/env gbw2 > <% > DIM sEnv AS String > %> > > > > <% > sEnv = "hello.jpg" > %> > > > > > > > This looks okay to me, but on running, <$= sEnv%> inside the tag is > not evaluated, presumably because it is inside the img tag. Is this > expected behaviour? By reading the code, I noticed that "<%" and "<%=" are not taken into account inside HTML markups. Maybe it could be logical for "<%", but not for "<%=". I will fix that for the next Gambas 2 release. Regards, -- Beno?t From joshiggins at ...1601... Sun May 3 21:54:06 2009 From: joshiggins at ...1601... (Joshua Higgins) Date: Sun, 3 May 2009 20:54:06 +0100 Subject: [Gambas-user] server pages again... possible bug In-Reply-To: <200905031947.29843.gambas@...1...> References: <4247f5440905030253u586da5b7o1642ed3f4da7e074@...627...> <200905031947.29843.gambas@...1...> Message-ID: <4247f5440905031254y695ea013o431619b9c2e94305@...627...> Thinking about it, it makes more sense just to <% PRINT ""%> 2009/5/3 Beno?t Minisini > > I'm trying to dynamically change an image. Here is a simple page: > > > > > > #!/usr/bin/env gbw2 > > <% > > DIM sEnv AS String > > %> > > > > > > > > <% > > sEnv = "hello.jpg" > > %> > > > > > > > > > > > > > > This looks okay to me, but on running, <$= sEnv%> inside the tag is > > not evaluated, presumably because it is inside the img tag. Is this > > expected behaviour? > > By reading the code, I noticed that "<%" and "<%=" are not taken into > account > inside HTML markups. > > Maybe it could be logical for "<%", but not for "<%=". I will fix that for > the > next Gambas 2 release. > > Regards, > > -- > Beno?t > > > ------------------------------------------------------------------------------ > Register Now & Save for Velocity, the Web Performance & Operations > Conference from O'Reilly Media. Velocity features a full day of > expert-led, hands-on workshops and two days of sessions from industry > leaders in dedicated Performance & Operations tracks. Use code vel09scf > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- joshua higgins >>>>>>------ From tinker43 at ...626... Sun May 3 23:10:05 2009 From: tinker43 at ...626... (frenchpark43) Date: Sun, 3 May 2009 14:10:05 -0700 (PDT) Subject: [Gambas-user] Errotr message " Illegal seek" Message-ID: <23359909.post@...1379...> When I execute the code below , it works fine for the first "Single" button push. But on the second push I get an error message " System error. Illegal seek". Any ideas ? PUBLIC SUB Single_Click() DIM i AS Integer DIM dump AS Byte DIM data AS Byte ' DIM data AS String PRINT "Test" PRINT #hfile "S" ' Send S to start sweep FOR i = 0 TO points - 1 READ #hfile, data, points buffer[i] = data NEXT draw_chart(buffer, points) END -- View this message in context: http://www.nabble.com/Errotr-message-%22-Illegal-seek%22-tp23359909p23359909.html Sent from the gambas-user mailing list archive at Nabble.com. From eilert-sprachen at ...221... Mon May 4 08:25:07 2009 From: eilert-sprachen at ...221... (Rolf-Werner Eilert) Date: Mon, 04 May 2009 08:25:07 +0200 Subject: [Gambas-user] TreeView: why is error = TRUE? In-Reply-To: <6324a42a0904300002q110894d7r115c195fe1558a35@...627...> References: <49F86383.8030605@...221...> <6324a42a0904300002q110894d7r115c195fe1558a35@...627...> Message-ID: <49FE8A43.7040307@...221...> Thank you for that explanation, it does make sense, you're right :-) From the reading-and-understanding-code point of view, however, it might have been better to have it the other way round. In everyday language (= everyday logic), a NOT clause is used pretty often, and "failing" (error) is connected to being "false". There is a dilemma: should code be more elegant or easier to read? When I come back to a piece of code in one of my projects after a long time, I will have to read and understand what I did when creating it. There are pieces which I read just once and know what it's supposed to do. And there are others where I have to read and think about several times to remember what this was all about (even if there are comments). One of these pieces had those .MoveChild clauses, and I had to look into the documentation first to remember that "TRUE" actually means "failed". In another function, I used a Boolean named "wahr" (German for TRUE) as a flag when the previous part of code came to a positive result. This made the IF clauses easy (IF wahr THEN) but somewhat further there is confusion: IF wahr THEN wahr = FALSE ELSE wahr = TRUE END IF ROTFL :-) Now I've got into the same trap I thought when I came back to this site the other day. Regards Rolf Fabien Bodard schrieb: > in fact nothing is unlogical ... it's the gambas way... > > in gambas an error, impossibility, return true... in all the function > that return a boolean > > you can imagine to write this in that way > > CONST bError as Boolean =True > > if .MoveChild = bError then ... > > its the same ! > > in another way it limit the use of the NOT Function keyword > > > > > exemple : > if .MoveChild then > .MoveBack > if .MoveNext > .MoveBack > if .MoveParent then > .MoveNext > endif > endif > Endif > > 2009/4/29 Rolf-Werner Eilert : >> Just one question for understanding it better: >> >> Why is e. g. MoveNext or MoveChild TRUE in case there is NOTHING and not >> vice-versa? Seems pretty unlogical and looks somewhat strange in code... >> >> Regards >> >> Rolf >> >> ------------------------------------------------------------------------------ >> Register Now & Save for Velocity, the Web Performance & Operations >> Conference from O'Reilly Media. Velocity features a full day of >> expert-led, hands-on workshops and two days of sessions from industry >> leaders in dedicated Performance & Operations tracks. Use code vel09scf >> and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > From jussi.lahtinen at ...626... Mon May 4 16:01:11 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Mon, 4 May 2009 17:01:11 +0300 Subject: [Gambas-user] a Debug question In-Reply-To: <49FDCDB4.4070807@...1909...> References: <200905020920.30198.rterry@...1946...> <200905020128.09746.gambas@...1...> <49FBEFF6.70206@...1909...> <705a68020905030726n597216d0x73768bca375fa3e2@...627...> <49FDCDB4.4070807@...1909...> Message-ID: <384d3900905040701i7bc0162s1cd6999fd6273c45@...627...> It would be nice to have something like; DEBUG BEGIN 'Between these instructions is debug code. And it is excluded when compiled, just like DEBUG instruction now. DEBUG END Jussi On Sun, May 3, 2009 at 20:00, Doriano Blengino wrote: > Sergio A. Hernandez ha scritto: >> Doriano, >> >From my experience programming under languages that don't have any >> debugger at all like PHP-LAMP, the best thing to do in these cases is >> to create a debug subclass with a constructor that fills out all the >> data on a large form (however you want, with static or random data). >> That way you avoid entry the data and only focus to make sure your >> application works the way it supposed to. >> Hope this help you. >> > This is why I was asking for some compiler switch to include/exclude > debugging code. > I am afraid to leave in place things which should'nt stay there... > > Surely you also used the tecnique of logging a lot of informations; but > all the debugging code you put in, you don't want to have it in the > final release. Gambas has some support for this (DEBUG instruction), but > it could be more general. > > Thanks for the suggestion, > Doriano > >> On Sat, May 2, 2009 at 1:02 AM, Doriano Blengino >> wrote: >> >>> Beno?t Minisini ha scritto: >>> >>>>> If ?one puts in a breakpoint, and is ?stepping through the code one line at >>>>> a time to check values of variables etc, is there any way or re-setting to >>>>> a line in the same subroutine prior to the current line you have stopped >>>>> on. >>>>> >>>>> I've found sometimes I'm trying to find a bug, and I put in multiple break >>>>> points so that I can skip from one to another, and then want to check >>>>> something in the middle that I've gone past, but have to stop the entire >>>>> program and start again. >>>>> >>>>> >>>> Alas you cannot go back in time in debuggers yet. I've heard about people >>>> thinking about it, but I don't think you will never see it in Gambas! >>>> >>>> >>>> >>> This is a serious problem, tough. There are programs which, for one >>> reason or another, are a little difficult to debug using the internal >>> gambas debugger. For example, think at a data-entry form, with a lot of >>> controls, each having validation (perhaps, put on top of a database). If >>> you want to debug the final action of the form (the Apply button, may >>> be), then you have to fill in all the values. Every time you discover a >>> bug, even a stupid one, you must restart the program from the beginning; >>> and, may be, that form is nested deep in the program logic - you have to >>> step through many menus and dialogs to arrive at the point of interest. >>> Other times, you don't have a clear idea of the algorithm you have to >>> write, so you try again and again. In these situations, the more you can >>> do through the debugger, the more time you save. >>> >>> There could be some improvements to the debugger: >>> >>> ? ?- the possibility to assign new values to variables (perhaps not the >>> structured, but only the simplest ones) >>> ? ?- the possibility to modify the program text and continue debugging >>> (perhaps without adding/deleting lines) >>> ? ?- the possibility to change the program counter (perhaps with >>> constraints) >>> ? ?- the possibility to add "debug" code, which is compiled in only >>> when a special "debug run" is invoked >>> ? ?- conditional breakpoints / break on the "Nth occurence" >>> >>> ...and may be other which does'nt come to my mind at the moment. >>> >>> We already discussed a little about this: I know this is somehow hard to >>> implement, but having the gambas virtual machine ready in memory should >>> help... I mean: if the debugger "knows" how to obtain the value of a >>> variable, and how to display it, then perhaps it is possible to >>> [relatively] easily assign a new value. Or, the possibility to modify >>> the source and continue debugging, seems to me not very hard to do (but >>> I could be wrong, of course). >>> >>> I know that I am biased, because for my work I go deep to the processor >>> hardware, and the debugger lets me do nearly everything I want, but you >>> could consider whether any improvement could be done to the gambas debugger. >>> >>> Hope I did'nt annoyed you, they were simply ideas. >>> >>> Regards, >>> >>> -- >>> Doriano Blengino >>> >>> "Listen twice before you speak. >>> This is why we have two ears, but only one mouth." >>> >>> >>> ------------------------------------------------------------------------------ >>> Register Now & Save for Velocity, the Web Performance & Operations >>> Conference from O'Reilly Media. Velocity features a full day of >>> expert-led, hands-on workshops and two days of sessions from industry >>> leaders in dedicated Performance & Operations tracks. Use code vel09scf >>> and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf >>> _______________________________________________ >>> Gambas-user mailing list >>> Gambas-user at lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>> >>> >> >> ------------------------------------------------------------------------------ >> Register Now & Save for Velocity, the Web Performance & Operations >> Conference from O'Reilly Media. Velocity features a full day of >> expert-led, hands-on workshops and two days of sessions from industry >> leaders in dedicated Performance & Operations tracks. Use code vel09scf >> and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > > -- > Doriano Blengino > > "Listen twice before you speak. > This is why we have two ears, but only one mouth." > > > ------------------------------------------------------------------------------ > Register Now & Save for Velocity, the Web Performance & Operations > Conference from O'Reilly Media. Velocity features a full day of > expert-led, hands-on workshops and two days of sessions from industry > leaders in dedicated Performance & Operations tracks. Use code vel09scf > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From wspinto at ...1405... Mon May 4 18:08:27 2009 From: wspinto at ...1405... (Wellington de Souza Pinto) Date: Mon, 04 May 2009 13:08:27 -0300 Subject: [Gambas-user] gambas server is work. Other questions... Message-ID: <1241453307.49ff12fb46975@...1539...> Tks, My gambas server work now. Questions: Is possible multiplies comands in string? Ex: <% DIM a AS Integer DIM c AS String %> In other message Benoit say for use the mysql <% USE "gb.db" %>. Is Possible for all componentes of gambas? Ex: <% USE "gb.Form" %> <% DIM myObject AS TextBox %> <% myObject = NEW TextBox AS "MyTxtBx" %> <% myObject.X = 10 %> <% MyObject.Y = 10 %> <% myObject.Text = "Hellho Word!!!" %> <% myObject.Show() %> Reguards, Souza, Wellington PS: My english is not very well. ___________________________________________________________________________________ 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 wspinto at ...1405... Mon May 4 18:48:22 2009 From: wspinto at ...1405... (Wellington de Souza Pinto) Date: Mon, 04 May 2009 13:48:22 -0300 Subject: [Gambas-user] gambas web script Message-ID: <1241455702.49ff1c564c38e@...1433...> Below my teste.gbw Show erro. Any idea??? Reguards, Souza, Wellington ------------------------------------------------------------------------------- #!/usr/bin/env gbw2 <% USE "gb.db" %> <% DIM i AS Integer %> <% DIM oCnn AS NEW Connection %> <% DIM oRs AS NEW Result %>

TESTE DE LEITURA DO POSTGRESQL/h2> <% oCnn.Type = "postgresql" %> <% oCnn.Host = "127.0.0.1" %> <% oCnn.Login = "postgres" %> <% oCnn.Password = "1234" %> <% oCnn.Name = "test" %> <% oCnn.Open %> <% oRs = oCnn.Exec("SELECT f_nome, f_funcao, usuario, senha FROM cadfun ORDER BY Lower(f_nome);") %> Nome Funcao Usuario Senha <% oRs.MoveFirst %> <% FOR i = 0 TO oRs.Max %> <%= oRs[0] %> <%= oRs[1] %> <%= oRs[2] %> <%= oRs[3] %>  <% oRs.MoveNext %> <% NEXT %> <% oRs = NULL %> <% oCnn.Close %> ___________________________________________________________________________________ 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 the.at.robert at ...626... Mon May 4 18:54:04 2009 From: the.at.robert at ...626... (Mr. Robert) Date: Mon, 4 May 2009 09:54:04 -0700 Subject: [Gambas-user] Errotr message " Illegal seek" In-Reply-To: <23359909.post@...1379...> References: <23359909.post@...1379...> Message-ID: Firstly, a Line # of where the error occurred would help, but i'm guessing its where it tries to READ. I'm no expert unfortunately, but a quick 'guess' response would be that when using READ with streams, the position is incremented by 1, so when you try to read again, you are not reading from the start, but rather the next byte after your previous read, which seems to be unavailable. I'm not sure if Gambas has a SEEK function, but if it does, you need to use it to "reset" your position in the file to 0 (or 1 depending, probably 0). On Sun, May 3, 2009 at 2:10 PM, frenchpark43 wrote: > > When I execute the code below , it works fine for the first "Single" button > push. But on the second push > I get an error message " System error. Illegal seek". Any ideas ? > > PUBLIC SUB Single_Click() > DIM i AS Integer > DIM dump AS Byte > DIM data AS Byte > ' DIM data AS String > PRINT "Test" > PRINT #hfile "S" ' Send S to start sweep > FOR i = 0 TO points - 1 > READ #hfile, data, points > buffer[i] = data > NEXT > draw_chart(buffer, points) > END > -- > View this message in context: > http://www.nabble.com/Errotr-message-%22-Illegal-seek%22-tp23359909p23359909.html > Sent from the gambas-user mailing list archive at Nabble.com. > > > > ------------------------------------------------------------------------------ > Register Now & Save for Velocity, the Web Performance & Operations > Conference from O'Reilly Media. Velocity features a full day of > expert-led, hands-on workshops and two days of sessions from industry > leaders in dedicated Performance & Operations tracks. Use code vel09scf > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From joshiggins at ...1601... Mon May 4 19:46:03 2009 From: joshiggins at ...1601... (Joshua Higgins) Date: Mon, 4 May 2009 18:46:03 +0100 Subject: [Gambas-user] gambas server is work. Other questions... In-Reply-To: <1241453307.49ff12fb46975@...1539...> References: <1241453307.49ff12fb46975@...1539...> Message-ID: <4247f5440905041046g3a31b07cq9dcf3609500f0ca4@...627...> I don't think all the components (e.g. forms etc) will work in server pages. This is okay though Ex: <% DIM a AS Integer DIM c AS String %> -- joshua higgins >>>>>>------ From joshiggins at ...1601... Mon May 4 19:49:20 2009 From: joshiggins at ...1601... (Joshua Higgins) Date: Mon, 4 May 2009 18:49:20 +0100 Subject: [Gambas-user] gambas web script In-Reply-To: <1241455702.49ff1c564c38e@...1433...> References: <1241455702.49ff1c564c38e@...1433...> Message-ID: <4247f5440905041049h5a0c5ee3j394d499533338fd3@...627...> I can't test this because I don't have a postgresql server running, but try checking your apache error.log for more info... (/var/log/apache2/error.log) And you don't have to use <% %> on each line. e.g: <% oCnn.Type = "postgresql" %> <% oCnn.Host = "127.0.0.1" %> <% oCnn.Login = "postgres" %> <% oCnn.Password = "1234" %> is the same as <% oCnn.Type = "postgresql" oCnn.Host = "127.0.0.1" oCnn.Login = "postgres" oCnn.Password = "1234" %> 2009/5/4 Wellington de Souza Pinto > Below my teste.gbw > Show erro. Any idea??? > > Reguards, > > Souza, Wellington > > ------------------------------------------------------------------------------- > > #!/usr/bin/env gbw2 > <% USE "gb.db" %> > <% DIM i AS Integer %> > <% DIM oCnn AS NEW Connection %> > <% DIM oRs AS NEW Result %> > > >

TESTE DE LEITURA DO POSTGRESQL/h2> > > <% oCnn.Type = "postgresql" %> > <% oCnn.Host = "127.0.0.1" %> > <% oCnn.Login = "postgres" %> > <% oCnn.Password = "1234" %> > <% oCnn.Name = "test" %> > <% oCnn.Open %> > <% oRs = oCnn.Exec("SELECT f_nome, f_funcao, usuario, senha FROM cadfun > ORDER BY > Lower(f_nome);") %> > > > Nome > Funcao > Usuario > Senha > > <% oRs.MoveFirst %> > <% FOR i = 0 TO oRs.Max %> > > <%= oRs[0] %> > <%= oRs[1] %> > <%= oRs[2] %> > <%= oRs[3] %>  > > <% oRs.MoveNext %> > <% NEXT %> > > > > <% oRs = NULL %> > <% oCnn.Close %> > > > > > ___________________________________________________________________________________ > Para fazer uma liga??o DDD pra perto ou pra longe, faz um 21. A Embratel > tem > tarifas muito baratas esperando por voc?. Aproveite! > > > > ------------------------------------------------------------------------------ > Register Now & Save for Velocity, the Web Performance & Operations > Conference from O'Reilly Media. Velocity features a full day of > expert-led, hands-on workshops and two days of sessions from industry > leaders in dedicated Performance & Operations tracks. Use code vel09scf > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- joshua higgins >>>>>>------ From gambas at ...1... Mon May 4 20:05:19 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Mon, 4 May 2009 20:05:19 +0200 Subject: [Gambas-user] Errotr message " Illegal seek" In-Reply-To: <23359909.post@...1379...> References: <23359909.post@...1379...> Message-ID: <200905042005.19637.gambas@...1...> > When I execute the code below , it works fine for the first "Single" button > push. But on the second push > I get an error message " System error. Illegal seek". Any ideas ? > > PUBLIC SUB Single_Click() > DIM i AS Integer > DIM dump AS Byte > DIM data AS Byte > ' DIM data AS String > PRINT "Test" > PRINT #hfile "S" ' Send S to start sweep > FOR i = 0 TO points - 1 > READ #hfile, data, points > buffer[i] = data > NEXT > draw_chart(buffer, points) > END You must tell which version of Gambas you use, and where you get the error exactly. The better would be sending your project, and a way to reproduce the error! Regards, -- Beno?t From gambas at ...1... Mon May 4 20:16:16 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Mon, 4 May 2009 20:16:16 +0200 Subject: [Gambas-user] gambas server is work. Other questions... In-Reply-To: <1241453307.49ff12fb46975@...1539...> References: <1241453307.49ff12fb46975@...1539...> Message-ID: <200905042016.16627.gambas@...1...> > Tks, > My gambas server work now. > > Questions: > > Is possible multiplies comands in string? > Ex: <% DIM a AS Integer > DIM c AS String %> > Yes. The three rules are : The web page is transformed into a Gambas function. All HTML is replaced by a PRINT instruction. The Gambas code between <% ... %> is put "as is" inside the function. <%= XXX %> is replaced by a the expression Str(HTML(XXXX)) > In other message Benoit say for use the mysql <% USE "gb.db" %>. Is > Possible for all componentes of gambas? > Ex: <% USE "gb.Form" %> > <% DIM myObject AS TextBox %> > <% myObject = NEW TextBox AS "MyTxtBx" %> > <% myObject.X = 10 %> > <% MyObject.Y = 10 %> > <% myObject.Text = "Hellho Word!!!" %> > <% myObject.Show() %> > > Reguards, > > Souza, Wellington > > PS: My english is not very well. All components can be used. But using "gb.qt" inside a CGI script would lead to an error, as the QT library won't be able to connect to an X11 display. Regards, -- Beno?t From tinker43 at ...626... Mon May 4 21:34:10 2009 From: tinker43 at ...626... (frenchpark43) Date: Mon, 4 May 2009 12:34:10 -0700 (PDT) Subject: [Gambas-user] Errotr message " Illegal seek" In-Reply-To: <200905042005.19637.gambas@...1...> References: <23359909.post@...1379...> <200905042005.19637.gambas@...1...> Message-ID: <23375064.post@...1379...> I am using Gambas 2.11 on Ubuntu 9.04. My PC is connected via a serial port to a microcontoller-based circuit which sends 16 characters every time it receives an "S character. The code seems to stop at the READ statement. I have tried to insert debug messages but for some reason the Console disappears when I run the program. Bugzilla from gambas at ...1... wrote: > >> When I execute the code below , it works fine for the first "Single" >> button >> push. But on the second push >> I get an error message " System error. Illegal seek". Any ideas ? >> >> PUBLIC SUB Single_Click() >> DIM i AS Integer >> DIM dump AS Byte >> DIM data AS Byte >> ' DIM data AS String >> PRINT "Test" >> PRINT #hfile "S" ' Send S to start sweep >> FOR i = 0 TO points - 1 >> READ #hfile, data, points >> buffer[i] = data >> NEXT >> draw_chart(buffer, points) >> END > > You must tell which version of Gambas you use, and where you get the error > exactly. The better would be sending your project, and a way to reproduce > the > error! > > Regards, > > -- > Beno?t > > ------------------------------------------------------------------------------ > Register Now & Save for Velocity, the Web Performance & Operations > Conference from O'Reilly Media. Velocity features a full day of > expert-led, hands-on workshops and two days of sessions from industry > leaders in dedicated Performance & Operations tracks. Use code vel09scf > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > -- View this message in context: http://www.nabble.com/Errotr-message-%22-Illegal-seek%22-tp23359909p23375064.html Sent from the gambas-user mailing list archive at Nabble.com. From tinker43 at ...626... Mon May 4 22:07:36 2009 From: tinker43 at ...626... (frenchpark43) Date: Mon, 4 May 2009 13:07:36 -0700 (PDT) Subject: [Gambas-user] Errotr message " Illegal seek" In-Reply-To: <23359909.post@...1379...> References: <23359909.post@...1379...> Message-ID: <23375691.post@...1379...> I was wrong about where the program seems to stop. It is at the line Print #hfile "S" . http://www.nabble.com/file/p23375691/FMain.class FMain.class frenchpark43 wrote: > > When I execute the code below , it works fine for the first "Single" > button push. But on the second push > I get an error message " System error. Illegal seek". Any ideas ? > > PUBLIC SUB Single_Click() > DIM i AS Integer > DIM dump AS Byte > DIM data AS Byte > ' DIM data AS String > PRINT "Test" > PRINT #hfile "S" ' Send S to start sweep > FOR i = 0 TO points - 1 > READ #hfile, data, points > buffer[i] = data > NEXT > draw_chart(buffer, points) > END > -- View this message in context: http://www.nabble.com/Errotr-message-%22-Illegal-seek%22-tp23359909p23375691.html Sent from the gambas-user mailing list archive at Nabble.com. From acardenas at ...2158... Tue May 5 02:20:02 2009 From: acardenas at ...2158... (Alonso Cardenas Marquez) Date: Mon, 4 May 2009 19:20:02 -0500 Subject: [Gambas-user] Gambas2 on FreeBSD Message-ID: <4a173bfc0905041720x37fc3d7tf66b3775264dd9a2@...627...> Hi guys :) Finally, I have finish to make gambas2 FreeBSD ports. It is around of 29 ports and I'll commit them to FreeBSD ports tree as soon as possible (I need pass some tests more). This is the list of gambas2 ports: archivers/gambas2-gb-compress-bzlib2 archivers/gambas2-gb-compress-zlib audio/gambas2-gb-sdl-sound databases/gambas2-gb-db-firebird databases/gambas2-gb-db-mysql databases/gambas2-gb-db-postgresql databases/gambas2-gb-db-odbc databases/gambas2-gb-db-sqlite2 databases/gambas2-gb-db-sqlite3 devel/gambas2-gb-pcre devel/gambas2-gb-corba devel/gambas2-gb-sdl editors/gambas2-ide ftp/gambas2-gb-net-curl graphics/gambas2-gb-opengl graphics/gambas2-gb-image graphics/gambas2-gb-gtk-svg graphics/gambas2-gb-pdf lang/gambas2 lang/gambas2-base lang/gambas2-components mail/gambas2-gb-net-smtp net/gambas2-gb-net security/gambas2-gb-crypt textproc/gambas2-gb-xml x11/gambas2-qt-kde x11/gambas2-gb-desktop x11-toolkits/gambas2-gb-gtk x11-toolkits/gambas2-gb-qt ( excluding v4l and qte components, because only it is available for GNU/Linux). I put a screenshot of gambas2 running on my FreeBSD desktop at: http://people.freebsd.org/~acm/screen/gambas2-freebsd.png FreeBSD users, enjoy it :) Greetings ACM From jbskaggs at ...1871... Tue May 5 07:03:41 2009 From: jbskaggs at ...1871... (jbskaggs) Date: Mon, 4 May 2009 22:03:41 -0700 (PDT) Subject: [Gambas-user] Gambas and 3d game engines Message-ID: <23381068.post@...1379...> Are there any 3d game engines designed to work with Gambas? Or rather are there 3d game engines Gambas can use? JB SKaggs -- View this message in context: http://www.nabble.com/Gambas-and-3d-game-engines-tp23381068p23381068.html Sent from the gambas-user mailing list archive at Nabble.com. From eilert-sprachen at ...221... Tue May 5 10:36:29 2009 From: eilert-sprachen at ...221... (Rolf-Werner Eilert) Date: Tue, 05 May 2009 10:36:29 +0200 Subject: [Gambas-user] What does the "?" for a datatype? Message-ID: <49FFFA8D.8010001@...221...> Hi folks, just stumbled over this: When typing AS Integer or AS Boolean, the IDE gives me several completions to choose from: Integer Integer? Integer[] or Boolean Boolean? Boolean[] What is the questionmark variation good for? Rolf From rospolosco at ...152... Tue May 5 10:55:09 2009 From: rospolosco at ...152... (Stefano Palmeri) Date: Tue, 5 May 2009 10:55:09 +0200 Subject: [Gambas-user] What does the "?" for a datatype? In-Reply-To: <49FFFA8D.8010001@...221...> References: <49FFFA8D.8010001@...221...> Message-ID: <200905051055.09568.rospolosco@...152...> Il marted? 5 maggio 2009 10:36:29 Rolf-Werner Eilert ha scritto: > Hi folks, > > just stumbled over this: When typing AS Integer or AS Boolean, the IDE > gives me several completions to choose from: > > Integer > Integer? > Integer[] > > or > > Boolean > Boolean? > Boolean[] > > What is the questionmark variation good for? > > Rolf > Integer? is the same as IsInteger Boolean? is the same as IsBoolean See datatype functions in Gambas online help (or local). http://www.gambasdoc.org/help/cat/type?v3 Stefano > --------------------------------------------------------------------------- >--- The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your > production scanning environment may not be a perfect world - but thanks to > Kodak, there's a perfect scanner to get the job done! With the NEW KODAK > i700 Series Scanner you'll get full speed at 300 dpi even with all image > processing features enabled. http://p.sf.net/sfu/kodak-com > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From eilert-sprachen at ...221... Tue May 5 11:35:28 2009 From: eilert-sprachen at ...221... (Rolf-Werner Eilert) Date: Tue, 05 May 2009 11:35:28 +0200 Subject: [Gambas-user] What does the "?" for a datatype? In-Reply-To: <200905051055.09568.rospolosco@...152...> References: <49FFFA8D.8010001@...221...> <200905051055.09568.rospolosco@...152...> Message-ID: <4A000860.306@...221...> Stefano Palmeri schrieb: > Il marted? 5 maggio 2009 10:36:29 Rolf-Werner Eilert ha scritto: >> Hi folks, >> >> just stumbled over this: When typing AS Integer or AS Boolean, the IDE >> gives me several completions to choose from: >> >> Integer >> Integer? >> Integer[] >> >> or >> >> Boolean >> Boolean? >> Boolean[] >> >> What is the questionmark variation good for? >> >> Rolf >> > > Integer? is the same as IsInteger > Boolean? is the same as IsBoolean > > See datatype functions in Gambas online help (or local). > > http://www.gambasdoc.org/help/cat/type?v3 > > Stefano > > Aaah - it's a function! Very interesting :-) Thanks for that! Rolf From gambas at ...1... Tue May 5 12:20:25 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Tue, 5 May 2009 12:20:25 +0200 Subject: [Gambas-user] Gambas2 on FreeBSD In-Reply-To: <4a173bfc0905041720x37fc3d7tf66b3775264dd9a2@...627...> References: <4a173bfc0905041720x37fc3d7tf66b3775264dd9a2@...627...> Message-ID: <200905051220.25986.gambas@...1...> > Hi guys :) > > Finally, I have finish to make gambas2 FreeBSD ports. It is around of > 29 ports and I'll commit them to FreeBSD ports tree as soon as > possible (I need pass some tests more). This is the list of gambas2 > ports: > > archivers/gambas2-gb-compress-bzlib2 > archivers/gambas2-gb-compress-zlib > audio/gambas2-gb-sdl-sound > databases/gambas2-gb-db-firebird > databases/gambas2-gb-db-mysql > databases/gambas2-gb-db-postgresql > databases/gambas2-gb-db-odbc > databases/gambas2-gb-db-sqlite2 > databases/gambas2-gb-db-sqlite3 > devel/gambas2-gb-pcre > devel/gambas2-gb-corba > devel/gambas2-gb-sdl > editors/gambas2-ide > ftp/gambas2-gb-net-curl > graphics/gambas2-gb-opengl > graphics/gambas2-gb-image > graphics/gambas2-gb-gtk-svg > graphics/gambas2-gb-pdf > lang/gambas2 > lang/gambas2-base > lang/gambas2-components > mail/gambas2-gb-net-smtp > net/gambas2-gb-net > security/gambas2-gb-crypt > textproc/gambas2-gb-xml > x11/gambas2-qt-kde > x11/gambas2-gb-desktop > x11-toolkits/gambas2-gb-gtk > x11-toolkits/gambas2-gb-qt > > ( excluding v4l and qte components, because only it is available for > GNU/Linux). > > I put a screenshot of gambas2 running on my FreeBSD desktop at: > > http://people.freebsd.org/~acm/screen/gambas2-freebsd.png > > FreeBSD users, enjoy it :) > > Greetings > ACM > Great news. Tell us when Gambas 2.x is in the official ports. Regards, -- Beno?t From smiefert at ...784... Tue May 5 14:22:36 2009 From: smiefert at ...784... (Stefan Miefert) Date: Tue, 5 May 2009 14:22:36 +0200 Subject: [Gambas-user] Execute Gamabs? Message-ID: <8D42310D957CFB46AA11921A711D4D16023F579EEF@...1899...> Hello, i want to execute a gambasprogramm like this exec("test.gambas") but how can I start a gambas programm in the terminal? I get always the answer "not found" From rospolosco at ...152... Tue May 5 14:35:29 2009 From: rospolosco at ...152... (Stefano Palmeri) Date: Tue, 5 May 2009 14:35:29 +0200 Subject: [Gambas-user] Execute Gamabs? In-Reply-To: <8D42310D957CFB46AA11921A711D4D16023F579EEF@...1899...> References: <8D42310D957CFB46AA11921A711D4D16023F579EEF@...1899...> Message-ID: <200905051435.30162.rospolosco@...152...> Il marted? 5 maggio 2009 14:22:36 Stefan Miefert ha scritto: > Hello, > > i want to execute a gambasprogramm like this > > exec("test.gambas") > > but how can I start a gambas programm in the terminal? > > I get always the answer "not found" > You have to copy test.gambas in one of the directory of your PATH variable. On console type: echo $PATH to know the directories where executables are searched for. Just copy test.gambas in one of them (/usr/local/bin or /usr/bin). In Gambas you could know the PATH variable with: PRINT Application.Env["PATH"] Saluti, Stefano > --------------------------------------------------------------------------- >--- The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your > production scanning environment may not be a perfect world - but thanks to > Kodak, there's a perfect scanner to get the job done! With the NEW KODAK > i700 Series Scanner you'll get full speed at 300 dpi even with all image > processing features enabled. http://p.sf.net/sfu/kodak-com > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From smiefert at ...784... Tue May 5 14:54:33 2009 From: smiefert at ...784... (Stefan Miefert) Date: Tue, 5 May 2009 14:54:33 +0200 Subject: [Gambas-user] Execute Gamabs? In-Reply-To: <200905051435.30162.rospolosco@...152...> References: <8D42310D957CFB46AA11921A711D4D16023F579EEF@...1899...> <200905051435.30162.rospolosco@...152...> Message-ID: <8D42310D957CFB46AA11921A711D4D16023F579EF1@...1899...> Hello, and when i want to start it in another directory? Via the desktop I can execute the program in my own directory -----Urspr?ngliche Nachricht----- Von: Stefano Palmeri [mailto:rospolosco at ...152...] Gesendet: Dienstag, 5. Mai 2009 14:35 An: mailing list for gambas users Betreff: Re: [Gambas-user] Execute Gamabs? Il marted? 5 maggio 2009 14:22:36 Stefan Miefert ha scritto: > Hello, > > i want to execute a gambasprogramm like this > > exec("test.gambas") > > but how can I start a gambas programm in the terminal? > > I get always the answer "not found" > You have to copy test.gambas in one of the directory of your PATH variable. On console type: echo $PATH to know the directories where executables are searched for. Just copy test.gambas in one of them (/usr/local/bin or /usr/bin). In Gambas you could know the PATH variable with: PRINT Application.Env["PATH"] Saluti, Stefano > --------------------------------------------------------------------------- >--- The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your > production scanning environment may not be a perfect world - but thanks to > Kodak, there's a perfect scanner to get the job done! With the NEW KODAK > i700 Series Scanner you'll get full speed at 300 dpi even with all image > processing features enabled. http://p.sf.net/sfu/kodak-com > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user ------------------------------------------------------------------------------ The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From rospolosco at ...152... Tue May 5 15:02:12 2009 From: rospolosco at ...152... (Stefano Palmeri) Date: Tue, 5 May 2009 15:02:12 +0200 Subject: [Gambas-user] Execute Gamabs? In-Reply-To: <8D42310D957CFB46AA11921A711D4D16023F579EF1@...1899...> References: <8D42310D957CFB46AA11921A711D4D16023F579EEF@...1899...> <200905051435.30162.rospolosco@...152...> <8D42310D957CFB46AA11921A711D4D16023F579EF1@...1899...> Message-ID: <200905051502.12378.rospolosco@...152...> Il marted? 5 maggio 2009 14:54:33 Stefan Miefert ha scritto: > Hello, > > and when i want to start it in another directory? > > Via the desktop I can execute the program in my own directory > give the full path. es: EXEC ["/home/user/test.gambas"] > -----Urspr?ngliche Nachricht----- > Von: Stefano Palmeri [mailto:rospolosco at ...152...] > Gesendet: Dienstag, 5. Mai 2009 14:35 > An: mailing list for gambas users > Betreff: Re: [Gambas-user] Execute Gamabs? > > Il marted? 5 maggio 2009 14:22:36 Stefan Miefert ha scritto: > > Hello, > > > > i want to execute a gambasprogramm like this > > > > exec("test.gambas") > > > > but how can I start a gambas programm in the terminal? > > > > I get always the answer "not found" > > You have to copy test.gambas in one of the directory of your > PATH variable. > > On console type: > > echo $PATH > > to know the directories where executables are searched for. Just > copy test.gambas in one of them (/usr/local/bin or /usr/bin). > > In Gambas you could know the PATH variable with: > > PRINT Application.Env["PATH"] > > Saluti, > > Stefano > > > ------------------------------------------------------------------------- > >-- --- The NEW KODAK i700 Series Scanners deliver under ANY circumstances! > > Your production scanning environment may not be a perfect world - but > > thanks to Kodak, there's a perfect scanner to get the job done! With the > > NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with > > all image processing features enabled. http://p.sf.net/sfu/kodak-com > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > --------------------------------------------------------------------------- >--- The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your > production scanning environment may not be a perfect world - but thanks to > Kodak, there's a perfect scanner to get the job done! With the NEW KODAK > i700 Series Scanner you'll get full speed at 300 dpi even with all image > processing features enabled. http://p.sf.net/sfu/kodak-com > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > --------------------------------------------------------------------------- >--- The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your > production scanning environment may not be a perfect world - but thanks to > Kodak, there's a perfect scanner to get the job done! With the NEW KODAK > i700 Series Scanner you'll get full speed at 300 dpi even with all image > processing features enabled. http://p.sf.net/sfu/kodak-com > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From smiefert at ...784... Tue May 5 15:09:14 2009 From: smiefert at ...784... (Stefan Miefert) Date: Tue, 5 May 2009 15:09:14 +0200 Subject: [Gambas-user] Execute Gamabs? In-Reply-To: <200905051435.30162.rospolosco@...152...> References: <8D42310D957CFB46AA11921A711D4D16023F579EEF@...1899...> <200905051435.30162.rospolosco@...152...> Message-ID: <8D42310D957CFB46AA11921A711D4D16023F579EF6@...1899...> Hello, the gambas program is a gtk program. When I start it via console I get an error. Canot open display how can I fix this? -----Urspr?ngliche Nachricht----- Von: Stefano Palmeri [mailto:rospolosco at ...152...] Gesendet: Dienstag, 5. Mai 2009 14:35 An: mailing list for gambas users Betreff: Re: [Gambas-user] Execute Gamabs? Il marted? 5 maggio 2009 14:22:36 Stefan Miefert ha scritto: > Hello, > > i want to execute a gambasprogramm like this > > exec("test.gambas") > > but how can I start a gambas programm in the terminal? > > I get always the answer "not found" > You have to copy test.gambas in one of the directory of your PATH variable. On console type: echo $PATH to know the directories where executables are searched for. Just copy test.gambas in one of them (/usr/local/bin or /usr/bin). In Gambas you could know the PATH variable with: PRINT Application.Env["PATH"] Saluti, Stefano > --------------------------------------------------------------------------- >--- The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your > production scanning environment may not be a perfect world - but thanks to > Kodak, there's a perfect scanner to get the job done! With the NEW KODAK > i700 Series Scanner you'll get full speed at 300 dpi even with all image > processing features enabled. http://p.sf.net/sfu/kodak-com > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user ------------------------------------------------------------------------------ The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From smiefert at ...784... Tue May 5 15:11:36 2009 From: smiefert at ...784... (Stefan Miefert) Date: Tue, 5 May 2009 15:11:36 +0200 Subject: [Gambas-user] Execute Gamabs? In-Reply-To: <200905051502.12378.rospolosco@...152...> References: <8D42310D957CFB46AA11921A711D4D16023F579EEF@...1899...> <200905051435.30162.rospolosco@...152...> <8D42310D957CFB46AA11921A711D4D16023F579EF1@...1899...> <200905051502.12378.rospolosco@...152...> Message-ID: <8D42310D957CFB46AA11921A711D4D16023F579EF8@...1899...> Hello, thanks! I try the same ten times and i always get errors and now it runs :) Il marted? 5 maggio 2009 14:54:33 Stefan Miefert ha scritto: > Hello, > > and when i want to start it in another directory? > > Via the desktop I can execute the program in my own directory > give the full path. es: EXEC ["/home/user/test.gambas"] > -----Urspr?ngliche Nachricht----- > Von: Stefano Palmeri [mailto:rospolosco at ...152...] > Gesendet: Dienstag, 5. Mai 2009 14:35 > An: mailing list for gambas users > Betreff: Re: [Gambas-user] Execute Gamabs? > > Il marted? 5 maggio 2009 14:22:36 Stefan Miefert ha scritto: > > Hello, > > > > i want to execute a gambasprogramm like this > > > > exec("test.gambas") > > > > but how can I start a gambas programm in the terminal? > > > > I get always the answer "not found" > > You have to copy test.gambas in one of the directory of your > PATH variable. > > On console type: > > echo $PATH > > to know the directories where executables are searched for. Just > copy test.gambas in one of them (/usr/local/bin or /usr/bin). > > In Gambas you could know the PATH variable with: > > PRINT Application.Env["PATH"] > > Saluti, > > Stefano > > > ------------------------------------------------------------------------- > >-- --- The NEW KODAK i700 Series Scanners deliver under ANY circumstances! > > Your production scanning environment may not be a perfect world - but > > thanks to Kodak, there's a perfect scanner to get the job done! With the > > NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with > > all image processing features enabled. http://p.sf.net/sfu/kodak-com > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > --------------------------------------------------------------------------- >--- The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your > production scanning environment may not be a perfect world - but thanks to > Kodak, there's a perfect scanner to get the job done! With the NEW KODAK > i700 Series Scanner you'll get full speed at 300 dpi even with all image > processing features enabled. http://p.sf.net/sfu/kodak-com > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > --------------------------------------------------------------------------- >--- The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your > production scanning environment may not be a perfect world - but thanks to > Kodak, there's a perfect scanner to get the job done! With the NEW KODAK > i700 Series Scanner you'll get full speed at 300 dpi even with all image > processing features enabled. http://p.sf.net/sfu/kodak-com > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user ------------------------------------------------------------------------------ The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From wdahn at ...1000... Tue May 5 15:28:14 2009 From: wdahn at ...1000... (Werner) Date: Tue, 05 May 2009 21:28:14 +0800 Subject: [Gambas-user] Execute Gamabs? In-Reply-To: <8D42310D957CFB46AA11921A711D4D16023F579EF6@...1899...> References: <8D42310D957CFB46AA11921A711D4D16023F579EEF@...1899...> <200905051435.30162.rospolosco@...152...> <8D42310D957CFB46AA11921A711D4D16023F579EF6@...1899...> Message-ID: <4A003EEE.1050703@...1000...> Stefan Miefert wrote: > Hello, > > the gambas program is a gtk program. When I start it via console I get an error. Canot open display > > how can I fix this? > > -----Urspr?ngliche Nachricht----- > Von: Stefano Palmeri [mailto:rospolosco at ...152...] > Gesendet: Dienstag, 5. Mai 2009 14:35 > An: mailing list for gambas users > Betreff: Re: [Gambas-user] Execute Gamabs? > > Il marted? 5 maggio 2009 14:22:36 Stefan Miefert ha scritto: > >> Hello, >> >> i want to execute a gambasprogramm like this >> >> exec("test.gambas") >> >> but how can I start a gambas programm in the terminal? >> >> I get always the answer "not found" >> >> > > You have to copy test.gambas in one of the directory of your > PATH variable. > > On console type: > > echo $PATH > > to know the directories where executables are searched for. Just > copy test.gambas in one of them (/usr/local/bin or /usr/bin). > > In Gambas you could know the PATH variable with: > > PRINT Application.Env["PATH"] > > Saluti, > > Stefano Before you run your program, you could try to type xhost + Does it make a difference? Regards Werner PS: You might get more people willing to respond if you refrain from top posting. It really messes up the chronology. From smiefert at ...784... Tue May 5 15:51:47 2009 From: smiefert at ...784... (Stefan Miefert) Date: Tue, 5 May 2009 15:51:47 +0200 Subject: [Gambas-user] Execute Gamabs? In-Reply-To: <4A003EEE.1050703@...1000...> References: <8D42310D957CFB46AA11921A711D4D16023F579EEF@...1899...> <200905051435.30162.rospolosco@...152...> <8D42310D957CFB46AA11921A711D4D16023F579EF6@...1899...> <4A003EEE.1050703@...1000...> Message-ID: <8D42310D957CFB46AA11921A711D4D16023F579EFB@...1899...> Message No protocol defined -----Urspr?ngliche Nachricht----- Von: Werner [mailto:wdahn at ...1000...] Gesendet: Dienstag, 5. Mai 2009 15:28 An: mailing list for gambas users Betreff: Re: [Gambas-user] Execute Gamabs? Stefan Miefert wrote: > Hello, > > the gambas program is a gtk program. When I start it via console I get an error. Canot open display > > how can I fix this? > > -----Urspr?ngliche Nachricht----- > Von: Stefano Palmeri [mailto:rospolosco at ...152...] > Gesendet: Dienstag, 5. Mai 2009 14:35 > An: mailing list for gambas users > Betreff: Re: [Gambas-user] Execute Gamabs? > > Il marted? 5 maggio 2009 14:22:36 Stefan Miefert ha scritto: > >> Hello, >> >> i want to execute a gambasprogramm like this >> >> exec("test.gambas") >> >> but how can I start a gambas programm in the terminal? >> >> I get always the answer "not found" >> >> > > You have to copy test.gambas in one of the directory of your > PATH variable. > > On console type: > > echo $PATH > > to know the directories where executables are searched for. Just > copy test.gambas in one of them (/usr/local/bin or /usr/bin). > > In Gambas you could know the PATH variable with: > > PRINT Application.Env["PATH"] > > Saluti, > > Stefano Before you run your program, you could try to type xhost + Does it make a difference? Regards Werner PS: You might get more people willing to respond if you refrain from top posting. It really messes up the chronology. ------------------------------------------------------------------------------ The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From ronstk at ...239... Tue May 5 18:16:55 2009 From: ronstk at ...239... (Ron_1st) Date: Tue, 5 May 2009 18:16:55 +0200 Subject: [Gambas-user] Execute Gamabs? In-Reply-To: <8D42310D957CFB46AA11921A711D4D16023F579EFB@...1899...> References: <8D42310D957CFB46AA11921A711D4D16023F579EEF@...1899...> <4A003EEE.1050703@...1000...> <8D42310D957CFB46AA11921A711D4D16023F579EFB@...1899...> Message-ID: <200905051816.56298.ronstk@...239...> On Tuesday 05 May 2009, Stefan Miefert wrote: > Message > > No protocol defined > > -----Urspr?ngliche Nachricht----- > Von: Werner [mailto:wdahn at ...1000...] > Gesendet: Dienstag, 5. Mai 2009 15:28 > An: mailing list for gambas users > Betreff: Re: [Gambas-user] Execute Gamabs? > > Stefan Miefert wrote: > > Hello, > > > > the gambas program is a gtk program. When I start it via console I get an error. Canot open display > > > > how can I fix this? > > > > -----Urspr?ngliche Nachricht----- > > Von: Stefano Palmeri [mailto:rospolosco at ...152...] > > Gesendet: Dienstag, 5. Mai 2009 14:35 > > An: mailing list for gambas users > > Betreff: Re: [Gambas-user] Execute Gamabs? > > > > Il marted? 5 maggio 2009 14:22:36 Stefan Miefert ha scritto: > > > >> Hello, > >> > >> i want to execute a gambasprogramm like this > >> > >> exec("test.gambas") > >> > >> but how can I start a gambas programm in the terminal? > >> > >> I get always the answer "not found" > >> > >> > > > > You have to copy test.gambas in one of the directory of your > > PATH variable. > > > > On console type: > > > > echo $PATH > > > > to know the directories where executables are searched for. Just > > copy test.gambas in one of them (/usr/local/bin or /usr/bin). > > > > In Gambas you could know the PATH variable with: > > > > PRINT Application.Env["PATH"] > > > > Saluti, > > > > Stefano > Before you run your program, you could try to type > > xhost + > > Does it make a difference? > > Regards > Werner > > > > PS: You might get more people willing to respond if you refrain from top > posting. It really messes up the chronology. > interesting. Best regards, Ron_1st -- A: Delete the text you reply on. Q: What to do to get my post on top? --- A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? --- A: Top-posting. Q: What is the most annoying thing in e-mail? From jussi.lahtinen at ...626... Tue May 5 18:22:09 2009 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Tue, 5 May 2009 19:22:09 +0300 Subject: [Gambas-user] Execute Gamabs? In-Reply-To: <200905051816.56298.ronstk@...239...> References: <8D42310D957CFB46AA11921A711D4D16023F579EEF@...1899...> <4A003EEE.1050703@...1000...> <8D42310D957CFB46AA11921A711D4D16023F579EFB@...1899...> <200905051816.56298.ronstk@...239...> Message-ID: <384d3900905050922j16e897c5m968252d94cc1aeb3@...627...> I have done this with; SHELL "gbr2 " & Path &/ "programname.gambas" and I haven't run into any problems. Jussi On Tue, May 5, 2009 at 19:16, Ron_1st wrote: > On Tuesday 05 May 2009, Stefan Miefert wrote: >> Message >> >> No protocol defined >> >> -----Urspr?ngliche Nachricht----- >> Von: Werner [mailto:wdahn at ...1000...] >> Gesendet: Dienstag, 5. Mai 2009 15:28 >> An: mailing list for gambas users >> Betreff: Re: [Gambas-user] Execute Gamabs? >> >> Stefan Miefert wrote: >> > Hello, >> > >> > the gambas program is a gtk program. When I start it via console I get an error. Canot open display >> > >> > how can I fix this? >> > >> > -----Urspr?ngliche Nachricht----- >> > Von: Stefano Palmeri [mailto:rospolosco at ...152...] >> > Gesendet: Dienstag, 5. Mai 2009 14:35 >> > An: mailing list for gambas users >> > Betreff: Re: [Gambas-user] Execute Gamabs? >> > >> > Il marted? 5 maggio 2009 14:22:36 Stefan Miefert ha scritto: >> > >> >> Hello, >> >> >> >> i want to execute a gambasprogramm like this >> >> >> >> exec("test.gambas") >> >> >> >> but how can I start a gambas programm in the terminal? >> >> >> >> I get always the answer "not found" >> >> >> >> >> > >> > You have to copy test.gambas in one of the directory of your >> > PATH variable. >> > >> > On console type: >> > >> > echo $PATH >> > >> > to know the directories where executables are searched for. Just >> > copy test.gambas in one of them (/usr/local/bin or /usr/bin). >> > >> > In Gambas you could know the PATH variable with: >> > >> > PRINT Application.Env["PATH"] >> > >> > Saluti, >> > >> > Stefano >> Before you run your program, you could try to type >> >> xhost + >> >> Does it make a difference? >> >> Regards >> Werner >> >> >> >> PS: You might get more people willing to respond if you refrain from top >> posting. It really messes up the chronology. >> > > interesting. > > Best regards, > > Ron_1st > > -- > ?A: Delete the text you reply on. > ?Q: What to do to get my post on top? > --- > ?A: Because it messes up the order in which people normally read text. > ?Q: Why is top-posting such a bad thing? > --- > ?A: Top-posting. > ?Q: What is the most annoying thing in e-mail? > > > ------------------------------------------------------------------------------ > The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your > production scanning environment may not be a perfect world - but thanks to > Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 > Series Scanner you'll get full speed at 300 dpi even with all image > processing features enabled. http://p.sf.net/sfu/kodak-com > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas at ...1... Tue May 5 18:34:38 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Tue, 5 May 2009 18:34:38 +0200 Subject: [Gambas-user] Cannot scroll gridview by mouse wheel with hidden row (gb.gtk) In-Reply-To: <49EDD257.7060701@...1907...> References: <49EDD257.7060701@...1907...> Message-ID: <200905051834.38923.gambas@...1...> > With gb.gtk, I cannot scroll gridview by mouse wheel > if some hidden row (gridview.rows[].height = 0) exist. > > I attached small project to check it. > > When you click Button1, then even rows are set as hidden. > Scroll bar works, but cannot scroll with mouse wheel > even though mouse pointer is in the gridview. > > It works fine with gb.qt. > > I'm using gambas-2.12 with gtk+-2.16.1 and qt-3.3.8 > > Best regards, Hi, The bug was fixed in revision #1948. Both in gb.gtk and gb.qt, as gb.qt sometimes crashed when resizing a row during a Data event. Regards, -- Beno?t From andreas at ...2139... Tue May 5 18:47:41 2009 From: andreas at ...2139... (Andreas =?ISO-8859-1?Q?M=FCller?=) Date: Tue, 05 May 2009 18:47:41 +0200 Subject: [Gambas-user] Execute Gamabs? In-Reply-To: References: Message-ID: <1241542061.3496.2.camel@...2140...> read this: man xhost best regards -andreas > From: Stefan Miefert > Subject: Re: [Gambas-user] Execute Gamabs? > Hello, > > the gambas program is a gtk program. When I start it via console I get > an error. Canot open display > > how can I fix this? > From kazutaka802 at ...1907... Wed May 6 03:16:49 2009 From: kazutaka802 at ...1907... (HARADA Kazutaka) Date: Wed, 06 May 2009 10:16:49 +0900 Subject: [Gambas-user] Cannot scroll gridview by mouse wheel with hidden row (gb.gtk) In-Reply-To: <200905051834.38923.gambas@...1...> References: <49EDD257.7060701@...1907...> <200905051834.38923.gambas@...1...> Message-ID: <4A00E501.2020501@...1907...> Hi, (06 May 2009 01:34) Beno?t Minisini wrote: > The bug was fixed in revision #1948. Both in gb.gtk and gb.qt, as gb.qt > sometimes crashed when resizing a row during a Data event. > Tanks Beno?t. I'm really grad to hear that the problem is fixed! Regards, -- -------------------------------------- Kazutaka HARADA e-mail:kazutaka802 at ...1907... -------------------------------------- From rterry at ...1946... Wed May 6 15:01:45 2009 From: rterry at ...1946... (richard terry) Date: Wed, 6 May 2009 23:01:45 +1000 Subject: [Gambas-user] help with some simple parsing Message-ID: <200905062301.45335.rterry@...1946...> See the attached file for the data. Unfortunately I'm brain dead when it comes to simple logic. In one of my hl7 messages in the Free Text segment under an actual pathology result, there is a list of sequential bood test results representing previous results of the same type - , separated by tabs which I need to display properly. as I've re-constructed the result as html, the tabs simply disappear in the result, so I've been looking for a solution, and to start I thought maybe I could split this up into lines and then later put it into a table embedded in the html to keep it aligned. Perhaps there is a simple way out, but this is what I've done so far. So I started with this: 1) Split this into lines Dim bits as string[] dim a_line as string bits = split(the_text_in_the_file,"
,"", TRUE) for each a_line in bits print a_line next Problem with this is that the \t (I presume tab character) gets in the way, and it dosn't split properly with the results of the bits[] as shown in the picture. Interestingly an occasional letter is lost off the test names. Any help appreciated. richard -------------- next part -------------- 05-Jan-09 21-Oct-08 25-Aug-08 30-Jun-08
Sodium 142 136 143 140
Potassium 3.7 3.8 4.5 4.0
Chloride 103 100 104 103
Bicarb. 31 H 29 33 H 29
Urea 4.5 3.9 4.4 4.7
Creatinine 73 59 L 68 60 L
GFR Est. 69 89 75 87
Anion Gap 12 11 11 13
Calcium 2.22 2.33 2.28
Calc.IonCa 1.09 1.11 1.10
T.Protein 67 69 65 66
Albumin 38 37 40 40
Calc.Glob. 30 32 25 L 26 L
Total Bilirubin 4 6 4 5
GGT 18 25 24 19
Alk.Phos. 90 74 82 70
ALT 40 H 33 30 26
AST 32 H 26 22 18
LD 232 188 270 H 173
Glucose -------------- next part -------------- A non-text attachment was scrubbed... Name: bits.png Type: image/png Size: 42656 bytes Desc: not available URL: From emil at ...1913... Wed May 6 15:47:40 2009 From: emil at ...1913... (Emil Tchekov) Date: Wed, 6 May 2009 15:47:40 +0200 Subject: [Gambas-user] help with some simple parsing In-Reply-To: <200905062301.45335.rterry@...1946...> Message-ID: You can use Replace$ to search and remove the "\t" character in your string. I am not so fluent in Gambas, but the good old VB6 does support "" (null string) as replacement, so I suppose that Gambas also do this. Just put your "a_line" there and search for any "\t", replace with "" (null string)... Your text will get cleared ... Other point of mention: It will may be better to split also the "a_line" on the TAB char and thus receive "semi"-two dimensional array containing your values. Then you can start (re-)creating / displaying your data properly. kind regards Emil P.S. Are you physician? -----Ursprungliche Nachricht----- Von: richard terry [mailto:rterry at ...1946...] Gesendet: Mittwoch, 6. Mai 2009 15:02 An: mailing list for gambas users; Ian Haywood Betreff: [Gambas-user] help with some simple parsing See the attached file for the data. Unfortunately I'm brain dead when it comes to simple logic. In one of my hl7 messages in the Free Text segment under an actual pathology result, there is a list of sequential bood test results representing previous results of the same type - , separated by tabs which I need to display properly. as I've re-constructed the result as html, the tabs simply disappear in the result, so I've been looking for a solution, and to start I thought maybe I could split this up into lines and then later put it into a table embedded in the html to keep it aligned. Perhaps there is a simple way out, but this is what I've done so far. So I started with this: 1) Split this into lines Dim bits as string[] dim a_line as string bits = split(the_text_in_the_file,"
,"", TRUE) for each a_line in bits print a_line next Problem with this is that the \t (I presume tab character) gets in the way, and it dosn't split properly with the results of the bits[] as shown in the picture. Interestingly an occasional letter is lost off the test names. Any help appreciated. richard From rospolosco at ...152... Wed May 6 16:12:08 2009 From: rospolosco at ...152... (Stefano Palmeri) Date: Wed, 6 May 2009 16:12:08 +0200 Subject: [Gambas-user] help with some simple parsing In-Reply-To: <200905062301.45335.rterry@...1946...> References: <200905062301.45335.rterry@...1946...> Message-ID: <200905061612.08929.rospolosco@...152...> Il mercoled? 6 maggio 2009 15:01:45 richard terry ha scritto: > See the attached file for the data. Unfortunately I'm brain dead when it > comes to simple logic. > > In one of my hl7 messages in the Free Text segment under an actual > pathology result, there is a list of sequential bood test results > representing previous results of the same type - , separated by tabs which > I need to display properly. as I've re-constructed the result as html, the > tabs simply disappear in the result, so I've been looking for a solution, > and to start I thought maybe I could split this up into lines and then > later put it into a table embedded in the html to keep it aligned. > > Perhaps there is a simple way out, but this is what I've done so far. > > > So I started with this: > > 1) Split this into lines > > Dim bits as string[] > dim a_line as string > > bits = split(the_text_in_the_file,"
,"", TRUE) > > for each a_line in bits > print a_line > next > > Problem with this is that the \t (I presume tab character) gets in the way, > and it dosn't split properly with the results of the bits[] as shown in the > picture. Interestingly an occasional letter is lost off the test names. > > Any help appreciated. > > richard You can't use "
" as a separator , because "
" is a list of separators. This is why you miss some letters, Eg. "R"esults, "B"icarb. I will do a substitution with Replace$ to have a uniq splitting char. (I used "@") eg.: PUBLIC SUB Main() DIM bits AS string[] DIM a_line AS String DIM sReplacedText AS String sReplacedText = Replace$(File.Load("sample_tabbed_text"), "
", "@") bits = Split(sReplacedText, "@", "", TRUE) FOR EACH a_line IN bits PRINT a_line NEXT END Saluti, Stefano From rolf.frogs at ...221... Wed May 6 17:03:38 2009 From: rolf.frogs at ...221... (Rolf Schmidt) Date: Wed, 6 May 2009 17:03:38 +0200 Subject: [Gambas-user] help with some simple parsing In-Reply-To: <200905062301.45335.rterry@...1946...> References: <200905062301.45335.rterry@...1946...> Message-ID: <200905061703.41886.rolf.frogs@...221...> Hi Richard > In one of my hl7 messages in the Free Text segment under an actual > pathology result, there is a list of sequential bood test results > representing previous results of the same type - , separated by tabs which > I need to display properly. as I've re-constructed the result as html, the > tabs simply disappear in the result, so I've been looking for a solution, > and to start I thought maybe I could split this up into lines and then > later put it into a table embedded in the html to keep it aligned. > > Perhaps there is a simple way out, but this is what I've done so far. > > So I started with this: > > 1) Split this into lines > > Dim bits as string[] > dim a_line as string > > bits = split(the_text_in_the_file,"
,"", TRUE) > > for each a_line in bits > print a_line > next > > Problem with this is that the \t (I presume tab character) gets in the way, > and it dosn't split properly with the results of the bits[] as shown in the > picture. Interestingly an occasional letter is lost off the test names. I didn't find any \t-char in your file. But I think it is a table, where the first line hold the column headers and each line starts with a word. So I suggest, that you keep the newline - perhaps the char which you substitute with the
-Tag - as it is. Then compress all spaces to one space and substitute this to \t (i.e. tab-chars). A shell command like the follwoing one will do this: cat sample_text | tr -s ' ' | tr ' ' \t > converted_text (Perhaps a gambas-guru can translate the line in a simple Gambas statement) Now you can split your converted_text in an array of lines. Use the first array entry for your the column headers of a listview (but split the line by the \t char) Do the same for all the other lines and you will get a nice table. Of course you can create a html-table as well, if you have your data in the suggested format. Hope that helps Rolf -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part. URL: From sbungay at ...981... Wed May 6 16:52:25 2009 From: sbungay at ...981... (Stephen Bungay) Date: Wed, 06 May 2009 10:52:25 -0400 Subject: [Gambas-user] help with some simple parsing In-Reply-To: <200905062301.45335.rterry@...1946...> References: <200905062301.45335.rterry@...1946...> Message-ID: <4A01A429.1060104@...981...> Hi Richard This code snippet will dump the text into a TextArea for you, it asumes (a bad thing) that there are no newline characters in the data and as such works with your sample. I used a button to launch the code... the important bits are in the middle... :) PUBLIC SUB ButtonGO_Click() DIM hFile AS File DIM LineInput AS String DIM ScrapString AS String DIM SPlitString AS String[] hFile = OPEN "/home/bungayst/scrap/sample_tabbed_text" FOR INPUT WHILE NOT Eof(hFile) LINE INPUT #hFile, LineInput WEND CLOSE hFile LineInput = Replace$(LineInput, "
", "\n") TextArea1.Text = LineInput SplitString = Split(LineInput, "\t") FOR EACH ScrapString IN SPlitString PRINT ScrapString NEXT END richard terry wrote: > See the attached file for the data. Unfortunately I'm brain dead when it comes > to simple logic. > > In one of my hl7 messages in the Free Text segment under an actual pathology > result, there is a list of sequential bood test results representing previous > results of the same type - , separated by tabs which I need to display > properly. as I've re-constructed the result as html, the tabs simply > disappear in the result, so I've been looking for a solution, and to start I > thought maybe I could split this up into lines and then later put it into a > table embedded in the html to keep it aligned. > > Perhaps there is a simple way out, but this is what I've done so far. > > > So I started with this: > > 1) Split this into lines > > Dim bits as string[] > dim a_line as string > > bits = split(the_text_in_the_file,"
,"", TRUE) > > for each a_line in bits > print a_line > next > > Problem with this is that the \t (I presume tab character) gets in the way, > and it dosn't split properly with the results of the bits[] as shown in the > picture. Interestingly an occasional letter is lost off the test names. > > Any help appreciated. > > richard > > > > > > ------------------------------------------------------------------------ > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your > production scanning environment may not be a perfect world - but thanks to > Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 > Series Scanner you'll get full speed at 300 dpi even with all image > processing features enabled. http://p.sf.net/sfu/kodak-com > > > ------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From kevinfishburne at ...1887... Wed May 6 19:30:24 2009 From: kevinfishburne at ...1887... (Kevin Fishburne) Date: Wed, 06 May 2009 13:30:24 -0400 Subject: [Gambas-user] can't terminate fluidsynth processes by sending "quit" command over socket Message-ID: <1241631024.15688.61.camel@...2159...> Hello everyone. I'm having an odd issue that's got me stumped. My GAMBAS app opens several fluidsynth daemons listening on different ports and communicates with them over a socket. While they do all send and receive commands properly, when I issue the "quit" command to any of the fluidsynth daemons they don't actually terminate. They do respond with "Cheers!", which is what they say when they terminate, but the processes remain and they continue responding to commands. I have to use SHELL "pkill fluidsynth", which leaves the daemons unable to be restarted because they can't bind to their designated port/socket afterward for some reason. At first I thought it was fluidsynth behaving badly, but I'm able to telnet to the fluidsynth daemon and issue the "quit" command successfully using the same shell command as GAMBAS. I'm starting fluidsynth with the following command: SHELL "fluidsynth --connect-jack-outputs --no-shell --verbose --server --audio-driver=jack --midi-channels=1 --portname=LiquidSynth01 -oshell.port=9800 -oaudio.jack.id=LiquidSynth01 -omidi.driver=alsa_seq -omidi.portname=LiquidSynth01 -omidi.alsa_seq.id=LiquidSynth01" My code to stop the fluidsynth daemons is: DIM i AS Integer ' Stop FluidSynth. FOR i = 1 TO 16 Send_To_FluidSynth("quit", i) SLEEP 0.125 NEXT PUBLIC SUB Send_To_FluidSynth(FluidString AS String, Daemon AS Integer) ' Send a command to FluidSynth DIM Timeout AS Single FluidString = FluidString & "\n" ' Add carriage return to command is executed. Socket = NEW Socket Socket.Connect("localhost", 9799 + Daemon) DO WHILE (Socket.Status <> 7) AND (Socket.Status > 0) WAIT 0.1 Timeout = Timeout + 0.1 IF Timeout >= 0.25 THEN EXIT LOOP Timeout = 0 IF Socket.Status = 7 THEN ' Socket is good, send command. WRITE #Socket, FluidString, Len(FluidString) PRINT "Sending command to FluidSynth daemon: " & FluidString END IF DO WHILE Lof(Socket) = 0 WAIT 0.1 Timeout = Timeout + 0.1 IF Timeout >= 0.25 THEN EXIT LOOP READ #Socket, FluidString, Lof(Socket) PRINT "FluidSynth daemon replies with: " & FluidString CLOSE #Socket END As you can see there are 16 fluidsynth daemons starting at port 9800 and going up to port 9815. The for/next loop just cycles through these 16 ports to terminate each process sequentially. I added the timeout stuff because if the code runs with no fluidsynth processes active/listening it just hangs there in the do/loop loops. Here's my debug/console output right after trying to quit the fluidsynth daemons, including anything they replied with: Sending command to FluidSynth daemon: quit FluidSynth daemon replies with: cheers! Sending command to FluidSynth daemon: quit FluidSynth daemon replies with: cheers! Sending command to FluidSynth daemon: quit FluidSynth daemon replies with: cheers! Sending command to FluidSynth daemon: quit FluidSynth daemon replies with: cheers! Sending command to FluidSynth daemon: quit FluidSynth daemon replies with: cheers! Sending command to FluidSynth daemon: quit FluidSynth daemon replies with: cheers! Sending command to FluidSynth daemon: quit FluidSynth daemon replies with: cheers! Sending command to FluidSynth daemon: quit FluidSynth daemon replies with: cheers! Sending command to FluidSynth daemon: quit FluidSynth daemon replies with: cheers! Sending command to FluidSynth daemon: quit FluidSynth daemon replies with: cheers! Sending command to FluidSynth daemon: quit FluidSynth daemon replies with: cheers! Sending command to FluidSynth daemon: quit FluidSynth daemon replies with: cheers! Sending command to FluidSynth daemon: quit FluidSynth daemon replies with: cheers! Sending command to FluidSynth daemon: quit FluidSynth daemon replies with: cheers! Sending command to FluidSynth daemon: quit FluidSynth daemon replies with: cheers! Sending command to FluidSynth daemon: quit FluidSynth daemon replies with: cheers! Terminated WARNING: Child process terminated by signal 15 cannot read server event (Success) cannot complete execution of the processing graph (Resource temporarily unavailable) zombified - calling shutdown handler fluidsynth: error: Help! Lost the connection to the JACK server zombified - calling shutdown handler fluidsynth: error: Help! Lost the connection to the JACK server zombified - calling shutdown handler fluidsynth: error: Help! Lost the connection to the JACK server zombified - calling shutdown handler fluidsynth: error: Help! Lost the connection to the JACK server zombified - calling shutdown handler fluidsynth: error: Help! Lost the connection to the JACK server zombified - calling shutdown handler fluidsynth: error: Help! Lost the connection to the JACK server zombified - calling shutdown handler fluidsynth: error: Help! Lost the connection to the JACK server zombified - calling shutdown handler fluidsynth: error: Help! Lost the connection to the JACK server cannot complete execution of the processing graph (Success) cannot complete execution of the processing graph (Success) zombified - calling shutdown handler zombified - calling shutdown handler fluidsynth: error: Help! Lost the connection to the JACK server fluidsynth: error: Help! Lost the connection to the JACK server zombified - calling shutdown handler fluidsynth: error: Help! Lost the connection to the JACK server zombified - calling shutdown handler fluidsynth: error: Help! Lost the connection to the JACK server zombified - calling shutdown handler fluidsynth: error: Help! Lost the connection to the JACK server zombified - calling shutdown handler fluidsynth: error: Help! Lost the connection to the JACK server zombified - calling shutdown handler fluidsynth: error: Help! Lost the connection to the JACK server zombified - calling shutdown handler fluidsynth: error: Help! Lost the connection to the JACK server Failure to resume: Invalid argument The messages about JACK are because JACK is terminated after I attempt to terminate the fluidsynth daemons. Of course if they actually terminated properly they'd have nothing to complain about. I have no idea what's up with the "zombified" messages. Any ideas anyone? Kevin Fishburne Eight Virtues www: e-mail: phone: http://sales.eightvirtues.com sales at ...1887... (770) 853-6271 From info.geex at ...626... Thu May 7 04:29:28 2009 From: info.geex at ...626... (Sergio A. Hernandez) Date: Wed, 6 May 2009 20:29:28 -0600 Subject: [Gambas-user] help with some simple parsing In-Reply-To: <4A01A429.1060104@...981...> References: <200905062301.45335.rterry@...1946...> <4A01A429.1060104@...981...> Message-ID: <705a68020905061929n5c09f67w71ed56d70aa04de4@...627...> Richard, See the attached file and let me know if this is the output you want. It is a HTML document. My approach is kind of different, probably the best way to handle this is by using the XML Writer. On Wed, May 6, 2009 at 8:52 AM, Stephen Bungay wrote: > ? Hi Richard > > ? ?This code snippet will dump the text into a TextArea for you, it > asumes (a bad thing) that there are no newline characters in the data > and as such works with your sample. I used a button to launch the > code... the important bits are in the middle... :) > > PUBLIC SUB ButtonGO_Click() > ? DIM hFile AS File > ? DIM LineInput AS String > ? DIM ScrapString AS String > ? DIM SPlitString AS String[] > > ? hFile = OPEN "/home/bungayst/scrap/sample_tabbed_text" FOR INPUT > ? WHILE NOT Eof(hFile) > ? ? ? ? LINE INPUT #hFile, LineInput > ? WEND > ? CLOSE hFile > > ? LineInput = Replace$(LineInput, "
", "\n") > ? TextArea1.Text = LineInput > ? SplitString = Split(LineInput, "\t") > > ? FOR EACH ScrapString IN SPlitString > ? ? ? PRINT ScrapString > ? NEXT > END > > > richard terry wrote: >> See the attached file for the data. Unfortunately I'm brain dead when it comes >> to simple logic. >> >> In one of my hl7 messages in the Free Text segment under an actual pathology >> result, there is a list of sequential bood test results representing previous >> results of the same type - , separated by tabs which I need to display >> properly. as I've re-constructed the result as html, the tabs simply >> disappear in the result, so I've been looking for a solution, and to start I >> thought maybe I could split this up into lines and then later put it into a >> table embedded in the html to keep it aligned. >> >> Perhaps there is a simple way out, but this is what I've done so far. >> >> >> So I started with this: >> >> 1) Split this into lines >> >> Dim bits as string[] >> dim a_line as string >> >> bits = split(the_text_in_the_file,"
,"", TRUE) >> >> for each a_line in bits >> ? ? ? print a_line >> next >> >> Problem with this is that the \t (I presume tab character) gets in the way, >> and it dosn't split properly with the results of the bits[] as shown in the >> picture. Interestingly an occasional letter is lost off the test names. >> >> Any help appreciated. >> >> richard >> >> >> >> >> >> ------------------------------------------------------------------------ >> >> >> ------------------------------------------------------------------------ >> >> ------------------------------------------------------------------------------ >> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your >> production scanning environment may not be a perfect world - but thanks to >> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 >> Series Scanner you'll get full speed at 300 dpi even with all image >> processing features enabled. http://p.sf.net/sfu/kodak-com >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user > > ------------------------------------------------------------------------------ > The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your > production scanning environment may not be a perfect world - but thanks to > Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 > Series Scanner you'll get full speed at 300 dpi even with all image > processing features enabled. http://p.sf.net/sfu/kodak-com > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From info.geex at ...626... Thu May 7 05:50:02 2009 From: info.geex at ...626... (Sergio A. Hernandez) Date: Wed, 6 May 2009 21:50:02 -0600 Subject: [Gambas-user] help with some simple parsing In-Reply-To: <200905062301.45335.rterry@...1946...> References: <200905062301.45335.rterry@...1946...> Message-ID: <705a68020905062050h6b4b3aa5r388cb348353cc593@...627...> Try the following. It is a complete different approach using the XML Writer. Try it as a console project, just make sure you the gb.xml is selected under PROJECT\PROPERTIES\COMPONENTS ' Gambas module file PUBLIC SUB Main() DIM docXML AS XmlWriter docXML = NEW XmlWriter 'this line is to save the xml document in your home folder docXML.Open(User.Home & "/DoctorRicky.html", TRUE) 'This part is the fancy CSS styling only is not important docXML.StartElement("style", ["type", "text/css"]) docXML.Text("table.fancyTable {padding: 2pt; widht:100%;}") docXML.Text("th {font-weight: bold; background-color: #cccc99; color: #000000}") docXML.Text("tr.evenRow {background-color: #f5f5dc; text-align: center}") docXML.Text("tr.oddRow {background-color: #ffffff; text-align: center}") docXML.EndElement docXML.StartElement("table", ["class", "fancyTable"]) ' is the HTML tab for the headers docXML.Element("th", "Test") docXML.Element("th", "Date 1") docXML.Element("th", "Date 2") docXML.Element("th", "Date 3") ' is the tag for the rows docXML.StartElement("tr", ["class", "oddRow"]) ' is the tag for the colums ' number of elements must be the same as the number of elements docXML.Element("td", "LDL Fraction") docXML.Element("td", "50 ml/dl") docXML.Element("td", "100 ml/dl") docXML.Element("td", "150 ml/dl") docXML.EndElement() 'On the real life you'll prefer to handle this with a Loop Control Structure docXML.StartElement("tr", ["class", "evenRow"]) docXML.Element("td", "HDL Fraction") docXML.Element("td", "50 ml/dl") docXML.Element("td", "75 ml/dl") docXML.Element("td", "100 ml/dl") docXML.EndElement() docXML.EndElement() 'PRINT Xml.EndDocument END On Wed, May 6, 2009 at 7:01 AM, richard terry wrote: > See the attached file for the data. Unfortunately I'm brain dead when it comes > to simple logic. > > In one of my hl7 messages in the Free Text segment under an actual pathology > result, there is a list of sequential bood test results representing previous > results of the same type - , separated by tabs which I need to display > properly. as I've re-constructed the result as html, the tabs simply > disappear in the result, so I've been looking for a solution, and to start I > thought maybe I could split this up into lines and then later put it into a > table embedded in the html to keep it aligned. > > Perhaps there is a simple way out, but this is what I've done so far. > > > So I started with this: > > 1) Split this into lines > > Dim bits as string[] > dim a_line as string > > bits = split(the_text_in_the_file,"
,"", TRUE) > > for each a_line in bits > ? ? ? ?print a_line > next > > Problem with this is that the \t (I presume tab character) gets in the way, > and it dosn't split properly with the results of the bits[] as shown in the > picture. Interestingly an occasional letter is lost off the test names. > > Any help appreciated. > > richard > > > > > ------------------------------------------------------------------------------ > The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your > production scanning environment may not be a perfect world - but thanks to > Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 > Series Scanner you'll get full speed at 300 dpi even with all image > processing features enabled. http://p.sf.net/sfu/kodak-com > _______________________________________________ > 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: MMain.module Type: application/octet-stream Size: 1701 bytes Desc: not available URL: From info.geex at ...626... Thu May 7 05:53:22 2009 From: info.geex at ...626... (Sergio A. Hernandez) Date: Wed, 6 May 2009 21:53:22 -0600 Subject: [Gambas-user] help with some simple parsing In-Reply-To: <705a68020905062050h6b4b3aa5r388cb348353cc593@...627...> References: <200905062301.45335.rterry@...1946...> <705a68020905062050h6b4b3aa5r388cb348353cc593@...627...> Message-ID: <705a68020905062053k4f955081ue5186bc751ad1819@...627...> Opps i uploaded the wrong file. Sorry. On Wed, May 6, 2009 at 9:50 PM, Sergio A. Hernandez wrote: > Try the following. It is a complete different approach using the XML Writer. > Try it as a console project, just make sure you the gb.xml is selected under > PROJECT\PROPERTIES\COMPONENTS > > ' Gambas module file > PUBLIC SUB Main() > ?DIM docXML AS XmlWriter > > ?docXML = NEW XmlWriter > ?'this line is to save the xml document in your home folder > ?docXML.Open(User.Home & "/DoctorRicky.html", TRUE) > > ?'This part is the fancy CSS styling only is not important > ?docXML.StartElement("style", ["type", "text/css"]) > ? ?docXML.Text("table.fancyTable {padding: 2pt; widht:100%;}") > ? ?docXML.Text("th {font-weight: bold; background-color: #cccc99; > color: #000000}") > ? ?docXML.Text("tr.evenRow {background-color: #f5f5dc; text-align: center}") > ? ?docXML.Text("tr.oddRow {background-color: #ffffff; text-align: center}") > ?docXML.EndElement > > ?docXML.StartElement("table", ["class", "fancyTable"]) > ? ' is the HTML tab for the headers > ? docXML.Element("th", "Test") > ? docXML.Element("th", "Date 1") > ? docXML.Element("th", "Date 2") > ? docXML.Element("th", "Date 3") > ? ' is the tag for the rows > ? docXML.StartElement("tr", ["class", "oddRow"]) > ? ? ' is the tag for the colums > ? ? ' number of elements must be the same as the number of /> elements > ? ? docXML.Element("td", "LDL Fraction") > ? ? docXML.Element("td", "50 ml/dl") > ? ? docXML.Element("td", "100 ml/dl") > ? ? docXML.Element("td", "150 ml/dl") > ? docXML.EndElement() > > ? 'On the real life you'll prefer to handle this with a Loop Control Structure > ? docXML.StartElement("tr", ["class", "evenRow"]) > ? ? docXML.Element("td", "HDL Fraction") > ? ? docXML.Element("td", "50 ml/dl") > ? ? docXML.Element("td", "75 ml/dl") > ? ? docXML.Element("td", "100 ml/dl") > ? docXML.EndElement() > ?docXML.EndElement() > ?'PRINT Xml.EndDocument > END > > On Wed, May 6, 2009 at 7:01 AM, richard terry wrote: >> See the attached file for the data. Unfortunately I'm brain dead when it comes >> to simple logic. >> >> In one of my hl7 messages in the Free Text segment under an actual pathology >> result, there is a list of sequential bood test results representing previous >> results of the same type - , separated by tabs which I need to display >> properly. as I've re-constructed the result as html, the tabs simply >> disappear in the result, so I've been looking for a solution, and to start I >> thought maybe I could split this up into lines and then later put it into a >> table embedded in the html to keep it aligned. >> >> Perhaps there is a simple way out, but this is what I've done so far. >> >> >> So I started with this: >> >> 1) Split this into lines >> >> Dim bits as string[] >> dim a_line as string >> >> bits = split(the_text_in_the_file,"
,"", TRUE) >> >> for each a_line in bits >> ? ? ? ?print a_line >> next >> >> Problem with this is that the \t (I presume tab character) gets in the way, >> and it dosn't split properly with the results of the bits[] as shown in the >> picture. Interestingly an occasional letter is lost off the test names. >> >> Any help appreciated. >> >> richard >> >> >> >> >> ------------------------------------------------------------------------------ >> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your >> production scanning environment may not be a perfect world - but thanks to >> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 >> Series Scanner you'll get full speed at 300 dpi even with all image >> processing features enabled. http://p.sf.net/sfu/kodak-com >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> >> > From doriano.blengino at ...1909... Thu May 7 07:42:53 2009 From: doriano.blengino at ...1909... (Doriano Blengino) Date: Thu, 07 May 2009 07:42:53 +0200 Subject: [Gambas-user] can't terminate fluidsynth processes by sending "quit" command over socket In-Reply-To: <1241631024.15688.61.camel@...2159...> References: <1241631024.15688.61.camel@...2159...> Message-ID: <4A0274DD.9040104@...1909...> Kevin Fishburne ha scritto: > Hello everyone. I'm having an odd issue that's got me stumped. My GAMBAS > app opens several fluidsynth daemons listening on different ports and > communicates with them over a socket. While they do all send and receive > commands properly, when I issue the "quit" command to any of the > fluidsynth daemons they don't actually terminate. They do respond with > "Cheers!", which is what they say when they terminate, but the processes > remain and they continue responding to commands. I have to use SHELL > "pkill fluidsynth", which leaves the daemons unable to be restarted > because they can't bind to their designated port/socket afterward for > some reason. > > At first I thought it was fluidsynth behaving badly, but I'm able to > telnet to the fluidsynth daemon and issue the "quit" command > successfully using the same shell command as GAMBAS. I'm starting > fluidsynth with the following command: > > SHELL "fluidsynth --connect-jack-outputs --no-shell --verbose --server > --audio-driver=jack --midi-channels=1 --portname=LiquidSynth01 > -oshell.port=9800 -oaudio.jack.id=LiquidSynth01 -omidi.driver=alsa_seq > -omidi.portname=LiquidSynth01 -omidi.alsa_seq.id=LiquidSynth01" > > My code to stop the fluidsynth daemons is: > > DIM i AS Integer > > ' Stop FluidSynth. > FOR i = 1 TO 16 > Send_To_FluidSynth("quit", i) > SLEEP 0.125 > NEXT > > PUBLIC SUB Send_To_FluidSynth(FluidString AS String, Daemon AS Integer) > > ' Send a command to FluidSynth > DIM Timeout AS Single > FluidString = FluidString & "\n" ' Add carriage return to command is > executed. > Socket = NEW Socket > Socket.Connect("localhost", 9799 + Daemon) > DO WHILE (Socket.Status <> 7) AND (Socket.Status > 0) > WAIT 0.1 > Timeout = Timeout + 0.1 > IF Timeout >= 0.25 THEN EXIT > LOOP > Timeout = 0 > IF Socket.Status = 7 THEN > ' Socket is good, send command. > WRITE #Socket, FluidString, Len(FluidString) > PRINT "Sending command to FluidSynth daemon: " & FluidString > END IF > DO WHILE Lof(Socket) = 0 > WAIT 0.1 > Timeout = Timeout + 0.1 > IF Timeout >= 0.25 THEN EXIT > LOOP > READ #Socket, FluidString, Lof(Socket) > PRINT "FluidSynth daemon replies with: " & FluidString > CLOSE #Socket > > END > > As you can see there are 16 fluidsynth daemons starting at port 9800 and > going up to port 9815. The for/next loop just cycles through these 16 > ports to terminate each process sequentially. I added the timeout stuff > because if the code runs with no fluidsynth processes active/listening > it just hangs there in the do/loop loops. > > Here's my debug/console output right after trying to quit the fluidsynth > daemons, including anything they replied with: > > Sending command to FluidSynth daemon: quit > FluidSynth daemon replies with: cheers! > Sending command to FluidSynth daemon: quit > FluidSynth daemon replies with: cheers! > Sending command to FluidSynth daemon: quit > FluidSynth daemon replies with: cheers! > Sending command to FluidSynth daemon: quit > FluidSynth daemon replies with: cheers! > Sending command to FluidSynth daemon: quit > FluidSynth daemon replies with: cheers! > Sending command to FluidSynth daemon: quit > FluidSynth daemon replies with: cheers! > Sending command to FluidSynth daemon: quit > FluidSynth daemon replies with: cheers! > Sending command to FluidSynth daemon: quit > FluidSynth daemon replies with: cheers! > Sending command to FluidSynth daemon: quit > FluidSynth daemon replies with: cheers! > Sending command to FluidSynth daemon: quit > FluidSynth daemon replies with: cheers! > Sending command to FluidSynth daemon: quit > FluidSynth daemon replies with: cheers! > Sending command to FluidSynth daemon: quit > FluidSynth daemon replies with: cheers! > Sending command to FluidSynth daemon: quit > FluidSynth daemon replies with: cheers! > Sending command to FluidSynth daemon: quit > FluidSynth daemon replies with: cheers! > Sending command to FluidSynth daemon: quit > FluidSynth daemon replies with: cheers! > Sending command to FluidSynth daemon: quit > FluidSynth daemon replies with: cheers! > Terminated > WARNING: Child process terminated by signal 15 > cannot read server event (Success) > cannot complete execution of the processing graph (Resource temporarily > unavailable) > zombified - calling shutdown handler > fluidsynth: error: Help! Lost the connection to the JACK server > zombified - calling shutdown handler > fluidsynth: error: Help! Lost the connection to the JACK server > zombified - calling shutdown handler > fluidsynth: error: Help! Lost the connection to the JACK server > zombified - calling shutdown handler > fluidsynth: error: Help! Lost the connection to the JACK server > zombified - calling shutdown handler > fluidsynth: error: Help! Lost the connection to the JACK server > zombified - calling shutdown handler > fluidsynth: error: Help! Lost the connection to the JACK server > zombified - calling shutdown handler > fluidsynth: error: Help! Lost the connection to the JACK server > zombified - calling shutdown handler > fluidsynth: error: Help! Lost the connection to the JACK server > cannot complete execution of the processing graph (Success) > cannot complete execution of the processing graph (Success) > zombified - calling shutdown handler > zombified - calling shutdown handler > fluidsynth: error: Help! Lost the connection to the JACK server > fluidsynth: error: Help! Lost the connection to the JACK server > zombified - calling shutdown handler > fluidsynth: error: Help! Lost the connection to the JACK server > zombified - calling shutdown handler > fluidsynth: error: Help! Lost the connection to the JACK server > zombified - calling shutdown handler > fluidsynth: error: Help! Lost the connection to the JACK server > zombified - calling shutdown handler > fluidsynth: error: Help! Lost the connection to the JACK server > zombified - calling shutdown handler > fluidsynth: error: Help! Lost the connection to the JACK server > zombified - calling shutdown handler > fluidsynth: error: Help! Lost the connection to the JACK server > Failure to resume: Invalid argument > > The messages about JACK are because JACK is terminated after I attempt > to terminate the fluidsynth daemons. Of course if they actually > terminated properly they'd have nothing to complain about. I have no > idea what's up with the "zombified" messages. Any ideas anyone? > I don't know fluidsynth enough, and I never used sockets with gambas, but some idea could be stated anyway. A "zombie" is a process which has no more its parent. Every process in Linux is started by some other process, which then becomes the parent of the new process (the child). The parent should wait for the child to terminate, but if the parent terminates prematurely, then the child process becomes a zombie. What here seems to happen is that your program terminates before fluidsynth, turning it in a zombie. It seems that fluidsynth, noticing to be "zombified", chooses to terminate. Perhaps the reason is somehow related to the way you communicate with it - just to start, I can say that a telnet program does many more things than a simple TCP connection, so you should investigate about this. Is fluidsynth able to communicate smoothly using a simple TCP connection, or it requires some more handshake? A try you can do is to modify slightly your code for waiting a reply from the daemon: DO WHILE Lof(Socket) = 0 WAIT 0.1 Timeout = Timeout + 0.1 IF Timeout >= 0.25 THEN EXIT LOOP READ #Socket, FluidString, Lof(Socket) PRINT "FluidSynth daemon replies with: " & FluidString CLOSE #Socket Here, you wait until something appears on the socket, then read it and close the socket; but it could be too soon. I think it would be better to wait for the EOF. May be that fluidsynth sends "cheers!" then, after a short time, it wants to send more. But your socket is already closed, You could put a delay just after asking all daemons to stop; few milliseconds are not a long time, but a gambas program can do a lot of things in the meantime (ie, terminate too early...). Does all the rest of the communication work properly? If yes, then probably you are near to success. If not, then it is a communication problem. Could be (I repeat, "could be") that you must send CR instead of newline, or something similar. Hope this help, cheers! (but I am not terminating... :-)) -- Doriano Blengino "Listen twice before you speak. This is why we have two ears, but only one mouth." From ivanwms64 at ...43... Thu May 7 13:00:01 2009 From: ivanwms64 at ...43... (Ivan Williams) Date: Thu, 7 May 2009 04:00:01 -0700 (PDT) Subject: [Gambas-user] sqlite integer to text string problem Message-ID: <702145.31823.qm@...2160...> Greetings I have a problem - I can query a sqlite database using SELECT ssym,sclose FROM shistory where (sdate='2009-05-06') and sclose<.75 and sclose > .1 order by ssym,sdate; and receive the following output: AAC|0.24 AAME|0.64 AAU|0.61 ABMC|0.16 ABTL|0.5 ACLS|0.47 but when I do the same in gambas and write it out I receive AAC -1076125292 sclose is defined as a integer in the sqlite database. Can anyone tell me what function to use to convert this to a string so I can output it to a report or grid? Thank You Ivan I never saw a wild thing sorry for itself. A small bird will drop frozen dead from a bough Without ever having felt sorry for itself. -- D.H. Lawrence Linux - Live Free or Die. From adam at ...2162... Thu May 7 14:07:49 2009 From: adam at ...2162... (Adam Camp) Date: Thu, 07 May 2009 13:07:49 +0100 Subject: [Gambas-user] problem with mysql Message-ID: <20090507130749.20592k84l6wbtvcw@...2163...> Hi everyone, I'm running Kubuntu 9.04 (Jaunty) on an Intel P4 3GHz (i386) with 1GB of RAM. I have tried the packaged Gambas2, and have also compiled the latest from source following the instructions on the website. I am getting the following error: Cannot find driver for database: MySQL. However most of my MySQL connection details have come straight from the example: MODMain.module ' Gambas module file PUBLIC $conn AS NEW Connection PUBLIC PROCEDURE Connect() $conn.Close() ' Close the connection $conn.Type = "MySQL" ' Type of connection $conn.Host = "localhost" ' Name of the server $conn.Login = "root" ' User's name for the connection $conn.Port = "3306" ' Port to use in the connection, usually 3306 $conn.Name = "menagerie" ' Name of the data base we want to use $conn.Password = "password" ' User's password $conn.Open() ' Open the connection END PUBLIC SUB Main() ' Run the Procedure to connect FMain.Visible = TRUE ' The main form of your program END FMain.class ' Gambas class file PUBLIC SUB Button1_Click() DIM $resProducts AS Result ModMain.Connect() $resProducts = ModMain.$conn.Exec("SELECT * FROM products WHERE active ='1'") Button2.Text = ($resProducts!shortname) END I have loaded the gb.db extension. Any help would be greatly appreciated. Thanks Adam ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. From gambas at ...1... Thu May 7 14:12:07 2009 From: gambas at ...1... (=?iso-8859-1?q?Beno=EEt_Minisini?=) Date: Thu, 7 May 2009 14:12:07 +0200 Subject: [Gambas-user] problem with mysql In-Reply-To: <20090507130749.20592k84l6wbtvcw@...2163...> References: <20090507130749.20592k84l6wbtvcw@...2163...> Message-ID: <200905071412.07390.gambas@...1...> > Hi everyone, > > I'm running Kubuntu 9.04 (Jaunty) on an Intel P4 3GHz (i386) with 1GB > of RAM. I have tried the packaged Gambas2, and have also compiled the > latest from source following the instructions on the website. > > I am getting the following error: > > Cannot find driver for database: MySQL. > Try "mysql" in lower case. -- Beno?t From webs37 at ...626... Thu May 7 14:59:20 2009 From: webs37 at ...626... (wahyu budhi) Date: Thu, 7 May 2009 19:59:20 +0700 Subject: [Gambas-user] How to input quotation mark in TextBox.Text to mysql In-Reply-To: <49F83E73.60506@...1740...> References: <23193181.post@...1379...> <49F83E73.60506@...1740...> Message-ID: <28df30740905070559p1b96e175hafce9d3a2004ba4a@...627...> On Wed, Apr 29, 2009 at 6:48 PM, Ron wrote: > webs37 schreef: > > Hi all, > > > > Please help.., I have error message:"Query failed: You have an error in > SQL > > syntax, check the manual that corresponds to MySQL server version for the > > right syntaxto use near 'an',address='Saudi Arabia" > > > > I want to input text that have a quotation mark like "al Qur'an" > > > > here these the syntax: > > > > syntax "edit = "UPDATE tbl_user set title='" & TextBox32.Text & > > "',publisher='" & TextBox35.Text & "',year='" & TextBox33.Text & > > "',volume='" & TextBox39.Text & "',colation='" & ComboBox14.Text & > > "',isbn='" & TextBox53.Text & "',city='" & an1!id_city & "',publisher='" > & > > ana3!id_log & "',subject='" & an2!id_log & "',distribution='" & > ana4!id_log > > & "',hp='" & TextBox36.Text & "',status='" & Label159.Caption & "' WHERE > > id='" & Label92.Caption & "'" > > rsedit = connection.Exec(edit)" > > > > any suggestion > > thx > > Hi, > > it's better to use a syntax like this, no need to put in all the quotes > yourself: > > Exec("UPDATE tbl_user SET title = &1 WHERE id = &2", TextBox32.Text, > Label92.Caption) > > Regards, > Ron_2nd. Its works, thanks for u 2 - Jack and Ron_2nd - From webs37 at ...626... Thu May 7 15:05:24 2009 From: webs37 at ...626... (wahyu budhi) Date: Thu, 7 May 2009 20:05:24 +0700 Subject: [Gambas-user] How to create xml from table view? Message-ID: <28df30740905070605y13d38296yf09d00363a55ff47@...627...> Hi all, Can I create xml from table view in gambas2? and can anyone give me an example, thx Regards, webs37 From info.geex at ...626... Thu May 7 15:19:10 2009 From: info.geex at ...626... (Sergio A. Hernandez) Date: Thu, 7 May 2009 07:19:10 -0600 Subject: [Gambas-user] How to create xml from table view? In-Reply-To: <28df30740905070605y13d38296yf09d00363a55ff47@...627...> References: <28df30740905070605y13d38296yf09d00363a55ff47@...627...> Message-ID: <705a68020905070619p41c96b4cm482073ca99940246@...627...> I just wrote this example for a different subject. All you need to do is to encapsule the related lines in a external loop for each row, then you need to include the lines in a internal loop for each column. Obviously, you can rename the