Re: [Gambas-user] Blanks in filename and path, problems with shell
I just make each file name encapsulated with ' eg if i would like to use /home/steven/My Documents/some.txt as a location I would do path = '/home/steven/My Documents/some.txt' and the the shell cmd will work correctly like this cmd = gedit path shell cmd remember shell is just like using bash, so put ' around the paths you need to use. Sorry I can not give an example with pdftk, but you should be able to modify the example to suit you needs. Steven On Wed, 2010-05-26 at 09:03 +0200, gregor wrote: Hi, I create a little GUI to merge several pdfs with a background. The syntx for pdftk is 'pdftk [inputpath/inputfile] background [backgroundfile] output [outputpath/outputfile]' With no blanks in [*] there is no problems, with blanks the shell need a quote for the blank. No I use the variant 'pdftk REPLACE([inputfile], ,CHR(92) ) background REPLACE([backgroundfile], ,CHR(92) ) output REPLACE([outputfile], ,CHR(92) )' It work but is a little bit ugly,... Maybe there is a better way? When I tried it so: inputpath = REPLACE(DirChooser1.Value, ,CHR(92) ) I got a String wich seems right, but the function DIR(inputpath) had a problem with it,... Bye Gregor -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] menu
I can only give you a start, You should look at the details of how to make a deb package. I googled and found http://www.debian.org/doc/maint-guide/ch-dother.en.html#s-install (section 5.13) This talks about a menu.ex file that is created. Try modifying that file to your sub menu. Not sure if that would work but worth a crack. Tell me how you get on Steven On Thu, 2010-04-01 at 16:28 -0700, yuhej wrote: Hello, No any idea? Maybe there is no any solution to do that? I may need to give up then the idea :-( Robi yuhej wrote: Hello List, I have a very basic question... when I develop my applications I'd like them to appear in the menu under a group (when installed on a machine). When I do tha packaging I'm able to set several parameters, but is it possible to create an own menu (for example myApps) and to put the different application under this menu (myApps/app1, myApps/app2, etc)? If yes, where can I specify it? The user PC is Ubuntu. Thanks, Robi -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Send mail with smtp
As a work around use sendmail as the mail transport. Just ensure the service is running. And as it is usually installed by default on a lot of Linux distributions. This is the case for the Desktop version of Fedora. Concerns to be safe do not enable the port 25 on your firewall. (if enabled you could be exploited as a SMTP relay) I.E change mail.Host = mail.servidor.com to mail.Host = localhost steven On Tue, 2010-03-23 at 15:39 -0300, craf wrote: Hi. I'm trying to send an email from my computer, using the gb.net.smtp component. The code that uses it: ' Gambas module file PUBLIC SUB Main() DIM mail AS NEW SmtpClient mail.To.Add(u...@recipient.net) mail.Subject = Test Mail mail.From = u...@sender.com mail.Host = mail.servidor.com mail.Port = 25 mail.Add(hello,world, text/plain) mail.Send() END When executed, this throws the following error: Server won't accept sender while starting dialog(smtp error code #575) Any ideas? Regards [OperatingSystem] OperatingSystem=Linux KernelRelease=2.6.28-14-generic DistributionVendor=ubuntu DistributionRelease=Ubuntu 9.04 [System] CPUArchitecture=i686 TotalRam=1026628 kB [Gambas] Gambas1=Not Installed Gambas2=2.20.2 Gambas2Path=/usr/local/bin/gbx2 Gambas3=Not Installed -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Natural sorting in Gambas 3
Wow that must be a first in a programming language, as most don't even bother. It's something that I always had a bug bear about. But have never had the time to implement this sort of sort on my programs. Great work, it this sort of functionality that has made Gambas great. Steven Drinnan On Mon, 2010-01-25 at 20:33 +0100, Olivier Cruilles wrote: Hi Benoit, Thank you for this great new, I need exactly this kind of sort possibility, but in Gambas 2.xx... I'll wait for the stable Gambas 3. Le 25 janv. 2010 à 20:16, Benoît Minisini a écrit : Hi, I have implemented string natural comparison and sorting in the last Gambas 3 revision. With that, you can, for example, sort a file name array returned by Dir() that way: Photo1.jpg Photo1a.jpg Photo1b.jpg Photo2.jpg ... Photo9.jpg Photo10.jpg Photo11.jpg Instead of: Photo1.jpg Photo10.jpg Photo 11.jpg Photo1a.jpg Photo1b.jpg Photo2.jpg ... Photo9.jpg For that, use the gb.Natural constant as sort flag. Moreover, if you have non-ASCII letters, you can add gb.Language to the flag, and non-ASCII characters will be correctly sorted too. You will get: Baba.jpg Bébé1.jpg Bébé8.jpg Bébé20.jpg Bibi.jpg Bobo.jpg instead of: Baba.jpg Bibi.jpg Bobo.jpg Bébé1.jpg Bébé20.jpg Bébé8.jpg How does it work? The string is splitted between parts having digits only (0-9), and parts having no digits. Parts having no digits are sorted as normal strings. Parts having digits are sorted according to their numerical values, unless it starts with a zero. Enjoy it! -- Benoît Minisini -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user Olivier Cruilles Mail: linu...@club-internet.fr -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] About financial program in Gambas
Sorry - AS for mySQL it also has round() and you use the same as the gambas function. Steven On Wed, 2009-12-16 at 16:13 -0500, nando wrote: For your info only... I always use INT or LONG for accounting and money. So, (here in Canada), $42.87 is 4287 I keep the tax (8%) as a float, therefore 8.25% is 8.25 This is ok for tax because rounding is needed. For example: 4287 * 8.25 = 35367.75 / 100 = 353.6775 add .5 for 5/4 round up down = 354.1775 Plase result into INT var which becomes 354 4287 + 354 = 4641 Using Float for taxes allows for many decimal places. Using 100 for /100 process allows for any currencies where you want more than 2 decimal places. For correct printing without rounding errors, do not do 4287/100. but rather take the STR$(4287), then split the right two off, and place a decimal in that place. Perfect math and exact calculations every single time!!! -Fernando -- Original Message --- From: Ricardo Díaz Martín oceanosoftlapa...@gmail.com To: mailing list for gambas users gambas-user@lists.sourceforge.net Sent: Wed, 16 Dec 2009 10:46:40 + Subject: Re: [Gambas-user] About financial program in Gambas Jean, You can use numbers of decimal as you want. I you want 4 you only need to divide by 1000. The only you need to decide on before insert data. If you need to add more decimals in future you only have to modify a parameter in your app from 2 to 4 (functions that show from database/write to database currency values must read this values before show/write info) and update your database multiplying cur fields by 100 (to add two digit more of precision) You never need truncate any value if you always use this especial currency type. For example if you set decimals to 4, number 19.99657 is no possible. If you need to get selling prices using four decimal coefficient, define coefficient as a currency type and set your app to use 4 decimal for all currency values I hope this helps you 2009/12/16 Jean-Yves F. Barbier 12u...@gmail.com Ricardo Díaz Martín a écrit : Hi to all, I'm use gambas to write ERP applications. At the first, I got the same problem but I decided to use long integer to save currency values. First rigth two digits are always showed to users as decimal values. I'm rewrited all my apps from windows to gambas and they are working now with no problems in customers servers. I allways use a function to show values in controls in app's forms that convert database fields values showed in textboxes whose name started int dbcur (p.e. dbcurVAT) to value div 100 and works with no problems. I use allways the same function to write forms data to database and make the reverse proccess. Hooo, thanks for the ad. Its simple and works Sounds exactly like the commercial about women thin down cream we've got on tv for months (it works!) (sorry, I couldn't resist:) So you're truncating everything to 2 decimals, but as I said VAT (and as a matter of fact almost all french taxes) is *legally* up to 4 decimals; actually only 2 of them are used, but nothing's saying that tomorrow is won't be 3 or 4 really used (especially on those times where our gov morons (pleonasm) are desesperatly looking for money.) BTW, how do you truncate 19.99657? Down to 19.99 or up to 20.00? [WINDOWS-1252?] In my family's company a cent error is worth 100,000 fine... Other PB: most of results could be predictable (as of Nb of decimals), but some can't (ie: 92.95x1.196=111.1682 OR 145x1.196=173.42), maths says decimals should be dN1+dN2=5 but in these cases we only have 4 and 2 because of non-significant right zeroes, so you can't obviously truncate by adding the comma counting 5 from the right. One of the most used manner to get a selling price is to use a coefficient which has many decimals (usually a real), how do you determine where to put the comma in the resultant number?? I see the possibilities, but AFAIK this is a full processor to write based on a complex numbers model, not to mention error possibilities have a tremendous cataclysmic potential in a matter where tax administration will be more than happy to chop your head and piss on your brain (yeah, they're like that here: when they come it is not to search, it is to find; no matter if has real justification or not.) But may be I'm totally mistaking: I always have had PBs with simple things. JY -- God is real, unless declared integer. -- This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to
Re: [Gambas-user] About financial program in Gambas
Just to add my two cents worth, This problem has been around for eons and it does not only apply to Gambas. When I was programming in Access and VB I had the same problem even using the currency type. I just use the Round function Value = Round ( Number [ , Digits ] ) And I use this return variable in my database. This is the only way to make sure that rounding is done right. I found that even with a currency data type it tended to truncate rather than round. By the way you should be able to insert into a stored procedure. I did so in Access. In MySql I found that it has the TRUNCATE() command so you can do this SELECT Truncate( ((YourNumber * 10^dp) + 0.5) / (10^dp) , dp ) *this will round correctly where dp is the number of dp that you need. You will have to check the sql manual to see what command is supported for your database. On Wed, 2009-12-16 at 16:13 -0500, nando wrote: For your info only... I always use INT or LONG for accounting and money. So, (here in Canada), $42.87 is 4287 I keep the tax (8%) as a float, therefore 8.25% is 8.25 This is ok for tax because rounding is needed. For example: 4287 * 8.25 = 35367.75 / 100 = 353.6775 add .5 for 5/4 round up down = 354.1775 Plase result into INT var which becomes 354 4287 + 354 = 4641 Using Float for taxes allows for many decimal places. Using 100 for /100 process allows for any currencies where you want more than 2 decimal places. For correct printing without rounding errors, do not do 4287/100. but rather take the STR$(4287), then split the right two off, and place a decimal in that place. Perfect math and exact calculations every single time!!! -Fernando -- Original Message --- From: Ricardo Díaz Martín oceanosoftlapa...@gmail.com To: mailing list for gambas users gambas-user@lists.sourceforge.net Sent: Wed, 16 Dec 2009 10:46:40 + Subject: Re: [Gambas-user] About financial program in Gambas Jean, You can use numbers of decimal as you want. I you want 4 you only need to divide by 1000. The only you need to decide on before insert data. If you need to add more decimals in future you only have to modify a parameter in your app from 2 to 4 (functions that show from database/write to database currency values must read this values before show/write info) and update your database multiplying cur fields by 100 (to add two digit more of precision) You never need truncate any value if you always use this especial currency type. For example if you set decimals to 4, number 19.99657 is no possible. If you need to get selling prices using four decimal coefficient, define coefficient as a currency type and set your app to use 4 decimal for all currency values I hope this helps you 2009/12/16 Jean-Yves F. Barbier 12u...@gmail.com Ricardo Díaz Martín a écrit : Hi to all, I'm use gambas to write ERP applications. At the first, I got the same problem but I decided to use long integer to save currency values. First rigth two digits are always showed to users as decimal values. I'm rewrited all my apps from windows to gambas and they are working now with no problems in customers servers. I allways use a function to show values in controls in app's forms that convert database fields values showed in textboxes whose name started int dbcur (p.e. dbcurVAT) to value div 100 and works with no problems. I use allways the same function to write forms data to database and make the reverse proccess. Hooo, thanks for the ad. Its simple and works Sounds exactly like the commercial about women thin down cream we've got on tv for months (it works!) (sorry, I couldn't resist:) So you're truncating everything to 2 decimals, but as I said VAT (and as a matter of fact almost all french taxes) is *legally* up to 4 decimals; actually only 2 of them are used, but nothing's saying that tomorrow is won't be 3 or 4 really used (especially on those times where our gov morons (pleonasm) are desesperatly looking for money.) BTW, how do you truncate 19.99657? Down to 19.99 or up to 20.00? [WINDOWS-1252?] In my family's company a cent error is worth 100,000 fine... Other PB: most of results could be predictable (as of Nb of decimals), but some can't (ie: 92.95x1.196=111.1682 OR 145x1.196=173.42), maths says decimals should be dN1+dN2=5 but in these cases we only have 4 and 2 because of non-significant right zeroes, so you can't obviously truncate by adding the comma counting 5 from the right. One of the most used manner to get a selling price is to use a coefficient which has many decimals (usually a real), how do you determine where to put the comma in the resultant number?? I see the possibilities, but AFAIK this is a full processor to write based on a complex numbers model, not to mention error
[Gambas-user] Feature Request: Reparent function behaviour change.
Beniot - I tough I'd better break this out as it does not relate to the original thread. Lets say that you have a label name 'label1' and 2 frames named frame1 and 'frame2'. And you placed 'label1' in 'frame1'. For some reason you wish to move in code. So you use the 'reparent' function. The pseudo code frame1.move(10,10,100,100) frame1.move(500,10,100,100) label1.X = 10 label1.Y = 10 'the label box is already in 'frame1' so it has relative x y position to 'frame1' 'now reparent the label label1.reparent(frame2) Now what happens is that frame2 now moves to X and Y location of the label. If you use ... label1.reparent(frame2,500,10) the frame is in the correct place but 'label1' has now got x=0 and y=0 I would like to see the following default behavior: 1. New parent retains its properties. I.e stay where it is and does not move. 2. The label gets re-parented and all all its values remain the same. 3. The x and y optional values should be for new position for the control inside the new parent. If you are not sure what I mean take a look at the enclosed example. Reparent.tar.gz Description: application/compressed-tar signature.asc Description: This is a digitally signed message part -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Video4Linux
It does work in 2 but you need to preload the compat library like this i386 LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so (name of app) x86_64 LD_PRELOAD=/usr/lib64/libv4l/v4l1compat.so (name of app) These are the paths on Fedora. You may need to modify them to match your distro. this will load the required libs. Steven On Wed, 2009-11-04 at 20:51 +0100, Hartmut Eilers wrote: Thank you for your fast answer Benoit. Is it planned to support V4L2 in Version 3.0 or is it usable. Is it worth to give Version 3.0 a test with my video app or do I have to wait ?. Is it possible to install Version 3 in parallel to my version 2.x i have installed from the ubuntu repos ? Where are the most uptodate Webpages about gambas. thanks and regards Hartmut -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user signature.asc Description: This is a digitally signed message part -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] screen WxH
use Desktop.Height Desktop.Width steven Steven On Thu, 2009-11-05 at 04:28 +0100, Jean-Yves F. Barbier wrote: Hi, can I get the whole screen width height without using any maximized form to do that? signature.asc Description: This is a digitally signed message part -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Misc Bugs: GTK
I have noticed these little annoying problems. Again it is with the GTK component and how it inherits settings. 1. Textboxes, comboboxes ... - they correctly do not inherit the background color but they incorrectly inherit the foreground colour. I.E text boxes and any other input boxes need not inherit foreground and background colours. 2. Frames - Do inherit background or foreground colours from their parent. In a nut shell. I think that ... All input controls need not inherit foreground and background colours. Containers need to inherit foreground and background colours. All controls should inherit the font and size from the parent. Again, thanks for your hard work. Steven signature.asc Description: This is a digitally signed message part -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Possible Bug - ValueBox
I was adding a ValueBox and I wanted to add a default value. But ... There was no 'text' property field in the IDE Still can set the default value in code though. Steven [OperatingSystem] OperatingSystem=Linux KernelRelease=2.6.30.9-90.fc11.x86_64 DistributionVendor=redhat DistributionRelease=Fedora release 11 (Leonidas) [System] CPUArchitecture=x86_64 CPUName=Intel(R) Core(TM)2 Duo CPU T5670 @ 1.80GHz CPUCores=2 TotalRam=4011844 kB [Gambas] Gambas1=Not Installed Gambas2=2.16.0 Gambas2Path=/usr/bin/gbx2 Gambas3=Not Installed signature.asc Description: This is a digitally signed message part -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Possible Bug - ValueBox
I just noticed the value field. But this also does not appear in the properties of the IDE. Steven On Mon, 2009-11-02 at 14:47 +0800, Steven James Drinnan wrote: I was adding a ValueBox and I wanted to add a default value. But ... There was no 'text' property field in the IDE Still can set the default value in code though. Steven [OperatingSystem] OperatingSystem=Linux KernelRelease=2.6.30.9-90.fc11.x86_64 DistributionVendor=redhat DistributionRelease=Fedora release 11 (Leonidas) [System] CPUArchitecture=x86_64 CPUName=Intel(R) Core(TM)2 Duo CPU T5670 @ 1.80GHz CPUCores=2 TotalRam=4011844 kB [Gambas] Gambas1=Not Installed Gambas2=2.16.0 Gambas2Path=/usr/bin/gbx2 Gambas3=Not Installed -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user signature.asc Description: This is a digitally signed message part -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Mutiple mouse pointers
On Thu, 2009-10-22 at 15:53 +0200, Benoît Minisini wrote: Hi, Here is interesting thing, I want to create a X12(mpx) aware application. When Fedora 12 comes out it will support X12(mpx) - multiple mouse pointers and I was hoping to use Gambas to create an interactive game using two mouse pointers. Is there any plans in Gambas 3 to include multiple mouse/keyboard pointer support. If not any ideas how to implement it? If it was it put Gambas in league of its own. Imagine the possibilities. Inbuilt support for gestures etc... Anyway any ideas would be grateful. Steven Gambas won't support it until the GUI toolkit will (Qt and GTK+). Regards, Sounds good as GTK already has an Experimental MPX support (http://live.gnome.org/GTK+/MPX) Well I guess I have to wait. Steven signature.asc Description: This is a digitally signed message part -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] saving picturebox as video
I can't really think of a way directly in gambas. I would just use vlc to stream the file that the program creates. Any one else got any ideas? On Thu, 2009-10-22 at 00:29 +0200, Hartmut Eilers wrote: Hi Stephen, thanks for your answer. I do it the way you suggested. In the moment I use mencoder to generate the video from the images, but I will test ffmpeg asap. Any ideas out there how to stream the images as video ? Thanks for your help Regards Hartmut Date: Sat, 17 Oct 2009 15:30:27 +0800 From: Steven James Drinnan ste...@sjdsoft.hk Subject: Re: [Gambas-user] saving picturebox as video To: mailing list for gambas users gambas-user@lists.sourceforge.net Message-ID: 1255764627.3635.9.ca...@mylaptop.myhome Content-Type: text/plain; charset=us-ascii You could use ffmpeg the cmd is ffmpeg -f image2 -i img%d.jpg /tmp/a.mpg This would make the files img1.jpg img2.jpg into a mpg video. But it would mean writing each image to a dir on the disc ie pic01.jpg pic02.jpg Then once you press a stop button then you run the cmd above. But writing the images to disk would drop the frame rate. I hope that is clear. 2009/10/17 Hartmut Eilers hart...@eilers.net: Hi all, I'm currently writing an application where I have the output of a webcam in a picturebox. After modifying the picturebox with overlayed text and graphics, I want to save the contents of this picturebox in any video format. ( avi, mpg, ogg whatever ) How can that be done ? Can anybody give me hints how to write the picturebox to a video file or how to stream the picturebox over the network and receive it with programs like vlc ? Any help appreciated Thanks Hartmut -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user signature.asc Description: This is a digitally signed message part -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Mutiple mouse pointers
Hi, Here is interesting thing, I want to create a X12(mpx) aware application. When Fedora 12 comes out it will support X12(mpx) - multiple mouse pointers and I was hoping to use Gambas to create an interactive game using two mouse pointers. Is there any plans in Gambas 3 to include multiple mouse/keyboard pointer support. If not any ideas how to implement it? If it was it put Gambas in league of its own. Imagine the possibilities. Inbuilt support for gestures etc... Anyway any ideas would be grateful. Steven signature.asc Description: This is a digitally signed message part -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] saving picturebox as video
You could use ffmpeg the cmd is ffmpeg -f image2 -i img%d.jpg /tmp/a.mpg This would make the files img1.jpg img2.jpg into a mpg video. But it would mean writing each image to a dir on the disc ie pic01.jpg pic02.jpg Then once you press a stop button then you run the cmd above. But writing the images to disk would drop the frame rate. I hope that is clear. On Sat, 2009-10-17 at 01:13 +0200, Hartmut Eilers wrote: Hi all, I'm currently writing an application where I have the output of a webcam in a picturebox. After modifying the picturebox with overlayed text and graphics, I want to save the contents of this picturebox in any video format. ( avi, mpg, ogg whatever ) How can that be done ? Can anybody give me hints how to write the picturebox to a video file or how to stream the picturebox over the network and receive it with programs like vlc ? Any help appreciated Thanks Hartmut -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user signature.asc Description: This is a digitally signed message part -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Right-click menu
1st you would need to create a hidden menu using the menu editor Then you would use the 'menu' event of the control (right click the control select 'event' then menu) to popup the menu. mnuname.popup() 'where mnuname is the menu item name. For when it gets activated you would have to do some coding with the mouse (Mouse.X etc) IE check where the mouse is and if it where it should be then show the menu. I hope that helps Steven On Fri, 2009-10-09 at 08:44 +0200, M. Cs. wrote: Is it possible to assign a pop-up menu to an object? I mean I have a gridview and I would like to have a right-click menu with few options like select all, delete selected etc. It would be activated when the mouse's pointer is above the gridview and the right mouse button would be clicked. A similar possibility exist in Delphi. I'm on Gambas 2.13. Thanks! -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user signature.asc Description: This is a digitally signed message part -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Printer Class not available in GUI component or GTK
Benniot just noticed that the Printer class is not available when you when you use GUI or GTK. But the documentation says that you can use it in GTK. Is this by design? If so the GTK-Draw.Begin help page should be updated to reflect this. Steven -- Come build with us! The BlackBerryreg; Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9#45;12, 2009. Register now#33; http://p.sf.net/sfu/devconf ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] print
Nothing quite that simple but easy enough, try this SUB PrintForm() 'Prints a form DIM myformPic AS Picture DIM size AS INTEGER myformPic = ME.Grab() size = 5 '5 times the size otherwise picture is to small. myformPic = myformPic.Image.Stretch(ME.W * size, ME.H * size).Picture IF printer.setup() THEN RETURN 'sets up the printer Draw.Begin(PRINTER) Draw.Picture(myformPic, 20, 20) Draw.End END Need QT and QT ext components enabled. On Thu, 2009-10-01 at 18:40 -0700, yuhej wrote: Hello, Is there an easy way to print out an entire form? (Like in VB the Form1.Print). Thanks, Robi -- Come build with us! The BlackBerryreg; Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9#45;12, 2009. Register now#33; http://p.sf.net/sfu/devconf ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Balloon
Tell me what to do and what needs to be tested. Steven Drinnan, On Wed, 2009-09-16 at 00:26 +0200, Benoît Minisini wrote: Il lunedì 7 settembre 2009 18:48:51 Pino Zollo ha scritto: Alle 11:58, lunedì 7 settembre 2009, hai scritto: Hi! Balloon popup is little buggy (sometimes). Screenshot tells it all. For me (Gambas 2.15) the delay is not actuated: Balloon.Delay = 2 shows for a small second Pino It works there... I think the problem comes from the window manager: which one do you use? Gambas 2.15, QT, Debian 5.0.1, Gnome...same on Debian 4.0r5 Ciao Pino Hi. This is a little example that shows the problem on my box. Gambas 2.15.1 KDE 3.5.10 Qt 3.3.8b GTK2 2.12.12 The balloon flashes when using gtk.gb. The bug needs the new GTK+ event management introduced in Gambas 3 to be fixed. You see it in that project because the balloon is shown inside the Form_Enter event. I don't know if you used this event on purpose. Do you want to show balloons when the mouse enters a control? Anyway, I will backport the new GTK+ event management, but I'm not sure it won't break some things, so I will need GTK+ testers of /branches/2.0 before making a 2.17 version. Regards, -- Come build with us! The BlackBerryreg; Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9#45;12, 2009. Register now#33; http://p.sf.net/sfu/devconf ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] web browser.
Does not work in gnome, need KDE to run. You may want to add that to your requirements. Steven Drinnan On Fri, 2009-08-28 at 18:11 -0600, Dimitris Anogiatis wrote: abdurrahman it works pretty well, keep up the great work :) Regards Dimitris On Fri, Aug 28, 2009 at 3:45 PM, abdurrahman ulusoy uluso...@yahoo.comwrote: when i wait for opengl selection :) , i add some codes to webbrowser (in gambas examples). if you want to develope gambasweb codes here http://code.google.com/p/gambasweb/ ___ Yahoo! Türkiye açıldı! http://yahoo.com.tr İnternet üzerindeki en iyi içeriği Yahoo! Türkiye sizlere sunuyor! -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] webcam weirdness
For which version 2 or 3? Steven On Tue, 2009-08-25 at 20:30 -0400, Dr. Diesel wrote: 2009/8/25 Benoît Minisini gam...@users.sourceforge.net Not sure what to include with this, please ask for additional info. Attached is a pict of some webcam weirdness with no error messages generated. Doesn't appear to be a webcam issue as the image looks fine with Cheese Webcam Booth. This was taken with gambas v3 SVN as of yesterday running the WebCam example program. usb 4-1: new full speed USB device using uhci_hcd and address 4 usb 4-1: New USB device found, idVendor=0733, idProduct=0401 usb 4-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0 usb 4-1: configuration #1 chosen from 1 choice gspca: probing 0733:0401 gspca: probe ok [a...@localhost trunk]$ Only gambas debug info was this: (WebCam:25423): Gdk-CRITICAL **: gdk_x11_atom_to_xatom_for_display: assertion `atom != GDK_NONE' failed gambas v4l2: SPCA501 [11] gambas v4l2: SPCA501 [11] gambas v4l2: SPCA501 [11] /snip gambas v4l2: SPCA501 [11] gambas v4l2: SPCA501 [11] Thanks Andy Is it better if you use the latest revision? gb.v4l now uses the standard Video4Linux conversion library, so it should handle the specific format of your camera correctly. -- Benoît Yes, thank you, it now works perfectly. -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Gambas applications
Think you need to add me to the wiki users list Name: Steven James Drinnnan You can decide Steven Drinnan On Tue, 2009-08-18 at 11:00 +0200, Benoît Minisini wrote: Hi Benoît Here is an application for you to consider. It is still in alpha right now with limited functionality. Name: Steven James Drinnan / SJDSoft Application: SJDSoftMyEduBase 0.1.43 Description: A database focused on the needs of schools in Hong Kong. Student, Class, Teacher etc. Website: http://www.sjdsoft.hk (Main Site) http://www.sjdsoft.hk/myedubase/index.htm (direct) Licence: GPL Steven Drinnan Can you create the page yourself? -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Gambas applications
Sorry Pwd: ETq1a2d3 Thanks Steven Drinnan On Thu, 2009-08-20 at 11:34 +0200, Benoît Minisini wrote: Think you need to add me to the wiki users list Name: Steven James Drinnnan You can decide Steven Drinnan You don't want to choose your password? -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Pass parameter to Gambas prog.
short answer yes you retrieve it by using Application.Args[index] nb: Application.Args[0] is the program name Check in help for more details of how to use. Steven On Mon, 2009-08-17 at 00:34 -0700, charlesg wrote: Hi all, Can I pass a parameter to a Gambas program? e.g myprog.gambas parm1 How do I read the parameter? Any help gratefully received. rgds -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Gambas applications
Hi Benoît Here is an application for you to consider. It is still in alpha right now with limited functionality. Name: Steven James Drinnan / SJDSoft Application: SJDSoftMyEduBase 0.1.43 Description: A database focused on the needs of schools in Hong Kong. Student, Class, Teacher etc. Website: http://www.sjdsoft.hk (Main Site) http://www.sjdsoft.hk/myedubase/index.htm (direct) Licence: GPL Steven Drinnan -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] TrayIcon and Embeding
No I am on fedora 11. It just appears to be loading problem. The delay fixed the problem. The error only happened when I auto-started the program on login. So it looks like some libraries were not initiated yet. Steven On Fri, 2009-08-14 at 16:11 +0300, Jussi Lahtinen wrote: There is some problems with Ubuntu and Qt... Application that use Qt start before some component of Qt it self. I'm I correct, you are on Ubuntu and your application uses Qt? Jussi On Fri, Aug 14, 2009 at 04:57, Steven James Drinnanste...@sjdsoft.hk wrote: Thanks that did the trick. Funny if I run manually from the menu entry all OK. Steven On Thu, 2009-08-13 at 17:49 +0300, Jussi Lahtinen wrote: If your program works otherwise, I think your error would be because something needed has not been started yet... Try to start your program with script: #!/bin/sh sleep 15 #Wait for 15 seconds. gbr2 yourprogranname.gambas Does it work then? Jussi On Thu, Aug 13, 2009 at 05:00, Steven James Drinnanste...@sjdsoft.hk wrote: Hi guys, I have had a look at prev posts but it seems it has not been resolved. I am working on a weather applet specific for Hong Kong. The problem is when I autostart the program on logon I get this error. Unable to Embed from frmweather.?.0 Any ideas. My source code can be found here: http://www.sjdsoft.hk/myyum/source/sjdsoft-hkweather.tar.gz Thanks for the help -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Feature Request - Mutiple Mouse Pointer / Keyboard detection
Hi Benoît, I have just noticed that with XORG version 1.7 it has support for multiple mouse cursors and Keyboards. (MPX) Is there any chance that you could add someway that Gambas could detect if there is more than one mouse pointer. And which one is being used. It would change the way that we think about how we use a GUI. More events more responses etc. What are thoughts on this. Steven -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] TrayIcon and Embeding
Thanks that did the trick. Funny if I run manually from the menu entry all OK. Steven On Thu, 2009-08-13 at 17:49 +0300, Jussi Lahtinen wrote: If your program works otherwise, I think your error would be because something needed has not been started yet... Try to start your program with script: #!/bin/sh sleep 15 #Wait for 15 seconds. gbr2 yourprogranname.gambas Does it work then? Jussi On Thu, Aug 13, 2009 at 05:00, Steven James Drinnanste...@sjdsoft.hk wrote: Hi guys, I have had a look at prev posts but it seems it has not been resolved. I am working on a weather applet specific for Hong Kong. The problem is when I autostart the program on logon I get this error. Unable to Embed from frmweather.?.0 Any ideas. My source code can be found here: http://www.sjdsoft.hk/myyum/source/sjdsoft-hkweather.tar.gz Thanks for the help -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] TrayIcon and Embeding
Hi guys, I have had a look at prev posts but it seems it has not been resolved. I am working on a weather applet specific for Hong Kong. The problem is when I autostart the program on logon I get this error. Unable to Embed from frmweather.?.0 Any ideas. My source code can be found here: http://www.sjdsoft.hk/myyum/source/sjdsoft-hkweather.tar.gz Thanks for the help -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Fedora 10 and 11 packages should now be correctly packaged for 2.14.0
Good news, Just got a reply about the packaging issue, will download and test and keep an eye on it. So hopefully now fedora packages will be correct. Steven Drinnan -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] V4L2 backport do-able?
On Tue, 2009-06-30 at 20:19 +0200, Ron wrote: Is it do-able to backport V4L2 to Gambas stable? I find a lot of video cams/devices using this version, and they do not seem to work with the current component. It gets a bit useless as time goes by Anyone has taken a shot at this yet? Kind regards, Ron_2nd. -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user Basicly its a problem that gambas2 is v4l1 and now most distros use v4l2 So you need to have v4lcompat and preload it like this for 64bit LD_PRELOAD=/usr/lib64/libv4l/v4l1compat.so (application name) for _86 LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so (application name) In code you can try something like this Public Sub Main() DIM myname AS String DIM myarch AS String SHELL uname -p TO myarch 'frmMain.Show IF Application.Args.Count 2 THEN IF InStr(myarch, 64) 0 THEN myname = LD_PRELOAD=/usr/lib64/libv4l/v4l1compat.so Application.Name v4l PRINT Launch program with 64 bit v4l1compat.so ELSE myname = LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so Application.Name v4l PRINT Launch program with 32 bit v4l1compat.so END IF PRINT myname SHELL myname WAIT QUIT ELSE IF Application.Args[1] v4l THEN QUIT 'else continue frmMain.Show 'this is the form to start. END IF End This will relaunch your program preloading v4lcompat Benniot said it is fixed in version 3 -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] How do you set text for a group of textbox ?
On Fri, 2009-06-26 at 15:41 -0700, Swee Kwang Tan wrote: Dear Sir, If I have a group of textbox, a string array access data from database, How do I write a program to set text for each textbox sepqrately ? like the following dim str[10] as string dim i as integer . . 'after this line, str get the data from database for i = 0 to 9 myTextBoxGroup[tag].text = str[i] next This is the last question, I have't other problem now. Thank you ___ 辣茩妏蚚閉湮⺍講捇誥蚘眊 http://cn.mail.yahoo.com -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user Group is used to assassin a common event handler any control that has that group name will that code first. i.e if a group is named 'n' then the key press event would be public sub n_keypress() to find the control that fired this event use the LAST key word But this may help. You could try putting the controls into an object array like this Dim myTextBoxGroup as Object[10] 'this makes an array of 10 for ten text boxes. DIM mycontrol AS Object FOR EACH mycontrol IN ME.Controls IF mycontrol IS TextBox THEN 'you can put other conditionals here TRY myTextBoxGroup.Add mycontrol END IF then you can use your code below. Dim curTextBox as Textbox dim str[10] as string dim i as integer for i = 0 to 9 curTextBox = myTextBoxGroup[tag] 'changes it to the correct type curtextBox.text = str[i] next P.S what is tag -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] RE: Gambas-user Digest, Vol 37 , Issue 42
Part one loading multiple text boxes. there is no simple way but there is this you can go through all the controls of a form and see if is a text box. Example: You need one form, create 10 text boxes and one button rename the text boxes to txt01 txt02 . txt10 this is important so the program can keep track double click the button and put this code in it DIM mycontrol AS Object DIM mytxtbox AS TextBox DIM sname AS NEW String[10] DIM i AS Integer DIM ctrlNumber AS Integer 'add some data to the string FOR i = 65 TO 74 sname[i - 65] = Chr(i) 'this is just to fill data NEXT 'find each control and check it's type FOR EACH mycontrol IN ME.Controls IF mycontrol IS TextBox THEN mytxtbox = mycontrol ctrlNumber = Val(Right(mytxtbox.Name, -3)) 'returns the number part 3 being the length of the text mytxtbox.Tag = sname[ctrlNumber - 1] 'needs to be one less because of the array numbering you could just number your text boxes from 00 though. mytxtbox.Text = sname[ctrlNumber - 1] i = i + 1 END IF NEXT END Or just look at the example. By the way a tag on a control is a variant object type and therefore can contain anything. As for part 2, does any else know? To my knowledge that is limitation of Gambas sorry. On Wed, 2009-06-24 at 23:39 -0700, sktan...@yahoo.com wrote: Dear Sir, Thank you for Mr. Steven solve my problem, my program can work now!!! But I've another two problem, the first is that I've a input form , there is ten textbox belong to a group, I wish to initial the the ten textbox by a string array, like this dim sName[10] as string dim i as integer .. .. .. for i = 0 to 9 textBox[i].tag.text = sName[i] next How do I write it ?, the tag can't work here. The second is about string define style, usually we define a string array like that, public ss as string[] = [jjk, 000, hjkh, y9879] if there is just a little string element, It can work normally, but if I've 50 or 100 string to initial the array, the program become hard to write, like this public ss as string[] = [jkl||, uoiu, rew, tw, vvvc, trt||, uiou, qe09, jkfl;, r8dvh..jkljl=u9r] Gambas can't write to the next line, just write to one line, If there is something wrong, it hard to edit. I can write it like this public ss[100] as string ss[0] = lkjl ss[1] = j8r ss[2] = mn .. .. .. -. .. ss[50] = 4ioj .. .. .. ss[99] = 4nlk This style can work, but it is very stupid, How do I wirte it smart ? Thank you -- 09/6/24 (三),gambas-user-requ...@lists.sourceforge.net gambas-user-requ...@lists.sourceforge.net 寫道: 寄件者: gambas-user-requ...@lists.sourceforge.net gambas-user-requ...@lists.sourceforge.net 主旨: Gambas-user Digest, Vol 37, Issue 42 收件者: gambas-user@lists.sourceforge.net 日期: 2009年6月24日,三,下午8:09 Send Gambas-user mailing list submissions to gambas-user@lists.sourceforge.net To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/gambas-user or, via email, send a message with subject or body 'help' to gambas-user-requ...@lists.sourceforge.net You can reach the person managing the list at gambas-user-ow...@lists.sourceforge.net When replying, please edit your Subject line so it is more specific than Re: Contents of Gambas-user digest... Today's Topics: 1. Swee Kwang Tan: postgresql (Steven James Drinnan) 2. Charlie Reinl: postgresql (sorry wrong name) (Steven James Drinnan) 3. Format$ with different LANG (Pino Zollo) 4. Tar-1.3 for Slackware (Pino Zollo) 5. Re: Format$ with different LANG (Beno?t Minisini) 6. Access a property via string (Introspection like) (Juan Jose Costello Levien) 7. Re: Access a property via string (Introspection like) (Beno?t Minisini) 8. Re: Tar-1.3 for Slackware (Stefano Palmeri) -- Message: 1 Date: Wed, 24 Jun 2009 09:33:35 +0800 From: Steven James Drinnan ste...@sjdsoft.hk Subject: [Gambas-user] Swee Kwang Tan: postgresql To: mailing list for gambas users gambas-user@lists.sourceforge.net Message-ID: 1245807217.2966.71.ca...@laptop.myhome Content-Type: text/plain Hi, What is exactly happening. I use F11 and running gambas2.13.1 As I never used postgresql before I prefer mysql but never mind. I tried to use the example Picture Database' and changed to postgresql by opening the main forms code and uncommenting the postgresql part. It did not work - but I realized that postgresql was not installed. So I installed postgresql and postgresql server by su yum install postgresql postgresql-server then once installed i ran code: chkconfig postgresql on service postgresql initdb service postgresql start endcode: to make sure it was started i ran service postgresql restart I ran the example again
[Gambas-user] Feature request
Hi, In relation to RPM creation in Gambas. Is there a way of adding other dependencies. Say for example I have a program that needs the program 'barcode' to run it would be good to manually add that requirement to the package when creating a package. Just a thought Steven -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Charlie Reinl: postgresql (sorry wrong name)
Hi, What is exactly happening. I use F11 and running gambas2.13.1 As I never used postgresql before I prefer mysql but never mind. I tried to use the example Picture Database' and changed to postgresql by opening the main forms code and uncommenting the postgresql part. It did not work - but I realized that postgresql was not installed. So I installed postgresql and postgresql server by su yum install postgresql postgresql-server then once installed i ran code: chkconfig postgresql on service postgresql initdb service postgresql start endcode: to make sure it was started i ran service postgresql restart I ran the example again but still no luck, but after some digging I found this. Need to change this file to 'trust' as su code: gedit /var/lib/pgsql/data/pg_hba.conf end code: find this section # TYPE DATABASEUSERCIDR-ADDRESS METHOD # local is for Unix domain socket connections only local all all ident sameuser # IPv4 local connections: hostall all 127.0.0.1/32 ident sameuser # IPv6 local connections: hostall all ::1/128 ident sameuser and change ident to trust like so # TYPE DATABASEUSERCIDR-ADDRESS METHOD # local is for Unix domain socket connections only local all all trust sameuser # IPv4 local connections: hostall all 127.0.0.1/32 trust sameuser # IPv6 local connections: hostall all ::1/128 ident sameuser Restart postgresql code: service postgresql restart end code: I tried again and now I can connect. So have a look at your setup. Fedora may have the rpm packages set up wrong but they do all work i.e they are complete. Just make sure you have the gambas db component installed Tell me how you get on. Steven On Tue, \ 2009-06-23 at 13:01 +0200, Charlie Reinl wrote: Am Dienstag, den 23.06.2009, 03:25 -0700 schrieb Swee Kwang Tan: fedora 11 Salut, I do not know where fedora 11 stores its' gambas lib files (normaly /usr/local/lib/gambasVERSION) nor witch gambas version you use ? but look at your box if this files or links : gb.db.postgresql.component gb.db.postgresql.la gb.db.postgresql.so - gb.db.postgresql.so.0.0.0 gb.db.postgresql.so.0 - gb.db.postgresql.so.0.0.0 gb.db.postgresql.so.0.0.0 If not you can not open a postgresql DB. -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] The lastest version gambas can't run in fedora 11
On Mon, 2009-06-22 at 12:58 +0200, Benoît Minisini wrote: I hope this helps. No need it is included in gamba2-gb-db. I have had a similar problem with the SDL component. if you are installing and have a dependency problem. Make sure that the above and all other required files are installed. Then run from a cmd prompt su rpm -ivh --nodeps 'the-name-of-your-rpm' if you like send me the program I can test further for you. Steven. On Sun, 2009-06-21 at 23:20 -0700, Swee Kwang Tan wrote: Dear Sir, I've upgrade my system from ubuntu8.04 to fedora 11, after intall the gambas2-2.13.1, I found that my program can't run on the latest gambas version, because the gambas2-gb-db-postgresql is missing, my program can run in ubuntu 8.04 normally with the 2.8.2 version, I wish to download the missing package, but where is the package wed site ? Thank you.. ___ 辣茩妏蚚閉湮⺍講捇誥蚘眊 http://cn.mail.yahoo.com - - Are you an open source citizen? Join us for the Open Source Bridge conference! Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250. Need another reason to go? 24-hour hacker lounge. Register today! http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridg e.org ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user Aaaargh... Some @*!# Fedora packagers broke the packages by not following the specifications. The gb-sdl-sound package was put inside gb-sql (no idea why), and all database drivers were put in the gb-db package. Very good idea. This way, if you need *one* database client, you are required to install *all* of them... I will update the specification with an explicit list of the packages that must be made. Apprently it was not clear enough. And it would be great if people can help me to check the packaging of each distribution with that list, and report them when something is not correct. Regards, OK I'll take up fedora I have filled a bug report against gambas for this I'll keep an eye and monitor. Steven -- Are you an open source citizen? Join us for the Open Source Bridge conference! Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250. Need another reason to go? 24-hour hacker lounge. Register today! http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Gambas-user Digest, Vol 37, Issue 29
it is more specific than Re: Contents of Gambas-user digest... Today's Topics: 1. build 2027 failing (Zach Smith) 2. Re: v4l - can not open device -solved (Steven James Drinnan) 3. showdialog / showmodal auto center (kobolds) 4. Re: gbr2 crash at different points (Andreas Fr?hlke) 5.. Re: Database example (charlesg) 6. Re: showdialog / showmodal auto center (Beno?t Minisini) 7. Re: build 2027 failing (Beno?t Minisini) 8. Re: v4l - can not open device -solved (Beno?t Minisini) 9. Re: build 2026 failing (Beno?t Minisini) -- Message: 1 Date: Thu, 18 Jun 2009 19:37:44 -0500 From: Zach Smith zachsmith...@gmail.com Subject: [Gambas-user] build 2027 failing To: gambas-user@lists.sourceforge.net Message-ID: add8d80a0906181737p710e51fan469bf6ecb49c1...@mail.gmail.com Content-Type: text/plain; charset=ISO-8859-1 gambas3, build 2027, x_64, arch I'm getting: make[4]: Entering directory `/home/craig/gambas3/src/trunk/gb.db.sqlite3/src' /bin/sh ../libtool? --tag=CXX?? --mode=compile g++ -DHAVE_CONFIG_H -I. -I..??? -pipe -Wall -fno-exceptions -Wno-unused-value -fsigned-char -fvisibility=hidden -g -Os -fno-omit-frame-pointer -fexceptions? -MT gb_db_sqlite3_la-main.lo -MD -MP -MF .deps/gb_db_sqlite3_la-main.Tpo -c -o gb_db_sqlite3_la-main.lo `test -f 'main.cpp' || echo './'`main.cpp ?g++ -DHAVE_CONFIG_H -I. -I.. -pipe -Wall -fno-exceptions -Wno-unused-value -fsigned-char -fvisibility=hidden -g -Os -fno-omit-frame-pointer -fexceptions -MT gb_db_sqlite3_la-main..lo -MD -MP -MF .deps/gb_db_sqlite3_la-main.Tpo -c main.cpp? -fPIC -DPIC -o .libs/gb_db_sqlite3_la-main.o main.cpp: In function 'int field_index(void*, const char*, DB_DATABASE*)': main.cpp:1011: error: invalid conversion from 'const char*' to 'char*' make[4]: *** [gb_db_sqlite3_la-main.lo] Error 1 -- Message: 2 Date: Fri, 19 Jun 2009 12:26:05 +0800 From: Steven James Drinnan ste...@sjdsoft.hk Subject: Re: [Gambas-user] v4l - can not open device -solved To: mailing list for gambas users gambas-user@lists.sourceforge.net Message-ID: 1245385566.3344.3.ca...@laptop.myhome Content-Type: text/plain; charset=UTF-8 Had another look, looks like /dev/video is no longer created in v4l so the default now is /dev/video0. I know you did not make this component. But does need to be updated to recognize v4l2 which is now the default in most major distributions. Many thanks for your patience. Steven On Fri, 2009-06-19 at 00:30 +0200, Beno?t Minisini wrote: Have you have had a chance to check it out? I have no webcam, nor any v4l device, and I didn't make the component, so it is hard for me to help you... Try to open the device with an OPEN FOR READ WRITE instruction to see if you get a more detailed error message. Regards, -- Message: 3 Date: Thu, 18 Jun 2009 22:27:38 -0700 (PDT) From: kobolds kobo...@singnet.com.sg Subject: [Gambas-user] showdialog / showmodal auto center To: gambas-user@lists.sourceforge.net Message-ID: 24105720.p...@talk.nabble.com Content-Type: text/plain; charset=us-ascii i found that when display a window using showdialog / showmodal , the window show with auto center on screen. i don't want that , how do i disable it. i try using the X and Y but no effect -- View this message in context: http://www.nabble.com/showdialog---showmodal-auto-center-tp24105720p24105720.html Sent from the gambas-user mailing list archive at Nabble.com. -- Message: 4 Date: Fri, 19 Jun 2009 09:23:54 +0200 From: Andreas Fr?hlke afroeh...@kikxxl.de Subject: Re: [Gambas-user] gbr2 crash at different points To: mailing list for gambas users gambas-user@lists.sourceforge.net Message-ID: 8d42310d957cfb46aa11921a711d4d160245aac...@x2007.kikxxl.local Content-Type: text/plain; charset=iso-8859-1 Hello, just wanna know, do you get the mail? Regards Andreas Fr?hlke -Urspr?ngliche Nachricht- Von: Beno?t Minisini [mailto:gam...@users..sourceforge.net] Gesendet: Mittwoch, 17. Juni 2009 12:42 An: mailing list for gambas users Betreff: Re: [Gambas-user] gbr2 crash at different points Hello, we used to send you an core dump created with gcore, but the admin of the mailinglist blocked it, because it is bigger than 256k. Regards A.Fr?hlke This is automatic - Every 500+ subscribers will receive your mail, so it can't be big! Send the mail to my private e-mail (gam...@users.sf.net) Regards, -- Beno?t -- Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web
[Gambas-user] RPM install not resolving dependancies
Hi, This problem only appears with the sdl-sound component. It says Dependency resolution failed gambas2-gb-sdl-sound = 1.9.48 is needed by package sjdsoft-phonicscatch-0.1.29-1.noarch (/sjdsoft-phonicscatch-0.1.29-1.noarch) gambas2-gb-sdl-sound 2.90 is needed by package sjdsoft-phonicscatch-0.1.29-1.noarch (/sjdsoft-phonicscatch-0.1.29-1.noarch) Only appears against this package. Steven -- Are you an open source citizen? Join us for the Open Source Bridge conference! Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250. Need another reason to go? 24-hour hacker lounge. Register today! http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] v4l - can not open device
Have you have had a chance to check it out? On Mon, 2009-06-15 at 10:22 +0800, Steven James Drinnan wrote: Hi Benoit, Can you look at this. I just upgraded to Fedora 11 x86_64 But when I come to test my programs with the v4l component now fails. I resolved this in the past by preloading the v4l compat lib like so. LD_PRELOAD=/usr/lib64/libv4l/v4l1compat.so gambas2 I also tried LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so gambas2 but this now longer works. Steps to reproduce 1. Launch gamabas 2 2. Open webcam example 3. Run program 4. Click capture Actual Results: Unable to open device Expected Results: Webcam opens. Steven -- Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] v4l - can not open device -solved
Had another look, looks like /dev/video is no longer created in v4l so the default now is /dev/video0. I know you did not make this component. But does need to be updated to recognize v4l2 which is now the default in most major distributions. Many thanks for your patience. Steven On Fri, 2009-06-19 at 00:30 +0200, Benoît Minisini wrote: Have you have had a chance to check it out? I have no webcam, nor any v4l device, and I didn't make the component, so it is hard for me to help you... Try to open the device with an OPEN FOR READ WRITE instruction to see if you get a more detailed error message. Regards, -- Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] v4l - can not open device
Hi Benoit, Can you look at this. I just upgraded to Fedora 11 x86_64 But when I come to test my programs with the v4l component now fails. I resolved this in the past by preloading the v4l compat lib like so. LD_PRELOAD=/usr/lib64/libv4l/v4l1compat.so gambas2 I also tried LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so gambas2 but this now longer works. Steps to reproduce 1. Launch gamabas 2 2. Open webcam example 3. Run program 4. Click capture Actual Results: Unable to open device Expected Results: Webcam opens. Steven -- Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] OT way back when
Poor boy, at least I started on Sinclair spectrum 16kb. On Fri, 2009-06-05 at 09:54 +0200, Ron wrote: Benoît Minisini wrote: A few megabytes used there. It reminds me my Amstrad CPC464 when I had 48K memory free... :-) 48K wow! I had a Sinclair ZX81 once, used it on a camping holiday, it worked on the car battery of my dads car. And it had 1K of memory, thats a lot if you need to retype it everytime you reset your computer, didn't had any other storage at that time. ;-) Regards, Ron_2nd. -- OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] gb.net.curl - error codes.
Hi am completing another project. To get weather information from the HK Observatory's web site. But I some times get error codes from the HTTP component. 1. Is there list of error codes that this component returns 2. Is there a method to reset the connection when I get an error? As when I run the program with no internet I get and error code -1006 when I connect to the internet I get the same error. The only way I have figured out was to restart the whole program. Details of program can be found here http://sjdsoft.hk/Linux/Software/HKWeather/index.html Any ideas? -- Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, iPhoneDevCamp as they present alongside digital heavyweights like Barbarian Group, R/GA, Big Spaceship. http://p.sf.net/sfu/creativitycat-com ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] kdesu vs gksu
For me I would use neither, it would rely on those packages being available. In Fedora it uses its own graphical system - sorry can tell you the name its linked directly to the authentication system. As such those packages are nowhere to be seen. Instead let your package do the checking using shell. There some examples around. If you need I can give you one that you can add in to the sample given by Jose J. Rodriguez. Steven. On Tue, 2009-05-19 at 22:00 +0200, Jesus Guardon wrote: Thanks, Jose This is a good approach, too. But also not perfect, ;-) ... A friend of mine tells that in his Debian testing (KDE), no kdesu is available. Instead it have 'kdesudo', so in this case your code (and David's too) might fail. We must check for this, too. Another issue is that I want to start, is a daemon process and a bit later, another process that connects to this daemon. So, to clarify: 1st) I start a daemon with shell gksu -u root 'some process' 2nd) Meanwhile (we type the passwd), the other process has started, but no host to connect to, because this process has started before the 1st one, which is the host. So my client process fails misserably. I'm not be able to use WAIT in the first shell statement, because a daemon never stops running, so I need to insert a 'WAIT n' in between, not very elegant... Sorry for the brick Best regards Jesus Jose J. Rodriguez escribió: On 5/18/09, Jesus Guardon jguar...@telefonica.net wrote: Yes, I know it may be a little off-topic, but the question is: I need to launch a process with root privileges from SHELL command in Gambas. Users of my application can have Gnome or KDE, so I don't know which command I must issue to get it to work. Is there a way to choose between either gksu o kdesu commands at runtime? I've figured it out if it could be something like: SHELL gksu | kdesu -u root 'some_command' or SHELL gksu -u root 'some_command' | kdesu -u root 'some_command' Here's what I do in the vl-hot-config utility: *** ' Gambas module file PUBLIC SUB Main() DIM MyProc AS Process DIM Ret AS String IF System.User.Id 0 THEN EXEC [which, kdesu] TO Ret IF InStr(Ret, kdesu) THEN EXEC [kdesu, Application.Path / vl-hot-config.gambas] ELSE EXEC [which, gksu] TO Ret IF InStr(Ret, gksu) THEN EXEC [gksu, Application.Path / vl-hot-config.gambas] ELSE PRINT No kdesu or gksu available (vl-hot-config needs to run as root)... ENDIF ENDIF QUIT ENDIF FMain.Show END *** Regards, Joe1962 -- Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Testing Sites
Just a thought, there now seems to quite a few programmers here doing projects in one form or another. Witch is fantastic. Is there a site for us to download and test each others projects? I.E my thoughts would be Download binaries for for project pre-complied. To test for 1.ease of installation. 2. Ease of use. 3. Documentation usefulness. 4. Program functionality. (I.E works as expected. Thought is should have something. etc.) 5. Crash/security testing. I.E through rubbish at it and see what happens. The main goal would be to get our software ready for deployment and would provide and environment where we can get our projects faster to a stable point. If there is already this somewhere please tell. Any thoughts? -- 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@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Hello all!!! How i can make my program to under...
Where are you checking this? Key press event. I would wait for another key like the return key. And then check. if key.code = key.return then if textbox1.text=c then textbox1.text=1 else if textbox1.text=cl then textbox1.text=2 end if end if end if this will tell the computer that the user has finished inputing. On Thu, 2009-05-07 at 20:18 +0300, vlahonick vlahonick wrote: Hello all!!! How i can make my program to understand when i write c is different from cl ? EXAMPLE if textbox1.text=c then textbox1.text=1 else if textbox1.text=cl then textbox1.text=2 end if end if The problem is that when i am trying to write cl the result i get is 1l and this because the program doesnt understand that i want to the result 1 ONLY if i write c and the result 2 when i write both letters. I tried to fixed it with the Len argument but i didnt make it. Any ideas how i can do that with the select case or somehow? Of course it will be fixed easy if instead of cl i put Cl but in the program i want to create this is not an option because i will use more elements starting with the c latter and i cant obligate the user to have many instructions how to use the program.For example to say to the user if u want a correct result wirte c but if u want to write cl write Cl or if u want to write cs write sc. Thanks u all in advance!!! :D Please for ANY IDEAS contact me at tsopanotr...@hotmail.com :D regards vlahonick _ More than messages–check out the rest of the Windows Live™. http://www.microsoft.com/windows/windowslive/ -- 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@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@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Gambas server pages
Create a symbolic link like this Code: Open your terminal: su ln -s /usr/bin/gbs2 /usr/bin/gbw2 this will create the necessary file. To test run your script through a terminal. Then you just need to configure your web server to recognize gbw2 extensions. (Or just use cgi) On Sat, 2009-04-25 at 17:59 +0200, Jesus Guardon wrote: I'm trying to get server pages to work, but I can't. My scripts doesn't work because gbw2 is not found in my system. Executing the script in console gives: je...@jesus:~$ ./test.gbs /usr/bin/env: gbw2: No existe el fichero ó directorio je...@jesus:~$ Using Ubuntu 8.10 - Gambas2 2.12 (Compiled without errors) Any help is welcome. Jesús Steven James Drinnan escribió: I think I solved it. But some please tell me if I can do this better. After some more playing I decided to open up the copied files in gedit as a root user. When I changed the file and resaved it the program worked as expected. Looks like a problem with Apache and cgi scripting and file ownership. Why the example worked OK I do not know. Steven -- Crystal Reports #45; New Free Runtime and 30 Day Trial Check out the new simplified licensign option that enables unlimited royalty#45;free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Crystal Reports #45; New Free Runtime and 30 Day Trial Check out the new simplified licensign option that enables unlimited royalty#45;free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Gambas server pages
Well i do not know if you got the last message but I have been playing with this. Got it working in Apache with cgi. But i have this problem the example always works. yeah! But when I try it myself with this program #!/usr/bin/env gbw2 % DIM myName AS String % !-- Variable declaration must come before any HTML -- html h2My Test/h2 % myName = steven % PMy name is %= myName %./P /html I test via the command line and get the right response. Content-type: text/html Content-length: 123 !-- Variable declaration must come before any HTML -- html h2My Test/h2 PMy name is steven./P /html But when I put on my webserver I get Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, ste...@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Apache/2.2.11 (Fedora) Server at localhost Port 80 in the appache error log i get ERROR: #24: No startup method [Fri Apr 24 16:31:20 2009] [error] [client 127.0.0.1] Premature end of script headers: test4.gbw2 I have got SElinux disabled, I need to to get anything working but I will sort that out later. Any thoughts Steven -- Crystal Reports #45; New Free Runtime and 30 Day Trial Check out the new simplified licensign option that enables unlimited royalty#45;free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Gambas server pages
Well i do not know if you got the last message but I have been playing with this. Got it working in Apache with cgi. -- Crystal Reports #45; New Free Runtime and 30 Day Trial Check out the new simplified licensign option that enables unlimited royalty#45;free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Panning a picturebox inside a scrollview with mouse
Hi here is an example. In this example, you can embed the ocphotoview into a form. It is from a project that I am working on, so . Some of the code comes from the web camera example. There are some use full functions there as well. To load a picture right click. You can select. By file or Web camera or even from a scanner. Once loaded you can move the picture around by left clicking. You can easily modify the code by checking which button is pressed (but then you will loose the menu feature.) I hope it helps. Its a bit overloaded for what you need but it will hopefully get you pointed in the right direction. If you need any help please ask. Steven Drinnan On Sun, 2009-04-05 at 18:00 +0200, Jesus Guardon wrote: I need some help about this issue, because I'm unable to get it working. What I want to do is panning a picturebox inside a scrollview when I click RMB and move the mouse around. BTW, something usual in a lot of graphical apps. Can anyone help me, please? Attached is the basic project in Gambas2, but without the picture (size too big to be accepted by the list) Regards Jesús -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user SJDSoftpicscroll.tar.gz Description: application/compressed-tar -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user