Re: [Gambas-user] Can't open Console or Find Results
On 1/17/23 07:57, Jorge Carrión wrote: With Gambas 3.18 I can't see the Console, the Notes or the Find Results. All I get with F11 key is a Toggled "Console" button in the Bottom bar of Editor. It's only me or its a bug? I can toggle Console and Notes normally without issue. I do not see any "Find Results". -- Lee [System] Gambas=3.18 OperatingSystem=Linux Kernel=5.14.21-150400.24.38-default Architecture=x86_64 Distribution=openSUSE Leap 15.4 Desktop=KDE Font=Noto Sans,10 Scale=7 Theme=breeze Language=en_US.UTF-8 Memory=15922M ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] QR Codes
On 7/28/21 9:36 PM, richard terry wrote: Hi list, Is it possible to generate a QR code image from gambas? Thanks Richard You could shell out to the 'qrencode' command-line utility. Or, look on the Gambas Farm for "QRCreator". -- Lee ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] webpage editor
This is a discussion list. Everyone subscribed to the list gets every message sent to the list. How was the message misrouted? BTW, this particular list is deprecated. Subscription to the new list is at: https://lists.gambas-basic.org/listinfo/user On 10/8/19 11:47 AM, Antonis wrote: Dear Mr. Benoît, I'm afraid that your below email was misrouted to wrong recipient. -Original Message- From: Benoît Minisini [mailto:g4m...@gmail.com] Sent: Tuesday, 8 October, 2019 12:09 To: mailing list for gambas users Subject: Re: [Gambas-user] webpage editor Le 08/10/2019 à 10:56, Mayost Sharon a écrit : Hello Thank you I guess because I'm translating through Google into English so I'm not well understood, I'm sorry. I'm not talking about the bold text I'm talking about, adding space character, and it spoils the HTML code For example: <% Dim sEnv As String %> But if I lower the% at the end For example: <% Dim sEnv As String < html > < / html > Look, this adds a space character Of course, this is not HTML anymore, but Gambas code. But why do you want to remove the "%" in the first place, and then move the cursor to another line? ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Custom Control Icon
You sent your message to the old Gambas Mailing List which has been deprecated. I don't know what happened to the auto-reply informing of such. Anyway, here's the new list's subscribe form: https://lists.gambas-basic.org/listinfo/user ___ Lee On 4/4/19 4:57 AM, bill-lancaster wrote: I haven't yet been able to install the control's icon successfully. I have installed an icon in the .hidden/control folder of the project but the icon shown in collection of controls is a default one with no icon. Any advice would be welcome Kubuntu 18.04 Gambas 3.12.2 -- Sent from: http://gambas.8142.n7.nabble.com/gambas-user-f3.html ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Loop variable question
Also, I didn't notice when I replied, but thanks to the Autoresponse from the list: This mailing-list is deprecated. Please now subscribe to https://lists.gambas-basic.org/listinfo/user ___ Lee On 2/5/19 2:35 AM, T Lee Davidson wrote: Project > Properties > Statistics ? ___ Lee On 2/5/19 12:03 AM, richard terry wrote: Thanks, I suspected as much. Sadly, its not a short process - I'd hate to think how many thousands of lines of code... will take me weeks I guess. BTW anyway of quickly counting how many forms/modules etc and lines of code in a project? Regards richard ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Loop variable question
Project > Properties > Statistics ? ___ Lee On 2/5/19 12:03 AM, richard terry wrote: Thanks, I suspected as much. Sadly, its not a short process - I'd hate to think how many thousands of lines of code... will take me weeks I guess. BTW anyway of quickly counting how many forms/modules etc and lines of code in a project? Regards richard ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] How to Change Keyboard Layout
I did not notice, and perhaps you didn't either Charlie, that this is the DEPRECATED Gambas list. The new (User) list registration is at https://lists.gambas-basic.org/listinfo ___ Lee On 10/2/18 8:08 AM, Charlie Ogier wrote: > If you are using *buntu/Mint etc (and maybe other distros) you could try > this: - > > *Public Sub Form_Open()** > **Dim sKBFile As String[] = Split(File.Load("/etc/default/keyboard"), > gb.NewLine)** > **Dim sLine As String ** > ** > **For Each sLine In sKBFile** > ** If sLine Begins "XKBLAYOUT" Then **Print sLine** > **Next** > ** > End > * > Output using a UK (gb = Great Britain) keyboard is: - > > *XKBLAYOUT="gb" > > *Charlie* > * > > > On 01/10/18 22:01, Wael M via Gambas-user wrote: >> thank you very much Lee >> you solved it >> >> I used: >> Desktop.SendKeys("[Alt_L] + [Shift_L]") >> >> so another problem appeared, >> I need to detect if language is Arabic or English >> I can't find a solution for that >> Can you help me? >> >> >> On Mon, 10/1/18, T Lee Davidson wrote: >> >> Subject: Re: [Gambas-user] How to Change Keyboard Layout >> To: gambas-user@lists.sourceforge.net >> Date: Monday, October 1, 2018, 9:45 PM >> Perhaps Desktop.SendKeys ? >> ___ >> Lee >> On 10/1/18 >> 12:42 PM, WAEL via Gambas-user wrote: >> > >> Hello >> > I'm trying to change system >> keyboard layout by pressing a key >> > I >> can't find the right code for doing so >> > please help >> > I usually >> press Alt+Shift to change keyboard from English to Arabic >> and vice >> > versa, but I need to program >> it to a button in my project >> > I tried: >> > system.language ="ar-EG" >> > but it would change system locale not the >> keyboard layout >> > I tried to code >> Alt+Shift in a button but also didn't work >> > any ideas please... >> > >> > >> > >> > -- >> > Sent from: http://gambas.8142.n7.nabble.com/gambas-user-f3.html >> > >> > >> > >> ___ >> > Gambas-user mailing list >> > Gambas-user@lists.sourceforge.net >> > https://lists.sourceforge.net/lists/listinfo/gambas-user >> > >> ___ >> Gambas-user mailing list >> Gambas-user@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> >> >> ___ >> Gambas-user mailing list >> Gambas-user@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user > > > ___ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] How to Change Keyboard Layout
Perhaps Desktop.SendKeys ? ___ Lee On 10/1/18 12:42 PM, WAEL via Gambas-user wrote: > Hello > I'm trying to change system keyboard layout by pressing a key > I can't find the right code for doing so > please help > I usually press Alt+Shift to change keyboard from English to Arabic and vice > versa, but I need to program it to a button in my project > I tried: > system.language ="ar-EG" > but it would change system locale not the keyboard layout > I tried to code Alt+Shift in a button but also didn't work > any ideas please... > > > > -- > Sent from: http://gambas.8142.n7.nabble.com/gambas-user-f3.html > > > ___ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Editing still blocked
On 06/04/2018 12:26 PM, Carlos Valente wrote: > I'm going through the same problem. I use Ubuntu 16.04.4 and the Gambas > version is 3.11.90 > This mailing list is deprecated. See the new lists at: http://lists.gambas-basic.org/listinfo -- Lee -- 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] Format function changes date value
CDate uses UTC and, without the time information in the string, it would store midnight. Format uses local time. So, anyone in a time zone behind UTC will get the previous day printed. Try this format string: zTestResult = Format(CDate(zTestDate), "mm/dd/yy hh:nn ddd") Does the difference in hours match your timezone offset? -- Lee On 05/19/2018 09:08 AM, Gianluigi wrote: > I think it depends on your version of Gambas, I get the correct result with > the master: > > Dim zTestDate As String > Dim zTestResult As String > zTestDate = "5/4/2018" > zTestResult = Format(CDate(zTestDate), "mm/dd/yy ddd") > Debug "Test date: " & zTestDate & " Formatted: " & zTestResult > '' Result: Main.Main.9: Test date: 5/4/2018 Formatted: 05/04/18 ven > > Regards > Gianluigi -- 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] What is wrong with my query syntax?
Hi Doug, I think someone may have inadvertently confused you.is where you *should* have started the thread, and not on this one. This list, , is deprecated. You were correct to begin with. -- Lee On 12/30/2017 12:43 AM, Doug Hutcheson wrote: > Hi everyone. This is carried over from the thread I should not have > started at , for which I apologise. -- 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] Gambas not starting
Shouldn't we be using the new Gambas mailing list at http://lists.gambas-basic.org/ ? -- Lee On 11/10/2017 05:55 PM, Bruce Cunningham wrote: 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 Cunninghamwrote: 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 -- 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] Cannot find Gambas on Suse Leap 42.2
On 10/30/2017 12:48 PM, Benoît Minisini wrote: Le 30/10/2017 à 17:09, Rolf-Werner Eilert a écrit : I had it installed twice on two different systems, but on the third one, it suddenly doesn't appear anymore. Yast as well as zypper don't want to know it anymore. I looked on the website 1-click-install and downloaded a package from "education", but it does not contain gbs3 for instance. In this case, I urgently need gbs3. Has someone an idea why I do not find the complete package? Thanks !!! Rolf Please stop using the old mailing-list, and use the new one instead. Regards, Oh gosh, I didn't even realize the source when I replied. Rolf, Here's the link to get subscribed to the new list: http://lists.gambas-basic.org/listinfo/user Or, send email to u...@lists.gambas-basic.org -- Lee -- 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] Cannot find Gambas on Suse Leap 42.2
On 10/30/2017 12:09 PM, Rolf-Werner Eilert wrote: I had it installed twice on two different systems, but on the third one, it suddenly doesn't appear anymore. Yast as well as zypper don't want to know it anymore. I looked on the website 1-click-install and downloaded a package from "education", but it does not contain gbs3 for instance. In this case, I urgently need gbs3. Has someone an idea why I do not find the complete package? Thanks !!! Rolf The gambas3-script sub-package provides /usr/bin/gbs3.gambas which is symlinked from /usr/bin/gbs3. To verify that, on the software search page under Gambas3, click on "Show 101 Sub-Packages". Scroll down to the bottom and click "script". (I'm not sure why "scripter" is even listed.) And, yes, this is in the Education repository. You can also try the Packman repository: http://packman.links2linux.de -- Lee -- 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] config -C is not finding some files installed on my system
You located the gb.gsl component files only. These files mentioned (gsl_cblas.h, gsl_math.h, libgslcblas.so, libgsl.so) are system/distribution GSL headers and libraries. Try "locate gsl_". You may need to ensure the GSL development package is installed. -- Lee On 09/17/2017 09:07 PM, Doug Hutcheson wrote: I am trying to compile Gambas downloaded from Git the other day and config is failing to find files that exist on my system, causing a number of modules to be disabled. For example, the output of config includes these lines:-- - ---checking for gb.gsl component with pkg-config... noconfigure: WARNING: Unable to met pkg-config requirement: gslchecking for gb.gsl headers... ./configure: line 18086: gsl-config: command not foundnoconfigure: WARNING: Unable to find file: gsl/gsl_cblas.hconfigure: WARNING: Unable to find file: gsl/gsl_math.hchecking for gb.gsl libraries... ./configure: line 18234: gsl-config: command not foundnoconfigure: WARNING: Unable to find file: libgslcblas.soconfigure: WARNING: Unable to find file: libgsl.soconfigure: WARNING: gb.gsl is disabled-- Yet all the files mentioned do exist; - - $ locate gb.gsl /usr/lib64/gambas3/gb.gsl.component /usr/lib64/gambas3/gb.gsl.la /usr/lib64/gambas3/gb.gsl.so /usr/lib64/gambas3/gb.gsl.so.0 /usr/lib64/gambas3/gb.gsl.so.0.0.0 /usr/share/gambas3/info/gb.gsl.info /usr/share/gambas3/info/gb.gsl.list $ locate gsl-config /usr/bin/gsl-config - - And so on. What have I done wrong? "8-( Kind regards, Doug -- 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
Re: [Gambas-user] New domain name for Gambas
On 09/01/2017 05:13 PM, Adrien Prokopowicz wrote: Personally I've been thinking about something like gambas-basic or gambas-lang. This way it's much more readable and easy to type in. gambas-basic is good. I like gambas-lang better. -- Lee -- 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] \r\n and \n
On 08/27/2017 04:18 PM, Jussi Lahtinen wrote: See the attached project. I'm not sure whether this is feature or bug, but I would appreciate explanation for it. I expect to get string ending with \n, but I always get it ending with \r\n. Why? Jussi Don't know, Jussi. I get "test\n" on every iteration. -- Lee -- 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] Switching to GitLab
"git - the simple guide" : https://rogerdudler.github.io/git-guide/ (Geared toward GitHub but still applicable and quite simple.) "Understanding Git Conceptually" : https://www.sbf5.com/~cduan/technical/git/ "Pro Git" : https://git-scm.com/book/en/v2 (More comprehensive since it's an online HTML book.) -- Lee On 08/23/2017 08:56 AM, Jussi Lahtinen wrote: Thanks for all the answers. I was hoping something more automatic. I find these commands: git fetch --all git reset --hard origin/master Are there any side effects? I don't really know how git works and thus I don't quite understand what they do. I should learn the basics, but it seems to be thing which I have problems to concentrate. Anyone knows good graphical presentation of how git works in principle? Jussi On Wed, Aug 23, 2017 at 3:03 PM, PICCORO McKAY Lenzwrote: yeah, but with statch you need firs made it a "mark" i that case he dont have that mark Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com 2017-08-23 5:37 GMT-04:00 Fabien Bodard : or maby statch ? 2017-08-23 2:29 GMT+02:00 PICCORO McKAY Lenz : sorry to overriding local change u must get back : git checkout -- git fetch;git pull Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com 2017-08-22 16:38 GMT-04:00 Jussi Lahtinen : How do I update sources overwriting local changes? Jussi On Sun, Aug 20, 2017 at 11:38 PM, Jussi Lahtinen < jussi.lahti...@gmail.com wrote: OK, that solves the problem. Thanks! Jussi On Sun, Aug 20, 2017 at 11:22 PM, Adrien Prokopowicz < adrien.prokopow...@gmail.com> wrote: Le Sun, 20 Aug 2017 20:31:11 +0200, Jussi Lahtinen < jussi.lahti...@gmail.com> a écrit: How do you get the change log with git? "git log" shows only one change (most recent?). Is this because I cloned the sources with "git clone --depth=1 https://gitlab.com/gambas/gambas.git;? Even when I want only the latest dev version, I would still like to know what has changed. It's quite important if you do bug hunting. Jussi Yes, when you use --depth=1, you only retrieve the latest commit, so it can't know about anything past it. If you want to have the information locally, you can use the following : git fetch --unshallow It will retrieve the missing pieces and you will end up with a full clone, as if you just ran git clone without the --depth argument. You can also view the latest commits directly on gitlab here : https://gitlab.com/gambas/gambas/commits/master … or as a RSS feed here : https://gitlab.com/gambas/gambas/commits/master?format=atom If you have a Gitlab account, you can also configure it so it will send you email notifications when something happens on the repository. -- Adrien Prokopowicz -- 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 -- Fabien Bodard -- 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
Re: [Gambas-user] Mailinglist
On 08/19/2017 05:42 AM, Benoît Minisini via Gambas-user wrote: Le 19/08/2017 à 08:13, Christof Thalhofer a écrit : Am 18.08.2017 um 17:09 schrieb Benoît Minisini via Gambas-user: Does GitLab plan to offer a mailing-list feature? I will pray for that. Maybe its better not to rely to one vendor only. Why not switching over to a vendor for mailinglists like https://www.freelists.org/about.html I send them a request for a new Gambas mailing-list. or ... make a subdomain list.gambaswiki.org and host a mailinglist by self? Thats not rocket science. Yes, but it takes time to deal with. The latter is sth I could do, as I already host gambas-club.de at my hosting provider. As I can see the traffic the Gambas lists creates is not a big problem. But I'm in holliday right now. Alles Gute Christof Thalhofer OK, thanks. I will wait for your return. If anyone has ideas about how and where to host at least two mailing-lists, you are welcome! Regards, There may be reason to be concerned about the long-term reliability of freelists.org. They use three different free software packages, two of which haven't been updated in over three years and the third's website doesn't even load. The Gambas community might be better served by setting up Mailman at something like list.gambaswiki.org as suggested; even though Mailman setup does not, at first glance, appear simple and would take an initial time investment. -- Lee -- 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] Shell command formating
On 08/06/2017 09:52 PM, Shane wrote: So again on the shell command I have this code Dim result As String Dim command As String path = File.SetExt(file_name, "ihx") command = "stm8flash -c stlinkv2 -p " & stmdevice & " -w " & path Shell command To result FMain.TextArea1.Text = result but the output is going to stdout and not the result String i know it to do with the command string but now do you set it up ? Thanks Shane.. Perhaps the output is actually going to stderr for some silly reason. Maybe try redirecting stderr to stdout: command = "stm8flash -c stlinkv2 -p " & stmdevice & " -w " & path & " 2>&1" -- Lee -- 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] UDP-Socket-Client
On 08/04/2017 11:33 AM, Hans Lehmann wrote: Hello. Does anyone have any experience how to query with a UDP socket client on port 123 the time from a time server? A socket client on port 37 will work correctly, but only the seconds since 1.1.1900 will be returned. This accuracy is not enough. Sincerely Hans I assume you mean that you need (not necessarily greater accuracy which is dependent upon the server, but) greater precision by retrieving also the fractional part of the seconds since the NTP epoch? No real-world, production experience here, but have a look at the attached example. -- Lee ntpexample-0.0.1.tar.gz Description: application/gzip -- 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] reading files
On 07/16/2017 06:57 AM, Shane wrote: given this example PRIVATE SUB BinaryRead(FilePath AS String) DIM binaryFile AS File DIM i AS Integer DIM b AS Byte DIM s AS Short DIM s1 AS String DIM s2 AS String ' Read binary file binaryFile = OPEN FilePath FOR READ READ #binaryFile, i READ #binaryFile, b READ #binaryFile, s READ #binaryFile, s1 READ #binaryFile, s2 CLOSE #binaryFile ' Display results PRINT i PRINT b PRINT s PRINT s1 PRINT s2 END is there a way for gambas to read a struct of all these variables in one read ? You may have hinted at the solution within your question. Have you considered using a Structure? http://gambaswiki.org/wiki/lang/read : "... reads the stream Stream as binary data whose type is specified by the Datatype argument." "The returned datatype can be one of the following: NULL, Boolean, Byte, Short, Integer, Long, Pointer, Single, Float, Date, String, Variant, any Array, Collection or structure." http://gambaswiki.org/wiki/lang/structdecl -- Lee -- 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] usage of too much GOTO can be bad pracitce ?
Lenz McKAY Gerardo, Please check your spelling before posting a message to the list. Most email clients have a built-in spell checker. And, it just might help us better understand what you are saying, especially given that English is obviously not your first language. Thanks. -- Lee On 06/25/2017 09:15 AM, PICCORO McKAY Lenz wrote: niger, please when edited the Subject *mantain* the original *suject*.. if users want to automatically response in *conversatin* any mail from gambas, please disable digest mode and use *dary* mode.. each mail will coming *separatelly* this its very usefully for gmail like *inbos* where each mail are in-conversation mode... for *separing* mails use labels.. Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com [emphasis added] -- 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] Using a relative file path for a WebView URL
wvwPage.HTML = File.Load(path &/ "index.html") ? On 06/02/2017 08:57 PM, adamn...@gmail.com wrote: I am trying to get a WebViewer control in a loaded library to display an html file stored inside the executable archive of a project using that library. This appears to be not possible ... in the following the main project is calling the library form Run method with a relative path say "../help/html/index.html" (Note the use of the ../ to get the calling programs executable relative path!). The library code is as follows: Public Sub Run (path As string) If Exist(path &/ "index.html") Then Debug path &/ "index.html exists" wvwPage.URL = path &/ "index.html" Debug wvwPage.URL FHSView.Run.10: ../help/html/index.html exists FHSView.Run.13: file:///home/ksshare/gb3projects/Tools/help/html/index.html From the above debug output it appears that the WebView control is "subverting" the actual path back into an absolute path. Any comments? I think I can extract the entire help directory out of the calling program's executable into the /tmp dir, but I think that then I will have to edit every link in the pages to a path relative to the /tmp dir. Painful! Has anyone got any better ideas? bruce -- Lee -- 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] How to enumerate through SQL Result (was Re: Gambas-user Digest, Vol 132, Issue 29)
On 05/25/2017 05:24 AM, Unaise EK wrote: > this is my code for displaying data in listbox, but it did not working, pls > help > > Public Procedure AddList() >Dim ListQurey As String >Dim Lresult As Result > >ListQurey = "SELECT name FROM name_tbl" >Lresult = MODMain.MyConn.Exec(ListQurey) >If Lresult.Count > 0 Then >* Do While Not Eof(Lresult)* >ListBox1.Add(Lresult!"name") >Lresult.MoveNext > Loop >Endif > > End I don't know why you are trying to use Eof() on a SQL Result. Eof is for a Stream. See: http://gambaswiki.org/wiki/comp/gb.db/result "This class is enumerable with the FOR EACH keyword." And, I believe 'ListBox1.Add(Lresult!"name")' should be 'ListBox1.Add(Lresult!name)' or 'ListBox1.Add(Lresult["name"])'. Also, please try to compose meaningful subject lines by creating a _new_ message instead of simply replying to a message that is not related to your issue. That helps those who view list messages in threaded mode. TIA. -- Lee -- 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] An Issue With Shell command and sudoers rules
Disable (ie. comment out) targetpw and the "ALL ALL=(ALL) ALL" line in /etc/sudoers. Then you should probably allow regular users to execute only certain commands with something like: %users ALL=/home/adminuser/bin/comando.sh or a special group for 'privileged' users: %wheel ALL=/home/adminuser/bin/comando.sh See: https://www.novell.com/support/kb/doc.php?id=7002705 -- Lee On 05/25/2017 05:13 AM, Jorge Carrión wrote: > Oh... well, I'm afraid that I've a mistake. > > All of this isn't a gambas issue. > > BUT if someone knows a way to let a non-sudoer user to update the system > without know the admin password I'll be very grateful . > > Sorry for the noise. > > Best Regards -- 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] gb.debug: Unable to open fifo
On 05/23/2017 06:07 PM, Tobias Boege wrote: > On Tue, 23 May 2017, T Lee Davidson wrote: >> Hello folks, >> >> I am trying to see if gb.debug will help me diagnose why HttpClient does not >> properly expose redirect response codes on my >> system (and reportedly Tobi's system) while it does so correctly on Benoît's >> system. >> >> However, the documentation for gb.debug is so sparse that I am having to >> experiment and, of course, having a problem. >> >> With the following command-line application code (using the gb.debug >> component): >> ' Gambas module file >> >> Public Sub Main() >> >> Dim sName As String >> >> sName = Debug.Begin() >> Print sName >> Debug.Start ' Unable to open fifo >> Debug.Write("Hello world") >> Debug.Stop >> Debug.End >> >> End >> >> Public Sub Debug_Read(Data As String) >> >> Print Data >> >> End >> ' End Gambas module file >> >> Debug.Start causes an exception: "Unable to open fifo". By looking in >> /tmp/gambas.1000/, I can see that the process id input and >> output pipes are successfully created with the correct file mode permissions >> (600) for my user as owner. But, the Start >> procedure apparently cannot open the output fifo (ref. >> https://sourceforge.net/p/gambas/code/HEAD/tree/gambas/trunk/main/lib/debug/CDebug.c). >> >> Am I attempting to use this component incorrectly? >> > > I think you're attempting to use the wrong component. gb.debug is meant for > the Gambas IDE to debug a Gambas project. You can look at the source code of > the IDE to try to figure out how to use it. I don't understand its protocol > at all. My wild guess is that your error comes from not having started the > application in debug mode (gbx3 -g)? > > In any case, I doubt debugging your *Gambas* code will give you any insight > into the gb.net.curl issue, as gb.net.curl and curl itself are not written > in Gambas. > > Regards, > Tobi > Thank you for your response, Tobi. I was actually running the application from within the IDE. Making an executable and then executing that with "gbx3 -g" resulted in: Welcome to the Gambas debugger. *[15488]? followed by the greater-than symbol () which is obviously an input prompt. "OK, now what?" (Since I find no documentation for gbx3.) Typing "help" at the prompt gave, "W Unknown command: help". Hmmm ... maybe "step"? Ooo, that does something: step *[15488]Main.Main.7 sName S: s: step *[15488]Main.Main.8 sName S: s: step 15488 *[15488]Main.Main.9 sName S: s: step *[15488]Unable to open fifo Main.Main.9 sName S: s: And I discovered that there is a "quit" command that works too. Given that Debug.Begin creates pipe files named according to the current process' ID (PID) and that the IDE and the executable would always have different PIDs, I cannot fathom how the two could "talk". Nor do I, at this point, have any clue whatsoever how the gb.debug component is intended to be used. I was hoping it might give me access to the running properties of the HttpClient object. But, I am not going to spend any more time on this groping in the dark. I'll just have to look in a different direction, or wait until the issue somehow magically fixes itself. -- Lee -- 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] XMLRPC-Server
On 05/24/2017 04:52 AM, Hans Lehmann wrote: > > Hello Lee, >> RpcServer.Listen relies on ServerSocket which is part of the gb.net >> component. The documentation does not specify that gb.net is >> required for gb.xml.rpc, but it apparently is. > That's exactly. The missing components were added. Thanks for the hint. > The source code for the XMLRPC client and the XMLRPC server is attached. The > project works - but unfortunately not as a web > service - only locally. Where is the error? What should I do? > > Sincerely > Hans Hi Hans, The commonly used term, "web service", can be a bit misleading since not all services accessible over the web (internet) are necessarily served by a _web_ server. The gb.xml.rpc component is not designed to run 'through' a web server in the same manner that PHP web services do. This means that, in this case, the RPC service cannot be called simply by fetching a file. The service must _first_ be started on whatever machine is acting as the server. Then, a request can be made to the service, already listening on a specific port, by making a call to it in the form of http://ip_address:port. (PHP scripts must be executed by a web server which means the server is already running.) If you are wanting to be able to access an actual web service (PHP-style), then I believe you are using the wrong component(s). In that case, you should probably use gb.web for the server side and gb.net.curl's HttpClient for the client side. Your client/server application does indeed work just fine (even without gb.web and gb.net.curl), provided the server is started prior to making the call. -- Lee -- 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] gb.debug: Unable to open fifo
Hello folks, I am trying to see if gb.debug will help me diagnose why HttpClient does not properly expose redirect response codes on my system (and reportedly Tobi's system) while it does so correctly on Benoît's system. However, the documentation for gb.debug is so sparse that I am having to experiment and, of course, having a problem. With the following command-line application code (using the gb.debug component): ' Gambas module file Public Sub Main() Dim sName As String sName = Debug.Begin() Print sName Debug.Start ' Unable to open fifo Debug.Write("Hello world") Debug.Stop Debug.End End Public Sub Debug_Read(Data As String) Print Data End ' End Gambas module file Debug.Start causes an exception: "Unable to open fifo". By looking in /tmp/gambas.1000/, I can see that the process id input and output pipes are successfully created with the correct file mode permissions (600) for my user as owner. But, the Start procedure apparently cannot open the output fifo (ref. https://sourceforge.net/p/gambas/code/HEAD/tree/gambas/trunk/main/lib/debug/CDebug.c). Am I attempting to use this component incorrectly? --- Lee -- 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] XMLRPC-Server
Hello Hans, RpcServer.Listen relies on ServerSocket which is part of the gb.net component. The documentation does not specify that gb.net is required for gb.xml.rpc, but it apparently is. On 05/23/2017 07:55 AM, Hans Lehmann wrote: > Hello, > > I'm currently experimenting with the gb.xml.rpc component. An XMLRPC client > works well (see archive attached). Now I would like > to offer on the installed Web server Lighttpd (under Mint 17.1) a webservice > (XMLRPC server) and via the XMLRPC client call. The > following source code for the XMLRPC server provides an error in line ***. > Can someone help me? > > Hans > > ' Gambas module file > > Public hXMLRPC As RpcServer > > Public Sub Main() > >Dim hXMLRPCFunction As RpcFunction >Dim iXMLRPCPort, iXMLRPCServerMaxConnections As Integer > >hXMLRPC = New RpcServer As "hXMLRPC" >iXMLRPCPort = 9009 >iXMLRPCServerMaxConnections = 1 > >hXMLRPCFunction = New RpcFunction("add2integer", [XmlRpc.xInteger, > XmlRpc.xInteger], XmlRpc.xInteger) > ' hXMLRPCFunction.Help = ("Addition of 2 integers") >hXMLRPC.Register(hXMLRPCFunction) > >Try hXMLRPC.Listen(iXMLRPCPort, iXMLRPCServerMaxConnections) ' *** >If Error Then > Print "Error-Text: " & Error.Text & gb.NewLine & "Error-Location: " & > Error.Where > hXMLRPC.Stop() >Endif >If hXMLRPC.Listening Then > Print "The XMLRPC server listens for port " & Str(iXMLRPCPort) >Endif > > End > > Public Sub hXMLRPC_RemoteCall(sMethod As String, aParameters As Variant[]) >Select Case sMethod > Case "add2integer" >Sum(aParameters) >End Select > End > > Public Sub Sum(aParameters As Variant[]) >hXMLRPC.SetReply(aParameters[0] + aParameters[1]) hXMLRPC.Stop() > > End > > > > -- > 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 > -- Lee __ "Artificial Intelligence is no match for natural stupidity." -- 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] why not a forum event a complicates instruction on list and mail list
Hello Tyrone, There is no forum. It is just a mailing list. You use it by posting a message to the mailing list address: gambas-user@lists.sourceforge.net And, you can see previous messages sent to the list by visiting: https://sourceforge.net/p/gambas/mailman/gambas-user/ On 05/16/2017 05:11 PM, Tyrone Lucero wrote: > Hello, I was inscribe here, but I don' t see any forum... there are > one way to know about use this list? > > ___ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > --- Lee __ -- 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] Best way to upgrade Gambas
OpenSuse is not much different from any other RPM-based distribution. On OpenSuse Leap 42, I rely on the Packman repo to keep my Gambas package up to date. I do not compile from source. Uninstalling the packaged version should not remove the necessary libraries unless you specifically instruct Yast or Zypper to do so. You will, of course, need to have installed the development (-devel) versions of certain libraries in order to compile your own local version. --- Lee On 05/12/2017 03:13 AM, Rolf-Werner Eilert wrote: > Yesterday I installed Gambas on a machine with Suse Leap. Under Suse, I > like to use Yast to collect the necessary libraries etc. to go sure that > nothing is missing. So far so good. > > Now I have a somewhat current Gambas version on this machine, but if I > want to follow its development and install future versions, how should I > proceed? > > Up to now, I used to have a self-compiled Gambas, but if I de-install > the distro's version, won't I loose the linked libraries too? > > Maybe there is someone here who knows Suse. As to Tumbleweed, I wouldn't > use it here because this machine is going to be a production server system. > > Regards > Rolf > -- 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] Serial I/O with byte data
On 05/08/2017 12:13 PM, alexchernoff wrote: > Dear all, > > I am receiving data over a serial port which is sent by a byte[].write > function (an array of bytes) > > I get the SerialPort1_read() event raised where I try to read data, RxBuffer > is a string var > > *Try Read #SerialPort1, RxBuffer, Lof(SerialPort1)* > > as soon as I do, the whole program stops, some other timers in other modules > also stop to fire. In fact when running the program in Gambas again, it does > not execute even the startup, so have to restart the IDE. > > what am I doing wrong? > > thanks! If you are attempting to read the data _into_ RxBuffer, it appears your syntax is incorrect. According to http://gambaswiki.org/wiki/lang/read , the syntax for the READ statement is: Variable = READ [ # Stream , ] Length Perhaps try: Try RxBuffer = Read #SerialPort1, Lof(SerialPort1) --- Lee -- 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] HttpClient not exposing redirect response codes
On 04/27/2017 03:01 AM, Benoît Minisini wrote: > Le 25/04/2017 à 19:12, T Lee Davidson a écrit : >> I have run into a couple of sites that are responding with 301 (Moved >> Permanently) and 302 (Moved Temporarily) codes. However, HttpClient.Code >> yields "0" for both of those sites/codes (and HttpClient.Reason is >> empty). 200 & 404 codes are reported successfully. >> >> Have I missed something in the properties that is preventing proper >> disclosure of redirect response codes? >> >> Or is this a bug? >> >> (Project attached.) >> > > I have just tested your project, and I get all the expected answers > (301, 302, 404 & 200). > > libcurl (the library used by gb.net.curl) has a flag to automatically > follow http redirections, but it is disabled by default. > > So I don't understand the result you have. Which version of libcurl do > you use on your system? > Actually, I don't think it is a libcurl issue since the first response header does contain the appropriate text and code. If I run the example project with slightly different output: rMatch = New RegExp(hClient.Headers[0], ".*? (\\d+) (.*)") TextArea1.Text = hClient.Headers[0] & "\n" TextArea1.Text &= "Parsed header code: " & IIf(rMatch[1], rMatch[1].Text, "No code found.") & "\n" TextArea1.Text &= "Parsed header reason: " & IIf(rMatch[2], rMatch[2].Text, "No reason found.") & "\n" TextArea1.Text &= "HttpClient.Code: " & hClient.Code & "\n" TextArea1.Text &= "HttpClient.Reason: " & hClient.Reason & "\n\n" For the two problem sites, I get: HTTP/1.1 301 Moved Permanently Parsed header code: 301 Parsed header reason: Moved Permanently HttpClient.Code: 0 HttpClient.Reason: and HTTP/1.1 302 Moved Temporarily Parsed header code: 302 Parsed header reason: Moved Temporarily HttpClient.Code: 0 HttpClient.Reason: For the 200 & 404 codes, it works as expected. Thinking it may be a Charset issue, I made sure to send a "Accept-Charset: utf-8" header - no difference. I've taken a quick look at CHttpClient.c and found http_parse_header, but I don't understand what "ret = (ret * 10) + (*p - '0')", among others(!), does. --- Lee -- 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] HttpClient not exposing redirect response codes
On 04/27/2017 03:01 AM, Benoît Minisini wrote: > Le 25/04/2017 à 19:12, T Lee Davidson a écrit : >> I have run into a couple of sites that are responding with 301 (Moved >> Permanently) and 302 (Moved Temporarily) codes. However, HttpClient.Code >> yields "0" for both of those sites/codes (and HttpClient.Reason is >> empty). 200 & 404 codes are reported successfully. >> >> Have I missed something in the properties that is preventing proper >> disclosure of redirect response codes? >> >> Or is this a bug? >> >> (Project attached.) >> > > I have just tested your project, and I get all the expected answers > (301, 302, 404 & 200). > > libcurl (the library used by gb.net.curl) has a flag to automatically > follow http redirections, but it is disabled by default. I thought so. But, I looked and looked and did not find any way to access that flag either in HttpClient or in Curl (gb.net.curl). > So I don't understand the result you have. Which version of libcurl do > you use on your system? > The version of libcurl on my system is libcurl4, Version 7.37.0-16.3.1 (libcurl.so.4.3.0). BTW, I just tried again to see if it was just a transient issue, but, no, I still get neither 301 nor 302. --- Lee -- 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] HttpClient not exposing redirect response codes
On 04/25/2017 01:36 PM, Benoît Minisini wrote: > Le 25/04/2017 à 19:12, T Lee Davidson a écrit : >> I have run into a couple of sites that are responding with 301 (Moved >> Permanently) and 302 (Moved Temporarily) codes. However, HttpClient.Code >> yields "0" for both of those sites/codes (and HttpClient.Reason is >> empty). 200 & 404 codes are reported successfully. >> >> Have I missed something in the properties that is preventing proper >> disclosure of redirect response codes? >> >> Or is this a bug? >> >> (Project attached.) >> > > HttpClient is "just" libcurl, so it may be a libcurl thing (that library > has gazillons of options). I will check... > Thank you for taking the time to check into that, Benoît. In the meantime, for anyone else needing to loop through redirects (currently scanning for a "Location" header), here's a short example subroutine: Private Sub TestPage(sUrl As String) Dim hClient As New HttpClient Dim iMaxRedirects As Integer = 5 'Prevent infinite loop bot trap Dim iCurrentRedirects As Integer = 0 Dim bFound As Boolean hClient.UserAgent = "AppleWebKit" hClient.Async = False hClient.URL = sUrl hClient.Timeout = 15 Inc Application.Busy Do bFound = True 'Reset redirect flag hClient.Get If hClient.Headers.Find("Location:*", gb.Like) > -1 Then bFound = False 'Redirection If iCurrentRedirects = iMaxRedirects Then Break Inc iCurrentRedirects hClient.URL = Replace(hClient.Headers[hClient.Headers.Find("Location:*", gb.Like)], "Location: ", "") Print hClient.URL hClient.Headers.Clear 'Must manually clear headers array or "Location" header will persist causing redundant looping Endif Loop Until bFound = True Dec Application.Busy If hClient.Status < 0 Then Print "ERROR" End If Print "Success? -> " & hClient.Code End --- Lee -- 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] HttpClient not exposing redirect response codes
I have run into a couple of sites that are responding with 301 (Moved Permanently) and 302 (Moved Temporarily) codes. However, HttpClient.Code yields "0" for both of those sites/codes (and HttpClient.Reason is empty). 200 & 404 codes are reported successfully. Have I missed something in the properties that is preventing proper disclosure of redirect response codes? Or is this a bug? (Project attached.) -- Lee [System] Gambas=3.9.2 OperatingSystem=Linux Kernel=4.4.57-18.3-default Architecture=x86_64 Distribution=SuSE NAME="openSUSE Leap" VERSION="42.2" ID=opensuse ID_LIKE="suse" VERSION_ID="42.2" PRETTY_NAME="openSUSE Leap 42.2" ANSI_COLOR="0;32" CPE_NAME="cpe:/o:opensuse:leap:42.2" BUG_REPORT_URL="https://bugs.opensuse.org; HOME_URL="https://www.opensuse.org/; Desktop=KDE5 Theme=QtCurve Language=en_US.UTF-8 Memory=3951M [Libraries] DBus=libdbus-1.so.3.8.14 OpenGL=libGL.so.1.2.0 httpclienttest-0.0.1.tar.gz Description: application/gzip -- 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] Problem with lazy regexp
On 04/24/2017 04:25 AM, Tobias Boege wrote: > You can still get greedy quantifiers by using ungreedy ones in your > pattern... LOL. To get ungreedy behavior, use greedy quantifiers. That's logical. Thank you very much, Tobi, for digging that up and updating the documentation. Perhaps, though, more intuitive behavior would be achieved if the RegExp.Ungreedy flag was not set by default. Just a thought. Thanks again. -- Lee -- 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] Problem with lazy regexp
According to http://gambaswiki.org/wiki/doc/pcre , using "*?" in a regular expression should lazily match 0 or more characters. However, it appears to act greedily. I am trying to do some very simple HTML tag stripping with 'Regex.Replace(sText, "<.*?>", "")', and it takes out way more than just the tags. Have I misunderstood the documentation? (Project attached.) -- Lee [System] Gambas=3.9.2 OperatingSystem=Linux Kernel=4.4.57-18.3-default Architecture=x86_64 Distribution=SuSE NAME="openSUSE Leap" VERSION="42.2" ID=opensuse ID_LIKE="suse" VERSION_ID="42.2" PRETTY_NAME="openSUSE Leap 42.2" ANSI_COLOR="0;32" CPE_NAME="cpe:/o:opensuse:leap:42.2" BUG_REPORT_URL="https://bugs.opensuse.org; HOME_URL="https://www.opensuse.org/; Desktop=KDE5 Theme=QtCurve Language=en_US.UTF-8 Memory=3951M [Libraries] DBus=libdbus-1.so.3.8.14 OpenGL=libGL.so.1.2.0 [Environment] (redacted) lazyregextest-0.0.1.tar.gz Description: application/gzip -- 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] Graphics programming help
On 04/23/2017 03:59 PM, Leon Davis wrote: > > 1. How do I have my program register itself with the OS? That depends on the Desktop Environment you use. Here is a link for KDE: http://gambaswiki.org/wiki/howto/autorun > 2. I want to create transitions between images i.e., fades, wipes, blinds > in, spiral out. I don't do much at all with graphics. But perhaps this might get you started: http://gambaswiki.org/wiki/comp/gb.image.effect/image -- Lee -- 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] How to dynamically add & populate variable number of tabs at runtime?
Thank you, Matti. That got me started. I now have a working test model that will create a variable (unknown at design-time) number of tabs and populate each of them with a _visible_ GridView. It works great. The form now has a ValueBox to input the number of tabs to create, an AddTabs button, a PopulateGrids button, and of course a TabStrip. Here's the code for anyone else looking for a basic demo. (Note the use of the Object.Add method.) [code] ' Gambas class file Private aGridViews As New Object[] Public Sub Form_Open() Dim hGridView As GridView ValueBox1.Value = 3 'convenience TabStrip1[0].Text = "Tab 0" TabStrip1.Index = 0 hGridView = New GridView(TabStrip1) As "GridViews" aGridViews.Add(hGridView, 0) With aGridViews[0] .X = 0 .Y = 0 .Width = .Parent.Width .Height = .Parent.Height .Columns.Count = 2 .Rows.Count = 2 .Columns.Width = .Width / 2 End With End Public Sub TabStrip1_Close(Index As Integer) TabStrip1.Index = Index TabStrip1.Current.Children[0].Delete() 'Comment out to test if tab is empty TabStrip1.Current.Delete() End Public Sub btnAddTabs_Click() Dim i As Integer Dim hGridView As GridView If ValueBox1.Value = 0 Then Return TabStrip1.Count += ValueBox1.Value For i = 1 To ValueBox1.Value TabStrip1[i].Text = "Tab " & i TabStrip1.Index = i hGridView = New GridView(TabStrip1) As "GridViews" aGridViews.Add(hGridView, i) With aGridViews[i] .X = 0 .Y = 0 .Width = .Parent.Width .Height = .Parent.Height .Columns.Count = 2 .Rows.Count = 2 .Columns.Width = .Width / 2 End With Next End Public Sub btnPopulateGrids_Click() Dim i As Integer For i = 0 To aGridViews.Max aGridViews[i][0, 0].Text = "Tab " & i & ": [0,0]" aGridViews[i][0, 1].Text = "[0,1]" aGridViews[i][1, 0].Text = "Tab " & i & ": [1,0]" aGridViews[i][1, 1].Text = "[1,1]" Next End [/code] On 04/19/2017 01:45 AM, Matti wrote: > Hi Lee, > > first of all, you have to give the GridView a X, Y, width and height. > Otherwise it's there but doesn't show. > > To reference the GridViews, create an array of them and address them as > GridView[0], GridView[1] and so on. The [i] is the number of the TabStrip > index. > > Here is an example of what I did recently (tsTasks is the TabStrip): > > Private aTaskText As New Object[13] > Private aTaskCheck As New Object[13] > ... >For i = 1 To 12 > tsTasks[i - 1].Text = aMonths[i] > tsTasks.Index = i - 1 > > aTaskText[i] = New TextBox(tsTasks) As "Tasks" > With aTaskText[i] >.X = 77 >.Y = 21 >.Width = 728 >.Height = 35 > End With > > aTaskCheck[i] = New CheckBox(tsTasks) As "CheckDone" > With aTaskCheck[i] >.X = 840 >.Y = 28 >.Width = 126 >.Height = 21 >.Text = ("done") >.Tag = i > End With > -- Lee -- 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] How to dynamically add & populate variable number of tabs at runtime?
Hello Folks, I have been trying to figure out how to, at runtime, create a variable number of new tabs in a TabStrip, populate those tabs with Controls, and then be able to reference those controls, all dynamically. There seems to be little information available as to how to 1) dynamically create controls, and 2) reference dynamically named controls after creation. Even with just a simple experiment, I cannot get a GridView to display in a new tab. The Form has been given, at design-time, a TabStrip and two buttons. The tabs are 'closable'. One button, 'btnAddTab', creates a new tab and a GridView with the new, current tab as parent. (At least that's what I think it is doing.) The other button, 'btnTabInfo', displays info about the currently selected tab. And, I am assuming the GridViews need to have unique names. [code] ' Gambas class file Public Sub btnAddTab_Click() Dim hGridView As GridView TabStrip1.Count += 1 TabStrip1.Text = "Tab " & TabStrip1.Index hGridView = New GridView(TabStrip1) As "GridView" & TabStrip1.Index hGridView.Show TabStrip1.Refresh End Public Sub btnTabInfo_Click() Print TabStrip1.Children[0].Name Print TabStrip1.Children[0].Enabled Print TabStrip1.Children[0].Visible End Public Sub TabStrip1_Close(Index As Integer) TabStrip1.Index = Index ' TabStrip1.Current.Children[0].Delete() 'Comment out to test if tab is empty TabStrip1.Current.Delete() End [/code] Tab creation works, but the GridView control does not display. Any attempt to close a tab without first deleting its children causes an exception, showing that the tab is indeed being populated with a child control. Clicking on btnTabInfo for "Tab 1" gives: GridView1 True True So, the program is doing at least some of what I've told it to. I'm obviously not telling it the right thing. How does one: 1. Create new controls and make them visible? 2. Reference new controls after creation [ie. (de-)reference a string as a the name of a control]? -- Lee -- 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] Fwd: confirm 0bca3e2cd2fe186cd8c172cee9ce1858aec6ce7a
Interesting. I got one too. Server hiccup? On 01/03/2017 01:28 PM, Jussi Lahtinen wrote: > Any clue why I got this? > > > Jussi > > > -- Forwarded message -- > From:> Date: Tue, Jan 3, 2017 at 5:53 PM > Subject: confirm 0bca3e2cd2fe186cd8c172cee9ce1858aec6ce7a > > > Your membership in the mailing list Gambas-user has been disabled due > to excessive bounces The last bounce received from you was dated > 03-Jan-2017. You will not get any more messages from this list until > you re-enable your membership. You will receive 3 more reminders like > this before your membership in the list is deleted. > > To re-enable your membership, you can simply respond to this message > (leaving the Subject: line intact), or visit the confirmation page at > > https://lists.sourceforge.net/lists/confirm/gambas-user/ > 0bca3e2cd2fe186cd8c172cee9ce1858aec6ce7a > > > You can also visit your membership page at > > https://lists.sourceforge.net/lists/options/gambas-user/ > jussi.lahtinen%40gmail.com > > > On your membership page, you can change various delivery options such > as your email address and whether you get digests or not. As a > reminder, your membership password is > > mcvwo5492f > > If you have any questions or problems, you can contact the list owner > at > > gambas-user-ow...@lists.sourceforge.net > -- > 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 > -- Lee __ "Artificial Intelligence is no match for natural stupidity." -- 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] DBusSignal Error (Send)
On 11/14/2016 12:00 PM, Hans Lehmann wrote: > Hello, > > in my project 'signaltx2' I get after this source line: > > DBus[DBus.Name].Raise(NameVersion, "GetGBVersion", ["3.9.1"]) > > the following error message: > > Couldn't allocate D-Bus message ! > > Where is the error in the source code? Can someone help? > Project attached. > > Sincerely > > Hans > I'm not certain it is an error in _your_ source code. When I run the app and click "Send", I get an interpreter crash and an error message in the console: " arguments to dbus_message_new_signal() were incorrect, assertion "iface != NULL" failed in file dbus-message.c l ine 1431." [System] Gambas=3.9.1 OperatingSystem=Linux Kernel=4.1.34-33-default Architecture=x86_64 Distribution=SuSE NAME="openSUSE Leap" VERSION="42.1" VERSION_ID="42.1" PRETTY_NAME="openSUSE Leap 42.1 (x86_64)" ID=opensuse ANSI_COLOR="0;32" CPE_NAME="cpe:/o:opensuse:opensuse:42.1" BUG_REPORT_URL="https://bugs.opensuse.org; HOME_URL="https://opensuse.org/; ID_LIKE="suse" Desktop=KDE5 Theme=Breeze Language=en_US.UTF-8 Memory=2001M [Libraries] Cairo=libcairo.so.2.11400.2 DBus=libdbus-1.so.3.8.14 GStreamer=libgstreamer-1.0.so.0.405.0 GTK+2=libgtk-x11-2.0.so.0.2400.31 OpenGL=libGL.so.1.2.0 QT4=libQtCore.so.4.8.6 SQLite=libsqlite3.so.0.8.6 -- Lee __ "Artificial Intelligence is no match for natural stupidity." -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Incomplete gambas 3.9 install
Whatever distribution you are using may likely did not automatically install ALL of the Gambas components. For this particular project, you will probably need to also install the gambas3-gb-desktop and gambas3-gb-media (however they are named in your distro) components. On 10/13/2016 06:05 PM, richard terry wrote: > Hi List, > > > Just built a new machine for work and after doing a standard apt-get > install gambas3 when running my project the error messages missing > desktop.x11, gb.media and gb.media.form > > ?what's going on and how to fix. > > > Thanks > > > richard > > > > -- > 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 > -- Lee __ "Artificial Intelligence is no match for natural stupidity." -- 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] to all SuSE users
For Leap 42.1, kdesu is in the standard repository and kdesudo is not. However, kdesudo is available via a non-standard repository. On 09/20/2016 04:53 PM, Karl Reinl wrote: > Salut, > > tests on a freshly updated SuSE, to check Desktop.RunAsRoot from > gb.desktop shows that SuSE has no kdesudo, but uses kdesu instead. > Can anybody confirm that, or do I have a wired installation. > > thanks in advanced > -- Lee __ "Artificial Intelligence is no match for natural stupidity." -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] CDocumentation.ImplementAndNeed.1138
On 06/26/2016 07:24 AM, Jesus Guardon wrote: > Hi, Lewis > > As this is a threaded list, please, don't hijack the previous thread by > hitting 'Reply' while still reading a thread. That's the case with my > thread 'About Gambas Farm' because your post appear as a reply to it, > but having changed the title. > > If you want to create a new thread, please, use the 'New post' or > whatever says your mail client. If using Thunderbird, it's: right-click on mailing list address in header and select "Compose Message To". -- Lee __ "Artificial Intelligence is no match for natural stupidity." -- Attend Shape: An AT Tech Expo July 15-16. Meet us at AT Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] method $load , any wiki for explain it ?
On 06/05/2016 04:55 PM, zainudin ahmad wrote: > the project contain Main form (without any code). I get the result : > > > Compiling Main.class... > Inherits Form > > > Private Sub {$load}() << (what I mean) > >With Me > .MoveScaled(0,0,64,64) >End With > > End > [snip] > > On Sun, Jun 5, 2016 at 11:00 PM, T Lee Davidson <t.lee.david...@gmail.com> > wrote: > >> On 06/05/2016 06:10 AM, zainudin ahmad wrote: >>> $load is used , there is any other method has declared and wiki for >> explain >>> it ? >> >> Is this what you are looking for? >> http://gambaswiki.org/wiki/comp/gb/file/load >> I am really confused as to what you are attempting. You say the Main form has no code, but then you show code for a private subroutine named "$load" which, as far as I know, does not exist in Gambas. And, if you are creating a graphical application with the IDE, there should be no need to include the "Inherits Form" statement. It appears as though you may be trying to create a (graphical) form from a non-graphical command line application. But, that is difficult to determine without seeing your code. If you could attach a small project file so we can better see what you are trying to do, it might help. In the meantime, perhaps what you need is the Form_Open event handler: Public Sub Form_Open() With Me .MoveScaled(0,0,64,64) End With End If applicable, see the examples at: http://gambaswiki.org/wiki/comp/gb.qt4/form -- Lee __ "Artificial Intelligence is no match for natural stupidity." -- What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] method $load , any wiki for explain it ?
On 06/05/2016 06:10 AM, zainudin ahmad wrote: > $load is used , there is any other method has declared and wiki for explain > it ? Is this what you are looking for? http://gambaswiki.org/wiki/comp/gb/file/load -- Lee __ "Artificial Intelligence is no match for natural stupidity." -- What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] [ask] issue 926 : want to edit a record, it's change the other record
Wait, duh. I forgot you don't actually need code when using the DataBrowser. I got it to run. It works as expected here. On 05/05/2016 02:25 PM, T Lee Davidson wrote: > I don't know what happened with the archive, but after extraction there is no > code in the FMain.class file. Just the default > comment, "' Gambas class file", and nothing else. > > FMain.form is there, though, with a DataSource containing a DataBrowser. > > > On 05/05/2016 02:07 PM, zainudin ahmad wrote: >> There is any someone have the same issue with me ? >> >> http://gambaswiki.org/bugtracker/edit?object=BUG.926=L21haW4- >> >> >> Reproduce the bug : >> >> - extract project into /tmp directory (attach project) >> >> - open & run project >> - follow this picture (attach pic-1) >> >> Thank you . > > -- Lee __ "Artificial Intelligence is no match for natural stupidity." -- Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] [ask] issue 926 : want to edit a record, it's change the other record
I don't know what happened with the archive, but after extraction there is no code in the FMain.class file. Just the default comment, "' Gambas class file", and nothing else. FMain.form is there, though, with a DataSource containing a DataBrowser. On 05/05/2016 02:07 PM, zainudin ahmad wrote: > There is any someone have the same issue with me ? > > http://gambaswiki.org/bugtracker/edit?object=BUG.926=L21haW4- > > > Reproduce the bug : > > - extract project into /tmp directory (attach project) > > - open & run project > - follow this picture (attach pic-1) > > Thank you . -- Lee __ "Artificial Intelligence is no match for natural stupidity." -- Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Set timeout for Webview?
I am trying to fetch a web page through a private SOCKS5 proxy using Basic Authentication with: Try hWebView.Url = sUrl If Error Then Message.Error("Error retrieving page", "OK") If the proxy is nonresponsive, the application just hangs, apparently doing nothing. Sometimes it will timeout after 120-some seconds. But I get no error message, just an empty response. (HttpClient has a Timeout, but I cannot use that for this application.) I see no timeout property for either WebView or WebSettings. Is it possible to set a timeout for WebView? -- Lee __ "Artificial Intelligence is no match for natural stupidity." -- Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Embedding the Linux console
On 04/28/2016 11:31 AM, Jorge Carrión wrote: > Hi, > > I like to embbed a system console, like gnome-terminal or similar, in a > form. We are doing a computer control sistem in the job, and have done a > microsoft-tree-domain inteface. i like implement the feature of open a > ssh-terminal of the showed computers, but adding it a menu bar. > > Time ago there was a "embedder" control, but it not longer exist. > > It's posible do this? > > Thanks in advance. [code] ' Gambas class file Public sOutput As String Public Sub Form_Open() TextArea1.Insert("#>") End Public Sub TextArea1_KeyPress() If Key.Code <> Key.Enter And Key.Code <> Key.Return Then Return Stop Event Shell Right(Split(TextArea1.Text, "\n").Pop(), -2) To sOutput TextArea1.Insert("\n" & sOutput & "#>") TextArea1.EnsureVisible ' (That's nice, Benoît.) End [/code] You can of course change the default colors of the TextArea to a light on dark to simulate a terminal. But, the cursor will likely become invisible and is not easily changed. -- Lee __ "Artificial Intelligence is no match for natural stupidity." -- Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Setting path in Dialog
I believe the tilde does not work as a shortcut for user's home directory. You should probably use: Dialog.Path = User.Home &/ "Documents/ED/NEC Antenna Files/" On 04/27/2016 08:34 PM, Ed & Clare Kelm wrote: > I have the same problem as Rolf. (2016-01-19 17:11:18) > > Setting dialog.path does not work. Instead, the resulting path is > always the location of the project. > > My project is located in ~/Documents/Gambas Projects/EDNEC/ > > In the project is this code snippet: > > ** > Dialog.Path = "~/Documents/ED/NEC Antenna Files/" > Dialog.Title = "Select an Antenna File to Open" > Dialog.Filter = ["*.txt; *.TXT", "Text Files", "*.NEC", "NEC Input Files"] > > Print Dialog.Path > > If Dialog.OpenFile() Then Return > ** > > When it executes, the correct path is printed to the IDE, the correct > title appears on the Open dialog, and the correct filter appears in the > Open dialog. However, the path in the Open dialog is ~/Documents/Gambas > Projects/EDNEC/. > > I am using: > > Gambas 3.8.4 > Xubuntu 14.04 > > Any help for this? > > Thanks! > > Ed K. -- Lee __ "Artificial Intelligence is no match for natural stupidity." -- Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] String[] in Sub, what is going wrong
On 04/27/2016 12:02 PM, Rolf-Werner Eilert wrote: > This is the code: > > Public Sub setFontNameList(fontliste As String[]) > Dim i As Integer > > fntexc.Clear > > For i = 0 To fontliste.count - 1 > fntexc.Add(fontliste[i]) > Next > > End > > It didn't run, so I set a Wait to the line fntexc.Clear. "fontliste[]" > is delivered as it should, it has 3 items. But fontliste.Count is 0, > fontliste.Max would be -1. So it is never copied. > > What is going wrong here??? > > Regards > Rolf > I have to assume that "fntexc" is a 'global' since it is not declared in the Sub. This code... ' Gambas module file Public fntexc As String[] Public Sub Main() Dim sFont As String fntexc = [] setFontNameList(["courier", "helvetica", "arial"]) For Each sFont In fntexc Print sFont Next End Public Sub setFontNameList(fontliste As String[]) Dim i As Integer Debug fontliste.Count fntexc.Clear For i = 0 To fontliste.count - 1 fntexc.Add(fontliste[i]) Next End ...works, and outputs: MMain.setFontNameList.19: 3 courier helvetica arial Hope that helps, -- Lee __ "Artificial Intelligence is no match for natural stupidity." -- Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] How to set HttpClient Accept headers?
I know that the ACCEPT_ENCODING client header can be set using HttpClient.Encoding per the wiki. And, I believe HttpClient.Headers are only the server response headers. Is it possible to also set the ACCEPT and ACCEPT_LANGUAGE client headers for HttpClient? -- Lee __ "Artificial Intelligence is no match for natural stupidity." -- Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Create a Form like Panel on Desktop
You shouldn't need to do anything special in Gambas to accomplish that. Your window manager should be able to do that. For example, in KDE, you would click the application icon at the very top-left in the title bar, choose "More Actions" and then "Keep Above Others". I don't know about other window managers. Or, is that not what you meant? On 04/19/2016 06:14 AM, abbat81 wrote: > Hi all ! > > Is it possible to create form like panel (f.e. Lxpanel). > If other apps windows maximize, their maximize according to my form-panel > stay visible. > > Thank you in advance. > -- Lee __ "Artificial Intelligence is no match for natural stupidity." -- Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] TrayIcon question (Plasma)
On 04/14/2016 02:01 PM, Benoît Minisini wrote: > Le 14/04/2016 19:46, Gianluigi a écrit : >> Excuse me Lee, >> I did not believe that I created a monster, with so few lines of code. >> Ciao >> Gianluigi >> > > What make Plasma crashes is setting the menu. I will investigate why > exactly... I surely badly implemented a DBus answer for a corner case, > but Plasma should not crash just because of a trayicon! > I don't know if it's related, but I noticed that Gambas does not seem to recognize that I do indeed have libQt5Core.so installed; while Jussi's and GianLuigi's do show libQt5Core in their system information. `locate libQt5Core.so`: /usr/lib64/libQt5Core.so /usr/lib64/libQt5Core.so.5 /usr/lib64/libQt5Core.so.5.5 /usr/lib64/libQt5Core.so.5.5.1 [System] Gambas=3.8.4 OperatingSystem=Linux Kernel=4.1.20-11-default Architecture=x86_64 Distribution=SuSE NAME="openSUSE Leap" VERSION="42.1" VERSION_ID="42.1" PRETTY_NAME="openSUSE Leap 42.1 (x86_64)" ID=opensuse ANSI_COLOR="0;32" CPE_NAME="cpe:/o:opensuse:opensuse:42.1" BUG_REPORT_URL="https://bugs.opensuse.org; HOME_URL="https://opensuse.org/; ID_LIKE="suse" Desktop=KDE5 Theme=Breeze Language=en_US.UTF-8 Memory=2001M [Libraries] Cairo=libcairo.so.2.11400.2 DBus=libdbus-1.so.3.8.11 GStreamer=libgstreamer-1.0.so.0.405.0 GTK+2=libgtk-x11-2.0.so.0.2400.29 OpenGL=libGL.so.1.2.0 QT4=libQtCore.so.4.8.6 ** [Environment] --snipped-- ** No libQt5Core in Libaries. -- Lee __ "Artificial Intelligence is no match for natural stupidity." -- Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] TrayIcon question
I cannot help you understand it, GianLuigi, because I don't understand it either. But, I can say that it didn't play nice with my KDE Plasma v5.5.5 on Qt v5.5.1. It kept repeatedly crashing Plasma in a loop until I killed it. On 04/14/2016 11:29 AM, Gianluigi wrote: I can not understand how works TrayIcon. Can someone help me. Attached small demonstration who gives me these Warnigs: gbx3: warning: circular references detected: gbx3: 1 FMain gbx3: 1 DBusStatusIcon gbx3: 1 DBusStatusIconMenu gbx3: 1 TrayIcon gbx3: 4 DBusObject gbx3: 1 Picture gbx3: warning: 192 allocation(s) non freed. Regards Gianluigi -- Lee __ "Artificial Intelligence is no match for natural stupidity." [System] Gambas=3.8.4 OperatingSystem=Linux Kernel=4.1.20-11-default Architecture=x86_64 Distribution=SuSE NAME="openSUSE Leap" VERSION="42.1" VERSION_ID="42.1" PRETTY_NAME="openSUSE Leap 42.1 (x86_64)" ID=opensuse ANSI_COLOR="0;32" CPE_NAME="cpe:/o:opensuse:opensuse:42.1" BUG_REPORT_URL="https://bugs.opensuse.org; HOME_URL="https://opensuse.org/; ID_LIKE="suse" Desktop=KDE5 Theme=Breeze Language=en_US.UTF-8 Memory=2001M [Libraries] Cairo=libcairo.so.2.11400.2 DBus=libdbus-1.so.3.8.11 GStreamer=libgstreamer-1.0.so.0.405.0 GTK+2=libgtk-x11-2.0.so.0.2400.29 OpenGL=libGL.so.1.2.0 QT4=libQtCore.so.4.8.6 [Environment] ALSA_CONFIG_PATH=/etc/alsa-pulse.conf AUDIODRIVER=pulseaudio COLORTERM=1 CONFIG_SITE=/usr/share/site/x86_64-unknown-linux-gnu CPU=x86_64 CSHEDIT=emacs CVS_RSH=ssh DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-4h6e2G2V0B,guid=e34dcb83a97105eab849e92a570fc81f DESKTOP_SESSION=/usr/share/xsessions/plasma5 DISPLAY=:0 FROM_HEADER= GB_GUI=gb.qt5 GPG_AGENT_INFO=/tmp/gpg-Gr9wpT/S.gpg-agent:5347:1 GPG_TTY=not a tty GS_LIB=/.fonts GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/.gtkrc-2.0:/.config/gtkrc-2.0 GTK_IM_MODULE=cedilla GTK_MODULES=canberra-gtk-module GTK_RC_FILES=/etc/gtk/gtkrc:/.gtkrc:/.config/gtkrc G_BROKEN_FILENAMES=1 G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-15,CP1252 HISTSIZE=1000 HOME= HOST= HOSTNAME= HOSTTYPE=x86_64 INPUTRC=/.inputrc JAVA_BINDIR=/usr/lib64/jvm/java/bin JAVA_HOME=/usr/lib64/jvm/java JAVA_ROOT=/usr/lib64/jvm/java JDK_HOME=/usr/lib64/jvm/java JRE_HOME=/usr/lib64/jvm/java/jre KDE_FULL_SESSION=true KDE_MULTIHEAD=false KDE_SESSION_UID=1000 KDE_SESSION_VERSION=5 LANG=en_US.UTF-8 LESS=-M -I -R LESSCLOSE=lessclose.sh %s %s LESSKEY=/etc/lesskey.bin LESSOPEN=lessopen.sh %s LESS_ADVANCED_PREPROCESSOR=no LOGNAME= MACHTYPE=x86_64-suse-linux MAIL=/var/spool/mail/ MANPATH=/usr/local/man:/usr/share/man MINICOM=-c on MORE=-sl NNTPSERVER=news OSTYPE=linux PAGER=less PATH=/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games PROFILEREAD=true PWD= PYTHONSTARTUP=/etc/pythonstart QEMU_AUDIO_DRV=pa QT_IM_MODULE=xim QT_IM_SWITCHER=imsw-multi QT_NO_GLIB=1 QT_SYSTEM_DIR=/usr/share/desktop-data SDK_HOME=/usr/lib64/jvm/java SDL_AUDIODRIVER=pulse SESSION_MANAGER=local/:@/tmp/.ICE-unix/5405,unix/:/tmp/.ICE-unix/5405 SHELL=/bin/bash SHLVL=1 SSH_AGENT_PID=5346 SSH_ASKPASS=/usr/lib/ssh/ksshaskpass SSH_AUTH_SOCK=/tmp/ssh-tNb4Lodia4cW/agent.5295 TERM=xterm TZ=:/etc/localtime USER= WINDOWMANAGER=/usr/bin/startkde XAUTHLOCALHOSTNAME= XAUTHORITY=/tmp/xauth-1000-_0 XCURSOR_SIZE=0 XCURSOR_THEME=breeze_cursors XDG_CONFIG_DIRS=/etc/xdg XDG_CURRENT_DESKTOP=KDE XDG_DATA_DIRS=/usr/share XDG_RUNTIME_DIR=/run/user/1000 XDG_SEAT=seat0 XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0 XDG_SESSION_CLASS=user XDG_SESSION_DESKTOP=KDE XDG_SESSION_ID=7 XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session3 XDG_SESSION_TYPE=x11 XDG_VTNR=7 XKEYSYMDB=/usr/X11R6/lib/X11/XKeysymDB XMODIFIERS=@im=local XNLSPATH=/usr/share/X11/nls XSESSION_IS_UP=yes _=/usr/lib64/libexec/kf5/start_kdeinit_wrapper Application: Plasma (plasmashell), signal: Aborted Using host libthread_db library "/lib64/libthread_db.so.1". [Current thread is 1 (Thread 0x7fd02db827c0 (LWP 5437))] Thread 8 (Thread 0x7fd0175ba700 (LWP 5438)): #0 0x7fd02708fbbd in poll () at /lib64/libc.so.6 #1 0x7fd02bfdf422 in () at /usr/lib64/libxcb.so.1 #2 0x7fd02bfe100f in xcb_wait_for_event () at /usr/lib64/libxcb.so.1 #3 0x7fd01970b3c9 in () at /usr/lib64/libQt5XcbQpa.so.5 #4 0x7fd02778832f in () at /usr/lib64/libQt5Core.so.5 #5 0x7fd0268990a4 in start_thread () at /lib64/libpthread.so.0 #6 0x7fd027097fed in clone () at /lib64/libc.so.6 Thread 7 (Thread 0x7fd014988700 (LWP 5465)): #0 0x7fd0237afd14 in g_mutex_unlock () at /usr/lib64/libglib-2.0.so.0 #1 0x7fd02376d759 in g_main_context_query () at /usr/lib64/libglib-2.0.so.0 #2 0x7fd02376ddcf in () at /usr/lib64/libglib-2.0.so.0 #3 0x7fd02376df7c in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0 #4 0x7fd0279bad8b in QEventDispatcherGlib::processEvents(QFlags) () at /usr/lib64/libQt5Core.so.5 #5 0x7fd027961d53 in QEventLoop::exec(QFlags) () at /usr/lib64/libQt5Core.so.5 #6 0x7fd02778361a in QThread::exec() () at
Re: [Gambas-user] Repository of GAMBAS programs
Yes: http://gambaswiki.org/wiki/app But, some of the apps are a bit outdated. The new repository is the Gambas Farm which is accessible from within the Gambas IDE in versions, I think, greater than 3.8.X. (Someone please correct or confirm the version number.) On 04/10/2016 10:01 PM, Pino Zollo wrote: > Ones there was a repository of GAMBAS programs. > > Is it still available ? > > Thanks > > Pino > > -- > Find and fix application performance issues faster with Applications Manager > Applications Manager provides deep performance insights into multiple tiers of > your business applications. It resolves application problems quickly and > reduces your MTTR. Get your free trial! http://pubads.g.doubleclick.net/ > gampad/clk?id=1444514301=/ca-pub-7940484522588532 > ___ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Lee __ "Artificial Intelligence is no match for natural stupidity." -- Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! http://pubads.g.doubleclick.net/ gampad/clk?id=1444514301=/ca-pub-7940484522588532 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Gambas mime type
Matti, I was wrong about the pattern in "/usr/share/mimelnk/application/x-gambas3.desktop". That mimetype file is for Gambas scripts, not Gambas executables. And, I recommend ignoring my instruction to create "~/.local/share/applications/gbr3.desktop". It might be much better to just create the association in System Settings. Once there, go to Applications -> File Associations and search on "gambas". There should be two there already which you can use as examples to create a "x-gambas" type. You can switch back an forth between the types as you create the new one. I chose the "application-x-gambas" icon from System icons, added "*.gambas" as a filename pattern, described it as "Gambas executable", and added "/usr/bin/gbr3" in Application Preference Order. Once I clicked Apply, the file, "~/.local/share/applications/gbr3.desktop", was created and the mimetype database updated automatically. On 04/05/2016 09:47 PM, T Lee Davidson wrote: > On 04/05/2016 03:17 PM, Matti wrote: >> Unfortunately, I have to set up my system (openSUSE 42.1) completely new. >> I installed Gambas 3.8.4 >> fromhttp://download.opensuse.org/repositories/Education/openSUSE_Leap_42.1/, >> and it runs ok as it did >> before. >> >> But the packager seems to have made a mistake, as *.gambas files are >> regarded as plain text documents and won't start by >> clicking on them. >> >> So, does anyone know how to make KDE run *.gambas files automatically? > > Matti, > > I think the mistake in "/usr/share/mimelnk/application/x-gambas3.desktop" is > the Patterns being set to "*.g;*.G". I tried > correcting that to "*.gambas;*.Gambas" on my system. But, I got impatient and > didn't want bother seeing if a reboot would cause > the new pattern to be picked up. > > Here's a quick fix. > > Ensure that you have a file "~/.local/share/applications/gbr3.desktop" with > the content: > [Desktop Entry] > Exec=/usr/bin/gbr3 > MimeType=application/gambas; > Name=gbr3 > NoDisplay=true > Type=Application > > (It can sometimes take a minute or so for the system to recognize changes in > "~/.local/share/applications".) > > Then go to System Settings -> Applications -> File Associations. Search for > "gambas". It should be: > Filename patterns: *.gambas > Description: application/gambas > Application Preference Order: gbr3 > > If it's not there, add it. > -- Lee __ "Artificial Intelligence is no match for natural stupidity." -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Gambas mime type
On 04/05/2016 03:17 PM, Matti wrote: > Unfortunately, I have to set up my system (openSUSE 42.1) completely new. > I installed Gambas 3.8.4 > fromhttp://download.opensuse.org/repositories/Education/openSUSE_Leap_42.1/, > and it runs ok as it did before. > > But the packager seems to have made a mistake, as *.gambas files are regarded > as plain text documents and won't start by clicking on them. > > So, does anyone know how to make KDE run *.gambas files automatically? Matti, I think the mistake in "/usr/share/mimelnk/application/x-gambas3.desktop" is the Patterns being set to "*.g;*.G". I tried correcting that to "*.gambas;*.Gambas" on my system. But, I got impatient and didn't want bother seeing if a reboot would cause the new pattern to be picked up. Here's a quick fix. Ensure that you have a file "~/.local/share/applications/gbr3.desktop" with the content: [Desktop Entry] Exec=/usr/bin/gbr3 MimeType=application/gambas; Name=gbr3 NoDisplay=true Type=Application (It can sometimes take a minute or so for the system to recognize changes in "~/.local/share/applications".) Then go to System Settings -> Applications -> File Associations. Search for "gambas". It should be: Filename patterns: *.gambas Description: application/gambas Application Preference Order: gbr3 If it's not there, add it. -- Lee __ "Artificial Intelligence is no match for natural stupidity." -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] How to sort a TableView?
Oops. Good catch. Thank you for pointing that out. Fixed. On 04/05/2016 04:46 PM, Gianluigi wrote: > Lee look what you made a mistake: > (no TableView1 but GridView1) > ValueSorted.Sort(IIf(GridView1.Columns.Ascending, gb.Ascent, gb.Descent)) > > Ciao > Gianluigi -- Lee __ "Artificial Intelligence is no match for natural stupidity." -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] How to sort a TableView?
Yes, I agree since the Mode for String[].Sort is integer and GridView.Columns.Ascending is boolean. But, how about this? ValueSorted.Sort(IIf(TableView1.Columns.Ascending, gb.Ascent, gb.Descent)) On 04/05/2016 10:17 AM, Gianluigi wrote: > Hello Lee, > Milio propose this change to avoid the arrows appear upside than sorting. > Instead of: > ValueSorted.Sort(GridView1.Columns.Ascending) > this code: > If GridView1.Columns.Ascending Then >ValueSorted.Sort(gb.Ascent) > Else >ValueSorted.Sort(gb.Descent) > Endif > Regards > Gianluigi > -- Lee __ "Artificial Intelligence is no match for natural stupidity." -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] How to sort a TableView?
That's exactly what I needed, Gianluigi. Thank you. It works well even preserving distinct rows with duplicate key values. I added a few comments to your code and added it as an example to http://gambaswiki.org/wiki/comp/gb.qt4/gridview/sorted. (I hope that's okay with you. If not, please let me know and I'll modify or remove it.) -- Lee __ "Artificial Intelligence is no match for natural stupidity." On 03/31/2016 04:51 AM, Gianluigi wrote: > Without using the database, have taught me so: > > Public Sub TableView1_Sort() > Dim Values, ValueSorted As New String[] > Dim Nx, iNx As Integer > Dim tmp As String > > For Nx = 0 To TableView1.Rows.Max >Values.Add(TableView1[Nx, TableView1.Columns.Sort].Text) > Next > ValueSorted = Values.Copy() > ValueSorted.Sort(TableView1.Columns.Ascending) > For Nx = 0 To ValueSorted.Max >For iNx = 0 To TableView1.Columns.Max > Swap TableView1[Nx, iNx].Text, > TableView1[Values.Find(ValueSorted[Nx], 0, Nx), iNx].Text >Next >Values.Clear() >For iNx = 0 To TableView1.Rows.Max > Values.Add(TableView1[iNx, TableView1.Columns.Sort].Text) >Next > Next > TableView1.Refresh() > End > > Regards > Gianluigi -- Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785471=/4140 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] How to sort a TableView?
Thank you, Frank. That is an interesting example. It uses an array of variant arrays as the underlying data-store similar to what I had done in the past with objects. And, they extend Object[] with a custom sort routine. Neat. On 03/31/2016 02:55 AM, Frank wrote: > Hi TLD, I found something that might help: > > I have put the whole code here but the bit you talk about start at line 76. > > found it here:http://gambas-buch.de/dw/doku.php?id=k17:k17.7:k17.7.4:start -- Lee __ "Artificial Intelligence is no match for natural stupidity." -- Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785471=/4140 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] How to sort a TableView?
Thank you for your effort, Gianluigi. But, I am not using a database; just a TableView of data. When a TableView's Sorted property is set to True, clicking on a column header toggles the sort indicator and raises the TableView's Sort event. I need to sort the TableView rows based on the values in whichever column the header was clicked. On 03/30/2016 06:06 PM, Gianluigi wrote: > Not sure if I understand the question, but something like that, could help? > > If TableView1.Columns.Ascending Then >sMySql = "SELECT *" >sMySql &= " FROM customers" >sMySql &= " ORDER BY surname ASC," >sMySql &= " name ASC" >sMySql &= ";" > Else >sMySql = "SELECT *" >sMySql &= " FROM customers" >sMySql &= " ORDER BY surname DESC," >sMySql &= " name DESC" >sMySql &= ";" > Endif > > Regards > Gianluigi > > 2016-03-30 22:18 GMT+02:00 T Lee Davidson <t.lee.david...@gmail.com>: > >> The documentation for TableView shows a Sorted property which says, >> "Sorting the data is not done automatically. It must be done >> by user code." But, the page does not give any clues regarding how to >> accomplish that. Though, obviously, sorting should be done >> in the Sort event handler. >> >> In the past, I have used an array of objects to store the data represented >> in the TableView. This provided use of Object[].Sort >> with the _compare function. >> >> This time around, I am attempting to eliminate the redundancy of duplicate >> data containers (store and view) and the cumbersome >> syncing of the data and the view. (Perhaps I should just simply use a >> SQLite DB and a DataView?) >> >> There appears to be no TableView/GridView or GridView.Columns Sort method. >> >> Does anyone have any hints as to how to sort a TableView? >> >> >> -- >> Lee >> __ >> >> "Artificial Intelligence is no match for natural stupidity." >> >> >> -- >> Transform Data into Opportunity. >> Accelerate data analysis in your applications with >> Intel Data Analytics Acceleration Library. >> Click to learn more. >> http://pubads.g.doubleclick.net/gampad/clk?id=278785471=/4140 >> ___ >> Gambas-user mailing list >> Gambas-user@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > -- > Transform Data into Opportunity. > Accelerate data analysis in your applications with > Intel Data Analytics Acceleration Library. > Click to learn more. > http://pubads.g.doubleclick.net/gampad/clk?id=278785471=/4140 > ___ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Lee __ "Artificial Intelligence is no match for natural stupidity." -- Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785471=/4140 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] How to sort a TableView?
The documentation for TableView shows a Sorted property which says, "Sorting the data is not done automatically. It must be done by user code." But, the page does not give any clues regarding how to accomplish that. Though, obviously, sorting should be done in the Sort event handler. In the past, I have used an array of objects to store the data represented in the TableView. This provided use of Object[].Sort with the _compare function. This time around, I am attempting to eliminate the redundancy of duplicate data containers (store and view) and the cumbersome syncing of the data and the view. (Perhaps I should just simply use a SQLite DB and a DataView?) There appears to be no TableView/GridView or GridView.Columns Sort method. Does anyone have any hints as to how to sort a TableView? -- Lee __ "Artificial Intelligence is no match for natural stupidity." -- Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785471=/4140 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] How to register and login to the Wiki?
On 03/24/2016 12:56 AM, Benoît Minisini wrote: > Le 24/03/2016 05:18, T Lee Davidson a écrit : >> On 03/16/2016 08:53 PM, T Lee Davidson wrote: >>> >>> >>> On 03/16/2016 07:58 PM, Tobias Boege wrote: >>>> On Wed, 16 Mar 2016, T Lee Davidson wrote: >>>>>> I used to be able to login to the Wiki (http://gambaswiki.org/). This >>>>>> was prior to it receiving its new face. >>>>>> >>>>>> Now, I cannot login apparently. When I enter my login credentials, I see >>>>>> no evidence of being logged in and still see the >>>>>> "Login" button. There is also no recover password, nor register, link. >>>>>> >>>>>> Has the procedure for registering/logging in changed, and I simply >>>>>> cannot find the documentation explaining it? >>>>>> >>>> There should be no documentation necessary for logging in. The intuitive >>>> way >>>> works over here. See screenshots 1 to 3. >>>> >>>> Regards, >>>> Tobi >>> >>> Thanks Tobi. And, yes, I did not think there should be any documentation >>> necessary for logging in. >>> >>> But as I said, I cannot log in. After submitting the login form, the >>> "Login" button remains; no "Logout" button. I get no error >>> message, nor any link to retrieve password, nor any link to register. I >>> just figured there _must_ be something I am missing that >>> is perhaps documented somewhere that I cannot find. >>> >>> >> >> So, does anyone know how I might be able to log in to the Wiki? Either by >> retrieving or resetting my password? Or, by >> re-registering? >> >> In other words: >> >> If it exists, where is the Reset Password link? >> Or, where is the Register link? >> >> >> Thanks. >> >> > > Ha, sorry! The accounts are now centralized it the bugtracker. So you > actually register from it. There is no message at the moment on the wiki > when your login fails. > Ah, okay. I did have a bugtracker account, but did not know it was coordinated with the Wiki. Got your private message. Thank you. I am now able to log in to the Wiki. -- Lee __ "Artificial Intelligence is no match for natural stupidity." -- Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785351=/4140 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] How to register and login to the Wiki?
On 03/16/2016 08:53 PM, T Lee Davidson wrote: > > > On 03/16/2016 07:58 PM, Tobias Boege wrote: >> On Wed, 16 Mar 2016, T Lee Davidson wrote: >>> >I used to be able to login to the Wiki (http://gambaswiki.org/). This was >>> >prior to it receiving its new face. >>> > >>> >Now, I cannot login apparently. When I enter my login credentials, I see >>> >no evidence of being logged in and still see the >>> >"Login" button. There is also no recover password, nor register, link. >>> > >>> >Has the procedure for registering/logging in changed, and I simply cannot >>> >find the documentation explaining it? >>> > >> There should be no documentation necessary for logging in. The intuitive way >> works over here. See screenshots 1 to 3. >> >> Regards, >> Tobi > > Thanks Tobi. And, yes, I did not think there should be any documentation > necessary for logging in. > > But as I said, I cannot log in. After submitting the login form, the "Login" > button remains; no "Logout" button. I get no error > message, nor any link to retrieve password, nor any link to register. I just > figured there _must_ be something I am missing that > is perhaps documented somewhere that I cannot find. > > So, does anyone know how I might be able to log in to the Wiki? Either by retrieving or resetting my password? Or, by re-registering? In other words: If it exists, where is the Reset Password link? Or, where is the Register link? Thanks. -- Lee __ "Artificial Intelligence is no match for natural stupidity." -- Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785351=/4140 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] How to register and login to the Wiki?
On 03/16/2016 07:58 PM, Tobias Boege wrote: > On Wed, 16 Mar 2016, T Lee Davidson wrote: >> >I used to be able to login to the Wiki (http://gambaswiki.org/). This was >> >prior to it receiving its new face. >> > >> >Now, I cannot login apparently. When I enter my login credentials, I see no >> >evidence of being logged in and still see the >> >"Login" button. There is also no recover password, nor register, link. >> > >> >Has the procedure for registering/logging in changed, and I simply cannot >> >find the documentation explaining it? >> > > There should be no documentation necessary for logging in. The intuitive way > works over here. See screenshots 1 to 3. > > Regards, > Tobi Thanks Tobi. And, yes, I did not think there should be any documentation necessary for logging in. But as I said, I cannot log in. After submitting the login form, the "Login" button remains; no "Logout" button. I get no error message, nor any link to retrieve password, nor any link to register. I just figured there _must_ be something I am missing that is perhaps documented somewhere that I cannot find. -- Lee __ "Artificial Intelligence is no match for natural stupidity." -- Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785231=/4140 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] How to register and login to the Wiki?
I used to be able to login to the Wiki (http://gambaswiki.org/). This was prior to it receiving its new face. Now, I cannot login apparently. When I enter my login credentials, I see no evidence of being logged in and still see the "Login" button. There is also no recover password, nor register, link. Has the procedure for registering/logging in changed, and I simply cannot find the documentation explaining it? -- Lee __ "Artificial Intelligence is no match for natural stupidity." -- Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785231=/4140 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] [Gambas Bug Tracker] Bug #901: Problem with Gambas upgrade when systems upgrades from qt4 to qt5 (on Debian)
On 03/06/2016 08:00 AM, T Lee Davidson wrote: > On 03/05/2016 08:43 PM, bugtrac...@gambaswiki.org wrote: >> This is done because qt4 will no longer be used in stretch (so to make sure >> the qt5 packages are used instead) >> Gambas3 (3.5.4) is packaged to use qt4. This seems to cause the problem with >> upgrading 3.5.4 to 3.8.4 >> >> So, what is a possible solution here? >> 1. Does the packager have to change something in his/her control file and >> repackage? If so, what needs to change? >> AND/OR >> 2. Is there maybe something that can be done from within Gambas to solve the >> problem? > > I am also interested in this issue since I think it may be related to why I > am unable to install the IDE on OpenSUSE Leap 42.1. > > Just for informational purposes since I do not wish to highjack this thread, > the SPEC file from the OpenSUSE Build Service > defines a "gb-qt5-ext" component as required for the IDE when not "with qt4". > But, as far as I can tell, this component is not > provided by the sources. > > Hopefully a resolution to this issue on Debian will also provide a path to > resolve the issue on OpenSUSE. > Ref: https://bugzilla.opensuse.org/show_bug.cgi?id=969744 > > System: KDE Plasma 5.5.4, Qt 5.5.1, x86_64 > > Update: The OpenSUSE problem was just a SPEC file issue. -- Lee __ "Artificial Intelligence is no match for natural stupidity." -- Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://makebettercode.com/inteldaal-eval ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] [Gambas Bug Tracker] Bug #901: Problem with Gambas upgrade when systems upgrades from qt4 to qt5 (on Debian)
On 03/05/2016 08:43 PM, bugtrac...@gambaswiki.org wrote: > This is done because qt4 will no longer be used in stretch (so to make sure > the qt5 packages are used instead) > Gambas3 (3.5.4) is packaged to use qt4. This seems to cause the problem with > upgrading 3.5.4 to 3.8.4 > > So, what is a possible solution here? > 1. Does the packager have to change something in his/her control file and > repackage? If so, what needs to change? > AND/OR > 2. Is there maybe something that can be done from within Gambas to solve the > problem? I am also interested in this issue since I think it may be related to why I am unable to install the IDE on OpenSUSE Leap 42.1. Just for informational purposes since I do not wish to highjack this thread, the SPEC file from the OpenSUSE Build Service defines a "gb-qt5-ext" component as required for the IDE when not "with qt4". But, as far as I can tell, this component is not provided by the sources. Hopefully a resolution to this issue on Debian will also provide a path to resolve the issue on OpenSUSE. Ref: https://bugzilla.opensuse.org/show_bug.cgi?id=969744 System: KDE Plasma 5.5.4, Qt 5.5.1, x86_64 -- Lee __ "Artificial Intelligence is no match for natural stupidity." -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Problem reading attributes from XML file
Hi Markus, I created a quick command-line version with your procedures. It works fine on v3.6.2. I get a collection returned with length of one and a value of "http://exist.sourceforge.net/NS/exist;. Perhaps something has happened to your gb.xml component? On 02/27/2016 04:35 PM, Markus Schatten wrote: > Dear friends, > > I have a piece of code that was recently working, but for some reason > it stopped (using 3.5.4. currently). What I would like to do is simply > read out all attributes and their values (if they exists) from an > XmlNode. Here is what I do: > > Public Sub btnLoad_Click() >Dim xml As New XmlDocument >Dim txt As String >Dialog.Filter = ["*.xml", "XML Documents"] >If Dialog.OpenFile() Then Return >txt = File.Load(Dialog.Path) >xml.FromString(txt) >parse(xml.Root) > End > > Public Sub parse(node As XmlNode) As Collection >Dim child As XmlNode >Dim ret As New Collection >If node.Attributes Then > For Each child In node.Attributes >ret["@" & child.Name] = child.Value > Next >Endif >Return ret > End > > The XML file I'm trying to read is: > > http://exist.sourceforge.net/NS/exist;> > created="2016-02-27T19:24:55.787+01:00" owner="SYSTEM" group="dba" > permissions="rwxr-xr-x"> > created="2016-02-27T19:25:36.612+01:00" owner="SYSTEM" group="dba" > permissions="rwxr-xr-x"/> > created="2016-02-27T19:24:55.792+01:00" owner="SYSTEM" group="dba" > permissions="rwxr-xr-x"/> > > > > What happens is that in the parse function on the first entry into the > for each loop the app crashes and the following message is displayed > in the console: > > FATAL : tried to create a Gambas object with invalid type. > > I've lost the few past hours searching for a solution, but the only > thing that I found is that the error is thrown in node.cpp from the > gb.xml source (e.g. here > https://github.com/justlostintime/gambas/blob/master/gb.xml/src/node.cpp). > > What am I doing wrong? How should I get all attributes from an XmlNode? > > All the best, > > M. > > > -- > Markus Schatten, PhD > Assistant professor and head of Artificial Intelligence Lab > University of Zagreb > Faculty of Organization and Informatics > Pavlinska 2, 42000 Varazdin, Croatia > http://www.foi.hr/nastavnici/schatten.markus/index.html > http://www.researchgate.net/profile/Markus_Schatten1 > http://ai.foi.hr > > -- > Site24x7 APM Insight: Get Deep Visibility into Application Performance > APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month > Monitor end-to-end web transactions and take corrective actions now > Troubleshoot faster and improve end-user experience. Signup Now! > http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140 > ___ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Lee __ "Artificial Intelligence is no match for natural stupidity." -- Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] How to automatically select all text when first entering editable TableView cell?
On 02/25/2016 04:29 PM, Fabien Bodard wrote: > The code below work well. It seem that the code in table view interact > after the activate event on the editor. So the workaround > is to do the selection after the event. That is what my code do > > > > ' Gambas class file > > Private hEditor As TextBox > Private obs As Observer > Public Sub Form_Open() > >TableView1.Columns.Count = 3 >TableView1.Rows.Count = 4 >TableView1[0, 0].Text = "lhddhdlhddkhdkhe" >TableView1[0, 1].Text = "kljkljhdljdhdljh" > End > > Public Sub TableView1_Activate() >'Dim hEditor As TextBox >TableView1.Edit >hEditor = TableView1.Editor >obs = New Observer(hEditor, True) As "OBS" > > > End > > Public Sub OBS_GotFocus() > >hEditor.Select(0, Len(hEditor.Text)) > > End I thought indeed this was my solution, Fabien. But alas, it does not work for me on Qt. I don't have 'xdotools', Charlie, so I didn't give your interesting solution a try. But, it did give me an idea. And the solution is so simple. This works for me on Qt: Public Sub TableView1_Activate() TableView1.Edit() Desktop.SendKeys("{[Control_R]a}") Return End Thank you all for your responses. Lee __ "Artificial Intelligence is no match for natural stupidity." -- Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] How to automatically select all text when first entering editable TableView cell?
I have a project with a TableView that has the cells of certain columns defined as editable since the content can change. The problem is when the user is editing a row and uses either ENTER or an arrow key to move to the next editable cell, any existing text in the cell gets in the way and needs to be manually deleted. It's a little annoying to have to continually use the delete key, or double-click to select all the text. I'd like all the text to be selected when the cell is first entered via the keyboard, but I cannot figure out how to do that. The TableView.Activate event is raised when a cell is entered, and so I have tried the following: [code] Public Sub TableView1_Activate() Dim hTextBox As TextBox TableView1.Edit() hTextBox = TableView1.Editor hTextBox.Select() End [/code] (Note: TableView.Editor is a Control and hence does not have a Select method. But TableView.Edit uses a TextBox control by default to edit the cell.) But, it doesn't work. No error is raised, but the text is not selected. Any ideas? -- Lee __ "Artificial Intelligence is no match for natural stupidity." -- Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Solved: Incorrect: Re: 'Single instance' app cannot reuse DBus.Name
On 02/20/2016 01:13 PM, T Lee Davidson wrote: > On 02/20/2016 07:32 AM, T Lee Davidson wrote: >> >> >> Problem solved! :-) >> >> > > Well I *thought* the problem was solved. Apparently I spoke to soon from > behind bleary eyes. > So here I thought I was helping others who may have been in the same situation. As it turns out, I've just caused alot of noise because the issue was not related to the DBus Name at all. Unfortunately, I haven't the slightest clue how I didn't get an error with the fix I presented. The original DBus object class file I was using: -- ' DBusInterface class file Inherits DBusObject Create Static Public Sub Receiver(myString As String) Print "Received: " & myString End -- And, I said the fix was to do some name swapping before sending the data: ' ' Send command line args to existing instance ReceiverDbusName = DBus.Name 'Preserve receiver name DBus.Name = "org.gambas.Transient" & Application.Name ' Set different name for transient relay of args. DBus[ReceiverDbusName]["/DBusInterface"].Receiver("command line arguments") WRONG!! Don't bother with name swapping. It isn't necessary. When Gambas makes a call of the format "DBus[Application][ObjectPath].Method(Arguments)", it does not create a connection on the bus with the name of DBus.Name. It allows the DBus daemon to create a generic, number-formatted-name connection. The real problem, I've discovered, was in the DBusInterface class code. According to https://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-types : "When an application handles a method call message, it is required to return a reply." And, as you can see, the created DBusInterface object would do no such thing. The example class code should be: -- ' DBusInterface class file Inherits DBusObject Create Static Public Sub Receiver(myString As String) As Boolean '** Return type Print "Received: " & myString Return True '** Return a reply End -- *** "Artificial Intelligence is no match for natural stupidity." *** -- Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] 'Single instance' app cannot reuse DBus.Name
On 02/20/2016 07:32 AM, T Lee Davidson wrote: > > > Problem solved! :-) > > > Well I *thought* the problem was solved. Apparently I spoke to soon from behind bleary eyes. Lee __ "Artificial Intelligence is no match for natural stupidity." -- Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] 'Single instance' app cannot reuse DBus.Name
A single instance application is one in which only one instance is allowed to be running at the same time. Checking for an existing instance is quite regularly done simply with some sort of lock file or socket. If a lock is found, then just quit the app. But suppose you want to pass the current command line arguments along to the existing instance. DBus is handy for that. We can check to see if our DBus.Name, "org.gambas.[Application.Name]" by default, is already registered on the bus and behave accordingly. The pseudo-logic is: If DBusName.IsRegistered.With.DbusSessionDaemon ' There is already an instance running Send the command line args, via message, to the existing (primary) instance and quit out of the transient instance Else Go ahead and start a 'primary' instance and register our DBus.Name on the bus End In Gambas, we would send the message to the existing instance using the general format "DBus[DBus.Name][/Path/To/MyDBusObject].inMethod()". But, apparently, this particular format invisibly tries to register a connection on the bus using DBus.Name. This causes a problem, because you cannot register the same name on the bus more than once. In other words, even if you don't explicitly connect and register a name on the bus, simply trying to send a message on the bus causes an intrinsic registration; and, an exception. And you cannot use a random, guaranteed-unique name for DBus.Name or else you wouldn't know what it is and would have no way of knowing 'who' to send the message to. The solution is to change Dbus.Name in the transient instance just prior to passing along the command line data. Here is my original, error-producing code: -- ' DBusInterface class file Inherits DBusObject Create Static Public Sub Receiver(myString As String) Print "Received: " & myString End --- ' Gambas module file Public Sub Main() If DBus["org.freedesktop.DBus"]["/"].NameHasOwner(DBus.Name) Print DBus.Name & " already has an owner." ' Only one instance allowed ' ' Send command line args to existing instance DBus[DBus.Name]["/DBusInterface"].Receiver("command line arguments") ' *[1] *[2] Quit Else DBus.Session.Register(DBusInterface, "/DBusInterface") Print "Press Ctrl+C to quit." While True Wait 0.1 Wend DBus.Session.Unregister(DBusInterface) Endif End -- *[1]: That line caused "org.freedesktop.DBus.Error.Failed: No return value", and a Segmentation Fault; even though no return value should have been expected. The fix was to do some name swapping: ' ' Send command line args to existing instance ReceiverDbusName = DBus.Name 'Preserve receiver name DBus.Name = "org.gambas.Transient" & Application.Name ' Set different name for transient relay of args. DBus[ReceiverDbusName]["/DBusInterface"].Receiver("command line arguments") Problem solved! :-) -- Lee __ "Artificial Intelligence is no match for natural stupidity." -- Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] DBus.IsRegistered --> Unknown symbol
I am developing an application that conditionally registers an object on the DBus session bus. I have to use the Form_Close event to, if it was registered, unregister the object or the form will close but the application will not stop. Based on http://gambaswiki.org/wiki/comp/gb.dbus/dbus/isregistered : [quote] DBus.IsRegistered (gb.dbus) Static Function IsRegistered ( Object As DBusObject ) As Boolean Return if the specified object is registered on a DBus bus. [/quote] my code is: [code] Public Sub Form_Close() If DBus.IsRegistered(MyDBusObject) Then DBus.Session.Unregister(MyDBusObject) Endif End [/code] When the form is closed, I get, "Unknown symbol 'IsRegistered' in class 'Dbus'". Did I miss something in the documented syntax? As a temporary workaround, I can use: [code] If DBus["org.freedesktop.DBus"]["/"].NameHasOwner(DBus.Name) Then DBus.Session.Unregister(MyDBusObject) Endif [/code] But that is not very granular. System Information: [System] Gambas=3.6.2 OperatingSystem=Linux Kernel=4.1.15-desktop-2.mga5 Architecture=x86_64 Distribution=Mageia 5 Desktop=KDE4 Theme=Oxygen Language=en_US.UTF-8 Memory=2002M [Libraries] Curl=libcurl.so.4.3.0 DBus=libdbus-1.so.3.8.13 GStreamer=libgstreamer-0.10.so.0.30.0 GStreamer=libgstreamer-1.0.so.0.403.0 OpenGL=libGL.so.1.2.0 Qt4=libQtCore.so.4.8.6 -- Lee __ "Artificial Intelligence is no match for natural stupidity." -- Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Sharing libraries across projects
On 01/25/2016 07:31 PM, Benoît Minisini wrote: > 4) When creating a package of a library, the library executable will be > installed in '/usr/lib/gambas3/' ('/usr/lib/gambas3' is for > components). Maybe '/usr/share/gambas3/lib/' should be better, > to mimic 2). After all, Gambas libraries are not to be run, and are not > system shared libraries. To be in compliance with the Linux Filesystem Hierarchy Standard, shouldn't the use of '/usr/local' be considered? http://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch04s09.html: "4.9.1. Purpose The /usr/local hierarchy is for use by the system administrator when installing software locally. It needs to be safe from being overwritten when the system software is updated. It may be used for programs and data that are shareable amongst a group of hosts, but not found in /usr." Lee __ "Artificial Intelligence is no match for natural stupidity." -- Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] smtp does codified the attachment but does not show in mail reader
On 01/15/2016 08:35 AM, PICCORO McKAY Lenz wrote: > i tested and see that the documentation said someting about > SmtpClient.alternative option.. > > what does mean with: "are actually different alternatives of the same > data"?? I think that means different *formats* of the same data. For example, mail generally can be sent in text only, in HTML, or in both text and HTML. Those are just different formats of the same email message (data). Sending the message formatted as both text and HTML allows the mail client to choose which format it prefers. Apparently, though I cannot say with certainty, attachments can be handled similarly. Lee __ "Artificial Intelligence is no match for natural stupidity." -- Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140 ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] why this code not working
On 07/14/2015 12:31 PM, tsukuba GIMP user wrote: Public Sub PictureBox1_MouseDown() Dim dicer As Integer Dim dbclick As Integer dicer = Int(Rnd(1, 5)) dbclick = +1 ---Problem code If dbclick = 8 Then --- i click 8 time but it's don't run this code just like my program forget this code Form3.Text = (x) Form3.TextBox1.text = (xx!!!) Form3.Show Else Goto just_keep_moveing Endif just_keep_moveing: If dicer = 1 Then Form3.Text = () Form3.TextBox1.Text = (xxx~) Form3.Show Else If dicer = 2 Then Form3.Text = () Form3.TextBox1.text = (x!!) Form3.Show Else If dicer = 3 Then Form3.Text = () Form3.TextBox1.text = (xxx?) Form3.Show Else If dicer = 4 Then Form3.Text = () Form3.TextBox1.text = (!) Form3.Show Endif End There are a couple of reasons why the code doesn't work as I think you are expecting. 1. Because the syntax, dbclick = +1, assigns positive 1 to dbclick each time it is executed. The syntax should be dbclick += 1, or Inc dbclick. 2. You have declared dbclick within the function and it therefore gets, essentially, reset to 0 on each call of the function. Lee __ -- Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] : : why this code not working
On 07/14/2015 03:14 PM, tsukuba GIMP user wrote: No i make a mistay Mistakes not $dbclick += 1 still not working is I think it may actually be working. You just cannot see that it is, because the code after the just_keep_moveing label is resetting the value of TextBox1.text. After performing the If $dbclick = 8 test the program drops through and executes the just_keep_moveing code no matter what the value of dbclick is. Depending on what the just_keep_moveing code is supposed to do, you may need to move it to *inside* the Else block. You could either set a breakpoint at or just before the Else and examine the value of TextBox1.text, or place a 'Print hello' statement just after If $dbclick = 8 then to see if hello is printed to the IDE console. If it is, then the If $dbclick = 8 test *is* working and you need to rethink the program's logic. Lee __ -- Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] : why this code not working
On 07/14/2015 02:37 PM, tsukuba GIMP user wrote: i added the private var and in print number is working but when number is 8 it's still forget the if $dbclick = 8 then '$ is private var What is the content of your function's code now? Lee __ -- Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Question on preserving Windows EOL
On 05/17/2015 10:18 AM, Willy@develop wrote: Hi All, I've been struggling with something I would like to implement. A user asked me if it would be possible to preserve Windows EOL (CRLF) for files originating from Windows, but opened and modified in gbEdit (Gambas written texteditor). What happens now is that, if I add a few new lines to a windows originated text file, the new lines will be saved with a linux EOL (LF). The lines already having the Windows EOL (CRLF) are preserved. gbEdit makes use of a Editor control. Saving the contents is now done with a simple: File.Save($sPathFileLoaded, editMain.Text) Where $sPathFileLoaded is the full path and name of the file AND editMain.Text is the name of the Editor control holding the content. Upon opening a file gbEdit determines the EOL and returns either: CRLF for Windows EOL LF for Unix EOL CR for Classic Apple Mac EOL So I have all in place to determine when Windows EOL needs to be used upon saving. What I need is that new lines added, to a file already using Windows EOL, have to be saved with Windows EOL as well. I imagine I could save the file as a stream, making sure the proper EOL is added, but was wondering if there might be any easier way in Gambas that can do the job (as somehow that often turns out to be the case). Any suggestions? Effect the necessary EOL-type upon data entry by either: #1) A new property for the Editor control that is set to the EOL-type of the text and ensures that RETURN and ENTER effect the appropriate characters, or #2) Trapping the RETURN and ENTER key events to effect the appropriate characters. I haven't looked further into either idea. They are just off the top of my head. Lee __ Artificial Intelligence is no match for natural stupidity. -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Create Login Session
Not sure exactly what you are trying to do, but attached is an example submitted by a mail list user a while ago. A cursory search of the list archive (http://sourceforge.net/p/gambas/mailman/gambas-user/) did not turn up what I could determine as the relevant thread. And, I don't recall who it was that provided the example (maybe Tobi?), so I cannot give proper credit, sorry. Lee __ Artificial Intelligence is no match for natural stupidity. On 02/27/2015 01:35 AM, Isro' Hidayatulloh wrote: Hi, I am new Gambas user, I will make an application. But I need to login first to access another aplication using login. Did anyone create login session in gambas? how to do this? -- 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 login-form-en-0.0.2.tar.gz Description: GNU Zip compressed data -- 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
Bruce, Named pipes do indeed require a node on the file system. You might need to look into shared memory; or maybe DBUS might suit your needs. Lee __ Artificial Intelligence is no match for natural stupidity. On 02/13/2015 03:35 PM, Bruce Cunningham wrote: 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 -- 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] pls remove my email address from your list
Just go to the list address that is at the bottom of every mail sent from the list, use the Unsubscribe button and remove yourself. https://lists.sourceforge.net/lists/listinfo/gambas-user Lee __ Artificial Intelligence is no match for natural stupidity. On 02/10/2015 10:05 PM, Lakshman Thilakarathna wrote: pls remove my email address from your list. I dont know how stop your mails. i dont need those mails form 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 -- 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] Feature Request
Hey Ian, Unless I'm missing something, you're talking about an Inline IF. And, there already is one. http://gambaswiki.org/wiki/lang/iif Print IIf(True, Yes, No) ' - Yes Print IIf(False, Yes, No) ' - No Lee __ On 02/06/2015 08:51 PM, Ian wrote: Would it be possible to have a Gambas function to return a string based on a Boolean value. IFF may not be the best naming convention for the keyword but was all I could think of. Public Function IFF(InBool As Boolean, InStrTrue As String, InStrFalse As String) As String If Inbool Then Return InStrTrue Else Return InStrFalse Endif End Use example: BoolValue = True Txt_AmIHappy.Text = IFF(BoolValue,Yes- Im Using Gambas,No-I have to use VB) Of course this can be done with an If-Else or Select-Case but its a little more elegant. Cheers, Ian. -- 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] DEB packager
The environment variable for the user's home folder is not $home, but $HOME. Maybe also try ~/.myprogram. Lee __ Artificial Intelligence is no match for natural stupidity. On 02/03/2015 07:30 PM, martin p cristia wrote: In the 8th tab of the Make Installation package, you can add Extra files; how to obtain the end-user home folder? I want to install my program in the usual folder, i.e.: /home/joe/.myprogram $home/.myprogram dont work. tnx -- Saludos Ing. Martin P Cristia -- 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] Embed a specific SQLite version
Hi Christian, To use SQLite 3.8.3, you'll probably just need to install it on your system; either by compiling and installing, or by building a .deb package to install. I don't use any flavor of Ubuntu, so I can't help with that. Nor can I help with your deployment question. Lee __ Artificial Intelligence is no match for natural stupidity. On 02/01/2015 08:26 AM, Christian e Ana Luiza Britto wrote: Hi Folks, Is it possible to make Gambas access a specific version of SQLIte? I mean, I'm using a Linux Mint 17.1 (based on Ubuntu 14.04 packages). In this way, the system installs the SQLIte version 3.8.2 (that's the only that is available at the repositories 14.04). But I need to use SQLIte version 3.8.8 (at least 3.8.3 ahead...). Is it possible to embed a specific SQLite driver in my Gambas application so it can access the database independent of the SQLite driver of the Linux System. Is it possible to deploy my application with this specific SQLite driver? It's so important because I need to use Common Table Expressions (CTE), that's available only in SQLIte 3.8.3 ahead. -- 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] How to include a .so library in the .deb package?
I haven't actually done this, so I hope someone will correct me if I am wrong. But, I believe you would list your .so file in the Extra Files (step #8) section of the Make installation package process. Lee __ Artificial Intelligence is no match for natural stupidity. On 01/31/2015 10:19 AM, martin p cristia wrote: Hi: I need to include a .so library in the Installation package , how to do it? it needs to be at /usr/lib or it can reside at program folder? tnx -- 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] Explictly sized array parameters in method signatures?
This may be over-simplified, but couldn't you define a DateRange structure? Or would that not provide the constraints you need? Lee __ Artificial Intelligence is no match for natural stupidity. On 01/27/2015 08:02 PM, adamn...@gmail.com wrote: Hmm, I've never tried this before. Suppose a function GetCurrent(DateRange as Date[]), now intuitively DateRange is an array of 2 dates. No-one would be silly enough to pass an array with more than two elements would they? My cynical nature says yes they could/would. I could ignore the array length and just use DateRange[0] and DateRange[1] as the limits but that may produce confusing outcomes, or an error if DateRange contains only one element. I would like to define the function as GetCurrent(DateRange as Date[2]) but this is apparently a syntax error. Obviously, in this trivialised example, I could check the bounds of the passed array in the function body, I just expected that the runtime would check an explicitly sized array parameter. The real function is (of course) much more complex. The function requires an array of Dates[3][2] and another 5 parameters, some of which are optional. Any thoughts? Bruce -- 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] Data Base Example
Good work, Lewis. Lee __ Artificial Intelligence is no match for natural stupidity. On 01/26/2015 09:28 AM, Lewis Balentine wrote: Following a thread from last week regarding refreshing DataControl I have developed a small GUI project to demonstrate the use of DataSource and DataControl items of gb.db.form. It demonstrates how to create the data connection, move between records (first, previous, next, last), save/cancel edits, begin/commit/rollback transactions. There are 299 lines of code with the majority dedicated to enabling/disabling the various buttons. It includes a SQLite data file but should be compatable with any supported Database. I did try to publish this to the software farm but I encountered a problem with my credentials. Comments or suggestions for improvement are welcomed. Regards, Lewis Balentine P.S. Many thanks to Lee Davidson for help in working out the cancel process. -- 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] Software Farm, Unable to get password.
Could be a problem with the keyring on your desktop. On KDE, the default keyring is 'kwallet'. Not sure what it would be on Linux Mint 17 with Mate. Perhaps 'mate-keyring', or, more likely, 'gnome-keyring'. If you have it disabled or it is having issues, Gambas would/could have difficulty connecting with it. Lee __ Artificial Intelligence is no match for natural stupidity. On 01/26/2015 01:29 AM, Lewis Balentine wrote: This application has raised an unexpected error and must abbort. Unable to get password. _Desktop_passwords._get.69 Error raised when selecting Software Farm from Gambas 3.6.90 main menu page. This is a fresh update (in the past hour) of the Gambas daily build. Operating system: Linux Mint 17 with Mate desktop environment. Regards, Lewis Balentine -- 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] Use of db.Begin, db.Commit and db.Rollback with a
Martin, I must apologize for slightly misleading you. The .Update method is the more appropriate one to use to reload the data in the event of a canceled edit. The .Update method can be applied to the DataSource and it will update all bound children. And, yes, logically, if you create a record and then do not populate it with data, you would have added a blank record to the DB. But it really depends on how you create the record to begin with. For example, the clicking the New button in the Databrowser does not create a new record in the database until the data is Saved. Lee __ Artificial Intelligence is no match for natural stupidity. On 01/20/2015 08:19 AM, Martin McGlensey wrote: Lee, Thanks for your response. Yes I'm working with only one record at a time. I'm unclear as to where to use the refresh method. The form is used to input data including name, address , phone and state. There is the possibility that multiple datacontrols may be changed at one time. Must I use the refresh method with each datacontrol or can I apply it to the datasource? I've tried refreshing the datasource, in the cancel function, but that does not seem to work. There is got to be a way of refreshing all datacontrols on a form. One other question - If I create a record intending to add data and then cancel by not updating the datasource is a blank record added to the table? Thanks -- New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. http://p.sf.net/sfu/gigenet ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. http://p.sf.net/sfu/gigenet ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Use of db.Begin, db.Commit and db.Rollback with a
Well, looks like I was wrong again. Despite the documentation for DataSource.Update saying, Reload the DataSource data and update all bound child controls accordingly, it apparently tries to write to the database. The .Cancel method is the one to use to, uh, cancel any current modifications. DataSource.Cancel: Cancel any current edition of child controls. Simple sample attached. Lee __ Artificial Intelligence is no match for natural stupidity. On 01/20/2015 01:55 PM, T Lee Davidson wrote: Martin, I must apologize for slightly misleading you. The .Update method is the more appropriate one to use to reload the data in the event of a canceled edit. The .Update method can be applied to the DataSource and it will update all bound children. And, yes, logically, if you create a record and then do not populate it with data, you would have added a blank record to the DB. But it really depends on how you create the record to begin with. For example, the clicking the New button in the Databrowser does not create a new record in the database until the data is Saved. Lee On 01/20/2015 08:19 AM, Martin McGlensey wrote: Lee, Thanks for your response. Yes I'm working with only one record at a time. I'm unclear as to where to use the refresh method. The form is used to input data including name, address , phone and state. There is the possibility that multiple datacontrols may be changed at one time. Must I use the refresh method with each datacontrol or can I apply it to the datasource? I've tried refreshing the datasource, in the cancel function, but that does not seem to work. There is got to be a way of refreshing all datacontrols on a form. One other question - If I create a record intending to add data and then cancel by not updating the datasource is a blank record added to the table? Thanks -- New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. http://p.sf.net/sfu/gigenet ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user DatabaseSample-1.0.1.tar.gz Description: GNU Zip compressed data -- New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. http://p.sf.net/sfu/gigenet___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Use of db.Begin, db.Commit and db.Rollback with a datasource and datacontrols
I believe I have mislead you too, Lewis. My apologies. Look at DataSource.Update. Lee __ Artificial Intelligence is no match for natural stupidity. On 01/20/2015 01:03 PM, Lewis Balentine wrote: Mr. Speaker, I request permission to revise and extend my previous remarks ... Please see the attached sample application and data base. I used a SQlite Database but in theory these function should operate the same. I tried five ways to cancel the edits to a set of data controls. via Control Refresh via Data Source Refresh via Data Source Cancel via Closing the DB and reopening it via Data Control Tags The only one that I found that worked was to restore the content from a copy saved in the data control tags. I note that changing the 'DataControl.Value' (either via software or manually) does not set 'DataSource.Modified' or DataControl.Modified' properties to true. The operation was the same in version 3.6.2 and 3.6.9. Then again maybe I am doing something(s) wrong :-\ Regards, Lewis Balentine On 01/19/2015 07:42 PM, T Lee Davidson wrote: Hello Martin, If you are working with only one record at a time, you don't need to use transactions. Transactions are used when multiple records need to be modified in an all-or-none scenario, such as when a record, that is the one in a one-to-many relationship, needs to be deleted. In such a case, you would start a transaction with .Begin, delete the dependent records followed by the one record. Then, if all modifications are successful, you would .Commit. If there is a failure at any time during the transaction, you would .Rollback. To get the datacontrol to display the original data after a canceled edit, use the .Refresh method. Lee __ -- New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. http://p.sf.net/sfu/gigenet ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. http://p.sf.net/sfu/gigenet ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user