Re: [Gambas-user] Gambas not starting
Jussi, When I do that, it just hangs. No messages, just a sold cursor. Bruce Bruce Cunningham -Original Message- From: Jussi Lahtinen [mailto:jussi.lahti...@gmail.com] Sent: Friday, November 10, 2017 2:07 PM To: mailing list for gambas users Subject: Re: [Gambas-user] Gambas not starting Open terminal and type in gambas3. There should be some error message. Jussi On Fri, Nov 10, 2017 at 8:14 PM, Bruce Cunningham <bcunning...@sportif.com> wrote: > Hello, > > Are there any logs that could help me troubleshoot why Gambas will not > start? I installed it on an ARM based single board computer (like a > Raspberry Pi) running Debian Wheezy. It looks like it installed > correctly, but will not start. > > Should I try to build it from source? I'm not a strong Linux guy, but > I could give it a try? > > Bruce > > > > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Gambas not starting
Hello, Are there any logs that could help me troubleshoot why Gambas will not start? I installed it on an ARM based single board computer (like a Raspberry Pi) running Debian Wheezy. It looks like it installed correctly, but will not start. Should I try to build it from source? I'm not a strong Linux guy, but I could give it a try? Bruce -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] A couple of questions about building web / cgi applications
Caveat, Thanks for the info. I'm a little concerned about using a disk based database because the disk is flash, which has a limited number of write cycles. Even with wear-leveling, I would eventually kill parts of the flash. I don't want these things dropping dead in the field after a year or so... I was considering something like named pipes, but I'm a little unclear about how Linux actually handles them. I thought I saw a mention that they are managed via temporary files within the file system, and that would defeat the whole idea of not writing to disk. I know how to do interprocess communication in Windows, but not in Linux with Gambas. Bruce Bruce Cunningham bcunning...@sportif.com -Original Message- From: Caveat [mailto:gam...@caveat.demon.co.uk] Sent: Friday, February 13, 2015 11:36 AM To: gambas-user@lists.sourceforge.net Subject: Re: [Gambas-user] A couple of questions about building web / cgi applications If you're going to use a database to communicate between 2 separate programs, be sure to set the transaction isolation to READ-COMITTED (good for MySQL, ymmv), otherwise you won't see updates made by another process which can lead to some frustrating and confusing mismatches between what you think should be read from the database and what actually gets read! You may also want to look at in-memory databases, if you don't need the sensor data to be persistent. H2: http://www.h2database.com/html/main.html and JavaDB: http://docs.oracle.com/javadb/10.8.3.0/getstart/index.html might be worth a look. You could always use a regular database for the less volatile data, like user settings etc. and I imagine the inter-process communication would be easier to set up using a normal disk-based database. The architecture is sound, I use a raspberry pi in a similar way to control my central heating. There's a python script running all the time checking for interrupts so you can hit a button on the pi (PiFace board added) to, for example, force the heating on. The python script reads from the MySQL db to see what temperature it should be aiming for, and reads a usb thermometer to see what the temperature actually is. There's a web interface written in php with big friendly buttons to force the heating on or off, and a nice display of the current temperature and the target temperature, and an indication of the state of the heating (on or off). Inter-process communication is all done via the heating database in MySQL (with tx-isolation as above!). Sorry, kind of realised at the end this is a little off-topic for most of the Gambas list, what if I promise to rewrite my web-interface in Gambas CGI? :-) Kind regards, Caveat On 13/02/15 09:42, Rolf-Werner Eilert wrote: Am 12.02.2015 19:09, schrieb Bruce Cunningham: I'm looking for some advice and maybe some code examples for a project I'm starting. I'm building an embedded device with an ARM based System-On-Module (similar to an Rpi, but in an sodimm form factor). Thanks to some great help from members of this mailing list, I have successfully compiled Gambas for the SOM. The device will have a main GUI application that handles the user interface and all of the control logic. However, it will also have a web interface for remote access to some of the control settings. Here are my questions: 1) Does anyone have any code examples for CGI applications in Gambas? I know there is an option to use the Gambas interpreter to build ASP-like pages, but I would rather the web code be in compiled into a CGI module instead (for security reasons). I've built CGI applications in VB6, so I have a fairly good understanding how CGI work in general. I've read the Gambas docs on CGI, but I still don't quite understand it. 2) What is the easiest way to exchange data (variables and arrays) between the CGI module, and the main application? Using a file on disk is not a great option, since the device will be using flash for the file system, and these values will be changing several times a second. That will kill the flash very quickly. Thanks, Bruce Cunningham bcunning...@sportif.commailto:bcunning...@sportif.com Hi Bruce, although I see your point, I don't see where there is a difference between a gb.web app and an all-in-one app (apart from the ASP-like pages to be stored separately). BUT: I once made some projects this way, back in the times of Gambas2, so here is what I have (comments are in German, and scarce, so if you have any questions...) One of the projects (umfragen) is still publicly running on our website at http://www.eilert-sprachen.de/cgi-bin/Umfragen.gambas?Selbsttest.data Take a look at those SUBs which start with schreibe (write), that's the core of it. Hope it helps! Regards Rolf -- Dive into the World of Parallel Programming. The Go Parallel
[Gambas-user] A couple of questions about building web / cgi applications
I'm looking for some advice and maybe some code examples for a project I'm starting. I'm building an embedded device with an ARM based System-On-Module (similar to an Rpi, but in an sodimm form factor). Thanks to some great help from members of this mailing list, I have successfully compiled Gambas for the SOM. The device will have a main GUI application that handles the user interface and all of the control logic. However, it will also have a web interface for remote access to some of the control settings. Here are my questions: 1) Does anyone have any code examples for CGI applications in Gambas? I know there is an option to use the Gambas interpreter to build ASP-like pages, but I would rather the web code be in compiled into a CGI module instead (for security reasons). I've built CGI applications in VB6, so I have a fairly good understanding how CGI work in general. I've read the Gambas docs on CGI, but I still don't quite understand it. 2) What is the easiest way to exchange data (variables and arrays) between the CGI module, and the main application? Using a file on disk is not a great option, since the device will be using flash for the file system, and these values will be changing several times a second. That will kill the flash very quickly. Thanks, Bruce Cunningham bcunning...@sportif.commailto:bcunning...@sportif.com -- Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] A couple of questions about building web / cgi applications
Benoît, What I mean by main application is a GUI application that is always running, reading sensor data, controlling relays and updating the graphical user interface. It needs to be as close to real-time as I can get. By CGI module, I mean a CGI script that is invoked by web requests coming in to the web server, which would be a transient process. It takes some parameters from the web request, reads or updates data from the main application, sends back an html response, and then terminates. I want them as separate processes so that if someone tries to DDOS the web interface, they (hopefully) won't kill the main application that needs to control stuff. I was hoping someone had an example of a CGI application they would be willing to share? Bruce Bruce Cunningham bcunning...@sportif.com -Original Message- From: Benoît Minisini [mailto:gam...@users.sourceforge.net] Sent: Thursday, February 12, 2015 1:59 PM To: mailing list for gambas users Subject: Re: [Gambas-user] A couple of questions about building web / cgi applications Le 12/02/2015 19:09, Bruce Cunningham a écrit : I'm looking for some advice and maybe some code examples for a project I'm starting. I'm building an embedded device with an ARM based System-On-Module (similar to an Rpi, but in an sodimm form factor). Thanks to some great help from members of this mailing list, I have successfully compiled Gambas for the SOM. The device will have a main GUI application that handles the user interface and all of the control logic. However, it will also have a web interface for remote access to some of the control settings. Here are my questions: 1) Does anyone have any code examples for CGI applications in Gambas? I know there is an option to use the Gambas interpreter to build ASP-like pages, but I would rather the web code be in compiled into a CGI module instead (for security reasons). I've built CGI applications in VB6, so I have a fairly good understanding how CGI work in general. I've read the Gambas docs on CGI, but I still don't quite understand it. 2) What is the easiest way to exchange data (variables and arrays) between the CGI module, and the main application? Using a file on disk is not a great option, since the device will be using flash for the file system, and these values will be changing several times a second. That will kill the flash very quickly. Thanks, Bruce Cunningham bcunning...@sportif.commailto:bcunning...@sportif.com I don't understand what you don't understand in Gambas and CGI. By using the gb.web component, your Gambas project becomes a CGI application (or CGI script or whatever you want to call it) : - the gb.web component takes the CGI environment variables and present them with a nice ASP-like interface. - The Request class analyzes the HTTP request for you: it can understand GET arguments, POST arguments, handle file uploads for you. - The Response class allows you to send a response with its Mime datatypes, and other custom HTTP headers. I don't understand your story of having a CGI module (what's that?) and a main application. So, please elaborate. -- Benoît Minisini -- Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Compiling Gambas on an Allwinner A10 based system
That fixed it! Gambas is compiled and working now. Thanks to everyone who helped me get this working. What a great community! Bruce Bruce Cunningham Network Administrator Sportif USA Inc. (775) 359-6400 xt 132 bcunning...@sportif.com -Original Message- From: Jussi Lahtinen [mailto:jussi.lahti...@gmail.com] Sent: Thursday, May 22, 2014 4:30 PM To: mailing list for gambas users Subject: Re: [Gambas-user] Compiling Gambas on an Allwinner A10 based system Try libqtwebkit-dev. Jussi On Thu, May 22, 2014 at 8:14 PM, Bruce Cunningham bcunning...@sportif.comwrote: Ian, I agree completely. I REALLY, REALLY didn't want to compile Gambas, but I haven't found reliable binaries for the Allwinner SOC. The Linaro repositories only seem to have Gambas2 binaries. Believe me, I would have liked to just install Gambas3 and start working on my project instead of spending a week so far trying to compile Gambas3 from source. Attached is the latest log (as Jussi requested). Bruce Bruce Cunningham Network Administrator Sportif USA Inc. (775) 359-6400 xt 132 bcunning...@sportif.com -Original Message- From: Ian Haywood [mailto:ihaywo...@gmail.com] Sent: Wednesday, May 21, 2014 4:23 PM To: mailing list for gambas users Subject: Re: [Gambas-user] Compiling Gambas on an Allwinner A10 based system On Thu, May 22, 2014 at 3:53 AM, Bruce Cunningham bcunning...@sportif.com wrote: Ian, Some details about the OS: Distribution ID: Linaro Description: Linaro 12.11 Release: 12.11 Codename: precise ok, it's an old ubuntu derivative have a look at kendek's PPA (https://launchpad.net/~nemh/+archive/gambas3), it includes armhf builds. As a very general comment: gambas is a big complex program, compiling it is not easy even for seasoned Linux users. If you are new to Linux you are probably going to have a much better experience with pre-compiled binaries than jumping straight into compiling source. Ian -- Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available Simple to use. Nothing to install. Get started now for free. http://p.sf.net/sfu/SauceLabs ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available Simple to use. Nothing to install. Get started now for free. http://p.sf.net/sfu/SauceLabs ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available Simple to use. Nothing to install. Get started now for free. http://p.sf.net/sfu/SauceLabs ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- The best possible search technologies are now affordable for all companies. Download your FREE open source Enterprise Search Engine today! Our experts will assist you in its installation for $59/mo, no commitment. Test it for FREE on our Cloud platform anytime! http://pubads.g.doubleclick.net/gampad/clk?id=145328191iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Compiling Gambas on an Allwinner A10 based system
Ian, I agree completely. I REALLY, REALLY didn't want to compile Gambas, but I haven't found reliable binaries for the Allwinner SOC. The Linaro repositories only seem to have Gambas2 binaries. Believe me, I would have liked to just install Gambas3 and start working on my project instead of spending a week so far trying to compile Gambas3 from source. Attached is the latest log (as Jussi requested). Bruce Bruce Cunningham Network Administrator Sportif USA Inc. (775) 359-6400 xt 132 bcunning...@sportif.com -Original Message- From: Ian Haywood [mailto:ihaywo...@gmail.com] Sent: Wednesday, May 21, 2014 4:23 PM To: mailing list for gambas users Subject: Re: [Gambas-user] Compiling Gambas on an Allwinner A10 based system On Thu, May 22, 2014 at 3:53 AM, Bruce Cunningham bcunning...@sportif.com wrote: Ian, Some details about the OS: Distribution ID: Linaro Description: Linaro 12.11 Release: 12.11 Codename: precise ok, it's an old ubuntu derivative have a look at kendek's PPA (https://launchpad.net/~nemh/+archive/gambas3), it includes armhf builds. As a very general comment: gambas is a big complex program, compiling it is not easy even for seasoned Linux users. If you are new to Linux you are probably going to have a much better experience with pre-compiled binaries than jumping straight into compiling source. Ian -- Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available Simple to use. Nothing to install. Get started now for free. http://p.sf.net/sfu/SauceLabs ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user Output.7z Description: Output.7z -- Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available Simple to use. Nothing to install. Get started now for free. http://p.sf.net/sfu/SauceLabs___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Compiling Gambas on an Allwinner A10 based system
Ian, Thanks for the input. I installed libwebkit-dev (it looks like it installed correctly), but I'm still getting the message that gb.qt4.webkit is disabled? I tried a reconf-all and configure -C. Also, there doesn't appear to be a binary for Gambas3 in the repository, only Gambas2. I did: apt-get update apt-get install gambas3 The response was: E: Unable to locate package gambas3 Some details about the OS: Distribution ID: Linaro Description: Linaro 12.11 Release: 12.11 Codename: precise Bruce Cunningham Network Administrator Sportif USA Inc. (775) 359-6400 xt 132 bcunning...@sportif.com -Original Message- From: Ian Haywood [mailto:ihaywo...@gmail.com] Sent: Wednesday, May 21, 2014 3:29 AM To: mailing list for gambas users Subject: Re: [Gambas-user] Compiling Gambas on an Allwinner A10 based system On Wed, May 21, 2014 at 9:25 AM, Jussi Lahtinen jussi.lahti...@gmail.com wrote: I've been trying to compile Gambas on a development board that uses the Allwinner A10 SOC. I know there is a build for the Raspberry PI, so it should be doable. I use a solidrun cubox (a tiny Israeli company making even tinier computers), which is also based on an ARM SoC. I can't help you on OpenGL (and there doesn't seem much point on ARM) but I have got webkit and the rest of gambas running fine. From your logfile the punchline is configure: WARNING: Unable to met pkg-config requirement: QtWebKit = 4.5.0 configure: WARNING: gb.qt4.webkit is disabled which means you don't have the right development package installed, it's called libwebkit-dev on debian-based distros, dunno about the others. If you are on a debian-based system, try upgrading to the latest testing and then install gambas directly ('apt-get install gambas3), this *should* work as there will be pre-compiled ARM binaries for gambas in the Debian repos. Ian -- Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available Simple to use. Nothing to install. Get started now for free. http://p.sf.net/sfu/SauceLabs ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available Simple to use. Nothing to install. Get started now for free. http://p.sf.net/sfu/SauceLabs ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Compiling Gambas on an Allwinner A10 based system
Hello all, I've been trying to compile Gambas on a development board that uses the Allwinner A10 SOC. I know there is a build for the Raspberry PI, so it should be doable. I think I'm very close, but I'm getting some errors, and it will not install. The errors are related to OpenGL and WebKit. I don't need either of these components for what I'm working on. I didn't build the Linux OS on this board, and frankly my Linux skills are not that great yet (I'm learning quickly). I've been a Windows admin and developer for 15+ years, and I'm coming to Linux from a Windows/VB6 background. I really want to get away from anything Microsoft these days. But, I have a project I want to build for an embedded device, and Linux/Gambas seems like a fantastic platform for me. I would like to thank everyone that worked on building Gambas. I gives us old time VB6 guys a way to move to Linux and be productive right away. I'm attaching the log from the config/make/make install process. Thanks in advance. Bruce Bruce Cunningham Network Administrator Sportif USA Inc. (775) 359-6400 xt 132 bcunning...@sportif.commailto:bcunning...@sportif.com Output.7z Description: Output.7z -- Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available Simple to use. Nothing to install. Get started now for free. http://p.sf.net/sfu/SauceLabs___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Complex report
On Tue, 2014-02-25 at 12:20 +0100, Fabien Bodard wrote: yes charlie ... and no... For my job and to simplify i use nearfive round. But for not be too far from the reallity i use real value for the sum and do the nearfive at the priniting time only. I can't share the sources... well i can but not the datas. Actually Fabien, Just the .report file would be a help to get some insight into how _you_ are using the new controls. ... and a feature request! Would you consider using gb.settings to save the preview geometry. I am getting rsi jumping back and forth from design mode to preview and having to resize the preview and zoom all the time. cheers Bruce -- Flow-based real-time traffic analytics software. Cisco certified tool. Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer Customize your own dashboards, set traffic alerts and generate reports. Network behavioral analysis security monitoring. All-in-one tool. http://pubads.g.doubleclick.net/gampad/clk?id=126839071iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Where does the application default font come from?
Probably more correctly, where does the runtime get Application.Font from? I have changed my system font settings to better suit my new glasses but couldn't see any better when I ran a Gambas app. So I stuck a display of Application.Font.ToString() in a form. It's showing DejaVu Sans,9 but my system font is Nimbus Sans,10. None of the fonts in the IDE are DejaVu. (If the answer is It just uses the users system default font then I re-phrase the question to Approximately where in the gbx source code does Application.Font get set?. Because if so, then this is a(nother) LXDE issue and I'll have to sort it out from the source.) tia Bruce -- Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Where does the application default font come from?
On Sun, 2014-02-16 at 00:41 +1030, Bruce wrote: Probably more correctly, where does the runtime get Application.Font from? I have changed my system font settings to better suit my new glasses but couldn't see any better when I ran a Gambas app. So I stuck a display of Application.Font.ToString() in a form. It's showing DejaVu Sans,9 but my system font is Nimbus Sans,10. None of the fonts in the IDE are DejaVu. (If the answer is It just uses the users system default font then I re-phrase the question to Approximately where in the gbx source code does Application.Font get set?. Because if so, then this is a(nother) LXDE issue and I'll have to sort it out from the source.) tia Bruce Forget it, I found it. It is in the Dd Qt configuration. (Sorry for the noise again.) Bruce -- Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Moving elements in ListView
On Sat, 2014-02-15 at 00:12 +0100, Tobias Boege wrote: On Sat, 15 Feb 2014, Bruce wrote: On Fri, 2014-02-14 at 17:01 +0100, Tobias Boege wrote: Hi all, can someone please help me moving elements in a ListView or tell me that's impossible? I have tried the same three things or so for the last hour and always thought this time it's gonna work! but it didn't... Say I have a list of four elements (#0..#3) and want to move #1 to position #2 so that #2 goes to position #1. A source archive would be enough. Regards, Tobi Something like this? http://paddys-hill.net/wp/gambas/gambas-components/gb-listmgr/ Bruce If I understood the code correctly, you implement moving (btnMoveUp - MoveItem, LoadList) by managing an internal array which is modified and then used to generate ColumnView contents from scratch? Nice idea but this ranks among workaround because of two reasons: 1) it's a ColumnView, not a ListView; we want to operate with ListView only; 2) we want to use the ListView properties and methods (if at all possible) to do the move, not repopulate the ListView with changed data (we have a purely theoretical goal here). I should have said that... Regards, Tobi (I should have read between the lines!) It was a quick reply and as you said based on the ColumnView. The purely theoretical goal we have here is to ultimately produce a set of data aware controls similar but very different to the gb.report ideas. Hence the internal array, but very early days yet. It was a custom control I threw together in a few hours to solve a problem we have here of the user managing a small list of items where re-ordering them is a priority. For example, we have a set of sql jobs that must be run every day with some user interaction to select a subset of those jobs, run them and maybe change the order and re-run them depending on some outcomes of the queries. There are currently 66 of these jobs and some are frequently added or removed as the auction houses change their d*d advertising formats. Anyway I believe I recall that I tried that listview reordering idea some time ago but was never really satisfied with the results. I have found that code and it is a mess and uses a data collection to manage the ordering (and it doesn't work). I think that from looking at it you would need to Remove the item you are moving and re-Add it after the next (or previous.previous) item somehow. Anyway doesn't matter. Bruce -- Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Strange msq problem
On Fri, 2014-02-14 at 10:54 +0100, Roel Touwen [prive] wrote: Sql = relation = ' Main.RobotCust ' and robotID = Main.RobotID and rectype = 'TS' and subID = '' and sequencer = 0 After that line can you print (or debug) Sql. Don't know (because of email wrapping) but it looks kind of weird to me. B -- Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Moving elements in ListView
On Fri, 2014-02-14 at 17:01 +0100, Tobias Boege wrote: Hi all, can someone please help me moving elements in a ListView or tell me that's impossible? I have tried the same three things or so for the last hour and always thought this time it's gonna work! but it didn't... Say I have a list of four elements (#0..#3) and want to move #1 to position #2 so that #2 goes to position #1. A source archive would be enough. Regards, Tobi Something like this? http://paddys-hill.net/wp/gambas/gambas-components/gb-listmgr/ Bruce -- Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] ComboBox: Detect if the button was clicked
I have tried a couple of ways to determine if the user has clicked on the button that opens the list in a combobox with no great success. (I am trying to discern whether they selected a list item or typed a new string in the textbox.) It looks like I have to use the Mouse.X and Mouse.Y values to see if they are inside the button, but this is extrememly fragile and painful. Does anyone have a better idea. tia Bruce -- Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Where is the help for commit log comments
Graarrrggh! I have another tiny commit for gb.desktop xdg-email that stops it opening the web browser on LXDE when I try to send an email from within a Gambas app. Do you think I can find Benoit's request for how the commit log comments should be structured? No. Any help please. Bruce -- Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Key.Enter and Key.Return
What is the difference here? Every keyboard I have has an Enter key which apparently is a Key.Return, so what is Key.Enter? Does it depend on some particular keyboard? Silly question, no. If some users keyboard generates a different code how can I tell what key was pressed? (This has been driving me insane for an hour now. I am probably too stressed out to see the simple answer.) Bruce -- Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Where is the help for commit log comments
On Thu, 2014-02-13 at 13:01 +0100, Tobias Boege wrote: On Thu, 13 Feb 2014, Bruce wrote: On Thu, 2014-02-13 at 12:07 +0100, Tobias Boege wrote: On Thu, 13 Feb 2014, Bruce wrote: Graarrrggh! I have another tiny commit for gb.desktop xdg-email that stops it opening the web browser on LXDE when I try to send an email from within a Gambas app. Do you think I can find Benoit's request for how the commit log comments should be structured? No. Any help please. In the SVN tree: README.svn-commit or more elaborate in the docs under How to deal with subversion :-) Regards, Tobi Thanks Tobi!!! :-) It should be like * BUG: ... not [BUG] ... GA This must be Monday, surely? :-( B -- Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] window placement policy
On Mon, 2014-02-10 at 11:07 +0100, Johny Provoost wrote: Dominique, Look at gb.settings. With 'settings.write' you can save the position of your window, with 'settings read' you can read it back. You can do a lot more with settings: [1]http://gambasdoc.org/help/comp/gb.settings/settings?v3view 100% right! Every form we use has: Public Sub Form_Open() Settings.Read(Me) etc.. End Public Sub Form_Close() Settings_Write(Me) etc.. End in it. gb.settings is so easy! And Like Johny says, you can do a lot more. Bruce -- Managing the Performance of Cloud-Based Applications Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. Read the Whitepaper. http://pubads.g.doubleclick.net/gampad/clk?id=121051231iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Accessing Project Data in a Text File
On Sun, 2014-02-09 at 22:06 -0800, Louis W. Adams, Jr. wrote: Are you talking about your project at design time in the IDE or when your project runs, i.e. do you want to look at the file or does your program need it at run time? I guess the second but it's not clear to me... I added my data file (a text file) to the Data section of the project during design time because that's what I thought the Data section was for. What is the purpose of associating a data file containing numerical information with a project by putting it on the list? It sounds like I must access the data in exactly the same way whether or not the file is listed, by processing the file resident in the filing system. So why don't I just leave it out of the project? What's the point of listing it? Why list anything in the Data section of a GAMBAS project? Is the only purpose to make sure listed files are included in a source archive or an installation package for the project? By adding a tab in the IDE with the data parsed and displayed, it looks like it has the same status as the form and class tabs (that is, it contains information resident in the project). But I guess not. The files in the Data section are included in the gambas executable archive. When you build that via Project|Make|Executable it includes those files in the compressed project.gambas file. They are accessed as normal files BUT they are referred to using relative paths. This is explained in the Language Index of the help or on the wiki at http://gambasdoc.org/help/cat/path?v3help There are a miriad of uses for this technique, project images for buttons, static data referred to by the program etc etc. It is NOT for your program's volatile data! In fact, you cannot write to one of these files from within the program (but you can from the IDE.) One other wiki page may help you: http://gambasdoc.org/help/doc/project_structure?v3 I'm a GAMBAS beginner, so please be patient with my questions. I'm still learning. I can't find an answer to this question in documentation or books that I've checked. In fact, I can't find anything written anywhere that explains the purpose of the Data section of a project in the GAMBAS IDE. Lou No problems, we all started in the same boat. Bruce -- Managing the Performance of Cloud-Based Applications Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. Read the Whitepaper. http://pubads.g.doubleclick.net/gampad/clk?id=121051231iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Oops, I think I have broken something seriously here.
Without my usual long winded post, the project concerned runs perfectly well in the IDE and the local executable i.e. tmcvmgr3.gambas runs perfectly from a vterminal in the project directory. But when I installed it into /usr/local/bin via autotools and run it I get the following stuff. The project is VERY complex. I just want to know where I should start looking for what I have broken. (btw: Application._init.50 is in a local override of Application and is just a line containing Logger.Begin()) Bruce [bb@bluecow comp]$ tmcvmgr3.gambas Another tag to check the tmcvmgr3 crash, this should move the backtrace on Application._init from 49 to 50 This is just a tag to see if we can get a better handle on the tmcvmgr3 crash (it should adjust the crash line from 122 to 123 This is just a tag to see if we can get a better handle on the tmcvmgr3 crash (it should adjust the crash line from 122 to 123 Logger._free.123: #13: Null object 1: Application._init.50 *** glibc detected *** /usr/local/bin/tmcvmgr3.gambas: free(): invalid pointer: 0x0961f247 *** === Backtrace: = /lib/i686/libc.so.6[0x45454afa] /usr/local/bin/tmcvmgr3.gambas[0x806ce09] /usr/local/bin/tmcvmgr3.gambas[0x806ce2a] /usr/local/bin/tmcvmgr3.gambas[0x806bb93] /usr/local/bin/tmcvmgr3.gambas[0x804b359] /lib/i686/libc.so.6(__libc_start_main+0xf5)[0x453fa9e5] /usr/local/bin/tmcvmgr3.gambas[0x804b415] === Memory map: 08047000-08094000 r-xp 08:01 819627 /usr/bin/gbx3 08094000-08099000 rw-p 0004d000 08:01 819627 /usr/bin/gbx3 08099000-0809b000 rw-p 00:00 0 0950b000-0963c000 rw-p 00:00 0 [heap] 4119a000-411a3000 r-xp 08:01 1112250/lib/libintl.so.8.1.2 411a3000-411a4000 rw-p 9000 08:01 1112250/lib/libintl.so.8.1.2 42c78000-42c98000 r-xp 08:01 607759 /usr/lib/libxcb.so.1.1.0 42c98000-42c99000 rw-p 0001f000 08:01 607759 /usr/lib/libxcb.so.1.1.0 42c9b000-42dce000 r-xp 08:01 607805 /usr/lib/libX11.so.6.3.0 42dce000-42dd1000 rw-p 00133000 08:01 607805 /usr/lib/libX11.so.6.3.0 42dd1000-42dd2000 rw-p 00:00 0 42dd4000-42de4000 r-xp 08:01 608875 /usr/lib/libXext.so.6.4.0 42de4000-42de5000 rw-p 0001 08:01 608875 /usr/lib/libXext.so.6.4.0 42de7000-42ee7000 r-xp 08:01 608881 /usr/lib/libglib-2.0.so.0.3800.2 42ee7000-42ee8000 rw-p 0010 08:01 608881 /usr/lib/libglib-2.0.so.0.3800.2 42eea000-42ef2000 r-xp 08:01 608108 /usr/lib/libXrender.so.1.3.0 42ef2000-42ef3000 rw-p 8000 08:01 608108 /usr/lib/libXrender.so.1.3.0 42ef5000-42f03000 r-xp 08:01 610750 /usr/lib/libXi.so.6.1.0 42f03000-42f04000 rw-p d000 08:01 610750 /usr/lib/libXi.so.6.1.0 42f06000-42f0f000 r-xp 08:01 610752 /usr/lib/libXrandr.so.2.2.0 42f0f000-42f1 rw-p 8000 08:01 610752 /usr/lib/libXrandr.so.2.2.0 42f12000-42f15000 r-xp 08:01 609010 /usr/lib/libgmodule-2.0.so.0.3800.2 42f15000-42f16000 rw-p 2000 08:01 609010 /usr/lib/libgmodule-2.0.so.0.3800.2 42f18000-42f1a000 r-xp 08:01 610748 /usr/lib/libXinerama.so.1.0.0 42f1a000-42f1b000 rw-p 1000 08:01 610748 /usr/lib/libXinerama.so.1.0.0 42f4a000-42f9d000 r-xp 08:01 611169 /usr/lib/libQtSvg.so.4.8.5 42f9d000-42f9f000 rw-p 00052000 08:01 611169 /usr/lib/libQtSvg.so.4.8.5 4301e000-43023000 r-xp 08:01 610393 /usr/lib/libXtst.so.6.1.0 43023000-43024000 rw-p 4000 08:01 610393 /usr/lib/libXtst.so.6.1.0 43095000-430e3000 r-xp 08:01 608882 /usr/lib/libgobject-2.0.so.0.3800.2 430e3000-430e4000 rw-p 0004e000 08:01 608882 /usr/lib/libgobject-2.0.so.0.3800.2 430e6000-4324d000 r-xp 08:01 610745 /usr/lib/libgio-2.0.so.0.3800.2 4324d000-4325 rw-p 00166000 08:01 610745 /usr/lib/libgio-2.0.so.0.3800.2 4325-43251000 rw-p 00:00 0 43253000-4325c000 r-xp 08:01 610754 /usr/lib/libXcursor.so.1.0.2 4325c000-4325d000 rw-p 8000 08:01 610754 /usr/lib/libXcursor.so.1.0.2 4325f000-43263000 r-xp 08:01 610753 /usr/lib/libXfixes.so.3.1.0 43263000-43264000 rw-p 3000 08:01 610753 /usr/lib/libXfixes.so.3.1.0 43266000-43267000 r-xp 08:01 610287 /usr/lib/libgthread-2.0.so.0.3800.2 43267000-43268000 rw-p 08:01 610287 /usr/lib/libgthread-2.0.so.0.3800.2 4326a000-432e7000 r-xp 08:01 611159 /usr/lib/libQtDBus.so.4.8.5 432e7000-432e9000 rw-p 0007c000 08:01 611159 /usr/lib/libQtDBus.so.4.8.5 433cb000-4340a000 r-xp 08:01 611028 /usr/lib/libQtXml.so.4.8.5 4340a000-4340c000 rw-p 0003e000 08:01 611028 /usr/lib/libQtXml.so.4.8.5 4340e000-43547000 r-xp 08:01 610508 /usr/lib/libQtNetwork.so.4.8.5 43547000-4354b000 rw-p 00139000 08:01 610508 /usr/lib/libQtNetwork.so.4.8.5 435e7000-43624000 r-xp 08:01 611193 /usr/lib/libQtSql.so.4.8.5 43624000-43625000 rw-p 0003d000 08:01 611193 /usr/lib/libQtSql.so.4.8.5 436c2000
Re: [Gambas-user] Benoit, How to bypass a super event
On Fri, 2014-02-07 at 11:37 +0100, Fabien Bodard wrote: For example i have a class that emit an event MyClass1 Event data MyClass1 - so over drive the native class 1 Event Data Public sub Super_Data() - this is what i want to do inc_Index raise Data end For the user it's transparnt as it is alway the class MyClass1 that emit the data event... but the sur-layer can catch the event before the emit. well to say trust i'm trying to add the multipage on printer so basically if i say 4 page on one i need to give to painter 4 time an image Public sub Super_Begin Raise Begin iOldCount = Super.Count end Public sub Super_Draw() paint.scale(1/iPageByPage,1/iPageByPage) For i = 0 to iPageByPage Paint.Begin($aImgPage[i]) raise Draw paint.end next paint.reset for i = 0 to iPageByPage Draw.Image(... next end Public sub Super_End raise End Super.Count = iOldCount end Well it is just a concept code ... it don't work. But printing multipage on gambas don't need necessary to implement this on each toolkit but just via a gambas class. Not quite here with you yet Fabien. I have done (I think) this many times. I think respond to the event in the intermediate class. (Oh and its a good idea to have an observer hanging around somewhere!) Mainly I needed to trap the Change and Activate and LostFocus events in a custom control that included, say, a textbox. So all three events are trapped in InnerTextBox_some_event(blah blah). From which I then raise a differently named event for the custom control (usually Changed) So if I read you correctly, the first thing I'd try is to rename the raised event data to something like, eh, neudata. That at least might let you see who is bugging who :-) (As a matter of fact I have been chasing down a similar, but not the same, beast today too.) cheers Bruce -- Managing the Performance of Cloud-Based Applications Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. Read the Whitepaper. http://pubads.g.doubleclick.net/gampad/clk?id=121051231iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] R: morse code sound ?
On Fri, 2014-02-07 at 18:15 -0800, Randall Morgan wrote: It seems like playing a simple tone is something that should be a primitive in the Gambas Language... A simple Play(frequency, duration) type of function as was found in many of the early BASIC languages. Am I the only one who think like this? Ah yes! But those magical sounds were made by dividing the clock signal and sending the resultant wave directly out to the onboard speaker port. I dont think any of the boxes here have a onboard speaker any more? Leisure Suit Larry anyone? cheers Bruce p.s. It's cooled down a bit, only 42C today -- Managing the Performance of Cloud-Based Applications Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. Read the Whitepaper. http://pubads.g.doubleclick.net/gampad/clk?id=121051231iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Return TextBox.Selection from a custom control
I have a custom control that contains a TextBox. I need to expose the Selection property of that textbox through a property in the custom control. Alas, Selection is a virtual class. I've tried several approaches without any joy, including trying to pass it as a generic Object. Any clues? tia Bruce -- Managing the Performance of Cloud-Based Applications Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. Read the Whitepaper. http://pubads.g.doubleclick.net/gampad/clk?id=121051231iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Possible bug in round() function
On Thu, 2014-01-30 at 10:33 +, Ricardo Díaz Martín wrote: ? round (283.5 * 0.21, -2) very interesting. The miracles we call floats. try ? round (283.46 * 0.20996, -2) 59.54 Strange and magical, we'd better wait on Benoit's call on this one. ? Bruce -- WatchGuard Dimension instantly turns raw network data into actionable security intelligence. It gives you real-time visual feedback on key security issues and trends. Skip the complicated setup - simply import a virtual appliance and go from zero to informed in seconds. http://pubads.g.doubleclick.net/gampad/clk?id=123612991iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Externs ... yet again
On Mon, 2014-01-27 at 05:03 -0800, Mike Crean wrote: Hey Bruce are you on the apple isle, if so its never really hot. Try a real state if you want hot (WA) :-). Cheers Mike Postcode=5255 Stick that in your weatherzone. :-) Bruce -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Externs ... yet again
On Mon, 2014-01-27 at 15:48 +1030, Bruce wrote: 'aspell_config_replace(spell_config, lang, en_US); Extern aspell_config_replace(spell_checker As Pointer, Var As String = lang, lang As String = en_AU) In libaspell Not allowed? Syntax error. Missing ',' or ')' in ... Sorry for terseness , bloody hot here today Bruce Forget it. Duh! Optional keyword would have been a good idea. :-( melting B -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Stopping an event when user clicks on the form menu
On Sat, 2014-01-25 at 21:19 +0100, Fabien Bodard wrote: Or If Application.ActiveControl.Window Me.Window Ah! I was so close. In fact probably too close to see the obvious. Thanks Fabien for taking the time. Bruce -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Convert string to integer
On Sun, 2014-01-26 at 08:35 +0100, Dirk wrote: Hi, I'm having a problem with Convert string to integer where is my mistake? I get error message: Type incompatibility expected integer, instead get string Public Sub MySock_Read() ' '' ''' ' When some data arrives from the remote ' part of the socket, DataAvailable event ' is raised ' Dim rx, rx2, rxtmp As String Dim pattern, result, s, element As String Dim i, ii, iii, frequenz, istZeile As Integer ' DIM reg AS Regexp Dim el, text, dxde, txcall, dxcall, dxtxt, utc, loca, tmpstr, NewDXZ, DXCall_anfang, toall As String Dim band As String ' Dim qrg_i As Integer Dim qrg_i As Variant Dim qrg As String Dim dxprafix As String Dim dxcall_tmp As String Dim trenner As String Dim mh As String Dim dxland As String Dim flagge As String Dim sa, zeile, z As String[] Dim wp As Integer Dim wpa As String[] Dim wpi As Integer Dim dxcall_lng As Integer stunde = 0 minu = 0 sekunde = 0 If MySock.Status = Net.Connected Then Read #MySock, rx, Lof(MySock) rx2 = rx If Mid$(rx, 1, 6) = To ALL Then Textedit1.richText = Textedit1.richText font color=red toall = ok End If If Mid$(rx, 1, 3) = WWV Then TextEdit1.richText = TextEdit1.richText font color=blue toall = ok End If If Mid$(rx, 1, 3) = WCY Then TextEdit1.richText = TextEdit1.richText font color=blue toall = ok End If If Mid$(rx, 1, 5) = DX de Then '_ '_ DX Meldung läuft ein _ '_ dxde = Mid$(rx, 1, 5) rx = Trim(Replace$(rx, DX de , )) i = InStr(rx, ) txcall = Mid$(rx, 1, i) rx = Trim(Replace$(rx, txcall , )) qrg = Mid$(rx, 1, InStr(rx, )) rx = Trim(Replace$(rx, qrg , )) dxcall = Mid$(rx, 1, InStr(rx, )) rx = Trim(Replace$(rx, dxcall , )) ' . . . . . . . . . . qrg = Trim(qrg) qrg_i = CInteger(qrg) ' == Here is Error If qrg_i 44 And qrg_i 43 Then mh430 = machmaupdatestr(mh430, dxcall, qrg) wpa = Split(mh430, ) nr430 = wpa.length - 1 ' wp = machma_buttonw(mh430) machma_balken() End If If qrg_i 146000 A... -- Dirk from the considerable amount of code provided and the unfortunate bit ellided (see I told you I was getting the hang of this ... thing) Probably grg isn't convertible? qrg = Trim(qrg) Try grg_i=CInteger(grg) If Error then Error Subst(1 won't convert,grg) qrg_i = CInteger(qrg) ' == Here is Error might help. Don't confuse data with expected types. (And by dog, haven't we all gone there!) hth B -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Stopping an event when user clicks on the form menu
On Fri, 2014-01-24 at 16:21 +0100, Fabien Bodard wrote: http://gambasdoc.org/help/comp/gb.qt4/application/activecontrol?v3 Returns the control having the focus. But return null for a menu or when the form lose the focus Thanks Fabien, that's what I needed... ... but it's strange, no matter how long I stare at that link, I just can't see that second line :-) Uhoh :-( spoke too soon. Just before I sent this, I had another thought. Yep, I had fooled myself into thinking it was that simple. Attached is a quickly mocked up demo of what's driving me nuts. The use scenario is this: 1) If the user is just going to do stuff within the form, then they must enter something into the Must complete box, then they can tab or click anywhere else and do what they want. 2) But they can also do stuff in the File menu, load,save,new or exit. This now works thanks to your input. What is there is some Dialogs and some Message commands (and just Me.Close). 3) Or perhaps they want to change some program option. They should be able to go Tools|Options which opens a form to change them. Guess what happens! 4) Or perhaps they want to view the help files. (This one is fake it's just there to demonstrate something). So they should be able to go Help| Browse Help. IOW 2,3,or 4) need to be able to occur without invoking the error balloon. Re: 4) this just uses an InputBox to demonstrate the same problem. Any further ideas? Bruce stopevent-0.0.1.tar.gz Description: application/compressed-tar -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Stopping an event when user clicks on the form menu
I have a form with a textbox that MUST be filled in before moving on to the next control or any other control within the form. Fine, so I implement a txtManditory_LostFocus method that just checks that there is some text in there. My problems are: 1) if the entire form loses focus, the lostfocus event fires. 2) if the user tries to click on the form menu the lost focus event fires. I think I have got around 1) by using Object.Lock in a Form_Leave() handler, but 2) has got me stumped. Any clues? tia Bruce -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] A few things about linked source files
I have not raised these as bugs because I don't believe anyone else would be mad enough to use linked source files as much as I have in the prototype I built recently to win our new project. I also believe there are more important things for the core developer(s) to concentrate on. So it's just a heads up list of quirks for later on when linked sources become more important. (For the sake of brevity, project A has the real file (say a form) and project B has the link.) 1) When the linked form is opened in B the form designer shows a short form of its toolbar, OK but the locked button state is false. This has effects lower down this list. It should be true. This also means there an inconsistent metaphor on the tabs for the form and the class. With the class the [read-only] tag is visible, with the class it isn't. But see 4) below. 2) (Trivial) If you inadvertently make the form the start-up class for B (Alt+s or a nervous twitch on the mouse) then B correctly starts the form on an F5. OK. But after getting over the initial heart attack it is very difficult to see the triangular start-up indicator in the project browser panel as it is almost totally obscured by the linked file adornment on the form icon. 3) The form designer reload button is hidden. It would be handy to have this button available as, if I have both projects open and change something on the form in project A and save it, there is no way short of closing B completely and re-opening it in a new IDE instance to see the changes. 4) (I lied! There is a way to do 3), but it has side effects.) If, on the form designer, I click on the Lock Form button the following occurs: a) the tab now correctly shows the [read-only] tag. But b) the link adornment in the project browser panel has disappeared. (and, what is weird is, it appears to be gone forever! Closing the IDE and starting a new instance doesn't even bring it back.) Oh. I just had a look at the .src directory. The link to the .form file has been snapped! This is probably a very bad thing. There are a few more but I am really tired tonight. I probably should raise a bug report on that last one - maybe tomorrow. regards Bruce -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Could not determine mimetype for file: http://
Would anyone care to guess where the above message comes from. It has started to appear on the console output when I use Desktop.Open(http://; $somevar) I have searched what I think are the logical places in gb.Desktop to no avail and have grepped the entire trunk with no results. It is definitely not in any of my projects, libraries or components. Bewildered Bruce -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Could not determine mimetype for file: http://
On Mon, 2014-01-20 at 13:41 +0100, Benoît Minisini wrote: Le 20/01/2014 13:23, Bruce a écrit : Would anyone care to guess where the above message comes from. It has started to appear on the console output when I use Desktop.Open(http://; $somevar) I have searched what I think are the logical places in gb.Desktop to no avail and have grepped the entire trunk with no results. It is definitely not in any of my projects, libraries or components. Bewildered Bruce Desktop.Open() calls the xdg-open shell script. This script is installed on your system, and if not, there is a copy inside the gb.desktop sources. -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Could not determine mimetype for file: http://
On Mon, 2014-01-20 at 13:41 +0100, Benoît Minisini wrote: Le 20/01/2014 13:23, Bruce a écrit : Would anyone care to guess where the above message comes from. It has started to appear on the console output when I use Desktop.Open(http://; $somevar) I have searched what I think are the logical places in gb.Desktop to no avail and have grepped the entire trunk with no results. It is definitely not in any of my projects, libraries or components. Bewildered Bruce Desktop.Open() calls the xdg-open shell script. This script is installed on your system, and if not, there is a copy inside the gb.desktop sources. Found it! It comes from /usr/bin/mimeopen ( I had to grep the entire /usr/bin to find it ) thanks Benoit -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] When does prefernces get saved?
(back to more serious stuff) Some preferences get saved to the .project file, but when does this occur? An example being the URL string on the Packaging tab. If I change that string and then generate an executable, the .project file in the executable contains the old URL= value. It similarly happens if I save the project before generating the executable. regards Bruce -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Two suggestions about TabPanel + 2 more
On Sun, 2014-01-19 at 23:13 +0100, Benoît Minisini wrote: Le 18/01/2014 23:01, Bruce a écrit : 3) You cannot set accelerator keys for TabPanel tab titles like you can for TabStrips I'm afraid it is not easy to implement... Oh well, never mind. (It was just an observation) 4) Mousewheel scrolling through TabPanel tabs only works when the TabPanel itself has the focus. (TabStrip scrolling happens when the mouse is over the tabstrip tab area, i.e. it doesn't need to have focus. This is really handy.) I don't understand: it works perfectly there, with gb.qt4, gb.gtk or gb.gtk3. hmmm, You are right. Don't know why I thought it... ah wait a moment, it steals the focus whereas wheeling over the tabstrip doesn't. I have attached a (badly put together) example of this. 1. Go to the Bhab tab 2. Set focus on Textbox10 3. Use mousewheel to roll through the tabs and back to Bhab = focus is still on Textbox 10 4. Go to CHab tab 5. Set focus on the yellow text box. (This might explain a bit better: the Users focus is also on the yellow box, he want to scroll through the sub information on the Tabstrip2 tabstrip but still is maintaining the yellow box text. Using the mousewheel he can roll through the sub information pages without the cursor moving out of the yellow box.) 6 Go to the Dhab tab, here we have the tabpanel. 7. Set focus on the orange text box 8. Mouse wheel over the tabpanel = focus on the orange box is lost! regards B 3LNav-0.0.1.tar.gz Description: application/compressed-tar -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] TabPanel Edition
On Sat, 2014-01-18 at 17:21 +0100, Fabien Bodard wrote: Is it normal that changing the count property in the property windows don't change the edited tabpanel in the form editor ? If by normal you mean does it happen here too, then yes. [System] Gambas=3.5.90 OperatingSystem=Linux Kernel=3.4.59-pclos1 Architecture=x86 Distribution=PCLinuxOS Desktop=LXDE/Openbox Theme=QWindows Language=en_AU.UTF-8 Bruce -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Two suggestions about TabPanel + 2 more
On Sat, 2014-01-18 at 17:19 +0100, Fabien Bodard wrote: The move left/right arrows must be at the left, because when we are changing doc from code to form. the arrow place position depend of the presence of right property panel. I think the tabs need to have all the same size if the close button is used. It ca be the size of the longest one. so when clicking on the close button colosing can be done recursively without moving the mouse. One thing funny can be a resisign on the first tab closed with a timer of 2 or 3 sec. so durring this time all the tabs at the right of the current tab have the same size than the current tab. And retreive theire size after the Last click + delay. I don't understand your first one but agree with the second. Two more though. 3) You cannot set accelerator keys for TabPanel tab titles like you can for TabStrips 4) Mousewheel scrolling through TabPanel tabs only works when the TabPanel itself has the focus. (TabStrip scrolling happens when the mouse is over the tabstrip tab area, i.e. it doesn't need to have focus. This is really handy.) Bruce -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] EXPORT OPTIONAL
I have just noticed that I can specify EXPORT OPTIONAL at the top of a component class. I understand what it does, but just wanted to ask what is the advantage of specifying that? regards Bruce -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] include/exclude lists for executables, source archives and (autotools) packages
Some comments and questions and requests. 1) the gambasdoc Project Directory Structure page ( http://gambasdoc.org/help/doc/project_structure?v3 ) says that a) Other files and directories i.e. the Data folder are not included in the executable. Surely this cannot be right? b) [.hidden] stuff are not included in the executables. Inadvertently, a few weeks ago I created a symbolic link in the Data folder of a utility project to a file in the hidden folder. This project is (so far) only on my PC. What I am wondering is did the archiver include the symbolic link or did it snap it? 2) On the packaging tab of the Preferences popup, there is that list of files that are ignored when creating source archives. I have never really paid too much attention to it but now I am wondering what the entries in this list mean. We have a long list of documentation and modelling files in .hidden that are very often temporary in nature and can be very large. Is there a way to exclude entire directories from the archives? For example, we have a Modellio workspace in .hidden/Design/ that could and usually does contain a bunch of subdirs of metadata built by the Modellio tool with stuff in them that does not need to be archived as it is rebuilt everytime the Modellio tool is loaded. I would like to exclude these specific paths from archives (they are dozens of Mbytes) Another example is our code generators leave a lot of temporary metadata files and sqlite files here and there in .hidden. These are useful to keep in the live copy as we frequently dive in and out of the tools. But when the project is archived these files are all generally rendered useless. Again I'd just like to exclude these files from the archives. Why do I want to keep all this stuff inside the project? Even with a team of three and two major products to support, we created a documentation nightmare. The projects are on a shared network drive, the documentation and models were wherever and there were multiple copies and variants of everything. It has taken us almost two months to clean up the horse auctions docos and move it all into the gambas project directories. This is a good thing. But at the moment we are creating source archives that are approaching the limits of a DVD and need to slim them down. We are docing this manually at the moment and that is NOT a good thing. If there is not a way to exclude specific paths then fine, we will have to come up with an answer here. 3) Packages and I am only talking about autotool packing here again. I thought somewhere there was a way to exclude and include specific directories in the package archives. By somewhere I mean that I am not sure whether it was in Gambas or in something I wrote myself back in the Gambas2 days or even somewhere else, so this is really a please help if you can request. Given the above, there is a lot of stuff we are now keeping in the .hidden directory that should or should not go in the package. Can you think of a way I could achieve this? Paddys-Hill is (hopefully) going to expand shortly with, for us, a very large project. It is a bespoke development but the customer seems quite happy to have it released under GPL (as long as they get what they want). I am currently in a bit of a panic as I haven't had to cope with a team of 15'ish for some years, hence these and no doubt other weird questions that will arise shortly. Thanks in advance for any input you can provide. best regards Bruce -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] A Gambas-MySql question - Query the result of a query and a table
Hi Willy, I have been thinking about this for the last day (amongst 20,000 other things) and I really don't have an easy answer. On Tue, 2014-01-14 at 10:20 +0100, Willy Raets wrote: Hi all, In MS Access it was possible to make a query based on a query. I am in the middle of porting all MS Access clients to Gambas 3 and all tables have been migrated to MySql. I do sort of remember this. We used to make a lot of use of it. But I can't remember how it was done. Could you post a simple example? Is it possible in Gambas to do a query and next do another query on the result of the previous query combined with some extra tables? (Without the example, the answer is) Well not really, but there are a lot of options. Or, do I need to do the query, store the result in a table and next query this table combined with the extra tables. No, you need not go this far! A Gambas result is not a cursor in the true sense of the word. The best way I can explain it is that it is sort of a live collection of rows. You can iterate through it using the short form of the For Each method, but you cant refer to it in another query as the dbms has no idea what you could be talking about. There are a few options that leap to mind without remembering how this stuff was done, but they all involve using direct SQL calls rather than the clever stuff Benout has provided. Also be very aware that you will be writing dbms specific code and so lose the database agnosticity that normal use of gb.db provides. (And as you seem intent on using that dog of a dbms, MySQL, I can't really be entirely specific as to how to go about it.) Generally, it works like this. The SQL standard requires a SELECT statement to refer in the FROM clause to either: - real tables - views - embedded queries. So we can SELECT (blah..) FROM aTable as A, aView as B, (SELECT Martians FROM somewhere WHERE etc) AS C WHERE A.Joe= b.Mary AND B.Sausages = C.Martians; (Note, I am cleverly avoiding JOINS here :-) ) This is standard (and I mean Standard!) SQL. But you can't do that using the normal Gambas db stuff, you have to do a Connection.Exec(query) call and that is a) dbms specific and b) not updatable. So to cut a long story short, consider this approach: 1) Convert your Access queries to views and store them in your MySQL (Ack, spit) database, but only store the Keying information 2) Use those views, which are visible in gambas as Tables 3) Use the view result as a list of keys in your gambas app to do real table updates. We do this every day, let me check todays stats... pic attached hmm a pretty slow day really. I know this last option would work, but I am just wondering if there are any better ways of doing this, without having to create a table with the query result. Suggestions are appreciated. hth Bruce attachment: Selection_030.png-- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] What does ... in a menu name signify?
On Wed, 2014-01-15 at 02:00 +0100, Caveat wrote: It's a 'standard decoration' signifying there's more behind the chosen item...or that the item needs user confirmation or additional input on a dialogue... http://msdn.microsoft.com/en-us/library/aa511502.aspx#ellipses Kind regards, Caveat Well I never... In 40 years of working with computers I never heard of that. thanks Caveat! So, it doesn't have any functional meaning then? Back to Benoit: so why go to the bother of splitting the Text = lines like that? B -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Positioning the editor to a specific line and making it visible
On Wed, 2014-01-15 at 03:44 +0100, Benoît Minisini wrote: Le 15/01/2014 01:44, Bruce a écrit : I can't work out how to do this. blah, blah, blah tia Bruce The CurrentLine is for highlighting the current line of code during a debugging session. Use the Editor.Goto() method instead. Regards, Well, that makes sense. But I tried it and it still didn't show the indicated line. I tried a work-around as follows: If gvwToolbars.Column = 1 Then iLine = edtFormDef.FindNextWord(skey, 0) edtFormDef.Goto(iline, 0, True) Desktop.SendKeys([Begin]{[Shift_L][End]}) == this works TabStrip1.Index = IDX_DEFFILE Endif Then suddenly, while I was writing this, I had a brainwave! This works: If gvwToolbars.Column = 1 Then iLine = edtFormDef.FindNextWord(skey, 0) TabStrip1.Index = IDX_DEFFILE == This is the trick edtFormDef.Goto(iline, 0, True) Endif by making the editor control active (its the only control on the TabStrip1[IDX_DEFFILE] tab) BEFORE doing the Goto all of a sudden it all becomes magic again. Phew! I was getting (more) worry lines reading the IDE code and seeing the FGotoLine work but I couldn't. Cest la vie! Bruce p.s. Probably suggests a help file comment, but I'm two days behind schedule now. I'll see to it when I catch up. -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Starting a Process and forgetting about it
On Tue, 2013-08-13 at 12:15 +0200, Tobias Boege wrote: On Tue, 13 Aug 2013, Beno?t Minisini wrote: However, I don't think this is a common enough scenario to have it implemented directly in the Process object. I got by by using Shell setsid ... . Whereas automatically killing background child processes seems to be a nice addition. Thanks for your effort anyway. Regards, Tobi I could call setsid() for the child process, but I have no syntax in the EXEC/SHELL instruction for that. I will think about it... Besides the syntax, there is another thing to be aware of: If there is a pipe from child - parent (write - read) and after the parent dies, the child writes to the pipe, it will receive a SIGPIPE and die, too, if it doesnt't catch this signal. It means if whatever flag to enable setsid() is set, the user must carefully think about adding For Read/Write/Input/Output. Regards, Tobi Good morning, Did this ever get taken further? (Another long post sorry!) I now find myself in a similar situation to Tobi, a little simpler but with an added twist. Basically, we have about 8 projects that can shell each other in a certain heirarchy. Each of these provides functionality based on a log-in role matching the role that the user wants to assume for that session. So a simple example of a hierarchy would be manager--analyst--tester--testdeveloper. That is the manager role can shell the analyst role project which can shell the tester role etc. There are other more complex heirarchies. What I need to provide is two exit strategies, Quit and Quit All that would nicely close down either the current project leaving any child processes running or close the current project and all child processes respectively. The twist is that they want the Quit All to also close any parent processes, in other words to work both up and down the chain at every level. I think these are two different things from the Gambas point of view (and on further consideration, lets leave that out of this.) I thought that the 1) hProc.Ignore=True could provide the Quit All for the first matter, and I think hProc.Ignore=False might provide the Quit but it would leave the parent process running which in turn wont exit until the remaining child processes exit. Here's the issue: Re 1) Since the user could start multiple child processes I use a global array $processes of type Process[] and add the hProc every time they start a new child. The two handlers for the Quit menu items are: Public Sub mnuExit_Click() Me.Close End Public Sub ExitAll_Click() Dim hProc As Process For Each hProc In $Processes $hProc.Ignore = True Next Me.Close End When I run this inside the IDE it all works, no matter how many child processes they kick off. ps f -U bb -o pid,ppid,args shows (abridged output): PID PPID COMMAND 17447 1 gbr3 /usr/bin/gambas3 18411 17447 \_ /usr/bin/gbx3 -g -f 17447 /.../atestmgr/tmmanager 18439 18411 \_ gbr3 /.../atestmgr/tmttester/tmttester.gambas 18449 18411 \_ gbr3 /.../atestmgr/tmdeveloper/tmdeveloper.gambas 18468 18411 \_ gbr3 /.../atestmgr/tmanalyst/tmanalyst.gambas and when I Quit All from proc 18411 they all close down. Now if I run the compiled tmmanager from a vterminal I get: PID PPID COMMAND 17187 1 lxterminal 17872 17187 \_ /bin/bash 18722 17872 \_ gbr3 ./tmmanager.gambas 18739 18722 \_gbr3 /.../atestmgr/tmdeveloper/tmdeveloper.gambas 18744 18722 \_ gbr3 /.../atestmgr/tmttester/tmttester.gambas 18751 18722 \_ gbr3 /../atestmgr/tmanalyst/tmanalyst.gambas as expected, BUT when I Quit All (from 18772) the children stay alive: PID PPID COMMAND 18751 1 gbr3 /.../atestmgr/tmanalyst/tmanalyst.gambas 18744 1 gbr3 /.../atestmgr/tmttester/tmttester.gambas 18739 1 gbr3 /.../atestmgr/tmdeveloper/tmdeveloper.gambas 17187 1 lxterminal 17872 17187 \_ /bin/bash and magically they have moved to the init proc. Finally, If I just Quit from either the IDE debug mode or from the vterminal the expected occurs - the original process stays alive until the last child process exits. So, it appears gbx3 and gbr3 are doing different things? regards Bruce -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Report component - variable height items
Works like an old rag! Is it good or bad ? Sorry! A bit of Australian crept in there. It means good. Now, here is a couple of new problems (and hopefully an answer). We have an audit requirement to create a hard copy of a thing when its' data is first entered into the system. Since there will be hundreds, if not thousands, of these things I have convinced the auditors to let us create a read-only pdf file rather than chewing up so much paper. Fine, so the requirement now becomes a technical requirement: When a thing is first inserted into the database, automatically print-to-file a gb.report of the data and set its' attribs to -r--r--r-- The first and last bits are not a problem, it's that middle bit automatically print-to-file a gb.report of the data. Why it is a problem is a bit hard to explain, but here goes. We want no user interaction. So instead of showing the preview form, it has just got to print. In fact we don't even want to see the printer selection form (but I'll get to that later). Tracing through the call stack, I get to CPrint.PrintReport: 7 Public Sub PrintReport(hReport As Report) 8 9Dim hSizeParse As TSizeParse 10 11$hPrint = hReport.Clone() 12hPrinter.Paper = $hPrint.Paper 13hPrinter.Orientation = $hPrint.Orientation 14If $hPrint.Paper = Printer.Custom Then 15 hSizeParse = New TSizeParse($hPrint.Width) 16 hPrinter.PaperWidth = hSizeParse.ToCm() / 10 17 hSizeParse = New TSizeParse($hPrint.Height) 18 hPrinter.PaperHeight = hSizeParse.ToCm() / 10 19Endif 20If Not hPrinter.Configure() Then 21 hPrinter.Print 22Endif 23 24 End The first issue is at line 11, I can't understand why you create a clone of the report object and it creates a problem as follows: Report.Clone invokes the _new() method in the actual report class. However, our _new method requires a parameter, the database record id for the thing we want to print. So we get a not enough parameters error. (I tried getting around this by using a Run(id) method, but of course this never gets invoked in the cloned object and thus we get a blank report.) I have changed line 11 to 11$hPrint = hReport '.Clone() locally and everything still works. But I am a bit scared that there is something I don't know about that requires that cloning to occur. Is there? Now we get to line 20. This is a bit unconditional! We need a way to skip running the preview. Anyway, after a bit of mucking about I decided that Report needed two new properties (DefaultPrinter and ShowPreview) and CPrint needed some changes. I have attached a gzip of these classes. See what you think about adding these changes to the base. (Note: it does have that line 11 change.) Basically, ShowPreview defaults to True and since DefaultPrinter will be null, there should be no side effects on existing reports. ShowPreview is set to appear in the IDE Report designer, so it is a simple matter to turn it off or on. DefaultPrinter doesn't appear in the IDE, it is a code-only property. What turned out to be cool is that just by creating a DefaultPrinter, it automatically selects the users actual default printer (or the system default if the user hasn't got one). So that makes it possible to bypass the Printer.Configure() call and the report will go to the default printer automagically. What I found to be even cooler is how to set it to print-to-file. Me.DefaultPrinter = New Printer With Me.DefaultPrinter .Name = .OutputFile = ~/print1.pdf End With in the myreport.class and bingo! i.e. just set the printer name to null and the OutputFile property to wherever you want the report to go. Setting the filename extension magically produces a pdf file, setting it to anything else magically produces a postscript file. regards Bruce changes.tar.gz Description: application/compressed-tar -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] gb.Report : Setting label colors
More learning curve! I am trying to set the foreground and background colors for a report label: 8 Dim lblType as new ReportLabel 17 lblType.Text = $currProblem.ProblemType.Value 18 lblType.Brush = Report.Color($currProblem.ProblemType.ForeColor) 19 lblType.BackGround = Report.Color($currProblem.ProblemType.BackColor) $currProblem.ProblemType.Forecolor is 22015 (i.e.mid blue) I get ERR: Unknown symbol '_iValue' in class 'ReportBrush' (11) Report.Color.365 RProblemDetail._new.18 MTEST.Main.9 What am I doing wrong? tia Bruce -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Report component - variable height items
On Wed, 2014-01-08 at 21:53 +0100, Fabien Bodard wrote: Normally it willwork with the last rev... So you can write multiline label with \n. 2014/1/8 Bruce bbr...@paddys-hill.net: Hiya Fabien, Guess what, I have jumped on the gb.report user list at long last (had to, we have a new client who wants pretty reports rather than the text ones we have used since forever.) One thing that I do not understand is, is how to make a variable height label. That is, one that will expand it's height to accommodate either a) strings with \n in them, and/or b) strings that are too wide for the constrained width. Any clues gratefully received. regards Bruce Thanks Fabien, Works like an old rag! cheers Bruce -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Solving the Gambas packaging problem psychologically (!)
On Mon, 2014-01-06 at 18:35 +0100, Benoît Minisini wrote: Yeah, great mail subject! I think it will be more difficult for Linux distributions to fail packaging Gambas correctly if there is a useful tool made in Gambas (other than the IDE) that will be integrated inside package repositories because people use it. What do you think about that? Do you think that extracting the image editor of the IDE and make a simple but powerful Paint program from it could be a good idea? That tool should be QT4/GTK+ agnostic of course. Regards, No matter how many times I have tried to reply to this, I keep coming back to this diagram : http://gambas.sourceforge.net/architecture.png Which is beautiful. But, it begs the question, which bit are we trying to create a tool for? B -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Report component - variable height items
Hiya Fabien, Guess what, I have jumped on the gb.report user list at long last (had to, we have a new client who wants pretty reports rather than the text ones we have used since forever.) One thing that I do not understand is, is how to make a variable height label. That is, one that will expand it's height to accommodate either a) strings with \n in them, and/or b) strings that are too wide for the constrained width. Any clues gratefully received. regards Bruce -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] A statusbar control
I have had some joy over the last few days doing this from scratch using the gb.form.mdi ToolBar as the base control. It's still a long way from the answer and also a long way from being a fully developed IDE useable control. but I thought you may like to see the progress so far. I mocked up a prototype in the test form using just native controls to act as a guide for what I wanted. Then started creating the actual Real custom control. There are still a lot of things that need attention, the least of which is using the ToolBar as a base. Unfortunately, I do not have time at the moment to start converting it to use a drawing whatsit and thus eliminate the reliance on gb.form.mdi, but I have got the number of sub-panels thing worked out to the extent that adding new panels can be done on the fly, removing them is a bit of a different fish though. So I've limited the removals to only those that are added at runtime. The design ones must stay there. The automatic layout is sort- of OK. I am still fighting with the padding necessary to make the variable length text work properly. User interaction is still far in the future, but the biggie went away by itself as the sub-panel controls are addressable (although not as simply as I'd like) from the main form. Things that arose in the development were: I want to have non-text items in the bar. This turned out to be easy, so now we have Text sub-panels (a Label), Icon sub-panels (a pictureBox) and Progress sub-panels (a progressBar). Anyway, have a look. As always, any suggestions or criticisms gratefully received. regards Bruce (p.s. resent, I forgot to remove a large doco file) statusbar-0.0.11.tar.gz Description: application/compressed-tar -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Cotrols don't show.
On Thu, 2014-01-02 at 15:06 -0500, ISS Boss wrote: Are you telling the Labels WHERE to show? In VB you'd have to do something like: With frmMainForm ' put your loop here End With VonZorch wrote, On 01/02/2014 15:00: lblHt[Loop1].Visible = True that was the first thing I tried, didn't help. Thanks for the quick reply. Dim Loop1 As Byte For Loop1 = 0 To 10 lblHt[Loop1] = New Label(Me) ' A few other bits might help!! lblHt[Loop1].width = 37 lblHt[Loop1].H = 28 ' and optionally lblHt[Loop1].Alignment = Align.Center lblHt[Loop1].Border = Border.Raised lblHt[Loop1].x = 20 lblHt[Loop1].y = 20 + (Loop1 * 30) lblHt[Loop1].Text = Str(Loop1) lblHt[Loop1].Show Next hth Bruce -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Gridview
On Thu, 2014-01-02 at 14:34 +1100, Shane wrote: what is needed to get word warp height resizing working ? this is what i have GridView1.Rows[Index].Height = -1 GridView1[Index, 0].WordWrap = True so wordwarp works but the height is not resized -- You have to set the row height to -1 in the Arrange event, not when you load a cell. This is because of something like the runtime does not know what to do with the row heights until it is all loaded. I had the same problem some months ago, Beniot's explanation is somewhere in the mailing list archives. I can only suggest you search it for gridview row height, but I do not remember the topic, sorry. hth Bruce -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Gridview
On Thu, 2014-01-02 at 14:53 +1030, Bruce wrote: On Thu, 2014-01-02 at 14:34 +1100, Shane wrote: what is needed to get word warp height resizing working ? this is what i have GridView1.Rows[Index].Height = -1 GridView1[Index, 0].WordWrap = True so wordwarp works but the height is not resized -- You have to set the row height to -1 in the Arrange event, not when you load a cell. This is because of something like the runtime does not know what to do with the row heights until it is all loaded. I had the same problem some months ago, Beniot's explanation is somewhere in the mailing list archives. I can only suggest you search it for gridview row height, but I do not remember the topic, sorry. hth Bruce Aha, found it! Topic is gridview row heights when cell is wrapped and Benoit's answers on the 1st May 2013 are germaine. B -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Relaunching a program as root
(and if that program mails the special password somewhere, its not our fault!) Anyway, that's just what I think. cheers Bruce p.s. The last straw that breaks the camel's back might not be what you wanted. It conveys a complaint from the recipient of a task to the sender as in when I am going to the shops for a 5 minute visit and someone says Oh, while you're there can you get me... and someone else says Could you also drop by the baker and get me some ... and someone else says Can you check if there is any mail at the post office. At that point my load of straw, i.e. the task load, just got too heavy. In Australian, I reply, Well, that's about the last bloody straw. Here, we have a saying Yes, somebody ought to do something about that that is used when a problem is mentioned for the thousandth time. Inevitably, some poor sod will take a deep breath and undertake to fix the said problem, thinking and I suppose that somebody will have to be me. Is that what you meant? -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Relaunching a program as root
On Mon, 2013-12-30 at 02:10 +0100, Tobias Boege wrote: 3) The Authentication form needs work. The labels are not visually associated with the correct control. (This one was from Felicity, who can pick these things out with a 3 second glance at a form). What do you mean? I have attached a picture of how it looks when running over here. Anything distorted there I don't recognise? Editted picture attached regards Felicity attachment: relaunch-root-authbox.png-- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] A statusbar control
On Sat, 2013-12-21 at 10:46 +0100, Tobias Boege wrote: On Sat, 21 Dec 2013, Bruce wrote: Did someone recently speak about having developed a statusbar form control? If you mean[0], then yes, roughly. There was a StatusBar class from Raymond de Bruijne (Gambas2) which I changed to be more Gambas3. (However, I haven't worked on it since I posed that question because the answer kind of disappointed me. But looking at it again, it seems pretty plausible.) Anyway, do you want to see it? There are at least three versions of this class in use in Hans' projects and I couldn't find the good one just now... I'll finish the StatusbarForm idea and then publish the thing in a separate article... Regards, Tobi [0] http://sourceforge.net/mailarchive/message.php?msg_id=31629361 Tobi, Yes, that was the mention. Having re-read that thread (and I have no idea why the search I did failed for it?) and you comments above, it seems to be at the same state my old gb2 one was, wherever it is. Or probably a bit better, because if I recall correctly, I could not ever really work out what I was trying to achieve. Since I never got far, I sort of forgot it and got on with life. I remember thinking at the time that it was such a basic idea how come there wasn't a native one. Since then I have discovered that life on the planet has actually continued without it. But, in fact Some people seem to like this sort of thing. is exactly what happened this week. They want a status bar. It's no big deal really. I was just hoping that someone had one that might get them off my back. So, whenever. I had another go yesterday at creating a custom status bar control, but yet again, came up against the same problem of deciding what it is I actually want. I know some of the things I want: - an IDE configurable number of sub-panels, - automatic layout, including springiness for at least one of the subpanels, - user interaction with the statusbar to stretch a sub-panel relative to the others, - (biggy) event response, so when something happens in the application the app can raise an event handled by the statusbar to do/show something. Every time I get to that last one, is where I start trying to work out what that really means. ( I am going to get a bit historical now. ) Some time in the last century I did write a (cough) VB (cough) component (cough, lets call it an addin at best) that did do whatever it is I am talking about. While I write this I am starting to remember that it was actually a nightmare that involved all sorts of callbacks... and things... Enough! As I said, I was hoping for an easy way out. But 2013 seems to have staggered on towards the final act which means that probably very little work stuff will be achieved here at paddys-hill over the next couple of weeks. So to you and yours and all who may be listening, have a great and safe festive season, a memorable new year and a fantastic 2014. best regards Bruce p.s. It was 43 degrees here yesterday. That's Celsius, not Fahrenheit. Today is a bit better, it's 32 at 3pm. As such, I may have to go out now and find some small quantity of cold liquid refreshment, lest I dehydrate! :-) -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] A statusbar control
Did someone recently speak about having developed a statusbar form control? tia Bruce -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] disabling unused components
We do not have the required library for gb.mime, not do we use gb.mime What I can't remember is where and how in the reconf;configure;make circus I need to stick a --disable-? option. Any help would be apprec. Bruce -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] File Chooser OK event?
On Thu, 2013-12-19 at 11:36 +0100, Rolf-Werner Eilert wrote: Just saw that File Chooser can have its own OK and Cancel buttons, but how would I handle these events? Never used it before, and there is no hint in the help... Regards Rolf I really didn't it could be that hard? B filechooser-0.0.1.tar.gz Description: application/compressed-tar -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Creating a gb3 executable
I have done this so many times before but today I just cant get it to work. We have a code generator that updates the source code for a library project. As well as that it updates an SQLite database file in the project. This database gets stored inside the library executable. Fundamentally every time the database is changed we need to recompile the library. Fundamentally many times I forget to do it and sit here wondering why nothing has changed. So I am trying to automate the executable generation in the code generator. If Message.Question(Recompile BO library?, Yes, No) = 1 Then Print Compiling $cProjectPath Shell gbc3 -egawx $cProjectPath To sCompileLog Print sCompileLog Print Creating executable archive $cProjectPath / File.BaseName($cProjectPath) .gambas Shell gba3 -v -o $cProjectPath / File.BaseName($cProjectPath) .gambas To sCompileLog Print sCompileLog Endif The gbc3 bit works fine and all the files in .gambas are updated, but the gba3 bit doesn't do what I want. The library executable file timestamp doesn't change. Here's the output: Compiling /home/bb/gambas3_proj/atestmgr/tmbo2 OK Creating executable archive /home/bb/gambas3_proj/atestmgr/tmbo2/tmbo2.gambas but the tmbo2.gambas file is still timestamped some hours ago. I have waded through the IDE code to see if I can find a clue, but alas, no joy. I'd appreciate if someone could take a look at that code above and tell me if there is something glaringly obvious that I just cannot see. tia Bruce -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Project line counts
Wasn't there a context menu item somewhere in the IDE that told you (amongst other things) how many source code lines were in the project? ? Bruce -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Creating a gb3 executable
On Wed, 2013-12-18 at 13:03 +1030, Bruce wrote: Some idiotic code. Forget it. I can see why it doesn't work. Sorry about the noise. Bruce -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Project line counts
On Wed, 2013-12-18 at 03:54 +0100, Benoît Minisini wrote: Le 18/12/2013 03:35, Bruce a écrit : Wasn't there a context menu item somewhere in the IDE that told you (amongst other things) how many source code lines were in the project? ? Bruce There was, but I removed it. Do you need that? Not really, I was just interested in how big this code generated project was getting. But it is good to know that I am not going mad. What do you mean by amongst other things? Nothing important, I cant even remember what else it showed. cheers Bruce -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] how to convert VB Project file to Gambas
On Mon, 2013-12-16 at 09:55 +0100, Caveat wrote: http://msdn.microsoft.com/en-us/library/030kb3e9%28v=vs.90%29.aspx That should get you pointed in the right direction... Kind regards, Caveat On 16/12/13 07:57, //SCLPL/ Sudeep Damodar wrote: Hi all How to use Type in gambas.my VB Code is given below Private Type coordinates XVal As Double YVal As Double laseron As String mode As String End Type With best regards to Caveat, who knows what he is talking about. Sudeep, There is a struct concept in Gambas, but it is not really a good idea to use it unless you know what you are doing. But for the sake of sanity: 1) structs must be public, which essentially means you have absolutely no protection, so Public Struct {Type} XVal As Float ' no not a Double, we have never heard of it YVal As Float ' ditto but perhaps you might like to read the help on datatypes laseron as String ' Boolean, what is happening here, maybe perhaps is a valid value mode As String ' great, so mode Elephant works here too End Struct 2) Good luck. 3) Either read the help or get out of my mailbox. -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] gb.logging API change
Sebastian, With the new version the $(callLocation) is always returning the same location (Logger._call.95). I stuck some debug in the Formatter to print the stack backtrace, here's what I get when using the Logger from outside: Formatter.GetCallLocation.10: Formatter.GetCallLocation.10 Formatter._call.45 Logger.Log.87 Logger._call.95 Application._init.57 i.e. I think you should be using System.Backtrace[4] instead of [3] hth Bruce -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Overriding native classess
I've got myself in a real mess with this one. :-( I have a class in a local (third-party) component that inherits the native Application class. It provides some generic setup stuff, database connectivity across networks and some basic security. It works fine and has done so for a few years. Now I have a need to override the Application class itself in a project that uses this component (to provide an additional property which is a collection of gb.logging Logger objects.) The new Application class uses an _init() method to set up these logs. When I run the project through the IDE, it starts and the stack backtrace panel shows (native code) and execution just stops. It doesn't hang or anything, it just stops as if it hit a debugging breakpoint. There is no further information. If I then continue execution (via F5 ) the program just ends. No errors, nothing. I realise that the problem is caused by this mixing of overriding and inheriting the native Application class. My problem is that I can't see where to start looking for a solution. So, Is this mixing of inheritance and overrides on native classes illegal? (If not) Does anyone know what is going on inside this native code at the point of program startup? tia Bruce -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Overriding native classess
On Mon, 2013-12-16 at 00:49 +0100, Benoît Minisini wrote: Le 16/12/2013 00:36, Bruce a écrit : I've got myself in a real mess with this one. :-( I have a class in a local (third-party) component that inherits the native Application class. It provides some generic setup stuff, database connectivity across networks and some basic security. It works fine and has done so for a few years. Now I have a need to override the Application class itself in a project that uses this component (to provide an additional property which is a collection of gb.logging Logger objects.) The new Application class uses an _init() method to set up these logs. When I run the project through the IDE, it starts and the stack backtrace panel shows (native code) and execution just stops. It doesn't hang or anything, it just stops as if it hit a debugging breakpoint. There is no further information. If I then continue execution (via F5 ) the program just ends. No errors, nothing. I realise that the problem is caused by this mixing of overriding and inheriting the native Application class. My problem is that I can't see where to start looking for a solution. So, Is this mixing of inheritance and overrides on native classes illegal? (If not) Does anyone know what is going on inside this native code at the point of program startup? tia Bruce Without the source code, hard to say. Yes, I expected that :-) I had started to simplify up an example and in the course of doing that finally got the error balloon that I was, unfortunately, expecting: Overriding an already inherited class is forbidden. Oh well, that component was overdue for a major grease and oil change anyway to take advantage of stuff that wasn't around when it was originally written. Usually the depicted behaviour is an error returned by the debugger not displayed by the IDE, because it is raised too early (when initializing classes). What was interesting was that the error still occurs when there is no code that references the component, it's only reference was in the project properties (i.e. it is still in the .project and .startup files). Is that expected? B -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] gb.db Connections questions
Fiddling around under the hood Is there any hidden reason why Connections is readonly? Is there any reason for it not having a Count property? The reason being, I am trying to get rid of my Application override/inheritance problem from this morning. I have run into an issue where a) we configure the connection host at runtime (the age-old dev/test/prod server configuration) and b) one library creates a hardcoded connection (it's actually a softcoded connection) to an SQLite file in the tmp/gambas.999/proc directory. I need to share both of these connections up and down our component/library tree. I have changed our local copy of gb.db but am wondering if there is any hidden issues that could arise that mean that Connections must be readonly. tia Bruce -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] gb.logging API change
On Mon, 2013-12-16 at 01:14 -0200, Sebastian Kulesz wrote: I just commited an update to the gb.logging component. Please note that a call to Logger.Begin() is no longer necessary and will fail. The log is automatically opened for writing when creating the logger. A recent change, too, is the ability to use the component without creating a Logger instance. If you call Logger.Log(...) a new, hidden instance will be created for you. This is useful if you only need one Logger and use it in multiple Modules/Classes of you application. It will save you a public variable and a few LOC. Grraagh! I just spent several hours working up a solution for logging to a single log across multiple components/libraries. One question, is there any change to the parameters? AKA where does the log info get sent to when using the hidden instance? Also, it is now possible to redirect the Logger output to stderr ;) Hope you like it! Please let me know any thoughts! I have been thinking (hard to believe!) about some kind of scheme for logging to multiple files. Some ideas were to a) use the cron approach i.e. 3 logs error, info and warning but probably error, info and debug would be better suited to a development system like Gambas. b) similar to a) but allow configuration as to what level message goes to which log. Here on our production stuff we really need to keep errors warnings very separate from the info log(s) as they need high visibility (i.e. if error.log is not empty then everyone panic!), the info logs are of two types, general this got done and that got done and this is what came out data and audit data (bluh!) and we really need the debug.log on the dev/fix side of things. The other thing I would like to see is a way to increase the number of levels of detail once we get down to the debug level. This would be on an application basis. cheers Bruce -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Writing a text file from the contents of a text area
On Sat, 2013-12-14 at 11:53 +, John Rose wrote: I have a TextArea containing a number of lines. I'm confused by the multiplicity of variants of the Open command. Can someone direct me to an example of this? I've already failed to find such an example in the Gambas online documentation. John, we are guessing a bit here. OK, you have a textarea which has a string in it. Does the textarea control (i.e. as you see it on the form) have a number of lines or does the textarea string have a number of lines (i.e. it contains \n escape characters)? Until we solve this bit I am afraid that guessing what the jimmineycrickets this has to do with an Open command is just a touch too hard. hth B -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] how to convert VB Project file to Gambas
On Sun, 2013-12-15 at 11:37 +0530, //SCLPL/ Sudeep Damodar wrote: Hi All, How to make .deb file in gmabas Best Regards Sudeep @IDE ^Project|Make|Installation Package @Wizard #Follow the instructions until step 3 Select Debian #Follow the instructions or if that is too hard, press F1 Then read every page. Like we all have done. or if that is too hard, read this http://www.catb.org/~esr/faqs/smart-questions.html Fair go, Sudeep, make at least a bit of effort. -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Selecting a window
On Wed, 2013-12-04 at 20:18 +0100, Fabien Bodard wrote: I'm sure to understand what you want to achieve ... what do you mean by select a windows ? 2013/12/4 John Rose john.aaron.r...@gmail.com: I want the user to be able to click a point within one of the windows displayed on the desktop (i.e. not just Gambas forms) in order to select that window. The code below shows how to access properties of all windows: Dim dWindow As DesktopWindow = Null Desktop.Windows.Refresh() For Each dWindow In Desktop.Windows If dWindow.Minimized = False Then Print Window: Name= dWindow.Name , X= dWindow.X , Y= dWindow.Y , Width= dWindow.Width , Height= dWindow.Height Endif Next The only way I've thought of is to define a transparent form covering the whole desktop with an associated mouse click event, which supplies the co-ordinates of the point clicked. Then by examination of each dWindow property (i.e. X, Y, Width, Height), one can determine which window has been clicked. Is that the best way? But how can one allow for the situation where the user has clicked a point which is within 2 windows i.e. is there a property of dWindow which shows if that window is the 'top' one (i.e. covering the other one at that point)? Like Fabian, without understanding exactly what you want to achieve, why not just shell out to xprop where all this is apparently already solved? Bruce -- Sponsored by Intel(R) XDK Develop, test and display web and hybrid apps with a single code base. Download it for free now! http://pubads.g.doubleclick.net/gampad/clk?id=111408631iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] gambas documentation offline include in source (gb.web)
On Mon, 2013-12-02 at 18:16 +0100, Tobias Boege wrote: In a next step, we would write a parser to let the IDE display this help and Its already there. Local modules inline help is shown even if there is no internet connection. Another idea would be to somehow generate all the structural help from gambasdoc back into the .info files. then a module (or a standalone program) for gb.wiki to regenerate the documentation database from .info files and in effect, everyone can have his own local copy of the help - of any version he wants (because then documentation is completely revision-bound) - and gambasdoc.org just happens to provide a reasonably recent version of the docs online. However, there is all the other non-module information that is in gambasdoc.org - it would not be available. B -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349351iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Semi-persistent pop-up form?
On Tue, 2013-11-12 at 12:45 -0700, paulwheeler wrote: Bruce, Unfortunately, I have no answer for your question, but wanted to say that your illustrations are SO COOL! If you don't mind my asking, how did you do them? paul Hi Paul, Thanks for the comp. But the overlay is just a normal gambas form with the Mask attribute set. I did write up how to do it (for my own benefit) about 4 weeks ago .. somewhere! Since then I have been a little bit away due to a racehorse that kicked me, apparently several times, and spent some time in hospital. I'll see if I can find that set of notes in the coming days. cheers Bruce -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349351iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] gb.xml unSerialize
On Sat, 2013-10-19 at 22:29 +0200, Adrien Prokopowicz wrote: Well, looks like there is a little bug here. I will fix that tomorrow. Le Sat, 19 Oct 2013 20:15:57 +0200, Bruce bbr...@paddys-hill.net a écrit: First, thanks all for the replies. re: Content v Contents I think (not that Australian is the definitive interpretation of the English language) that it depends on the explicit usage. The content of this box is dangerous refers to the entire contents of the box as a single entity. The contents of this box are dangerous refers to each and every item contained in the box. (if that makes it any clearer??) Now my problem, that I should have made clearer in the first place, is that the SQL string is an attribute of the node. task name=Update diary, sql=UPDATE blah SET ... FROM blahblah WHERE datelt;current_date; / I have no problem writing the xml out. wkXMLtask.NewAttribute(sql,sSQL) converts any internal 's and 's to lt; and gt; automagically. However, sSQL=wkXMLtask.GetAttribute(sql) leaves the XML encoded characters as they are. Bruce Hello Adrien? Has tomorrow come yet? Bruce -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349351iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Semi-persistent pop-up form?
On Tue, 2013-11-12 at 16:12 +0100, Benoît Minisini wrote: Le 12/11/2013 00:19, Bruce a écrit : On Mon, 2013-11-11 at 22:30 +0100, Benoît Minisini wrote: Le 11/11/2013 21:47, Bruce a écrit : Is there some way to make a popup form only close on a specific user action? In the attached picture, I have a popup form displaying some statistical guff about the data displayed in the main form. (I have pixelised the main form just to highlight the popup.) As per design, as soon as the user clicks on the main form, the popup disappears. In fact, as soon as the user clicks (anything) the popup disappears. What I would like to have happen is that the popup remain active until the user performs a specific action e.g. presses Alt+F, or whatever. (I have tried both the Show and ShowModal approaches, but they have other problems with things like positioning the popup correctly, multiple copies etc etc. ShowPopup seems to give the best operation so far.) Even getting to the point of only closing the popup if the click is within the main form window would help. Any ideas? tia Bruce Look at the Window.Utility property. Regards, Wonderful! Almost there. The only problem I have left (ha-ha!) is moving the main form to another virtual desktop. In LXDE I can drag the main form to the next or prior desktop (or use the window menu Send to Desktop), I presume that there are equivalent features on other desktops, I've just forgotten. When I do this with the utility window open it moves the main form correctly but leaves the utility on the original desktop. This may be an LXDE or OpenBox issue, but I thought maybe someone has got an idea. tia This may be a window manager issue: on KDE, if you move the main window on another virtual desktop, the utility window follows. Check which gui component you actually use: gb.qt4 or gb.gtk. If you use gb.gui, define the GB_GUI environment variable to gb.qt4 or gb.gtk. The problem may come from that (i.e. the toolkit may not give enough information to the window manager to let him decide what to do with the utility window). On X11, the window manager job is... managing windows. The application must not deal with that. So if the window manager is not very clever, you have problems like that! Yep, it's definitely an LXDE feature. :-( I've tried it in various vm's using different window managers and mainly they work. The utility window follows the main window across the desktops. I think the answer is in your last sentence. The LXDE wm is by design not very clever (actually I'll change that to not too clever, but does expose a lot of portland stuff that can be used). It is a pity that the portland project now seems to be very defunct and each and every distro seems to be creating their own variant of the scripts. On the other hand (!!! :-) )I do like the fact that gambas is carrying its' own portland script versions. This means that I _can_ tailor the (local) gb.desktop versions to work properly without having to muck about with the client's distro version. Let's call this one over and done. cheers Bruce -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349351iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] How to get codelinenumber
On Sat, 2013-11-30 at 09:46 +0100, u...@gmx.ch wrote: Dear Fabien You're my hero. Thanks! The only thing I'm still working on is getting the codelinenumber also in cases without error. System.BackTrace may help here. But I am tired and emotional so check the help. -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349351iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Semi-persistent pop-up form?
On Mon, 2013-11-11 at 22:30 +0100, Benoît Minisini wrote: Le 11/11/2013 21:47, Bruce a écrit : Is there some way to make a popup form only close on a specific user action? In the attached picture, I have a popup form displaying some statistical guff about the data displayed in the main form. (I have pixelised the main form just to highlight the popup.) As per design, as soon as the user clicks on the main form, the popup disappears. In fact, as soon as the user clicks (anything) the popup disappears. What I would like to have happen is that the popup remain active until the user performs a specific action e.g. presses Alt+F, or whatever. (I have tried both the Show and ShowModal approaches, but they have other problems with things like positioning the popup correctly, multiple copies etc etc. ShowPopup seems to give the best operation so far.) Even getting to the point of only closing the popup if the click is within the main form window would help. Any ideas? tia Bruce Look at the Window.Utility property. Regards, Wonderful! Almost there. The only problem I have left (ha-ha!) is moving the main form to another virtual desktop. In LXDE I can drag the main form to the next or prior desktop (or use the window menu Send to Desktop), I presume that there are equivalent features on other desktops, I've just forgotten. When I do this with the utility window open it moves the main form correctly but leaves the utility on the original desktop. This may be an LXDE or OpenBox issue, but I thought maybe someone has got an idea. tia -- Bruce bbr...@paddys-hill.net Paddys-Hill dot net -- November Webinars for C, C++, Fortran Developers Accelerate application performance with scalable programming models. Explore techniques for threading, error checking, porting, and tuning. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60136231iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] App.Major Version
On Fri, 2013-11-08 at 10:37 +0100, Alain Baudrez wrote: Hoi, put those in a class ' Gambas class file : clsVerion ' Version Info ' ' Call as follows: ' DIM cVersion as new clsVersion ' ' Print cVersion.VersionMajor . cVersion.VersionMinor Build # cVersion.Build ' Property Read Version ' Full version eg. 1.2.39 Property Read VersionMajor As String ' Major parteg. 1 Property Read VersionMinor As String ' Minor Parteg. 2 Property Read VersionSmall As String' Major and Minor eg. 1.2 Property Read Build As String' Revision eg. 39 Private Versie As String Public Sub _new() Versie = Application.Version End Private Function Version_Read() As String Return Versie End Private Function VersionMajor_Read() As String Return Left(Versie, InStr(Versie, .) - 1) End Private Function VersionMinor_Read() As String Return Mid(versie, InStr(Versie, .) + 1, RInStr(Versie, .) - InStr(Versie, .) - 1) End Private Function Build_Read() As String Return Right(Versie, RInStr(Versie, .) - 2) End Private Function VersionSmall_Read() As String Return Left(Versie, RInStr(Versie, .) - 1) End ' = End of Class = *Alain J. Baudrez* a.baud...@gmail.com Tel: +32(0)486485080 *Personal Homepage:* http://baudrez.be http://facebook.com/abaudrez - http://twitter.com/abaudrez - http://about.me/abaudrez Webmaster cibliga.be - dierenartsrogiest.be 2013/11/8 Riaan Pretorius pretorius.ri...@gmail.com Good Day, I was wondering if the equivalent of App.Major (vb6) exists in Gambas? Example: ' Visual Basic 6.0 Label1.Caption = Version: App.Major . App.Minor . _ App.Revision Riaan Ow Alain, my poor fingers! How about just Application.Version.Split(.)[0] ' for the major Application.Version.Split(.)[1] ' for the minor Application.Version.Split(.)[2] ' for the revision or for your OP's example Label1.Caption = Version: Application.Version :-) Bruce -- November Webinars for C, C++, Fortran Developers Accelerate application performance with scalable programming models. Explore techniques for threading, error checking, porting, and tuning. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60136231iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] App.Major Version
On Fri, 2013-11-08 at 15:23 +0100, Fabien Bodard wrote: My turn !! Dim aVersion as String[] = scan(sVersion,*.*.*) Print aVersion[0] Work also with split. Ha! Dim aVersion As String[] = Scan(Application.Version, *.*.*) Print aVersion[0] = 48 keystrokes Print Split(Application.Version, .)[0] = 25 keystrokes :-) Bruce -- November Webinars for C, C++, Fortran Developers Accelerate application performance with scalable programming models. Explore techniques for threading, error checking, porting, and tuning. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60136231iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Using a class as a function
I saw an example of how to do this only yesterday. Do you think I can remember where? No. Any clues? Bruce -- November Webinars for C, C++, Fortran Developers Accelerate application performance with scalable programming models. Explore techniques for threading, error checking, porting, and tuning. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60136231iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Using a class as a function
On Tue, 2013-11-05 at 12:34 +0100, Fabien Bodard wrote: In your class : Public sub _Call(value as whatyouwant) as whatyouwant End With that you can do Print Myclass(value) Le 5 nov. 2013 12:10, Bruce bbr...@paddys-hill.net a écrit : I saw an example of how to do this only yesterday. Do you think I can remember where? No. Any clues? Bruce Thanks Fabian, I obviously had too many Australian sparkling white wines this afternoon. Bruce (hic!) -- November Webinars for C, C++, Fortran Developers Accelerate application performance with scalable programming models. Explore techniques for threading, error checking, porting, and tuning. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60136231iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Unexecuted Orphan Code or Something?
On Tue, 2013-11-05 at 06:34 -0800, 2aq9j93b7s wrote: thank you for the replies I appreciate them Unfortunately you are missing the point of the post! I have an uncommeneted line of code that is not and cannot be executed bruce Now do you see why that last line is not executed. My point exactly but when is it executed if at all? To put it plainly, it will never be executed because it is after the quite valid Return command. Private $aChar as String=a Private Sub DoNothing() Dim bChar As String= b Return $aChar=bCar ' plus a whole bunch of further code that will ' never be executed because this Sub has ' already Returned, like Format(Now(),yy-mm-dd) Now() ' etc End Public Sub Main() DoNothing Print $aChar End What you appear to have fallen for is the old putting a comment in the middle of a multiline command. As soon as you do that you have terminated the command and the lines of code after that are never executed because you have already got a valid Return command. Secondly, don't forget that all Gambas functions can be used as subs. So, the things that look like dangling functions in the code above aren't. They are functions used as subs. Bruce -- November Webinars for C, C++, Fortran Developers Accelerate application performance with scalable programming models. Explore techniques for threading, error checking, porting, and tuning. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60136231iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Segfault when freeing pointer used for Extern
Dear experts, Can anyone see what I'm doing wrong here. Source archive is attached, but here is the entire code: -- ' Gambas module file ' void uuid_generate(uuid_t out); Extern UUID_Gen(op As Pointer) As Pointer In libuuid:1 Exec uuid_generate ' void uuid_unparse(uuid_t uu, char *out) Extern UUID_ToStr(ip As Pointer, op As Pointer) As Pointer In libuuid:1 Exec uuid_unparse Public Sub Main() Dim OP As Pointer' ptr to the uuid returned by uuid_generate Dim SP As Pointer' ptr to the string returned by uuid_unparse Dim sOP As String' our result (UUID as a string) Dim rtn As Integer ' int rtn code from extern funcs Dim sArch As String ' system architecture (selects pointer length) sArch = System.Architecture Error Arch= sArch OP = Alloc(IIf(sArch = x86, 4, 8)) SP = Alloc(IIf(sArch = x86, 4, 8)) rtn = UUID_Gen(OP) Error UUID_Gen= rtn rtn = UUID_ToStr(OP, SP) sOP = String@(SP) Error Subst(UUID_ToStr=1\tUUID=2, rtn, sOP) Error Free(OP) Free(SP) End '- the problem happens here -- I get variously a SegFault(11) or an Aborted(6) here. The Segfault shows nothing, but the Abort produces an invalid pointer dump like the following: *** glibc detected *** demoUUID: munmap_chunk(): invalid pointer: 0x0899eba0 *** === Backtrace: = /lib/i686/libc.so.6(+0x72d32)[0xb75ffd32] demoUUID[0x8055232] demoUUID[0x806b872] demoUUID[0x804b3cd] /lib/i686/libc.so.6(__libc_start_main+0xf5)[0xb75a69e5] demoUUID[0x804b40d] === Memory map: 08048000-08094000 r-xp 08:01 818112 /usr/bin/gbx3 08094000-08099000 rw-p 0004c000 08:01 818112 /usr/bin/gbx3 08099000-0809b000 rw-p 00:00 0 08996000-089b7000 rw-p 00:00 0 [heap] 417e7000-417ec000 r-xp 08:01 597595 /usr/lib/libffi.so.5.0.9 417ec000-417ed000 rw-p 5000 08:01 597595 /usr/lib/libffi.so.5.0.9 b69d3000-b69d6000 r-xp 08:01 1112777/lib/libuuid.so.1.3.0 b69d6000-b69d7000 rw-p 2000 08:01 1112777/lib/libuuid.so.1.3.0 b69ff000-b6a0 rw-p 00:00 0 b6a0-b6a07000 r--s 08:01 761994 /usr/lib/gconv/gconv-modules.cache b6a07000-b6a19000 r-xp 08:01 683710 /usr/lib/gambas3/gb.eval.so.0.0.0 b6a19000-b6a1c000 rw-p 00011000 08:01 683710 /usr/lib/gambas3/gb.eval.so.0.0.0 b6a1c000-b721c000 rw-p 00:00 0 b721c000-b738c000 r--p 00334000 08:01 738240 /usr/share/locale/locale-archive b738c000-b758c000 r--p 08:01 738240 /usr/share/locale/locale-archive b758c000-b758d000 rw-p 00:00 0 b758d000-b7734000 r-xp 08:01 1117283/lib/i686/libc-2.16.so b7734000-b7735000 ---p 001a7000 08:01 1117283/lib/i686/libc-2.16.so b7735000-b7737000 r--p 001a7000 08:01 1117283/lib/i686/libc-2.16.so b7737000-b7738000 rw-p 001a9000 08:01 1117283/lib/i686/libc-2.16.so b7738000-b773c000 rw-p 00:00 0 b773c000-b7752000 r-xp 08:01 1112626/lib/i686/libpthread-2.16.so b7752000-b7753000 r--p 00015000 08:01 1112626/lib/i686/libpthread-2.16.so b7753000-b7754000 rw-p 00016000 08:01 1112626/lib/i686/libpthread-2.16.so b7754000-b7756000 rw-p 00:00 0 b7756000-b7759000 r-xp 08:01 1112764/lib/libdl-2.16.so b7759000-b775a000 r--p 2000 08:01 1112764/lib/libdl-2.16.so b775a000-b775b000 rw-p 3000 08:01 1112764/lib/libdl-2.16.so b775b000-b7764000 r-xp 08:01 1112247/lib/libintl.so.8.1.2 b7764000-b7765000 rw-p 9000 08:01 1112247/lib/libintl.so.8.1.2 b7765000-b77a3000 r-xp 08:01 1112624/lib/i686/libm-2.16.so b77a3000-b77a4000 r--p 0003d000 08:01 1112624/lib/i686/libm-2.16.so b77a4000-b77a5000 rw-p 0003e000 08:01 1112624/lib/i686/libm-2.16.so b77a9000-b77c5000 r-xp 08:01 1117309/lib/libgcc_s-4.7.2.so.1 b77c5000-b77c6000 rw-p 0001b000 08:01 1117309/lib/libgcc_s-4.7.2.so.1 b77c6000-b77c8000 rw-p 00:00 0 b77c8000-b77cd000 r-xp 08:01 683612 /usr/lib/gambas3/gb.debug.so.0.0.0 b77cd000-b77ce000 rw-p 4000 08:01 683612 /usr/lib/gambas3/gb.debug.so.0.0.0 b77ce000-b77cf000 rw-p 00:00 0 b77cf000-b77ed000 r-xp 08:01 1112632/lib/ld-2.16.so b77ed000-b77ee000 r--p 0001d000 08:01 1112632/lib/ld-2.16.so b77ee000-b77ef000 rw-p 0001e000 08:01 1112632/lib/ld-2.16.so bff86000-bffa7000 rw-p 00:00 0 [stack] e000-f000 r-xp 00:00 0 [vdso] tia Bruce demoUUID-0.0.1.tar.gz Description: application/compressed-tar -- November Webinars for C, C++, Fortran Developers Accelerate application performance with scalable programming models. Explore techniques for threading, error checking, porting, and tuning. Get the most from the latest Intel processors
Re: [Gambas-user] Segfault when freeing pointer used for Extern
On Wed, 2013-11-06 at 01:07 +0100, Benoît Minisini wrote: What is the exact definition of 'uuid_t' ? From http://linux.die.net/man/3/uuid_unparse The uuid_unparse function converts the supplied UUID uu from the binary representation into a 36-byte string (plus tailing '\0') of the form 1b4e28ba-2fa1-11d2-883f-0016d3cca427 and stores this value in the character string pointed to by out. The case of the hex digits returned by uuid_unparse may be upper or lower case, and is dependent on the system-dependent local default. i.e. it is the 16byte UUID returned by uuid_generate From http://linux.die.net/man/3/uuid_generate The UUID is 16 bytes (128 bits) long, which gives approximately 3.4x10^38 unique values (there are approximately 10^80 elementary particles in the universe according to Carl Sagan's Cosmos). Also, you can use valgrind to know when exactly the faulty memory access occurs. This will give better clues. Could, if I knew how to... :-) The thing is, the extern calls work, it is only when the module exits that the Segfault occurs. So it even looks (to me) like the Free()s work. I have tried using the routine as a function and it works, the problem only happens when the Main() method exits. rgds Bruce -- November Webinars for C, C++, Fortran Developers Accelerate application performance with scalable programming models. Explore techniques for threading, error checking, porting, and tuning. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60136231iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Segfault when freeing pointer used for Extern
On Wed, Nov 6, 2013 at 2:56 AM, Benoît Minisini gam...@users.sourceforge.net wrote: Now your code: -- 8* OP must points at a 16 bytes allocation. So you failed! The library will erase the memory past the allocation, making everything crash sooner or later. OK! Now I understand. rtn = UUID_ToStr(OP, SP) That function returns nothing. I don't know why you think Gambas will make it return something. Moreover, if you read the doc, it tells you that SP must point at a 37 bytes allocation. So you failed again, and the library will erase the memory randomly a second time. Ditto. (Probably didn't look at it closely enough to see the void in the declaration.) You really must know C and how a CPU works to deal with extern functions. Alas, Gambas can't help there! Or, at least, it does as much as he can. Ah there lies the problem! When I learnt programming back in 1972 we had to carve our cpu's out of a lump of granite with a cold chisel, KR hadn't even written troff so I never did get the hang of this newfangled malloc and pointer and c stuff! Let alone c++ :-) On Wed, 2013-11-06 at 03:03 +0200, Jussi Lahtinen wrote: Correct code: 8* Works fine! Thanks Benoît and Jussi, I was fairly sure I had it wrong, I just couldn't see why. Unfortunately since my colleague Keith Lawson passed away I have had to cope with this type of low level issue myself without an expert on tap. At least give me 2 points of credit for working out that the output parameters of the library calls were actually pointers to something. regards Bruce p.s. Just saw Benoît's wiki update notice. Did that page exist before? I spent an hour this morning looking for something like that. -- November Webinars for C, C++, Fortran Developers Accelerate application performance with scalable programming models. Explore techniques for threading, error checking, porting, and tuning. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60136231iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] final error catch
Some where recently I read about something that could catch errors at the top level or something like that. I don't know if it was here or in the help pages or even in the commit logs. Does anyone know what I'm talking about and where I can refind the info? tia Bruce -- Android is increasing in popularity, but the open development platform that developers love is also attractive to malware creators. Download this white paper to learn more about secure code signing practices that can help keep Android apps secure. http://pubads.g.doubleclick.net/gampad/clk?id=65839951iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] final error catch
On Mon, 2013-11-04 at 22:36 +1030, Bruce wrote: Some where recently I read about something that could catch errors at the top level or something like that. I don't know if it was here or in the help pages or even in the commit logs. Does anyone know what I'm talking about and where I can refind the info? tia Bruce Forget it. I found it, it was Global error handler support. in the release notes. Sorry for the noise. B -- Android is increasing in popularity, but the open development platform that developers love is also attractive to malware creators. Download this white paper to learn more about secure code signing practices that can help keep Android apps secure. http://pubads.g.doubleclick.net/gampad/clk?id=65839951iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Unexecuted Orphan Code or Something?
On Mon, 2013-11-04 at 19:53 -0800, 2aq9j93b7s wrote: hello Note: In preview mode this looked like a mess with the html codes so I deleted them. It is a work in progress so I have been cutting, pasting and copying. Note the last line after the commented line - the orphan. The line above the commented code ends the return component. The last line neither displays nor generates an error. It appears to be an ignored orphan. Apparently I forgot to comment the last line out. CASE 2 Return Today Format(Date(Year(Now), Month(Now), iTp1), ) , the Format(Date(Year(Now), Month(Now), iTp1), d) fuFormatSuffix(iTp1) ' Of Format(Date(Year(Now), Month(Now), iTp1), , ) CASE 3 This looks like Today, Monday, the 15th on the screen (minus the html code.). I am sure that it is a bug but I don't know. My last upgrade caused me many problems with previously properly functioning code. Maybe this is something that the menu item /Clean/ did not catch. Anyone? Here's how gambas sees your code CASE 2 Return Today Format(Date(Year(Now), Month(Now), iTp1), ) , the Format(Date(Year(Now), Month(Now), iTp1), d) fuFormatSuffix(iTp1) ' Of Format(Date(Year(Now), Month(Now), iTp1), , ) Paste that in a text editor to see it all exactly. Now do you see why that last line is not executed. hth Bruce -- November Webinars for C, C++, Fortran Developers Accelerate application performance with scalable programming models. Explore techniques for threading, error checking, porting, and tuning. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60136231iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] This d**** keyring thing
Totally unrelated to the packaging issue. Does anyone know of a way to remove a key and all its secrets from the dreaded gnome keyring? tia Bruce -- Android is increasing in popularity, but the open development platform that developers love is also attractive to malware creators. Download this white paper to learn more about secure code signing practices that can help keep Android apps secure. http://pubads.g.doubleclick.net/gampad/clk?id=65839951iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] QT4, weird message and segfault
Suddenly I am getting the following cryptic console message and a segfault on_error_show_modal It is happening in a form button Click event handler when I issue an Error.Propogate in a Catch section of the handler. grepping the source gives [gambassrc]$ grep -r on_error_show_modal * gb.qt4/src/CWindow.cpp [1763]:void on_error_show_modal(MODAL_INFO *info) gb.qt4/src/CWindow.cpp [1765]: qDebug(on_error_show_modal); gb.qt4/src/CWindow.cpp [1829]: handler.handler = (GB_CALLBACK)on_error_show_modal; gb.qt4/src/CWindow.h [246]: friend void on_error_show_modal(MODAL_INFO *info); So, the message comes from gb.qt4/src/CWindow.cpp [1765] i.e. in CWindow.on_error_show_modal(..), the only placed that is called is from gb.qt4/src/CWindow.cpp [1829] i.e. in MyMainWindow::showModal(void). What I can't work out is what it means and what to do about it. Any clues? (Rev 5934) tia Bruce -- Android is increasing in popularity, but the open development platform that developers love is also attractive to malware creators. Download this white paper to learn more about secure code signing practices that can help keep Android apps secure. http://pubads.g.doubleclick.net/gampad/clk?id=65839951iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] The problem with gb.gui, gb.gui.opengl, and gb.desktop.gnome (2)
On Fri, 2013-11-01 at 10:51 +0100, Benoît Minisini wrote: Le 01/11/2013 02:48, Bruce a écrit : On Fri, 2013-11-01 at 11:41 +1030, Bruce wrote: On Fri, 2013-11-01 at 01:44 +0100, Benoît Minisini wrote: Hi, In revision #5924, the IDE generates meta-packages for QT4 and GTK+ support when a project uses the gb.gui component. There is no dependency on the non-existing gb.gui package anymore. Same thing for gb.gui.opengl. So, if the 'foo' project uses gb.gui, the packager will generate the three following packages: - 'foo', the full project will all its dependencies. - 'foo-qt4', a void package that depends on 'foo' and 'gb.qt4'. - 'foo-gtk', a void package that depends on 'foo' and 'gb.gtk'. If 'foo' uses gb.gui.opengl, the corresponding opengl dependencies will be added to the 'foo-qt4' and 'foo-gtk' packages. At the moment, only Debian/Ubuntu has been implemented. Can you test it and tell me if it works for you? I will add the conditional dependency foo-gtk | foo-qt4, but I want to check if it possible with RPM, Arch, and Slackware packages first. Regards, P.S. I admire you and others making binary packages. Playing with debian packaging is like programming the Win32 API with the brainfuck language for me. It took me more than four hours to make these two metapackages without getting a cryptic error. (Purely theoretical given this is all a bit too hard for me) a) where is gb.image going to live? b) if 'foo' uses one of the UI's directly then I presume you would only get (say) foo-gtk. Does that render the entire package unusable on a KDE environment? c) BTW I'll check again, but I seem to recall that the keyring is still there in gtk 3 Another thing just popped into my head. If 'foo' uses gb.qt4.webkit then even if it is explicitly using gb.gui then the gb.gtk component is redundant as the app will always start with gb.qt4 active. I attached a pic to show what I mean. So how far does/will the packager go to resolve that only gb.qt4 is required? If 'foo' uses gb.qt4.webkit, it cannot use gb.gui. No, you missed the point. (I think)... :-) 'foo' is only designed to use gb.gui but it depends on 'ph.auction', which because it relies on gb.webkit must mean that: 1) the package must contain the gb.qt4 component so that the third party component will run 2) but on the other hand, if there is something provided by gb.gui that is internally dependant on the switcher gb.gui say some theoretical thing called gb.gui.beaujolais then both gb.qt4 and gb.gui (and the dreaded beaujolais components must be included. At the moment this all works because the decision as to which gui is used is made by the runtime. So even though 'foo' is using gb.gui something else (ph.auction) it uses depends on and, as you implied, restricting the application to switch to gb.qt4 with no effort on behalf of the programmer or the user. To get a bit clearer, or perhaps even less clear, suppose programmer Adelie has no idea what gui will need to be used for 'foo2' and say for the sake of the argument that they want to use another 3rd party component that we distribute (ph.sales) which in turn is dependant on ph.auction. From the point of view of the IDE, all she needs to do is use gb.gui (and ph.sales) and bingo everything works. Mainly because the runtime resolves all this and decides that the whole project needs to be run using the gb.qt4 component. This is the crux. If you are talking about a packaging system that is only going to base its' decision on what UI component to include on the application level ('foo2'), then how do we resolve a dependency that is (now) two levels away? 'foo2'-- 'gb.gui' -- 'ph.sales' -- ph.auction -- gb.webkit -- gb.qt4 Adelie can't see, and indeed should not need to see, that dependency down the chain. So, how far does the packager need to go to decide whether or not to include/exclude a particular desktop (btw: I hate that word too, it's not a desktop it's a UI at best or a window widget provider.) As I said, purely theoretical because we distribute everything as autotools installers not binaries. It just concerns me that somewhere down the track an assumption could be made that would render even the autotools packaging not-working. (btw: I wish there was a gb.gtk.webkit!) Something to be done, but a big job, because the GTK+ webkit relies on other libraries to handle the network, whereas everything is under the hand with Qt4. Yep, understood. But ... I can still wish can't I? :-) -- Bruce bbr...@paddys-hill.net Paddys-Hill dot net -- Android is increasing in popularity, but the open development platform that developers love is also attractive to malware creators. Download this white paper to learn more about secure code signing practices that can help keep Android apps secure. http
Re: [Gambas-user] The problem with gb.gui, gb.gui.opengl, and gb.desktop.gnome (2)
On Fri, 2013-11-01 at 01:44 +0100, Benoît Minisini wrote: Hi, In revision #5924, the IDE generates meta-packages for QT4 and GTK+ support when a project uses the gb.gui component. There is no dependency on the non-existing gb.gui package anymore. Same thing for gb.gui.opengl. So, if the 'foo' project uses gb.gui, the packager will generate the three following packages: - 'foo', the full project will all its dependencies. - 'foo-qt4', a void package that depends on 'foo' and 'gb.qt4'. - 'foo-gtk', a void package that depends on 'foo' and 'gb.gtk'. If 'foo' uses gb.gui.opengl, the corresponding opengl dependencies will be added to the 'foo-qt4' and 'foo-gtk' packages. At the moment, only Debian/Ubuntu has been implemented. Can you test it and tell me if it works for you? I will add the conditional dependency foo-gtk | foo-qt4, but I want to check if it possible with RPM, Arch, and Slackware packages first. Regards, P.S. I admire you and others making binary packages. Playing with debian packaging is like programming the Win32 API with the brainfuck language for me. It took me more than four hours to make these two metapackages without getting a cryptic error. (Purely theoretical given this is all a bit too hard for me) a) where is gb.image going to live? b) if 'foo' uses one of the UI's directly then I presume you would only get (say) foo-gtk. Does that render the entire package unusable on a KDE environment? c) BTW I'll check again, but I seem to recall that the keyring is still there in gtk 3 -- Bruce bbr...@paddys-hill.net Paddys-Hill dot net -- Android is increasing in popularity, but the open development platform that developers love is also attractive to malware creators. Download this white paper to learn more about secure code signing practices that can help keep Android apps secure. http://pubads.g.doubleclick.net/gampad/clk?id=65839951iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] The problem with gb.gui, gb.gui.opengl, and gb.desktop.gnome (2)
On Fri, 2013-11-01 at 11:41 +1030, Bruce wrote: On Fri, 2013-11-01 at 01:44 +0100, Benoît Minisini wrote: Hi, In revision #5924, the IDE generates meta-packages for QT4 and GTK+ support when a project uses the gb.gui component. There is no dependency on the non-existing gb.gui package anymore. Same thing for gb.gui.opengl. So, if the 'foo' project uses gb.gui, the packager will generate the three following packages: - 'foo', the full project will all its dependencies. - 'foo-qt4', a void package that depends on 'foo' and 'gb.qt4'. - 'foo-gtk', a void package that depends on 'foo' and 'gb.gtk'. If 'foo' uses gb.gui.opengl, the corresponding opengl dependencies will be added to the 'foo-qt4' and 'foo-gtk' packages. At the moment, only Debian/Ubuntu has been implemented. Can you test it and tell me if it works for you? I will add the conditional dependency foo-gtk | foo-qt4, but I want to check if it possible with RPM, Arch, and Slackware packages first. Regards, P.S. I admire you and others making binary packages. Playing with debian packaging is like programming the Win32 API with the brainfuck language for me. It took me more than four hours to make these two metapackages without getting a cryptic error. (Purely theoretical given this is all a bit too hard for me) a) where is gb.image going to live? b) if 'foo' uses one of the UI's directly then I presume you would only get (say) foo-gtk. Does that render the entire package unusable on a KDE environment? c) BTW I'll check again, but I seem to recall that the keyring is still there in gtk 3 Another thing just popped into my head. If 'foo' uses gb.qt4.webkit then even if it is explicitly using gb.gui then the gb.gtk component is redundant as the app will always start with gb.qt4 active. I attached a pic to show what I mean. So how far does/will the packager go to resolve that only gb.qt4 is required? (btw: I wish there was a gb.gtk.webkit!) -- Bruce bbr...@paddys-hill.net Paddys-Hill dot net attachment: third-level-deps.svg-- Android is increasing in popularity, but the open development platform that developers love is also attractive to malware creators. Download this white paper to learn more about secure code signing practices that can help keep Android apps secure. http://pubads.g.doubleclick.net/gampad/clk?id=65839951iu=/4140/ostg.clktrk___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] New custom control List Manager
I have added several other utility components to the website. http://paddys-hill.net/wp/gambas/gambas-components/ -- Bruce bbr...@paddys-hill.net Paddys-Hill dot net -- Android is increasing in popularity, but the open development platform that developers love is also attractive to malware creators. Download this white paper to learn more about secure code signing practices that can help keep Android apps secure. http://pubads.g.doubleclick.net/gampad/clk?id=65839951iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] gb.settings: Detect if a slot exists
On Tue, 2013-10-29 at 13:43 +0100, Tobias Boege wrote: On Tue, 29 Oct 2013, Bruce wrote: I have a need to detect if a particular Slot exists in the .config file for an application. Just the Slot not whether any value lines exist under it. There doesn't seem to be a way to do this via gb.settings? I have tried using If Settings.Keys[Filter] then but this seems always to be true. Similarly If Settings[Filter] then always seems to be false. So is there a way to find out if a Slot does exist? more info - The problem is that the value lines depend on about 8 text boxes set or cleared by the user. If one or more of the text boxes are empty then that value line will not appear under the [Filter] slot. So I can't detect the existence of the slot by detecting a particular value line. In fact if they clear all the filter strings then that whole slot will disappear. Thus I need to check if the slot exists, so then I could If Settings.Exist[Filter] then GetFilterSettings Else SetDefaultFilter Endif Hmm. Settings[Filter] will return Null if the slot does not exist. Note that the slot is also non-existent if you do assign Null like Settings[Filter] = Null which means Settings[sKey] returning Null is a necessary and sufficient indicator that sKey is not a slot in the Settings. So, use If IsNull(Settings[Filter]) Then ' Settings[Filter] does not exist... Endif That is what I thought too but it doesn't work. If the .config is [Filter] filteractive=-1 then isNull(Settings[Filter]) will always be true as Settings will always return a null if the key is a slot not a value. My problem is that if no Filter/things are set, when the settings are saved then the entire slot disappears from the .config file. in case you want to do something when the Filter key does not exist. Regards, Tobi I have figured out a workaround, but its messy and fragile. I create a dummy boolean valueitem called filtered. I set it true if any filters are set and false if none are set. It is fragile because I do not know at the time I close down the app how many filter things there are. So each bit of code that creates or sets a filter item must manage a global boolean value (and thus it is fragile because it involves each bit checking on all other filter items). But at least that way I always will have a [Filter] slot with at least one valueitem in it. -- Bruce bbr...@paddys-hill.net Paddys-Hill dot net -- Android is increasing in popularity, but the open development platform that developers love is also attractive to malware creators. Download this white paper to learn more about secure code signing practices that can help keep Android apps secure. http://pubads.g.doubleclick.net/gampad/clk?id=65839951iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] gb.settings: Detect if a slot exists
On Tue, 2013-10-29 at 13:38 +0100, Charlie Reinl wrote: Am Dienstag, den 29.10.2013, 13:57 +1030 schrieb Bruce: I have a need to detect if a particular Slot exists in the .config file for an application. Just the Slot not whether any value lines exist under it. There doesn't seem to be a way to do this via gb.settings? I have tried using If Settings.Keys[Filter] then but this seems always to be true. Similarly If Settings[Filter] then always seems to be false. So is there a way to find out if a Slot does exist? more info - The problem is that the value lines depend on about 8 text boxes set or cleared by the user. If one or more of the text boxes are empty then that value line will not appear under the [Filter] slot. So I can't detect the existence of the slot by detecting a particular value line. In fact if they clear all the filter strings then that whole slot will disappear. Thus I need to check if the slot exists, so then I could If Settings.Exist[Filter] then GetFilterSettings Else SetDefaultFilter Endif Salut Bruce, Settings.Read (gb.settings) Sub Read ( hObject As Object [ , sKey As String, vDefault As Variant ] ) Settings(Filter, GetFilterSettings, SetDefaultFilter) or Public Function KeyExists(objSetting As Settings, sFindKey As String) As Boolean Dim sKey As String Dim bRet As Boolean bRet = False For Each sKey In objSetting.Keys If sKey = sFindKey Then bRet = True Break Endif Next Return bRet End Hmm. You second idea works, but I was trying to avoid that as I will be calling it multiple times, at least once for each filter item that gets defined. But it might be better than the messy solution I just posted back to Tobi. -- Bruce bbr...@paddys-hill.net Paddys-Hill dot net -- Android is increasing in popularity, but the open development platform that developers love is also attractive to malware creators. Download this white paper to learn more about secure code signing practices that can help keep Android apps secure. http://pubads.g.doubleclick.net/gampad/clk?id=65839951iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Conflicting and bewildering help for pipes
On Wed, 2013-10-30 at 00:00 +0100, Benoît Minisini wrote: Le 29/10/2013 23:12, Tobias Boege a écrit : On Fri, 25 Oct 2013, Beno?t Minisini wrote: Le 24/10/2013 15:08, Tobias Boege a ?crit : My workaround always was like this: ' Create the read pipe special file hGPstdout = Pipe /tmp/gnuplotFIFO2 For Write Close #hGPstdout ' Create write end hGPpipe = Pipe /tmp/gnuplotFIFO1 For Write ' Start writer hGPproc = Shell gnuplot /tmp/gnuplotFIFO1 /tmp/gnuplotFIFO2 ' Really create read end hGPstdout = Pipe /tmp/gnuplotFIFO2 For Read Watch Note that since the shell which starts hGPproc already opened /tmp/gnuplotFIFO2, you won't have any deadlock problems when opening hGPstdout For Read afterwards. Anyway, if I Print #hGPpipe, plot x^2 only garbage (not non-sense but the string is always scrambled) seems to arrive at gnuplot. Also, I seem to get output from gnuplot irregularly. So I'm out of options for now. I remember that raising Read events for streams has been subject to issues from time to time... Regards, Tobi Please give details. I tried what you said (but plot x*x because plot x^2 seems to not be the good syntax), and I always got the plot as expected. OK. The attached project gives the following output after I pressed Button1 four or five times: --- Read line 0: non-integer passed to boolean operator Read gnuplot lot x^1 ^ line 0: invalid command Read gnuplot pot x^1 ^ line 0: Readinvalid command Read gnuplot lotx^1 ^ line 0: invalid command Read gnuplot plp plot x^1 ^ Readline 0: invalid command --- You can see that in each message, one character is missing so that plot is lot or pot or lot again. The missing characters plp appear in the last message, totally mis-placed. Am I maybe reading incorrectly from the pipe? Regards, Tobi Spoke too fast. Now I have the same output as you (more or less)... OK, I have made a few changes to plotdoc (attached). This version makes a plot and lets us interact with it. Notes: 1) sending the show all command gets us lots of text back from gnuplot and it all appears to be contained within my Read [ and ] ..done tags. So it looks as though we are getting (stdout) text back properly. 2) one thing I have found with gnuplot is that you must tell it to quit or you end up with zombie tasks. (In fact this was the main reason I started using pipes.) 3) when you run this plotdoc put the mouse over the plot window and try [Shift]+[Ctrl]+[mouse wheel] - Now we see the junk appearing. But it is all inside Read [, ] ..done pairs, so it looks as though gnuplot either sends the errors back through stdout or that we are already getting stderr inside the pipe. 4) if you just run gnuplot within a terminal, plot sin(x) and use the mousewheel there is no junk output. Maybe its gnuplot that has got a problem when it is run from some other task??? -- Bruce bbr...@paddys-hill.net Paddys-Hill dot net gnuplotter-0.0.1.tar.gz Description: application/compressed-tar -- Android is increasing in popularity, but the open development platform that developers love is also attractive to malware creators. Download this white paper to learn more about secure code signing practices that can help keep Android apps secure. http://pubads.g.doubleclick.net/gampad/clk?id=65839951iu=/4140/ostg.clktrk___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user