From psaux7 at tuta.io Sun Nov 1 11:18:28 2020 From: psaux7 at tuta.io (psaux7 at tuta.io) Date: Sun, 1 Nov 2020 11:18:28 +0100 (CET) Subject: [Gambas-user] GitLab - Something went wrong (500) Message-ID: I get an error when I click on the following links: https://gitlab.com/gambas/gambas/-/tags https://gitlab.com/gambas/gambas/-/branches 500 Whoops, something went wrong on our end. From adamnt42 at gmail.com Sun Nov 1 11:45:39 2020 From: adamnt42 at gmail.com (Bruce) Date: Sun, 1 Nov 2020 21:15:39 +1030 Subject: [Gambas-user] GitLab - Something went wrong (500) In-Reply-To: References: Message-ID: On 1/11/20 8:48 pm, psaux7--- via User wrote: > > I get an error when I click on the following links: > https://gitlab.com/gambas/gambas/-/tags > https://gitlab.com/gambas/gambas/-/branches > > 500 > Whoops, something went wrong on our end. > > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > Gitlab problem - happens in many projects. Gitlab idiots trying to make things that work "prettier" again. Useless bastards. From bsteers4 at gmail.com Sun Nov 1 18:10:25 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Sun, 1 Nov 2020 17:10:25 +0000 Subject: [Gambas-user] GitLab - Something went wrong (500) In-Reply-To: References: Message-ID: > Gitlab problem - happens in many projects. > Gitlab idiots trying to make things that work "prettier" again. > Useless bastards. > It's odd though, and only on the Gambas hub. On my fork branches show just fine. As do the tags , Tags are also broken on gambas page? BruceS -------------- next part -------------- An HTML attachment was scrubbed... URL: From mbelmonte at belmotek.net Sun Nov 1 19:03:14 2020 From: mbelmonte at belmotek.net (Martin) Date: Sun, 1 Nov 2020 19:03:14 +0100 Subject: [Gambas-user] GauchoCAD + LibreDWG In-Reply-To: References: <23eba172-cb21-7a67-0332-168711acdb08@belmotek.net> Message-ID: Well I made an little sample for research with the library because GauchoCAD is more complex and difficult to follow the code. I made an intent of structure translation but I fail again. Please check the readme.md file in the project there are some info relevant. Regards. On 1/11/20 4:19, Jussi Lahtinen wrote: > Just a quick reply, I'll look it further when I have more time. > It seems you are passing null pointer as an argument. Dwg_Data refers > to a structure. > See: > https://git.savannah.gnu.org/cgit/libredwg.git/tree/include/dwg.h#n8846 > http://gambaswiki.org/wiki/lang/structdecl > > Maybe you can just allocate the memory for it, instead of implementing > it on Gambas. > Also, please always send a project to demonstrate the problem, instead > of snipped. > > Jussi > > > > On Sun, Nov 1, 2020 at 4:19 AM Martin > wrote: > > Hi. > > First of all excuse 'nil' knowledge of C since I have just started > trying to use the library with Extern, export or whatever is the > correct name of the method. > I made a module to try to do something with the C library in > Gambas, but as expected it doesn't work :-( > > Note: I am trying to read the number of layers in a dwg plane, I > go step by step but the goal is to do many more things > See please *dwg.h* > https://git.savannah.gnu.org/cgit/libredwg.git/tree/include/dwg.h > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Library "/usr/local/lib/libredwg:0.0.11" > > 'EXPORT int dwg_read_file (const char *restrict filename, Dwg_Data > *restrict dwg); > Private Extern dwg_read_file(filename As String, Dwg_Data As > Pointer) As Integer > > 'EXPORT int dxf_read_file (const char *restrict filename, Dwg_Data > *restrict dwg); > Private Extern dxf_read_file(filename As String, Dwg_Data As > Pointer) As Integer > > 'EXPORT unsigned int dwg_get_layer_count (const Dwg_Data *restrict > dwg); > Private Extern dwg_get_layer_count(Dwg_Data As Pointer) As Integer > > Public Function info(f As String) As Pointer > > ? Dim info As Pointer > ? Dim i As Integer > ? Dim q As Integer > > ? i = dwg_read_file(f, info) > > ? q = dwg_get_layer_count(info) > > ? Return q > > End > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > On 21/10/20 4:00, Jussi Lahtinen wrote: >> What kind of help do you need? >> Let's say example, this line: >> Shell "/usr/local/bin/dwglayers -f '" & sFile & "' 2>&1 " To sOut >> >> The problem is to find equivalent function call(s) (in C) from >> the API documentation. I personally don't have the time. >> However, many here (including me) can help to translate the C >> function calls to Gambas extern function calls, if that is needed. >> >> Jussi >> >> On Wed, Oct 21, 2020 at 3:22 AM Martin > > wrote: >> >> Hi, >> I am pleased to announce that GauchoCAD[1], which as you know >> is a CAD >> made with Gambas, is in good health, at the moment the >> program is >> capable of opening autocad DWG plans (thanks to LibreDWG[2]) >> that close >> LibreCAD[3]. >> We are using the library with the Shell instruction, which is >> not the >> best in terms of performance. >> We need some help in order to do something with Extern or >> directly a >> gb.component that uses this library. Of course, if someone >> does this it >> will be useful for many other projects not just GauchoCAD. >> >> We need read/write dwg and dxf files more efficiently >> >> Here we are an script to install LibreDWG in the system >> >> ???? #!/bin/bash >> ???? git clone git://git.sv.gnu.org/libredwg.git >> >> ???? cd libredwg >> ???? sh autogen.sh >> ???? ./configure --enable-trace >> ???? make >> ???? sudo make install >> ???? make check >> ???? cd .. >> >> [1] https://github.com/tercoide/GauchoCAD >> >> [2] https://www.gnu.org/software/libredwg/ >> >> [3] https://librecad.org/ >> >> Thanks. >> Martin Belmonte >> >> >> ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- >> >> >> ----[http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sample-libredwg-0.0.1.tar.gz Type: application/gzip Size: 13620 bytes Desc: not available URL: From bsteers4 at gmail.com Sun Nov 1 19:24:01 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Sun, 1 Nov 2020 18:24:01 +0000 Subject: [Gambas-user] Gambas script gbs Application.Path Args[0] Message-ID: Is there a way to get a gambas scripts working directory ? Application.Path and Args[0] just give the temporary /tmp/gambas-1000 location tia BruceS -------------- next part -------------- An HTML attachment was scrubbed... URL: From mbelmonte at belmotek.net Sun Nov 1 19:44:27 2020 From: mbelmonte at belmotek.net (Martin) Date: Sun, 1 Nov 2020 19:44:27 +0100 Subject: [Gambas-user] Gambas script gbs Application.Path Args[0] In-Reply-To: References: Message-ID: <23d2342b-8f69-226e-6452-b3799e1e2bba@belmotek.net> Print Application.Dir On 1/11/20 19:24, Bruce Steers wrote: > > Is there a way to get a gambas scripts working directory ? > > Application.Path and Args[0] just give the temporary /tmp/gambas-1000 > location > > tia > BruceS > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Sun Nov 1 20:16:05 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Sun, 1 Nov 2020 19:16:05 +0000 Subject: [Gambas-user] Gambas script gbs Application.Path Args[0] In-Reply-To: <23d2342b-8f69-226e-6452-b3799e1e2bba@belmotek.net> References: <23d2342b-8f69-226e-6452-b3799e1e2bba@belmotek.net> Message-ID: Sorry i meant the directory the script was launched from like Args[0] and Application.Path would produce. I want to access files in the App dir like a gambas executable can. I used the word "working" there by mistake but thank you knowing .Dir works as normal is useful :) Cheers BruceS On Sun, 1 Nov 2020 at 18:52, Martin wrote: > Print Application.Dir > On 1/11/20 19:24, Bruce Steers wrote: > > > Is there a way to get a gambas scripts working directory ? > > Application.Path and Args[0] just give the temporary /tmp/gambas-1000 > location > > tia > BruceS > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Sun Nov 1 20:39:54 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Sun, 1 Nov 2020 19:39:54 +0000 Subject: [Gambas-user] where's a projects form width/height settings stored? Message-ID: Hi all. I've been thinking about seeing if it's possible to make some kind of gambas script file maker. Or less a maker and more a converter that can read a basic gambas project source made in the IDE and generate a working script file. Could be a good/quick solution to backward compatibility issues with small projects as a gambas script doesn't version check so no bytecode error (unless there's actual bytecode errors but at least it will try :) ) Class files should be easy enough just adding a few "Use" commands. (I just discovered a problem with Application.Path/Args[0] though) Forms though , bit trickier. Mostly looked like something i might be able to manage, converting a projects .form file lines into "New" statement to make the GUI. All the info seemed to be there but then... First hurdle to stumble at was finding somewhere the numbers that matched my forms width and height settings? or does the forms initial MoveScaled() setting make the form the right width but do not reflect the numbers? (never used Movescaled so no idea what it's for) tia BruceS -------------- next part -------------- An HTML attachment was scrubbed... URL: From taboege at gmail.com Sun Nov 1 20:46:12 2020 From: taboege at gmail.com (Tobias Boege) Date: Sun, 1 Nov 2020 20:46:12 +0100 Subject: [Gambas-user] Gambas script gbs Application.Path Args[0] In-Reply-To: References: <23d2342b-8f69-226e-6452-b3799e1e2bba@belmotek.net> Message-ID: <20201101194612.GC171194@highrise.localdomain> On Sun, 01 Nov 2020, Bruce Steers wrote: > Sorry i meant the directory the script was launched from like Args[0] and > Application.Path would produce. > I want to access files in the App dir like a gambas executable can. > > I used the word "working" there by mistake but thank you knowing .Dir works > as normal is useful :) > Cheers > Let me get the terminology of my answer straight: a Gambas project has a *project directory* which is where its source code, configuration and data files are stored. This can be accessible at runtime through Application.Path, but keep in mind that a Gambas script is embedded into a temporary project on the fly, so you get that project's path instead of the script file path (as you already observed), and that Application.Path of an executable will be something else (IIRC just /tmp). An executable is not unpacked into the filesystem just to be able to point Application.Path to it. Therefore any use of Application.Path in non-debugging code should raise at least two eyebrows -- chances are you're making your project unpackageable. Another thing is the current working directory (cwd), which is a familiar concept from the shell and other programming languages. The cwd at program startup is available through Application.Dir. However, the Gambas language does *not* have a concept of "current working directory", in that relative paths in your code are *always* interpreted by Gambas built-ins as relative to the project directory, never to the environment's cwd. In case you're running from an executable archive, Gambas will transparently access the files in the memory-mapped archive structure and give you their contents. You seem to want to use paths relative to Application.Dir. That property should contain the right cwd no matter how you run the Gambas program -- from a project, script or executable. But maybe you're using it wrong? I can't tell without seeing your code. Keep in mind that relative paths in your Gambas program do *not* do what you're used to from the shell! In short: - Don't refer to Application.Path for project data, use relative paths instead. - Don't use relative paths for files in the cwd, make them absolute paths with Application.Dir &/ ... Regards, Tobias -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From g4mba5 at gmail.com Sun Nov 1 21:05:09 2020 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Sun, 1 Nov 2020 21:05:09 +0100 Subject: [Gambas-user] where's a projects form width/height settings stored? In-Reply-To: References: Message-ID: Le 01/11/2020 ? 20:39, Bruce Steers a ?crit?: > > Hi all. > I've been thinking about seeing if it's possible to make some kind of > gambas script file maker. > > Or less a maker and more a converter that can read a basic gambas > project source made in the IDE and generate a working script file. > > Could be a good/quick solution to backward compatibility issues with > small projects as a gambas script doesn't version check so no bytecode > error (unless there's actual bytecode errors but at least it will try :) ) > > Class files should be easy enough just adding a few "Use" commands. > (I just discovered a problem with Application.Path/Args[0] though) > > Forms though , bit trickier. > Mostly looked like something i might be able to manage, converting a > projects .form file lines into "New" statement to make the GUI. > All the info seemed to be there but then... > > First hurdle to stumble at was finding somewhere the numbers that > matched my forms width and height settings? > > or does the forms initial MoveScaled() setting make the form the right > width but do not reflect the numbers? (never used Movescaled so no idea > what it's for) > tia > BruceS > > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > Just provides the full project source directory, and compile it before running it. No need of conversion of any kind. -- Beno?t Minisini From bsteers4 at gmail.com Sun Nov 1 22:07:29 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Sun, 1 Nov 2020 21:07:29 +0000 Subject: [Gambas-user] Gambas script gbs Application.Path Args[0] In-Reply-To: <20201101194612.GC171194@highrise.localdomain> References: <23d2342b-8f69-226e-6452-b3799e1e2bba@belmotek.net> <20201101194612.GC171194@highrise.localdomain> Message-ID: Thank you For the detailed reply there fella. In short i want the directory the command was run from. A normal exe i could use Application.Path or Args[0] to get the folder the program was launched from As for a script it cannot load a custom icon i may have in the script folder as i cannot get it via normal methods. That's my initial problem. You mistake me, i do not want the working directory at all, an error in wording. I Use application.Path or Args[0] in a few of my programs, some of them can relaunch as root by adding pkexec to Args[0] and relaunching. I use application.path to get the absolute path. Maybe i could take a look at the code and see if there is a way to pass the args[0] and application.path to the script interpreter? otherwise both things Args[0] and Application.Path are pretty useless in a script. and so far, the only real problem i've found with gambas scripting. I'm kinda digging it otherwise. Scripting could be an alternative for many things. Could be an easy to edit app in a folder full of stuff you want to process, can't have all that stuff in a gambas source folder as it would compile into the exe so a script would be ideal there. On Sun, 1 Nov 2020 at 19:47, Tobias Boege wrote: > On Sun, 01 Nov 2020, Bruce Steers wrote: > > Sorry i meant the directory the script was launched from like Args[0] and > > Application.Path would produce. > > I want to access files in the App dir like a gambas executable can. > > > > I used the word "working" there by mistake but thank you knowing .Dir > works > > as normal is useful :) > > Cheers > > > > Let me get the terminology of my answer straight: a Gambas project has a > *project directory* which is where its source code, configuration and data > files are stored. This can be accessible at runtime through > Application.Path, > but keep in mind that a Gambas script is embedded into a temporary project > on the fly, so you get that project's path instead of the script file path > (as you already observed), and that Application.Path of an executable will > be something else (IIRC just /tmp). An executable is not unpacked into the > filesystem just to be able to point Application.Path to it. Therefore any > use of Application.Path in non-debugging code should raise at least two > eyebrows -- chances are you're making your project unpackageable. > > Another thing is the current working directory (cwd), which is a familiar > concept from the shell and other programming languages. The cwd at program > startup is available through Application.Dir. However, the Gambas language > does *not* have a concept of "current working directory", in that relative > paths in your code are *always* interpreted by Gambas built-ins as relative > to the project directory, never to the environment's cwd. In case you're > running from an executable archive, Gambas will transparently access the > files in the memory-mapped archive structure and give you their contents. > > You seem to want to use paths relative to Application.Dir. That property > should contain the right cwd no matter how you run the Gambas program -- > from a project, script or executable. But maybe you're using it wrong? > I can't tell without seeing your code. Keep in mind that relative paths > in your Gambas program do *not* do what you're used to from the shell! > > In short: > > - Don't refer to Application.Path for project data, use relative > paths instead. > > - Don't use relative paths for files in the cwd, make them absolute > paths with Application.Dir &/ ... > > Regards, > Tobias > > -- > "There's an old saying: Don't change anything... ever!" -- Mr. Monk > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Sun Nov 1 22:37:03 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Sun, 1 Nov 2020 21:37:03 +0000 Subject: [Gambas-user] Gitlab merge clarity. Message-ID: Hi all. I have a gitlab question. If you get a branch forked to gambas do further modifications to it auto-update and add to gambas or is gambas safe once the merge has happened and disconnects from your branch? I noticed some after-merge activity happening by me apparently after merging and freaked out a bit and didn't want to do anything i shouldn't as i was learning the git ropes so i deleted all my branches and forks and started again. Am slightly curious to know if it's why the gambas branch pages won't load at present, did I break it? :-\ I sure hope not. But i had been considering my own gambas fork to be my own private playground where if i make something nice i could make a branch, submit a merge, and the code just get copied at that point to the main project and me not affect the main project anymore. Am i wrong there, is a branch merge a permanent link to that branch that i still manage? Just to be safe.. Cheers BruceS -------------- next part -------------- An HTML attachment was scrubbed... URL: From adamnt42 at gmail.com Sun Nov 1 23:59:32 2020 From: adamnt42 at gmail.com (Bruce) Date: Mon, 2 Nov 2020 09:29:32 +1030 Subject: [Gambas-user] Gitlab merge clarity. In-Reply-To: References: Message-ID: <86193492-2b36-cf24-abdd-f811e9f8db8b@gmail.com> On 2/11/20 8:07 am, Bruce Steers wrote: > But i had been considering my own gambas fork to be my own private > playground where if i make something nice i could make a branch, submit a > merge, and the code just get copied at that point to the main project and > me not affect the main project anymore. > Am i wrong there, is a branch merge a permanent link to that branch that i > still manage? Yes , because the merge request is just a patch file. Your forked 'code" isn't looked at at all by the merge request. b From jussi.lahtinen at gmail.com Mon Nov 2 00:30:10 2020 From: jussi.lahtinen at gmail.com (Jussi Lahtinen) Date: Mon, 2 Nov 2020 01:30:10 +0200 Subject: [Gambas-user] GauchoCAD + LibreDWG In-Reply-To: References: <23eba172-cb21-7a67-0332-168711acdb08@belmotek.net> Message-ID: Again Dwg_Data contains substructures, which you replace with null pointers. It really is not easy or small task to implement it on Gambas and I'm not even sure it is necessary..? Do you have a working sample file for the sample project, so that I could try if some simple tricks would work? Personally I would perhaps write a wrapper library in C, so that libredwg would be easy to use in Gambas side. Jussi On Sun, Nov 1, 2020 at 8:13 PM Martin wrote: > Well I made an little sample for research with the library because > GauchoCAD is more complex and difficult to follow the code. > > I made an intent of structure translation but I fail again. > > Please check the readme.md file in the project there are some info > relevant. > > Regards. > On 1/11/20 4:19, Jussi Lahtinen wrote: > > Just a quick reply, I'll look it further when I have more time. > It seems you are passing null pointer as an argument. Dwg_Data refers to a > structure. > See: > https://git.savannah.gnu.org/cgit/libredwg.git/tree/include/dwg.h#n8846 > http://gambaswiki.org/wiki/lang/structdecl > > Maybe you can just allocate the memory for it, instead of implementing it > on Gambas. > Also, please always send a project to demonstrate the problem, instead of > snipped. > > Jussi > > > > On Sun, Nov 1, 2020 at 4:19 AM Martin wrote: > >> Hi. >> First of all excuse 'nil' knowledge of C since I have just started trying >> to use the library with Extern, export or whatever is the correct name of >> the method. >> I made a module to try to do something with the C library in Gambas, but >> as expected it doesn't work :-( >> >> Note: I am trying to read the number of layers in a dwg plane, I go step >> by step but the goal is to do many more things >> See please *dwg.h* >> https://git.savannah.gnu.org/cgit/libredwg.git/tree/include/dwg.h >> >> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> Library "/usr/local/lib/libredwg:0.0.11" >> >> 'EXPORT int dwg_read_file (const char *restrict filename, Dwg_Data >> *restrict dwg); >> Private Extern dwg_read_file(filename As String, Dwg_Data As Pointer) As >> Integer >> >> 'EXPORT int dxf_read_file (const char *restrict filename, Dwg_Data >> *restrict dwg); >> Private Extern dxf_read_file(filename As String, Dwg_Data As Pointer) As >> Integer >> >> 'EXPORT unsigned int dwg_get_layer_count (const Dwg_Data *restrict dwg); >> Private Extern dwg_get_layer_count(Dwg_Data As Pointer) As Integer >> >> Public Function info(f As String) As Pointer >> >> Dim info As Pointer >> Dim i As Integer >> Dim q As Integer >> >> i = dwg_read_file(f, info) >> >> q = dwg_get_layer_count(info) >> >> Return q >> >> End >> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> >> >> On 21/10/20 4:00, Jussi Lahtinen wrote: >> >> What kind of help do you need? >> Let's say example, this line: >> Shell "/usr/local/bin/dwglayers -f '" & sFile & "' 2>&1 " To sOut >> >> The problem is to find equivalent function call(s) (in C) from the API >> documentation. I personally don't have the time. >> However, many here (including me) can help to translate the C function >> calls to Gambas extern function calls, if that is needed. >> >> Jussi >> >> On Wed, Oct 21, 2020 at 3:22 AM Martin wrote: >> >>> Hi, >>> I am pleased to announce that GauchoCAD[1], which as you know is a CAD >>> made with Gambas, is in good health, at the moment the program is >>> capable of opening autocad DWG plans (thanks to LibreDWG[2]) that close >>> LibreCAD[3]. >>> We are using the library with the Shell instruction, which is not the >>> best in terms of performance. >>> We need some help in order to do something with Extern or directly a >>> gb.component that uses this library. Of course, if someone does this it >>> will be useful for many other projects not just GauchoCAD. >>> >>> We need read/write dwg and dxf files more efficiently >>> >>> Here we are an script to install LibreDWG in the system >>> >>> #!/bin/bash >>> git clone git://git.sv.gnu.org/libredwg.git >>> cd libredwg >>> sh autogen.sh >>> ./configure --enable-trace >>> make >>> sudo make install >>> make check >>> cd .. >>> >>> [1] https://github.com/tercoide/GauchoCAD >>> >>> [2] https://www.gnu.org/software/libredwg/ >>> >>> [3] https://librecad.org/ >>> >>> Thanks. >>> Martin Belmonte >>> >>> >>> ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- >>> >> >> ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- >> >> > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vuott at tiscali.it Mon Nov 2 00:38:26 2020 From: vuott at tiscali.it (vuott at tiscali.it) Date: Mon, 02 Nov 2020 00:38:26 +0100 Subject: [Gambas-user] ERROR: Component not found: gb.form.mdi Message-ID: Hello, updating my Gambas with last Master version, at end of "make install" I obtain these errors: Compiling 'gb.scanner' component... gbc3: error: Component not found: gb.form.mdi .......... .......... Compiling gambas3... gbc3: error: Component not found: gb.form.mdi .......... .......... || || Unable to compile 'gb.form.mdi' component || Unable to compile 'gb.scanner' component || Unable to compile gambas3 || regards Con Tiscali Mobile Smart 30 4G hai minuti illimitati, 100 SMS e 30 Giga in 4G a soli 8,99? al mese. http://tisca.li/smart30 -------------- next part -------------- An HTML attachment was scrubbed... URL: From g4mba5 at gmail.com Mon Nov 2 01:40:02 2020 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Mon, 2 Nov 2020 01:40:02 +0100 Subject: [Gambas-user] ERROR: Component not found: gb.form.mdi In-Reply-To: References: Message-ID: Le 02/11/2020 ? 00:38, vuott at tiscali.it a ?crit?: > Hello, > updating my Gambas with last Master version, at end of "make install" I > obtain these errors: > ? Compiling 'gb.scanner' component... > ? gbc3: error: Component not found: gb.form.mdi > ? .......... > ? .......... > ? Compiling gambas3... > ? gbc3: error: Component not found: gb.form.mdi > ? .......... > ? .......... > ? || > ? || Unable to compile 'gb.form.mdi' component > ? || Unable to compile 'gb.scanner' component > ? || Unable to compile gambas3 > ? || > regards > > > > > Con Tiscali Mobile Smart 30 4G hai minuti illimitati, 100 SMS e 30 Giga > in 4G a soli 8,99? al mese. http://tisca.li/smart30 > > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > It should be fixed now. -- Beno?t Minisini From vuott at tiscali.it Mon Nov 2 01:50:50 2020 From: vuott at tiscali.it (vuott at tiscali.it) Date: Mon, 02 Nov 2020 01:50:50 +0100 Subject: [Gambas-user] ERROR: Component not found: gb.form.mdi In-Reply-To: References: Message-ID: Yes, now it's ok. Il 02.11.2020 01:40 Beno?t Minisini ha scritto: > Le 02/11/2020 ? 00:38, vuott at tiscali.it [3]a ?crit : > >> Hello, updating my Gambas with last Master version, at end of "make install" I obtain these errors: Compiling 'gb.scanner' component... gbc3: error: Component not found: gb.form.mdi .......... .......... Compiling gambas3... gbc3: error: Component not found: gb.form.mdi .......... .......... || || Unable to compile 'gb.form.mdi' component || Unable to compile 'gb.scanner' component || Unable to compile gambas3 || regards Con Tiscali Mobile Smart 30 4G hai minuti illimitati, 100 SMS e 30 Giga in 4G a soli 8,99EUR al mese. http://tisca.li/smart30 [1] ----[ http://gambaswiki.org/wiki/doc/netiquette [2] ]---- > > It should be fixed now. > > -- Beno?t Minisini ----[ http://gambaswiki.org/wiki/doc/netiquette [4] ]---- Con Tiscali Mobile Smart 30 4G hai minuti illimitati, 100 SMS e 30 Giga in 4G a soli 8,99? al mese. http://tisca.li/smart30 -------------- next part -------------- An HTML attachment was scrubbed... URL: From mbelmonte at belmotek.net Mon Nov 2 02:32:37 2020 From: mbelmonte at belmotek.net (Martin) Date: Mon, 2 Nov 2020 02:32:37 +0100 Subject: [Gambas-user] GauchoCAD + LibreDWG In-Reply-To: References: <23eba172-cb21-7a67-0332-168711acdb08@belmotek.net> Message-ID: <171a05c7-406a-bd48-1bdc-202e5d906862@belmotek.net> - Yes it's correct, it has a substructure, but I don't know how to treat it. - About implementing it on gambas, I have no idea whether it is convenient or not. I am honestly trying to do something, as the library promises a few features that would give the program a breakthrough. At the moment what I do is read the .txt file generated by a program called dwgread (present in test suite) and then treat it in gambas but that is very inefficient. What I want to do is directly extract the lists of entities, layers, blocks etc. and its properties to a collection in gambas to be able to recreate a model in memory and draw in OpenGL ant then alter. Now is: Shell dwgread file.dwg > file.txt , gambas file.load(file.txt) > Collection Future1:? gambas extern file.dwg > Collection Future2:? gambas lib wraper fiile.dwg > Collection - I attach one file dwg v2000 for testing. - Regarding writing a container library in C.... Reini Urban started this project on github (see below) but I don't know if it prospered and if it could serve as a guide for something. Take a look and see what you think. https://github.com/LibreDWG/gambas3-bindings Tanks Regards. Mart?n. On 2/11/20 0:30, Jussi Lahtinen wrote: > Again Dwg_Data contains substructures, which you replace with null > pointers. > It really is not easy or small task to implement it on Gambas and I'm > not even sure it is necessary..? > Do you have a working sample file for the sample project, so that I > could try if some simple tricks would work? > > Personally I would perhaps write a wrapper library in C, so that > libredwg would be easy to use in Gambas side. > > > Jussi > > > On Sun, Nov 1, 2020 at 8:13 PM Martin > wrote: > > Well I made an little sample for research with the library because > GauchoCAD is more complex and difficult to follow the code. > > I made an intent of structure translation but I fail again. > > Please check the readme.md file in the project there are some info > relevant. > > Regards. > > On 1/11/20 4:19, Jussi Lahtinen wrote: >> Just a quick reply, I'll look it further when I have more time. >> It seems you are passing null pointer as an argument. Dwg_Data >> refers to a structure. >> See: >> https://git.savannah.gnu.org/cgit/libredwg.git/tree/include/dwg.h#n8846 >> http://gambaswiki.org/wiki/lang/structdecl >> >> Maybe you can just allocate the memory for it, instead of >> implementing it on Gambas. >> Also, please always send a project to demonstrate the problem, >> instead of snipped. >> >> Jussi >> >> >> >> On Sun, Nov 1, 2020 at 4:19 AM Martin > > wrote: >> >> Hi. >> >> First of all excuse 'nil' knowledge of C since I have just >> started trying to use the library with Extern, export or >> whatever is the correct name of the method. >> I made a module to try to do something with the C library in >> Gambas, but as expected it doesn't work :-( >> >> Note: I am trying to read the number of layers in a dwg >> plane, I go step by step but the goal is to do many more things >> See please *dwg.h* >> https://git.savannah.gnu.org/cgit/libredwg.git/tree/include/dwg.h >> >> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> Library "/usr/local/lib/libredwg:0.0.11" >> >> 'EXPORT int dwg_read_file (const char *restrict filename, >> Dwg_Data *restrict dwg); >> Private Extern dwg_read_file(filename As String, Dwg_Data As >> Pointer) As Integer >> >> 'EXPORT int dxf_read_file (const char *restrict filename, >> Dwg_Data *restrict dwg); >> Private Extern dxf_read_file(filename As String, Dwg_Data As >> Pointer) As Integer >> >> 'EXPORT unsigned int dwg_get_layer_count (const Dwg_Data >> *restrict dwg); >> Private Extern dwg_get_layer_count(Dwg_Data As Pointer) As >> Integer >> >> Public Function info(f As String) As Pointer >> >> ? Dim info As Pointer >> ? Dim i As Integer >> ? Dim q As Integer >> >> ? i = dwg_read_file(f, info) >> >> ? q = dwg_get_layer_count(info) >> >> ? Return q >> >> End >> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> >> >> On 21/10/20 4:00, Jussi Lahtinen wrote: >>> What kind of help do you need? >>> Let's say example, this line: >>> Shell "/usr/local/bin/dwglayers -f '" & sFile & "' 2>&1 " To >>> sOut >>> >>> The problem is to find equivalent function call(s) (in C) >>> from the API documentation. I personally don't have the time. >>> However, many here (including me) can help to translate the >>> C function calls to Gambas extern function calls, if that is >>> needed. >>> >>> Jussi >>> >>> On Wed, Oct 21, 2020 at 3:22 AM Martin >>> > wrote: >>> >>> Hi, >>> I am pleased to announce that GauchoCAD[1], which as you >>> know is a CAD >>> made with Gambas, is in good health, at the moment the >>> program is >>> capable of opening autocad DWG plans (thanks to >>> LibreDWG[2]) that close >>> LibreCAD[3]. >>> We are using the library with the Shell instruction, >>> which is not the >>> best in terms of performance. >>> We need some help in order to do something with Extern >>> or directly a >>> gb.component that uses this library. Of course, if >>> someone does this it >>> will be useful for many other projects not just GauchoCAD. >>> >>> We need read/write dwg and dxf files more efficiently >>> >>> Here we are an script to install LibreDWG in the system >>> >>> ???? #!/bin/bash >>> ???? git clone git://git.sv.gnu.org/libredwg.git >>> >>> ???? cd libredwg >>> ???? sh autogen.sh >>> ???? ./configure --enable-trace >>> ???? make >>> ???? sudo make install >>> ???? make check >>> ???? cd .. >>> >>> [1] https://github.com/tercoide/GauchoCAD >>> >>> [2] https://www.gnu.org/software/libredwg/ >>> >>> [3] https://librecad.org/ >>> >>> Thanks. >>> Martin Belmonte >>> >>> >>> ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- >>> >>> >>> ----[http://gambaswiki.org/wiki/doc/netiquette ]---- >> > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: example_2000.dwg.tar.gz Type: application/gzip Size: 114079 bytes Desc: not available URL: From bsteers4 at gmail.com Mon Nov 2 06:22:22 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Mon, 2 Nov 2020 05:22:22 +0000 Subject: [Gambas-user] ERROR: Component not found: gb.form.mdi In-Reply-To: References: Message-ID: Broken on archlinux Beno?t (Manjaro) same error. On Mon, 2 Nov 2020 at 00:41, Beno?t Minisini wrote: > Le 02/11/2020 ? 00:38, vuott at tiscali.it a ?crit : > > Hello, > > updating my Gambas with last Master version, at end of "make install" I > > obtain these errors: > > Compiling 'gb.scanner' component... > > gbc3: error: Component not found: gb.form.mdi > > .......... > > .......... > > Compiling gambas3... > > gbc3: error: Component not found: gb.form.mdi > > .......... > > .......... > > || > > || Unable to compile 'gb.form.mdi' component > > || Unable to compile 'gb.scanner' component > > || Unable to compile gambas3 > > || > > regards > > > > > > > > > > Con Tiscali Mobile Smart 30 4G hai minuti illimitati, 100 SMS e 30 Giga > > in 4G a soli 8,99? al mese. http://tisca.li/smart30 > > > > > > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > > > > It should be fixed now. > > -- > Beno?t Minisini > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kicking177 at gmail.com Mon Nov 2 12:03:11 2020 From: kicking177 at gmail.com (KKing) Date: Mon, 2 Nov 2020 11:03:11 +0000 Subject: [Gambas-user] Make a non Gambas Window have focus and send keys to? Message-ID: <3900f7e1-abb6-286e-f8a4-dcd8a4076229@gmail.com> Back in VB6 days I remember setting up code that used Windows API's to find and make another application's window have focus and used sendkeys to mimic sending keystrokes to. Would such a thing be possible in the Gambas+Linux world? K. From bagonergi at gmail.com Mon Nov 2 12:12:15 2020 From: bagonergi at gmail.com (Gianluigi) Date: Mon, 2 Nov 2020 12:12:15 +0100 Subject: [Gambas-user] Make a non Gambas Window have focus and send keys to? In-Reply-To: <3900f7e1-abb6-286e-f8a4-dcd8a4076229@gmail.com> References: <3900f7e1-abb6-286e-f8a4-dcd8a4076229@gmail.com> Message-ID: Il giorno lun 2 nov 2020 alle ore 12:04 KKing ha scritto: > Back in VB6 days I remember setting up code that used Windows API's to > find and make another application's window have focus and used sendkeys > to mimic sending keystrokes to. > Would such a thing be possible in the Gambas+Linux world? > Yes, it is possible by activating the gb.desktop component Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Mon Nov 2 17:30:04 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Mon, 2 Nov 2020 16:30:04 +0000 Subject: [Gambas-user] Gambas script gbs Application.Path Args[0] In-Reply-To: References: Message-ID: Hi Beno?t. Would you consider this simple modification to gbs3? https://gitlab.com/bsteers4/gambas/-/commit/19cbe5853e9a3079bae2d4503c1627fc538bd850 I've made the scripter set up 2 Env variables as it runs as script. Env["Application.Path"] and Env["Args[0]"] of course they emulate the same as a normal applications would. I kept the naming Application.Path and Args[0] so converting an application to a script would require minimum modifications. I've tested it and it works great :) Cheers BruceS On Sun, 1 Nov 2020 at 18:24, Bruce Steers wrote: > > Application.Path and Args[0] just give the temporary /tmp/gambas-1000 > location > > tia > BruceS > -------------- next part -------------- An HTML attachment was scrubbed... URL: From g4mba5 at gmail.com Mon Nov 2 17:44:09 2020 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Mon, 2 Nov 2020 17:44:09 +0100 Subject: [Gambas-user] Gambas script gbs Application.Path Args[0] In-Reply-To: References: Message-ID: <3a979925-d939-23f4-7cca-d7ec61c3d089@gmail.com> Le 02/11/2020 ? 17:30, Bruce Steers a ?crit?: > Hi Beno?t. > > Would you consider this simple modification to gbs3? > https://gitlab.com/bsteers4/gambas/-/commit/19cbe5853e9a3079bae2d4503c1627fc538bd850 > > I've made the scripter set up 2 Env variables as it runs as script. > Env["Application.Path"] and > Env["Args[0]"] > > of course they emulate the same as a normal applications would. > > I kept the naming Application.Path and Args[0] so converting an > application to a script would require minimum modifications. > > I've tested it and it works great :) > Cheers > BruceS > > As I said, converting a normal application to a script is a non-sense. Just provide the source of the application and a little script that compiles and runs it. As for your proposal (which does not depend on my previous remark), even if it works great, it's awful in my opinion. Instead there should be a way of overriding Application.Path and Args[0]. Regards, -- Beno?t Minisini From bsteers4 at gmail.com Mon Nov 2 18:31:55 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Mon, 2 Nov 2020 17:31:55 +0000 Subject: [Gambas-user] Gambas script gbs Application.Path Args[0] In-Reply-To: <3a979925-d939-23f4-7cca-d7ec61c3d089@gmail.com> References: <3a979925-d939-23f4-7cca-d7ec61c3d089@gmail.com> Message-ID: On Mon, 2 Nov 2020 at 16:45, Beno?t Minisini wrote: > Le 02/11/2020 ? 17:30, Bruce Steers a ?crit : > > Hi Beno?t. > > > > Would you consider this simple modification to gbs3? > > > https://gitlab.com/bsteers4/gambas/-/commit/19cbe5853e9a3079bae2d4503c1627fc538bd850 > > > > I've made the scripter set up 2 Env variables as it runs as script. > > Env["Application.Path"] and > > Env["Args[0]"] > > I've tested it and it works great :) > > Cheers > > BruceS > > > > > > As I said, converting a normal application to a script is a non-sense. > > Just provide the source of the application and a little script that > compiles and runs it. > I disagree. I see great potential for scripting here. It could well replace bash scripting for me. To have an easy to edit text script written in basic with all the gambas bells and whistles that quick launches without having to load IDEs, comipie, move exe's to dirs etc, just have a gambas script in a dir and voilla :) This is great. I think you are underestimating the potential of what you have created here. As for converting i see many reasons for doing so , say i have an app that i would like to be slightly different depending on certain circumstances, i could create many different gambas projects, or code the app to set up differently depending on said circumstances or even simpler, create a base app using the IDE and convert it to a script and copy the script to each folder and modify as required. another reason is to create/test the application using all the features of the IDE, something you cannot do writing a script until the IDE also supports script editing/debugging/etc. once the app is made (that you want to be a script for whatever reason) then convert it. I'm not sure of the exact purpose you have for making the scripter but I see many many uses for it. with a few minor adjustments it could be perfect for so many things. (I say a few, this Args[0] thing is the only fallback i've spotted) :) > As for your proposal (which does not depend on my previous remark), even > if it works great, it's awful in my opinion. Instead there should be a > way of overriding Application.Path and Args[0]. > Well yes that was my initial thought when looking into seeing what could be done but from examining the code i see it just creates a temporary project folder and makes a project then uses "*standard*" launching method of the mock app. so it does not really create it's own app to be able to modify Application.Path property it's just using standard gbr3 to launch an app in a temporary location thus rendering Application.Path and Args[0] pretty useless. So i figured gbr3 would need to be modified somehow to be able to tell it's the scripter launching it to modify Application.Path? If you have a better idea I have the time to look into it if you point me in the right direction. My solution there I wouldn't call "awful" to be fair, I'd say "not ideal, but a suitable workaround" ;) but by the nature of how the scripter works there seemed little alternative? Respects. Bruce -------------- next part -------------- An HTML attachment was scrubbed... URL: From bagonergi at gmail.com Mon Nov 2 19:36:30 2020 From: bagonergi at gmail.com (Gianluigi) Date: Mon, 2 Nov 2020 19:36:30 +0100 Subject: [Gambas-user] ERROR: Component not found: gb.form.mdi In-Reply-To: References: Message-ID: Component not found (gb.form.mdi), unable to compile Gambas master Error in gb.scanner? >From terminal: ... Installing 'gb.web.feed' component... Error loading libfluidsynth.so.1: libfluidsynth.so.1: cannot open shared object file: No such file or directory Compiling 'gb.form.print' component... OK Installing 'gb.form.print' component... Error loading libfluidsynth.so.1: libfluidsynth.so.1: cannot open shared object file: No such file or directory Compiling 'gb.scanner' component... gbc3: error: Component not found: gb.form.mdi <-------------------------------!!! make[2]: Nothing to be done for 'install-data-am'. make[2]: Leaving directory '/home/gian/gambasdevel/comp' make[1]: Leaving directory '/home/gian/gambasdevel/comp' Making install in app make[1]: Entering directory '/home/gian/gambasdevel/app' Making install in . make[2]: Entering directory '/home/gian/gambasdevel/app' make[3]: Entering directory '/home/gian/gambasdevel/app' Installing the development environment... Compiling gambas3... gbc3: error: Component not found: gb.form.mdi Compiling gbs3... OK Installing gbs3... Installing IDE application icon... Installing IDE application menu... Installing the scripter... Registering Gambas script mimetype... Registering Gambas server page mimetype... Installing the Gambas appdata file... Installing the Gambas template projects... make[3]: Nothing to be done for 'install-data-am'. make[3]: Leaving directory '/home/gian/gambasdevel/app' make[2]: Leaving directory '/home/gian/gambasdevel/app' Making install in man make[2]: Entering directory '/home/gian/gambasdevel/app/man' make[3]: Entering directory '/home/gian/gambasdevel/app/man' make[3]: Nothing to be done for 'install-exec-am'. /usr/bin/mkdir -p '/usr/share/man/man1' /usr/bin/install -c -m 644 gambas3.1 gbs3.1 gbw3.1 '/usr/share/man/man1' make[3]: Leaving directory '/home/gian/gambasdevel/app/man' make[2]: Leaving directory '/home/gian/gambasdevel/app/man' make[1]: Leaving directory '/home/gian/gambasdevel/app' Making install in . make[1]: Entering directory '/home/gian/gambasdevel' make[2]: Entering directory '/home/gian/gambasdevel' || || Unable to compile 'gb.form.mdi' component || Unable to compile 'gb.scanner' component || Unable to compile gambas3 || make[2]: Nothing to be done for 'install-data-am'. make[2]: Leaving directory '/home/gian/gambasdevel' make[1]: Leaving directory '/home/gian/gambasdevel' -------------------------------------------------------------------------------- Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From taboege at gmail.com Mon Nov 2 19:58:20 2020 From: taboege at gmail.com (Tobias Boege) Date: Mon, 2 Nov 2020 19:58:20 +0100 Subject: [Gambas-user] Gambas script gbs Application.Path Args[0] In-Reply-To: <3a979925-d939-23f4-7cca-d7ec61c3d089@gmail.com> References: <3a979925-d939-23f4-7cca-d7ec61c3d089@gmail.com> Message-ID: <20201102185820.GD171194@highrise.localdomain> On Mon, 02 Nov 2020, Beno?t Minisini wrote: > Le 02/11/2020 ? 17:30, Bruce Steers a ?crit?: > > Hi Beno?t. > > > > Would you consider this simple modification to gbs3? > > https://gitlab.com/bsteers4/gambas/-/commit/19cbe5853e9a3079bae2d4503c1627fc538bd850 > > > > I've made the scripter set up 2 Env variables as it runs as script. > > Env["Application.Path"] and > > Env["Args[0]"] > > > > of course they emulate the same as a normal applications would. > > > > I kept the naming Application.Path and Args[0] so converting an > > application to a script would require minimum modifications. > > > > I've tested it and it works great :) > > Cheers > > BruceS > > > > > > As I said, converting a normal application to a script is a non-sense. > > Just provide the source of the application and a little script that compiles > and runs it. > > As for your proposal (which does not depend on my previous remark), even if > it works great, it's awful in my opinion. Instead there should be a way of > overriding Application.Path and Args[0]. > Maybe this commit is a better solution: https://gitlab.com/gambas/gambas/-/merge_requests/161 I'm still unsure if I understood what problem is actually intended to be solved here. My understanding is that you have a script /a/b/c.gbs3 and *besides it* some resource file, /a/b/icon.png or so. Now you want to be able to refer to the icon.png from the script? With the above commit, you can do that using File.Load(".public/icon.png") The commit adds a symlink .public/ to the generated project directory which points at the directory where the script file is located (/a/b/ in the above example). The name was chosen in analogy to the .public subdirectory for assets in gb.web.form projects. Regards, Tobias -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From bsteers4 at gmail.com Mon Nov 2 20:50:17 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Mon, 2 Nov 2020 19:50:17 +0000 Subject: [Gambas-user] Gambas script gbs Application.Path Args[0] In-Reply-To: <20201102185820.GD171194@highrise.localdomain> References: <3a979925-d939-23f4-7cca-d7ec61c3d089@gmail.com> <20201102185820.GD171194@highrise.localdomain> Message-ID: Yes that could work. Thank you. Understanding the problem.. It's a double barreled problem for me. App dir for resources yes or any other reason to know the location the script was called from but also to get the full path of the running app. Simply put it's missing something. In Gambas you have Args[0] , points to string used to launch the app. In bash you have "$0" , same thing gambas scripting is lacking this feature due to how it works. I've also used Arg[0] to relaunch an app. won't be able to do that with scripting. your solution would work for this as the app name can be derived from the scripts Arg[0] field. My solution I thought offered a simple.. sArgs0 = Iif(Not Env["Args[0]"], Args[0], Env["Args[0]"]) thus having code that simply adjusts depending on if a script or an exe. the ultimate solution would be for a gambas script to report Args[0] and Application.Path as the launched script and not the compiled temporary project. Bruce On Mon, 2 Nov 2020 at 18:59, Tobias Boege wrote: > On Mon, 02 Nov 2020, Beno?t Minisini wrote: > > Le 02/11/2020 ? 17:30, Bruce Steers a ?crit : > > > Hi Beno?t. > > > > > > Would you consider this simple modification to gbs3? > > > > https://gitlab.com/bsteers4/gambas/-/commit/19cbe5853e9a3079bae2d4503c1627fc538bd850 > > > > > > I've made the scripter set up 2 Env variables as it runs as script. > > > Env["Application.Path"] and > > > Env["Args[0]"] > > > > > > of course they emulate the same as a normal applications would. > > > > > > I kept the naming Application.Path and Args[0] so converting an > > > application to a script would require minimum modifications. > > > > > > I've tested it and it works great :) > > > Cheers > > > BruceS > > > > > > > > > > As I said, converting a normal application to a script is a non-sense. > > > > Just provide the source of the application and a little script that > compiles > > and runs it. > > > > As for your proposal (which does not depend on my previous remark), even > if > > it works great, it's awful in my opinion. Instead there should be a way > of > > overriding Application.Path and Args[0]. > > > > Maybe this commit is a better solution: > > https://gitlab.com/gambas/gambas/-/merge_requests/161 > > I'm still unsure if I understood what problem is actually intended to be > solved here. My understanding is that you have a script /a/b/c.gbs3 and > *besides it* some resource file, /a/b/icon.png or so. Now you want to be > able to refer to the icon.png from the script? With the above commit, > you can do that using > > File.Load(".public/icon.png") > > The commit adds a symlink .public/ to the generated project directory > which points at the directory where the script file is located (/a/b/ > in the above example). The name was chosen in analogy to the .public > subdirectory for assets in gb.web.form projects. > > Regards, > Tobias > > -- > "There's an old saying: Don't change anything... ever!" -- Mr. Monk > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Mon Nov 2 20:54:01 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Mon, 2 Nov 2020 19:54:01 +0000 Subject: [Gambas-user] ERROR: Component not found: gb.form.mdi In-Reply-To: References: Message-ID: Does this help Beno?t... I caught it last night on Manjaro. *Compiling 'gb.form.mdi' component...MAction.module:13:11: error: Unknown identifier: Settings* Bruce. -------------- next part -------------- An HTML attachment was scrubbed... URL: From g4mba5 at gmail.com Mon Nov 2 21:41:16 2020 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Mon, 2 Nov 2020 21:41:16 +0100 Subject: [Gambas-user] Gambas script gbs Application.Path Args[0] In-Reply-To: References: <3a979925-d939-23f4-7cca-d7ec61c3d089@gmail.com> <20201102185820.GD171194@highrise.localdomain> Message-ID: <53a278e8-c6d3-eda6-98dc-f251b810b2cf@gmail.com> Le 02/11/2020 ? 20:50, Bruce Steers a ?crit?: > > the ultimate solution would be for a gambas script to report Args[0] and > Application.Path as the launched script and not the compiled temporary > project. > This is what I was talking about. -- Beno?t Minisini From g4mba5 at gmail.com Mon Nov 2 21:43:30 2020 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Mon, 2 Nov 2020 21:43:30 +0100 Subject: [Gambas-user] Gambas script gbs Application.Path Args[0] In-Reply-To: <20201102185820.GD171194@highrise.localdomain> References: <3a979925-d939-23f4-7cca-d7ec61c3d089@gmail.com> <20201102185820.GD171194@highrise.localdomain> Message-ID: <7e8facbd-41d6-c75f-8314-4f4e2ee49922@gmail.com> Le 02/11/2020 ? 19:58, Tobias Boege a ?crit?: > > Maybe this commit is a better solution: > > https://gitlab.com/gambas/gambas/-/merge_requests/161 > > I'm still unsure if I understood what problem is actually intended to be > solved here. My understanding is that you have a script /a/b/c.gbs3 and > *besides it* some resource file, /a/b/icon.png or so. Now you want to be > able to refer to the icon.png from the script? With the above commit, > you can do that using > > File.Load(".public/icon.png") > > The commit adds a symlink .public/ to the generated project directory > which points at the directory where the script file is located (/a/b/ > in the above example). The name was chosen in analogy to the .public > subdirectory for assets in gb.web.form projects. > > Regards, > Tobias > This is clever, but I'm not sure it's a good solution, because "logically" the project "owns" the what is inside the ".public" directory, whereas we can't be sure of the status of all the files that are located in the same directory than the script. Regards, -- Beno?t Minisini From g4mba5 at gmail.com Mon Nov 2 21:45:15 2020 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Mon, 2 Nov 2020 21:45:15 +0100 Subject: [Gambas-user] ERROR: Component not found: gb.form.mdi In-Reply-To: References: Message-ID: Le 02/11/2020 ? 20:54, Bruce Steers a ?crit?: > Does this help Beno?t... > I caught it last night on Manjaro. > > *Compiling 'gb.form.mdi' component... > MAction.module:13:11: error: Unknown identifier: Settings* > > Bruce. > > Sorry, it should be fixed now. -- Beno?t Minisini From g4mba5 at gmail.com Mon Nov 2 22:32:37 2020 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Mon, 2 Nov 2020 22:32:37 +0100 Subject: [Gambas-user] Gambas script gbs Application.Path Args[0] In-Reply-To: <53a278e8-c6d3-eda6-98dc-f251b810b2cf@gmail.com> References: <3a979925-d939-23f4-7cca-d7ec61c3d089@gmail.com> <20201102185820.GD171194@highrise.localdomain> <53a278e8-c6d3-eda6-98dc-f251b810b2cf@gmail.com> Message-ID: <69d31fb1-f1e4-a94d-6ea3-7f9999162473@gmail.com> Le 02/11/2020 ? 21:41, Beno?t Minisini a ?crit?: > Le 02/11/2020 ? 20:50, Bruce Steers a ?crit?: >> >> the ultimate solution would be for a gambas script to report Args[0] >> and Application.Path as the launched script and not the compiled >> temporary project. >> > > This is what I was talking about. > Done with the last commits. -- Beno?t Minisini From g4mba5 at gmail.com Mon Nov 2 22:33:20 2020 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Mon, 2 Nov 2020 22:33:20 +0100 Subject: [Gambas-user] Gambas script gbs Application.Path Args[0] In-Reply-To: <69d31fb1-f1e4-a94d-6ea3-7f9999162473@gmail.com> References: <3a979925-d939-23f4-7cca-d7ec61c3d089@gmail.com> <20201102185820.GD171194@highrise.localdomain> <53a278e8-c6d3-eda6-98dc-f251b810b2cf@gmail.com> <69d31fb1-f1e4-a94d-6ea3-7f9999162473@gmail.com> Message-ID: Le 02/11/2020 ? 22:32, Beno?t Minisini a ?crit?: > Le 02/11/2020 ? 21:41, Beno?t Minisini a ?crit?: >> Le 02/11/2020 ? 20:50, Bruce Steers a ?crit?: >>> >>> the ultimate solution would be for a gambas script to report Args[0] >>> and Application.Path as the launched script and not the compiled >>> temporary project. >>> >> >> This is what I was talking about. >> > > Done with the last commits. > Tell me if faking Args[0] and Application.Path is enough. It should. -- Beno?t Minisini From jussi.lahtinen at gmail.com Mon Nov 2 22:36:15 2020 From: jussi.lahtinen at gmail.com (Jussi Lahtinen) Date: Mon, 2 Nov 2020 23:36:15 +0200 Subject: [Gambas-user] GauchoCAD + LibreDWG In-Reply-To: <171a05c7-406a-bd48-1bdc-202e5d906862@belmotek.net> References: <23eba172-cb21-7a67-0332-168711acdb08@belmotek.net> <171a05c7-406a-bd48-1bdc-202e5d906862@belmotek.net> Message-ID: OK, I tried to simply allocate a "random" amount of memory and rely on libredwg to handle the structure initialization, etc. It works..? I don't know what to expect. But this way it is pretty hard to access the Dwg_Data. See the attachment. IF this is useful, then next thing is to find out how much memory you will actually need, not sure how to do that easily. But maybe the library handles reallocations also, so that we don't need to care, I don't know. I noticed that libredwg has bindings to perl and python... I don't use either of those and thus know nothing about them, but maybe they could be used somehow. - Regarding writing a container library in C.... Reini Urban > started this project on github (see > below) but I don't know if it prospered and if it could serve as a guide > for something. Take a look and see what you think. > > https://github.com/LibreDWG/gambas3-bindings > It seems he is writing Gambas component for it. It's hard to say much about it, because I'm not familiar with the CAD formats, terms, features, etc. Maybe a component is a better choice, than just a simple wrapper for some functions. I think you need help from someone who not only knows C, but is also familiar with this kind of software. Jussi -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sample-libredwg-0.0.1B.tar.gz Type: application/gzip Size: 13880 bytes Desc: not available URL: From bsteers4 at gmail.com Mon Nov 2 23:14:09 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Mon, 2 Nov 2020 22:14:09 +0000 Subject: [Gambas-user] Gambas script gbs Application.Path Args[0] In-Reply-To: <69d31fb1-f1e4-a94d-6ea3-7f9999162473@gmail.com> References: <3a979925-d939-23f4-7cca-d7ec61c3d089@gmail.com> <20201102185820.GD171194@highrise.localdomain> <53a278e8-c6d3-eda6-98dc-f251b810b2cf@gmail.com> <69d31fb1-f1e4-a94d-6ea3-7f9999162473@gmail.com> Message-ID: Absolutely brilliant Beno?t , you are truly a star :) Loving it , Works exactly like a compiled exe would now. It opens up all sorts of additional possibilities with scripting :) I humbly applaud you and give much thanks. I'll be getting into much scripting now. I've been writing a simple text editor for writing/testing scripts and it uses the TextEditor and although it was written for bash scripting, sh mode lacks all those funky features the texteditor does when writing in gambas. So i'd prefer to write in gambas. Great work my good man :) Thanks again. Bruce On Mon, 2 Nov 2020 at 21:34, Beno?t Minisini wrote: > Le 02/11/2020 ? 21:41, Beno?t Minisini a ?crit : > > Le 02/11/2020 ? 20:50, Bruce Steers a ?crit : > >> > >> the ultimate solution would be for a gambas script to report Args[0] > >> and Application.Path as the launched script and not the compiled > >> temporary project. > >> > > > > This is what I was talking about. > > > > Done with the last commits. > > -- > Beno?t Minisini > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Mon Nov 2 23:16:45 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Mon, 2 Nov 2020 22:16:45 +0000 Subject: [Gambas-user] ERROR: Component not found: gb.form.mdi In-Reply-To: References: Message-ID: Yes indeed , compilation succesful on Manjaro now :) I thought that message looked key. I'm glad i saved it. On Mon, 2 Nov 2020 at 20:47, Beno?t Minisini wrote: > Le 02/11/2020 ? 20:54, Bruce Steers a ?crit : > > Does this help Beno?t... > > I caught it last night on Manjaro. > > > > *Compiling 'gb.form.mdi' component... > > MAction.module:13:11: error: Unknown identifier: Settings* > > > > Bruce. > > > > > > Sorry, it should be fixed now. > > -- > Beno?t Minisini > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From brian at westwoodsvcs.com Tue Nov 3 13:05:23 2020 From: brian at westwoodsvcs.com (=?UTF-8?B?QnJpYW4gRw==?=) Date: Tue, 03 Nov 2020 15:05:23 +0300 Subject: [Gambas-user] =?utf-8?q?Gambas_script_gbs_Application=2EPath_Arg?= =?utf-8?q?s=5B0=5D?= In-Reply-To: References: <69d31fb1-f1e4-a94d-6ea3-7f9999162473@gmail.com> Message-ID: <1604405123.419707033@f11.my.com> Bruce the only other big thing for me was changing the current working directory. If you do you need to do a class load for and classes you use before doing so or they won't load correctly. Otherwise scripts in gambas are very useful tools. -- Thanks Brian Monday, 02 November 2020, 02:15PM -08:00 from Bruce Steers bsteers4 at gmail.com : >Absolutely brilliant Beno?t , you are truly a star :) >Loving it , Works exactly like a compiled exe would now. > >It opens up all sorts of additional possibilities with scripting? :) > >I humbly applaud you and give much thanks. >I'll be getting into much scripting now. I've been writing a simple text editor for writing/testing scripts and it uses the TextEditor and although it was written for bash scripting, sh mode? lacks all those funky features the texteditor does when writing in gambas. So i'd prefer to write in gambas. > > >Great work my good man :) >Thanks again. >Bruce > >On Mon, 2 Nov 2020 at 21:34, Beno?t Minisini < g4mba5 at gmail.com> wrote: >>Le 02/11/2020 ? 21:41, Beno?t Minisini a ?crit?: > Le 02/11/2020 ? 20:50, Bruce Steers a ?crit?: >> >> the ultimate solution would be for a gambas script to report Args[0] >> and Application.Path as the launched script and not the compiled >> temporary project. >> > > This is what I was talking about. > >> >>Done with the last commits. >> >>-- >>Beno?t Minisini >> >>----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > >----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From brian at westwoodsvcs.com Tue Nov 3 12:55:03 2020 From: brian at westwoodsvcs.com (=?UTF-8?B?QnJpYW4gRw==?=) Date: Tue, 03 Nov 2020 14:55:03 +0300 Subject: [Gambas-user] =?utf-8?q?Gambas_script_gbs_Application=2EPath_Arg?= =?utf-8?q?s=5B0=5D?= In-Reply-To: References: <69d31fb1-f1e4-a94d-6ea3-7f9999162473@gmail.com> Message-ID: <1604404503.187317058@f14.my.com> I happen to agree with Bruce. This is great. I have been using scripting for doing system support for a while now.. Mostly I use scripting. -- Thanks Brian Monday, 02 November 2020, 02:15PM -08:00 from Bruce Steers bsteers4 at gmail.com : >Absolutely brilliant Beno?t , you are truly a star :) >Loving it , Works exactly like a compiled exe would now. > >It opens up all sorts of additional possibilities with scripting? :) > >I humbly applaud you and give much thanks. >I'll be getting into much scripting now. I've been writing a simple text editor for writing/testing scripts and it uses the TextEditor and although it was written for bash scripting, sh mode? lacks all those funky features the texteditor does when writing in gambas. So i'd prefer to write in gambas. > > >Great work my good man :) >Thanks again. >Bruce > >On Mon, 2 Nov 2020 at 21:34, Beno?t Minisini < g4mba5 at gmail.com> wrote: >>Le 02/11/2020 ? 21:41, Beno?t Minisini a ?crit?: > Le 02/11/2020 ? 20:50, Bruce Steers a ?crit?: >> >> the ultimate solution would be for a gambas script to report Args[0] >> and Application.Path as the launched script and not the compiled >> temporary project. >> > > This is what I was talking about. > >> >>Done with the last commits. >> >>-- >>Beno?t Minisini >> >>----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > >----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From brian at westwoodsvcs.com Tue Nov 3 15:34:20 2020 From: brian at westwoodsvcs.com (Brian G) Date: Tue, 3 Nov 2020 06:34:20 -0800 (PST) Subject: [Gambas-user] where's a projects form width/height settings stored? In-Reply-To: References: Message-ID: <1272724833.5518.1604414060291.JavaMail.zimbra@westwoodsvcs.com> I have done something like that I have emailed you directly with the files as they are too large for the mail list Its a project that acts like a gambas shell and produces correct gbs3 scripts from the input programs, or interactively It behaves like bash interactively, but creates gambas scripts in the background. Thank You Brian G From: "Bruce Steers" To: "Gambas mailing list" Sent: Sunday, November 1, 2020 11:39:54 AM Subject: [Gambas-user] where's a projects form width/height settings stored? Hi all. I've been thinking about seeing if it's possible to make some kind of gambas script file maker. Or less a maker and more a converter that can read a basic gambas project source made in the IDE and generate a working script file. Could be a good/quick solution to backward compatibility issues with small projects as a gambas script doesn't version check so no bytecode error (unless there's actual bytecode errors but at least it will try :) ) Class files should be easy enough just adding a few "Use" commands. (I just discovered a problem with Application.Path/Args[0] though) Forms though , bit trickier. Mostly looked like something i might be able to manage, converting a projects .form file lines into "New" statement to make the GUI. All the info seemed to be there but then... First hurdle to stumble at was finding somewhere the numbers that matched my forms width and height settings? or does the forms initial MoveScaled() setting make the form the right width but do not reflect the numbers? (never used Movescaled so no idea what it's for) tia BruceS ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: From kicking177 at gmail.com Tue Nov 3 16:15:23 2020 From: kicking177 at gmail.com (KKing) Date: Tue, 3 Nov 2020 15:15:23 +0000 Subject: [Gambas-user] ImageView Scrollbars hide if not required? Message-ID: If I resize the form large enough I don't want applicable ImageView scroll bar to appear e.g. Horizontal. I have the following ? If (Me.W > (intImageWidth)) Then ??? ImageView1.W = intImageWidth ? Else ??? ImageView1.W = (Me.W) ? Endif But if I resize form wider than the image I still end up with a horizontal scroll bar and very minor amount of scrolling. K. From g4mba5 at gmail.com Tue Nov 3 17:27:09 2020 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Tue, 3 Nov 2020 17:27:09 +0100 Subject: [Gambas-user] ImageView Scrollbars hide if not required? In-Reply-To: References: Message-ID: <83dc96cc-6f98-cc67-f15e-16383d5c4629@gmail.com> Le 03/11/2020 ? 16:15, KKing a ?crit?: > If I resize the form large enough I don't want applicable ImageView > scroll bar to appear e.g. Horizontal. > I have the following > ? If (Me.W > (intImageWidth)) Then > ??? ImageView1.W = intImageWidth > ? Else > ??? ImageView1.W = (Me.W) > ? Endif > But if I resize form wider than the image I still end up with a > horizontal scroll bar and very minor amount of scrolling. > K. > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- Please post a project that reproduces the problem. Regards, -- Beno?t Minisini From charlie at cogier.com Tue Nov 3 18:32:00 2020 From: charlie at cogier.com (Charlie Ogier) Date: Tue, 3 Nov 2020 17:32:00 +0000 Subject: [Gambas-user] ImageView Scrollbars hide if not required? In-Reply-To: <83dc96cc-6f98-cc67-f15e-16383d5c4629@gmail.com> References: <83dc96cc-6f98-cc67-f15e-16383d5c4629@gmail.com> Message-ID: K., The code below works for me: - Beno?t, Lower the value of 'iExtra' to see the problem Charlie '***************************************** ImageView1 As ImageView Public Sub Go() ? Dim iExtra As Integer = 2 ''On my system anything below 2 will show the scrollbar(s) ? ImageView1.Image = Picture["icon:/256/wizard"].Image ? Me.Height = ImageView1.ScrollHeight + iExtra + (Me.padding * 2) ? Me.Width = ImageView1.ScrollWidth + iExtra + (Me.padding * 2) End Public Sub Form_Open() ? With Me ??? .H = 50 ??? .W = 50 ??? .Arrangement = Arrange.Vertical ??? .Padding = 5 ? End With ? With ImageView1 = New ImageView(Me) As "ImageView1" ??? .Expand = True ? End With ? Go End '***************************************** On 03/11/2020 16:27, Beno?t Minisini wrote: > Le 03/11/2020 ? 16:15, KKing a ?crit?: >> If I resize the form large enough I don't want applicable ImageView >> scroll bar to appear e.g. Horizontal. >> I have the following >> ?? If (Me.W > (intImageWidth)) Then >> ???? ImageView1.W = intImageWidth >> ?? Else >> ???? ImageView1.W = (Me.W) >> ?? Endif >> But if I resize form wider than the image I still end up with a >> horizontal scroll bar and very minor amount of scrolling. >> K. >> >> ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > > Please post a project that reproduces the problem. > > Regards, > From bsteers4 at gmail.com Tue Nov 3 19:08:50 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Tue, 3 Nov 2020 18:08:50 +0000 Subject: [Gambas-user] Sending key code (macro recorder) Message-ID: Hi all. I'm trying to make a macro recorder to record keyboard events and play them back. Got a problem though. the recorder can record the Key.Code fine (for things like up and down arrow that do not have Key.Text) But i cannot send it back that way. According to the wiki SendKeys page it says this.. *What is sent is not a string, but the internal key codes associated with them. * Yet i try to send a Key.Code and it complains i sent an integer not a string. Am i going to have to map out a complete list of strings to match all codes that Don't have Key.Text ? Or can someone suggest a better way to record key events them play them back? And yes i read the warning about not using Key.Code as they differ between gtk and qt but for a macro recorder i do not see it matters unless i want to save the macros and use them on a different system. Many thanks. Bruce -------------- next part -------------- An HTML attachment was scrubbed... URL: From bagonergi at gmail.com Tue Nov 3 19:32:46 2020 From: bagonergi at gmail.com (Gianluigi) Date: Tue, 3 Nov 2020 19:32:46 +0100 Subject: [Gambas-user] Sending key code (macro recorder) In-Reply-To: References: Message-ID: Il giorno mar 3 nov 2020 alle ore 19:10 Bruce Steers ha scritto: > Hi all. > I'm trying to make a macro recorder to record keyboard events and play > them back. > > Got a problem though. > > the recorder can record the Key.Code fine (for things like up and down > arrow that do not have Key.Text) > But i cannot send it back that way. > > According to the wiki SendKeys page it says this.. > *What is sent is not a string, but the internal key codes associated with > them. * > Yet i try to send a Key.Code and it complains i sent an integer not a > string. > > Am i going to have to map out a complete list of strings to match all > codes that Don't have Key.Text ? > > Or can someone suggest a better way to record key events them play them > back? > > And yes i read the warning about not using Key.Code as they differ between > gtk and qt but for a macro recorder i do not see it matters unless i want > to save the macros and use them on a different system. > Not sure I understand, look for this: Print String.Chr(Key.Code) ' ? Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From bagonergi at gmail.com Tue Nov 3 19:54:07 2020 From: bagonergi at gmail.com (Gianluigi) Date: Tue, 3 Nov 2020 19:54:07 +0100 Subject: [Gambas-user] Sending key code (macro recorder) In-Reply-To: References: Message-ID: Il giorno mar 3 nov 2020 alle ore 19:32 Gianluigi ha scritto: > > > Il giorno mar 3 nov 2020 alle ore 19:10 Bruce Steers > ha scritto: > >> ... >> *What is sent is not a string, but the internal key codes associated with >> them. * >> .. >> > Not sure I understand, look for this: > Print String.Chr(Key.Code) ' ? > Sorry it doesn't seem to work anymore. But if I remember correctly it once worked :-( Benoit ? Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Tue Nov 3 20:01:00 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Tue, 3 Nov 2020 19:01:00 +0000 Subject: [Gambas-user] Sending key code (macro recorder) In-Reply-To: References: Message-ID: > > Not sure I understand, look for this: > Print String.Chr(Key.Code) ' ? > No that does not work for down arrow key. Understanding.. Recording key ascii characters is easy, I have a Key.Text property that has the character and i can Use Desktop.SendKeys() or Print to write text easy enough.. But how to record some up and down arrow key events then play them back? Page up , home, End, etc none of these keys have text only a Key.Code but the code seems a bit useless as i can't seem to do anything with it. gambas functions all seem to want something like Key["DOWN"] and not the code 65364 Cheers Bruce -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Tue Nov 3 20:44:01 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Tue, 3 Nov 2020 19:44:01 +0000 Subject: [Gambas-user] gambas not installed by package manager problems. Message-ID: It's a bit of a problem if you have compiled and installed gambas manually and not just installed via package manager. On my system i can use theGambas "Create Installation package" function and create an installation package but i cannot use it as the .deb file it makes then checks the dpkg database for what i have installed and does not find anything gambas so gives errors. Nor can i use any other .deb package installer for anything gambas. On my system because i have compiled gambas i cannot use apt-get to install anything made by the gambas packager. I also have to be careful that nothing tries to install/update a gambas dependency/component without checking first as it will try. For example if an installer just runs.. apt-get install gambas3-gb-form usually if it's already installed it just does not bother installing but in my case it will try as it does not know i already have it. Probably a situation i won't end up in but it's possible if some one has not written good enough code. If only there was a way to trick apt into thinking gambas was there. Bruce. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mbelmonte at belmotek.net Tue Nov 3 21:29:00 2020 From: mbelmonte at belmotek.net (Martin) Date: Tue, 3 Nov 2020 21:29:00 +0100 Subject: [Gambas-user] GauchoCAD + LibreDWG In-Reply-To: References: <23eba172-cb21-7a67-0332-168711acdb08@belmotek.net> <171a05c7-406a-bd48-1bdc-202e5d906862@belmotek.net> Message-ID: <418789d4-265d-0e57-dbb3-f40b6e1b5377@belmotek.net> In the link below there are some indications on the from Vuott, in Spanish but it can be useful. [1] https://gambas-es.org/showthread.php?tid=164 Regarding the component, it is what everyone here in the list said, is the optimal option, the correct thing to do due to the complexity of the library not extern, but I started to read the tutorial on how to make a component using a C library but at the moment I am not ready to the task. Then I tried something with extern because I try to do something, knows how this library works and extracting 1 single data from a dwg with extern is already a success for me because it so frustrating. Respect to bindings I don't know how its works in gambas. These conversations in themselves are motivating for me because little by little you, those who know C and Gambas, are shedding light on this topic. I am sure that in the near future we will be able to use the library. Finally, make a gambas component using libredwg is the correct way to solve the problem. I'm not sure but maybe the exercise with extern could be useful. Thank you. On 2/11/20 22:36, Jussi Lahtinen wrote: > OK, I tried to simply allocate a "random" amount of memory and rely on > libredwg to handle the structure initialization, etc. > It works..? I don't know what to expect. But this way it is pretty > hard to access the Dwg_Data. See the attachment. > IF this is useful, then next thing is to find out how much memory you > will actually need, not sure how to do that easily. But maybe the > library handles reallocations also, so that we don't need to care, I > don't know. > > I noticed that libredwg has bindings to perl and python... I don't use > either of those and thus know nothing about them, but maybe they could > be used somehow. > > - Regarding writing a container library in C.... Reini Urban > started this project on > github (see below) but I don't know if it prospered and if it > could serve as a guide for something. Take a look and see what you > think. > > https://github.com/LibreDWG/gambas3-bindings > > It seems he is writing Gambas component for it. It's hard to say much > about it, because I'm not familiar with the CAD formats, terms, > features, etc. Maybe a component is a better choice, than just a > simple wrapper for some functions. > > I think you need help from someone who not only knows C, but is also > familiar with this kind of software. > > > Jussi > > > > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: From g4mba5 at gmail.com Tue Nov 3 21:43:27 2020 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Tue, 3 Nov 2020 21:43:27 +0100 Subject: [Gambas-user] Sending key code (macro recorder) In-Reply-To: References: Message-ID: <586c3d95-2df4-5786-4cd4-d42db02af22a@gmail.com> Le 03/11/2020 ? 19:08, Bruce Steers a ?crit?: > Hi all. > I'm trying to make a macro recorder to record keyboard events and play > them back. > > Got a problem though. > > the recorder can record the Key.Code fine (for things like up and down > arrow that do not have Key.Text) > But i cannot send it back that way. > > According to the wiki SendKeys page it says? this.. > *What is sent is not a string, but the internal key codes associated > with them. * > Yet i try to send a Key.Code and it complains i sent an integer not a > string. > > Am i going to have to map out a complete list of strings to match all > codes that Don't have Key.Text ? > > Or can someone suggest a better way to record key events them play them > back? > > And yes i read the warning about not using Key.Code as they differ > between gtk and qt but for a macro recorder i do not see it matters > unless i want to save the macros and use them on a different system. > > Many thanks. > Bruce > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > Have you read the doc? The key names used by Desktop.SendKeys are the X11 one. They are nothing to do with Key class constants. So, yes, you have to integrate by hand the contents of the X11 key names include file and make the conversion. Note that this works only on X11. Wayland forbids sending key events to application, at least freely. Regards, -- Beno?t Minisini From bsteers4 at gmail.com Tue Nov 3 22:02:26 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Tue, 3 Nov 2020 21:02:26 +0000 Subject: [Gambas-user] Sending key code (macro recorder) In-Reply-To: <586c3d95-2df4-5786-4cd4-d42db02af22a@gmail.com> References: <586c3d95-2df4-5786-4cd4-d42db02af22a@gmail.com> Message-ID: Yes i read the doc , well in part. I was hoping to simply record and play back key events. But if the codes the gambas Key class gives do not correlate to what x11 wants then i think it's a project to scrap. the keysymdef file lists tons and tons of keys, for different languages charsets etc. I might have to look into external libraries to see if there is a way, maybe hack the keyboard bus if poss. thanks for the info. Bruce. > > Am i going to have to map out a complete list of strings to match all > > codes that Don't have Key.Text ? > > > > Or can someone suggest a better way to record key events them play them > > back? > > > > And yes i read the warning about not using Key.Code as they differ > > between gtk and qt but for a macro recorder i do not see it matters > > unless i want to save the macros and use them on a different system. > > > > Many thanks. > > Bruce > > > > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > > > > Have you read the doc? The key names used by Desktop.SendKeys are the > X11 one. They are nothing to do with Key class constants. So, yes, you > have to integrate by hand the contents of the X11 key names include file > and make the conversion. > > Note that this works only on X11. Wayland forbids sending key events to > application, at least freely. > > Regards, > > -- > Beno?t Minisini > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Tue Nov 3 22:17:36 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Tue, 3 Nov 2020 21:17:36 +0000 Subject: [Gambas-user] gambas not installed by package manager problems. In-Reply-To: References: Message-ID: > > > If only there was a way to trick apt into thinking gambas was there. > Can't help but think maybe there could be a way? is a hard drive repository possible? Ie. have the gambas compilation somewhere on disk you can point the package manager to and it install from there? Just throwing out ideas.. Bruce -------------- next part -------------- An HTML attachment was scrubbed... URL: From brian at westwoodsvcs.com Wed Nov 4 01:38:28 2020 From: brian at westwoodsvcs.com (=?UTF-8?B?QnJpYW4gRw==?=) Date: Wed, 04 Nov 2020 03:38:28 +0300 Subject: [Gambas-user] =?utf-8?q?gambas_not_installed_by_package_manager_?= =?utf-8?q?problems=2E?= In-Reply-To: References: Message-ID: <1604450308.735053899@f40.my.com> Build it using the autotools or such -- Thanks Brian Tuesday, 03 November 2020, 11:45AM -08:00 from Bruce Steers bsteers4 at gmail.com : > >It's a bit of a problem if you have compiled and installed gambas manually and not just installed via package manager. > >On my system i can use theGambas "Create Installation package" function and create an installation package but i cannot use it as the .deb file it makes then checks the dpkg database for what i have installed and does not find anything gambas so gives errors. > >Nor can i use any other .deb package installer for anything gambas. > >On my system because i have compiled gambas i cannot use apt-get to install anything made by the gambas packager. I also have to be careful that nothing tries to install/update a gambas dependency/component without checking first as it will try. >For example if an installer just runs.. >apt-get install gambas3-gb-form >usually if it's already installed it just does not bother installing but in my case it will try as it does not know i already have it. >Probably a situation i won't end up in but it's possible if some one has not written good enough code. > >If only there was a way to trick apt into thinking gambas was there. > >Bruce. > >----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From adamnt42 at gmail.com Wed Nov 4 03:25:48 2020 From: adamnt42 at gmail.com (Bruce) Date: Wed, 4 Nov 2020 12:55:48 +1030 Subject: [Gambas-user] gambas not installed by package manager problems. In-Reply-To: References: Message-ID: <9dfbc755-2b9a-ab0f-ea40-1e6d29f43acd@gmail.com> On 4/11/20 6:14 am, Bruce Steers wrote: > It's a bit of a problem if you have compiled and installed gambas manually > and not just installed via package manager. > > On my system i can use theGambas "Create Installation package" function and > create an installation package but i cannot use it as the .deb file it > makes then checks the dpkg database for what i have installed and does not > find anything gambas so gives errors. > Yes, this is what I was raving about approximately a month ago. There are several possible solutions. 1. Use autotools as Brian G suggests. Yhis is probably the easiest, but.. there are some rare situations with the autotools package builder that I don't think were ever resolved from years ago. You probably won't encounter them (and I've got no recollection what they were either so don't ask.) And don't forget that this is how all the gambas components get installed when you build gambas from source. So if you have problems look at those make data. 2. NASTY! hack the packae builder so it doesn't generate the package dependencies in the spec file. (oh, I'd never do that ever ;-) ) 3. Write you own installer. I have tried to do this a guzumteen times but something else has always come up and got in the way. All the stuff is there in the IDE and the project metadata to do this and it really is just a matter of moving files to where they need to go. Perhaps we could collaborate? regards bruce From kicking177 at gmail.com Wed Nov 4 09:26:05 2020 From: kicking177 at gmail.com (KKing) Date: Wed, 4 Nov 2020 08:26:05 +0000 Subject: [Gambas-user] ImageView Scrollbars hide if not required? Message-ID: <85933972-3365-3ee1-3314-3a7f914fe546@gmail.com> should clarify it is an issue for the width when the vertical scroll bar is present. i.e. as it is currently need to know if the vertical scrollbar is visible and if so it's (scrollbar) width. ?????? ImageView1.W = intImageWidth + VerticalScrollbarWidthIfVisible K. From rwe-sse at osnanet.de Wed Nov 4 09:39:07 2020 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Wed, 4 Nov 2020 09:39:07 +0100 Subject: [Gambas-user] ImageView Scrollbars hide if not required? In-Reply-To: <85933972-3365-3ee1-3314-3a7f914fe546@gmail.com> References: <85933972-3365-3ee1-3314-3a7f914fe546@gmail.com> Message-ID: Am 04.11.20 um 09:26 schrieb KKing: > should clarify it is an issue for the width when the vertical scroll bar > is present. > i.e. as it is currently need to know if the vertical scrollbar is > visible and if so it's (scrollbar) width. > ?????? ImageView1.W = intImageWidth + VerticalScrollbarWidthIfVisible > K. > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > If the extra features of an ImageView aren't needed, could you use a PictureBox? As far as I remember, it simply shows the picture/image without any other luxury. Regards Rolf From bsteers4 at gmail.com Wed Nov 4 14:43:49 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Wed, 4 Nov 2020 13:43:49 +0000 Subject: [Gambas-user] Pop_OS far from compiling gambas Message-ID: Hey all. Been trying to help someone resolve an issue getting Gambas installed on Pop_OS I think they added the PPA and Pop_OS may be built from ubuntu but it's far from ubuntu in packages. So I think the PPA has confused things , i've advised them to remove the PPa and try again as Pop_OS has gambas3.15.2 in the repo anyway and that was what he was trying to install. anyway ... I tried compiling from source and got a big list of errors, lots of dependencies missing. Attached are the errors (outputs from ./configure and my install script log) Just in case anyone cares. Like I say it's not an issue for me, Just sending the error report in case anyone wants to know. Or if there is a way anyone knows of to add the ubuntu repositories to Pop_OS to satisfy the dependencies? Or if anyone else has Pop_OS and has worked out a correct dependency list? Cheers all :) Bruce -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Pop_OS_errors.zip Type: application/zip Size: 28245 bytes Desc: not available URL: From bsteers4 at gmail.com Wed Nov 4 15:01:19 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Wed, 4 Nov 2020 14:01:19 +0000 Subject: [Gambas-user] gambas not installed by package manager problems. In-Reply-To: <1604450308.735053899@f40.my.com> References: <1604450308.735053899@f40.my.com> Message-ID: But that'd just be a workaround , also i have no idea how. Looking for a way to fix this really.. :) -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Wed Nov 4 15:20:44 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Wed, 4 Nov 2020 14:20:44 +0000 Subject: [Gambas-user] gambas not installed by package manager problems. In-Reply-To: <9dfbc755-2b9a-ab0f-ea40-1e6d29f43acd@gmail.com> References: <9dfbc755-2b9a-ab0f-ea40-1e6d29f43acd@gmail.com> Message-ID: On Wed, 4 Nov 2020 at 02:26, Bruce wrote: > On 4/11/20 6:14 am, Bruce Steers wrote: > > It's a bit of a problem if you have compiled and installed gambas > manually > > and not just installed via package manager. > > > > On my system i can use theGambas "Create Installation package" function > and > > create an installation package but i cannot use it as the .deb file it > > makes then checks the dpkg database for what i have installed and does > not > > find anything gambas so gives errors. > > > > Yes, this is what I was raving about approximately a month ago. > > There are several possible solutions. > 1. Use autotools as Brian G suggests. Yhis is probably the easiest, > but.. there are some rare situations with the autotools package builder > that I don't think were ever resolved from years ago. You probably won't > encounter them (and I've got no recollection what they were either so > don't ask.) And don't forget that this is how all the gambas components > get installed when you build gambas from source. So if you have problems > look at those make data. > so that would get the package i'm trying to install installed but still got the other issues were apt/dpkg does not know gambas is installed. > 2. NASTY! hack the packae builder so it doesn't generate the package > dependencies in the spec file. (oh, I'd never do that ever ;-) ) > I'm thinking more along the lines of hack apt/dpkg , somehow manually add gambas packages to the database without actually installing :) Or how to make a HD repository (like the CD repositories you can add If we could somehow get the compiled source into a HD repository and have apt use that? > 3. Write you own installer. I have tried to do this a guzumteen times > but something else has always come up and got in the way. All the stuff > is there in the IDE and the project metadata to do this and it really is > just a matter of moving files to where they need to go. Perhaps we could > collaborate? > I already have too , just simple bash scripts. I figured a gambas app hardly needs an installer, just add the dependencies/components and hey presto it works (it just lacks menu adding) :) I made 2, one just adds supplied dependencies. the other tries to run a gambas app and if it fails it extracts the missing dependencies from the error message and keeps trying to relaunch the app until it's got everything it needs. But these only work for standard apps, it cannot install it's own custiom components. But again i don't really see a problem with the installer, for the most part it's going to work fine for most people, it only seems to have an issue with people who have compiled gambas not installed through repo. That's what i think need a solution :) If dpkg could see the compiled gambas as installed then problem solved :) Bruce -------------- next part -------------- An HTML attachment was scrubbed... URL: From kicking177 at gmail.com Wed Nov 4 15:29:35 2020 From: kicking177 at gmail.com (KKing) Date: Wed, 4 Nov 2020 14:29:35 +0000 Subject: [Gambas-user] ImageView Scrollbars hide if not required? Message-ID: Hi Rolf, yes PictureBox works better for me in this respect without ability to know or control the ImageView scrollbar "thickness" interfering in either axis. I did start with PictureBox but something took me down the ImageView route. K. From kicking177 at gmail.com Wed Nov 4 15:30:31 2020 From: kicking177 at gmail.com (KKing) Date: Wed, 4 Nov 2020 14:30:31 +0000 Subject: [Gambas-user] TableView cell editing Message-ID: <9519cf7c-9102-d673-a6a6-1f597405f67e@gmail.com> anyone advise of example showing in cell editing of TableView cells? K. From adamnt42 at gmail.com Wed Nov 4 15:59:58 2020 From: adamnt42 at gmail.com (Bruce) Date: Thu, 5 Nov 2020 01:29:58 +1030 Subject: [Gambas-user] gambas not installed by package manager problems. In-Reply-To: References: <9dfbc755-2b9a-ab0f-ea40-1e6d29f43acd@gmail.com> Message-ID: <0269ab33-f3c0-17de-0317-e2f02d010cb8@gmail.com> On 5/11/20 12:50 am, Bruce Steers wrote: > On Wed, 4 Nov 2020 at 02:26, Bruce wrote: > >> On 4/11/20 6:14 am, Bruce Steers wrote: >>> It's a bit of a problem if you have compiled and installed gambas >> manually >>> and not just installed via package manager. >>> >>> On my system i can use theGambas "Create Installation package" function >> and >>> create an installation package but i cannot use it as the .deb file it >>> makes then checks the dpkg database for what i have installed and does >> not >>> find anything gambas so gives errors. >>> >> >> Yes, this is what I was raving about approximately a month ago. >> >> There are several possible solutions. >> 1. Use autotools as Brian G suggests. Yhis is probably the easiest, >> but.. there are some rare situations with the autotools package builder >> that I don't think were ever resolved from years ago. You probably won't >> encounter them (and I've got no recollection what they were either so >> don't ask.) And don't forget that this is how all the gambas components >> get installed when you build gambas from source. So if you have problems >> look at those make data. >> > > so that would get the package i'm trying to install installed but still got > the other issues > were apt/dpkg does not know gambas is installed. > > >> 2. NASTY! hack the packae builder so it doesn't generate the package >> dependencies in the spec file. (oh, I'd never do that ever ;-) ) >> > > I'm thinking more along the lines of hack apt/dpkg , somehow manually add > gambas packages to > the database without actually installing :) > Or how to make a HD repository (like the CD repositories you can add > If we could somehow get the compiled source into a HD repository and have > apt use that? > > > >> 3. Write you own installer. I have tried to do this a guzumteen times >> but something else has always come up and got in the way. All the stuff >> is there in the IDE and the project metadata to do this and it really is >> just a matter of moving files to where they need to go. Perhaps we could >> collaborate? >> > > I already have too , just simple bash scripts. I figured a gambas app > hardly needs an installer, > just add the dependencies/components and hey presto it works (it just lacks > menu adding) :) > I made 2, one just adds supplied dependencies. > the other tries to run a gambas app and if it fails it extracts the missing > dependencies from the error message and keeps trying to relaunch the app > until it's got everything it needs. > But these only work for standard apps, it cannot install it's own custiom > components. > > But again i don't really see a problem with the installer, for the most > part it's going to work fine for most people, it only seems to have an > issue with people who have compiled gambas not installed through repo. > That's what i think need a solution :) > If dpkg could see the compiled gambas as installed then problem solved :) i don't know about dpkg but for rpm based installation this is entirely the problem. rpm knows only about packages and nothing about installed shared libraries. It is only looking in the rpm database. I presume dpkg is similar. In fact thinking from one perspective, this is entriely politically correct. The whole idea of a package manager is to look at things from a package level only. With rpm it is possible to force an install to ignore the package dependency specifications (--nodeps). I presume that there is one for dpkg as well. However, in general I have found that this is an easy way to end up in a "broken package" situation that is not desireable. At the end of the day it looks like binary package distribution is only useful when Gambas has been installed from a package, for locally built Gambas installations autotools is the option. Oh, I almost forgot again. Don't know whether it would work with dpkg but with rpm yous can create "fake" packages that contain nothing and install them, thus satisfying the package manager's desire for "mydistro-libpickledonions-5.16-0.rpm" or whatever. There is a name for this approach that escapes me but that is another way to cope with "uninstalled deps". They are pretty easy to create, I had to do this when my distro mucked up the package structure for gambas a few years ago. b From brian at westwoodsvcs.com Wed Nov 4 15:53:20 2020 From: brian at westwoodsvcs.com (Brian G) Date: Wed, 4 Nov 2020 06:53:20 -0800 (PST) Subject: [Gambas-user] gambas not installed by package manager problems. In-Reply-To: References: <9dfbc755-2b9a-ab0f-ea40-1e6d29f43acd@gmail.com> Message-ID: <1969027657.6027.1604501600428.JavaMail.zimbra@westwoodsvcs.com> Ok, It seems that auto tools does not install all the other files needed for the project only the binary. The extra files are not installed by Autotools.. Thank You Brian G From: "Bruce Steers" To: "Gambas mailing list" Sent: Wednesday, November 4, 2020 6:20:44 AM Subject: Re: [Gambas-user] gambas not installed by package manager problems. On Wed, 4 Nov 2020 at 02:26, Bruce < [ mailto:adamnt42 at gmail.com | adamnt42 at gmail.com ] > wrote: On 4/11/20 6:14 am, Bruce Steers wrote: > It's a bit of a problem if you have compiled and installed gambas manually > and not just installed via package manager. > > On my system i can use theGambas "Create Installation package" function and > create an installation package but i cannot use it as the .deb file it > makes then checks the dpkg database for what i have installed and does not > find anything gambas so gives errors. > Yes, this is what I was raving about approximately a month ago. There are several possible solutions. 1. Use autotools as Brian G suggests. Yhis is probably the easiest, but.. there are some rare situations with the autotools package builder that I don't think were ever resolved from years ago. You probably won't encounter them (and I've got no recollection what they were either so don't ask.) And don't forget that this is how all the gambas components get installed when you build gambas from source. So if you have problems look at those make data. so that would get the package i'm trying to install installed but still got the other issues were apt/dpkg does not know gambas is installed. BQ_BEGIN 2. NASTY! hack the packae builder so it doesn't generate the package dependencies in the spec file. (oh, I'd never do that ever ;-) ) BQ_END I'm thinking more along the lines of hack apt/dpkg , somehow manually add gambas packages to the database without actually installing :) Or how to make a HD repository (like the CD repositories you can add If we could somehow get the compiled source into a HD repository and have apt use that? BQ_BEGIN 3. Write you own installer. I have tried to do this a guzumteen times but something else has always come up and got in the way. All the stuff is there in the IDE and the project metadata to do this and it really is just a matter of moving files to where they need to go. Perhaps we could collaborate? BQ_END I already have too , just simple bash scripts. I figured a gambas app hardly needs an installer, just add the dependencies/components and hey presto it works (it just lacks menu adding) :) I made 2, one just adds supplied dependencies. the other tries to run a gambas app and if it fails it extracts the missing dependencies from the error message and keeps trying to relaunch the app until it's got everything it needs. But these only work for standard apps, it cannot install it's own custiom components. But again i don't really see a problem with the installer, for the most part it's going to work fine for most people, it only seems to have an issue with people who have compiled gambas not installed through repo. That's what i think need a solution :) If dpkg could see the compiled gambas as installed then problem solved :) Bruce ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: From brian at westwoodsvcs.com Wed Nov 4 15:58:27 2020 From: brian at westwoodsvcs.com (Brian G) Date: Wed, 4 Nov 2020 06:58:27 -0800 (PST) Subject: [Gambas-user] gambas not installed by package manager problems. In-Reply-To: <1969027657.6027.1604501600428.JavaMail.zimbra@westwoodsvcs.com> References: <9dfbc755-2b9a-ab0f-ea40-1e6d29f43acd@gmail.com> <1969027657.6027.1604501600428.JavaMail.zimbra@westwoodsvcs.com> Message-ID: <1870590895.6051.1604501907348.JavaMail.zimbra@westwoodsvcs.com> How about a simple zip file that you unzip into /usr/share/gsh ... lol With the extra file... Thank You Brian G From: "Brian" To: "Gambas mailing list" Sent: Wednesday, November 4, 2020 6:53:20 AM Subject: Re: [Gambas-user] gambas not installed by package manager problems. Ok, It seems that auto tools does not install all the other files needed for the project only the binary. The extra files are not installed by Autotools.. Thank You Brian G From: "Bruce Steers" To: "Gambas mailing list" Sent: Wednesday, November 4, 2020 6:20:44 AM Subject: Re: [Gambas-user] gambas not installed by package manager problems. On Wed, 4 Nov 2020 at 02:26, Bruce < [ mailto:adamnt42 at gmail.com | adamnt42 at gmail.com ] > wrote: On 4/11/20 6:14 am, Bruce Steers wrote: > It's a bit of a problem if you have compiled and installed gambas manually > and not just installed via package manager. > > On my system i can use theGambas "Create Installation package" function and > create an installation package but i cannot use it as the .deb file it > makes then checks the dpkg database for what i have installed and does not > find anything gambas so gives errors. > Yes, this is what I was raving about approximately a month ago. There are several possible solutions. 1. Use autotools as Brian G suggests. Yhis is probably the easiest, but.. there are some rare situations with the autotools package builder that I don't think were ever resolved from years ago. You probably won't encounter them (and I've got no recollection what they were either so don't ask.) And don't forget that this is how all the gambas components get installed when you build gambas from source. So if you have problems look at those make data. so that would get the package i'm trying to install installed but still got the other issues were apt/dpkg does not know gambas is installed. BQ_BEGIN 2. NASTY! hack the packae builder so it doesn't generate the package dependencies in the spec file. (oh, I'd never do that ever ;-) ) BQ_END I'm thinking more along the lines of hack apt/dpkg , somehow manually add gambas packages to the database without actually installing :) Or how to make a HD repository (like the CD repositories you can add If we could somehow get the compiled source into a HD repository and have apt use that? BQ_BEGIN 3. Write you own installer. I have tried to do this a guzumteen times but something else has always come up and got in the way. All the stuff is there in the IDE and the project metadata to do this and it really is just a matter of moving files to where they need to go. Perhaps we could collaborate? BQ_END I already have too , just simple bash scripts. I figured a gambas app hardly needs an installer, just add the dependencies/components and hey presto it works (it just lacks menu adding) :) I made 2, one just adds supplied dependencies. the other tries to run a gambas app and if it fails it extracts the missing dependencies from the error message and keeps trying to relaunch the app until it's got everything it needs. But these only work for standard apps, it cannot install it's own custiom components. But again i don't really see a problem with the installer, for the most part it's going to work fine for most people, it only seems to have an issue with people who have compiled gambas not installed through repo. That's what i think need a solution :) If dpkg could see the compiled gambas as installed then problem solved :) Bruce ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: From brian at westwoodsvcs.com Wed Nov 4 16:17:24 2020 From: brian at westwoodsvcs.com (Brian G) Date: Wed, 4 Nov 2020 07:17:24 -0800 (PST) Subject: [Gambas-user] gambas not installed by package manager problems. In-Reply-To: <1870590895.6051.1604501907348.JavaMail.zimbra@westwoodsvcs.com> References: <9dfbc755-2b9a-ab0f-ea40-1e6d29f43acd@gmail.com> <1969027657.6027.1604501600428.JavaMail.zimbra@westwoodsvcs.com> <1870590895.6051.1604501907348.JavaMail.zimbra@westwoodsvcs.com> Message-ID: <919831780.6070.1604503044741.JavaMail.zimbra@westwoodsvcs.com> Bruce, This link s an archive that can simple be extracted to the root directory and installs all required files https://github.com/justlostintime/GambasShell/blob/master/InstallCompletely.tar.gz Lol Hope that helps, It of course does not add support for gsh type files Thank You Brian G ----- Original Message ----- From: "Brian" To: "Gambas mailing list" Subject: Re: [Gambas-user] gambas not installed by package manager problems. From brian at westwoodsvcs.com Wed Nov 4 16:27:59 2020 From: brian at westwoodsvcs.com (Brian G) Date: Wed, 4 Nov 2020 07:27:59 -0800 (PST) Subject: [Gambas-user] gambas not installed by package manager problems. In-Reply-To: <919831780.6070.1604503044741.JavaMail.zimbra@westwoodsvcs.com> References: <9dfbc755-2b9a-ab0f-ea40-1e6d29f43acd@gmail.com> <1969027657.6027.1604501600428.JavaMail.zimbra@westwoodsvcs.com> <1870590895.6051.1604501907348.JavaMail.zimbra@westwoodsvcs.com> <919831780.6070.1604503044741.JavaMail.zimbra@westwoodsvcs.com> Message-ID: <1476817902.6075.1604503679772.JavaMail.zimbra@westwoodsvcs.com> Bruce for forcing and no checking you can also do the following You can also do the follow with the deb package dpkg --force-all -i gsh* dpkg --force-all -i gambas3-westwood-sharedmem* Thank You Brian G ----- Original Message ----- From: "Brian" To: "Gambas mailing list" Sent: Wednesday, November 4, 2020 7:17:24 AM Subject: Re: [Gambas-user] gambas not installed by package manager problems. Bruce, This link s an archive that can simple be extracted to the root directory and installs all required files https://github.com/justlostintime/GambasShell/blob/master/InstallCompletely.tar.gz Lol Hope that helps, It of course does not add support for gsh type files Thank You Brian G ----- Original Message ----- From: "Brian" To: "Gambas mailing list" Subject: Re: [Gambas-user] gambas not installed by package manager problems. From bsteers4 at gmail.com Wed Nov 4 16:46:41 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Wed, 4 Nov 2020 15:46:41 +0000 Subject: [Gambas-user] gambas not installed by package manager problems. In-Reply-To: <1870590895.6051.1604501907348.JavaMail.zimbra@westwoodsvcs.com> References: <9dfbc755-2b9a-ab0f-ea40-1e6d29f43acd@gmail.com> <1969027657.6027.1604501600428.JavaMail.zimbra@westwoodsvcs.com> <1870590895.6051.1604501907348.JavaMail.zimbra@westwoodsvcs.com> Message-ID: It all got a bit complicated for me. i got to load your source and compiled it but i don't know how to get the sharedmem component installed. for libraries you just set it as a library, compile and then gambas can see it and use it. for components they do not auto-install and i don't know how to get them to :( (still a newb on that) I made a library once but decided that libraries/components were not the way to go if you want to distribute an app with no worries. i decided modules and classes included with the app was better for my needs anyway , i'm just a basic basic programmer ;) just copying the SharedMem.gambas component to /usr/lib/gambas3 didn't work and i also had to re-write the gsh source a bit as it was trying to use "SharedMem.command" but the component installed as Memcached so i had to change all the SharedMem. instructions tro Memcached. still cannot get it to work though :( I only got this far as one of my os's does not have compiled gambas but 3.14 repo version and it installed fine on that. but i didn't check it out as i was just trying to get it compiled to install on my main os at the time. It sounds like a cool piece of software but i can only install it on an os that has repo installed gambas and it's a test os that one, not got much else on it i just use it for testing my apps on for compatibility. My best option to install any app made with the gambas packager is to remove the compiled version and install a repo version. But i like having a gambas i can adjust to my desires. i've got a few additions to mine i want to keep, i merge Beno?ts latest commits to my branch and keep my additions that way. it saves me from being a "Beno?t can you do this,, Beno?t can you do that, can you merge this" kind of guy lol I'm only suggesting merges i think will be a great benefit to all now. My own personal mods i can just have myself :) BruceS On Wed, 4 Nov 2020 at 15:09, Brian G wrote: > How about a simple zip file that you unzip into /usr/share/gsh ... lol > With the extra file... > > Thank You > Brian G > > ------------------------------ > *From: *"Brian" > *To: *"Gambas mailing list" > *Sent: *Wednesday, November 4, 2020 6:53:20 AM > *Subject: *Re: [Gambas-user] gambas not installed by package manager > problems. > > Ok, It seems that auto tools does not install all the other files needed > for the project only the binary. > The extra files are not installed by Autotools.. > > Thank You > Brian G > > ------------------------------ > *From: *"Bruce Steers" > *To: *"Gambas mailing list" > *Sent: *Wednesday, November 4, 2020 6:20:44 AM > *Subject: *Re: [Gambas-user] gambas not installed by package manager > problems. > > > > On Wed, 4 Nov 2020 at 02:26, Bruce wrote: > >> On 4/11/20 6:14 am, Bruce Steers wrote: >> > It's a bit of a problem if you have compiled and installed gambas >> manually >> > and not just installed via package manager. >> > >> > On my system i can use theGambas "Create Installation package" function >> and >> > create an installation package but i cannot use it as the .deb file it >> > makes then checks the dpkg database for what i have installed and does >> not >> > find anything gambas so gives errors. >> > >> >> Yes, this is what I was raving about approximately a month ago. >> >> There are several possible solutions. >> 1. Use autotools as Brian G suggests. Yhis is probably the easiest, >> but.. there are some rare situations with the autotools package builder >> that I don't think were ever resolved from years ago. You probably won't >> encounter them (and I've got no recollection what they were either so >> don't ask.) And don't forget that this is how all the gambas components >> get installed when you build gambas from source. So if you have problems >> look at those make data. >> > > so that would get the package i'm trying to install installed but still > got the other issues > were apt/dpkg does not know gambas is installed. > > >> 2. NASTY! hack the packae builder so it doesn't generate the package >> dependencies in the spec file. (oh, I'd never do that ever ;-) ) >> > > I'm thinking more along the lines of hack apt/dpkg , somehow manually add > gambas packages to > the database without actually installing :) > Or how to make a HD repository (like the CD repositories you can add > If we could somehow get the compiled source into a HD repository and have > apt use that? > > > >> 3. Write you own installer. I have tried to do this a guzumteen times >> but something else has always come up and got in the way. All the stuff >> is there in the IDE and the project metadata to do this and it really is >> just a matter of moving files to where they need to go. Perhaps we could >> collaborate? >> > > I already have too , just simple bash scripts. I figured a gambas app > hardly needs an installer, > just add the dependencies/components and hey presto it works (it just > lacks menu adding) :) > I made 2, one just adds supplied dependencies. > the other tries to run a gambas app and if it fails it extracts the > missing dependencies from the error message and keeps trying to relaunch > the app until it's got everything it needs. > But these only work for standard apps, it cannot install it's own custiom > components. > > But again i don't really see a problem with the installer, for the most > part it's going to work fine for most people, it only seems to have an > issue with people who have compiled gambas not installed through repo. > That's what i think need a solution :) > If dpkg could see the compiled gambas as installed then problem solved :) > Bruce > > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From charlie at cogier.com Wed Nov 4 15:59:24 2020 From: charlie at cogier.com (Charlie Ogier) Date: Wed, 4 Nov 2020 14:59:24 +0000 Subject: [Gambas-user] TableView cell editing In-Reply-To: <9519cf7c-9102-d673-a6a6-1f597405f67e@gmail.com> References: <9519cf7c-9102-d673-a6a6-1f597405f67e@gmail.com> Message-ID: <4f7993b7-0799-f638-b734-b1ce9a0eb114@cogier.com> Hi K., try this: - ****************************************************** TableView1 As TableView sText As String[] = Split("anyone advise of example showing in cell editing of TableView cells", " ") Public Sub Form_Open() ? With Me ??? .H = 300 ??? .W = 300 ??? .Arrangement = Arrange.Vertical ??? .Padding = 5 ? End With ? With TableView1 = New TableView(Me) As "TableView1" ??? .Columns.Count = 1 ??? .Rows.Count = sText.Count ??? .Expand = True ? End With End Public Sub TableView1_Click() ? TableView1.edit() End Public Sub TableView1_Data(Row As Integer, Column As Integer) ? TableView1.Data.Text = sText[Row] End Public Sub TableView1_Save(Row As Integer, Column As Integer, Value As String) ? TableView1[Row, Column].Text = Value End ****************************************************** Charlie On 04/11/2020 14:30, KKing wrote: > anyone advise of example showing in cell editing of TableView cells From chrisml at deganius.de Wed Nov 4 17:20:34 2020 From: chrisml at deganius.de (Christof Thalhofer) Date: Wed, 4 Nov 2020 17:20:34 +0100 Subject: [Gambas-user] gambas not installed by package manager problems. In-Reply-To: References: <9dfbc755-2b9a-ab0f-ea40-1e6d29f43acd@gmail.com> <1969027657.6027.1604501600428.JavaMail.zimbra@westwoodsvcs.com> <1870590895.6051.1604501907348.JavaMail.zimbra@westwoodsvcs.com> Message-ID: <39a23d4a-d618-8d5d-fa7d-849207723c0b@deganius.de> Hi, we talked in the mailinglist about that some time ago. You may want to have a look at this thread: https://lists.gambas-basic.org/pipermail/user/2020-February/068640.html For me I came to the result to compile and package my Gambas software with makefiles and the debian tool 'dpkg-buildpackage -b'. For that I have to maintain a ./debian folder and a ./debian/control file which contains strings like that: ------------------------------------------------------------------------ Depends: postgresql-client, texlive, texlive-latex-extra, ... Recommends: gambas3-runtime, gambas3-gb-image, gambas3-gb-qt4, gambas3-gb-args, gambas3-gb-form, ... ------------------------------------------------------------------------ A Debian package is created with 'dpkg-buildpackage -b' called in the folder where the makefile resides. Later the package can be installed on a machine with precompiled Gambas like so: apt-get --no-install-recommends install package-xyz.deb The caveat is that I have to create and maintain scripts which call dpkg-buildpackage which calls a makefile for each Debian package. The advantage of this approach is that I can pack more that one Gambas project into a Debian package. And with two calls of scripts I can compile and (Gambas)-package the project, create a Debian package from that and push it to the server, which provides the debian packages via Apt. Alles Gute Christof Thalhofer -- [x] nail here for new monitor From brian at westwoodsvcs.com Wed Nov 4 17:12:43 2020 From: brian at westwoodsvcs.com (Brian G) Date: Wed, 4 Nov 2020 08:12:43 -0800 (PST) Subject: [Gambas-user] gambas not installed by package manager problems. In-Reply-To: References: <9dfbc755-2b9a-ab0f-ea40-1e6d29f43acd@gmail.com> <1969027657.6027.1604501600428.JavaMail.zimbra@westwoodsvcs.com> <1870590895.6051.1604501907348.JavaMail.zimbra@westwoodsvcs.com> Message-ID: <1994784163.6275.1604506363176.JavaMail.zimbra@westwoodsvcs.com> Bruce lets start again: Goto this link: [ https://github.com/justlostintime/GambasShell/tree/master | https://github.com/justlostintime/GambasShell/tree/master ] download the following for ubuntu based lunix versions: gsh_1.2.80-0ubuntu5_all.deb gambas3-westwood-sharedmem_3.15.2-0ubuntu30_all.deb or the version for your linux version install with the following instructions dpkg --force-all -i gsh* dpkg --force-all -i gambas3-westwood-sharedmem* This Link gives the usage and documentation for gsh https://github.com/justlostintime/GambasShell/wiki It would be great if you could properly evaluate the gsh environment, I would love to get some feedback from you about the actual tool! Source repos are here: [ https://github.com/justlostintime/sharedmem | https://github.com/justlostintime/sharedmem ] https://github.com/justlostintime/gsh Hope this works for you! Brian G From: "Bruce Steers" To: "Gambas mailing list" Sent: Wednesday, November 4, 2020 7:46:41 AM Subject: Re: [Gambas-user] gambas not installed by package manager problems. It all got a bit complicated for me. i got to load your source and compiled it but i don't know how to get the sharedmem component installed. for libraries you just set it as a library, compile and then gambas can see it and use it. for components they do not auto-install and i don't know how to get them to :( (still a newb on that) I made a library once but decided that libraries/components were not the way to go if you want to distribute an app with no worries. i decided modules and classes included with the app was better for my needs anyway , i'm just a basic basic programmer ;) just copying the SharedMem.gambas component to /usr/lib/gambas3 didn't work and i also had to re-write the gsh source a bit as it was trying to use "SharedMem.command" but the component installed as Memcached so i had to change all the SharedMem. instructions tro Memcached. still cannot get it to work though :( I only got this far as one of my os's does not have compiled gambas but 3.14 repo version and it installed fine on that. but i didn't check it out as i was just trying to get it compiled to install on my main os at the time. It sounds like a cool piece of software but i can only install it on an os that has repo installed gambas and it's a test os that one, not got much else on it i just use it for testing my apps on for compatibility. My best option to install any app made with the gambas packager is to remove the compiled version and install a repo version. But i like having a gambas i can adjust to my desires. i've got a few additions to mine i want to keep, i merge Beno?ts latest commits to my branch and keep my additions that way. it saves me from being a "Beno?t can you do this,, Beno?t can you do that, can you merge this" kind of guy lol I'm only suggesting merges i think will be a great benefit to all now. My own personal mods i can just have myself :) BruceS On Wed, 4 Nov 2020 at 15:09, Brian G < [ mailto:brian at westwoodsvcs.com | brian at westwoodsvcs.com ] > wrote: How about a simple zip file that you unzip into /usr/share/gsh ... lol With the extra file... Thank You Brian G From: "Brian" < [ mailto:brian at westwoodsvcs.com | brian at westwoodsvcs.com ] > To: "Gambas mailing list" < [ mailto:user at lists.gambas-basic.org | user at lists.gambas-basic.org ] > Sent: Wednesday, November 4, 2020 6:53:20 AM Subject: Re: [Gambas-user] gambas not installed by package manager problems. Ok, It seems that auto tools does not install all the other files needed for the project only the binary. The extra files are not installed by Autotools.. Thank You Brian G From: "Bruce Steers" < [ mailto:bsteers4 at gmail.com | bsteers4 at gmail.com ] > To: "Gambas mailing list" < [ mailto:user at lists.gambas-basic.org | user at lists.gambas-basic.org ] > Sent: Wednesday, November 4, 2020 6:20:44 AM Subject: Re: [Gambas-user] gambas not installed by package manager problems. On Wed, 4 Nov 2020 at 02:26, Bruce < [ mailto:adamnt42 at gmail.com | adamnt42 at gmail.com ] > wrote: BQ_BEGIN On 4/11/20 6:14 am, Bruce Steers wrote: > It's a bit of a problem if you have compiled and installed gambas manually > and not just installed via package manager. > > On my system i can use theGambas "Create Installation package" function and > create an installation package but i cannot use it as the .deb file it > makes then checks the dpkg database for what i have installed and does not > find anything gambas so gives errors. > Yes, this is what I was raving about approximately a month ago. There are several possible solutions. 1. Use autotools as Brian G suggests. Yhis is probably the easiest, but.. there are some rare situations with the autotools package builder that I don't think were ever resolved from years ago. You probably won't encounter them (and I've got no recollection what they were either so don't ask.) And don't forget that this is how all the gambas components get installed when you build gambas from source. So if you have problems look at those make data. so that would get the package i'm trying to install installed but still got the other issues were apt/dpkg does not know gambas is installed. BQ_BEGIN 2. NASTY! hack the packae builder so it doesn't generate the package dependencies in the spec file. (oh, I'd never do that ever ;-) ) BQ_END I'm thinking more along the lines of hack apt/dpkg , somehow manually add gambas packages to the database without actually installing :) Or how to make a HD repository (like the CD repositories you can add If we could somehow get the compiled source into a HD repository and have apt use that? BQ_BEGIN 3. Write you own installer. I have tried to do this a guzumteen times but something else has always come up and got in the way. All the stuff is there in the IDE and the project metadata to do this and it really is just a matter of moving files to where they need to go. Perhaps we could collaborate? BQ_END I already have too , just simple bash scripts. I figured a gambas app hardly needs an installer, just add the dependencies/components and hey presto it works (it just lacks menu adding) :) I made 2, one just adds supplied dependencies. the other tries to run a gambas app and if it fails it extracts the missing dependencies from the error message and keeps trying to relaunch the app until it's got everything it needs. But these only work for standard apps, it cannot install it's own custiom components. But again i don't really see a problem with the installer, for the most part it's going to work fine for most people, it only seems to have an issue with people who have compiled gambas not installed through repo. That's what i think need a solution :) If dpkg could see the compiled gambas as installed then problem solved :) Bruce ----[ [ http://gambaswiki.org/wiki/doc/netiquette | http://gambaswiki.org/wiki/doc/netiquette ] ]---- ----[ [ http://gambaswiki.org/wiki/doc/netiquette | http://gambaswiki.org/wiki/doc/netiquette ] ]---- BQ_END ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Wed Nov 4 17:33:29 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Wed, 4 Nov 2020 16:33:29 +0000 Subject: [Gambas-user] gambas not installed by package manager problems. In-Reply-To: <919831780.6070.1604503044741.JavaMail.zimbra@westwoodsvcs.com> References: <9dfbc755-2b9a-ab0f-ea40-1e6d29f43acd@gmail.com> <1969027657.6027.1604501600428.JavaMail.zimbra@westwoodsvcs.com> <1870590895.6051.1604501907348.JavaMail.zimbra@westwoodsvcs.com> <919831780.6070.1604503044741.JavaMail.zimbra@westwoodsvcs.com> Message-ID: excellent Brian cheers, working now :) On Wed, 4 Nov 2020 at 15:28, Brian G wrote: > Bruce, > This link s an archive that can simple be extracted to the root directory > and installs all required files > > > https://github.com/justlostintime/GambasShell/blob/master/InstallCompletely.tar.gz > > Lol > > Hope that helps, It of course does not add support for gsh type files > > Thank You > Brian G > > ----- Original Message ----- > From: "Brian" > To: "Gambas mailing list" > Subject: Re: [Gambas-user] gambas not installed by package manager > problems. > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From brian at westwoodsvcs.com Wed Nov 4 17:49:37 2020 From: brian at westwoodsvcs.com (=?UTF-8?B?QnJpYW4gRw==?=) Date: Wed, 04 Nov 2020 19:49:37 +0300 Subject: [Gambas-user] =?utf-8?q?gambas_not_installed_by_package_manager_?= =?utf-8?q?problems=2E?= In-Reply-To: <39a23d4a-d618-8d5d-fa7d-849207723c0b@deganius.de> References: <39a23d4a-d618-8d5d-fa7d-849207723c0b@deganius.de> Message-ID: <1604508577.57185300@f12.my.com> I will have a look into it. -- Thanks Brian Wednesday, 04 November 2020, 08:21AM -08:00 from Christof Thalhofer chrisml at deganius.de : >Hi, > >we talked in the mailinglist about that some time ago. You may want to >have a look at this thread: > >https://lists.gambas-basic.org/pipermail/user/2020-February/068640.html > >For me I came to the result to compile and package my Gambas software >with makefiles and the debian tool 'dpkg-buildpackage -b'. > >For that I have to maintain a ./debian folder and a ./debian/control >file which contains strings like that: > >------------------------------------------------------------------------ >Depends: postgresql-client, texlive, texlive-latex-extra, ... > >Recommends: gambas3-runtime, gambas3-gb-image, gambas3-gb-qt4, >gambas3-gb-args, gambas3-gb-form, ... >------------------------------------------------------------------------ > >A Debian package is created with 'dpkg-buildpackage -b' called in the >folder where the makefile resides. > >Later the package can be installed on a machine with precompiled Gambas >like so: > >apt-get --no-install-recommends install package-xyz.deb > >The caveat is that I have to create and maintain scripts which call >dpkg-buildpackage which calls a makefile for each Debian package. > >The advantage of this approach is that I can pack more that one Gambas >project into a Debian package. And with two calls of scripts I can >compile and (Gambas)-package the project, create a Debian package from >that and push it to the server, which provides the debian packages via Apt. > >Alles Gute > >Christof Thalhofer > >-- >[x] nail here for new monitor > >----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Wed Nov 4 18:17:10 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Wed, 4 Nov 2020 17:17:10 +0000 Subject: [Gambas-user] gambas not installed by package manager problems. In-Reply-To: <39a23d4a-d618-8d5d-fa7d-849207723c0b@deganius.de> References: <9dfbc755-2b9a-ab0f-ea40-1e6d29f43acd@gmail.com> <1969027657.6027.1604501600428.JavaMail.zimbra@westwoodsvcs.com> <1870590895.6051.1604501907348.JavaMail.zimbra@westwoodsvcs.com> <39a23d4a-d618-8d5d-fa7d-849207723c0b@deganius.de> Message-ID: cheers Christof this could be something i can work with :) I'll see what i can do with this info , wish me luck :) On Wed, 4 Nov 2020 at 16:21, Christof Thalhofer wrote: > Hi, > > we talked in the mailinglist about that some time ago. You may want to > have a look at this thread: > > https://lists.gambas-basic.org/pipermail/user/2020-February/068640.html > > For me I came to the result to compile and package my Gambas software > with makefiles and the debian tool 'dpkg-buildpackage -b'. > > For that I have to maintain a ./debian folder and a ./debian/control > file which contains strings like that: > > ------------------------------------------------------------------------ > Depends: postgresql-client, texlive, texlive-latex-extra, ... > > Recommends: gambas3-runtime, gambas3-gb-image, gambas3-gb-qt4, > gambas3-gb-args, gambas3-gb-form, ... > ------------------------------------------------------------------------ > > A Debian package is created with 'dpkg-buildpackage -b' called in the > folder where the makefile resides. > > Later the package can be installed on a machine with precompiled Gambas > like so: > > apt-get --no-install-recommends install package-xyz.deb > > The caveat is that I have to create and maintain scripts which call > dpkg-buildpackage which calls a makefile for each Debian package. > > The advantage of this approach is that I can pack more that one Gambas > project into a Debian package. And with two calls of scripts I can > compile and (Gambas)-package the project, create a Debian package from > that and push it to the server, which provides the debian packages via Apt. > > Alles Gute > > Christof Thalhofer > > -- > [x] nail here for new monitor > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From brian at westwoodsvcs.com Wed Nov 4 18:18:54 2020 From: brian at westwoodsvcs.com (Brian G) Date: Wed, 4 Nov 2020 09:18:54 -0800 (PST) Subject: [Gambas-user] gambas not installed by package manager problems. In-Reply-To: References: <9dfbc755-2b9a-ab0f-ea40-1e6d29f43acd@gmail.com> <1969027657.6027.1604501600428.JavaMail.zimbra@westwoodsvcs.com> <1870590895.6051.1604501907348.JavaMail.zimbra@westwoodsvcs.com> <919831780.6070.1604503044741.JavaMail.zimbra@westwoodsvcs.com> Message-ID: <32824230.6344.1604510334812.JavaMail.zimbra@westwoodsvcs.com> Brice one point, When your doing something like 'ls > filename' the file name must start with ./ or ~/ or / otherwise gsh assumes you writing to a variable. If you want to do a dim var and use it you must surround the block with { .. } or lambda .. end eg. { dim a as integer for a = 100 to 100 print a; next } the above will be compiled to a single gambas script block actually any block can be used as in for a as integer = 100 to 100 print a next would also work Thank You Brian G From: "Bruce Steers" To: "Gambas mailing list" Sent: Wednesday, November 4, 2020 8:33:29 AM Subject: Re: [Gambas-user] gambas not installed by package manager problems. excellent Brian cheers, working now :) On Wed, 4 Nov 2020 at 15:28, Brian G < [ mailto:brian at westwoodsvcs.com | brian at westwoodsvcs.com ] > wrote: Bruce, This link s an archive that can simple be extracted to the root directory and installs all required files [ https://github.com/justlostintime/GambasShell/blob/master/InstallCompletely.tar.gz | https://github.com/justlostintime/GambasShell/blob/master/InstallCompletely.tar.gz ] Lol Hope that helps, It of course does not add support for gsh type files Thank You Brian G ----- Original Message ----- From: "Brian" < [ mailto:brian at westwoodsvcs.com | brian at westwoodsvcs.com ] > To: "Gambas mailing list" < [ mailto:user at lists.gambas-basic.org | user at lists.gambas-basic.org ] > Subject: Re: [Gambas-user] gambas not installed by package manager problems. ----[ [ http://gambaswiki.org/wiki/doc/netiquette | http://gambaswiki.org/wiki/doc/netiquette ] ]---- ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: From brian at westwoodsvcs.com Wed Nov 4 18:19:49 2020 From: brian at westwoodsvcs.com (Brian G) Date: Wed, 4 Nov 2020 09:19:49 -0800 (PST) Subject: [Gambas-user] gambas not installed by package manager problems. In-Reply-To: <32824230.6344.1604510334812.JavaMail.zimbra@westwoodsvcs.com> References: <9dfbc755-2b9a-ab0f-ea40-1e6d29f43acd@gmail.com> <1969027657.6027.1604501600428.JavaMail.zimbra@westwoodsvcs.com> <1870590895.6051.1604501907348.JavaMail.zimbra@westwoodsvcs.com> <919831780.6070.1604503044741.JavaMail.zimbra@westwoodsvcs.com> <32824230.6344.1604510334812.JavaMail.zimbra@westwoodsvcs.com> Message-ID: <877191323.6348.1604510389492.JavaMail.zimbra@westwoodsvcs.com> Sorry about the name misspell Bruce... geeezzz Thank You Brian G From: "Brian" To: "Gambas mailing list" Sent: Wednesday, November 4, 2020 9:18:54 AM Subject: Re: [Gambas-user] gambas not installed by package manager problems. Brice one point, When your doing something like 'ls > filename' the file name must start with ./ or ~/ or / otherwise gsh assumes you writing to a variable. If you want to do a dim var and use it you must surround the block with { .. } or lambda .. end eg. { dim a as integer for a = 100 to 100 print a; next } the above will be compiled to a single gambas script block actually any block can be used as in for a as integer = 100 to 100 print a next would also work Thank You Brian G From: "Bruce Steers" To: "Gambas mailing list" Sent: Wednesday, November 4, 2020 8:33:29 AM Subject: Re: [Gambas-user] gambas not installed by package manager problems. excellent Brian cheers, working now :) On Wed, 4 Nov 2020 at 15:28, Brian G < [ mailto:brian at westwoodsvcs.com | brian at westwoodsvcs.com ] > wrote: Bruce, This link s an archive that can simple be extracted to the root directory and installs all required files [ https://github.com/justlostintime/GambasShell/blob/master/InstallCompletely.tar.gz | https://github.com/justlostintime/GambasShell/blob/master/InstallCompletely.tar.gz ] Lol Hope that helps, It of course does not add support for gsh type files Thank You Brian G ----- Original Message ----- From: "Brian" < [ mailto:brian at westwoodsvcs.com | brian at westwoodsvcs.com ] > To: "Gambas mailing list" < [ mailto:user at lists.gambas-basic.org | user at lists.gambas-basic.org ] > Subject: Re: [Gambas-user] gambas not installed by package manager problems. ----[ [ http://gambaswiki.org/wiki/doc/netiquette | http://gambaswiki.org/wiki/doc/netiquette ] ]---- ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: From kicking177 at gmail.com Wed Nov 4 18:35:35 2020 From: kicking177 at gmail.com (KKing) Date: Wed, 4 Nov 2020 17:35:35 +0000 Subject: [Gambas-user] TableView cell editing Message-ID: <774dbf1d-0156-7ff3-d67b-2613b9950c5d@gmail.com> many thanks Charlie From kicking177 at gmail.com Wed Nov 4 18:56:35 2020 From: kicking177 at gmail.com (KKing) Date: Wed, 4 Nov 2020 17:56:35 +0000 Subject: [Gambas-user] Resizeable control at run time? Message-ID: I currently use Picturebox and allow users to draw a rectangle around an area of interest use via ??? With Paint ?? ?? ? .Begin(hImg1) ?? ?? ? .DrawRect((intStartX), intStartY, intFinishX - intStartX, intFinishY - intStartY, Color.Blue, 2) ??? ??? .End ??? End With ??? PictureBox1.Image = hImg1 I then replace the drawn rectangle with a ToolbarButton (because Button transparent is not transparent on LXDE (out of box)). This allows users to update information about the area(s) of interest, by pressing the individual buttons. Would it be possible to do something similar, but where the users would be able to move or resize the ToolbarButton or a replacement? I thought might be able to use non modal Forms, I can draw multiple forms on top of the main form (and transparent) but I've not found a way to make them moveable or resizeable. K. From bsteers4 at gmail.com Thu Nov 5 01:12:55 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Thu, 5 Nov 2020 00:12:55 +0000 Subject: [Gambas-user] Key codes from keysymdef Message-ID: Is this the wrong way to find the alt key hits? Select Key.Code Case key["Alt_L"] Return "[Alt_L]" Case Key["ISO_Level3_Shift"] Return "[ISO_Level3_Shift]" ' AltGr Case Key["ISO_Level5_Shift"] Return "[ISO_Level5_Shift]" ' AltGr+Shif End Select Note. I don't want to use the Key.Alt bool as it's not up for the task i need. i was under the impression that i could use the above method after reading the wiki Key.Code page. I need to differ between Alt AltGr and Shift-AltGr Or can i only get Key.Alt ? My macro recorder has 2 blocks... AltGr and right windows key (Super_R I believe) Have i missed a memo or something with the above code? ;) Tobias, I see your name in c_key.c . I also spotted the text that said "Need anything Just Ask" I need my macro recorder to know AltGr, and Super_R / Super_L Ps. Key.AltGrkey says "Key symbol not found" if i try to use it Many thanks for any info folks. BruceS -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Thu Nov 5 14:45:35 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Thu, 5 Nov 2020 13:45:35 +0000 Subject: [Gambas-user] Key codes from keysymdef In-Reply-To: References: Message-ID: I have this so far.. https://gitlab.com/bsteers4/sripted/-/blob/master/.src/MacroRecorder.class >From this project.. https://gitlab.com/bsteers4/sripted A basic Scripting text editor that works for bash and gambas scripts. fully utilising gambas Highlighting/modes customisable for each mode type. (Requires gambas 3.15.90 for sh highlight features but not to run, it'll use C highlight on older gambas) I've opened a discussion about it and explained some stuff about the state of the project here.. https://forum.gambas.one/viewtopic.php?f=6&t=940 I'm not sure i understand the ISO_Level_3_Shift thing but i've got it to produce Beno?ts "?" char by checking String.Code >127 as far as i know ISO_Level_5_Shift is for Shift-AltGr but im not sure about it all. I't a working macro recorder class that is easily added to any project. it just needs a text object of some kind. but it also needs an expert eye. Any advice would be welcomed about the macro recorder and AltGr/Shift-AltGr methods or anything else i'm not understanding. Gambas team, feel free to rip the macro code (half of it's Beno?ts anyway lol) i used/ripped code and styles from the Desktop.class both to ensure a compatible style for better understand for others and because i wanted to do Desktop.SandKey() but a bit differently. and also because... Once it's perfected it needs adding to the Gambas IDE because gambas would be awesome with a keystroke macro recorder :) (hence the trying to keep the code "Beno?t friendly" ;) ) Many thanks all. Wishing Well BruceS On Thu, 5 Nov 2020 at 00:12, Bruce Steers wrote: > Is this the wrong way to find the alt key hits? > > Select Key.Code > Case key["Alt_L"] > Return "[Alt_L]" > Case Key["ISO_Level3_Shift"] > Return "[ISO_Level3_Shift]" ' AltGr > Case Key["ISO_Level5_Shift"] > Return "[ISO_Level5_Shift]" ' AltGr+Shif > End Select > > Note. I don't want to use the Key.Alt bool as it's not up for the task i need. > i was under the impression that i could use the above method after reading > the wiki Key.Code page. > > I need to differ between Alt AltGr and Shift-AltGr > Or can i only get Key.Alt ? > > My macro recorder has 2 blocks... > AltGr and right windows key (Super_R I believe) > > Have i missed a memo or something with the above code? ;) > > Tobias, I see your name in c_key.c . > I also spotted the text that said "Need anything Just Ask" > > I need my macro recorder to know AltGr, and Super_R / Super_L > > > Ps. > Key.AltGrkey says "Key symbol not found" if i try to use it > > > Many thanks for any info folks. > > BruceS > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From charlie at cogier.com Thu Nov 5 19:45:02 2020 From: charlie at cogier.com (Charlie Ogier) Date: Thu, 5 Nov 2020 18:45:02 +0000 Subject: [Gambas-user] Resizeable control at run time? In-Reply-To: References: Message-ID: <33a92452-2733-6bb2-9b39-3e9ef72ba715@cogier.com> Hi K., I'm not totally sure what you are trying to accomplish but I have had a play and come up with the following code using PictureBoxes instead of ToolButtons. They aren't movable yet but one step at a time. You could also look at my program ScreenShot that has items that you can move arround, it's on the Farm or available here . Check out the video here . Let me know what else is needed. '********************************************* PictureBox1 As PictureBox hPictureBox As PictureBox hImg1 As Image iStartX As Integer iStartY As Integer iWidth As Integer iHeight As Integer iName As Integer Public Sub Form_Open() ? With Me ??? .Padding = 5 ??? .Arrangement = Arrange.Vertical ??? .Resizable = False ??? .W = 500 ??? .H = 400 ? End With ? With PictureBox1 = New PictureBox(Me) As "PictureBox1" ??? .Expand = True ??? .Image = New Image(.ClientWidth, .ClientHeight, Color.White) ? End With End Public Sub PictureBox1_MouseDown() ? iStartX = Mouse.ScreenX - PictureBox1.ScreenX ? iStartY = Mouse.ScreenY - PictureBox1.ScreenY End Public Sub PictureBox1_MouseDrag() ? iWidth = Mouse.X - iStartX ? iHeight = Mouse.Y - iStartY ? hImg1 = New Image(PictureBox1.ClientWidth, PictureBox1.ClientHeight, Color.White) ? With Paint ??? .Begin(hImg1) ??? .DrawRect(iStartX, iStartY, iWidth, iHeight, Color.Blue, 2) ??? .End ? End With ? PictureBox1.Image = hImg1 End Public Sub PictureBox1_MouseUp() ? PictureBox1.Image = New Image(PictureBox1.ClientWidth, PictureBox1.ClientHeight, Color.White) ? With hPictureBox = New PictureBox(PictureBox1) As "PictureBoxes" ??? .X = iStartX ??? .Y = iStartY ??? .Width = iWidth ??? .Height = iHeight ??? .Picture = Picture["icon:/256/wizard"] ??? .Mode = PictureBox.Contain ??? .Background = Color.Transparent ??? .Alignment = Align.Center ??? .Name = Str(iName) ? End With ? Inc iName End Public Sub PictureBoxes_MouseDown() ? Me.Text = "PictureBox " & Str(Last.Name) End Public Sub PictureBoxes_Enter() ? Last.Border = Border.Solid ? Last.Raise End Public Sub PictureBoxes_Leave() ? Last.Border = Border.None End '********************************************* Charlie On 04/11/2020 17:56, KKing wrote: > I currently use Picturebox and allow users to draw a rectangle around > an area of interest use via > ??? With Paint > ?? ?? ? .Begin(hImg1) > ?? ?? ? .DrawRect((intStartX), intStartY, intFinishX - intStartX, > intFinishY - intStartY, Color.Blue, 2) > ??? ??? .End > ??? End With > ??? PictureBox1.Image = hImg1 > I then replace the drawn rectangle with a ToolbarButton (because > Button transparent is not transparent on LXDE (out of box)). This > allows users to update information about the area(s) of interest, by > pressing the individual buttons. > Would it be possible to do something similar, but where the users > would be able to move or resize the ToolbarButton or a replacement? > I thought might be able to use non modal Forms, I can draw multiple > forms on top of the main form (and transparent) but I've not found a > way to make them moveable or resizeable. > K. > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: From chrisml at deganius.de Thu Nov 5 20:41:32 2020 From: chrisml at deganius.de (Christof Thalhofer) Date: Thu, 5 Nov 2020 20:41:32 +0100 Subject: [Gambas-user] Key codes from keysymdef In-Reply-To: References: Message-ID: <5fb0f453-613b-37c0-6b5a-46ad4c6ac9d8@deganius.de> Am 05.11.20 um 14:45 schrieb Bruce Steers: > I'm not sure i understand the ISO_Level_3_Shift thing but i've got it to > produce Beno?ts "?" char by checking String.Code >127 It's '?' not '?'. :-) Alles Gute Christof Thalhofer -- Dies ist keine Signatur -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From bsteers4 at gmail.com Thu Nov 5 21:00:35 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Thu, 5 Nov 2020 20:00:35 +0000 Subject: [Gambas-user] Key codes from keysymdef In-Reply-To: <5fb0f453-613b-37c0-6b5a-46ad4c6ac9d8@deganius.de> References: <5fb0f453-613b-37c0-6b5a-46ad4c6ac9d8@deganius.de> Message-ID: What the ???? How do i do that one? i was chuffed when i discovered ? on my keyboard and could stop copying and pasting his name lol. now i feel all , incorrect. BruceS On Thu, 5 Nov 2020 at 19:42, Christof Thalhofer wrote: > Am 05.11.20 um 14:45 schrieb Bruce Steers: > > > I'm not sure i understand the ISO_Level_3_Shift thing but i've got it to > > produce Beno?ts "?" char by checking String.Code >127 > > It's '?' not '?'. > > :-) > > > Alles Gute > > Christof Thalhofer > > -- > Dies ist keine Signatur > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From chrisml at deganius.de Thu Nov 5 21:07:28 2020 From: chrisml at deganius.de (Christof Thalhofer) Date: Thu, 5 Nov 2020 21:07:28 +0100 Subject: [Gambas-user] Key codes from keysymdef In-Reply-To: References: <5fb0f453-613b-37c0-6b5a-46ad4c6ac9d8@deganius.de> Message-ID: Am 05.11.20 um 21:00 schrieb Bruce Steers: > What the ???? > > How do i do that one?? i was chuffed when i discovered ? on my keyboard > and could stop copying and pasting his name lol. First hit ^ then i. At least at my german keyboard it works like this. > now i feel all , incorrect. Ohh ... :-( Alles Gute Christof Thalhofer -- Dies ist keine Signatur -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From g4mba5 at gmail.com Thu Nov 5 22:03:24 2020 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Thu, 5 Nov 2020 22:03:24 +0100 Subject: [Gambas-user] Key codes from keysymdef In-Reply-To: References: <5fb0f453-613b-37c0-6b5a-46ad4c6ac9d8@deganius.de> Message-ID: <3b4a1072-bf52-8fdb-325d-787ce5f705a3@gmail.com> Le 05/11/2020 ? 21:00, Bruce Steers a ?crit?: > What the ???? > > How do i do that one?? i was chuffed when i discovered ? on my keyboard > and could stop copying and pasting his name lol. > > now i feel all , incorrect. > > BruceS > > On Thu, 5 Nov 2020 at 19:42, Christof Thalhofer > wrote: > > Am 05.11.20 um 14:45 schrieb Bruce Steers: > > > I'm not sure i understand the ISO_Level_3_Shift thing but i've > got it to > > produce Beno?ts "?" char by checking String.Code >127 > > It's '?' not '?'. > > :-) > > > Alles Gute > > Christof Thalhofer > The "^" sign on top of a letter is a circumflex accent. In French it replaces a "s" that followed that letter but that was not pronounced. -- Beno?t Minisini From chrisml at deganius.de Fri Nov 6 08:20:32 2020 From: chrisml at deganius.de (Christof Thalhofer) Date: Fri, 6 Nov 2020 08:20:32 +0100 Subject: [Gambas-user] Key codes from keysymdef In-Reply-To: <3b4a1072-bf52-8fdb-325d-787ce5f705a3@gmail.com> References: <5fb0f453-613b-37c0-6b5a-46ad4c6ac9d8@deganius.de> <3b4a1072-bf52-8fdb-325d-787ce5f705a3@gmail.com> Message-ID: Am 05.11.20 um 22:03 schrieb Beno?t Minisini: > The "^" sign on top of a letter is a circumflex accent. In French it > replaces a "s" that followed that letter but that was not pronounced. Oh, impressive! I did not know that. Learned something again. :-) https://en.wikipedia.org/wiki/Circumflex#French Alles Gute Christof Thalhofer -- Dies ist keine Signatur -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From taboege at gmail.com Fri Nov 6 08:39:34 2020 From: taboege at gmail.com (Tobias Boege) Date: Fri, 6 Nov 2020 08:39:34 +0100 Subject: [Gambas-user] Key codes from keysymdef In-Reply-To: References: <5fb0f453-613b-37c0-6b5a-46ad4c6ac9d8@deganius.de> <3b4a1072-bf52-8fdb-325d-787ce5f705a3@gmail.com> Message-ID: <20201106073934.GH171194@highrise.localdomain> On Fri, 06 Nov 2020, Christof Thalhofer wrote: > Am 05.11.20 um 22:03 schrieb Beno?t Minisini: > > > The "^" sign on top of a letter is a circumflex accent. In French it > > replaces a "s" that followed that letter but that was not pronounced. > > Oh, impressive! I did not know that. Learned something again. :-) > > https://en.wikipedia.org/wiki/Circumflex#French > I will never forget this example I saw in French class: Latin: fenestra French: fen?tre German: Fenster (English: window) -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: From kicking177 at gmail.com Fri Nov 6 10:14:40 2020 From: kicking177 at gmail.com (KKing) Date: Fri, 6 Nov 2020 09:14:40 +0000 Subject: [Gambas-user] Resizeable control at run time? Message-ID: <54f15056-c812-08e7-c708-8773c40f0efc@gmail.com> Hi Charlie, ta. ScreenShot is brill btw. Your snippets with "pictureboxes" are along lines of what I'm doing with ToolButton. What I'm looking for now is that those (in your snippets) "pictureboxes" can be individually resizable or moveable at run time. I'm guessing that it is not something Gambas to do out of the box but may require writing a new control or if concept exists subclassing an existing Gambas control. K. From kicking177 at gmail.com Fri Nov 6 13:33:49 2020 From: kicking177 at gmail.com (KKing) Date: Fri, 6 Nov 2020 12:33:49 +0000 Subject: [Gambas-user] FileChooser doubleclick on filename? Message-ID: <930258dd-3233-6f00-df66-714de8cca6ff@gmail.com> is it possible to allow a doubleclick on a filename within filechooser to be trapped and used to fire say a btnOK_Click() method? K. From bsteers4 at gmail.com Fri Nov 6 14:12:16 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Fri, 6 Nov 2020 13:12:16 +0000 Subject: [Gambas-user] Key codes from keysymdef In-Reply-To: References: Message-ID: Have gone about things very differently now. https://gitlab.com/bsteers4/sripted/-/blob/master/.src/MacroRecorder.class Now it's not using any gambas Key class related personal naming stuff just the Key.Code. it reads in and lists all keysymdef.h names and codes and simply records them as defined. then saves the matched name. A-Z codes gambas delivers only seem to be upper case though. even though lower case syms are defined Key.Code only matches upper case? So had to code to accommodate. on playback so far i've found EVERY non std char i tried to print back as now it's not trying to combine/reproduce AltGr-a (although it does) for ? but it's sending "aacute" instead. Test the crap out of it guys ;) I plan to make it bullet proof if poss and add it to the gambas IDE. everyone else can fork off ;) lol :D Sorry fork off it ;) BruceS > I need my macro recorder to know AltGr, and Super_R / Super_L > Ps. > Key.AltGrkey says "Key symbol not found" if i try to use it > > > Many thanks for any info folks. > > BruceS > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Fri Nov 6 14:17:57 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Fri, 6 Nov 2020 13:17:57 +0000 Subject: [Gambas-user] FileChooser doubleclick on filename? In-Reply-To: <930258dd-3233-6f00-df66-714de8cca6ff@gmail.com> References: <930258dd-3233-6f00-df66-714de8cca6ff@gmail.com> Message-ID: Do you mean like... Public Sub FileChooser1_DblClick() btnOK_Click() End On Fri, 6 Nov 2020 at 12:35, KKing wrote: > is it possible to allow a doubleclick on a filename within filechooser > to be trapped and used to fire say a btnOK_Click() method? > K. > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kicking177 at gmail.com Fri Nov 6 14:32:47 2020 From: kicking177 at gmail.com (KKing) Date: Fri, 6 Nov 2020 13:32:47 +0000 Subject: [Gambas-user] FileChooser doubleclick on filename? Message-ID: <8fc965b0-0e4a-636c-280e-2fdfb0508f88@gmail.com> Yes, but on LXDE unit that doesn't seem to work. In form design the right mouse click does not yield popup menu on FileChooser to select events. Putting the below in for either Click or DblClick never gets trapped > Do you mean like... > > Public Sub FileChooser1_DblClick() > btnOK_Click() > End From charlie at cogier.com Fri Nov 6 17:06:53 2020 From: charlie at cogier.com (Charlie Ogier) Date: Fri, 6 Nov 2020 16:06:53 +0000 Subject: [Gambas-user] Resizeable control at run time? In-Reply-To: <54f15056-c812-08e7-c708-8773c40f0efc@gmail.com> References: <54f15056-c812-08e7-c708-8773c40f0efc@gmail.com> Message-ID: <7ea3086d-3aac-4d8a-7df8-2f9ed83b3b74@cogier.com> Hi K., Gambas can do this out of the box. Have a look at ScreenShot, make sure it's version 1.2.0 (Updated 2020/11/06) . Use the Left most ToolButton, draw a rectangle then click and drag the rectangle or resize it. Code is in the 'Capture.class'. Charlie On 06/11/2020 09:14, KKing wrote: > Hi Charlie, > ta. ScreenShot is brill btw. Your snippets with "pictureboxes" are > along lines of what I'm doing with ToolButton. What I'm looking for > now is that those (in your snippets) "pictureboxes" can be > individually resizable or moveable at run time. I'm guessing that it > is not something Gambas to do out of the box but may require writing a > new control or if concept exists subclassing an existing Gambas control. > K. > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- From charlie at cogier.com Fri Nov 6 17:23:56 2020 From: charlie at cogier.com (Charlie Ogier) Date: Fri, 6 Nov 2020 16:23:56 +0000 Subject: [Gambas-user] FileChooser doubleclick on filename - BUG? In-Reply-To: <8fc965b0-0e4a-636c-280e-2fdfb0508f88@gmail.com> References: <8fc965b0-0e4a-636c-280e-2fdfb0508f88@gmail.com> Message-ID: <5000768e-1e15-f1af-9ecf-a566c995825f@cogier.com> I can't get many of the mouse and keyboard events to work with FileChooser, is this a bug? Code to test: - '*********************************** FileChooser1 As FileChooser Public Sub Form_Open() ? With Me ??? .Padding = 5 ??? .Arrangement = Arrange.Vertical ??? .W = 1000 ??? .H = 600 ? End With ? With FileChooser1 = New FileChooser(Me) As "FileChooser1" ??? .Expand = True ? End With End Public Sub FileChooser1_DblClick() ? Stop End Public Sub FileChooser1_KeyRelease() ? Stop End Public Sub FileChooser1_KeyPress() ? Stop End Public Sub FileChooser1_MouseDown() ? Stop End Public Sub FileChooser1_MouseUp() ? Stop End '*********************************** Charlie On 06/11/2020 13:32, KKing wrote: > Yes, but on LXDE unit that doesn't seem to work. In form design the > right mouse click does not yield popup menu on FileChooser to select > events. Putting the below in for either Click or DblClick never gets > trapped > >> Do you mean like... >> >> Public Sub FileChooser1_DblClick() >> btnOK_Click() >> End > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- From bsteers4 at gmail.com Fri Nov 6 20:00:51 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Fri, 6 Nov 2020 19:00:51 +0000 Subject: [Gambas-user] Key codes from keysymdef In-Reply-To: <3b4a1072-bf52-8fdb-325d-787ce5f705a3@gmail.com> References: <5fb0f453-613b-37c0-6b5a-46ad4c6ac9d8@deganius.de> <3b4a1072-bf52-8fdb-325d-787ce5f705a3@gmail.com> Message-ID: Although i like to know these things i think my macro recorder doesn't need to :) got any views on a macro recorder? very useful tool. much like myself ;) Another good analogy is my gambas is much like my French. Clearly I know very little , can just about get by but am clueless to the finer details ;) C'est la Vie BruceS On Thu, 5 Nov 2020 at 21:04, Beno?t Minisini wrote: > Le 05/11/2020 ? 21:00, Bruce Steers a ?crit : > > What the ???? > > > > How do i do that one? i was chuffed when i discovered ? on my keyboard > > and could stop copying and pasting his name lol. > > > > now i feel all , incorrect. > > > > BruceS > > > > On Thu, 5 Nov 2020 at 19:42, Christof Thalhofer > > wrote: > > > > Am 05.11.20 um 14:45 schrieb Bruce Steers: > > > > > I'm not sure i understand the ISO_Level_3_Shift thing but i've > > got it to > > > produce Beno?ts "?" char by checking String.Code >127 > > > > It's '?' not '?'. > > > > :-) > > > > > > Alles Gute > > > > Christof Thalhofer > > > > The "^" sign on top of a letter is a circumflex accent. In French it > replaces a "s" that followed that letter but that was not pronounced. > > -- > Beno?t Minisini > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Fri Nov 6 20:09:28 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Fri, 6 Nov 2020 19:09:28 +0000 Subject: [Gambas-user] Key codes from keysymdef In-Reply-To: <20201106073934.GH171194@highrise.localdomain> References: <5fb0f453-613b-37c0-6b5a-46ad4c6ac9d8@deganius.de> <3b4a1072-bf52-8fdb-325d-787ce5f705a3@gmail.com> <20201106073934.GH171194@highrise.localdomain> Message-ID: Window , You get Wind if it's open , makes perfect sense ;) Back on point though with a macro recorder , I don't think it needs to understand, a voice recorder doesn't need to know what language you have, it just records whatever and plays back. I'm heading the same way with the macro recording. BruceS On Fri, 6 Nov 2020 at 07:40, Tobias Boege wrote: > On Fri, 06 Nov 2020, Christof Thalhofer wrote: > > Am 05.11.20 um 22:03 schrieb Beno?t Minisini: > > > > > The "^" sign on top of a letter is a circumflex accent. In French it > > > replaces a "s" that followed that letter but that was not pronounced. > > > > Oh, impressive! I did not know that. Learned something again. :-) > > > > https://en.wikipedia.org/wiki/Circumflex#French > > > > I will never forget this example I saw in French class: > > Latin: fenestra > French: fen?tre > German: Fenster > (English: window) > > -- > "There's an old saying: Don't change anything... ever!" -- Mr. Monk > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jussi.lahtinen at gmail.com Fri Nov 6 20:34:09 2020 From: jussi.lahtinen at gmail.com (Jussi Lahtinen) Date: Fri, 6 Nov 2020 21:34:09 +0200 Subject: [Gambas-user] FileChooser doubleclick on filename - BUG? In-Reply-To: <5000768e-1e15-f1af-9ecf-a566c995825f@cogier.com> References: <8fc965b0-0e4a-636c-280e-2fdfb0508f88@gmail.com> <5000768e-1e15-f1af-9ecf-a566c995825f@cogier.com> Message-ID: I cannot get the events fire either. The same thing with gtk3 and qt5. Jussi [System] Gambas=3.15.90 4471fb350 (master) OperatingSystem=Linux Kernel=5.4.0-52-generic Architecture=x86_64 Distribution=Linux Mint 20 Ulyana Desktop=CINNAMON Theme=qt5ctproxy Language=en_US.UTF-8 Memory=7961M [Libraries] Cairo=libcairo.so.2.11600.0 Curl=libcurl.so.4.6.0 DBus=libdbus-1.so.3.19.11 GDK2=libgdk-x11-2.0.so.0.2400.32 GDK3=libgdk-3.so.0.2404.16 GStreamer=libgstreamer-1.0.so.0.1602.0 GTK+2=libgtk-x11-2.0.so.0.2400.32 GTK+3=libgtk-3.so.0.2404.16 OpenGL=libGL.so.1.7.0 Poppler=libpoppler.so.97.0.0 QT5=libQt5Core.so.5.12.8 SDL=libSDL-1.2.so.0.11.4 SQLite=libsqlite3.so.0.8.6 [Environment] DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus DESKTOP_SESSION=cinnamon DISPLAY=:0 GB_GUI=gb.qt5 GB_PROFILE_MAX=1000 GDMSESSION=cinnamon GDM_LANG=en_US GIO_LAUNCHED_DESKTOP_FILE=/Desktop/Gambas3.desktop GIO_LAUNCHED_DESKTOP_FILE_PID=22160 GNOME_DESKTOP_SESSION_ID=this-is-deprecated GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1 GTK_MODULES=gail:atk-bridge GTK_OVERLAY_SCROLLING=1 HOME= INSIDE_NEMO_PYTHON= LANG=en_US.UTF-8 LANGUAGE=en_US.UTF-8 LC_ADDRESS=fi_FI.UTF-8 LC_ALL=en_US.UTF-8 LC_IDENTIFICATION=fi_FI.UTF-8 LC_MEASUREMENT=fi_FI.UTF-8 LC_MONETARY=fi_FI.UTF-8 LC_NAME=fi_FI.UTF-8 LC_NUMERIC=fi_FI.UTF-8 LC_PAPER=fi_FI.UTF-8 LC_TELEPHONE=fi_FI.UTF-8 LOGNAME= PATH=/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin PWD= QT_ACCESSIBILITY=1 QT_LOGGING_RULES=*.debug=false QT_QPA_PLATFORMTHEME=qt5ct SESSION_MANAGER=local/:@/tmp/.ICE-unix/1043,unix/:/tmp/.ICE-unix/1043 SHELL=/bin/bash SHLVL=0 SSH_AGENT_PID=1118 SSH_AUTH_SOCK=/run/user/1000/keyring/ssh TZ=:/etc/localtime USER= XAUTHORITY=/.Xauthority XDG_CONFIG_DIRS=/etc/xdg/xdg-cinnamon:/etc/xdg XDG_CURRENT_DESKTOP=X-Cinnamon XDG_DATA_DIRS=/usr/share/cinnamon:/usr/share/gnome:/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/ XDG_RUNTIME_DIR=/run/user/1000 XDG_SEAT=seat0 XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0 XDG_SESSION_CLASS=user XDG_SESSION_DESKTOP=cinnamon XDG_SESSION_ID=c1 XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0 XDG_SESSION_TYPE=x11 XDG_VTNR=7 On Fri, Nov 6, 2020 at 6:49 PM Charlie Ogier wrote: > I can't get many of the mouse and keyboard events to work with > FileChooser, is this a bug? > > > Code to test: - > > '*********************************** > FileChooser1 As FileChooser > > Public Sub Form_Open() > > With Me > .Padding = 5 > .Arrangement = Arrange.Vertical > .W = 1000 > .H = 600 > End With > > With FileChooser1 = New FileChooser(Me) As "FileChooser1" > .Expand = True > End With > > End > > Public Sub FileChooser1_DblClick() > > Stop > > End > > Public Sub FileChooser1_KeyRelease() > > Stop > > End > > Public Sub FileChooser1_KeyPress() > > Stop > > End > > Public Sub FileChooser1_MouseDown() > > Stop > > End > > Public Sub FileChooser1_MouseUp() > > Stop > > End > '*********************************** > > Charlie > > On 06/11/2020 13:32, KKing wrote: > > Yes, but on LXDE unit that doesn't seem to work. In form design the > > right mouse click does not yield popup menu on FileChooser to select > > events. Putting the below in for either Click or DblClick never gets > > trapped > > > >> Do you mean like... > >> > >> Public Sub FileChooser1_DblClick() > >> btnOK_Click() > >> End > > > > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From g4mba5 at gmail.com Fri Nov 6 20:44:43 2020 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Fri, 6 Nov 2020 20:44:43 +0100 Subject: [Gambas-user] FileChooser doubleclick on filename? In-Reply-To: <930258dd-3233-6f00-df66-714de8cca6ff@gmail.com> References: <930258dd-3233-6f00-df66-714de8cca6ff@gmail.com> Message-ID: <978fddb9-eed4-da5c-8bb6-7bc306875aaa@gmail.com> Le 06/11/2020 ? 13:33, KKing a ?crit?: > is it possible to allow a doubleclick on a filename within filechooser > to be trapped and used to fire say a btnOK_Click() method? > K. > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- Look at the "Activate" event. Regards, -- Beno?t Minisini From mbelmonte at belmotek.net Sat Nov 7 01:34:08 2020 From: mbelmonte at belmotek.net (Martin) Date: Sat, 7 Nov 2020 01:34:08 +0100 Subject: [Gambas-user] JSON.Decode error in gb.util.web?? Message-ID: <5c0dfcca-b323-c017-d6a7-f02d5ad78567@belmotek.net> Hi, I want to decode some json files buy sometimes doesn't work an an error appear. Facing the inability to debug within the component(gb.util.web) I copy that into to the project in "./json_clon" directory, but again I couldn't see the error. ?Some idea if the dwg.json is wrong or is the component? I attach the study sample (inside looking for the file dwg.json for do the testing) Tanks MB -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sample-libredwg-0.0.2.tar.gz Type: application/gzip Size: 43481 bytes Desc: not available URL: From adamnt42 at gmail.com Sat Nov 7 01:42:25 2020 From: adamnt42 at gmail.com (Bruce) Date: Sat, 7 Nov 2020 11:12:25 +1030 Subject: [Gambas-user] JSON.Decode error in gb.util.web?? In-Reply-To: <5c0dfcca-b323-c017-d6a7-f02d5ad78567@belmotek.net> References: <5c0dfcca-b323-c017-d6a7-f02d5ad78567@belmotek.net> Message-ID: <306cd31b-39a2-c6f9-7887-8ffe91715117@gmail.com> On 7/11/20 11:04 am, Martin wrote: > Hi, > > I want to decode some json files buy sometimes doesn't work an an error > appear. > > Facing the inability to debug within the component(gb.util.web) I copy > that into to the project in "./json_clon" directory, but again I > couldn't see the error. > > ?Some idea if the dwg.json is wrong or is the component? > > I attach the study sample (inside looking for the file dwg.json for do > the testing) > > Tanks > > MB > > > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > SyntaxError: JSON.parse: bad control character in string literal at line 11300 column 7 of the JSON data From kicking177 at gmail.com Sat Nov 7 11:10:48 2020 From: kicking177 at gmail.com (KKing) Date: Sat, 7 Nov 2020 10:10:48 +0000 Subject: [Gambas-user] Resizeable control at run time? Message-ID: <3e4fd709-7ea4-7b17-9de7-7987e6828d14@gmail.com> @Charlie - I've updated to 1.2, but when I click the Camera icon I get the message dialog, but after I close it I get a blank window filling the monitor,pressing ENTER gets a blank canvas. But I will look through the capture class. > Gambas can do this out of the box. Have a look at ScreenShot, make sure > it's version 1.2.0 (Updated 2020/11/06) . Use the Left most ToolButton, > draw a rectangle then click and drag the rectangle or resize it. Code is > in the 'Capture.class'. > > Charlie From kicking177 at gmail.com Sat Nov 7 11:11:42 2020 From: kicking177 at gmail.com (KKing) Date: Sat, 7 Nov 2020 10:11:42 +0000 Subject: [Gambas-user] FileChooser doubleclick on filename? Message-ID: @Benoit - thankyou that works > Look at the "Activate" event. From charlie at cogier.com Sat Nov 7 13:23:27 2020 From: charlie at cogier.com (Charlie Ogier) Date: Sat, 7 Nov 2020 12:23:27 +0000 Subject: [Gambas-user] Resizeable control at run time? In-Reply-To: <3e4fd709-7ea4-7b17-9de7-7987e6828d14@gmail.com> References: <3e4fd709-7ea4-7b17-9de7-7987e6828d14@gmail.com> Message-ID: <7f5c4fb6-193e-ad1f-78fa-e49e1e8b0e61@cogier.com> Hi K. Have a look at this video. Please read the Dialog text "Close this box then draw a rectangular box with the mouse around the area you wish to capture. Press [Enter] to take the picture, [Esc] to escape" You can then resize or move the rectangle. Charlie On 07/11/2020 10:10, KKing wrote: > @Charlie - I've updated to 1.2, but when I click the Camera icon I get > the message dialog, but after I close it I get a blank window filling > the monitor,pressing ENTER gets a blank canvas. > But I will look through the capture class. > >> Gambas can do this out of the box. Have a look at ScreenShot, make sure >> it's version 1.2.0 (Updated 2020/11/06) . Use the Left most ToolButton, >> draw a rectangle then click and drag the rectangle or resize it. Code is >> in the 'Capture.class'. >> >> Charlie > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Sat Nov 7 14:59:44 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Sat, 7 Nov 2020 13:59:44 +0000 Subject: [Gambas-user] Can gambas preserve my argument lists please? Message-ID: Hi benoit I have a desperate plea.... I test my apps on various different drives i have with various different gambas versions. the oldest being a Debian with 3.12 , I have linux versions will all default repo versions and compiled or ppa installed versions, some master some stable. anyway.. I have a problem with the bug you fixed that caused a lesser version gambas than 3.15 to fail to load a project because you changed the CurrentArg settings datatype from an integer to a String[] The fix was good and changing the name of the variable "CurrentArgument" to "CurrentArgumentList" works, now an older gambas does not get the error. The problem is you also changed the "Arguments" setting to "ArgumentList" but that was not broken and did not need fixing. The change has caused a problem though. Now if i load a project saved in 3.15.90 into any other gambas it kills my Arguments list and it's still gone when loading again in 3.15.90. :( Could you please restore the "Arguments" variable name to fix this problem? Many thanks. BruceS -------------- next part -------------- An HTML attachment was scrubbed... URL: From adamnt42 at gmail.com Sat Nov 7 17:59:50 2020 From: adamnt42 at gmail.com (Bruce) Date: Sun, 8 Nov 2020 03:29:50 +1030 Subject: [Gambas-user] Postgres : Connection.Tables In-Reply-To: References: <557f78f8-f7c6-ea81-ba4c-827dadb759e9@gmail.com> <5df8ea49-1f4a-792e-43aa-8a20d8f58765@gmail.com> Message-ID: On 1/11/20 8:47 am, Beno?t Minisini wrote: > The "table type" has actually nothing to do with whether the table is a > view or not, but is related to the storing engine used. It's a MySQL > thing, and afaik PostgreSQL stores all tables the same way. > > The concept of table view must be introduced in another way that does > not exist at the moment. Ah, I see now. "Type" is the "name of the storage engine format" for the table and is as you say a mysql/mariadb specific concept. That's kind of sad in terms of that selection of the property name "Type" is such a generic term. Sad, but I'll guess we will just have to live with it. My delay in following up this thread is because I "had a good idea" and thought I could write a "gb.pg_direct" component that could be used instead of the constrained gb.db component. Sadly, it appears that I am no that good at writing C code, even with the help of the "Writing a native component for Gambas" article that Tobias wrote way back when he was a young man. I will persevere but I can only spend aout two hours a day in front of a computer screen now as it is just too much eye strain. regards b From bsteers4 at gmail.com Sat Nov 7 23:29:00 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Sat, 7 Nov 2020 22:29:00 +0000 Subject: [Gambas-user] Can gambas preserve my argument lists please? In-Reply-To: References: Message-ID: And then it hit me..... I've my own version of gambas here i can modify myself... Lol. Don't worry about it Ben, keep it your way if you like, i'm happy :) BruceS On Sat, 7 Nov 2020 at 13:59, Bruce Steers wrote: > > Hi benoit > > I have a desperate plea.... > > I test my apps on various different drives i have with various different > gambas versions. > the oldest being a Debian with 3.12 , I have linux versions will all > default repo versions and compiled or ppa installed versions, some master > some stable. > > anyway.. > > I have a problem with the bug you fixed that caused a lesser version > gambas than 3.15 to fail to load a project because you changed the > CurrentArg settings datatype from an integer to a String[] > > The fix was good and changing the name of the variable "CurrentArgument" > to "CurrentArgumentList" works, now an older gambas does not get the error. > > The problem is you also changed the "Arguments" setting to "ArgumentList" > but that was not broken and did not need fixing. The change has caused a > problem though. > Now if i load a project saved in 3.15.90 into any other gambas it kills my > Arguments list and it's still gone when loading again in 3.15.90. :( > > Could you please restore the "Arguments" variable name to fix this problem? > > Many thanks. > BruceS > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Sun Nov 8 04:00:38 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Sun, 8 Nov 2020 03:00:38 +0000 Subject: [Gambas-user] finding active TextEditor object in IDE Message-ID: Can anyone tell me how to access the active TextEditor object in the IDE? >From within app/src/gambas3/.src/FMain.class Cheers Bruce -------------- next part -------------- An HTML attachment was scrubbed... URL: From adamnt42 at gmail.com Sun Nov 8 10:19:39 2020 From: adamnt42 at gmail.com (Bruce) Date: Sun, 8 Nov 2020 19:49:39 +1030 Subject: [Gambas-user] finding active TextEditor object in IDE In-Reply-To: References: Message-ID: On 8/11/20 1:30 pm, Bruce Steers wrote: > Can anyone tell me how to access the active TextEditor object in the IDE? >>From within app/src/gambas3/.src/FMain.class > > Cheers > Bruce > > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > Application.ActiveControl? From bsteers4 at gmail.com Sun Nov 8 13:40:46 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Sun, 8 Nov 2020 12:40:46 +0000 Subject: [Gambas-user] finding active TextEditor object in IDE In-Reply-To: References: Message-ID: > Application.ActiveControl Will that be right if i've just used a menu item or button though or would the active control be the button/menu? I just need to ensure the active texteditor has focus. I think i need something more accurate. I tried Project.Workspace.Children[0] Project.ActiveForm Various variations of others i could see. Not sure if i need to find it in Project.module or FMain.class Just cannot find it. Wasted too much time trying to get it to work properly. Feeling the same about 3.15.90 right now. Who threw in the big bag of bugs? I've reverted to 3.15.3 (3.15.2 with a few new updates added) like shell highlighting, gambas "highlight" mode not "painting" text and fixing the killing of the arguments lists , bug fixes like that that only seem to get applied to 3.15.90 and not the other existing out there versions that still got bugs and people are using. It's like the moment a version is released it becomes abandonware. On to the next we go... Seems I'm spending as much of my time finding/reporting bugs/compiling as i am making my own software now. seems to be one thing after another at mo with 3.15.90. Certainly seems the bugtracker is not for existing versions only the beta testing of the experimental one. That's how i got recruited in, found a bug in the version i was using, reported it, got told to upgrade to latest. Voilla , now i'm bug testing beta unstable software :( If Ben was the "Thank You" type it might seem a bit more worth the effort. But no. Case not Bruce ,, out. -------------- next part -------------- An HTML attachment was scrubbed... URL: From kicking177 at gmail.com Sun Nov 8 13:58:37 2020 From: kicking177 at gmail.com (KKing) Date: Sun, 8 Nov 2020 12:58:37 +0000 Subject: [Gambas-user] Resizeable control at run time? Message-ID: <50225104-c531-91e3-ee34-aa34540fa39a@gmail.com> @Charlie, it's all good on KDE, unfortunately on LXDE the lack of transparency issue hits again. From charlie at cogier.com Sun Nov 8 17:20:43 2020 From: charlie at cogier.com (Charlie Ogier) Date: Sun, 8 Nov 2020 16:20:43 +0000 Subject: [Gambas-user] Resizeable control at run time? In-Reply-To: <50225104-c531-91e3-ee34-aa34540fa39a@gmail.com> References: <50225104-c531-91e3-ee34-aa34540fa39a@gmail.com> Message-ID: <32b7db2c-6db1-c8d4-5336-491c35b4dcda@cogier.com> Hi K, I have tried this on the Raspberry Pi and I see what you mean. It does work though, it's just that you can't see what you are 'grabbing'! I'm not sure that I know a way out of this, as you say 'the lack of transparency issue hits again'. However the rectangle can still be moved and resized which is what you requested. Charlie. On 08/11/2020 12:58, KKing wrote: > @Charlie, it's all good on KDE, unfortunately on LXDE the lack of > transparency issue hits again. > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- From hans at gambas-buch.de Sun Nov 8 20:10:23 2020 From: hans at gambas-buch.de (Hans Lehmann) Date: Sun, 8 Nov 2020 20:10:23 +0100 Subject: [Gambas-user] ListContainer & QT5 Message-ID: <0de7ff37-fb48-4450-1214-6c3f580d98ca@gambas-buch.de> Hello. I have used the component ListContainer in some example programs in the Gambas book. I am aware that this component is considered obsolete. Independently of this, however, the programs with QT5 no longer work. I have the following questions: (1) Is there a replacement for the ListContainer component? (2) Does anyone have an idea how to replace the functionality of the component ListContainer with other Gambas components? With kind regards Hans From g4mba5 at gmail.com Sun Nov 8 21:15:01 2020 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Sun, 8 Nov 2020 21:15:01 +0100 Subject: [Gambas-user] ListContainer & QT5 In-Reply-To: <0de7ff37-fb48-4450-1214-6c3f580d98ca@gambas-buch.de> References: <0de7ff37-fb48-4450-1214-6c3f580d98ca@gambas-buch.de> Message-ID: Le 08/11/2020 ? 20:10, Hans Lehmann a ?crit?: > Hello. > > I have used the component ListContainer in some example programs in the > Gambas book. I am aware that this component is considered obsolete. > Independently of this, however, the programs with QT5 no longer work. I > have the following questions: > > (1) > Is there a replacement for the ListContainer component? No, it's not really useful. > > (2) > Does anyone have an idea how to replace the functionality of the > component ListContainer with other Gambas components? You have to implement your custom list selection by yourself, using a GridView, or a vertically arranged ScrollView, or anyhting else. Regards, -- Beno?t Minisini From adamnt42 at gmail.com Mon Nov 9 04:57:45 2020 From: adamnt42 at gmail.com (Bruce) Date: Mon, 9 Nov 2020 14:27:45 +1030 Subject: [Gambas-user] ITAWT check if the User is a member of a group Message-ID: User'Group returns the primary group id for the User. I need to find out if the User is also a member of another group. Is there a way in Gambas or does anyone have a good idea? tia bruce From hans at gambas-buch.de Mon Nov 9 09:29:49 2020 From: hans at gambas-buch.de (Hans Lehmann) Date: Mon, 9 Nov 2020 09:29:49 +0100 Subject: [Gambas-user] ListContainer & QT5 Message-ID: <1a4b0937-bc7c-a970-aa65-5c9d75543a0d@gambas-buch.de> Hello. I have used the component ListContainer in some example programs in the Gambas book. I am aware that this component is considered obsolete. Independently of this, however, the programs with QT5 no longer work. I have the following questions: (1) Is there a replacement for the ListContainer component? (2) Does anyone have an idea how to replace the functionality of the component ListContainer with other Gambas components? With kind regards Hans From brian at westwoodsvcs.com Mon Nov 9 14:38:47 2020 From: brian at westwoodsvcs.com (Brian G) Date: Mon, 9 Nov 2020 05:38:47 -0800 (PST) Subject: [Gambas-user] ITAWT check if the User is a member of a group In-Reply-To: References: Message-ID: <2039354825.7435.1604929127392.JavaMail.zimbra@westwoodsvcs.com> Hi Bruce I attach a project which does what your looking for. It returns the list of groups for a user. Hope this is helpful. It uses the clib calls getgrouplist() and getgrgid() Thank You Brian G ----- Original Message ----- From: "Bruce" To: "Gambas mailing list" Sent: Sunday, November 8, 2020 7:57:45 PM Subject: [Gambas-user] ITAWT check if the User is a member of a group User'Group returns the primary group id for the User. I need to find out if the User is also a member of another group. Is there a way in Gambas or does anyone have a good idea? tia bruce ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -------------- next part -------------- A non-text attachment was scrubbed... Name: GetUserGroups-0.0.1.tar.gz Type: application/x-compressed-tar Size: 12081 bytes Desc: not available URL: From bsteers4 at gmail.com Mon Nov 9 15:11:27 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Mon, 9 Nov 2020 14:11:27 +0000 Subject: [Gambas-user] trimming extra spaces from within a string. Message-ID: Is there a function like this for cleaning up a string of erroneous spaces .. *Public Sub InTrim(sVar As String) As StringDim sOld, sNew, sChar, sLast As String, iPos As IntegersOld = Trim(sVar)sNew = ""For iPos = 0 To sVar.Len - 1 sChar = sVar[iPos, 1] If IsSpace(sChar) And IsSpace(sLast) Then Continue sNew &= sChar sLast = sCharNextReturn Trim(sNew)End* That will turn " This has many spaces " into "This has many spaces" cheers BruceS -------------- next part -------------- An HTML attachment was scrubbed... URL: From taboege at gmail.com Mon Nov 9 15:29:36 2020 From: taboege at gmail.com (Tobias Boege) Date: Mon, 9 Nov 2020 15:29:36 +0100 Subject: [Gambas-user] trimming extra spaces from within a string. In-Reply-To: References: Message-ID: <20201109142936.GJ171194@highrise.localdomain> On Mon, 09 Nov 2020, Bruce Steers wrote: > Is there a function like this for cleaning up a string of erroneous spaces > .. > > *Public Sub InTrim(sVar As String) As StringDim sOld, sNew, sChar, sLast As > String, iPos As IntegersOld = Trim(sVar)sNew = ""For iPos = 0 To sVar.Len - > 1 sChar = sVar[iPos, 1] If IsSpace(sChar) And IsSpace(sLast) Then > Continue sNew &= sChar sLast = sCharNextReturn Trim(sNew)End* > > That will turn " This has many spaces " > into "This has many spaces" > No, but if you don't mind loading gb.pcre, it can be as short as Trim$(RegExp.Replace(sVar, "[[:space:]]+", " ", RegExp.Greedy)) Best, Tobias -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From brian at westwoodsvcs.com Mon Nov 9 15:37:26 2020 From: brian at westwoodsvcs.com (Brian G) Date: Mon, 9 Nov 2020 06:37:26 -0800 (PST) Subject: [Gambas-user] trimming extra spaces from within a string. In-Reply-To: References: Message-ID: <294081127.7545.1604932646205.JavaMail.zimbra@westwoodsvcs.com> Use this for example Print RegExp.Replace("t y drows on the very best stuff", " {2,}+", " ") include the gb.pcre Hope this helps Brian G From: "Bruce Steers" To: "Gambas mailing list" Sent: Monday, November 9, 2020 6:11:27 AM Subject: [Gambas-user] trimming extra spaces from within a string. Is there a function like this for cleaning up a string of erroneous spaces .. Public Sub InTrim(sVar As String) As String Dim sOld, sNew, sChar, sLast As String, iPos As Integer sOld = Trim(sVar) sNew = "" For iPos = 0 To sVar.Len - 1 sChar = sVar[iPos, 1] If IsSpace(sChar) And IsSpace(sLast) Then Continue sNew &= sChar sLast = sChar Next Return Trim(sNew) End That will turn " This has many spaces " into "This has many spaces" cheers BruceS ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: From adamnt42 at gmail.com Mon Nov 9 16:03:04 2020 From: adamnt42 at gmail.com (Bruce) Date: Tue, 10 Nov 2020 01:33:04 +1030 Subject: [Gambas-user] ITAWT check if the User is a member of a group In-Reply-To: <2039354825.7435.1604929127392.JavaMail.zimbra@westwoodsvcs.com> References: <2039354825.7435.1604929127392.JavaMail.zimbra@westwoodsvcs.com> Message-ID: On 10/11/20 12:08 am, Brian G wrote: > Hi Bruce > I attach a project which does what your looking for. It returns the list of groups for a user. > > Hope this is helpful. > > > It uses the clib calls getgrouplist() and getgrgid() > > > Thank You > Brian G > > ----- Original Message ----- > From: "Bruce" > To: "Gambas mailing list" > Sent: Sunday, November 8, 2020 7:57:45 PM > Subject: [Gambas-user] ITAWT check if the User is a member of a group > > User'Group returns the primary group id for the User. I need to find out > if the User is also a member of another group. > Is there a way in Gambas or does anyone have a good idea? > > tia > bruce > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > Thank you BrianG! Excellent. regards b From bsteers4 at gmail.com Mon Nov 9 16:58:52 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Mon, 9 Nov 2020 15:58:52 +0000 Subject: [Gambas-user] trimming extra spaces from within a string. In-Reply-To: <294081127.7545.1604932646205.JavaMail.zimbra@westwoodsvcs.com> References: <294081127.7545.1604932646205.JavaMail.zimbra@westwoodsvcs.com> Message-ID: Cheers guys. good to know :) -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Mon Nov 9 17:07:35 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Mon, 9 Nov 2020 16:07:35 +0000 Subject: [Gambas-user] Right border/margin and the cursor Message-ID: Is it just me that wishes when the cursor gets to the right hand border it would be good if i could see a bit more text ahead. when the cursor goes beyond the line the page scrolls left a bit but only a tiny bit. just enough to see the cursor but not really any text ahead. just 1 char. would be good if the page either moved over an inch or 2 before i'm right on the edge and almost out of sight. or if when it moves over it moved a bit more. BruceS -------------- next part -------------- An HTML attachment was scrubbed... URL: From kicking177 at gmail.com Mon Nov 9 17:46:43 2020 From: kicking177 at gmail.com (KKing) Date: Mon, 9 Nov 2020 16:46:43 +0000 Subject: [Gambas-user] trimming extra spaces from within a string. Message-ID: <891b023b-b10a-1f68-9855-091f5240e69f@gmail.com> how about strInput = " This??? has??? many??????? spaces? " strResult = Trim(Replace(strInput,"? "," ")) > That will turn " This has many spaces " > into "This has many spaces" From chrisml at deganius.de Mon Nov 9 18:30:51 2020 From: chrisml at deganius.de (Christof Thalhofer) Date: Mon, 9 Nov 2020 18:30:51 +0100 Subject: [Gambas-user] trimming extra spaces from within a string. In-Reply-To: <891b023b-b10a-1f68-9855-091f5240e69f@gmail.com> References: <891b023b-b10a-1f68-9855-091f5240e69f@gmail.com> Message-ID: <9c0e1c67-dde9-31ca-129a-00879a50b568@deganius.de> Am 09.11.20 um 17:46 schrieb KKing: > how about > strInput = " This??? has??? many??????? spaces? " > strResult = Trim(Replace(strInput,"? "," ")) > >> That will turn " This has many spaces " >> into "This has many spaces" Nope. I wrote a test: > Test TDegString:TrimMult > not ok 1 - > # > # ------------- Expected ------------- > # This has many spaces > # > # ---------------- Got --------------- > # This has many spaces > # ------------------------------------ > # > # Strings are of different lengths 25 and 20, respectively. > # Strings differ at position 6. But this works: -------------------------------------------------- While InStr(Text, " ") Text = Replace(Text, " ", " ") Wend Return Trim(Text) -------------------------------------------------- And it's about three times faster than Tobi's idea. Alles Gute Christof Thalhofer -- Dies ist keine Signatur -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From adamnt42 at gmail.com Mon Nov 9 18:37:25 2020 From: adamnt42 at gmail.com (Bruce) Date: Tue, 10 Nov 2020 04:07:25 +1030 Subject: [Gambas-user] Right border/margin and the cursor In-Reply-To: References: Message-ID: <66dac76f-2c40-f45a-52bc-31a8a4d7a359@gmail.com> On 10/11/20 2:37 am, Bruce Steers wrote: > Is it just me that wishes when the cursor gets to the right hand border it > would be good if i could see a bit more text ahead. > > when the cursor goes beyond the line the page scrolls left a bit but only a > tiny bit. just enough to see the cursor but not really any text ahead. just > 1 char. > > would be good if the page either moved over an inch or 2 before i'm right > on the edge and almost out of sight. or if when it moves over it moved a > bit more. > > BruceS > > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > Not me, editors I have used that do that are incredibly annoying IMO. The text wrap toolbutton is much better. b From mbelmonte at belmotek.net Mon Nov 9 18:56:43 2020 From: mbelmonte at belmotek.net (Martin) Date: Mon, 9 Nov 2020 18:56:43 +0100 Subject: [Gambas-user] JSON.Decode error in gb.util.web?? In-Reply-To: <306cd31b-39a2-c6f9-7887-8ffe91715117@gmail.com> References: <5c0dfcca-b323-c017-d6a7-f02d5ad78567@belmotek.net> <306cd31b-39a2-c6f9-7887-8ffe91715117@gmail.com> Message-ID: <9350facc-444d-d3ce-af2d-ea252e43935f@belmotek.net> Well, is correct that the row 11300 column 7 was wrong but there is not the first problem that appear in JSON.Reader. Also there are an other problem related to Key empty. here we are one sample code: ? "items": { ??? "ACAD_COLOR": [2, 1, 41, 41], ??? "ACAD_GROUP": [2, 1, 37, 37], ??? "ACAD_LAYOUT": [2, 1, 13, 13], ??? "ACAD_MATERIAL": [2, 1, 40, 40], ??? "ACAD_MLEADERSTYLE": [2, 2, 331, 331], ??? "ACAD_MLINESTYLE": [2, 1, 38, 38], ??? "ACAD_PLOTSETTINGS": [2, 1, 39, 39], ??? "ACAD_PLOTSTYLENAME": [2, 1, 8, 8], ??? "ACAD_SCALELIST": [2, 2, 313, 313], ??? "ACAD_TABLESTYLE": [2, 1, 42, 42], ??? "": [2, 0, 0, 0], ??? "": [2, 0, 0, 0], ??? "AcDbVariableDictionary": [2, 1, 145, 145], ??? "": [2, 0, 0, 0], ??? "APPDATA": [2, 2, 1423, 1423], ??? "": [2, 0, 0, 0], ??? "": [2, 0, 0, 0], ??? "ACAD_DETAILVIEWSTYLE": [2, 2, 1443, 1443], ??? "ACAD_SECTIONVIEWSTYLE": [2, 2, 1444, 1444], ??? "ACDB_RECOMPOSE_DATA": [2, 2, 1452, 1452], ??? "AcDsDecomposeData": [2, 2, 1453, 1453] ??? } ? }, As you will see there are many key values empty ("": [2, 0, 0, 0],). Well here are two point of view, the firt is the file .json is wrong and the solution is delete the problematic lines or the second is JSON.Reader no skip empty keys. ?JSON objets support empty keys? ?JSON objets support repeated keys? Regards. On 7/11/20 1:42, Bruce wrote: > On 7/11/20 11:04 am, Martin wrote: >> Hi, >> >> I want to decode some json files buy sometimes doesn't work an an >> error appear. >> >> Facing the inability to debug within the component(gb.util.web) I >> copy that into to the project in "./json_clon" directory, but again I >> couldn't see the error. >> >> ?Some idea if the dwg.json is wrong or is the component? >> >> I attach the study sample (inside looking for the file dwg.json for >> do the testing) >> >> Tanks >> >> MB >> >> >> >> >> ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- >> > > SyntaxError: JSON.parse: bad control character in string literal at > line 11300 column 7 of the JSON data > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- From bsteers4 at gmail.com Mon Nov 9 19:35:52 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Mon, 9 Nov 2020 18:35:52 +0000 Subject: [Gambas-user] trimming extra spaces from within a string. In-Reply-To: <891b023b-b10a-1f68-9855-091f5240e69f@gmail.com> References: <891b023b-b10a-1f68-9855-091f5240e69f@gmail.com> Message-ID: No my friend that will not work.. This does... *While InStr(strinput," ")* *strinput = Replace(strinput, " ", " ")* *Next* *strinput = Trim(strinput)* I already tried that :) it worked okay. I found various ways, the initial function i posted seemed to me to be the "gambas" way of doing it. Although if it was Beno?ts code he'd probably use String.Mid$() and not a boxed string like i did :) I was just curious to know if i wasn't missing a function in gambas that already existed to do it :) Cheers :) On Mon, 9 Nov 2020 at 16:47, KKing wrote: > how about > strInput = " This has many spaces " > strResult = Trim(Replace(strInput," "," ")) > > > That will turn " This has many spaces " > > into "This has many spaces" > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Mon Nov 9 19:38:04 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Mon, 9 Nov 2020 18:38:04 +0000 Subject: [Gambas-user] trimming extra spaces from within a string. In-Reply-To: <9c0e1c67-dde9-31ca-129a-00879a50b568@deganius.de> References: <891b023b-b10a-1f68-9855-091f5240e69f@gmail.com> <9c0e1c67-dde9-31ca-129a-00879a50b568@deganius.de> Message-ID: do you think using Replace() would be faster than my initial InTrim() function method ? Cheers Bruce On Mon, 9 Nov 2020 at 17:31, Christof Thalhofer wrote: > Am 09.11.20 um 17:46 schrieb KKing: > > how about > > strInput = " This has many spaces " > > strResult = Trim(Replace(strInput," "," ")) > > > >> That will turn " This has many spaces " > >> into "This has many spaces" > > Nope. I wrote a test: > > > Test TDegString:TrimMult > > not ok 1 - > > # > > # ------------- Expected ------------- > > # This has many spaces > > # > > # ---------------- Got --------------- > > # This has many spaces > > # ------------------------------------ > > # > > # Strings are of different lengths 25 and 20, respectively. > > # Strings differ at position 6. > > But this works: > > -------------------------------------------------- > While InStr(Text, " ") > Text = Replace(Text, " ", " ") > Wend > > Return Trim(Text) > -------------------------------------------------- > > And it's about three times faster than Tobi's idea. > > Alles Gute > > Christof Thalhofer > > -- > Dies ist keine Signatur > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Mon Nov 9 19:40:20 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Mon, 9 Nov 2020 18:40:20 +0000 Subject: [Gambas-user] trimming extra spaces from within a string. In-Reply-To: References: <891b023b-b10a-1f68-9855-091f5240e69f@gmail.com> Message-ID: Sorry Wend not Next lol On Mon, 9 Nov 2020 at 18:35, Bruce Steers wrote: > No my friend that will not work.. > This does... > *While InStr(strinput," ")* > > *strinput = Replace(strinput, " ", " ")* > > *Next* > *strinput = Trim(strinput)* > > I already tried that :) it worked okay. > I found various ways, the initial function i posted seemed to me to be the > "gambas" way of doing it. > Although if it was Beno?ts code he'd probably use String.Mid$() and not a > boxed string like i did :) > > I was just curious to know if i wasn't missing a function in gambas that > already existed to do it :) > > Cheers :) > > On Mon, 9 Nov 2020 at 16:47, KKing wrote: > >> how about >> strInput = " This has many spaces " >> strResult = Trim(Replace(strInput," "," ")) >> >> > That will turn " This has many spaces " >> > into "This has many spaces" >> >> >> ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Mon Nov 9 19:53:58 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Mon, 9 Nov 2020 18:53:58 +0000 Subject: [Gambas-user] A customised/upgraded 3.14 Message-ID: Is it okay that I've customised a gambas 3.14 on my fork? I've added some updates/bug fixes (like shell highlighting, TerminalView updates, might add more) and made it be compatible with 3.15 project files to preserve test argument lists. And fixed the compiling as the .gitlab-ci.yml, gb.pdf and gb.db.mysql were causing errors. https://gitlab.com/bsteers4/gambas/-/tree/3.14.4 I'm under the impression that GPL allows this kind of thing so i've gone ahead and done it. Though maybe i should check though. BruceS -------------- next part -------------- An HTML attachment was scrubbed... URL: From g4mba5 at gmail.com Mon Nov 9 20:09:37 2020 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Mon, 9 Nov 2020 20:09:37 +0100 Subject: [Gambas-user] trimming extra spaces from within a string. In-Reply-To: <9c0e1c67-dde9-31ca-129a-00879a50b568@deganius.de> References: <891b023b-b10a-1f68-9855-091f5240e69f@gmail.com> <9c0e1c67-dde9-31ca-129a-00879a50b568@deganius.de> Message-ID: <1621e846-5466-212e-83dc-93a448c4104e@gmail.com> Le 09/11/2020 ? 18:30, Christof Thalhofer a ?crit?: > But this works: > > -------------------------------------------------- > While InStr(Text, " ") > Text = Replace(Text, " ", " ") > Wend > > Return Trim(Text) > -------------------------------------------------- > > And it's about three times faster than Tobi's idea. > > Alles Gute > > Christof Thalhofer > Still slower than needed. This is faster: ------------------------------------------------------ Repeat OldLen = Len(Text) Text = Replace(Text, " ", " ") Until Len(Text) = OldLen ------------------------------------------------------ Or one can try: ------------------------------------------------------ Text = Split(Text, " ", "", True).Join(" ") ------------------------------------------------------ Its speed relative to the previous solution depends on the length of Text and how many spaces there are in it. Regards, -- Beno?t Minisini From t.lee.davidson at gmail.com Mon Nov 9 20:28:25 2020 From: t.lee.davidson at gmail.com (T Lee Davidson) Date: Mon, 9 Nov 2020 14:28:25 -0500 Subject: [Gambas-user] JSON.Decode error in gb.util.web?? In-Reply-To: <9350facc-444d-d3ce-af2d-ea252e43935f@belmotek.net> References: <5c0dfcca-b323-c017-d6a7-f02d5ad78567@belmotek.net> <306cd31b-39a2-c6f9-7887-8ffe91715117@gmail.com> <9350facc-444d-d3ce-af2d-ea252e43935f@belmotek.net> Message-ID: On 11/9/20 12:56 PM, Martin wrote: > As you will see there are many key values empty ("": [2, 0, 0, 0],). Well here are two point of view, the firt is the file .json > is wrong and the solution is delete the problematic lines or the second is JSON.Reader?no?skip?empty?keys. > > ?JSON?objets?support?empty?keys? > > ?JSON?objets?support?repeated?keys? JSONCollection supports null values. If a key is duplicated in the same node of a JSON string, it is invalid ASFAIK. When a JSON string is converted to a Collection, if there are duplicate keys, the values will be overwritten. -- Lee From chrisml at deganius.de Mon Nov 9 21:22:15 2020 From: chrisml at deganius.de (Christof Thalhofer) Date: Mon, 9 Nov 2020 21:22:15 +0100 Subject: [Gambas-user] trimming extra spaces from within a string. In-Reply-To: <1621e846-5466-212e-83dc-93a448c4104e@gmail.com> References: <891b023b-b10a-1f68-9855-091f5240e69f@gmail.com> <9c0e1c67-dde9-31ca-129a-00879a50b568@deganius.de> <1621e846-5466-212e-83dc-93a448c4104e@gmail.com> Message-ID: <6e2b8530-8fd3-6b4d-0699-af5ee0e773ac@deganius.de> Am 09.11.20 um 20:09 schrieb Beno?t Minisini: > Still slower than needed. This is faster: > > ------------------------------------------------------ > Repeat > OldLen = Len(Text) > Text = Replace(Text, " ", " ") > Until Len(Text) = OldLen > ------------------------------------------------------ Yes! With a text with 314 K and a lot of multiple spaces trimmed 500 times your version wins by 3 ms! 2239 ms vs 2241 ms > Or one can try: > > ------------------------------------------------------ > Text = Split(Text, " ", "", True).Join(" ") > ------------------------------------------------------ > > Its speed relative to the previous solution depends on the length of > Text and how many spaces there are in it. Slooow in my example test. 3211 ms. (We lay a cloak of silence over the solution with Regexp.) ;-) Alles Gute Christof Thalhofer -- Dies ist keine Signatur -------------- next part -------------- A non-text attachment was scrubbed... Name: regexp-compactspaces.png Type: image/png Size: 36908 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: split-join-compactspaces.png Type: image/png Size: 36674 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: benoit-compactspaces.png Type: image/png Size: 35399 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: while-wend-compactspaces.png Type: image/png Size: 35823 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From chrisml at deganius.de Mon Nov 9 21:43:54 2020 From: chrisml at deganius.de (Christof Thalhofer) Date: Mon, 9 Nov 2020 21:43:54 +0100 Subject: [Gambas-user] trimming extra spaces from within a string. In-Reply-To: References: <891b023b-b10a-1f68-9855-091f5240e69f@gmail.com> <9c0e1c67-dde9-31ca-129a-00879a50b568@deganius.de> Message-ID: Am 09.11.20 um 19:38 schrieb Bruce Steers: > do you think using Replace() would be faster than my initial InTrim() > function method ? It's ultra-ultra-ultra-...repeat 1.000.000 times ...slow. I write this mail while it is running in the background ... 'til now, I stopped it. It needs about 1.4 seconds for a 314 k text. For the test which does the text 500 times it would need about 12 minutes. :-) Alles Gute Christof Thalhofer -- Dies ist keine Signatur -------------- next part -------------- A non-text attachment was scrubbed... Name: InTrim.png Type: image/png Size: 48662 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From adamnt42 at gmail.com Mon Nov 9 22:05:16 2020 From: adamnt42 at gmail.com (Bruce) Date: Tue, 10 Nov 2020 07:35:16 +1030 Subject: [Gambas-user] JSON.Decode error in gb.util.web?? In-Reply-To: References: <5c0dfcca-b323-c017-d6a7-f02d5ad78567@belmotek.net> <306cd31b-39a2-c6f9-7887-8ffe91715117@gmail.com> <9350facc-444d-d3ce-af2d-ea252e43935f@belmotek.net> Message-ID: On 10/11/20 5:58 am, T Lee Davidson wrote: > On 11/9/20 12:56 PM, Martin wrote: >> As you will see there are many key values empty ("": [2, 0, 0, 0],). >> Well here are two point of view, the firt is the file .json is wrong >> and the solution is delete the problematic lines or the second is >> JSON.Reader?no?skip?empty?keys. >> >> ?JSON?objets?support?empty?keys? >> >> ?JSON?objets?support?repeated?keys? > > JSONCollection supports null values. > > If a key is duplicated in the same node of a JSON string, it is invalid > ASFAIK. When a JSON string is converted to a Collection, if there are > duplicate keys, the values will be overwritten. > > and I would have thought null kays are invalid as well? I think the question should be wehther and how the gb.JSON decoder handles such occurrences. b From bsteers4 at gmail.com Mon Nov 9 23:14:59 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Mon, 9 Nov 2020 22:14:59 +0000 Subject: [Gambas-user] trimming extra spaces from within a string. In-Reply-To: References: <891b023b-b10a-1f68-9855-091f5240e69f@gmail.com> <9c0e1c67-dde9-31ca-129a-00879a50b568@deganius.de> Message-ID: I'm not sure if i'm reading those reports right , i had to look up dauer to see it meant duration. and what on earth is that program ? i want it lol :) But from what i can see,, my way was the fastest at 1.4 yes? this makes me happy as i initially used the "while and replace" method then thought to improve it. looks like i could not have done a better job eh? :) Unless i'm reading it all wrong? Thanks Christof , very enlightening :) On Mon, 9 Nov 2020 at 20:44, Christof Thalhofer wrote: > Am 09.11.20 um 19:38 schrieb Bruce Steers: > > > do you think using Replace() would be faster than my initial InTrim() > > function method ? > > It's ultra-ultra-ultra-...repeat 1.000.000 times ...slow. > I write this mail while it is running in the background ... 'til now, I > stopped it. > > It needs about 1.4 seconds for a 314 k text. For the test which does the > text 500 times it would need about 12 minutes. > > :-) > > Alles Gute > > Christof Thalhofer > > -- > Dies ist keine Signatur > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Mon Nov 9 23:24:27 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Mon, 9 Nov 2020 22:24:27 +0000 Subject: [Gambas-user] trimming extra spaces from within a string. In-Reply-To: References: <891b023b-b10a-1f68-9855-091f5240e69f@gmail.com> <9c0e1c67-dde9-31ca-129a-00879a50b568@deganius.de> Message-ID: I'm reading it wrong aren't I :( looing at the InTrim snapshot it looks like it's using my method AND regexp too? so i don't think im reading it right at all lol. BruceS On Mon, 9 Nov 2020 at 22:14, Bruce Steers wrote: > I'm not sure if i'm reading those reports right , i had to look up dauer > to see it meant duration. > and what on earth is that program ? i want it lol :) > > But from what i can see,, my way was the fastest at 1.4 yes? > > this makes me happy as i initially used the "while and replace" method > then thought to improve it. > looks like i could not have done a better job eh? :) > > Unless i'm reading it all wrong? > > Thanks Christof , very enlightening :) > > > On Mon, 9 Nov 2020 at 20:44, Christof Thalhofer > wrote: > >> Am 09.11.20 um 19:38 schrieb Bruce Steers: >> >> > do you think using Replace() would be faster than my initial InTrim() >> > function method ? >> >> It's ultra-ultra-ultra-...repeat 1.000.000 times ...slow. >> I write this mail while it is running in the background ... 'til now, I >> stopped it. >> >> It needs about 1.4 seconds for a 314 k text. For the test which does the >> text 500 times it would need about 12 minutes. >> >> :-) >> >> Alles Gute >> >> Christof Thalhofer >> >> -- >> Dies ist keine Signatur >> >> ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jussi.lahtinen at gmail.com Mon Nov 9 23:43:07 2020 From: jussi.lahtinen at gmail.com (Jussi Lahtinen) Date: Tue, 10 Nov 2020 00:43:07 +0200 Subject: [Gambas-user] trimming extra spaces from within a string. In-Reply-To: References: <891b023b-b10a-1f68-9855-091f5240e69f@gmail.com> <9c0e1c67-dde9-31ca-129a-00879a50b568@deganius.de> Message-ID: Your way is run only twice, the other ways are run 500 times. Thus it seems your way is faster. You already have this program, it is the IDE. See profiler. Jussi On Tue, Nov 10, 2020 at 12:25 AM Bruce Steers wrote: > I'm reading it wrong aren't I :( > > looing at the InTrim snapshot it looks like it's using my method AND > regexp too? > so i don't think im reading it right at all lol. > BruceS > > On Mon, 9 Nov 2020 at 22:14, Bruce Steers wrote: > >> I'm not sure if i'm reading those reports right , i had to look up dauer >> to see it meant duration. >> and what on earth is that program ? i want it lol :) >> >> But from what i can see,, my way was the fastest at 1.4 yes? >> >> this makes me happy as i initially used the "while and replace" method >> then thought to improve it. >> looks like i could not have done a better job eh? :) >> >> Unless i'm reading it all wrong? >> >> Thanks Christof , very enlightening :) >> >> >> On Mon, 9 Nov 2020 at 20:44, Christof Thalhofer >> wrote: >> >>> Am 09.11.20 um 19:38 schrieb Bruce Steers: >>> >>> > do you think using Replace() would be faster than my initial InTrim() >>> > function method ? >>> >>> It's ultra-ultra-ultra-...repeat 1.000.000 times ...slow. >>> I write this mail while it is running in the background ... 'til now, I >>> stopped it. >>> >>> It needs about 1.4 seconds for a 314 k text. For the test which does the >>> text 500 times it would need about 12 minutes. >>> >>> :-) >>> >>> Alles Gute >>> >>> Christof Thalhofer >>> >>> -- >>> Dies ist keine Signatur >>> >>> ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- >>> >> > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jussi.lahtinen at gmail.com Mon Nov 9 23:43:51 2020 From: jussi.lahtinen at gmail.com (Jussi Lahtinen) Date: Tue, 10 Nov 2020 00:43:51 +0200 Subject: [Gambas-user] trimming extra spaces from within a string. In-Reply-To: References: <891b023b-b10a-1f68-9855-091f5240e69f@gmail.com> <9c0e1c67-dde9-31ca-129a-00879a50b568@deganius.de> Message-ID: Sorry, not twice, once. Jussi On Tue, Nov 10, 2020 at 12:43 AM Jussi Lahtinen wrote: > Your way is run only twice, the other ways are run 500 times. Thus it > seems your way is faster. > You already have this program, it is the IDE. See profiler. > > Jussi > > > On Tue, Nov 10, 2020 at 12:25 AM Bruce Steers wrote: > >> I'm reading it wrong aren't I :( >> >> looing at the InTrim snapshot it looks like it's using my method AND >> regexp too? >> so i don't think im reading it right at all lol. >> BruceS >> >> On Mon, 9 Nov 2020 at 22:14, Bruce Steers wrote: >> >>> I'm not sure if i'm reading those reports right , i had to look up dauer >>> to see it meant duration. >>> and what on earth is that program ? i want it lol :) >>> >>> But from what i can see,, my way was the fastest at 1.4 yes? >>> >>> this makes me happy as i initially used the "while and replace" method >>> then thought to improve it. >>> looks like i could not have done a better job eh? :) >>> >>> Unless i'm reading it all wrong? >>> >>> Thanks Christof , very enlightening :) >>> >>> >>> On Mon, 9 Nov 2020 at 20:44, Christof Thalhofer >>> wrote: >>> >>>> Am 09.11.20 um 19:38 schrieb Bruce Steers: >>>> >>>> > do you think using Replace() would be faster than my initial InTrim() >>>> > function method ? >>>> >>>> It's ultra-ultra-ultra-...repeat 1.000.000 times ...slow. >>>> I write this mail while it is running in the background ... 'til now, I >>>> stopped it. >>>> >>>> It needs about 1.4 seconds for a 314 k text. For the test which does the >>>> text 500 times it would need about 12 minutes. >>>> >>>> :-) >>>> >>>> Alles Gute >>>> >>>> Christof Thalhofer >>>> >>>> -- >>>> Dies ist keine Signatur >>>> >>>> ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- >>>> >>> >> ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gambas.fr at gmail.com Mon Nov 9 23:52:46 2020 From: gambas.fr at gmail.com (Fabien Bodard) Date: Mon, 9 Nov 2020 23:52:46 +0100 Subject: [Gambas-user] trimming extra spaces from within a string. In-Reply-To: References: <891b023b-b10a-1f68-9855-091f5240e69f@gmail.com> <9c0e1c67-dde9-31ca-129a-00879a50b568@deganius.de> Message-ID: And .. sorry I'm on phone but Just walk on the string if not space add to new string ...if first space too... jump to the next not space letter ...etc ? Is this not more faster than using a recursive call to replace ? The 3 ms gain from benoit can come from the fact he not use trim. Fabien Le lun. 9 nov. 2020 ? 23:47, Jussi Lahtinen a ?crit : > Sorry, not twice, once. > > Jussi > > On Tue, Nov 10, 2020 at 12:43 AM Jussi Lahtinen > wrote: > >> Your way is run only twice, the other ways are run 500 times. Thus it >> seems your way is faster. >> You already have this program, it is the IDE. See profiler. >> >> Jussi >> >> >> On Tue, Nov 10, 2020 at 12:25 AM Bruce Steers wrote: >> >>> I'm reading it wrong aren't I :( >>> >>> looing at the InTrim snapshot it looks like it's using my method AND >>> regexp too? >>> so i don't think im reading it right at all lol. >>> BruceS >>> >>> On Mon, 9 Nov 2020 at 22:14, Bruce Steers wrote: >>> >>>> I'm not sure if i'm reading those reports right , i had to look up >>>> dauer to see it meant duration. >>>> and what on earth is that program ? i want it lol :) >>>> >>>> But from what i can see,, my way was the fastest at 1.4 yes? >>>> >>>> this makes me happy as i initially used the "while and replace" method >>>> then thought to improve it. >>>> looks like i could not have done a better job eh? :) >>>> >>>> Unless i'm reading it all wrong? >>>> >>>> Thanks Christof , very enlightening :) >>>> >>>> >>>> On Mon, 9 Nov 2020 at 20:44, Christof Thalhofer >>>> wrote: >>>> >>>>> Am 09.11.20 um 19:38 schrieb Bruce Steers: >>>>> >>>>> > do you think using Replace() would be faster than my initial InTrim() >>>>> > function method ? >>>>> >>>>> It's ultra-ultra-ultra-...repeat 1.000.000 times ...slow. >>>>> I write this mail while it is running in the background ... 'til now, I >>>>> stopped it. >>>>> >>>>> It needs about 1.4 seconds for a 314 k text. For the test which does >>>>> the >>>>> text 500 times it would need about 12 minutes. >>>>> >>>>> :-) >>>>> >>>>> Alles Gute >>>>> >>>>> Christof Thalhofer >>>>> >>>>> -- >>>>> Dies ist keine Signatur >>>>> >>>>> ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- >>>>> >>>> >>> ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- >>> >> > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mbelmonte at belmotek.net Mon Nov 9 23:58:18 2020 From: mbelmonte at belmotek.net (Martin) Date: Mon, 9 Nov 2020 23:58:18 +0100 Subject: [Gambas-user] JSON.Decode error in gb.util.web??[SOLVED] In-Reply-To: References: <5c0dfcca-b323-c017-d6a7-f02d5ad78567@belmotek.net> <306cd31b-39a2-c6f9-7887-8ffe91715117@gmail.com> <9350facc-444d-d3ce-af2d-ea252e43935f@belmotek.net> Message-ID: <71a9feb6-7367-3a45-2501-ce16d4ab218f@belmotek.net> Yes, the obstacle is the empty keys in json file. So I use TRUE option as parameter, then works. Rest some work to do in json file maker. Tanks for the answers. Regards. MB. On 9/11/20 22:05, Bruce wrote: > On 10/11/20 5:58 am, T Lee Davidson wrote: >> On 11/9/20 12:56 PM, Martin wrote: >>> As you will see there are many key values empty ("": [2, 0, 0, 0],). >>> Well here are two point of view, the firt is the file .json is wrong >>> and the solution is delete the problematic lines or the second is >>> JSON.Reader?no?skip?empty?keys. >>> >>> ?JSON?objets?support?empty?keys? >>> >>> ?JSON?objets?support?repeated?keys? >> >> JSONCollection supports null values. >> >> If a key is duplicated in the same node of a JSON string, it is >> invalid ASFAIK. When a JSON string is converted to a Collection, if >> there are duplicate keys, the values will be overwritten. >> >> > > and I would have thought null kays are invalid as well? > > I think the question should be wehther and how the gb.JSON decoder > handles such occurrences. > > b > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- From chrisml at deganius.de Tue Nov 10 00:07:34 2020 From: chrisml at deganius.de (Christof Thalhofer) Date: Tue, 10 Nov 2020 00:07:34 +0100 Subject: [Gambas-user] trimming extra spaces from within a string. In-Reply-To: References: <891b023b-b10a-1f68-9855-091f5240e69f@gmail.com> <9c0e1c67-dde9-31ca-129a-00879a50b568@deganius.de> Message-ID: Am 09.11.20 um 23:24 schrieb Bruce Steers: > I'm reading it wrong aren't I :( > > looing at the InTrim snapshot it looks like it's using my method AND > regexp too? Ups, sorry, you are right ... but: Your code makes about 1400 ms for *one* round while the others need about 2400 ms for *500* rounds. So the regexp code does not change anything ... ;-) And that nice program is the Gambas profiler you find in the IDE in the 'Debug' menu. Alles Gute Christof Thalhofer -- Dies ist keine Signatur -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From bsteers4 at gmail.com Tue Nov 10 00:07:41 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Mon, 9 Nov 2020 23:07:41 +0000 Subject: [Gambas-user] trimming extra spaces from within a string. In-Reply-To: References: <891b023b-b10a-1f68-9855-091f5240e69f@gmail.com> <9c0e1c67-dde9-31ca-129a-00879a50b568@deganius.de> Message-ID: On Mon, 9 Nov 2020 at 22:54, Fabien Bodard wrote: > And .. sorry I'm on phone but > > Just walk on the string if not space add to new string ...if first space > too... jump to the next not space letter ...etc ? > > Is this not more faster than using a recursive call to replace ? > > The 3 ms gain from benoit can come from the fact he not use trim. > Aah yes i see, thank you (me wishful thinking lol) I went for Benoits method , way better than mine :) > > >> On Tue, Nov 10, 2020 at 12:43 AM Jussi Lahtinen >> wrote: >> >>> Your way is run only twice, the other ways are run 500 times. Thus it >>> seems your way is faster. >>> You already have this program, it is the IDE. See profiler. >>> >> Fantastic, now that's a handy tool I've only just discovered :) Thanks Fabien BruceS -------------- next part -------------- An HTML attachment was scrubbed... URL: From chrisml at deganius.de Tue Nov 10 00:25:57 2020 From: chrisml at deganius.de (Christof Thalhofer) Date: Tue, 10 Nov 2020 00:25:57 +0100 Subject: [Gambas-user] trimming extra spaces from within a string. In-Reply-To: References: <891b023b-b10a-1f68-9855-091f5240e69f@gmail.com> <9c0e1c67-dde9-31ca-129a-00879a50b568@deganius.de> Message-ID: <562cec7e-a1fa-2408-0e54-2832187bd791@deganius.de> Am 09.11.20 um 23:52 schrieb Fabien Bodard: > And .. sorry I'm on phone but > > Just walk on the string if not space add to new string ...if first space > too... jump to the next not space letter ...etc ? > > Is this not more faster than using a recursive call to replace ? > > The 3 ms gain from benoit can come from the fact he not use trim. That (3 ms) was just a joke because from run to run it differs between something about 2200 and 2400 ms. So I can see no difference at all between Beno?t's solution and the while ... wend loop. Both are about three times faster than the Regexp and a couple of hundred times faster than Brians solution. If anyone wants to try it out here is the text I used to test it: https://paste.c-net.org/HoustonRoxanne It is some dadaistic poetry. Alles Gute Christof Thalhofer -- Dies ist keine Signatur -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From bsteers4 at gmail.com Tue Nov 10 01:29:24 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Tue, 10 Nov 2020 00:29:24 +0000 Subject: [Gambas-user] trimming extra spaces from within a string. In-Reply-To: <562cec7e-a1fa-2408-0e54-2832187bd791@deganius.de> References: <891b023b-b10a-1f68-9855-091f5240e69f@gmail.com> <9c0e1c67-dde9-31ca-129a-00879a50b568@deganius.de> <562cec7e-a1fa-2408-0e54-2832187bd791@deganius.de> Message-ID: yep , been running some tests too. the irony is the fastest way i see is the While , Wend loop method. And that's how i first did it , then i thought i could do it better lol On Mon, 9 Nov 2020 at 23:26, Christof Thalhofer wrote: > Am 09.11.20 um 23:52 schrieb Fabien Bodard: > > > And .. sorry I'm on phone but > > > > Just walk on the string if not space add to new string ...if first space > > too... jump to the next not space letter ...etc ? > > > > Is this not more faster than using a recursive call to replace ? > > > > The 3 ms gain from benoit can come from the fact he not use trim. > > That (3 ms) was just a joke because from run to run it differs between > something about 2200 and 2400 ms. > > So I can see no difference at all between Beno?t's solution and the > while ... wend loop. Both are about three times faster than the Regexp > and a couple of hundred times faster than Brians solution. > > If anyone wants to try it out here is the text I used to test it: > > https://paste.c-net.org/HoustonRoxanne > > It is some dadaistic poetry. > > Alles Gute > > Christof Thalhofer > > -- > Dies ist keine Signatur > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Tue Nov 10 01:44:49 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Tue, 10 Nov 2020 00:44:49 +0000 Subject: [Gambas-user] trimming extra spaces from within a string. In-Reply-To: References: <891b023b-b10a-1f68-9855-091f5240e69f@gmail.com> <9c0e1c67-dde9-31ca-129a-00879a50b568@deganius.de> <562cec7e-a1fa-2408-0e54-2832187bd791@deganius.de> Message-ID: oops i take that back sorry. I'm such an idiot sometimes. the While / Wend method i was testing was working on the string that had already been trimmed using Benoits method :-\ so it was showing as faster , Doh! So on further testing i'm finding the Repeat/Until method is the forerunner :) and i probably need more sleep ;) On Tue, 10 Nov 2020 at 00:29, Bruce Steers wrote: > yep , been running some tests too. > > the irony is the fastest way i see is the While , Wend loop method. > And that's how i first did it , then i thought i could do it better lol > > > On Mon, 9 Nov 2020 at 23:26, Christof Thalhofer > wrote: > >> Am 09.11.20 um 23:52 schrieb Fabien Bodard: >> >> > And .. sorry I'm on phone but >> > >> > Just walk on the string if not space add to new string ...if first space >> > too... jump to the next not space letter ...etc ? >> > >> > Is this not more faster than using a recursive call to replace ? >> > >> > The 3 ms gain from benoit can come from the fact he not use trim. >> >> That (3 ms) was just a joke because from run to run it differs between >> something about 2200 and 2400 ms. >> >> So I can see no difference at all between Beno?t's solution and the >> while ... wend loop. Both are about three times faster than the Regexp >> and a couple of hundred times faster than Brians solution. >> >> If anyone wants to try it out here is the text I used to test it: >> >> https://paste.c-net.org/HoustonRoxanne >> >> It is some dadaistic poetry. >> >> Alles Gute >> >> Christof Thalhofer >> >> -- >> Dies ist keine Signatur >> >> >> ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From chrisml at deganius.de Tue Nov 10 05:38:16 2020 From: chrisml at deganius.de (Christof Thalhofer) Date: Tue, 10 Nov 2020 05:38:16 +0100 Subject: [Gambas-user] trimming extra spaces from within a string. In-Reply-To: References: <891b023b-b10a-1f68-9855-091f5240e69f@gmail.com> <9c0e1c67-dde9-31ca-129a-00879a50b568@deganius.de> <562cec7e-a1fa-2408-0e54-2832187bd791@deganius.de> Message-ID: Am 10.11.20 um 01:44 schrieb Bruce Steers: > So on further testing i'm finding the Repeat/Until method is the > forerunner? :) Did you see huge differences? On my computer both were nearly equal. But anyway, this job seems to be done. Alles Gute Christof Thalhofer -- Dies ist keine Signatur -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From brian at westwoodsvcs.com Tue Nov 10 05:57:13 2020 From: brian at westwoodsvcs.com (Brian G) Date: Mon, 9 Nov 2020 20:57:13 -0800 (PST) Subject: [Gambas-user] trimming extra spaces from within a string. In-Reply-To: References: <891b023b-b10a-1f68-9855-091f5240e69f@gmail.com> <562cec7e-a1fa-2408-0e54-2832187bd791@deganius.de> Message-ID: <735098432.8090.1604984233587.JavaMail.zimbra@westwoodsvcs.com> Hi sorry to be late to the party, I included a project with all the methods mentioned. I have included my version of the remove spaces using alloc and pointers in gambas, it is faster if it is over 5000 characters. Run the project with profiling on. I have included the profiling output. Also I have optimized them all using fast unsafe.... eeek Thank You Brian G ----- Original Message ----- From: "Christof Thalhofer" To: "Gambas mailing list" Sent: Monday, November 9, 2020 8:38:16 PM Subject: Re: [Gambas-user] trimming extra spaces from within a string. Am 10.11.20 um 01:44 schrieb Bruce Steers: > So on further testing i'm finding the Repeat/Until method is the > forerunner? :) Did you see huge differences? On my computer both were nearly equal. But anyway, this job seems to be done. Alles Gute Christof Thalhofer -- Dies ist keine Signatur ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot at 2020-11-09 20-49-14.png Type: image/png Size: 43758 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: testremovespaces-0.0.1.tar.gz Type: application/x-compressed-tar Size: 12501 bytes Desc: not available URL: From mbelmonte at belmotek.net Tue Nov 10 10:08:45 2020 From: mbelmonte at belmotek.net (Martin) Date: Tue, 10 Nov 2020 10:08:45 +0100 Subject: [Gambas-user] trimming extra spaces from within a string. In-Reply-To: <735098432.8090.1604984233587.JavaMail.zimbra@westwoodsvcs.com> References: <891b023b-b10a-1f68-9855-091f5240e69f@gmail.com> <562cec7e-a1fa-2408-0e54-2832187bd791@deganius.de> <735098432.8090.1604984233587.JavaMail.zimbra@westwoodsvcs.com> Message-ID: <03b1e1c0-1425-64d9-08cd-35a23b373fae@belmotek.net> Hi, i made some tests also. the results was: ' The faster Public Function BrianTrim(sRaw As String) As String ? Dim sOut As String ? sOut = Trim$(RegExp.Replace(sRaw, " {2,}+", " ")) ? Return sOut End ' The simplest, second place in velocity Public Function ChristofTrim(sRaw As String) As String ? While InStr(sRaw, "? ") ??? sRaw = Replace(sRaw, "? ", " ") ? Wend ? Return Trim$(sRaw) End The Brian 2nd version including pointers memory and libc seems to be more complex that the others solutions, anyway I don't know if is faster or not I don't test it. Nice exercise. Regards. MB On 10/11/20 5:57, Brian G wrote: > Hi sorry to be late to the party, I included a project with all the methods mentioned. I have included my version of the remove spaces > using alloc and pointers in gambas, it is faster if it is over 5000 characters. > Run the project with profiling on. > > I have included the profiling output. > > Also I have optimized them all using fast unsafe.... eeek > Thank You > Brian G > > ----- Original Message ----- > From: "Christof Thalhofer" > To: "Gambas mailing list" > Sent: Monday, November 9, 2020 8:38:16 PM > Subject: Re: [Gambas-user] trimming extra spaces from within a string. > > Am 10.11.20 um 01:44 schrieb Bruce Steers: > >> So on further testing i'm finding the Repeat/Until method is the >> forerunner? :) > Did you see huge differences? On my computer both were nearly equal. But > anyway, this job seems to be done. > > Alles Gute > > Christof Thalhofer > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sample-trim-faster-0.0.1.tar.gz Type: application/gzip Size: 12114 bytes Desc: not available URL: From chrisml at deganius.de Tue Nov 10 10:33:43 2020 From: chrisml at deganius.de (Christof Thalhofer) Date: Tue, 10 Nov 2020 10:33:43 +0100 Subject: [Gambas-user] trimming extra spaces from within a string. In-Reply-To: <03b1e1c0-1425-64d9-08cd-35a23b373fae@belmotek.net> References: <891b023b-b10a-1f68-9855-091f5240e69f@gmail.com> <562cec7e-a1fa-2408-0e54-2832187bd791@deganius.de> <735098432.8090.1604984233587.JavaMail.zimbra@westwoodsvcs.com> <03b1e1c0-1425-64d9-08cd-35a23b373fae@belmotek.net> Message-ID: <33a617cc-0a6d-1715-07ad-d160c1163462@deganius.de> Am 10.11.20 um 10:08 schrieb Martin: > Hi, i made some tests also. > > the results was: > > ' The faster > > Public Function BrianTrim(sRaw As String) As String This should be called TobiTrim, as this idea came from Tobi: > ? Dim sOut As String > ? sOut = Trim$(RegExp.Replace(sRaw, " {2,}+", " ")) > ? Return sOut > End Very funny, on my computer Regexp is significantly slower, maybe it is also a matter of computational power or even cpu cores? > Nice exercise. Yes, funny! Alles Gute Christof Thalhofer -- Dies ist keine Signatur -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From rwe-sse at osnanet.de Tue Nov 10 10:51:48 2020 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Tue, 10 Nov 2020 10:51:48 +0100 Subject: [Gambas-user] trimming extra spaces from within a string. In-Reply-To: <33a617cc-0a6d-1715-07ad-d160c1163462@deganius.de> References: <891b023b-b10a-1f68-9855-091f5240e69f@gmail.com> <562cec7e-a1fa-2408-0e54-2832187bd791@deganius.de> <735098432.8090.1604984233587.JavaMail.zimbra@westwoodsvcs.com> <03b1e1c0-1425-64d9-08cd-35a23b373fae@belmotek.net> <33a617cc-0a6d-1715-07ad-d160c1163462@deganius.de> Message-ID: <40789933-1f40-e053-2c8d-0a8ddb4a4f17@osnanet.de> Am 10.11.20 um 10:33 schrieb Christof Thalhofer: > Am 10.11.20 um 10:08 schrieb Martin: > >> Hi, i made some tests also. >> >> the results was: >> >> ' The faster >> >> Public Function BrianTrim(sRaw As String) As String > > This should be called TobiTrim, as this idea came from Tobi: > >> ? Dim sOut As String >> ? sOut = Trim$(RegExp.Replace(sRaw, " {2,}+", " ")) >> ? Return sOut >> End > > Very funny, on my computer Regexp is significantly slower, maybe it is > also a matter of computational power or even cpu cores? > The regexp thing looks really cool, though I would never be able to make it myself :) Now, at the beginning of this discussion I had this idea. It's not that elegant, it only uses low-level functions, and it uses some more variables, but it runs at least: Private Function RolfTrim(sRaw As String) As String Dim sOut, sChr As String Dim po, ctr As Integer For po = 1 To String.Len(sRaw) sChr = String.Mid(sRaw, po, 1) If sChr = " " Then If ctr = 0 Then ctr = 1 sOut &= " " Endif Else ctr = 0 sOut &= sChr Endif Next Return sOut End One might want to replace ctr by a Boolean and ask for True and False instead. Regards Rolf From mbelmonte at belmotek.net Tue Nov 10 11:40:28 2020 From: mbelmonte at belmotek.net (Martin) Date: Tue, 10 Nov 2020 11:40:28 +0100 Subject: [Gambas-user] trimming extra spaces from within a string. In-Reply-To: <40789933-1f40-e053-2c8d-0a8ddb4a4f17@osnanet.de> References: <891b023b-b10a-1f68-9855-091f5240e69f@gmail.com> <562cec7e-a1fa-2408-0e54-2832187bd791@deganius.de> <735098432.8090.1604984233587.JavaMail.zimbra@westwoodsvcs.com> <03b1e1c0-1425-64d9-08cd-35a23b373fae@belmotek.net> <33a617cc-0a6d-1715-07ad-d160c1163462@deganius.de> <40789933-1f40-e053-2c8d-0a8ddb4a4f17@osnanet.de> Message-ID: <634ec923-e286-c034-69b3-f019bdbad32e@belmotek.net> Hi Rolf, i think in the function that you propose don't remove the spaces at the beginning and at the end of the string. Anyway I think the good function is the Christof proposal because is very simple and everybody can manage that "technology". I say the good not the best that is Tobias proposal using regex in my computer at least :-). Regards. On 10/11/20 10:51, Rolf-Werner Eilert wrote: > Am 10.11.20 um 10:33 schrieb Christof Thalhofer: >> Am 10.11.20 um 10:08 schrieb Martin: >> >>> Hi, i made some tests also. >>> >>> the results was: >>> >>> ' The faster >>> >>> Public Function BrianTrim(sRaw As String) As String >> >> This should be called TobiTrim, as this idea came from Tobi: >> >>> ?? Dim sOut As String >>> ?? sOut = Trim$(RegExp.Replace(sRaw, " {2,}+", " ")) >>> ?? Return sOut >>> End >> >> Very funny, on my computer Regexp is significantly slower, maybe it is >> also a matter of computational power or even cpu cores? >> > > The regexp thing looks really cool, though I would never be able to > make it myself :) > > Now, at the beginning of this discussion I had this idea. It's not > that elegant, it only uses low-level functions, and it uses some more > variables, but it runs at least: > > Private Function RolfTrim(sRaw As String) As String > Dim sOut, sChr As String > Dim po, ctr As Integer > > ? For po = 1 To String.Len(sRaw) > ??? sChr = String.Mid(sRaw, po, 1) > ??? If sChr = " " Then > ????? If ctr = 0 Then > ??????? ctr = 1 > ??????? sOut &= " " > ????? Endif > ??? Else > ????? ctr = 0 > ????? sOut &= sChr > ??? Endif > ? Next > > ? Return sOut > > End > > One might want to replace ctr by a Boolean and ask for True and False > instead. > > Regards > Rolf > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- From rwe-sse at osnanet.de Tue Nov 10 11:56:23 2020 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Tue, 10 Nov 2020 11:56:23 +0100 Subject: [Gambas-user] trimming extra spaces from within a string. In-Reply-To: <634ec923-e286-c034-69b3-f019bdbad32e@belmotek.net> References: <891b023b-b10a-1f68-9855-091f5240e69f@gmail.com> <562cec7e-a1fa-2408-0e54-2832187bd791@deganius.de> <735098432.8090.1604984233587.JavaMail.zimbra@westwoodsvcs.com> <03b1e1c0-1425-64d9-08cd-35a23b373fae@belmotek.net> <33a617cc-0a6d-1715-07ad-d160c1163462@deganius.de> <40789933-1f40-e053-2c8d-0a8ddb4a4f17@osnanet.de> <634ec923-e286-c034-69b3-f019bdbad32e@belmotek.net> Message-ID: <2273fef2-4a95-e4a5-9ae2-0ec26a74c594@osnanet.de> Am 10.11.20 um 11:40 schrieb Martin: > Hi Rolf, i think in the function that you propose don't remove the > spaces at the beginning and at the end of the string. Oh yes, that's true, forgot to include this. It would take a single Trim(sOut) before the function returns. > > Anyway I think the good function is the Christof proposal because is > very simple and everybody can manage that "technology". I say the good > not the best that is Tobias proposal using regex in my computer at least > :-). Your race was a bit about speed. Using Replace() over and over might be the drawback here, as it will certainly use a loop internally doing more or less the same as my function does. The same applies to regex, and even heavier. But I agree, the other solutions are more elegant than mine :) Regards Rolf From chrisml at deganius.de Tue Nov 10 12:03:33 2020 From: chrisml at deganius.de (Christof Thalhofer) Date: Tue, 10 Nov 2020 12:03:33 +0100 Subject: [Gambas-user] trimming extra spaces from within a string. In-Reply-To: <735098432.8090.1604984233587.JavaMail.zimbra@westwoodsvcs.com> References: <891b023b-b10a-1f68-9855-091f5240e69f@gmail.com> <562cec7e-a1fa-2408-0e54-2832187bd791@deganius.de> <735098432.8090.1604984233587.JavaMail.zimbra@westwoodsvcs.com> Message-ID: <5170f433-8edc-94d6-3f5b-0b6fcf23fc5f@deganius.de> Am 10.11.20 um 05:57 schrieb Brian G: > Hi sorry to be late to the party, I included a project with all the > methods mentioned. I have included my version of the remove spaces > using alloc and pointers in gambas, it is faster if it is over 5000 > characters. Run the project with profiling on. Yes it (fixstring) is much faster but only with 'Fast Unsafe', otherwise it is much slower (about 400 times!). Interestingly all other methods do not benefit from 'Fast'. And the editor in the IDE is heavily broken with 'Fast Unsafe Public Sub'. Alles Gute Christof Thalhofer -- Dies ist keine Signatur -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From g4mba5 at gmail.com Tue Nov 10 12:15:10 2020 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Tue, 10 Nov 2020 12:15:10 +0100 Subject: [Gambas-user] trimming extra spaces from within a string. In-Reply-To: <5170f433-8edc-94d6-3f5b-0b6fcf23fc5f@deganius.de> References: <891b023b-b10a-1f68-9855-091f5240e69f@gmail.com> <562cec7e-a1fa-2408-0e54-2832187bd791@deganius.de> <735098432.8090.1604984233587.JavaMail.zimbra@westwoodsvcs.com> <5170f433-8edc-94d6-3f5b-0b6fcf23fc5f@deganius.de> Message-ID: Le 10/11/2020 ? 12:03, Christof Thalhofer a ?crit?: > > And the editor in the IDE is heavily broken with 'Fast Unsafe Public Sub'. > What do you mean? -- Beno?t Minisini From chrisml at deganius.de Tue Nov 10 12:28:43 2020 From: chrisml at deganius.de (Christof Thalhofer) Date: Tue, 10 Nov 2020 12:28:43 +0100 Subject: [Gambas-user] trimming extra spaces from within a string. In-Reply-To: <2273fef2-4a95-e4a5-9ae2-0ec26a74c594@osnanet.de> References: <891b023b-b10a-1f68-9855-091f5240e69f@gmail.com> <562cec7e-a1fa-2408-0e54-2832187bd791@deganius.de> <735098432.8090.1604984233587.JavaMail.zimbra@westwoodsvcs.com> <03b1e1c0-1425-64d9-08cd-35a23b373fae@belmotek.net> <33a617cc-0a6d-1715-07ad-d160c1163462@deganius.de> <40789933-1f40-e053-2c8d-0a8ddb4a4f17@osnanet.de> <634ec923-e286-c034-69b3-f019bdbad32e@belmotek.net> <2273fef2-4a95-e4a5-9ae2-0ec26a74c594@osnanet.de> Message-ID: <8daee766-7457-1af9-5ac1-3a9a12ac51bb@deganius.de> Am 10.11.20 um 11:56 schrieb Rolf-Werner Eilert: > Your race was a bit about speed. Using Replace() over and over might be > the drawback here, as it will certainly use a loop internally doing more > or less the same as my function does. The same applies to regex, and > even heavier. > > But I agree, the other solutions are more elegant than mine :) Currently Brian G holds the price for max speed. And yours needs about 1600 ms for one single(!) run* of the bobiba.txt on my computer. I think it's one of the slowest. ;-) The other ones run the text 500 times in about 2.5 seconds. Your code would need about 13 minutes for the same task. Alles Gute Christof Thalhofer * picture of this single run attached. -- Dies ist keine Signatur -------------- next part -------------- A non-text attachment was scrubbed... Name: rolf.png Type: image/png Size: 41975 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From chrisml at deganius.de Tue Nov 10 12:34:27 2020 From: chrisml at deganius.de (Christof Thalhofer) Date: Tue, 10 Nov 2020 12:34:27 +0100 Subject: [Gambas-user] trimming extra spaces from within a string. In-Reply-To: References: <891b023b-b10a-1f68-9855-091f5240e69f@gmail.com> <562cec7e-a1fa-2408-0e54-2832187bd791@deganius.de> <735098432.8090.1604984233587.JavaMail.zimbra@westwoodsvcs.com> <5170f433-8edc-94d6-3f5b-0b6fcf23fc5f@deganius.de> Message-ID: <0cbc360c-d3c3-6e62-eef7-74f8a499c166@deganius.de> Am 10.11.20 um 12:15 schrieb Beno?t Minisini: >> And the editor in the IDE is heavily broken with 'Fast Unsafe Public Sub'. >> > > What do you mean? Please have a look at the screenshot. Indentation is broken, also the combobox with class symbols. The editor does not display the methods as such. Alles Gute Christof Thalhofer -- Dies ist keine Signatur -------------- next part -------------- A non-text attachment was scrubbed... Name: editor-broken-with-fast-unsafe-public-sub.png Type: image/png Size: 52475 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From rwe-sse at osnanet.de Tue Nov 10 12:45:22 2020 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Tue, 10 Nov 2020 12:45:22 +0100 Subject: [Gambas-user] trimming extra spaces from within a string. In-Reply-To: <8daee766-7457-1af9-5ac1-3a9a12ac51bb@deganius.de> References: <891b023b-b10a-1f68-9855-091f5240e69f@gmail.com> <562cec7e-a1fa-2408-0e54-2832187bd791@deganius.de> <735098432.8090.1604984233587.JavaMail.zimbra@westwoodsvcs.com> <03b1e1c0-1425-64d9-08cd-35a23b373fae@belmotek.net> <33a617cc-0a6d-1715-07ad-d160c1163462@deganius.de> <40789933-1f40-e053-2c8d-0a8ddb4a4f17@osnanet.de> <634ec923-e286-c034-69b3-f019bdbad32e@belmotek.net> <2273fef2-4a95-e4a5-9ae2-0ec26a74c594@osnanet.de> <8daee766-7457-1af9-5ac1-3a9a12ac51bb@deganius.de> Message-ID: Am 10.11.20 um 12:28 schrieb Christof Thalhofer: > Am 10.11.20 um 11:56 schrieb Rolf-Werner Eilert: > >> Your race was a bit about speed. Using Replace() over and over might be >> the drawback here, as it will certainly use a loop internally doing more >> or less the same as my function does. The same applies to regex, and >> even heavier. >> >> But I agree, the other solutions are more elegant than mine :) > > Currently Brian G holds the price for max speed. > > And yours needs about 1600 ms for one single(!) run* of the bobiba.txt > on my computer. I think it's one of the slowest. ;-) > > The other ones run the text 500 times in about 2.5 seconds. Your code > would need about 13 minutes for the same task. Wow that's impressive. What is the reason? I would guess that compiled C-code is always faster than interpreted code, even if the function is more complex. > > Alles Gute Dir auch :) Rolf From bsteers4 at gmail.com Tue Nov 10 13:43:48 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Tue, 10 Nov 2020 12:43:48 +0000 Subject: [Gambas-user] Retaining focus. + Key repeat after x11.SendKey Message-ID: Hi all. So my macro recorder is getting pretty functional. I've found the following issues though. I had to remove the button to Play the macro. the reason is that if you are repeatedly clicking the button to run the macro many times and you click before the last playing macro has finished then the editor loses focus and misses the Key events. so i need a way to give the editor focus and not let any mouse clicks take the focus away while it's playing. Also holding the F7 key down (the shortcut to play) does not repeat it just plays once. The key events seem to repeat when holding okay when i don't have the macro playing but for some reason it won't repeat for the macro, my assumption is the SendKey call is affecting it. The project is here.. https://gitlab.com/bsteers4/sripted/-/tree/testing The MacroRecorder.class is here... https://gitlab.com/bsteers4/sripted/-/blob/testing/.src/MacroRecorder.class Pressing F7 calls this in FMain.class *Public Sub MenuMacroPlay_Click() mMacro.Play($tEditor) End * A clip of it in action is here... http://bws.org.uk/simplescreenrecorder-2020-11-10_02.22.03.mp4 Any advice/suggestion welcomed. Many thanks in advance. BruceS -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Tue Nov 10 13:50:13 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Tue, 10 Nov 2020 12:50:13 +0000 Subject: [Gambas-user] Retaining focus. + Key repeat after x11.SendKey In-Reply-To: References: Message-ID: And yes i know the screenshot code does not make sense, should have type Case Key["Name"] but it's irrelevant , was just an example of the macro working. In the clip i use the menu "Play" once then repeatedly hit F7 (but you can't see that) , holding f7 just plays once. And if i had the button there and clicked away rapidly on it the code becomes messy as some key events get missed.. > A clip of it in action is here... > http://bws.org.uk/simplescreenrecorder-2020-11-10_02.22.03.mp4 -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Tue Nov 10 16:16:16 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Tue, 10 Nov 2020 15:16:16 +0000 Subject: [Gambas-user] set $EDITOR Env Message-ID: opening a project in latest commit tells me i need to set $EDITOR env to my favorite graphical text editor. some controls need it? what's all that about? -------------- next part -------------- An HTML attachment was scrubbed... URL: From brian at westwoodsvcs.com Tue Nov 10 16:39:14 2020 From: brian at westwoodsvcs.com (Brian G) Date: Tue, 10 Nov 2020 07:39:14 -0800 (PST) Subject: [Gambas-user] trimming extra spaces from within a string. In-Reply-To: <5170f433-8edc-94d6-3f5b-0b6fcf23fc5f@deganius.de> References: <891b023b-b10a-1f68-9855-091f5240e69f@gmail.com> <562cec7e-a1fa-2408-0e54-2832187bd791@deganius.de> <735098432.8090.1604984233587.JavaMail.zimbra@westwoodsvcs.com> <5170f433-8edc-94d6-3f5b-0b6fcf23fc5f@deganius.de> Message-ID: <1567130520.8297.1605022754341.JavaMail.zimbra@westwoodsvcs.com> Yes My function does rely on fast unsafe and does cause a penalty when the app first start for the compile... The string@ or pointer@ use a lot of overhead when not used with unsafe. But even just fast unsafe on this one function pays off. Also notice that using anything but integers as counters seems to seriously slow down functions Note: My regex example did not come from Tobi.... Lol Thank You Brian G ----- Original Message ----- From: "Christof Thalhofer" To: "Gambas mailing list" Sent: Tuesday, November 10, 2020 3:03:33 AM Subject: Re: [Gambas-user] trimming extra spaces from within a string. Am 10.11.20 um 05:57 schrieb Brian G: > Hi sorry to be late to the party, I included a project with all the > methods mentioned. I have included my version of the remove spaces > using alloc and pointers in gambas, it is faster if it is over 5000 > characters. Run the project with profiling on. Yes it (fixstring) is much faster but only with 'Fast Unsafe', otherwise it is much slower (about 400 times!). Interestingly all other methods do not benefit from 'Fast'. And the editor in the IDE is heavily broken with 'Fast Unsafe Public Sub'. Alles Gute Christof Thalhofer -- Dies ist keine Signatur ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- From olivier.cruilles at yahoo.fr Tue Nov 10 16:47:32 2020 From: olivier.cruilles at yahoo.fr (Linus) Date: Tue, 10 Nov 2020 10:47:32 -0500 Subject: [Gambas-user] trimming extra spaces from within a string. In-Reply-To: References: <891b023b-b10a-1f68-9855-091f5240e69f@gmail.com> <562cec7e-a1fa-2408-0e54-2832187bd791@deganius.de> <735098432.8090.1604984233587.JavaMail.zimbra@westwoodsvcs.com> <03b1e1c0-1425-64d9-08cd-35a23b373fae@belmotek.net> <33a617cc-0a6d-1715-07ad-d160c1163462@deganius.de> <40789933-1f40-e053-2c8d-0a8ddb4a4f17@osnanet.de> <634ec923-e286-c034-69b3-f019bdbad32e@belmotek.net> <2273fef2-4a95-e4a5-9ae2-0ec26a74c594@osnanet.de> <8daee766-7457-1af9-5ac1-3a9a12ac51bb@deganius.de> Message-ID: Hi, Just a question, why not just use SPLIT function to split all the text and next reassemble it by a JOIN Public Sub TrimText(sText As String) Dim aText As String[] atext = Split(sText, " ", Chr(140), True) Print atext.Join(" ") End Too simple maybe Olivier > Le 10 nov. 2020 ? 06:45, Rolf-Werner Eilert a ?crit : > > Am 10.11.20 um 12:28 schrieb Christof Thalhofer: >> Am 10.11.20 um 11:56 schrieb Rolf-Werner Eilert: >>> Your race was a bit about speed. Using Replace() over and over might be >>> the drawback here, as it will certainly use a loop internally doing more >>> or less the same as my function does. The same applies to regex, and >>> even heavier. >>> >>> But I agree, the other solutions are more elegant than mine :) >> Currently Brian G holds the price for max speed. >> And yours needs about 1600 ms for one single(!) run* of the bobiba.txt >> on my computer. I think it's one of the slowest. ;-) >> The other ones run the text 500 times in about 2.5 seconds. Your code >> would need about 13 minutes for the same task. > > Wow that's impressive. What is the reason? I would guess that compiled C-code is always faster than interpreted code, even if the function is more complex. > >> Alles Gute > > Dir auch :) > > Rolf > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: From mbelmonte at belmotek.net Tue Nov 10 17:10:20 2020 From: mbelmonte at belmotek.net (Martin) Date: Tue, 10 Nov 2020 17:10:20 +0100 Subject: [Gambas-user] trimming extra spaces from within a string. In-Reply-To: References: <891b023b-b10a-1f68-9855-091f5240e69f@gmail.com> <562cec7e-a1fa-2408-0e54-2832187bd791@deganius.de> <735098432.8090.1604984233587.JavaMail.zimbra@westwoodsvcs.com> <03b1e1c0-1425-64d9-08cd-35a23b373fae@belmotek.net> <33a617cc-0a6d-1715-07ad-d160c1163462@deganius.de> <40789933-1f40-e053-2c8d-0a8ddb4a4f17@osnanet.de> <634ec923-e286-c034-69b3-f019bdbad32e@belmotek.net> <2273fef2-4a95-e4a5-9ae2-0ec26a74c594@osnanet.de> <8daee766-7457-1af9-5ac1-3a9a12ac51bb@deganius.de> Message-ID: Oliver, you right, your method is faster that others. Here I attach an screen shot of profiler and also the sample project for testing. Testing using Fast unsafe Regards. On 10/11/20 16:47, Linus via User wrote: > Hi, > > Just a question, why not just use SPLIT function to split all the text > and next reassemble it by a JOIN > > Public Sub TrimText(sText As String) > > ? Dim aText As String[] > > ? atext = Split(sText, " ", Chr(140), True) > > ? Print atext.Join(" ") > > End > > > Too simple maybe > > > Olivier > >> Le 10 nov. 2020 ? 06:45, Rolf-Werner Eilert > > a ?crit : >> >> Am 10.11.20 um 12:28 schrieb Christof Thalhofer: >>> Am 10.11.20 um 11:56 schrieb Rolf-Werner Eilert: >>>> Your race was a bit about speed. Using Replace() over and over might be >>>> the drawback here, as it will certainly use a loop internally doing >>>> more >>>> or less the same as my function does. The same applies to regex, and >>>> even heavier. >>>> >>>> But I agree, the other solutions are more elegant than mine :) >>> Currently Brian G holds the price for max speed. >>> And yours needs about 1600 ms for one single(!) run* of the bobiba.txt >>> on my computer. I think it's one of the slowest. ;-) >>> The other ones run the text 500 times in about 2.5 seconds. Your code >>> would need about 13 minutes for the same task. >> >> Wow that's impressive. What is the reason? I would guess that >> compiled C-code is always faster than interpreted code, even if the >> function is more complex. >> >>> Alles Gute >> >> Dir auch :) >> >> Rolf >> >> ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: test-with-fast-unsafe.png Type: image/png Size: 56133 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sample-trim-faster-0.0.3.tar.gz Type: application/gzip Size: 12323 bytes Desc: not available URL: From brian at westwoodsvcs.com Tue Nov 10 17:11:02 2020 From: brian at westwoodsvcs.com (Brian G) Date: Tue, 10 Nov 2020 08:11:02 -0800 (PST) Subject: [Gambas-user] trimming extra spaces from within a string. In-Reply-To: References: <891b023b-b10a-1f68-9855-091f5240e69f@gmail.com> <33a617cc-0a6d-1715-07ad-d160c1163462@deganius.de> <40789933-1f40-e053-2c8d-0a8ddb4a4f17@osnanet.de> <634ec923-e286-c034-69b3-f019bdbad32e@belmotek.net> <2273fef2-4a95-e4a5-9ae2-0ec26a74c594@osnanet.de> <8daee766-7457-1af9-5ac1-3a9a12ac51bb@deganius.de> Message-ID: <931052303.8312.1605024662831.JavaMail.zimbra@westwoodsvcs.com> The split and join method was the forth version of doing the space removal in my example, and constantly came out fastest non mashed('c' ized) version of doing it, but it does indeed require a lot of memory for large conversion, as does fixstring example Thank You Brian G From: "Gambas mailing list" To: "Gambas mailing list" Cc: "Linus" Sent: Tuesday, November 10, 2020 7:47:32 AM Subject: Re: [Gambas-user] trimming extra spaces from within a string. Hi, Just a question, why not just use SPLIT function to split all the text and next reassemble it by a JOIN Public Sub TrimText(sText As String) Dim aText As String[] atext = Split(sText, " ", Chr(140), True) Print atext.Join(" ") End Too simple maybe Olivier Le 10 nov. 2020 ? 06:45, Rolf-Werner Eilert < [ mailto:rwe-sse at osnanet.de | rwe-sse at osnanet.de ] > a ?crit : Am 10.11.20 um 12:28 schrieb Christof Thalhofer: BQ_BEGIN Am 10.11.20 um 11:56 schrieb Rolf-Werner Eilert: BQ_BEGIN Your race was a bit about speed. Using Replace() over and over might be the drawback here, as it will certainly use a loop internally doing more or less the same as my function does. The same applies to regex, and even heavier. But I agree, the other solutions are more elegant than mine :) Currently Brian G holds the price for max speed. And yours needs about 1600 ms for one single(!) run* of the bobiba.txt on my computer. I think it's one of the slowest. ;-) The other ones run the text 500 times in about 2.5 seconds. Your code would need about 13 minutes for the same task. BQ_END Wow that's impressive. What is the reason? I would guess that compiled C-code is always faster than interpreted code, even if the function is more complex. BQ_BEGIN Alles Gute BQ_END Dir auch :) Rolf ----[ [ http://gambaswiki.org/wiki/doc/netiquette | http://gambaswiki.org/wiki/doc/netiquette ] ]---- BQ_END ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Tue Nov 10 17:47:18 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Tue, 10 Nov 2020 16:47:18 +0000 Subject: [Gambas-user] trimming extra spaces from within a string. In-Reply-To: <1567130520.8297.1605022754341.JavaMail.zimbra@westwoodsvcs.com> References: <891b023b-b10a-1f68-9855-091f5240e69f@gmail.com> <562cec7e-a1fa-2408-0e54-2832187bd791@deganius.de> <735098432.8090.1604984233587.JavaMail.zimbra@westwoodsvcs.com> <5170f433-8edc-94d6-3f5b-0b6fcf23fc5f@deganius.de> <1567130520.8297.1605022754341.JavaMail.zimbra@westwoodsvcs.com> Message-ID: How come this does not work then? I thought ByVal was supposed to enable this sort of thing but it does not seem to work? *Private Sub InTrim(ByVal sVar As String) If Not sVar Then ReturnDim OldLen As IntegerRepeat OldLen = Len(sVar) sVar = Replace(sVar, " ", " ")Until Len(sVar) = OldLensVar = Trim(sVar)End* -------------- next part -------------- An HTML attachment was scrubbed... URL: From brian at westwoodsvcs.com Tue Nov 10 17:50:43 2020 From: brian at westwoodsvcs.com (Brian G) Date: Tue, 10 Nov 2020 08:50:43 -0800 (PST) Subject: [Gambas-user] trimming extra spaces from within a string. In-Reply-To: <931052303.8312.1605024662831.JavaMail.zimbra@westwoodsvcs.com> References: <891b023b-b10a-1f68-9855-091f5240e69f@gmail.com> <40789933-1f40-e053-2c8d-0a8ddb4a4f17@osnanet.de> <634ec923-e286-c034-69b3-f019bdbad32e@belmotek.net> <2273fef2-4a95-e4a5-9ae2-0ec26a74c594@osnanet.de> <8daee766-7457-1af9-5ac1-3a9a12ac51bb@deganius.de> <931052303.8312.1605024662831.JavaMail.zimbra@westwoodsvcs.com> Message-ID: <282418121.8639.1605027043739.JavaMail.zimbra@westwoodsvcs.com> Martin , I have attached your test program using slightly longer strings, 5000 or so bytes We can see just how much that changes the results as to which is the fastest algorithm. The greatest overhead in all the examples would seem to be the number of actual string copies needed to complete the task For the larger strings, and the overhead of the interpreter for the shorter strings On longer string using fast unsafe the regex methods seem to be the fastest methods out of the box. So I guess when doing this sort of stuff, the real question is how much do we have to do.... Fast is relative I guess! Thank You Brian G From: "Brian" To: "Gambas mailing list" Sent: Tuesday, November 10, 2020 8:11:02 AM Subject: [Gambas-user] trimming extra spaces from within a string. The split and join method was the forth version of doing the space removal in my example, and constantly came out fastest non mashed('c' ized) version of doing it, but it does indeed require a lot of memory for large conversion, as does fixstring example Thank You Brian G From: "Gambas mailing list" To: "Gambas mailing list" Cc: "Linus" Sent: Tuesday, November 10, 2020 7:47:32 AM Subject: Re: [Gambas-user] trimming extra spaces from within a string. Hi, Just a question, why not just use SPLIT function to split all the text and next reassemble it by a JOIN Public Sub TrimText(sText As String) Dim aText As String[] atext = Split(sText, " ", Chr(140), True) Print atext.Join(" ") End Too simple maybe Olivier Le 10 nov. 2020 ? 06:45, Rolf-Werner Eilert < [ mailto:rwe-sse at osnanet.de | rwe-sse at osnanet.de ] > a ?crit : Am 10.11.20 um 12:28 schrieb Christof Thalhofer: BQ_BEGIN Am 10.11.20 um 11:56 schrieb Rolf-Werner Eilert: BQ_BEGIN Your race was a bit about speed. Using Replace() over and over might be the drawback here, as it will certainly use a loop internally doing more or less the same as my function does. The same applies to regex, and even heavier. But I agree, the other solutions are more elegant than mine :) Currently Brian G holds the price for max speed. And yours needs about 1600 ms for one single(!) run* of the bobiba.txt on my computer. I think it's one of the slowest. ;-) The other ones run the text 500 times in about 2.5 seconds. Your code would need about 13 minutes for the same task. BQ_END Wow that's impressive. What is the reason? I would guess that compiled C-code is always faster than interpreted code, even if the function is more complex. BQ_BEGIN Alles Gute BQ_END Dir auch :) Rolf ----[ [ http://gambaswiki.org/wiki/doc/netiquette | http://gambaswiki.org/wiki/doc/netiquette ] ]---- BQ_END ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sample-trim-faster-0.0.3.tar.gz Type: application/x-compressed-tar Size: 12925 bytes Desc: not available URL: From taboege at gmail.com Tue Nov 10 19:02:23 2020 From: taboege at gmail.com (Tobias Boege) Date: Tue, 10 Nov 2020 19:02:23 +0100 Subject: [Gambas-user] set $EDITOR Env In-Reply-To: References: Message-ID: <20201110180223.GK171194@highrise.localdomain> On Tue, 10 Nov 2020, Bruce Steers wrote: > opening a project in latest commit tells me i need to set $EDITOR env to my > favorite graphical text editor. some controls need it? > > what's all that about? Does it perhaps say "version control" instead of "some controls"? If yes, then this blurb from the git-commit man page provides some explanation (git being an instance of a version control system which is supported by the Gambas IDE and requires some sort of editor to write commit messages): ENVIRONMENT AND CONFIGURATION VARIABLES The editor used to edit the commit log message will be chosen from the GIT_EDITOR environment variable, the core.editor configuration variable, the VISUAL environment variable, or the EDITOR environment variable (in that order). See git-var(1) for details. The EDITOR variable seems to be the common denominator among programs that do not have text editors built in but sometimes need you to edit text. mutt uses VISUAL or EDITOR as well, as does subversion [1] for writing commit messages. Best, Tobias [1] http://svnbook.red-bean.com/en/1.4/svn.advanced.confarea.html#svn.advanced.confarea.opts.config -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From bsteers4 at gmail.com Tue Nov 10 19:34:45 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Tue, 10 Nov 2020 18:34:45 +0000 Subject: [Gambas-user] set $EDITOR Env In-Reply-To: <20201110180223.GK171194@highrise.localdomain> References: <20201110180223.GK171194@highrise.localdomain> Message-ID: aah yes , version controls it said. does that mean the version control actually works now ? On all other gambas versions i don't get the message but clicking commit and editing the journal then pressing commit just gives the message "Please enter the journal" (and yes i typed a commit message in the journal) So is gambas not an editor anymore? It won't load anything that's not a gambas file anymore so it's looking like it. one of the various reasons i've reverted to 3.14 On Tue, 10 Nov 2020 at 18:03, Tobias Boege wrote: > On Tue, 10 Nov 2020, Bruce Steers wrote: > > opening a project in latest commit tells me i need to set $EDITOR env to > my > > favorite graphical text editor. some controls need it? > > > > what's all that about? > > Does it perhaps say "version control" instead of "some controls"? > > If yes, then this blurb from the git-commit man page provides some > explanation (git being an instance of a version control system which > is supported by the Gambas IDE and requires some sort of editor to > write commit messages): > > ENVIRONMENT AND CONFIGURATION VARIABLES > The editor used to edit the commit log message will be chosen from > the > GIT_EDITOR environment variable, the core.editor configuration > variable, the VISUAL environment variable, or the EDITOR environment > variable (in that order). See git-var(1) for details. > > The EDITOR variable seems to be the common denominator among programs > that do not have text editors built in but sometimes need you to edit > text. mutt uses VISUAL or EDITOR as well, as does subversion [1] for > writing commit messages. > > Best, > Tobias > > [1] > http://svnbook.red-bean.com/en/1.4/svn.advanced.confarea.html#svn.advanced.confarea.opts.config > > -- > "There's an old saying: Don't change anything... ever!" -- Mr. Monk > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gambas.fr at gmail.com Tue Nov 10 21:06:10 2020 From: gambas.fr at gmail.com (Fabien Bodard) Date: Tue, 10 Nov 2020 21:06:10 +0100 Subject: [Gambas-user] trimming extra spaces from within a string. In-Reply-To: <282418121.8639.1605027043739.JavaMail.zimbra@westwoodsvcs.com> References: <891b023b-b10a-1f68-9855-091f5240e69f@gmail.com> <40789933-1f40-e053-2c8d-0a8ddb4a4f17@osnanet.de> <634ec923-e286-c034-69b3-f019bdbad32e@belmotek.net> <2273fef2-4a95-e4a5-9ae2-0ec26a74c594@osnanet.de> <8daee766-7457-1af9-5ac1-3a9a12ac51bb@deganius.de> <931052303.8312.1605024662831.JavaMail.zimbra@westwoodsvcs.com> <282418121.8639.1605027043739.JavaMail.zimbra@westwoodsvcs.com> Message-ID: This is mine but I'm not able to test it in Fast mode ... But even in 'normal' it is more faster than rolf one :-) If someone can find why I'm not able to get it running on fast mode... Public Function FabienTrim(sRaw As String) As String Dim s As String Dim hStream As File Dim bFirst As Boolean = True hStream = Open String For Write For i As Integer = 0 To Len(sRaw) - 1 s = sRaw[i] If s = " " Then If Not bFirst Then Write #hStream, s bFirst = True Endif Else bFirst = False Write #hStream, s Endif Next s = Close #hStream If bFirst Then s = Left(s, -1) Return s End From gambas.fr at gmail.com Tue Nov 10 21:13:45 2020 From: gambas.fr at gmail.com (Fabien Bodard) Date: Tue, 10 Nov 2020 21:13:45 +0100 Subject: [Gambas-user] trimming extra spaces from within a string. In-Reply-To: References: <891b023b-b10a-1f68-9855-091f5240e69f@gmail.com> <40789933-1f40-e053-2c8d-0a8ddb4a4f17@osnanet.de> <634ec923-e286-c034-69b3-f019bdbad32e@belmotek.net> <2273fef2-4a95-e4a5-9ae2-0ec26a74c594@osnanet.de> <8daee766-7457-1af9-5ac1-3a9a12ac51bb@deganius.de> <931052303.8312.1605024662831.JavaMail.zimbra@westwoodsvcs.com> <282418121.8639.1605027043739.JavaMail.zimbra@westwoodsvcs.com> Message-ID: It seem there is a problem with the use of Stream and Fast on the same time :-/ From gambas.fr at gmail.com Tue Nov 10 21:27:17 2020 From: gambas.fr at gmail.com (Fabien Bodard) Date: Tue, 10 Nov 2020 21:27:17 +0100 Subject: [Gambas-user] trimming extra spaces from within a string. In-Reply-To: References: <891b023b-b10a-1f68-9855-091f5240e69f@gmail.com> <40789933-1f40-e053-2c8d-0a8ddb4a4f17@osnanet.de> <634ec923-e286-c034-69b3-f019bdbad32e@belmotek.net> <2273fef2-4a95-e4a5-9ae2-0ec26a74c594@osnanet.de> <8daee766-7457-1af9-5ac1-3a9a12ac51bb@deganius.de> <931052303.8312.1605024662831.JavaMail.zimbra@westwoodsvcs.com> <282418121.8639.1605027043739.JavaMail.zimbra@westwoodsvcs.com> Message-ID: And maybe I need to replace the for next loop by a while/wend loop.. to gain a little bit speed Le mar. 10 nov. 2020 ? 21:13, Fabien Bodard a ?crit : > It seem there is a problem with the use of Stream and Fast on the same > time :-/ > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gambas.fr at gmail.com Tue Nov 10 22:18:25 2020 From: gambas.fr at gmail.com (Fabien Bodard) Date: Tue, 10 Nov 2020 22:18:25 +0100 Subject: [Gambas-user] trimming extra spaces from within a string. In-Reply-To: References: <891b023b-b10a-1f68-9855-091f5240e69f@gmail.com> <40789933-1f40-e053-2c8d-0a8ddb4a4f17@osnanet.de> <634ec923-e286-c034-69b3-f019bdbad32e@belmotek.net> <2273fef2-4a95-e4a5-9ae2-0ec26a74c594@osnanet.de> <8daee766-7457-1af9-5ac1-3a9a12ac51bb@deganius.de> <931052303.8312.1605024662831.JavaMail.zimbra@westwoodsvcs.com> <282418121.8639.1605027043739.JavaMail.zimbra@westwoodsvcs.com> Message-ID: after tests ... for next is twice faster than while... funny From bsteers4 at gmail.com Tue Nov 10 22:52:25 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Tue, 10 Nov 2020 21:52:25 +0000 Subject: [Gambas-user] trimming extra spaces from within a string. In-Reply-To: References: <891b023b-b10a-1f68-9855-091f5240e69f@gmail.com> <40789933-1f40-e053-2c8d-0a8ddb4a4f17@osnanet.de> <634ec923-e286-c034-69b3-f019bdbad32e@belmotek.net> <2273fef2-4a95-e4a5-9ae2-0ec26a74c594@osnanet.de> <8daee766-7457-1af9-5ac1-3a9a12ac51bb@deganius.de> <931052303.8312.1605024662831.JavaMail.zimbra@westwoodsvcs.com> <282418121.8639.1605027043739.JavaMail.zimbra@westwoodsvcs.com> Message-ID: So basically what yr saying is.. The answer is No There is no built in function to remove erroneous spaces from inside a string. Is there a chance the fastest, best, most well worked out and tested by many method will be added to gambas or are you all just wasting your time? ;) Brucey Bonus -------------- next part -------------- An HTML attachment was scrubbed... URL: From gambas.fr at gmail.com Tue Nov 10 23:45:38 2020 From: gambas.fr at gmail.com (Fabien Bodard) Date: Tue, 10 Nov 2020 23:45:38 +0100 Subject: [Gambas-user] trimming extra spaces from within a string. In-Reply-To: References: <891b023b-b10a-1f68-9855-091f5240e69f@gmail.com> <40789933-1f40-e053-2c8d-0a8ddb4a4f17@osnanet.de> <634ec923-e286-c034-69b3-f019bdbad32e@belmotek.net> <2273fef2-4a95-e4a5-9ae2-0ec26a74c594@osnanet.de> <8daee766-7457-1af9-5ac1-3a9a12ac51bb@deganius.de> <931052303.8312.1605024662831.JavaMail.zimbra@westwoodsvcs.com> <282418121.8639.1605027043739.JavaMail.zimbra@westwoodsvcs.com> Message-ID: Le mar. 10 nov. 2020 ? 22:53, Bruce Steers a ?crit : > > So basically what yr saying is.. > The answer is No > There is no built in function to remove erroneous spaces from inside a string. > > Is there a chance the fastest, best, most well worked out and tested by many method will be added to gambas or are you all just wasting your time? Playing with code is not wasting time ... it's just fun :-P and finally we all learn a lot about weakness and strength of different structures of code > > ;) > Brucey Bonus > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -- Fabien Bodard From brian at westwoodsvcs.com Wed Nov 11 00:03:55 2020 From: brian at westwoodsvcs.com (Brian G) Date: Tue, 10 Nov 2020 15:03:55 -0800 (PST) Subject: [Gambas-user] trimming extra spaces from within a string. In-Reply-To: References: <891b023b-b10a-1f68-9855-091f5240e69f@gmail.com> <2273fef2-4a95-e4a5-9ae2-0ec26a74c594@osnanet.de> <8daee766-7457-1af9-5ac1-3a9a12ac51bb@deganius.de> <931052303.8312.1605024662831.JavaMail.zimbra@westwoodsvcs.com> <282418121.8639.1605027043739.JavaMail.zimbra@westwoodsvcs.com> Message-ID: <994797558.8791.1605049435184.JavaMail.zimbra@westwoodsvcs.com> Fabian, close does not return anything when its compiled into c code for some reason! Thank You Brian G ----- Original Message ----- From: "Fabien Bodard" To: "Gambas mailing list" Sent: Tuesday, November 10, 2020 12:06:10 PM Subject: Re: [Gambas-user] trimming extra spaces from within a string. This is mine but I'm not able to test it in Fast mode ... But even in 'normal' it is more faster than rolf one :-) If someone can find why I'm not able to get it running on fast mode... Public Function FabienTrim(sRaw As String) As String Dim s As String Dim hStream As File Dim bFirst As Boolean = True hStream = Open String For Write For i As Integer = 0 To Len(sRaw) - 1 s = sRaw[i] If s = " " Then If Not bFirst Then Write #hStream, s bFirst = True Endif Else bFirst = False Write #hStream, s Endif Next s = Close #hStream If bFirst Then s = Left(s, -1) Return s End ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- From mbelmonte at belmotek.net Wed Nov 11 00:34:56 2020 From: mbelmonte at belmotek.net (Martin) Date: Wed, 11 Nov 2020 00:34:56 +0100 Subject: [Gambas-user] trimming extra spaces from within a string. In-Reply-To: References: <891b023b-b10a-1f68-9855-091f5240e69f@gmail.com> <40789933-1f40-e053-2c8d-0a8ddb4a4f17@osnanet.de> <634ec923-e286-c034-69b3-f019bdbad32e@belmotek.net> <2273fef2-4a95-e4a5-9ae2-0ec26a74c594@osnanet.de> <8daee766-7457-1af9-5ac1-3a9a12ac51bb@deganius.de> <931052303.8312.1605024662831.JavaMail.zimbra@westwoodsvcs.com> <282418121.8639.1605027043739.JavaMail.zimbra@westwoodsvcs.com> Message-ID: On 10/11/20 23:45, Fabien Bodard wrote: > Playing with code is not wasting time ... it's just fun:-P > > and finally we all learn a lot about weakness and strength of > different structures of code I agree !! :-) Martin Belmonte From brian at westwoodsvcs.com Wed Nov 11 01:10:32 2020 From: brian at westwoodsvcs.com (Brian G) Date: Tue, 10 Nov 2020 16:10:32 -0800 (PST) Subject: [Gambas-user] trimming extra spaces from within a string. In-Reply-To: <1205254959.8815.1605051446986.JavaMail.zimbra@westwoodsvcs.com> References: <891b023b-b10a-1f68-9855-091f5240e69f@gmail.com> <1205254959.8815.1605051446986.JavaMail.zimbra@westwoodsvcs.com> Message-ID: <1409236748.8829.1605053432136.JavaMail.zimbra@westwoodsvcs.com> Fabian, for fun I adjusted your algorithm to use pointers not string to try the fast unsafe with it. Its made it 9 times slower than with a string.... wow unexpected! like this OutBuf As Pointer = Alloc(1000000) Fast Unsafe Public Sub FabienTrim(sRaw As String) As String Dim s As String Dim hStream As File Dim bFirst As Boolean = True hStream = Open Memory Outbuf For Write ' For i As Integer = 0 To Len(sRaw) - 1 s = sRaw[i] If s = " " Then If Not bFirst Then Write #hStream, s bFirst = True Endif Else bFirst = False Write #hStream, s Endif Next Print "do close" Write #hstream, 0 As Byte Close #hStream s = String@(OutBuf) If bFirst Then Return Left(s, -1) Return s End Thank You Brian G ----- Original Message ----- From: "Brian" To: "Gambas mailing list" Sent: Tuesday, November 10, 2020 3:37:26 PM Subject: Re: [Gambas-user] trimming extra spaces from within a string. Fabian it looks like a bug in the fast functions, interpreted for strings as streams. Is it worth reporting it as a bug? Thank You Brian G ----- Original Message ----- From: "Martin" To: "Gambas mailing list" Sent: Tuesday, November 10, 2020 3:34:56 PM Subject: Re: [Gambas-user] trimming extra spaces from within a string. On 10/11/20 23:45, Fabien Bodard wrote: > Playing with code is not wasting time ... it's just fun:-P > > and finally we all learn a lot about weakness and strength of > different structures of code I agree !! :-) Martin Belmonte ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- From brian at westwoodsvcs.com Wed Nov 11 00:37:26 2020 From: brian at westwoodsvcs.com (Brian G) Date: Tue, 10 Nov 2020 15:37:26 -0800 (PST) Subject: [Gambas-user] trimming extra spaces from within a string. In-Reply-To: References: <891b023b-b10a-1f68-9855-091f5240e69f@gmail.com> Message-ID: <1205254959.8815.1605051446986.JavaMail.zimbra@westwoodsvcs.com> Fabian it looks like a bug in the fast functions, interpreted for strings as streams. Is it worth reporting it as a bug? Thank You Brian G ----- Original Message ----- From: "Martin" To: "Gambas mailing list" Sent: Tuesday, November 10, 2020 3:34:56 PM Subject: Re: [Gambas-user] trimming extra spaces from within a string. On 10/11/20 23:45, Fabien Bodard wrote: > Playing with code is not wasting time ... it's just fun:-P > > and finally we all learn a lot about weakness and strength of > different structures of code I agree !! :-) Martin Belmonte ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- From g4mba5 at gmail.com Wed Nov 11 03:36:25 2020 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Wed, 11 Nov 2020 03:36:25 +0100 Subject: [Gambas-user] trimming extra spaces from within a string. In-Reply-To: <0cbc360c-d3c3-6e62-eef7-74f8a499c166@deganius.de> References: <891b023b-b10a-1f68-9855-091f5240e69f@gmail.com> <562cec7e-a1fa-2408-0e54-2832187bd791@deganius.de> <735098432.8090.1604984233587.JavaMail.zimbra@westwoodsvcs.com> <5170f433-8edc-94d6-3f5b-0b6fcf23fc5f@deganius.de> <0cbc360c-d3c3-6e62-eef7-74f8a499c166@deganius.de> Message-ID: <0cae2d22-9577-0e11-0fbe-c214a125cd6c@gmail.com> Le 10/11/2020 ? 12:34, Christof Thalhofer a ?crit?: > Am 10.11.20 um 12:15 schrieb Beno?t Minisini: > >>> And the editor in the IDE is heavily broken with 'Fast Unsafe Public Sub'. >>> >> >> What do you mean? > > Please have a look at the screenshot. Indentation is broken, also the > combobox with class symbols. The editor does not display the methods as > such. > > Alles Gute > > Christof Thalhofer > > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > Fixed in commit https://gitlab.com/gambas/gambas/-/commit/82cea0a2b206a0be1337f77abfd25342c9dc6412. Regards, -- Beno?t Minisini From rwe-sse at osnanet.de Wed Nov 11 08:14:34 2020 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Wed, 11 Nov 2020 08:14:34 +0100 Subject: [Gambas-user] trimming extra spaces from within a string. In-Reply-To: References: <891b023b-b10a-1f68-9855-091f5240e69f@gmail.com> <562cec7e-a1fa-2408-0e54-2832187bd791@deganius.de> <735098432.8090.1604984233587.JavaMail.zimbra@westwoodsvcs.com> <03b1e1c0-1425-64d9-08cd-35a23b373fae@belmotek.net> <33a617cc-0a6d-1715-07ad-d160c1163462@deganius.de> <40789933-1f40-e053-2c8d-0a8ddb4a4f17@osnanet.de> <634ec923-e286-c034-69b3-f019bdbad32e@belmotek.net> <2273fef2-4a95-e4a5-9ae2-0ec26a74c594@osnanet.de> <8daee766-7457-1af9-5ac1-3a9a12ac51bb@deganius.de> Message-ID: <5cd221e4-c18c-0c5b-d703-7daaf5a66f41@osnanet.de> So, at least I hold the record for the slowest code :) Regards Rolf Am 10.11.20 um 17:10 schrieb Martin: > Oliver, you right, your method is faster that others. > > Here I attach an screen shot of profiler and also the sample project for > testing. > > Testing using Fast unsafe > > Regards. > > On 10/11/20 16:47, Linus via User wrote: >> Hi, >> >> Just a question, why not just use SPLIT function to split all the text >> and next reassemble it by a JOIN >> >> Public Sub TrimText(sText As String) >> >> ? Dim aText As String[] >> >> ? atext = Split(sText, " ", Chr(140), True) >> >> ? Print atext.Join(" ") >> >> End >> >> >> Too simple maybe >> >> >> Olivier >> >>> Le 10 nov. 2020 ? 06:45, Rolf-Werner Eilert >> > a ?crit : >>> >>> Am 10.11.20 um 12:28 schrieb Christof Thalhofer: >>>> Am 10.11.20 um 11:56 schrieb Rolf-Werner Eilert: >>>>> Your race was a bit about speed. Using Replace() over and over might be >>>>> the drawback here, as it will certainly use a loop internally doing >>>>> more >>>>> or less the same as my function does. The same applies to regex, and >>>>> even heavier. >>>>> >>>>> But I agree, the other solutions are more elegant than mine :) >>>> Currently Brian G holds the price for max speed. >>>> And yours needs about 1600 ms for one single(!) run* of the bobiba.txt >>>> on my computer. I think it's one of the slowest. ;-) >>>> The other ones run the text 500 times in about 2.5 seconds. Your code >>>> would need about 13 minutes for the same task. >>> >>> Wow that's impressive. What is the reason? I would guess that >>> compiled C-code is always faster than interpreted code, even if the >>> function is more complex. >>> >>>> Alles Gute >>> >>> Dir auch :) >>> >>> Rolf >>> >>> ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- >> >> >> ----[http://gambaswiki.org/wiki/doc/netiquette ]---- > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > From chrisml at deganius.de Wed Nov 11 09:52:17 2020 From: chrisml at deganius.de (Christof Thalhofer) Date: Wed, 11 Nov 2020 09:52:17 +0100 Subject: [Gambas-user] trimming extra spaces from within a string. In-Reply-To: <5cd221e4-c18c-0c5b-d703-7daaf5a66f41@osnanet.de> References: <891b023b-b10a-1f68-9855-091f5240e69f@gmail.com> <562cec7e-a1fa-2408-0e54-2832187bd791@deganius.de> <735098432.8090.1604984233587.JavaMail.zimbra@westwoodsvcs.com> <03b1e1c0-1425-64d9-08cd-35a23b373fae@belmotek.net> <33a617cc-0a6d-1715-07ad-d160c1163462@deganius.de> <40789933-1f40-e053-2c8d-0a8ddb4a4f17@osnanet.de> <634ec923-e286-c034-69b3-f019bdbad32e@belmotek.net> <2273fef2-4a95-e4a5-9ae2-0ec26a74c594@osnanet.de> <8daee766-7457-1af9-5ac1-3a9a12ac51bb@deganius.de> <5cd221e4-c18c-0c5b-d703-7daaf5a66f41@osnanet.de> Message-ID: <88070a43-70cb-3893-1e0d-436a45f2ae0d@deganius.de> Am 11.11.20 um 08:14 schrieb Rolf-Werner Eilert: > So, at least I hold the record for the slowest code :) It was a very close race between you and Bruce, but ... finally: YES! BADDABUMM TSCHHHH! :-) Alles Gute Christof Thalhofer -- Dies ist keine Signatur -------------- next part -------------- A non-text attachment was scrubbed... Name: bruce-steers.png Type: image/png Size: 40232 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: rolf-2.png Type: image/png Size: 42592 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From chrisml at deganius.de Wed Nov 11 12:07:51 2020 From: chrisml at deganius.de (Christof Thalhofer) Date: Wed, 11 Nov 2020 12:07:51 +0100 Subject: [Gambas-user] trimming extra spaces from within a string. In-Reply-To: <0cae2d22-9577-0e11-0fbe-c214a125cd6c@gmail.com> References: <891b023b-b10a-1f68-9855-091f5240e69f@gmail.com> <562cec7e-a1fa-2408-0e54-2832187bd791@deganius.de> <735098432.8090.1604984233587.JavaMail.zimbra@westwoodsvcs.com> <5170f433-8edc-94d6-3f5b-0b6fcf23fc5f@deganius.de> <0cbc360c-d3c3-6e62-eef7-74f8a499c166@deganius.de> <0cae2d22-9577-0e11-0fbe-c214a125cd6c@gmail.com> Message-ID: <467df903-edb2-df85-2e76-aa5f704ff160@deganius.de> Am 11.11.20 um 03:36 schrieb Beno?t Minisini: > Fixed in commit > https://gitlab.com/gambas/gambas/-/commit/82cea0a2b206a0be1337f77abfd25342c9dc6412. Thank you! Alles Gute Christof Thalhofer -- Dies ist keine Signatur -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From hans at gambas-buch.de Wed Nov 11 13:30:56 2020 From: hans at gambas-buch.de (Hans Lehmann) Date: Wed, 11 Nov 2020 13:30:56 +0100 Subject: [Gambas-user] Text-Wrapping Message-ID: <258283ad-0b98-6c16-92aa-df704b28a597@gambas-buch.de> Hello, since there are true string artists among the readers, I just ask: I'm looking for a function like LikeWrap(arg1Text, arg2Length) with which you can wrap a text. At most arg2Length characters should be in one line. Line breaks in the original text should be preserved. A hyphenation is not used. The text must be separated by a hyphen in the last word. The length rule also applies in this case. Does anybody have a finished function in his source code box? Result with maxLength = 63: Hello, since there are true string artists among the readers, I just ask: I'm looking for a function like LikeWrap(arg1Text, arg2Length) with which you can wrap a text. At most arg2Length characters should be in one line. Line breaks in the original text should be preserved. A hyphenation is not used. The text must be separated by a hyphen in the last word. The length rule also applies in this case. With kind regards Hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From chrisml at deganius.de Wed Nov 11 14:02:17 2020 From: chrisml at deganius.de (Christof Thalhofer) Date: Wed, 11 Nov 2020 14:02:17 +0100 Subject: [Gambas-user] Text-Wrapping In-Reply-To: <258283ad-0b98-6c16-92aa-df704b28a597@gambas-buch.de> References: <258283ad-0b98-6c16-92aa-df704b28a597@gambas-buch.de> Message-ID: <57d63538-2f6a-23d8-0f81-dc04d8a1b464@deganius.de> Hi Hans, > Does anybody have a finished function in his source code box? Please try this: ------------------------------------------------------------------------ Public Function Wrap(TextToWrap As String, Count As Integer) As String Dim sCurWord, sRow As String Dim Blocks, Words, Rows As String[] Dim i, j As Integer Rows = New String[] If InStr(TextToWrap, gb.lf) > 0 Then Blocks = Split(TextToWrap, gb.lf, Null, False, True) Else Blocks = New String[] Blocks.Add(TextToWrap) Endif For Each TextToWrap In Blocks Words = Split(TextToWrap, " ") For i = 0 To Words.Count - 1 'If TrimWord Like "*nachher" Then Stop sCurWord = Words[i] If Len(sRow) = 0 Then sRow = sCurWord Else If Len(sRow & " " & sCurWord) <= Count Then sRow &= " " & sCurWord Else sRow = sCurWord End If j = i + 1 If j < Words.Count Then sCurWord = Words[j] If Len(sRow & " " & sCurWord) > Count Then Rows.Add(sRow & gb.lf) sRow = Null Endif Else If j = Words.Count Then Rows.Add(sRow) sRow = Null Endif Next Rows[Rows.Count - 1] &= gb.Lf Next Return Rows.Join("") End ------------------------------------------------------------------------ Alles Gute Christof Thalhofer -- Dies ist keine Signatur -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From adamnt42 at gmail.com Wed Nov 11 14:25:39 2020 From: adamnt42 at gmail.com (Bruce) Date: Wed, 11 Nov 2020 23:55:39 +1030 Subject: [Gambas-user] Text-Wrapping In-Reply-To: <258283ad-0b98-6c16-92aa-df704b28a597@gambas-buch.de> References: <258283ad-0b98-6c16-92aa-df704b28a597@gambas-buch.de> Message-ID: On 11/11/20 11:00 pm, Hans Lehmann wrote: > Hello, > > since there are true string artists among the readers, I just ask: I'm > looking for a function like LikeWrap(arg1Text, arg2Length) with which > you can wrap a text. At most arg2Length characters should be in one line. > Line breaks in the original text should be preserved. A hyphenation is > not used. The text must be separated by a hyphen in the last word. The > length rule also applies in this case. > > Does anybody have a finished function in his source code box? > 8< Hans, Let's clarify a few things before assumptions are made. You want to break up a long string by inserting "\n" at the nearest right hand word boundary to position arg2Length. At face value that is reasonably fairly simple, but there are "twisty little passages". A simple algorithm COULD be something like: While there are any charactes in arg1Text... set index to arg2Length while arg1Text[index] is not a space decrement index excise the substring [1..index] and add it to a working string array, say "wkLines". Join the wkLines into an output string with "\n"'s Now here's the twisty bits. a) Do you want the function to keep or remove the trailing space(s)? b) What is to happen if the arg1Text contains a string of arg2Length spaces? c) What is to happen if arg1Text (at any point) contains a "word" that is longer than arg2Length? d) That algorithm is (deliberately) silent as to what happens with the final sub-string. e) What is to happen if the arg1Text string is empty? f) Fullstops (periods), commas, colons, semi-colons, question marks, exclamation marks - in fact any unpaired punctuation at the break position can be tricky. g) We are talking about ASCII strings here aren't we? h) Paired punctuation () [] {} '' "" <> can be tricky. i) (advanced students only) Other delimiters like | \ and / can be tricky and lets not forget "doubled" delimiters like #! $$...$$ /*...*/ etc. z) I presume that the output string would be sent to a fixed width target e.g. stdout as chopping a string this way to put in a textual control is near n useless. regards bruce (the lower case one) From hans at gambas-buch.de Wed Nov 11 14:39:00 2020 From: hans at gambas-buch.de (Hans Lehmann) Date: Wed, 11 Nov 2020 14:39:00 +0100 Subject: [Gambas-user] Text-Wrapping In-Reply-To: <57d63538-2f6a-23d8-0f81-dc04d8a1b464@deganius.de> References: <258283ad-0b98-6c16-92aa-df704b28a597@gambas-buch.de> <57d63538-2f6a-23d8-0f81-dc04d8a1b464@deganius.de> Message-ID: Hello Christof, the function meets all expectations for the intended application. Thanks for the quick help. @Bruce I would not have thought that there are so many cases to consider. Thanks for the suggestions. With kind regards Hans From bagonergi at gmail.com Wed Nov 11 15:19:43 2020 From: bagonergi at gmail.com (Gianluigi) Date: Wed, 11 Nov 2020 15:19:43 +0100 Subject: [Gambas-user] Text-Wrapping In-Reply-To: <258283ad-0b98-6c16-92aa-df704b28a597@gambas-buch.de> References: <258283ad-0b98-6c16-92aa-df704b28a597@gambas-buch.de> Message-ID: Il giorno mer 11 nov 2020 alle ore 13:31 Hans Lehmann ha scritto: > Hello, > > since there are true string artists among the readers, I just ask: I'm > looking for a function like LikeWrap(arg1Text, arg2Length) with which you > can wrap a text. At most arg2Length characters should be in one line. > Line breaks in the original text should be preserved. A hyphenation is not > used. The text must be separated by a hyphen in the last word. The length > rule also applies in this case. > > Does anybody have a finished function in his source code box? > > Result with maxLength = 63: > Hi Hans, I hope that Benoit does not notice that I reply to you before he does, but I had some problems and as soon as I sent this email I reply to him and I will apologize. I am attaching a zip file to avoid problems with g-mail. Have a good day -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: WrapText-2.zip Type: application/zip Size: 17136 bytes Desc: not available URL: From adamnt42 at gmail.com Wed Nov 11 16:05:31 2020 From: adamnt42 at gmail.com (Bruce) Date: Thu, 12 Nov 2020 01:35:31 +1030 Subject: [Gambas-user] Text-Wrapping In-Reply-To: <258283ad-0b98-6c16-92aa-df704b28a597@gambas-buch.de> References: <258283ad-0b98-6c16-92aa-df704b28a597@gambas-buch.de> Message-ID: <9d661c5e-c02a-6c59-a795-a382395a37e4@gmail.com> Taking as a little example, the first few paragraphs of James Joyce "Ulysses": ------------------------------------------------------------------- Stately, plump Buck Mulligan came from the stairhead, bearing a bowl of lather on which a mirror and a razor lay crossed. A yellow dressinggown, ungirdled, was sustained gently behind him on the mild morning air. He held the bowl aloft and intoned: ?Introibo ad altare Dei. Halted, he peered down the dark winding stairs and called out coarsely: ?Come up, Kinch! Come up, you fearful jesuit! Solemnly he came forward and mounted the round gunrest. He faced about and blessed gravely thrice the tower, the surrounding land and the awaking mountains. Then, catching sight of Stephen Dedalus, he bent towards him and made rapid crosses in the air, gurgling in his throat and shaking his head. Stephen Dedalus, displeased and sleepy, leaned his arms on the top of the staircase and looked coldly at the shaking gurgling face that blessed him, equine in its length, and at the light untonsured hair, grained and hued like pale oak. Buck Mulligan peeped an instant under the mirror and then covered the bowl smartly. ?Back to barracks! he said sternly. ---------------------------------------------------------------------- Obviously, that has been wrapped by my mail client, so it is attached as a txt file. I'll post the results under each authors suggestions. (I told you this is not as easy as it appears.) bruce -------------- next part -------------- Stately, plump Buck Mulligan came from the stairhead, bearing a bowl of lather on which a mirror and a razor lay crossed. A yellow dressinggown, ungirdled, was sustained gently behind him on the mild morning air. He held the bowl aloft and intoned: ?Introibo ad altare Dei. Halted, he peered down the dark winding stairs and called out coarsely: ?Come up, Kinch! Come up, you fearful jesuit! Solemnly he came forward and mounted the round gunrest. He faced about and blessed gravely thrice the tower, the surrounding land and the awaking mountains. Then, catching sight of Stephen Dedalus, he bent towards him and made rapid crosses in the air, gurgling in his throat and shaking his head. Stephen Dedalus, displeased and sleepy, leaned his arms on the top of the staircase and looked coldly at the shaking gurgling face that blessed him, equine in its length, and at the light untonsured hair, grained and hued like pale oak. Buck Mulligan peeped an instant under the mirror and then covered the bowl smartly. ?Back to barracks! he said sternly. From brian at westwoodsvcs.com Wed Nov 11 16:00:02 2020 From: brian at westwoodsvcs.com (Brian G) Date: Wed, 11 Nov 2020 07:00:02 -0800 (PST) Subject: [Gambas-user] Text-Wrapping In-Reply-To: References: <258283ad-0b98-6c16-92aa-df704b28a597@gambas-buch.de> Message-ID: <198215969.9094.1605106802197.JavaMail.zimbra@westwoodsvcs.com> Bruce do you need to use the wrapped buffer in a gui editor and then reassemble the original with changes? Thank You Brian G From: "Gianluigi" To: "Gambas mailing list" Sent: Wednesday, November 11, 2020 6:19:43 AM Subject: Re: [Gambas-user] Text-Wrapping Il giorno mer 11 nov 2020 alle ore 13:31 Hans Lehmann < [ mailto:hans at gambas-buch.de | hans at gambas-buch.de ] > ha scritto: Hello, since there are true string artists among the readers, I just ask: I'm looking for a function like LikeWrap(arg1Text, arg2Length) with which you can wrap a text. At most arg2Length characters should be in one line. Line breaks in the original text should be preserved. A hyphenation is not used. The text must be separated by a hyphen in the last word. The length rule also applies in this case. Does anybody have a finished function in his source code box? Result with maxLength = 63: Hi Hans, I hope that Benoit does not notice that I reply to you before he does, but I had some problems and as soon as I sent this email I reply to him and I will apologize. I am attaching a zip file to avoid problems with g-mail. Have a good day ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: From adamnt42 at gmail.com Wed Nov 11 16:16:42 2020 From: adamnt42 at gmail.com (Bruce) Date: Thu, 12 Nov 2020 01:46:42 +1030 Subject: [Gambas-user] Text-Wrapping In-Reply-To: References: <258283ad-0b98-6c16-92aa-df704b28a597@gambas-buch.de> Message-ID: Output from LikeWrap(File.load("JJ.txt", 46) ----------------------------------------------------- Stately, plump Buck Mulligan came from the st- airhead,bearing a bowl of lather on which a m- irrorand a razor lay crossed. A yellow dressi- nggown,ungirdled, was sustained gently behind- him on the mild morning air. He held the bowl- aloft and intoned: ? Introibo ad altare Dei. Halted, he peered down the dark winding stair- sand called out coarsely: ? Come up, Kinch! Come up, you fearful jesuit! Solemnly he came forward and mounted the roun- dgunrest. He faced about and blessed gravely thrice the tower, the surrounding land and th- eawaking mountains. Then, catching sight of S- tephenDedalus, he bent towards him and made r- apidcrosses in the air, gurgling in his throa- tand shaking his head. Stephen Dedalus, displ- easedand sleepy, leaned his arms on the top o- fthe staircase and looked coldly at the shaki- nggurgling face that blessed him, equine in i- tslength, and at the light untonsured hair, g- rainedand hued like pale oak. Buck Mulligan peeped an instant under the mir- rorand then covered the bowl smartly. ? Back to barracks! he said sternly. -------------------------------------------------------- 1) additional blank line at the end of the output string. 2) Generally, very brutal. hyphenation is at its' very simplest level. 3) Bug! If a word ia hyphenated the space between its' second part and the following word is lost. 4) Bug! The original iniiial spaces are lost bruce From adamnt42 at gmail.com Wed Nov 11 16:21:59 2020 From: adamnt42 at gmail.com (Bruce) Date: Thu, 12 Nov 2020 01:51:59 +1030 Subject: [Gambas-user] Text-Wrapping In-Reply-To: <57d63538-2f6a-23d8-0f81-dc04d8a1b464@deganius.de> References: <258283ad-0b98-6c16-92aa-df704b28a597@gambas-buch.de> <57d63538-2f6a-23d8-0f81-dc04d8a1b464@deganius.de> Message-ID: <267fc319-61bf-4118-78b3-bd79157e83de@gmail.com> Output from Wrap(File.load("JJ.txt", 46) ------------------------------------------------ Stately, plump Buck Mulligan came from the stairhead, bearing a bowl of lather on which a mirror and a razor lay crossed. A yellow dressinggown, ungirdled, was sustained gently behind him on the mild morning air. He held the bowl aloft and intoned: ? Introibo ad altare Dei. Halted, he peered down the dark winding stairs and called out coarsely: ? Come up, Kinch! Come up, you fearful jesuit! Solemnly he came forward and mounted the round gunrest. He faced about and blessed gravely thrice the tower, the surrounding land and the awaking mountains. Then, catching sight of Stephen Dedalus, he bent towards him and made rapid crosses in the air, gurgling in his throat and shaking his head. Stephen Dedalus, displeased and sleepy, leaned his arms on the top of the staircase and looked coldly at the shaking gurgling face that blessed him, equine in its length, and at the light untonsured hair, grained and hued like pale oak. Buck Mulligan peeped an instant under the mirror and then covered the bowl smartly. ? Back to barracks! he said sternly. ------------------------------------------------ 1) Initial spaces are lost 2) Extra line at end of text? bruce From adamnt42 at gmail.com Wed Nov 11 16:25:52 2020 From: adamnt42 at gmail.com (Bruce) Date: Thu, 12 Nov 2020 01:55:52 +1030 Subject: [Gambas-user] Text-Wrapping In-Reply-To: <198215969.9094.1605106802197.JavaMail.zimbra@westwoodsvcs.com> References: <258283ad-0b98-6c16-92aa-df704b28a597@gambas-buch.de> <198215969.9094.1605106802197.JavaMail.zimbra@westwoodsvcs.com> Message-ID: <38b2c921-1356-2fb3-fc52-873de77e93d1@gmail.com> On 12/11/20 1:30 am, Brian G wrote: > Bruce do you need to use the wrapped buffer in a gui editor and then reassemble the original with changes? > > Thank You > Brian G I'm sorry, I'm not sure what you mean there Brian. bruce p.s. to dispel confusion please call me "bruce". ty From bagonergi at gmail.com Wed Nov 11 17:01:15 2020 From: bagonergi at gmail.com (Gianluigi) Date: Wed, 11 Nov 2020 17:01:15 +0100 Subject: [Gambas-user] Text-Wrapping In-Reply-To: <38b2c921-1356-2fb3-fc52-873de77e93d1@gmail.com> References: <258283ad-0b98-6c16-92aa-df704b28a597@gambas-buch.de> <198215969.9094.1605106802197.JavaMail.zimbra@westwoodsvcs.com> <38b2c921-1356-2fb3-fc52-873de77e93d1@gmail.com> Message-ID: Hi guys, I had understood, obviously badly as I usually do, that each line of text should contain the maximum possible number of characters indicated (with the number), that hyphenation was not needed and that if a word was truncated it should end with a hyphen. *Attention* the code attached by me must not be used as it is certified "a real crap", but rest assured that soon you will have the opportunity to take advantage of the Bruce's perfect code (the one with a lowercase letter) ;-D Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From adamnt42 at gmail.com Wed Nov 11 19:32:32 2020 From: adamnt42 at gmail.com (Bruce) Date: Thu, 12 Nov 2020 05:02:32 +1030 Subject: [Gambas-user] Text-Wrapping In-Reply-To: References: <258283ad-0b98-6c16-92aa-df704b28a597@gambas-buch.de> <198215969.9094.1605106802197.JavaMail.zimbra@westwoodsvcs.com> <38b2c921-1356-2fb3-fc52-873de77e93d1@gmail.com> Message-ID: On 12/11/20 2:31 am, Gianluigi wrote: > Hi guys, > > I had understood, obviously badly as I usually do, that each line of text > should contain the maximum possible number of characters indicated (with > the number), that hyphenation was not needed and that if a word was > truncated it should end with a hyphen. > > *Attention* the code attached by me must not be used as it is certified "a > real crap", but rest assured that soon you will have the opportunity to > take advantage of the Bruce's perfect code (the one with a lowercase > letter) ;-D > > Regards > Gianluigi > > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > Unfortunately, my "perfext code is in python and consists of a single call to textwrap.wrap() See here for more info https://docs.python.org/3/library/textwrap.html#textwrap.wrap I was merely trying to point out that it isn't as simple as it looks. >> I had understood, obviously badly as I usually do, that each line of text >> should contain the maximum possible number of characters indicated (with That is a fair and alternate interpretation of the question and one I should have put in my original post! Perhaps having a look at how the IDE wraps code might be an idea? It seems to do quite well with (silly) things like: Dim MyName As String = "Mr. Michael Sean O'Reilly-Dogherty III (Jnr)" cheers b From g4mba5 at gmail.com Wed Nov 11 20:13:31 2020 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Wed, 11 Nov 2020 20:13:31 +0100 Subject: [Gambas-user] Text-Wrapping In-Reply-To: References: <258283ad-0b98-6c16-92aa-df704b28a597@gambas-buch.de> <198215969.9094.1605106802197.JavaMail.zimbra@westwoodsvcs.com> <38b2c921-1356-2fb3-fc52-873de77e93d1@gmail.com> Message-ID: <73ff3bfa-01a0-0b06-7422-c54bab14dd85@gmail.com> Le 11/11/2020 ? 19:32, Bruce a ?crit?: > > Unfortunately, my "perfext code is in python and consists of a single > call to textwrap.wrap() See here for more info > https://docs.python.org/3/library/textwrap.html#textwrap.wrap > > I was merely trying to point out that it isn't as simple as it looks. > >>> I had understood, obviously badly as I usually do, that each line of >>> text >>> should contain the maximum possible number of characters indicated (with > That is a fair and alternate interpretation of the question and one I > should have put in my original post! > > Perhaps having a look at how the IDE wraps code might be an idea? It > seems to do quite well with (silly) things like: > ? Dim MyName As String = "Mr. Michael Sean O'Reilly-Dogherty III (Jnr)" > > cheers > b > The text editor wrapping algorithm is for proportional fonts and is based on pixels, not on characters. -- Beno?t Minisini From brian at westwoodsvcs.com Wed Nov 11 20:20:34 2020 From: brian at westwoodsvcs.com (Brian G) Date: Wed, 11 Nov 2020 11:20:34 -0800 (PST) Subject: [Gambas-user] Text-Wrapping In-Reply-To: <73ff3bfa-01a0-0b06-7422-c54bab14dd85@gmail.com> References: <258283ad-0b98-6c16-92aa-df704b28a597@gambas-buch.de> <198215969.9094.1605106802197.JavaMail.zimbra@westwoodsvcs.com> <38b2c921-1356-2fb3-fc52-873de77e93d1@gmail.com> <73ff3bfa-01a0-0b06-7422-c54bab14dd85@gmail.com> Message-ID: <807255514.9195.1605122434723.JavaMail.zimbra@westwoodsvcs.com> Here is a simple text wrap, I had. Thank You Brian G ----- Original Message ----- From: "Beno?t Minisini" To: "Gambas mailing list" Sent: Wednesday, November 11, 2020 11:13:31 AM Subject: Re: [Gambas-user] Text-Wrapping Le 11/11/2020 ? 19:32, Bruce a ?crit?: > > Unfortunately, my "perfext code is in python and consists of a single > call to textwrap.wrap() See here for more info > https://docs.python.org/3/library/textwrap.html#textwrap.wrap > > I was merely trying to point out that it isn't as simple as it looks. > >>> I had understood, obviously badly as I usually do, that each line of >>> text >>> should contain the maximum possible number of characters indicated (with > That is a fair and alternate interpretation of the question and one I > should have put in my original post! > > Perhaps having a look at how the IDE wraps code might be an idea? It > seems to do quite well with (silly) things like: > ? Dim MyName As String = "Mr. Michael Sean O'Reilly-Dogherty III (Jnr)" > > cheers > b > The text editor wrapping algorithm is for proportional fonts and is based on pixels, not on characters. -- Beno?t Minisini ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -------------- next part -------------- A non-text attachment was scrubbed... Name: TestTextWrap-0.0.1.tar.gz Type: application/x-compressed-tar Size: 12950 bytes Desc: not available URL: From brian at westwoodsvcs.com Wed Nov 11 20:25:58 2020 From: brian at westwoodsvcs.com (Brian G) Date: Wed, 11 Nov 2020 11:25:58 -0800 (PST) Subject: [Gambas-user] Text-Wrapping In-Reply-To: <807255514.9195.1605122434723.JavaMail.zimbra@westwoodsvcs.com> References: <258283ad-0b98-6c16-92aa-df704b28a597@gambas-buch.de> <198215969.9094.1605106802197.JavaMail.zimbra@westwoodsvcs.com> <38b2c921-1356-2fb3-fc52-873de77e93d1@gmail.com> <73ff3bfa-01a0-0b06-7422-c54bab14dd85@gmail.com> <807255514.9195.1605122434723.JavaMail.zimbra@westwoodsvcs.com> Message-ID: <1980297777.9201.1605122758413.JavaMail.zimbra@westwoodsvcs.com> Sorry Forgot to include the formatted output: Stately, plump Buck Mulligan came from the stairhead, bearing a bowl of lather on which a mirror and a razor lay crossed. A yellow dressinggown, ungirdled, was sustained gently behind him on the mild morning air. He held the bowl aloft and intoned: "Introibo ad altare Dei." Halted, he peered down the dark winding stairs and called out coarsely: "Come up, Kinch! Come up, you fearful jesuit!" Solemnly he came forward and mounted the round gunrest. He fac- ed about and blessed gravely thrice the tower, the surrounding land and the awaking mountains. Then, catching sight of Stephen Dedalus, he bent towards him and made rapid crosses in the air, gurgling in his throat and shaking his head. Stephen Dedalus, displeased and sleepy, leaned his arms on the top of the stair- case and looked coldly at the shaking gurgling face that bless- ed him, equine in its length, and at the light untonsured hair, grained and hued like pale oak. Buck Mulligan peeped an instant under the mirror and then cove- red the bowl smartly. "Back to barracks! he said sternly." Thank You Brian G ----- Original Message ----- From: "Brian" To: "Gambas mailing list" Sent: Wednesday, November 11, 2020 11:20:34 AM Subject: Re: [Gambas-user] Text-Wrapping Here is a simple text wrap, I had. Thank You Brian G ----- Original Message ----- From: "Beno?t Minisini" To: "Gambas mailing list" Sent: Wednesday, November 11, 2020 11:13:31 AM Subject: Re: [Gambas-user] Text-Wrapping Le 11/11/2020 ? 19:32, Bruce a ?crit?: > > Unfortunately, my "perfext code is in python and consists of a single > call to textwrap.wrap() See here for more info > https://docs.python.org/3/library/textwrap.html#textwrap.wrap > > I was merely trying to point out that it isn't as simple as it looks. > >>> I had understood, obviously badly as I usually do, that each line of >>> text >>> should contain the maximum possible number of characters indicated (with > That is a fair and alternate interpretation of the question and one I > should have put in my original post! > > Perhaps having a look at how the IDE wraps code might be an idea? It > seems to do quite well with (silly) things like: > ? Dim MyName As String = "Mr. Michael Sean O'Reilly-Dogherty III (Jnr)" > > cheers > b > The text editor wrapping algorithm is for proportional fonts and is based on pixels, not on characters. -- Beno?t Minisini ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- From brian at westwoodsvcs.com Wed Nov 11 21:03:42 2020 From: brian at westwoodsvcs.com (Brian G) Date: Wed, 11 Nov 2020 12:03:42 -0800 (PST) Subject: [Gambas-user] Text-Wrapping In-Reply-To: <1980297777.9201.1605122758413.JavaMail.zimbra@westwoodsvcs.com> References: <258283ad-0b98-6c16-92aa-df704b28a597@gambas-buch.de> <198215969.9094.1605106802197.JavaMail.zimbra@westwoodsvcs.com> <38b2c921-1356-2fb3-fc52-873de77e93d1@gmail.com> <73ff3bfa-01a0-0b06-7422-c54bab14dd85@gmail.com> <807255514.9195.1605122434723.JavaMail.zimbra@westwoodsvcs.com> <1980297777.9201.1605122758413.JavaMail.zimbra@westwoodsvcs.com> Message-ID: <348588659.9244.1605125022838.JavaMail.zimbra@westwoodsvcs.com> Geezzz, Ok I extracted it from other code the previous post had errors, Here is the proper version!! Sorry Brian G ----- Original Message ----- From: "Brian" To: "Gambas mailing list" Sent: Wednesday, November 11, 2020 11:25:58 AM Subject: Re: [Gambas-user] Text-Wrapping Sorry Forgot to include the formatted output: Stately, plump Buck Mulligan came from the stairhead, bearing a bowl of lather on which a mirror and a razor lay crossed. A yellow dressinggown, ungirdled, was sustained gently behind him on the mild morning air. He held the bowl aloft and intoned: "Introibo ad altare Dei." Halted, he peered down the dark winding stairs and called out coarsely: "Come up, Kinch! Come up, you fearful jesuit!" Solemnly he came forward and mounted the round gunrest. He fac- ed about and blessed gravely thrice the tower, the surrounding land and the awaking mountains. Then, catching sight of Stephen Dedalus, he bent towards him and made rapid crosses in the air, gurgling in his throat and shaking his head. Stephen Dedalus, displeased and sleepy, leaned his arms on the top of the stair- case and looked coldly at the shaking gurgling face that bless- ed him, equine in its length, and at the light untonsured hair, grained and hued like pale oak. Buck Mulligan peeped an instant under the mirror and then cove- red the bowl smartly. "Back to barracks! he said sternly." Thank You Brian G ----- Original Message ----- From: "Brian" To: "Gambas mailing list" Sent: Wednesday, November 11, 2020 11:20:34 AM Subject: Re: [Gambas-user] Text-Wrapping Here is a simple text wrap, I had. Thank You Brian G ----- Original Message ----- From: "Beno?t Minisini" To: "Gambas mailing list" Sent: Wednesday, November 11, 2020 11:13:31 AM Subject: Re: [Gambas-user] Text-Wrapping Le 11/11/2020 ? 19:32, Bruce a ?crit?: > > Unfortunately, my "perfext code is in python and consists of a single > call to textwrap.wrap() See here for more info > https://docs.python.org/3/library/textwrap.html#textwrap.wrap > > I was merely trying to point out that it isn't as simple as it looks. > >>> I had understood, obviously badly as I usually do, that each line of >>> text >>> should contain the maximum possible number of characters indicated (with > That is a fair and alternate interpretation of the question and one I > should have put in my original post! > > Perhaps having a look at how the IDE wraps code might be an idea? It > seems to do quite well with (silly) things like: > ? Dim MyName As String = "Mr. Michael Sean O'Reilly-Dogherty III (Jnr)" > > cheers > b > The text editor wrapping algorithm is for proportional fonts and is based on pixels, not on characters. -- Beno?t Minisini ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -------------- next part -------------- A non-text attachment was scrubbed... Name: TestTextWrap-0.0.2.tar.gz Type: application/x-compressed-tar Size: 12989 bytes Desc: not available URL: From hans at gambas-buch.de Thu Nov 12 09:54:52 2020 From: hans at gambas-buch.de (Hans Lehmann) Date: Thu, 12 Nov 2020 09:54:52 +0100 Subject: [Gambas-user] Text-Wrapping In-Reply-To: <348588659.9244.1605125022838.JavaMail.zimbra@westwoodsvcs.com> References: <258283ad-0b98-6c16-92aa-df704b28a597@gambas-buch.de> <198215969.9094.1605106802197.JavaMail.zimbra@westwoodsvcs.com> <38b2c921-1356-2fb3-fc52-873de77e93d1@gmail.com> <73ff3bfa-01a0-0b06-7422-c54bab14dd85@gmail.com> <807255514.9195.1605122434723.JavaMail.zimbra@westwoodsvcs.com> <1980297777.9201.1605122758413.JavaMail.zimbra@westwoodsvcs.com> <348588659.9244.1605125022838.JavaMail.zimbra@westwoodsvcs.com> Message-ID: Hello, after the hints in the list and with regard to the case of application (description in a RSS feed) this solution was found: 8<----? Using Recursion ------------------------------------------------ ' Gambas module file Public Sub Main() ? Dim sFile As String = File.Load("./testtext.txt") ? Print W(sFile, 70) End Private Function W(TextToWrap As String, iLength As Integer) As String ??? Dim iIndex As Integer ??? Dim sTL, sTR As String ??? Dim aLines As String[] ??? If Len(TextToWrap) <= iLength Then Return TextToWrap ??? aLines = Split(TextToWrap, gb.NewLine) ??? iIndex = RInStr(TextToWrap, " ", iLength) ??? If iIndex = 0 Then iIndex = iLength ??? sTL = RTrim(Left(TextToWrap, iIndex - 1)) ??? sTR = LTrim(Right(TextToWrap, -iIndex)) ??? Return sTL & gb.lf & W(sTR, iLength) End 8<--------------------------------------------------------------------- With kind regards Hans ORIGINAL: Die Fehlerbehandlung beginnt mit einer Analyse von Fehlerkategorien, beschreibt die Fehleranalyse zur Entwicklungszeit eines Programms (Debugger) und verweist auf Strategien, wie Sie Fehler erkennen, abfangen und vermeiden k?nnen. RESULT: Die Fehlerbehandlung beginnt mit einer Analyse von Fehlerkategorien, beschreibt die Fehleranalyse zur Entwicklungszeit eines Programms (Debugger) und verweist auf Strategien, wie Sie Fehler erkennen, abfangen und vermeiden k?nnen. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Thu Nov 12 15:51:22 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Thu, 12 Nov 2020 14:51:22 +0000 Subject: [Gambas-user] Couldn't help but laugh, most of you will understand. Message-ID: Me, Ben, most the people here.. https://mockup-api.teespring.com/v3/image/1vw80BCalkqRuB_3fOlHLnzpBBA/480/560.jpg ;) -------------- next part -------------- An HTML attachment was scrubbed... URL: From brian at westwoodsvcs.com Thu Nov 12 16:09:18 2020 From: brian at westwoodsvcs.com (Brian G) Date: Thu, 12 Nov 2020 07:09:18 -0800 (PST) Subject: [Gambas-user] Couldn't help but laugh, most of you will understand. In-Reply-To: References: Message-ID: <1812311293.9361.1605193758406.JavaMail.zimbra@westwoodsvcs.com> LOL, Where can I get one to ware at client sites...... They would be so happy to see it.! Thank You Brian G From: "Bruce Steers" To: "Gambas mailing list" Sent: Thursday, November 12, 2020 6:51:22 AM Subject: [Gambas-user] Couldn't help but laugh, most of you will understand. Me, Ben, most the people here.. [ https://mockup-api.teespring.com/v3/image/1vw80BCalkqRuB_3fOlHLnzpBBA/480/560.jpg | https://mockup-api.teespring.com/v3/image/1vw80BCalkqRuB_3fOlHLnzpBBA/480/560.jpg ] ;) ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Thu Nov 12 16:32:13 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Thu, 12 Nov 2020 15:32:13 +0000 Subject: [Gambas-user] Couldn't help but laugh, most of you will understand. In-Reply-To: <1812311293.9361.1605193758406.JavaMail.zimbra@westwoodsvcs.com> References: <1812311293.9361.1605193758406.JavaMail.zimbra@westwoodsvcs.com> Message-ID: hehe, thought some of you would like it. My facebook shows me this sort of thing all the time. this one particularly made me chuckle though and feel a bit for Ben with the sheer size of gambas and the higher those numbers would be. although saying that with my rubbish coding we're probably close to par ;) lol https://teespring.com/99bug?pr=99bug10off&fbclid=IwAR3PUND2GLvZkodNVF4-teOTcm_8XgrJRDvanA5E6a_HLXbsbEJ9VjfTApg&pid=389&cid=100029 On Thu, 12 Nov 2020 at 15:20, Brian G wrote: > LOL, Where can I get one to ware at client sites...... > > They would be so happy to see it.! > > Thank You > Brian G > > ------------------------------ > *From: *"Bruce Steers" > *To: *"Gambas mailing list" > *Sent: *Thursday, November 12, 2020 6:51:22 AM > *Subject: *[Gambas-user] Couldn't help but laugh, most of you will > understand. > > Me, Ben, most the people here.. > > > https://mockup-api.teespring.com/v3/image/1vw80BCalkqRuB_3fOlHLnzpBBA/480/560.jpg > > ;) > > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From brian at westwoodsvcs.com Thu Nov 12 16:24:53 2020 From: brian at westwoodsvcs.com (Brian G) Date: Thu, 12 Nov 2020 07:24:53 -0800 (PST) Subject: [Gambas-user] Text-Wrapping In-Reply-To: References: <258283ad-0b98-6c16-92aa-df704b28a597@gambas-buch.de> <73ff3bfa-01a0-0b06-7422-c54bab14dd85@gmail.com> <807255514.9195.1605122434723.JavaMail.zimbra@westwoodsvcs.com> <1980297777.9201.1605122758413.JavaMail.zimbra@westwoodsvcs.com> <348588659.9244.1605125022838.JavaMail.zimbra@westwoodsvcs.com> Message-ID: <686126201.9447.1605194693325.JavaMail.zimbra@westwoodsvcs.com> Hans, Your method outputs some strange lines for example the following original line Stephen, taking his ashplant from its leaningplace, followed them out and, as they went down the ladder, pulled to the slow iron door and locked it. He put the huge key in his inner pocket. Sample of normal wrap Stephen, taking his ashplant from its leaningplace, followed them out and, as they went down the ladder, pulled to the slow iron door and locked it. He put the huge key in his inner pock- et. Output from your wrap Stephen, taking his ashplant from its leaningplace, followed them out and, as they went down the ladder, pulled to the slow iron door and locked it. He put the huge key in his inner pocket. There are a few other strange outputs as well. Thank You Brian G From: "Hans Lehmann" To: "Gambas mailing list" Sent: Thursday, November 12, 2020 12:54:52 AM Subject: Re: [Gambas-user] Text-Wrapping Hello, after the hints in the list and with regard to the case of application (description in a RSS feed) this solution was found: 8<---- Using Recursion ------------------------------------------------ ' Gambas module file Public Sub Main() Dim sFile As String = File.Load("./testtext.txt") Print W(sFile, 70) End Private Function W(TextToWrap As String, iLength As Integer) As String Dim iIndex As Integer Dim sTL, sTR As String Dim aLines As String[] If Len(TextToWrap) <= iLength Then Return TextToWrap aLines = Split(TextToWrap, gb.NewLine) iIndex = RInStr(TextToWrap, " ", iLength) If iIndex = 0 Then iIndex = iLength sTL = RTrim(Left(TextToWrap, iIndex - 1)) sTR = LTrim(Right(TextToWrap, -iIndex)) Return sTL & gb.lf & W(sTR, iLength) End 8<--------------------------------------------------------------------- With kind regards Hans ORIGINAL: Die Fehlerbehandlung beginnt mit einer Analyse von Fehlerkategorien, beschreibt die Fehleranalyse zur Entwicklungszeit eines Programms (Debugger) und verweist auf Strategien, wie Sie Fehler erkennen, abfangen und vermeiden k?nnen. RESULT: Die Fehlerbehandlung beginnt mit einer Analyse von Fehlerkategorien, beschreibt die Fehleranalyse zur Entwicklungszeit eines Programms (Debugger) und verweist auf Strategien, wie Sie Fehler erkennen, abfangen und vermeiden k?nnen. ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: From brian at westwoodsvcs.com Thu Nov 12 16:29:09 2020 From: brian at westwoodsvcs.com (Brian G) Date: Thu, 12 Nov 2020 07:29:09 -0800 (PST) Subject: [Gambas-user] Text-Wrapping In-Reply-To: <686126201.9447.1605194693325.JavaMail.zimbra@westwoodsvcs.com> References: <258283ad-0b98-6c16-92aa-df704b28a597@gambas-buch.de> <73ff3bfa-01a0-0b06-7422-c54bab14dd85@gmail.com> <807255514.9195.1605122434723.JavaMail.zimbra@westwoodsvcs.com> <1980297777.9201.1605122758413.JavaMail.zimbra@westwoodsvcs.com> <348588659.9244.1605125022838.JavaMail.zimbra@westwoodsvcs.com> <686126201.9447.1605194693325.JavaMail.zimbra@westwoodsvcs.com> Message-ID: <655083105.9489.1605194949759.JavaMail.zimbra@westwoodsvcs.com> Hans, here is the sample text I was using to test your algorithm The code seems to get lost on certain combinations of text, Maybe it misses a linefeed and counts it as text... not sure Thank You Brian G From: "Brian" To: "Gambas mailing list" Sent: Thursday, November 12, 2020 7:24:53 AM Subject: Re: [Gambas-user] Text-Wrapping Hans, Your method outputs some strange lines for example the following original line Stephen, taking his ashplant from its leaningplace, followed them out and, as they went down the ladder, pulled to the slow iron door and locked it. He put the huge key in his inner pocket. Sample of normal wrap Stephen, taking his ashplant from its leaningplace, followed them out and, as they went down the ladder, pulled to the slow iron door and locked it. He put the huge key in his inner pock- et. Output from your wrap Stephen, taking his ashplant from its leaningplace, followed them out and, as they went down the ladder, pulled to the slow iron door and locked it. He put the huge key in his inner pocket. There are a few other strange outputs as well. Thank You Brian G From: "Hans Lehmann" To: "Gambas mailing list" Sent: Thursday, November 12, 2020 12:54:52 AM Subject: Re: [Gambas-user] Text-Wrapping Hello, after the hints in the list and with regard to the case of application (description in a RSS feed) this solution was found: 8<---- Using Recursion ------------------------------------------------ ' Gambas module file Public Sub Main() Dim sFile As String = File.Load("./testtext.txt") Print W(sFile, 70) End Private Function W(TextToWrap As String, iLength As Integer) As String Dim iIndex As Integer Dim sTL, sTR As String Dim aLines As String[] If Len(TextToWrap) <= iLength Then Return TextToWrap aLines = Split(TextToWrap, gb.NewLine) iIndex = RInStr(TextToWrap, " ", iLength) If iIndex = 0 Then iIndex = iLength sTL = RTrim(Left(TextToWrap, iIndex - 1)) sTR = LTrim(Right(TextToWrap, -iIndex)) Return sTL & gb.lf & W(sTR, iLength) End 8<--------------------------------------------------------------------- With kind regards Hans ORIGINAL: Die Fehlerbehandlung beginnt mit einer Analyse von Fehlerkategorien, beschreibt die Fehleranalyse zur Entwicklungszeit eines Programms (Debugger) und verweist auf Strategien, wie Sie Fehler erkennen, abfangen und vermeiden k?nnen. RESULT: Die Fehlerbehandlung beginnt mit einer Analyse von Fehlerkategorien, beschreibt die Fehleranalyse zur Entwicklungszeit eines Programms (Debugger) und verweist auf Strategien, wie Sie Fehler erkennen, abfangen und vermeiden k?nnen. ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sampletext Type: application/octet-stream Size: 40847 bytes Desc: not available URL: From hans at gambas-buch.de Thu Nov 12 17:15:36 2020 From: hans at gambas-buch.de (Hans Lehmann) Date: Thu, 12 Nov 2020 17:15:36 +0100 Subject: [Gambas-user] Text-Wrapping In-Reply-To: <655083105.9489.1605194949759.JavaMail.zimbra@westwoodsvcs.com> References: <258283ad-0b98-6c16-92aa-df704b28a597@gambas-buch.de> <73ff3bfa-01a0-0b06-7422-c54bab14dd85@gmail.com> <807255514.9195.1605122434723.JavaMail.zimbra@westwoodsvcs.com> <1980297777.9201.1605122758413.JavaMail.zimbra@westwoodsvcs.com> <348588659.9244.1605125022838.JavaMail.zimbra@westwoodsvcs.com> <686126201.9447.1605194693325.JavaMail.zimbra@westwoodsvcs.com> <655083105.9489.1605194949759.JavaMail.zimbra@westwoodsvcs.com> Message-ID: Am 12.11.20 um 16:29 schrieb Brian G: > Hans, here is the sample text I was using to test your algorithm > The code seems to get lost on certain combinations of text, Maybe it > misses a linefeed and counts it as text... not sure Hello Brian, the (recursive) algorithm is - as I wrote before - used for a special case: Project to test the component gb.web.feed. With kind regards Hans -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: hahnliocmdfgjmjm.png Type: image/png Size: 32331 bytes Desc: not available URL: From roberto.premoli at tiscali.it Thu Nov 12 17:17:59 2020 From: roberto.premoli at tiscali.it (roberto.premoli at tiscali.it) Date: Thu, 12 Nov 2020 17:17:59 +0100 Subject: [Gambas-user] Couldn't help but laugh, most of you will understand. In-Reply-To: References: Message-ID: so, better liwe witho thos99 bugs despite they give prblems... tha anyway, are better thanmoreunknown prblems. "if i tworks, don' touch it. Impruvement is not require: that it functions, is" Il 12.11.2020 15:51 Bruce Steers ha scritto: > Me, Ben, most the people here.. > https://mockup-api.teespring.com/v3/image/1vw80BCalkqRuB_3fOlHLnzpBBA/480/560.jpg [1] > ;) Con Tiscali Mobile Smart 30 4G hai minuti illimitati, 100 SMS e 30 Giga in 4G a soli 8,99? al mese. http://tisca.li/smart30 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jose.rodriguez at cenpalab.cu Fri Nov 13 00:42:25 2020 From: jose.rodriguez at cenpalab.cu (jose.rodriguez at cenpalab.cu) Date: Thu, 12 Nov 2020 23:42:25 +0000 Subject: [Gambas-user] Couldn't help but laugh, most of you will understand. In-Reply-To: References: Message-ID: <824b328961b2902f217d29735e971dfd@cenpalab.cu> November 12, 2020 9:51 AM, "Bruce Steers" )> wrote: Me, Ben, most the people here.. https://mockup-api.teespring.com/v3/image/1vw80BCalkqRuB_3fOlHLnzpBBA/480/560.jpg (https://mockup-api.teespring.com/v3/image/1vw80BCalkqRuB_3fOlHLnzpBBA/480/560.jpg) ;) Not your fault, but I don't find it very funny... Error 1009 Ray ID: 5f141819b981c693 ? 2020-11-12 23:39:45 UTC Access denied What happened? The owner of this website (mockup-api.teespring.com) has banned the country or region your IP address is in (CU) from accessing this website. PS: ;D Regards, Joe1962 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jose.rodriguez at cenpalab.cu Fri Nov 13 00:57:22 2020 From: jose.rodriguez at cenpalab.cu (jose.rodriguez at cenpalab.cu) Date: Thu, 12 Nov 2020 23:57:22 +0000 Subject: [Gambas-user] Text-Wrapping In-Reply-To: <258283ad-0b98-6c16-92aa-df704b28a597@gambas-buch.de> References: <258283ad-0b98-6c16-92aa-df704b28a597@gambas-buch.de> Message-ID: November 11, 2020 7:54 AM, "Hans Lehmann" )> wrote: Hello, since there are true string artists among the readers, I just ask: I'm looking for a function like LikeWrap(arg1Text, arg2Length) with which you can wrap a text. At most arg2Length characters should be in one line. Line breaks in the original text should be preserved. A hyphenation is not used. The text must be separated by a hyphen in the last word. The length rule also applies in this case. Does anybody have a finished function in his source code box? Hope I'm not too late to the party and I do apologize because I had these java functions floating around in my utils library from ages ago.They were for word-wrapping a string for a POS printer (WordWrap()) and also the print preview (WordWrapHTML()). I would have converted them to Gambas if I wasn't up to my ears in work right now, but they should be somewhat self-explanatory (I hope...). public static String WordWrap(String WrapString, int WrapPos) { //Prepare variables String rsm = WrapString; boolean gotspace; boolean gotfeed; //Jump to characters to add line feeds int pos = WrapPos; while (pos < rsm.length()) { //Progressivly go backwards until next space int bf = pos - WrapPos; //What is the stop point gotspace = false; gotfeed = false; //Find space, slash or linefeed just before to avoid cutting words for (int ap = pos; ap > bf; ap--) { if (String.valueOf(rsm.charAt(ap)).equals(" ") == true && gotspace == false) { //Is it a space? //Insert line feed and compute position variable gotspace = true; pos = ap; //Go to position } else if (String.valueOf(rsm.charAt(ap)).equals("/") == true && gotspace == false) { //Is it a slash? gotspace = true; pos = ap; //Go to position } else if (String.valueOf(rsm.charAt(ap)).equals("n") == true && gotfeed == false) { //If it is a line feed, go to it pos = ap; //Go to position gotfeed = true; } } //Got no feed? Append a line feed to the appropriate place if (gotfeed == false) { if (gotspace == false) { rsm = new StringBuffer(rsm).insert(pos, "n").toString(); } else { rsm = new StringBuffer(rsm).insert(pos + 1, "n").toString(); } } //Increment position by WrapPos and restart loop pos += (WrapPos + 1); } //Return the result return (rsm); } public static String WordWrapHTML(String WrapString, int WrapPos) { //Prepare variables String rsm = WrapString; boolean gotspace; boolean gotfeed; //Jump to characters to add line feeds int pos = WrapPos; while (pos < rsm.length()) { //Progressivly go backwards until next space int bf = pos - WrapPos; //What is the stop point gotspace = false; gotfeed = false; //Find space just before to avoid cutting words for (int ap = pos; ap > bf; ap--) { if (String.valueOf(rsm.charAt(ap)).equals(" ") == true && gotspace == false) { //Is it a space? //Insert line feed and compute position variable gotspace = true; pos = ap; //Go to position } else if (String.valueOf(rsm.charAt(ap)).equals("/") == true && gotspace == false) { //Is it a slash? gotspace = true; pos = ap; //Go to position } else if (String.valueOf(rsm.charAt(ap)).equals("n") == true && gotfeed == false) { //If it is a line feed, go to it pos = ap; //Go to position gotfeed = true; } } //Got no feed? Append a line feed to the appropriate place if (gotfeed == false) { if (gotspace == false) { rsm = new StringBuffer(rsm).insert(pos, "
").toString(); } else { rsm = new StringBuffer(rsm).insert(pos + 1, "
").toString(); } } //Increment position by WrapPos and restart loop pos += (WrapPos + 1); } //Return the result return (rsm); } Regards, Joe1962 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ian.roper at iinet.net.au Fri Nov 13 02:38:52 2020 From: ian.roper at iinet.net.au (Ian Roper) Date: Fri, 13 Nov 2020 09:38:52 +0800 Subject: [Gambas-user] Error [11] using Back button in component screen In-Reply-To: References: <258283ad-0b98-6c16-92aa-df704b28a597@gambas-buch.de> Message-ID: <57634256-ab21-6a09-aa73-fa4a67cbc44e@iinet.net.au> When viewing components in the GUI for any project. Clicking the right hand side button opens the data about a component. If you click the 'back' button you get the attached error message. Cheers, Ian. -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot from 2020-11-13 09-30-52.png Type: image/png Size: 50758 bytes Desc: not available URL: From chrisml at deganius.de Fri Nov 13 09:53:17 2020 From: chrisml at deganius.de (Christof Thalhofer) Date: Fri, 13 Nov 2020 09:53:17 +0100 Subject: [Gambas-user] Couldn't help but laugh, most of you will understand. In-Reply-To: <824b328961b2902f217d29735e971dfd@cenpalab.cu> References: <824b328961b2902f217d29735e971dfd@cenpalab.cu> Message-ID: <9695a4d2-4624-e69e-a3e0-6c336a2f604f@deganius.de> Am 13.11.20 um 00:42 schrieb jose.rodriguez at cenpalab.cu: > Not your fault, but I don't find it very funny... If anyone has problems with bugs in Gambas please try something like Microsoft Access. I did! From one version to the next MS removed functionality, because you could work with foreign databases with it and they wanted to force the people to MS SQL server. They removed methods I used 700 times in my code on their recommendation before! We could not debug bugs, because a lot was behind the black wall of closed source. We could not even report bugs. If someone told MS that there was an annoying bug they often denied it and firms had to pay thousands of dollars to them to at least take a look. It took me ten years to get out of this sticky mud. I know exactly why I use open source. I know a lot of open source software diamonds I work with and can rely on. But for me three of them stand out: Postgresql, TeX and Gambas. Software is complex, there will always be bugs like warts on the skin especially in a piece of software that stands on the shoulders of others like it is with Gambas. But the benefits outweigh a lot and I wish I could have enjoyed them much earlier in my life. Alles Gute Christof Thalhofer -- Dies ist keine Signatur -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From bsteers4 at gmail.com Fri Nov 13 15:51:35 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Fri, 13 Nov 2020 14:51:35 +0000 Subject: [Gambas-user] Couldn't help but laugh, most of you will understand. In-Reply-To: <9695a4d2-4624-e69e-a3e0-6c336a2f604f@deganius.de> References: <824b328961b2902f217d29735e971dfd@cenpalab.cu> <9695a4d2-4624-e69e-a3e0-6c336a2f604f@deganius.de> Message-ID: On Fri, 13 Nov 2020 at 08:54, Christof Thalhofer wrote: > Am 13.11.20 um 00:42 schrieb jose.rodriguez at cenpalab.cu: > > > Not your fault, but I don't find it very funny... > Od dear Jos? has your country been naughty? ;) lol If anyone has problems with bugs in Gambas please try something like > Microsoft Access. > > I did! > Probably easier to just install Gambas 3.14 instead of the rather experimental beta to be fair ;) And if I was going to go from gambas to a MS product it'd probably be .net and visual studio as i don't think Access is going to quite cut the mustard ;) Pretty sure Jos? is finding the fact his whole country seems to be banned from that link i sent not funny , not gambas bugs. Personally my routine is if I find bugs in gambas i report them to the bugtracker. If they are bugs that limit usage or damage my files then i go back to 3.14 till the bugs are fixed. shimples ;) the only downside being if you find bugs in anything less than 3.15 there's nothing to report because nobody cares. c'est la vie ;) Bruce -------------- next part -------------- An HTML attachment was scrubbed... URL: From brian at westwoodsvcs.com Fri Nov 13 17:12:39 2020 From: brian at westwoodsvcs.com (=?UTF-8?B?QnJpYW4gRw==?=) Date: Fri, 13 Nov 2020 19:12:39 +0300 Subject: [Gambas-user] =?utf-8?q?Couldn=27t_help_but_laugh=2C_most_of_you?= =?utf-8?q?_will_understand=2E?= In-Reply-To: <9695a4d2-4624-e69e-a3e0-6c336a2f604f@deganius.de> References: <824b328961b2902f217d29735e971dfd@cenpalab.cu> <9695a4d2-4624-e69e-a3e0-6c336a2f604f@deganius.de> Message-ID: <1605283959.350372865@f7.my.com> Could not agree more Christof! -- Thanks Brian Friday, 13 November 2020, 00:54AM -08:00 from Christof Thalhofer chrisml at deganius.de : >Am 13.11.20 um 00:42 schrieb jose.rodriguez at cenpalab.cu: > > Not your fault, but I don't find it very funny... > >If anyone has problems with bugs in Gambas please try something like >Microsoft Access. > >I did! > >From one version to the next MS removed functionality, because you could >work with foreign databases with it and they wanted to force the people >to MS SQL server. They removed methods I used 700 times in my code on >their recommendation before! > >We could not debug bugs, because a lot was behind the black wall of >closed source. We could not even report bugs. > >If someone told MS that there was an annoying bug they often denied it >and firms had to pay thousands of dollars to them to at least take a look. > >It took me ten years to get out of this sticky mud. > >I know exactly why I use open source. I know a lot of open source >software diamonds I work with and can rely on. But for me three of them >stand out: Postgresql, TeX and Gambas. > >Software is complex, there will always be bugs like warts on the skin >especially in a piece of software that stands on the shoulders of others >like it is with Gambas. But the benefits outweigh a lot and I wish I >could have enjoyed them much earlier in my life. > >Alles Gute > >Christof Thalhofer > >-- >Dies ist keine Signatur > > >----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Fri Nov 13 17:58:50 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Fri, 13 Nov 2020 16:58:50 +0000 Subject: [Gambas-user] Couldn't help but laugh, most of you will understand. In-Reply-To: <9695a4d2-4624-e69e-a3e0-6c336a2f604f@deganius.de> References: <824b328961b2902f217d29735e971dfd@cenpalab.cu> <9695a4d2-4624-e69e-a3e0-6c336a2f604f@deganius.de> Message-ID: Trouble for me is i use gambas a lot, not just the IDE i've made a bunch of custom apps for my own needs from managing git repositories to managing gambas projects to my own text editor, etc. Right now selecting any top level menu causes all my apps to just close. thus rendering a lot of them unusable. and that's just todays problem. Yesterday was mostly good apart from a bunch of broken features in the IDE a can get by without using, today my apps don't work. dag nab it. For me with the amount of custom gambas apps i've made a problem like that affects my whole system and i suddenly cannot function properly. having bugs to deal with is one thing. having the latest test beta version that even says "USE AT YOUR OWN RISK!" in the title can be like it says ,, risky. This morning i have had to.. Completely remove 3.15.90 and Re-install my customised 3.14 just so i can use my programs as 3.15.90 is now broken and in turn makes all my apps broken too. If anyone has problems with bugs in Gambas please try something like > Microsoft Access. > But I'm on Linux? ;) lol Can't I just have a good old moan? I'm British you know , moaning is what we do best ;) Bruce. Reminds me of an Australian joke i heard once... Q. how can you tell when a plane full of pomms lands at Melbourne Airport? A. they turn the engines off and the bloody whining doesn't stop ;) lmao :D -------------- next part -------------- An HTML attachment was scrubbed... URL: From g4mba5 at gmail.com Fri Nov 13 18:11:57 2020 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Fri, 13 Nov 2020 18:11:57 +0100 Subject: [Gambas-user] Couldn't help but laugh, most of you will understand. In-Reply-To: References: <824b328961b2902f217d29735e971dfd@cenpalab.cu> <9695a4d2-4624-e69e-a3e0-6c336a2f604f@deganius.de> Message-ID: Le 13/11/2020 ? 17:58, Bruce Steers a ?crit?: > Trouble for me is i use gambas a lot, not just the IDE i've made a bunch > of custom apps for my own needs from managing git repositories to > managing gambas projects to my own text editor, etc. > > Right now selecting any top level menu causes all my apps to just close. > thus rendering a lot of them unusable. > You are using the GTK+3 version of the IDE development version. In other words, you are testing. Just switch to the QT5 version if you need a more stable IDE. -- Beno?t Minisini From bsteers4 at gmail.com Fri Nov 13 18:46:33 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Fri, 13 Nov 2020 17:46:33 +0000 Subject: [Gambas-user] Couldn't help but laugh, most of you will understand. In-Reply-To: References: <824b328961b2902f217d29735e971dfd@cenpalab.cu> <9695a4d2-4624-e69e-a3e0-6c336a2f604f@deganius.de> Message-ID: On Fri, 13 Nov 2020, 17:13 Beno?t Minisini, wrote: > Le 13/11/2020 ? 17:58, Bruce Steers a ?crit : > > Trouble for me is i use gambas a lot, not just the IDE i've made a bunch > > of custom apps for my own needs from managing git repositories to > > managing gambas projects to my own text editor, etc. > > > > Right now selecting any top level menu causes all my apps to just close. > > thus rendering a lot of them unusable. > > > > You are using the GTK+3 version of the IDE development version. In other > words, you are testing. > > Just switch to the QT5 version if you need a more stable IDE. > > I just now tried that. How do you change the setting? Is it via selecting a menu item? Cant use any ide menus as it just closes. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Fri Nov 13 18:48:32 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Fri, 13 Nov 2020 17:48:32 +0000 Subject: [Gambas-user] Couldn't help but laugh, most of you will understand. In-Reply-To: References: <824b328961b2902f217d29735e971dfd@cenpalab.cu> <9695a4d2-4624-e69e-a3e0-6c336a2f604f@deganius.de> Message-ID: Aah , thanks Ben I didn't realise that. I just found myself between a quandary of wanting to help with the beta testing but also wanting to use my apps. But also, like i said , it's not just the IDE, after compiling the latest commit none of my apps worked (that i need to use menu's) and my text editor with the key macro recorder is now GTK only as gambas Key.Code values only match keysymdef.h defs on GTK not QT. Kind of a tough position for me. As I've said to you i love gambas, have used it for years and am happy to help, but not so happy to suddenly find i can't use my own software. It's cool though, i have a customised 3.14 here that does not kill my Arguments lists and has shell highlighting for my editor. I know also this is just a "current problem" and will probably be resolved soon. It's just there's a difference for me in "having to deal with a few bugs" and "not being able to use my own software" On Fri, 13 Nov 2020 at 17:13, Beno?t Minisini wrote: > Le 13/11/2020 ? 17:58, Bruce Steers a ?crit : > > Trouble for me is i use gambas a lot, not just the IDE i've made a bunch > > of custom apps for my own needs from managing git repositories to > > managing gambas projects to my own text editor, etc. > > > > Right now selecting any top level menu causes all my apps to just close. > > thus rendering a lot of them unusable. > > > > You are using the GTK+3 version of the IDE development version. In other > words, you are testing. > > Just switch to the QT5 version if you need a more stable IDE. > > -- > Beno?t Minisini > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From g4mba5 at gmail.com Fri Nov 13 18:53:58 2020 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Fri, 13 Nov 2020 18:53:58 +0100 Subject: [Gambas-user] Couldn't help but laugh, most of you will understand. In-Reply-To: References: <824b328961b2902f217d29735e971dfd@cenpalab.cu> <9695a4d2-4624-e69e-a3e0-6c336a2f604f@deganius.de> Message-ID: <3e8ff1f3-d2a1-7f7f-3bb2-64c6d898dfd3@gmail.com> Le 13/11/2020 ? 18:48, Bruce Steers a ?crit?: > > But also, like i said , it's not just the IDE, after compiling the > latest commit none of my apps worked (that i need to use menu's) > and my text editor with the key macro recorder is now GTK only as gambas > Key.Code values only match keysymdef.h defs on GTK not QT. > This is not guarantee to be true all the time. You should really create a conversion function for that, otherwise your program may break in the future! Regards, -- Beno?t Minisini From adamnt42 at gmail.com Fri Nov 13 19:47:25 2020 From: adamnt42 at gmail.com (Bruce) Date: Sat, 14 Nov 2020 05:17:25 +1030 Subject: [Gambas-user] Couldn't help but laugh, most of you will understand. In-Reply-To: <3e8ff1f3-d2a1-7f7f-3bb2-64c6d898dfd3@gmail.com> References: <824b328961b2902f217d29735e971dfd@cenpalab.cu> <9695a4d2-4624-e69e-a3e0-6c336a2f604f@deganius.de> <3e8ff1f3-d2a1-7f7f-3bb2-64c6d898dfd3@gmail.com> Message-ID: <7a83259f-74f3-fc89-214a-3870a2c7888a@gmail.com> On 14/11/20 4:23 am, Beno?t Minisini wrote: > Le 13/11/2020 ? 18:48, Bruce Steers a ?crit?: >> >> But also, like i said , it's not just the IDE, after compiling the >> latest commit none of my apps worked (that i need to use menu's) >> and my text editor with the key macro recorder is now GTK only as >> gambas Key.Code values only match keysymdef.h defs on GTK not QT. >> > > This is not guarantee to be true all the time. You should really create > a conversion function for that, otherwise your program may break in the > future! > > Regards, > Whih may be the reason why Big-B-Brucey's editor/recorder appeared to be totally useles when I tried it as I have no gtk libraries installed here. Interesting though, I have never had a problem with the Gambas Key mappings even though I have several modmaps between the heyboard and the gambas layer. Then again I've probably needed Key access in about 0..0002% of our code base, which at last count was approaching 500k lines. regards bruce (the original and best) From jose.rodriguez at cenpalab.cu Fri Nov 13 19:53:13 2020 From: jose.rodriguez at cenpalab.cu (jose.rodriguez at cenpalab.cu) Date: Fri, 13 Nov 2020 18:53:13 +0000 Subject: [Gambas-user] Couldn't help but laugh, most of you will understand. In-Reply-To: References: <824b328961b2902f217d29735e971dfd@cenpalab.cu> <9695a4d2-4624-e69e-a3e0-6c336a2f604f@deganius.de> Message-ID: <0941f65df3fc785120a7b144f3f927ff@cenpalab.cu> November 13, 2020 9:52 AM, "Bruce Steers" )> wrote: Pretty sure Jos? is finding the fact his whole country seems to be banned from that link i sent not funny , not gambas bugs. Exactly, though I did mean it as a (mostly) joke, I'm pretty used to that situation. Regards, Joe1962 -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Fri Nov 13 20:46:58 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Fri, 13 Nov 2020 19:46:58 +0000 Subject: [Gambas-user] Couldn't help but laugh, most of you will understand. In-Reply-To: <7a83259f-74f3-fc89-214a-3870a2c7888a@gmail.com> References: <824b328961b2902f217d29735e971dfd@cenpalab.cu> <9695a4d2-4624-e69e-a3e0-6c336a2f604f@deganius.de> <3e8ff1f3-d2a1-7f7f-3bb2-64c6d898dfd3@gmail.com> <7a83259f-74f3-fc89-214a-3870a2c7888a@gmail.com> Message-ID: > >> and my text editor with the key macro recorder is now GTK only as > >> gambas Key.Code values only match keysymdef.h defs on GTK not QT. > >> > > > > This is not guarantee to be true all the time. You should really create > > a conversion function for that, otherwise your program may break in the > > future! > > > > Regards, > > > > Whih may be the reason why Big-B-Brucey's editor/recorder appeared to be > totally useles when I tried it as I have no gtk libraries installed here. > Interesting though, I have never had a problem with the Gambas Key > mappings even though I have several modmaps between the heyboard and the > gambas layer. Then again I've probably needed Key access in about > 0..0002% of our code base, which at last count was approaching 500k lines Yeah i'm having to go back to the drawing board on this. works perfectly on gtk, all except a left or right control/shift/etc key always returns the L key not the R but that was fine. Then i tried QT and found none of the modifiers give a keysymdef.h code :( Am currently looking into xlib and the XKeycodeToKeysym function. But pretty clueless on Extern calls at present. i tried the proper Key assessor way using Key[symdef] , That gets a lot of things working on QT like home/end/pgup/etc but shift/ctrl/atl keys don't get detected like they do with gtk i'll have to use the Key.Alt /Key.Shift properties to monitor if down or up on each press. I can't believe a simple recorder/playback utility has so many issues. Sending the keys using X11.SendKey seems to work on both gtk and qt it's just when it comes to recording them i'm getting the wrong codes on QT. It's like making a voice recorder that only works for certain languages lol. In my mind ,, record , playback couldn't be any simpler. a key has a code , record it , play it back. what that code means or translates to i think should make no difference at all, if that keys code is say 12345 then sending back 12345 should be the same key. god i wish things could be simpler lol. -------------- next part -------------- An HTML attachment was scrubbed... URL: From brian at westwoodsvcs.com Sat Nov 14 01:12:37 2020 From: brian at westwoodsvcs.com (Brian G) Date: Fri, 13 Nov 2020 16:12:37 -0800 (PST) Subject: [Gambas-user] Couldn't help but laugh, most of you will understand. In-Reply-To: References: <824b328961b2902f217d29735e971dfd@cenpalab.cu> <9695a4d2-4624-e69e-a3e0-6c336a2f604f@deganius.de> Message-ID: <961927500.9836.1605312757716.JavaMail.zimbra@westwoodsvcs.com> Beno?t, What is the env var to set for using qt. I seem to have forgotten.... unable to find ref. Non of my apps are working any more... Thanks Brian G Thank You Brian G ----- Original Message ----- From: "Beno?t Minisini" To: "Gambas mailing list" Sent: Friday, November 13, 2020 5:11:57 PM Subject: Re: [Gambas-user] Couldn't help but laugh, most of you will understand. Le 13/11/2020 ? 17:58, Bruce Steers a ?crit?: > Trouble for me is i use gambas a lot, not just the IDE i've made a bunch > of custom apps for my own needs from managing git repositories to > managing gambas projects to my own text editor, etc. > > Right now selecting any top level menu causes all my apps to just close. > thus rendering a lot of them unusable. > You are using the GTK+3 version of the IDE development version. In other words, you are testing. Just switch to the QT5 version if you need a more stable IDE. -- Beno?t Minisini ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- From tmorehen at ajm-software.com Sat Nov 14 01:31:58 2020 From: tmorehen at ajm-software.com (Tony Morehen) Date: Fri, 13 Nov 2020 19:31:58 -0500 Subject: [Gambas-user] Couldn't help but laugh, most of you will understand. In-Reply-To: <961927500.9836.1605312757716.JavaMail.zimbra@westwoodsvcs.com> References: <824b328961b2902f217d29735e971dfd@cenpalab.cu> <9695a4d2-4624-e69e-a3e0-6c336a2f604f@deganius.de> <961927500.9836.1605312757716.JavaMail.zimbra@westwoodsvcs.com> Message-ID: <6dd6db22-eb94-fc3b-b92a-942df9ae6ce8@ajm-software.com> I use the following script in file /usr/local/bin/gambas3: #! /bin/sh export GB_GUI=gb.qt5 /usr/bin/gambas3 With a standard path, this is run in preference to /usr/bin/gambas3 On 2020-11-13 7:12 p.m., Brian G wrote: > Beno?t, > What is the env var to set for using qt. > I seem to have forgotten.... unable to find ref. > > Non of my apps are working any more... > > Thanks > Brian G > > Thank You > Brian G > > ----- Original Message ----- > From: "Beno?t Minisini" > To: "Gambas mailing list" > Sent: Friday, November 13, 2020 5:11:57 PM > Subject: Re: [Gambas-user] Couldn't help but laugh, most of you will understand. > > Le 13/11/2020 ? 17:58, Bruce Steers a ?crit?: >> Trouble for me is i use gambas a lot, not just the IDE i've made a bunch >> of custom apps for my own needs from managing git repositories to >> managing gambas projects to my own text editor, etc. >> >> Right now selecting any top level menu causes all my apps to just close. >> thus rendering a lot of them unusable. >> > You are using the GTK+3 version of the IDE development version. In other > words, you are testing. > > Just switch to the QT5 version if you need a more stable IDE. > From bsteers4 at gmail.com Sat Nov 14 02:12:26 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Sat, 14 Nov 2020 01:12:26 +0000 Subject: [Gambas-user] Couldn't help but laugh, most of you will understand. In-Reply-To: <961927500.9836.1605312757716.JavaMail.zimbra@westwoodsvcs.com> References: <824b328961b2902f217d29735e971dfd@cenpalab.cu> <9695a4d2-4624-e69e-a3e0-6c336a2f604f@deganius.de> <961927500.9836.1605312757716.JavaMail.zimbra@westwoodsvcs.com> Message-ID: I just pulled the latest commit Brian, seems to be fixed again :) On Sat, 14 Nov 2020 at 00:23, Brian G wrote: > Beno?t, > What is the env var to set for using qt. > I seem to have forgotten.... unable to find ref. > > Non of my apps are working any more... > > Thanks > Brian G > > Thank You > Brian G > > ----- Original Message ----- > From: "Beno?t Minisini" > To: "Gambas mailing list" > Sent: Friday, November 13, 2020 5:11:57 PM > Subject: Re: [Gambas-user] Couldn't help but laugh, most of you will > understand. > > Le 13/11/2020 ? 17:58, Bruce Steers a ?crit : > > Trouble for me is i use gambas a lot, not just the IDE i've made a bunch > > of custom apps for my own needs from managing git repositories to > > managing gambas projects to my own text editor, etc. > > > > Right now selecting any top level menu causes all my apps to just close. > > thus rendering a lot of them unusable. > > > > You are using the GTK+3 version of the IDE development version. In other > words, you are testing. > > Just switch to the QT5 version if you need a more stable IDE. > > -- > Beno?t Minisini > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From chrisml at deganius.de Sat Nov 14 04:35:41 2020 From: chrisml at deganius.de (Christof Thalhofer) Date: Sat, 14 Nov 2020 04:35:41 +0100 Subject: [Gambas-user] Couldn't help but laugh, most of you will understand. In-Reply-To: References: <824b328961b2902f217d29735e971dfd@cenpalab.cu> <9695a4d2-4624-e69e-a3e0-6c336a2f604f@deganius.de> <961927500.9836.1605312757716.JavaMail.zimbra@westwoodsvcs.com> Message-ID: Am 14.11.20 um 02:12 schrieb Bruce Steers: > I just pulled the latest commit Brian, seems to be fixed again :) There's the notification mailing list where you can see whats going on because every commit triggers a mail. Alles Gute Christof Thalhofer -- Dies ist keine Signatur -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From bsteers4 at gmail.com Sat Nov 14 05:58:25 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Sat, 14 Nov 2020 04:58:25 +0000 Subject: [Gambas-user] Couldn't help but laugh, most of you will understand. In-Reply-To: <7a83259f-74f3-fc89-214a-3870a2c7888a@gmail.com> References: <824b328961b2902f217d29735e971dfd@cenpalab.cu> <9695a4d2-4624-e69e-a3e0-6c336a2f604f@deganius.de> <3e8ff1f3-d2a1-7f7f-3bb2-64c6d898dfd3@gmail.com> <7a83259f-74f3-fc89-214a-3870a2c7888a@gmail.com> Message-ID: Try it now Bruce :) https://gitlab.com/bsteers4/scripted QT aint great, I added the 4 key codes manually and am using the codes directly ,, so shoot me [image: ;)] It's only 4 key codes Ctrl , Alt, AltGr and Shift (uses keysymdef defs for everything else) The app detects now if you are using qt or not and only tries to check those 4 codes if yes. (not tested it on qt4 just qt5) Another downside to QT is if you press the F3 search key in the macro for some reason it plays back okay from the menu but if you press the F7 menu hotkey to run the macro it will send all the keys before the F3 search :-\ GTK does not do that and QT does not do it if you use the menu not the shortcut. So if on QT it will disable the F7 hotkey. But suffice to say , i think it's working pretty well now. on GTK it works great. Whih may be the reason why Big-B-Brucey's editor/recorder appeared to be > totally useles when I tried it as I have no gtk libraries installed here. > Interesting though, I have never had a problem with the Gambas Key > mappings even though I have several modmaps between the heyboard and the > gambas layer. Then again I've probably needed Key access in about > 0..0002% of our code base, which at last count was approaching 500k lines. > > regards > bruce (the original and best) > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kicking177 at gmail.com Sat Nov 14 12:12:23 2020 From: kicking177 at gmail.com (KKing) Date: Sat, 14 Nov 2020 11:12:23 +0000 Subject: [Gambas-user] Couldn't help but laugh, most of you will understand. - Now about other things Message-ID: > Trouble for me is i use gambas a lot, not just the IDE i've made a bunch > of custom apps for my own needs from managing git repositories to > managing gambas projects to my own text editor, etc. On my wish list is ability to have multiple versions of Gambas able to be spun up and run at same time, preferably a base "stable" version as supplied from the distro's official repo and then multiple built from source versions of Gambas. I can do similar with some other apps by specifying the folder it was built in and sometimes with passed parameters for differing support (e.g. tesseract training data) and it helps in supporting different environments and consumers and for sometimes trying to debug issues. I had a go at compiling Gambas trying to falsify the v3 as v4 (purely for own local consumption for above reasons) but it always seem to look for some dependency either labelled as 3 or in location where the v3 install was. I ended up giving up on that for now. K. From mbelmonte at belmotek.net Sat Nov 14 13:40:35 2020 From: mbelmonte at belmotek.net (Martin) Date: Sat, 14 Nov 2020 13:40:35 +0100 Subject: [Gambas-user] Couldn't help but laugh, most of you will understand. - Now about other things In-Reply-To: References: Message-ID: Hi, In sports boats there is a philosophy about prototypes (which are also the ones used in the race), if it broke it had little material, if it did not break it had too much material. Gambas development seems to be something like this and this has some advantages and disadvantages, that is why, taking into account the destination of the program that is being developed, the developer must decide which version of IDE to use. I think that for production programs a more stable version of gambas should be used and for development use the newer one. For this it is convenient to use two different GNU/Linux choosing at start which one use, It is also very useful to use a virtual machine. Regards Martin Belmonte. From bsteers4 at gmail.com Sat Nov 14 13:45:55 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Sat, 14 Nov 2020 12:45:55 +0000 Subject: [Gambas-user] Couldn't help but laugh, most of you will understand. - Now about other things In-Reply-To: References: Message-ID: Agreed being able to install multiple versions on one OS would be great, Might take a bit of work though to change all for compiling. I know of many places in the source files that use a gambas$(VERSION) type of thing but i guess it's well integrated. (did you change the version.m4 file? i got a version change across the board changing that file.) I tweak the revision number just so i know if i'm using a modified version or not. never thought to change 3 to 4 and see if it makes gambas4 dirs/files instead, that's a good idea, might try it myself, there's a gambas3 folder , plus a gbs3 and gbh3 that might need renaming but i think version handling is pretty well set up in the installers with changing the version.m4 file :) Currently i have my drives split (lots), i have 3x linux mint Os's 2x Debian, 1x Manjaro 1x Ubuntu and a fedora i cannot boot (plus Windows10 but who cares about that rubbish ;) ). The LinuxMints have repo 3.14.3 version on one, beta 3.15.97 (my bruces-patches branch) on another and the last has 3.14.4 (patched) My patches basically include shell highlighting for TextEditor, TerminalView "clear" fix. and handling to stop my test argument lists from getting erased from my .project files, plus the makefile mime type installs only run if needed as this speeds up 'make install' a lot as i compile gambas a lot. (I won't use a non patched version of 3.15 anymore as it damages my .project files) Currently though (i should change this) only one OS is properly set up with all the software i need on it, internet links/passwords etc. the others are bare minimum test systems and often get re-installed as some of my testing i want to do on fresh systems to better see issues with missing dependencies and stuff. Was the only way i could see though to get multiple gambas versions. BruceS On Sat, 14 Nov 2020 at 11:13, KKing wrote: > > Trouble for me is i use gambas a lot, not just the IDE i've made a bunch > > of custom apps for my own needs from managing git repositories to > > managing gambas projects to my own text editor, etc. > > On my wish list is ability to have multiple versions of Gambas able to > be spun up and run at same time, preferably a base "stable" version as > supplied from the distro's official repo and then multiple built from > source versions of Gambas. I can do similar with some other apps by > specifying the folder it was built in and sometimes with passed > parameters for differing support (e.g. tesseract training data) and it > helps in supporting different environments and consumers and for > sometimes trying to debug issues. > > I had a go at compiling Gambas trying to falsify the v3 as v4 (purely > for own local consumption for above reasons) but it always seem to look > for some dependency either labelled as 3 or in location where the v3 > install was. I ended up giving up on that for now. > > K. > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Sat Nov 14 14:17:55 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Sat, 14 Nov 2020 13:17:55 +0000 Subject: [Gambas-user] QT and KeyPress Message-ID: Hi all I have a QT specific problem i'm wondering if there is a work-around for. With my macro recorder in my text editor. The scenario... I record a macro and in the macro somewhere i press F3 (the hotkey to search) then once recorded i press F7 to play the macro. The differences.... GTK on gtk pressing F7 works fine, if F3 was the second macro stroke recorded it searches at that point then all the other recorded keys get sent. QT. qt on the other hand seems to be locked in the F7 Keypress routine and playing the macro pressing F7 will send all the keystrokes but then the F3 search hit will function until *after* all the keys are sent. this does not happen if i select the play command from the menu with the mouse, just on F7 keypress. and does not happen on GTK at all, all works okay. Is there a command like (if i remember right) VB's Do_Events() (been a while since i've used vb but i remember a command like that that would run any waiting events during a function) Any advice would be appreciated. Many thanks in advance. BruceS -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Sat Nov 14 20:34:01 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Sat, 14 Nov 2020 19:34:01 +0000 Subject: [Gambas-user] Making an app gtk/qt switchable Message-ID: Greetings all. I'm trying to set an arg/option in my app to choose gui system. I've added an arg --gui with options gtk gtk3 qt4 or qt5. It has a Startup.module before FMain where the arg is read then.. Env["GB_GUI"] = "gb." & LCase(sGuiArg) But it don't work :( so i thought i could use Component.Load("gb." & LCase(sGuiArg)) which i guess i could if i could remove the default bg.gui component in the IDE but i can't, gotta have one of them. Loading the component gives a segmentation 11 fault. And there does not seem to be a Component.Unload() option. I'm out of ideas... Is it even possible to do? Cheers BruceS -------------- next part -------------- An HTML attachment was scrubbed... URL: From vuott at tiscali.it Sat Nov 14 19:18:37 2020 From: vuott at tiscali.it (vuott at tiscali.it) Date: Sat, 14 Nov 2020 19:18:37 +0100 Subject: [Gambas-user] Error when I want to create a new project Message-ID: <6888b8ac288650d7b0fdf4677bf99cd6@tiscali.it> Hello, when I want to create a new project, I obtain a message error that you can see in attached image file. Here my system: Gambas=3.15.90 b36254e (master) OperatingSystem=Linux Kernel=5.8.0-28-generic Architecture=x86_64 Distribution=Linux Mint 20 Ulyana Desktop=CINNAMON Theme=mint-y Language=it_IT.UTF-8 Memory=5382M Con Tiscali Mobile Smart 30 4G hai minuti illimitati, 100 SMS e 30 Giga in 4G a soli 8,99? al mese. http://tisca.li/smart30 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: error.png Type: image/png Size: 13913 bytes Desc: not available URL: From adamnt42 at gmail.com Sat Nov 14 21:37:29 2020 From: adamnt42 at gmail.com (Bruce) Date: Sun, 15 Nov 2020 07:07:29 +1030 Subject: [Gambas-user] Making an app gtk/qt switchable In-Reply-To: References: Message-ID: <575b8783-d838-393c-ae64-ca8ed0f7c6ca@gmail.com> On 15/11/20 6:04 am, Bruce Steers wrote: > Greetings all. > I'm trying to set an arg/option in my app to choose gui system. > > I've added an arg --gui with options gtk gtk3 qt4 or qt5. > > It has a Startup.module before FMain where the arg is read > then.. > Env["GB_GUI"] = "gb." & LCase(sGuiArg) > > But it don't work :( > > so i thought i could use Component.Load("gb." & LCase(sGuiArg)) > which i guess i could if i could remove the default bg.gui component in the > IDE but i can't, gotta have one of them. > Loading the component gives a segmentation 11 fault. > And there does not seem to be a Component.Unload() option. > > I'm out of ideas... > Is it even possible to do? > Cheers > BruceS > > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > No. (Answered several times earlier - search the archives) b From bagonergi at gmail.com Sat Nov 14 22:09:23 2020 From: bagonergi at gmail.com (Gianluigi) Date: Sat, 14 Nov 2020 22:09:23 +0100 Subject: [Gambas-user] Error when I want to create a new project In-Reply-To: <6888b8ac288650d7b0fdf4677bf99cd6@tiscali.it> References: <6888b8ac288650d7b0fdf4677bf99cd6@tiscali.it> Message-ID: Il giorno sab 14 nov 2020 alle ore 20:38 ha scritto: > Hello, > when I want to create a new project, I obtain a message error that you can > see in attached image file. > Here my system: > Gambas=3.15.90 b36254e (master) > OperatingSystem=Linux > Kernel=5.8.0-28-generic > Architecture=x86_64 > Distribution=Linux Mint 20 Ulyana > Desktop=CINNAMON > Theme=mint-y > Language=it_IT.UTF-8 > Memory=5382M > It happens to me too, this when the terminal returns to New project: gian at gian:~$ gambas3 FDirChooser.cmbFilter_Click.572: #13: Null object FDirChooser.cmbFilter_Click.572 FDirChooser.SetFilterIndex.544 FDirChooser.SetSettings.736 DirChooser.Settings_Write.198 Settings.Read.473 FCreateProject.Form_Open.31 FCreateProject.Run.17 FWelcome.btnNew_Click.166 CCoolButton.Panel_MouseUp.147 And this about Open Project: gian at gian:~$ gambas3 FDirChooser.cmbFilter_Click.572: #13: Null object FDirChooser.cmbFilter_Click.572 FDirChooser.SetFilterIndex.544 FDirChooser.SetSettings.736 DirChooser.Settings_Write.198 FProjectChooser.SetSettings.37 ProjectChooser.Settings_Write.38 Settings.Read.473 FOpenProject.Form_Open.60 FOpenProject.Run.19 FWelcome.btnOpen_Click.175 CCoolButton.Panel_MouseUp.147 gian at gian:~$ Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Sat Nov 14 22:16:03 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Sat, 14 Nov 2020 21:16:03 +0000 Subject: [Gambas-user] Making an app gtk/qt switchable In-Reply-To: <575b8783-d838-393c-ae64-ca8ed0f7c6ca@gmail.com> References: <575b8783-d838-393c-ae64-ca8ed0f7c6ca@gmail.com> Message-ID: On Sat, 14 Nov 2020 at 20:38, Bruce wrote: > On 15/11/20 6:04 am, Bruce Steers wrote: > > Greetings all. > > I'm trying to set an arg/option in my app to choose gui system. > > > > I'm out of ideas... > > Is it even possible to do? > > Cheers > > BruceS > > > > > No. > (Answered several times earlier - search the archives) > b > yeah but Gambas IDE never used to be able to do it either but now it seems it can. if that's a recent feature in the IDE are we not a few copy-n-pastes away from being able to do the same? seemed logical to me if it was a feature Gambas3 app can use my app could too as they are both gambas apps. BruceS -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Sat Nov 14 22:25:52 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Sat, 14 Nov 2020 21:25:52 +0000 Subject: [Gambas-user] Making an app gtk/qt switchable In-Reply-To: References: <575b8783-d838-393c-ae64-ca8ed0f7c6ca@gmail.com> Message-ID: No. > (Answered several times earlier - search the archives) >> b >> > I'm thinking more along the lines of searching the app/src/gambas3 files might get a more productive answer, cheers for the nudge in the right direction ;) Feed my cat, , i may be gone some time .... :p x B -------------- next part -------------- An HTML attachment was scrubbed... URL: From bagonergi at gmail.com Sat Nov 14 22:36:49 2020 From: bagonergi at gmail.com (Gianluigi) Date: Sat, 14 Nov 2020 22:36:49 +0100 Subject: [Gambas-user] Error when I want to create a new project In-Reply-To: References: <6888b8ac288650d7b0fdf4677bf99cd6@tiscali.it> Message-ID: Il giorno sab 14 nov 2020 alle ore 22:09 Gianluigi ha scritto: > > > Il giorno sab 14 nov 2020 alle ore 20:38 ha scritto: > >> Hello, >> when I want to create a new project, I obtain a message error that you >> can see in attached image file. >> Here my system: >> Gambas=3.15.90 b36254e (master) >> OperatingSystem=Linux >> Kernel=5.8.0-28-generic >> Architecture=x86_64 >> Distribution=Linux Mint 20 Ulyana >> Desktop=CINNAMON >> Theme=mint-y >> Language=it_IT.UTF-8 >> Memory=5382M >> > > It happens to me too, this when the terminal returns to New project: > > gian at gian:~$ gambas3 > FDirChooser.cmbFilter_Click.572: #13: Null object > FDirChooser.cmbFilter_Click.572 FDirChooser.SetFilterIndex.544 > FDirChooser.SetSettings.736 DirChooser.Settings_Write.198 Settings.Read.473 > FCreateProject.Form_Open.31 FCreateProject.Run.17 FWelcome.btnNew_Click.166 > CCoolButton.Panel_MouseUp.147 > > > And this about Open Project: > > gian at gian:~$ gambas3 > FDirChooser.cmbFilter_Click.572: #13: Null object > FDirChooser.cmbFilter_Click.572 FDirChooser.SetFilterIndex.544 > FDirChooser.SetSettings.736 DirChooser.Settings_Write.198 > FProjectChooser.SetSettings.37 ProjectChooser.Settings_Write.38 > Settings.Read.473 FOpenProject.Form_Open.60 FOpenProject.Run.19 > FWelcome.btnOpen_Click.175 CCoolButton.Panel_MouseUp.147 > gian at gian:~$ > I forgot, only with GTK with QT works well. Gambas=3.15.90 4fb647d (master) Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From tmorehen at ajm-software.com Sat Nov 14 23:04:00 2020 From: tmorehen at ajm-software.com (Tony Morehen) Date: Sat, 14 Nov 2020 17:04:00 -0500 Subject: [Gambas-user] Making an app gtk/qt switchable In-Reply-To: References: Message-ID: <166fa1f4-4979-9032-e732-bf440fa0e702@ajm-software.com> One way would be to use a two stage approach to starting your programs.? The first stage would be a stub program, and could be written in gambas or even a bash script.? It would run the second stage program, compiled with gb.gui, with the appropriate environment variable set. The launcher program could be written generically, looking at arg[0] to get the name of the second stage program to run ie launcher is named gbApp.gambas and stage 2 is gbApp1.gambas gbApp, at its simplest: Shell "GB_GUI=" & Application.Args[1] & " " & Replace(Application.Args[0],".gambas","1.gambas") On 2020-11-14 2:34 p.m., Bruce Steers wrote: > Greetings all. > I'm trying to set an arg/option in my app to choose gui system. > > I've added an arg --gui with options gtk gtk3 qt4 or qt5. > > It has a Startup.module before FMain where the arg is read > then.. > ?Env["GB_GUI"] = "gb." & LCase(sGuiArg) > > But it don't work :( > > so i thought i could use Component.Load("gb." & LCase(sGuiArg)) > which i guess i could if i could remove the default bg.gui component > in the IDE but i can't, gotta have one of them. > Loading the component gives a segmentation 11 fault. > And there does not seem to be a Component.Unload() option. > > I'm out of ideas... > Is it even possible to do? > Cheers > BruceS > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: From taboege at gmail.com Sat Nov 14 23:25:07 2020 From: taboege at gmail.com (Tobias Boege) Date: Sat, 14 Nov 2020 23:25:07 +0100 Subject: [Gambas-user] Making an app gtk/qt switchable In-Reply-To: References: <575b8783-d838-393c-ae64-ca8ed0f7c6ca@gmail.com> Message-ID: <20201114222507.GL171194@highrise.localdomain> On Sat, 14 Nov 2020, Bruce Steers wrote: > On Sat, 14 Nov 2020 at 20:38, Bruce wrote: > > > On 15/11/20 6:04 am, Bruce Steers wrote: > > > Greetings all. > > > I'm trying to set an arg/option in my app to choose gui system. > > > > > > I'm out of ideas... > > > Is it even possible to do? > > > Cheers > > > BruceS > > > > > > > > No. > > (Answered several times earlier - search the archives) > > b > > > > yeah but Gambas IDE never used to be able to do it either but now it seems > it can. Since when? I did not see anything relevant in the last seven days of git log messages. If you find the commit, or can narrow it down more, it will be much easier to find the relevant code. Or if you can point to a button/menu in the IDE where this functionality sits now, I may be able to find it faster. ... that is what I would ask if I took your statement at face value. Here's an alternate response based on some speculations about what you observed and that you drew a wrong conclusion: Gambas programs using gb.gui can set the toolkit to use via a GB_GUI environment variable *on process startup*. This has been available for a long time. That component, however, does not allow switching the toolkit later during runtime, as far as I know. By the time your program gets to interpret a --gui option from the command-line, it's already too late. Instead of supplying the --gui option, set the GB_GUI environment variable before starting the process, or do what Tony suggested (but avoid Shell and use Exec With instead). Related to that is *probably* that GTK is getting a webview now. Erstwhile, the IDE could only use gb.qt* because it needed a webview to display the help window. Therefore the IDE had a hard dependency on gb.gui.qt before, but with the GTK webview available, it can relax the dependency back to gb.gui, which supports the startup switching and makes the IDE prefer the GIMP toolkit on systems not running a K desktop session. That's why you may see more recent IDEs start up not using QT on your system and why you can now switch the IDE's toolkit on startup. But that feature is not to be found in the IDE source code and it is not dynamic at all. Best, Tobias -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From bagonergi at gmail.com Sun Nov 15 00:07:04 2020 From: bagonergi at gmail.com (Gianluigi) Date: Sun, 15 Nov 2020 00:07:04 +0100 Subject: [Gambas-user] Making an app gtk/qt switchable In-Reply-To: References: Message-ID: Il giorno sab 14 nov 2020 alle ore 20:35 Bruce Steers ha scritto: > Greetings all. > I'm trying to set an arg/option in my app to choose gui system. > > I've added an arg --gui with options gtk gtk3 qt4 or qt5. > ... > Hi BruceS, I don't know if this can be useful... as you can see from the attached image I have two launchers that I created like this (I don't know if this is a correct procedure, but in Ubuntu 20.04 it works): First I created the launcher in my home> .local/share/appications/gambas3.desktop with written: [Desktop Entry] Version=1.6 Encoding=UTF-8 Name=Gambas3 Type=Application Exec=/home/gian/gambasdevel/app/src/gambas3/gambas3.gambas Terminal=false Icon=/home/gian/gambasdevel/app/src/gambas3/img/logo/logo-ide.png Comment=Applicazione NoDisplay=false Then I changed it like this: [Desktop Entry] Version=1.6 Encoding=UTF-8 Name=GambasQT Type=Application Exec=env GB_GUI=gb.qt5 /home/gian/gambasdevel/app/src/gambas3/gambas3.gambas Terminal=false Icon=/home/gian/gambasdevel/app/src/gambas3/img/logo/logo-ide.png Comment=Applicazione NoDisplay=false I ended up with two launchers that I added to favorites. That's all Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: two-gambas.png Type: image/png Size: 35405 bytes Desc: not available URL: From bagonergi at gmail.com Sun Nov 15 00:26:53 2020 From: bagonergi at gmail.com (Gianluigi) Date: Sun, 15 Nov 2020 00:26:53 +0100 Subject: [Gambas-user] Making an app gtk/qt switchable In-Reply-To: References: Message-ID: Il giorno dom 15 nov 2020 alle ore 00:07 Gianluigi ha scritto: > > > Il giorno sab 14 nov 2020 alle ore 20:35 Bruce Steers > ha scritto: > >> Greetings all. >> I'm trying to set an arg/option in my app to choose gui system. >> >> I've added an arg --gui with options gtk gtk3 qt4 or qt5. >> ... >> > > Hi BruceS, > > I don't know if this can be useful... > as you can see from the attached image I have two launchers that I created > like this (I don't know if this is a correct procedure, but in Ubuntu 20.04 > it works): > > First I created the launcher in my home> > .local/share/appications/gambas3.desktop with written: > > [Desktop Entry] > Version=1.6 > Encoding=UTF-8 > Name=Gambas3 > Type=Application > Exec=/home/gian/gambasdevel/app/src/gambas3/gambas3.gambas > Terminal=false > Icon=/home/gian/gambasdevel/app/src/gambas3/img/logo/logo-ide.png > Comment=Applicazione > NoDisplay=false > > Then I changed it like this: > > [Desktop Entry] > Version=1.6 > Encoding=UTF-8 > Name=GambasQT > Type=Application > Exec=env GB_GUI=gb.qt5 > /home/gian/gambasdevel/app/src/gambas3/gambas3.gambas > Terminal=false > Icon=/home/gian/gambasdevel/app/src/gambas3/img/logo/logo-ide.png > Comment=Applicazione > NoDisplay=false > > I ended up with two launchers that I added to favorites. > > That's all > > Regards > Gianluigi > I forgot to point out that I also renamed the file gambas3.desktop to gambasQT.desktop Good night Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Sun Nov 15 02:28:33 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Sun, 15 Nov 2020 01:28:33 +0000 Subject: [Gambas-user] Making an app gtk/qt switchable In-Reply-To: <20201114222507.GL171194@highrise.localdomain> References: <575b8783-d838-393c-ae64-ca8ed0f7c6ca@gmail.com> <20201114222507.GL171194@highrise.localdomain> Message-ID: > > > > > yeah but Gambas IDE never used to be able to do it either but now it > seems > > it can. > > Since when? I did not see anything relevant in the last seven days of > git log messages. If you find the commit, or can narrow it down more, > it will be much easier to find the relevant code. Or if you can point > to a button/menu in the IDE where this functionality sits now, I may > be able to find it faster. > > ... that is what I would ask if I took your statement at face value. > Here's an alternate response based on some speculations about what > you observed and that you drew a wrong conclusion: > > I did not know many details. sorry i may have mistook Bens post the other day saying... > "You are using the GTK+3 version of the IDE development version. In other > words, you are testing. > Just switch to the QT5 version if you need a more stable IDE. > -- > Beno?t Minisini"" I may have misinterpreted that as a simple option. sorry is that a problem here? I did not try to switch anyway as whatever problem i had got remedied. :) BruceS -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Sun Nov 15 02:35:14 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Sun, 15 Nov 2020 01:35:14 +0000 Subject: [Gambas-user] Making an app gtk/qt switchable In-Reply-To: References: Message-ID: oooh , yes thank you i think i could possibly work with that :) could get the app to restart itself with prefix. Thanks again :) BruceS On Sat, 14 Nov 2020 at 23:28, Gianluigi wrote: > > > Il giorno dom 15 nov 2020 alle ore 00:07 Gianluigi > ha scritto: > >> >> >> Il giorno sab 14 nov 2020 alle ore 20:35 Bruce Steers >> ha scritto: >> >>> Greetings all. >>> I'm trying to set an arg/option in my app to choose gui system. >>> >>> I've added an arg --gui with options gtk gtk3 qt4 or qt5. >>> ... >>> >> >> Hi BruceS, >> >> I don't know if this can be useful... >> as you can see from the attached image I have two launchers that I >> created like this (I don't know if this is a correct procedure, but in >> Ubuntu 20.04 it works): >> >> First I created the launcher in my home> >> .local/share/appications/gambas3.desktop with written: >> >> [Desktop Entry] >> Version=1.6 >> Encoding=UTF-8 >> Name=Gambas3 >> Type=Application >> Exec=/home/gian/gambasdevel/app/src/gambas3/gambas3.gambas >> Terminal=false >> Icon=/home/gian/gambasdevel/app/src/gambas3/img/logo/logo-ide.png >> Comment=Applicazione >> NoDisplay=false >> >> Then I changed it like this: >> >> [Desktop Entry] >> Version=1.6 >> Encoding=UTF-8 >> Name=GambasQT >> Type=Application >> Exec=env GB_GUI=gb.qt5 >> /home/gian/gambasdevel/app/src/gambas3/gambas3.gambas >> Terminal=false >> Icon=/home/gian/gambasdevel/app/src/gambas3/img/logo/logo-ide.png >> Comment=Applicazione >> NoDisplay=false >> >> I ended up with two launchers that I added to favorites. >> >> That's all >> >> Regards >> Gianluigi >> > > I forgot to point out that I also renamed the file gambas3.desktop to > gambasQT.desktop > > Good night > Gianluigi > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Sun Nov 15 02:49:48 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Sun, 15 Nov 2020 01:49:48 +0000 Subject: [Gambas-user] Making an app gtk/qt switchable In-Reply-To: <20201114222507.GL171194@highrise.localdomain> References: <575b8783-d838-393c-ae64-ca8ed0f7c6ca@gmail.com> <20201114222507.GL171194@highrise.localdomain> Message-ID: > Gambas programs using gb.gui can set the toolkit to use via a GB_GUI > environment variable *on process startup*. This has been available for > a long time. That component, however, does not allow switching the > toolkit later during runtime, as far as I know. By the time your > program gets to interpret a --gui option from the command-line, it's > already too late. Instead of supplying the --gui option, set the > GB_GUI environment variable before starting the process, or do what > Tony suggested (but avoid Shell and use Exec With instead). > > Thank you Tobias, i see now :) -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Sun Nov 15 02:58:53 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Sun, 15 Nov 2020 01:58:53 +0000 Subject: [Gambas-user] Making an app gtk/qt switchable In-Reply-To: <166fa1f4-4979-9032-e732-bf440fa0e702@ajm-software.com> References: <166fa1f4-4979-9032-e732-bf440fa0e702@ajm-software.com> Message-ID: Thanks Tony , yes I'm heading this way maybe just the app relaunching itself, i've a few apps do that for various reasons. I was anware of just using an env command before starting an app, that little titbit had escaped me :) I'm looking at the Application.Restart property now. Does anybody here have any resources using this property? I've seen it set in the gambas3 ide code but not seen how the setting is used afterwards? hoping it might perform a nicer restart than i might. On Sat, 14 Nov 2020 at 22:05, Tony Morehen wrote: > One way would be to use a two stage approach to starting your programs. > The first stage would be a stub program, and could be written in gambas or > even a bash script. It would run the second stage program, compiled with > gb.gui, with the appropriate environment variable set. > > The launcher program could be written generically, looking at arg[0] to > get the name of the second stage program to run ie launcher is named gbApp.gambas > and stage 2 is gbApp1.gambas > > gbApp, at its simplest: > > Shell "GB_GUI=" & Application.Args[1] & " " & > Replace(Application.Args[0],".gambas","1.gambas") > > > On 2020-11-14 2:34 p.m., Bruce Steers wrote: > > Greetings all. > I'm trying to set an arg/option in my app to choose gui system. > > I've added an arg --gui with options gtk gtk3 qt4 or qt5. > > It has a Startup.module before FMain where the arg is read > then.. > Env["GB_GUI"] = "gb." & LCase(sGuiArg) > > But it don't work :( > > so i thought i could use Component.Load("gb." & LCase(sGuiArg)) > which i guess i could if i could remove the default bg.gui component in > the IDE but i can't, gotta have one of them. > Loading the component gives a segmentation 11 fault. > And there does not seem to be a Component.Unload() option. > > I'm out of ideas... > Is it even possible to do? > Cheers > BruceS > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From adamnt42 at gmail.com Sun Nov 15 04:21:18 2020 From: adamnt42 at gmail.com (Bruce) Date: Sun, 15 Nov 2020 13:51:18 +1030 Subject: [Gambas-user] Making an app gtk/qt switchable In-Reply-To: References: <166fa1f4-4979-9032-e732-bf440fa0e702@ajm-software.com> Message-ID: On 15/11/20 12:28 pm, Bruce Steers wrote: > I'm looking at the Application.Restart property now. > Does anybody here have any resources using this property? I think its for the debugger. b From bsteers4 at gmail.com Sun Nov 15 05:35:36 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Sun, 15 Nov 2020 04:35:36 +0000 Subject: [Gambas-user] Making an app gtk/qt switchable In-Reply-To: References: Message-ID: Hi BruceS, > >> I don't know if this can be useful... >> as you can see from the attached image I have two launchers that I >> created like this (I don't know if this is a correct procedure, but in >> Ubuntu 20.04 it works): >> >> First I created the launcher in my home> >> .local/share/appications/gambas3.desktop with written: >> >> [Desktop Entry] >> Version=1.6 >> Encoding=UTF-8 >> Name=Gambas3 >> Type=Application >> Exec=/home/gian/gambasdevel/app/src/gambas3/gambas3.gambas >> Terminal=false >> Icon=/home/gian/gambasdevel/app/src/gambas3/img/logo/logo-ide.png >> Comment=Applicazione >> NoDisplay=false >> >> >> I ended up with two launchers that I added to favorites. >> >> That's all >> >> Regards >> Gianluigi >> > > > With your information I've now made an entry like this and copied it to my panel. Now i can right click the launcher and select an alt GUI :) Can do the same for my app too :) Cheers [Desktop Entry] Name=Gambas3 Exec=gambas3 GenericName=Gambas 3 IDE Comment=Gambas3 Integrated Development Environment Icon=/usr/share/icons/gambas3.png Terminal=false Type=Application Categories=Development;IDE; StartupNotify=true Actions=QT4;QT5;GTK;GTK3 [Desktop Action QT4] Name=GB_GUI QT4 Exec=env GB_GUI=gb.qt4 gambas3 [Desktop Action QT5] Name=GB_GUI QT5 Exec=env GB_GUI=gb.qt5 gambas3 [Desktop Action GTK2] Name=GB_GUI GTK2 Exec=env GB_GUI=gb.gtk gambas3 [Desktop Action GTK3] Name=GB_GUI GTK3 Exec=env GB_GUI=gb.gtk3 gambas3 -------------- next part -------------- An HTML attachment was scrubbed... URL: From g4mba5 at gmail.com Sun Nov 15 08:53:21 2020 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Sun, 15 Nov 2020 08:53:21 +0100 Subject: [Gambas-user] Making an app gtk/qt switchable In-Reply-To: References: <166fa1f4-4979-9032-e732-bf440fa0e702@ajm-software.com> Message-ID: <45c2b8e2-c12b-a187-a843-ff7cf6b13f7f@gmail.com> Le 15/11/2020 ? 04:21, Bruce a ?crit?: > On 15/11/20 12:28 pm, Bruce Steers wrote: >> I'm looking at the Application.Restart property now. >> Does anybody here have any resources using this property? > > I think its for the debugger. > b > No, Application.Restart is telling the X11 session manager which command-line must be used for restarting the program at login. Regards, -- Beno?t Minisini From adamnt42 at gmail.com Sun Nov 15 09:05:03 2020 From: adamnt42 at gmail.com (Bruce) Date: Sun, 15 Nov 2020 18:35:03 +1030 Subject: [Gambas-user] Making an app gtk/qt switchable In-Reply-To: <45c2b8e2-c12b-a187-a843-ff7cf6b13f7f@gmail.com> References: <166fa1f4-4979-9032-e732-bf440fa0e702@ajm-software.com> <45c2b8e2-c12b-a187-a843-ff7cf6b13f7f@gmail.com> Message-ID: On 15/11/20 6:23 pm, Beno?t Minisini wrote: > Le 15/11/2020 ? 04:21, Bruce a ?crit?: >> On 15/11/20 12:28 pm, Bruce Steers wrote: >>> I'm looking at the Application.Restart property now. >>> Does anybody here have any resources using this property? >> >> I think its for the debugger. >> b >> > > No, Application.Restart is telling the X11 session manager which > command-line must be used for restarting the program at login. > > Regards, > > Thanks Beno?t, That does explain it. b From mike.crean at y7mail.com Sun Nov 15 09:06:48 2020 From: mike.crean at y7mail.com (Mike Crean) Date: Sun, 15 Nov 2020 08:06:48 +0000 (UTC) Subject: [Gambas-user] MediaPlayer References: <1834673500.5640079.1605427608026.ref@mail.yahoo.com> Message-ID: <1834673500.5640079.1605427608026@mail.yahoo.com> Hi all, I know I amprobably missing a simple fix for my problem. I have a picture boxon a form and I wish to display a webcam in it. When I try with thefollowing code the web cam image floods the entire form can anyone point mein the write direction so it is contained in the picture box please. Best regards Mike Private mp As NewMediaPlayer Public SubForm_Open() Form.Load Form.Show PictureBox1.SetFocus() mp.URL ="v4l2:///dev/video0" mp.SetWindow(PictureBox1) mp.Play() End Public SubForm_Close() EndIt() End Public Sub EndIt() Try Quit End Public SubButton2_Click() Dim theImage AsImage = mp.Video.Image theImage.Save(Application.Path &/ Format(Now, "ddmmyyyy_hhnnss")& ".jpg") PictureBox1.Image= theImage End -------------- next part -------------- An HTML attachment was scrubbed... URL: From kicking177 at gmail.com Sun Nov 15 09:58:58 2020 From: kicking177 at gmail.com (KKing) Date: Sun, 15 Nov 2020 08:58:58 +0000 Subject: [Gambas-user] step backwards while debugging in IDE? Message-ID: can you step backwards while debugging in IDE? i.e. in another world you can hit a breakpoint or have an untrapped error (e.g. out of bounds) halting on a line, you can change values and then drag the current processing line back a line (or more) and let it continue with corrected variables. K. From bagonergi at gmail.com Sun Nov 15 10:44:07 2020 From: bagonergi at gmail.com (Gianluigi) Date: Sun, 15 Nov 2020 10:44:07 +0100 Subject: [Gambas-user] Making an app gtk/qt switchable In-Reply-To: References: Message-ID: Il giorno dom 15 nov 2020 alle ore 05:36 Bruce Steers ha scritto: > > With your information I've now made an entry like this and copied it to my > panel. > Now i can right click the launcher and select an alt GUI :) > Can do the same for my app too :) > Cheers > ... > Hi BruceS, thanks, in my Ubuntu i had to change it like this: [Desktop Entry] Name=Gambas3 Exec=gambas3 GenericName=Gambas3 Comment=Gambas3 Integrated Development Environment Icon=/usr/share/icons/hicolor/256x256/apps/gambas3.png Terminal=false Type=Application Categories=Development;IDE; StartupNotify=true Actions=QT5;GTK3 [Desktop Action QT5] Name=GB_GUI QT5 Exec=env GB_GUI=gb.qt5 gambas3 [Desktop Action GTK3] Name=GB_GUI GTK3 Exec=env GB_GUI=gb.gtk3 gambas3 Do you know how to change the "senza nome" ("nameless") words (see attached image)? Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: gtk-qt.png Type: image/png Size: 69389 bytes Desc: not available URL: From bsteers4 at gmail.com Sun Nov 15 13:37:21 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Sun, 15 Nov 2020 12:37:21 +0000 Subject: [Gambas-user] Making an app gtk/qt switchable In-Reply-To: References: Message-ID: Hi Gianluigi you are most welcome :) about the dead menu entries, maybe there is more than one version of the gambas.desktop entry file trying to be used? the first draft and the one you edited are interfering/conflicting? I made the new launcher on my desktop and then deleted the panels old one , then dragged the new file onto my panel. Hope that helps :) On Sun, 15 Nov 2020 at 09:45, Gianluigi wrote: > > > Il giorno dom 15 nov 2020 alle ore 05:36 Bruce Steers > ha scritto: > >> >> With your information I've now made an entry like this and copied it to >> my panel. >> Now i can right click the launcher and select an alt GUI :) >> Can do the same for my app too :) >> Cheers >> ... >> > > Hi BruceS, > > thanks, in my Ubuntu i had to change it like this: > > [Desktop Entry] > Name=Gambas3 > Exec=gambas3 > GenericName=Gambas3 > Comment=Gambas3 Integrated Development Environment > Icon=/usr/share/icons/hicolor/256x256/apps/gambas3.png > Terminal=false > Type=Application > Categories=Development;IDE; > StartupNotify=true > Actions=QT5;GTK3 > > [Desktop Action QT5] > Name=GB_GUI QT5 > Exec=env GB_GUI=gb.qt5 gambas3 > > [Desktop Action GTK3] > Name=GB_GUI GTK3 > Exec=env GB_GUI=gb.gtk3 gambas3 > > Do you know how to change the "senza nome" ("nameless") words (see > attached image)? > > Regards > Gianluigi > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Sun Nov 15 13:41:00 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Sun, 15 Nov 2020 12:41:00 +0000 Subject: [Gambas-user] Making an app gtk/qt switchable In-Reply-To: References: <166fa1f4-4979-9032-e732-bf440fa0e702@ajm-software.com> <45c2b8e2-c12b-a187-a843-ff7cf6b13f7f@gmail.com> Message-ID: Aah , thank you guys :) On Sun, 15 Nov 2020 at 08:06, Bruce wrote: > On 15/11/20 6:23 pm, Beno?t Minisini wrote: > > Le 15/11/2020 ? 04:21, Bruce a ?crit : > >> On 15/11/20 12:28 pm, Bruce Steers wrote: > >>> I'm looking at the Application.Restart property now. > >>> Does anybody here have any resources using this property? > >> > >> I think its for the debugger. > >> b > >> > > > > No, Application.Restart is telling the X11 session manager which > > command-line must be used for restarting the program at login. > > > > Regards, > > > > > > Thanks Beno?t, > That does explain it. > b > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bagonergi at gmail.com Sun Nov 15 14:33:29 2020 From: bagonergi at gmail.com (Gianluigi) Date: Sun, 15 Nov 2020 14:33:29 +0100 Subject: [Gambas-user] Making an app gtk/qt switchable In-Reply-To: References: Message-ID: Il giorno dom 15 nov 2020 alle ore 13:38 Bruce Steers ha scritto: > Hi Gianluigi you are most welcome :) > > about the dead menu entries, maybe there is more than one version of the > gambas.desktop entry file trying to be used? the first draft and the one > you edited are interfering/conflicting? > > I made the new launcher on my desktop and then deleted the panels old one > , then dragged the new file onto my panel. > Hope that helps :) > Just restarted, sorry :-( As you can see now it's ok. Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: qt-gtk.png Type: image/png Size: 45863 bytes Desc: not available URL: From brian at westwoodsvcs.com Sun Nov 15 16:31:19 2020 From: brian at westwoodsvcs.com (Brian G) Date: Sun, 15 Nov 2020 07:31:19 -0800 (PST) Subject: [Gambas-user] Missing gb.qt5.webview code in package from ppa Message-ID: <518860356.10405.1605454279108.JavaMail.zimbra@westwoodsvcs.com> When I am trying to switch to QT5 I do GB_GUI=gb.qt5 And I get a message saying qt5 webview is not installed... And I am sure its installed So I checked the latest package gambas3-gb-qt5-webview from daily ppa and It only installs into the doc directory it does not contain any executable code. No wonder that its not found!!! Unless I am not understanding what it should be doing This is what is listed in the package /. /usr /usr/share /usr/share/doc /usr/share/doc/gambas3-gb-qt5-webview /usr/share/doc/gambas3-gb-qt5-webview/changelog.gz /usr/share/doc/gambas3-gb-qt5-webview/copyright Thank You Brian G -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Sun Nov 15 16:50:47 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Sun, 15 Nov 2020 15:50:47 +0000 Subject: [Gambas-user] Making an app gtk/qt switchable In-Reply-To: References: Message-ID: Aah cool :) It's great , i've set a number of my app launchers on my panel like it now, working a treat :) thanks again BruceS On Sun, 15 Nov 2020 at 13:34, Gianluigi wrote: > > > Il giorno dom 15 nov 2020 alle ore 13:38 Bruce Steers > ha scritto: > >> Hi Gianluigi you are most welcome :) >> >> about the dead menu entries, maybe there is more than one version of the >> gambas.desktop entry file trying to be used? the first draft and the one >> you edited are interfering/conflicting? >> >> I made the new launcher on my desktop and then deleted the panels old one >> , then dragged the new file onto my panel. >> Hope that helps :) >> > > Just restarted, sorry :-( > > As you can see now it's ok. > > Regards > Gianluigi > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From charlie at cogier.com Sun Nov 15 16:37:17 2020 From: charlie at cogier.com (Charlie Ogier) Date: Sun, 15 Nov 2020 15:37:17 +0000 Subject: [Gambas-user] MediaPlayer In-Reply-To: <1834673500.5640079.1605427608026@mail.yahoo.com> References: <1834673500.5640079.1605427608026.ref@mail.yahoo.com> <1834673500.5640079.1605427608026@mail.yahoo.com> Message-ID: Hi Mike, Your program worked fine for me. Maybe the problem is how you set up your Form. I have rewritten the code to create the necessary component on the form. Try this code in a new 'graphical application'. Charlie ************************************* ''Needs gb.media (and a webcam!) MP As New MediaPlayer PictureBox1 As PictureBox HBox1 As HBox Button2 As Button Public Sub Form_Open() ? With Me ??? .Height = 400 ??? .Width = 700 ??? .Padding = 5 ??? .Arrangement = Arrange.Vertical ? End With ? With PictureBox1 = New PictureBox(Me) As "PictureBox1" ??? .Expand = True ? End With ? With HBox1 = New HBox(Me) ??? .Height = 28 ??? .Invert = True ? End With ? With Button2 = New Button(HBox1) As "Button2" ??? .Width = 120 ??? .Text = "&Take photo" ??? .Picture = Picture["icon:/22/camera"] ? End With ? MP.URL = "v4l2:///dev/video0" ? MP.SetWindow(PictureBox1) ? MP.Play() End Public Sub Button2_Click() ? Dim theImage As Image = MP.Video.Image ? theImage.Save(Application.Path &/ Format(Now, "ddmmyyyy_hhnnss") & ".jpg") ? PictureBox1.Image = theImage End ************************************* On 15/11/2020 08:06, Mike Crean via User wrote: > > Hi all, I know I am probably missing a simple fix for my problem. > > I have a picture box on a form and I wish to display a webcam in it. > > When I try with the following code the web cam image floods the entire > form > > can anyone point me in the write direction so it is contained in the > picture box please. > > > Best regards > > Mike > > > Private mp As New MediaPlayer > > > Public Sub Form_Open() > > Form.Load > > Form.Show > > PictureBox1.SetFocus() > > mp.URL = "v4l2:///dev/video0" > > mp.SetWindow(PictureBox1) > > mp.Play() > > End > > > Public Sub Form_Close() > > EndIt() > > End > > > Public Sub EndIt() > > Try Quit > > End > > > Public Sub Button2_Click() > > Dim theImage As Image = mp.Video.Image > > theImage.Save(Application.Path &/ Format(Now, "ddmmyyyy_hhnnss") & ".jpg") > > PictureBox1.Image = theImage > > End > > > > > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: From brian at westwoodsvcs.com Sun Nov 15 17:00:18 2020 From: brian at westwoodsvcs.com (Brian G) Date: Sun, 15 Nov 2020 08:00:18 -0800 (PST) Subject: [Gambas-user] Missing gb.qt5.webview code in package from ppa In-Reply-To: <518860356.10405.1605454279108.JavaMail.zimbra@westwoodsvcs.com> References: <518860356.10405.1605454279108.JavaMail.zimbra@westwoodsvcs.com> Message-ID: <1236675984.10521.1605456018082.JavaMail.zimbra@westwoodsvcs.com> Ok after a little more investigation What happens when i try ti start gambas3 in qt brian at GN41:~$ export GB_GUI=gb.qt5 brian at GN41:~$ gambas3 gb.gui: warning: 'gb.qt5.webview' component not found, using 'gb.gtk3' instead gtk3 seems to also have a dummy package for webview but does install it as part of the gtk3 package But the qt5 packages don't seem to include it at all. I Guess I am not really understanding ....... list are the qt5 packages contents /. /usr /usr/lib /usr/lib/gambas3 /usr/lib/gambas3/gb.qt5.component /usr/lib/gambas3/gb.qt5.so /usr/lib/gambas3/gb.qt5.so.0 /usr/lib/gambas3/gb.qt5.so.0.0.0 /usr/share /usr/share/doc /usr/share/doc/gambas3-gb-qt5 /usr/share/doc/gambas3-gb-qt5/changelog.gz /usr/share/doc/gambas3-gb-qt5/copyright /usr/share/gambas3 /usr/share/gambas3/info /usr/share/gambas3/info/gb.qt5.info /usr/share/gambas3/info/gb.qt5.list qt5-ext /. /usr /usr/lib /usr/lib/gambas3 /usr/lib/gambas3/gb.qt5.ext.component /usr/lib/gambas3/gb.qt5.ext.so /usr/lib/gambas3/gb.qt5.ext.so.0 /usr/lib/gambas3/gb.qt5.ext.so.0.0.0 /usr/share /usr/share/doc /usr/share/doc/gambas3-gb-qt5-ext /usr/share/doc/gambas3-gb-qt5-ext/changelog.gz /usr/share/doc/gambas3-gb-qt5-ext/copyright /usr/share/gambas3 /usr/share/gambas3/info /usr/share/gambas3/info/gb.qt5.ext.info /usr/share/gambas3/info/gb.qt5.ext.list webkit /. /usr /usr/lib /usr/lib/gambas3 /usr/lib/gambas3/gb.qt5.webkit.component /usr/lib/gambas3/gb.qt5.webkit.so /usr/lib/gambas3/gb.qt5.webkit.so.0 /usr/lib/gambas3/gb.qt5.webkit.so.0.0.0 /usr/share /usr/share/doc /usr/share/doc/gambas3-gb-qt5-webkit /usr/share/doc/gambas3-gb-qt5-webkit/changelog.gz /usr/share/doc/gambas3-gb-qt5-webkit/copyright /usr/share/gambas3 /usr/share/gambas3/info /usr/share/gambas3/info/gb.qt5.webkit.info /usr/share/gambas3/info/gb.qt5.webkit.list webview /. /usr /usr/share /usr/share/doc /usr/share/doc/gambas3-gb-qt5-webview /usr/share/doc/gambas3-gb-qt5-webview/changelog.gz /usr/share/doc/gambas3-gb-qt5-webview/copyright Thank You Brian G From: "Brian" To: "Gambas mailing list" Sent: Sunday, November 15, 2020 7:31:19 AM Subject: [Gambas-user] Missing gb.qt5.webview code in package from ppa When I am trying to switch to QT5 I do GB_GUI=gb.qt5 And I get a message saying qt5 webview is not installed... And I am sure its installed So I checked the latest package gambas3-gb-qt5-webview from daily ppa and It only installs into the doc directory it does not contain any executable code. No wonder that its not found!!! Unless I am not understanding what it should be doing This is what is listed in the package /. /usr /usr/share /usr/share/doc /usr/share/doc/gambas3-gb-qt5-webview /usr/share/doc/gambas3-gb-qt5-webview/changelog.gz /usr/share/doc/gambas3-gb-qt5-webview/copyright Thank You Brian G ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: From g4mba5 at gmail.com Sun Nov 15 18:01:49 2020 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Sun, 15 Nov 2020 18:01:49 +0100 Subject: [Gambas-user] MediaPlayer In-Reply-To: <1834673500.5640079.1605427608026@mail.yahoo.com> References: <1834673500.5640079.1605427608026.ref@mail.yahoo.com> <1834673500.5640079.1605427608026@mail.yahoo.com> Message-ID: <835f5c24-25d6-e3a9-ae88-bcfce45f90b4@gmail.com> Le 15/11/2020 ? 09:06, Mike Crean via User a ?crit?: > Hi all, I know I am probably missing a simple fix for my problem. > > I have a picture box on a form and I wish to display a webcam in it. > > When I try with the following code the web cam image floods the entire form > > can anyone point me in the write direction so it is contained in the > picture box please. > > > Best regards > > Mike > > > Private mp As New MediaPlayer > > > Public Sub Form_Open() > > Form.Load > > Form.Show > > PictureBox1.SetFocus() > > mp.URL = "v4l2:///dev/video0" > > mp.SetWindow(PictureBox1) > > mp.Play() > > End > > > Public Sub Form_Close() > > EndIt() > > End > > > Public Sub EndIt() > > Try Quit > > End > > > Public Sub Button2_Click() > > Dim theImage As Image = mp.Video.Image > > theImage.Save(Application.Path &/ Format(Now, "ddmmyyyy_hhnnss") & ".jpg") > > PictureBox1.Image = theImage > > End > The SetWindow() method needs a control that had a real X11 (or wayland) window, otherwise if will use the first parent control having a real window, which is usually the toplevel one. Hopefully, there is a trick, used in the 'gb.form.media' component (that you can use as an example): using a DrawingArea with its Cached property set to TRUE. This is the only way to have a control having its own window whatever the GUI component in use. Maybe I should made a dedicated control for that, so that the trick becomes explicit? Regards, -- Beno?t Minisini From g4mba5 at gmail.com Sun Nov 15 18:03:04 2020 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Sun, 15 Nov 2020 18:03:04 +0100 Subject: [Gambas-user] Making an app gtk/qt switchable In-Reply-To: References: Message-ID: <0b4007a7-e715-87b8-ddc2-217ded8ae5ef@gmail.com> Le 15/11/2020 ? 16:50, Bruce Steers a ?crit?: > Aah cool :) > It's great , i've set a number of my app launchers on my panel like it > now, working a treat :) > thanks again > BruceS > Cool. I will modify the IDE desktop file with that trick. Regards, -- Beno?t Minisini From g4mba5 at gmail.com Sun Nov 15 18:05:17 2020 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Sun, 15 Nov 2020 18:05:17 +0100 Subject: [Gambas-user] Missing gb.qt5.webview code in package from ppa In-Reply-To: <518860356.10405.1605454279108.JavaMail.zimbra@westwoodsvcs.com> References: <518860356.10405.1605454279108.JavaMail.zimbra@westwoodsvcs.com> Message-ID: Le 15/11/2020 ? 16:31, Brian G a ?crit?: > When I am trying to switch to QT5 > I do GB_GUI=gb.qt5 > And I get a message saying qt5 webview is not installed... > And I am sure its installed > > So I checked the latest package gambas3-gb-qt5-webview from daily ppa > and It only installs into the doc directory > it does not contain any executable code. No wonder that its not found!!! > > Unless I am not understanding what it should be doing > > This is what is listed in the package > > /. > /usr > /usr/share > /usr/share/doc > /usr/share/doc/gambas3-gb-qt5-webview > /usr/share/doc/gambas3-gb-qt5-webview/changelog.gz > /usr/share/doc/gambas3-gb-qt5-webview/copyright > > Thank You > Brian G > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > It's for which version of Ubuntu exactly? It's hard to not doing a bug when generating packages with Ubuntu launchpad, and the guy who managed it before apparently disappeared in the hyper-space. Regards, -- Beno?t Minisini From brian at westwoodsvcs.com Sun Nov 15 18:23:12 2020 From: brian at westwoodsvcs.com (Brian G) Date: Sun, 15 Nov 2020 09:23:12 -0800 (PST) Subject: [Gambas-user] Missing gb.qt5.webview code in package from ppa In-Reply-To: References: <518860356.10405.1605454279108.JavaMail.zimbra@westwoodsvcs.com> Message-ID: <1652329315.10563.1605460992802.JavaMail.zimbra@westwoodsvcs.com> Mint 19.3 and the daily ppa Thank You Brian G ----- Original Message ----- From: "Beno?t Minisini" To: "Gambas mailing list" Sent: Sunday, November 15, 2020 9:05:17 AM Subject: Re: [Gambas-user] Missing gb.qt5.webview code in package from ppa Le 15/11/2020 ? 16:31, Brian G a ?crit?: > When I am trying to switch to QT5 > I do GB_GUI=gb.qt5 > And I get a message saying qt5 webview is not installed... > And I am sure its installed > > So I checked the latest package gambas3-gb-qt5-webview from daily ppa > and It only installs into the doc directory > it does not contain any executable code. No wonder that its not found!!! > > Unless I am not understanding what it should be doing > > This is what is listed in the package > > /. > /usr > /usr/share > /usr/share/doc > /usr/share/doc/gambas3-gb-qt5-webview > /usr/share/doc/gambas3-gb-qt5-webview/changelog.gz > /usr/share/doc/gambas3-gb-qt5-webview/copyright > > Thank You > Brian G > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > It's for which version of Ubuntu exactly? It's hard to not doing a bug when generating packages with Ubuntu launchpad, and the guy who managed it before apparently disappeared in the hyper-space. Regards, -- Beno?t Minisini ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- From g4mba5 at gmail.com Sun Nov 15 18:35:41 2020 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Sun, 15 Nov 2020 18:35:41 +0100 Subject: [Gambas-user] Missing gb.qt5.webview code in package from ppa In-Reply-To: <1652329315.10563.1605460992802.JavaMail.zimbra@westwoodsvcs.com> References: <518860356.10405.1605454279108.JavaMail.zimbra@westwoodsvcs.com> <1652329315.10563.1605460992802.JavaMail.zimbra@westwoodsvcs.com> Message-ID: Le 15/11/2020 ? 18:23, Brian G a ?crit?: > Mint 19.3 > and the daily ppa > > Thank You > Brian G > Which version of Ubuntu is associated to Mint 19.3? -- Beno?t Minisini From brian at westwoodsvcs.com Sun Nov 15 18:27:51 2020 From: brian at westwoodsvcs.com (Brian G) Date: Sun, 15 Nov 2020 09:27:51 -0800 (PST) Subject: [Gambas-user] Missing gb.qt5.webview code in package from ppa In-Reply-To: References: <518860356.10405.1605454279108.JavaMail.zimbra@westwoodsvcs.com> Message-ID: <1780032867.10564.1605461271238.JavaMail.zimbra@westwoodsvcs.com> More Exactly I am using the Gambasteam/gambas-daily Thank You Brian G ----- Original Message ----- From: "Beno?t Minisini" To: "Gambas mailing list" Sent: Sunday, November 15, 2020 9:05:17 AM Subject: Re: [Gambas-user] Missing gb.qt5.webview code in package from ppa Le 15/11/2020 ? 16:31, Brian G a ?crit?: > When I am trying to switch to QT5 > I do GB_GUI=gb.qt5 > And I get a message saying qt5 webview is not installed... > And I am sure its installed > > So I checked the latest package gambas3-gb-qt5-webview from daily ppa > and It only installs into the doc directory > it does not contain any executable code. No wonder that its not found!!! > > Unless I am not understanding what it should be doing > > This is what is listed in the package > > /. > /usr > /usr/share > /usr/share/doc > /usr/share/doc/gambas3-gb-qt5-webview > /usr/share/doc/gambas3-gb-qt5-webview/changelog.gz > /usr/share/doc/gambas3-gb-qt5-webview/copyright > > Thank You > Brian G > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > It's for which version of Ubuntu exactly? It's hard to not doing a bug when generating packages with Ubuntu launchpad, and the guy who managed it before apparently disappeared in the hyper-space. Regards, -- Beno?t Minisini ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- From brian at westwoodsvcs.com Sun Nov 15 19:20:20 2020 From: brian at westwoodsvcs.com (Brian G) Date: Sun, 15 Nov 2020 10:20:20 -0800 (PST) Subject: [Gambas-user] Missing gb.qt5.webview code in package from ppa In-Reply-To: References: <518860356.10405.1605454279108.JavaMail.zimbra@westwoodsvcs.com> <1652329315.10563.1605460992802.JavaMail.zimbra@westwoodsvcs.com> Message-ID: <667292868.10565.1605464420675.JavaMail.zimbra@westwoodsvcs.com> Ubuntu 18.04. 3 LTS = mint 19.3 Ubuntu 20.04 = mint 20 have same issues on both versions Thank You Brian G ----- Original Message ----- From: "Beno?t Minisini" To: "Gambas mailing list" Sent: Sunday, November 15, 2020 9:35:41 AM Subject: Re: [Gambas-user] Missing gb.qt5.webview code in package from ppa Le 15/11/2020 ? 18:23, Brian G a ?crit?: > Mint 19.3 > and the daily ppa > > Thank You > Brian G > Which version of Ubuntu is associated to Mint 19.3? -- Beno?t Minisini ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- From bsteers4 at gmail.com Sun Nov 15 19:32:25 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Sun, 15 Nov 2020 18:32:25 +0000 Subject: [Gambas-user] Making an app gtk/qt switchable In-Reply-To: <0b4007a7-e715-87b8-ddc2-217ded8ae5ef@gmail.com> References: <0b4007a7-e715-87b8-ddc2-217ded8ae5ef@gmail.com> Message-ID: Excellnt :) And can confirm working in mint. I just did a git pull on a clean mint, and non modified gambas master (pure gambas/gambas 3.15.90) , and 'make install' and yep, newly made panel launcher has those lovely options added so i don't have to and working fine :) Thank you Ben :) BruceS On Sun, 15 Nov 2020 at 17:04, Beno?t Minisini wrote: > Le 15/11/2020 ? 16:50, Bruce Steers a ?crit : > > Aah cool :) > > It's great , i've set a number of my app launchers on my panel like it > > now, working a treat :) > > thanks again > > BruceS > > > > Cool. I will modify the IDE desktop file with that trick. > > Regards, > > -- > Beno?t Minisini > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Sun Nov 15 23:15:45 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Sun, 15 Nov 2020 22:15:45 +0000 Subject: [Gambas-user] Making an app gtk/qt switchable In-Reply-To: <0b4007a7-e715-87b8-ddc2-217ded8ae5ef@gmail.com> References: <0b4007a7-e715-87b8-ddc2-217ded8ae5ef@gmail.com> Message-ID: > Aah cool :) > > It's great , i've set a number of my app launchers on my panel like it > > now, working a treat :) > > thanks again > > BruceS > > > > I have come up with my own solution too now if anyone wants to see it... Maybe i'm doing it badly? i do not know but this works for me... It changes (for me) the "no, cannot make an app choose it's gui on launch" to , "Yes, this way...." I've used it on this "under-construction" git managing app i'm making. https://gitlab.com/bsteers4/gitman The reason is clicking text in the TextArea in QT and GTK3 will auto select the filename clicked. But on GTK2 it does not work. So if GTK2 is detected it offers a choice on launch without me presetting an env GB_GUI prefix. To try it out just run the GitMan.gambas app with GTK2 and test the click a filename feature with different gui's. To test the file auto-select-filename feature it wants to be given a git folder with unadded commits then the "status" page will list them under "modified: filename". click a filename in gtk2 and nothing happens, but works in the other GUI environments. Perhaps there's a better way you experts can make the following code an optimal solution for us all? Thanks :) (there's always a way :) Here's the code (condensed version).. (comments removed (or bunched up to same line) to shorten for this email, the version on gitlab has full comments) *Public Sub Form_Open()* *If Not Component.IsLoaded("gb.gtk") Then Goto SkipGtkCheck ' gtk2 not being used so skip.Dim iVal As Integer = Message.Question("Warning GTK2 detected!\nSome functions like clicking a file to select\nthe whole filename do not work on GTK2.\nReload a diferent GUI base?", "Run with GTK3", "Run with QT5", "Use GTK2") * *If iVal = 3 Then Goto SkipGtkCheck ' User Selected continue with gtk2 loaded so skip reload.* *Dim sArgs As String[] = Args.All.Copy() ' Copy args to String[]* *If File.Ext(sArgs[0]) <> "gambas" Then sArgs[0] &= ".gambas" ' only needed if running from IDE* * If Left(sArgs[0], 2) = "./" Then ' Make sure path of launched app is full not relative. sArgs[0] = Application.Path &/ Right(sArgs[0], -2) Else If InStr(sArgs[0], "/") = 0 Then sArgs[0] = Application.Path &/ sArgs[0] EndifsArgs.Add("env", 0) ' Add GB_GUI=gb. env prifix to commandsArgs.Add("GB_GUI=gb." & ["", "gtk3", "qt5"][iVal], 1)Wait 0.1 ' above question window will not close if not Wait 0.1* * Exec sArgs Wait ' Relaunch Application with args and GUI prefix and wait hidden, then quit after relaunched app quits.* * Stop Event Quit 'Return SkipGtkCheck:* *' Rest of Form_Open() and normal running of app from here* *'* *End* Any thoughts / Improvements on that anyone ? BruceS -------------- next part -------------- An HTML attachment was scrubbed... URL: From mike.crean at y7mail.com Mon Nov 16 04:51:48 2020 From: mike.crean at y7mail.com (Mike Crean) Date: Mon, 16 Nov 2020 03:51:48 +0000 (UTC) Subject: [Gambas-user] MediaPlayer In-Reply-To: <835f5c24-25d6-e3a9-ae88-bcfce45f90b4@gmail.com> References: <1834673500.5640079.1605427608026.ref@mail.yahoo.com> <1834673500.5640079.1605427608026@mail.yahoo.com> <835f5c24-25d6-e3a9-ae88-bcfce45f90b4@gmail.com> Message-ID: <1271466788.5871300.1605498708473@mail.yahoo.com> Thanks Charlie and Benoit. Benoit thanks for putting me on the right trail here is what I ended up with. It may help some one else. ' Gambas class file '****? NOTE only a DrawinArea can be used as the video container and Cached must be set to TRUE.? **** '****? A PictureBox can also be used as long as it is inside the DrawingArea. **** ? Private mp As New MediaPlayer Public Sub Form_Open() ? Form.Load ? Form.Show ? mp.URL = "v4l2:///dev/video0" ? mp.SetWindow(PictureBox1) ? mp.Play() End Public Sub Form_Close() ? EndIt() End Public Sub EndIt() ? Try Quit ? End Public Sub Button2_Click() ? Dim theImage As Image = mp.Video.Image ? theImage.Save(Application.Path &/ Format(Now, "ddmmyyyy_hhnnss") & ".jpg") ? PictureBox1.Image = theImage End Best RegardsMike On Monday, 16 November 2020, 1:02:05 am AWST, Beno?t Minisini wrote: Le 15/11/2020 ? 09:06, Mike Crean via User a ?crit?: > Hi all, I know I am probably missing a simple fix for my problem. > > I have a picture box on a form and I wish to display a webcam in it. > > When I try with the following code the web cam image floods the entire form > > can anyone point me in the write direction so it is contained in the > picture box please. > > > Best regards > > Mike > > > Private mp As New MediaPlayer > > > Public Sub Form_Open() > > Form.Load > > Form.Show > > PictureBox1.SetFocus() > > mp.URL = "v4l2:///dev/video0" > > mp.SetWindow(PictureBox1) > > mp.Play() > > End > > > Public Sub Form_Close() > > EndIt() > > End > > > Public Sub EndIt() > > Try Quit > > End > > > Public Sub Button2_Click() > > Dim theImage As Image = mp.Video.Image > > theImage.Save(Application.Path &/ Format(Now, "ddmmyyyy_hhnnss") & ".jpg") > > PictureBox1.Image = theImage > > End > The SetWindow() method needs a control that had a real X11 (or wayland) window, otherwise if will use the first parent control having a real window, which is usually the toplevel one. Hopefully, there is a trick, used in the 'gb.form.media' component (that you can use as an example): using a DrawingArea with its Cached property set to TRUE. This is the only way to have a control having its own window whatever the GUI component in use. Maybe I should made a dedicated control for that, so that the trick becomes explicit? Regards, -- Beno?t Minisini ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: MyCCTV.png Type: image/png Size: 48937 bytes Desc: not available URL: From mbelmonte at belmotek.net Mon Nov 16 09:48:42 2020 From: mbelmonte at belmotek.net (Martin) Date: Mon, 16 Nov 2020 09:48:42 +0100 Subject: [Gambas-user] Collections and 0 values. Message-ID: <1d2a22c1-30fe-7ba3-69b8-c278bff1f504@belmotek.net> Hi, I'm using collecions to storage spatial data of some CAD entitites like lines, text, etc. one of the tags are the angle, in radians, then when if i want to storage non 0 values no problem, but when the angle is 0 the tag : value is not added. I have seen this behavior before in collections with null values and of course with 0 values, like the one I am trying to use now. The question is why is this defined like this? What sense does it make? Would it be possible to support 0 values by changing something in the configuration? If 0 is a valid value to start counting an array, why is it not valid to define a 0 value? Another related issue is settings, since it has the same behavior, what is the logic of this? the set of names of the variables that have value "" is lost. Thanks. Mart?n. -------------- next part -------------- An HTML attachment was scrubbed... URL: From taboege at gmail.com Mon Nov 16 10:10:50 2020 From: taboege at gmail.com (Tobias Boege) Date: Mon, 16 Nov 2020 10:10:50 +0100 Subject: [Gambas-user] Collections and 0 values. In-Reply-To: <1d2a22c1-30fe-7ba3-69b8-c278bff1f504@belmotek.net> References: <1d2a22c1-30fe-7ba3-69b8-c278bff1f504@belmotek.net> Message-ID: <20201116091050.GM171194@highrise.localdomain> On Mon, 16 Nov 2020, Martin wrote: > Hi, > > I'm using collecions to storage spatial data of some CAD entitites like > lines, text, etc. one of the tags are the angle, in radians, then when if i > want to storage non 0 values no problem, but when the angle is 0 the tag : > value is not added. > > I have seen this behavior before in collections with null values and of > course with 0 values, like the one I am trying to use now. > The question is why is this defined like this? What sense does it make? > Would it be possible to support 0 values by changing something in the > configuration? > If 0 is a valid value to start counting an array, why is it not valid to > define a 0 value? > Another related issue is settings, since it has the same behavior, what is > the logic of this? the set of names of the variables that have value "" is > lost. > Thanks. > In Gambas, Null and the empty string are equivalent. Assigning Null to a Collection key is the same as removing it. To emulate languages which treat their analogues of "" and Null differently, you have to invent your own sentinel Null value like it was done for JSON [1]. If you need a Collection which stores Gambas Null values instead of taking this as a cue to delete the key, you can use JSONCollection, despite its name. Null and the integer zero are not equivalent in Gambas and I doubt that assigning coll[key] = 0 will delete key. Can you isolate the code you have problems with into a very small test, which clearly shows what you put it and what you expect to get out, without a great big project and UI attached? Best, Tobias [1] http://gambaswiki.org/wiki/comp/gb.web/json/null -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From mckaygerhard at gmail.com Mon Nov 16 16:17:28 2020 From: mckaygerhard at gmail.com (PICCORO McKAY Lenz) Date: Mon, 16 Nov 2020 11:17:28 -0400 Subject: [Gambas-user] Exec just returns 0 lines when cat cannot read In-Reply-To: References: Message-ID: just reading documenttion : Only the standard output of the process is retrieved. The error output is not redirected. sorry for noise! i'll use the process sintax El lun., 16 de nov. de 2020 a la(s) 11:01, PICCORO McKAY Lenz ( mckaygerhard at gmail.com) escribi?: > i have this code: > > rcfilepath = "/etc/authdaemonrc" > If Not Exist(rcfilepath) Then > Error "rc file not found " > Quit > Endif > > the following line returns no error if file cannot be read: > > Exec ["cat", rcfilepath] To sLine > > just offers 0 lines.. using gambas 3.10 and 3.12 .. this is normal? using > "cat /path/file" returns error > > *is there's a way to check if execution was susessfull??* > > Lenz McKAY Gerardo (PICCORO) > http://qgqlochekone.blogspot.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From g4mba5 at gmail.com Mon Nov 16 16:46:01 2020 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Mon, 16 Nov 2020 16:46:01 +0100 Subject: [Gambas-user] Exec just returns 0 lines when cat cannot read In-Reply-To: References: Message-ID: Le 16/11/2020 ? 16:17, PICCORO McKAY Lenz a ?crit?: > just reading documenttion?: > > Only the standard output of the process is retrieved. The error output > is not redirected. > > sorry for noise! i'll use the process sintax > > El lun., 16 de nov. de 2020 a la(s) 11:01, PICCORO McKAY Lenz > (mckaygerhard at gmail.com ) escribi?: > > i have this code: > > ?rcfilepath = ?"/etc/authdaemonrc" > ?If Not Exist(rcfilepath) Then > ? ? ? ? Error "rc file not found " > ? ? ? ? Quit > ?Endif > the following line returns no error if file cannot be read: > > ?Exec ["cat", rcfilepath] To sLine > > just offers 0 lines.. using gambas 3.10 and 3.12 .. this is normal? > using "cat /path/file" returns error > > *is there's a way to check if execution was susessfull??* > Check the process return value with Process.LastValue and Process.LastState. Regards, -- Beno?t Minisini From kicking177 at gmail.com Mon Nov 16 13:31:03 2020 From: kicking177 at gmail.com (KKing) Date: Mon, 16 Nov 2020 12:31:03 +0000 Subject: [Gambas-user] multi dimension integer array question Message-ID: <498101fa-39a5-eb1f-587c-34303d775052@gmail.com> I'm currently creating an integer array thus ?? ?Public intPixel As New Integer[199, 1999] where I know that 199 (Rows) and 1999 (columns) are sufficient for my current needs. But is there some way to "REDIM" on the fly if establish more rows or columns are needed? K. From taboege at gmail.com Mon Nov 16 19:43:07 2020 From: taboege at gmail.com (Tobias Boege) Date: Mon, 16 Nov 2020 19:43:07 +0100 Subject: [Gambas-user] multi dimension integer array question In-Reply-To: <498101fa-39a5-eb1f-587c-34303d775052@gmail.com> References: <498101fa-39a5-eb1f-587c-34303d775052@gmail.com> Message-ID: <20201116184049.GP171194@highrise.localdomain> On Mon, 16 Nov 2020, KKing wrote: > I'm currently creating an integer array thus > ?? ?Public intPixel As New Integer[199, 1999] > where I know that 199 (Rows) and 1999 (columns) are sufficient for my > current needs. > > But is there some way to "REDIM" on the fly if establish more rows or > columns are needed? > The word you are looking for is "RESIZE" and that [1] tells you: (!) The array cannot be resized if it is multi-dimensional. [1] http://gambaswiki.org/wiki/comp/gb/array/resize -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From mckaygerhard at gmail.com Mon Nov 16 16:01:58 2020 From: mckaygerhard at gmail.com (PICCORO McKAY Lenz) Date: Mon, 16 Nov 2020 11:01:58 -0400 Subject: [Gambas-user] Exec just returns 0 lines when cat cannot read Message-ID: i have this code: rcfilepath = "/etc/authdaemonrc" If Not Exist(rcfilepath) Then Error "rc file not found " Quit Endif the following line returns no error if file cannot be read: Exec ["cat", rcfilepath] To sLine just offers 0 lines.. using gambas 3.10 and 3.12 .. this is normal? using "cat /path/file" returns error *is there's a way to check if execution was susessfull??* Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From mbelmonte at belmotek.net Mon Nov 16 20:34:28 2020 From: mbelmonte at belmotek.net (Martin) Date: Mon, 16 Nov 2020 20:34:28 +0100 Subject: [Gambas-user] Collections and 0 values. In-Reply-To: <20201116091050.GM171194@highrise.localdomain> References: <1d2a22c1-30fe-7ba3-69b8-c278bff1f504@belmotek.net> <20201116091050.GM171194@highrise.localdomain> Message-ID: Hi Tobias, Yes I actually use JSONCollection for that, my question was in a philosophical sense, just I want to know why is like this. Anyway, I will prepare a small sample project for fun. Regards. Mart?n. On 16/11/20 10:10, Tobias Boege wrote: > On Mon, 16 Nov 2020, Martin wrote: >> Hi, >> >> I'm using collecions to storage spatial data of some CAD entitites like >> lines, text, etc. one of the tags are the angle, in radians, then when if i >> want to storage non 0 values no problem, but when the angle is 0 the tag : >> value is not added. >> >> I have seen this behavior before in collections with null values and of >> course with 0 values, like the one I am trying to use now. >> The question is why is this defined like this? What sense does it make? >> Would it be possible to support 0 values by changing something in the >> configuration? >> If 0 is a valid value to start counting an array, why is it not valid to >> define a 0 value? >> Another related issue is settings, since it has the same behavior, what is >> the logic of this? the set of names of the variables that have value "" is >> lost. >> Thanks. >> > In Gambas, Null and the empty string are equivalent. Assigning Null to > a Collection key is the same as removing it. To emulate languages which > treat their analogues of "" and Null differently, you have to invent > your own sentinel Null value like it was done for JSON [1]. If you need > a Collection which stores Gambas Null values instead of taking this as > a cue to delete the key, you can use JSONCollection, despite its name. > > Null and the integer zero are not equivalent in Gambas and I doubt that > assigning coll[key] = 0 will delete key. Can you isolate the code you > have problems with into a very small test, which clearly shows what > you put it and what you expect to get out, without a great big project > and UI attached? > > Best, > Tobias > > [1] http://gambaswiki.org/wiki/comp/gb.web/json/null > From jussi.lahtinen at gmail.com Mon Nov 16 23:10:47 2020 From: jussi.lahtinen at gmail.com (Jussi Lahtinen) Date: Tue, 17 Nov 2020 00:10:47 +0200 Subject: [Gambas-user] Collections and 0 values. In-Reply-To: References: <1d2a22c1-30fe-7ba3-69b8-c278bff1f504@belmotek.net> <20201116091050.GM171194@highrise.localdomain> Message-ID: You can give null or 0 value for collection, just not null key. Just like you cannot give a null index for an array. All these are valid: Dim hCol As New Collection hCol.Add(0, "foo1") hCol.Add(Null, "foo2") hCol.Add(123, 0) ''The same as hCol.Add(123, "0") Jussi On Mon, Nov 16, 2020 at 9:35 PM Martin wrote: > Hi Tobias, > > Yes I actually use JSONCollection for that, my question was in a > philosophical sense, just I want to know why is like this. > > Anyway, I will prepare a small sample project for fun. > > Regards. > > Mart?n. > > On 16/11/20 10:10, Tobias Boege wrote: > > On Mon, 16 Nov 2020, Martin wrote: > >> Hi, > >> > >> I'm using collecions to storage spatial data of some CAD entitites like > >> lines, text, etc. one of the tags are the angle, in radians, then when > if i > >> want to storage non 0 values no problem, but when the angle is 0 the > tag : > >> value is not added. > >> > >> I have seen this behavior before in collections with null values and of > >> course with 0 values, like the one I am trying to use now. > >> The question is why is this defined like this? What sense does it make? > >> Would it be possible to support 0 values by changing something in the > >> configuration? > >> If 0 is a valid value to start counting an array, why is it not valid to > >> define a 0 value? > >> Another related issue is settings, since it has the same behavior, what > is > >> the logic of this? the set of names of the variables that have value "" > is > >> lost. > >> Thanks. > >> > > In Gambas, Null and the empty string are equivalent. Assigning Null to > > a Collection key is the same as removing it. To emulate languages which > > treat their analogues of "" and Null differently, you have to invent > > your own sentinel Null value like it was done for JSON [1]. If you need > > a Collection which stores Gambas Null values instead of taking this as > > a cue to delete the key, you can use JSONCollection, despite its name. > > > > Null and the integer zero are not equivalent in Gambas and I doubt that > > assigning coll[key] = 0 will delete key. Can you isolate the code you > > have problems with into a very small test, which clearly shows what > > you put it and what you expect to get out, without a great big project > > and UI attached? > > > > Best, > > Tobias > > > > [1] http://gambaswiki.org/wiki/comp/gb.web/json/null > > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From g4mba5 at gmail.com Tue Nov 17 00:34:39 2020 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Tue, 17 Nov 2020 00:34:39 +0100 Subject: [Gambas-user] Missing gb.qt5.webview code in package from ppa In-Reply-To: <667292868.10565.1605464420675.JavaMail.zimbra@westwoodsvcs.com> References: <518860356.10405.1605454279108.JavaMail.zimbra@westwoodsvcs.com> <1652329315.10563.1605460992802.JavaMail.zimbra@westwoodsvcs.com> <667292868.10565.1605464420675.JavaMail.zimbra@westwoodsvcs.com> Message-ID: <3ca90980-ee71-4796-93b4-4da6a081e91e@gmail.com> Le 15/11/2020 ? 19:20, Brian G a ?crit?: > Ubuntu 18.04. 3 LTS = mint 19.3 > Ubuntu 20.04 = mint 20 > have same issues on both versions > > Thank You > Brian G > I confirm the problem: the gb-qt5-webview packages are void! -- Beno?t Minisini From t.lee.davidson at gmail.com Tue Nov 17 01:11:50 2020 From: t.lee.davidson at gmail.com (T Lee Davidson) Date: Mon, 16 Nov 2020 19:11:50 -0500 Subject: [Gambas-user] Exec just returns 0 lines when cat cannot read In-Reply-To: References: Message-ID: <7ccafb59-9a37-fc73-87a4-eee4cd103de7@gmail.com> On 11/16/20 10:01 AM, PICCORO McKAY Lenz wrote: > i have this code: > > ?rcfilepath = ?"/etc/authdaemonrc" > ?If Not Exist(rcfilepath) Then > ? ? ? ? Error "rc file not found " > ? ? ? ? Quit > ?Endif > the following line returns no error if file cannot be read: > > ?Exec ["cat", rcfilepath] To sLine > > just offers 0 lines.. using gambas 3.10 and 3.12 .. this is normal? using "cat /path/file" returns error > > *is there's a way to check if execution was susessfull??* > > Lenz McKAY Gerardo (PICCORO) > http://qgqlochekone.blogspot.com > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > Is there a reason you need to use Exec? If not, try this: Shell "cat " & rcfilepath & " 2>&1" To sLine -- Lee From bsteers4 at gmail.com Tue Nov 17 05:53:58 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Tue, 17 Nov 2020 04:53:58 +0000 Subject: [Gambas-user] Control.Public , "has no existence at runtime" I beg to differ. Message-ID: Control.Public Property *Public* As Boolean If the control is public. *This property is virtual: it is only implemented in the IDE, and has no existence at runtime.* *--------------* That's the wiki info and the info i get in the IDE. Does not seem true though. What seems true is if i want the control to be visible to other classes/modules in my app then set this to True. *I have just had the experience..* *Was getting "FMain.TextArea1.Text Symbol does not exist error" in my module.* *So i set the TextArea1 Public flag to true but couldn't help notice the help text though.* The error's gone though. Seems not so virtual to me there I am , all implementing it outside the IDE and stuff. Finding it not only exists at runtime but matters how it's set too. Pedantic? i dunno. possibly. Was going to edit the wiki but couldn't find the page. BruceS -------------- next part -------------- An HTML attachment was scrubbed... URL: From gambas.fr at gmail.com Tue Nov 17 07:15:18 2020 From: gambas.fr at gmail.com (Fabien Bodard) Date: Tue, 17 Nov 2020 07:15:18 +0100 Subject: [Gambas-user] Missing gb.qt5.webview code in package from ppa In-Reply-To: <3ca90980-ee71-4796-93b4-4da6a081e91e@gmail.com> References: <518860356.10405.1605454279108.JavaMail.zimbra@westwoodsvcs.com> <1652329315.10563.1605460992802.JavaMail.zimbra@westwoodsvcs.com> <667292868.10565.1605464420675.JavaMail.zimbra@westwoodsvcs.com> <3ca90980-ee71-4796-93b4-4da6a081e91e@gmail.com> Message-ID: If I remember well the libqt5qtwebkit5 does not exist anymore Le mar. 17 nov. 2020 ? 00:35, Beno?t Minisini a ?crit : > Le 15/11/2020 ? 19:20, Brian G a ?crit : > > Ubuntu 18.04. 3 LTS = mint 19.3 > > Ubuntu 20.04 = mint 20 > > have same issues on both versions > > > > Thank You > > Brian G > > > > I confirm the problem: the gb-qt5-webview packages are void! > > -- > Beno?t Minisini > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gambas.fr at gmail.com Tue Nov 17 07:22:14 2020 From: gambas.fr at gmail.com (Fabien Bodard) Date: Tue, 17 Nov 2020 07:22:14 +0100 Subject: [Gambas-user] multi dimension integer array question In-Reply-To: <20201116184049.GP171194@highrise.localdomain> References: <498101fa-39a5-eb1f-587c-34303d775052@gmail.com> <20201116184049.GP171194@highrise.localdomain> Message-ID: You can use an integer[][] to achieve that Le lun. 16 nov. 2020 ? 19:44, Tobias Boege a ?crit : > On Mon, 16 Nov 2020, KKing wrote: > > I'm currently creating an integer array thus > > Public intPixel As New Integer[199, 1999] > > where I know that 199 (Rows) and 1999 (columns) are sufficient for my > > current needs. > > > > But is there some way to "REDIM" on the fly if establish more rows or > > columns are needed? > > > > The word you are looking for is "RESIZE" and that [1] tells you: > > (!) The array cannot be resized if it is multi-dimensional. > > [1] http://gambaswiki.org/wiki/comp/gb/array/resize > > -- > "There's an old saying: Don't change anything... ever!" -- Mr. Monk > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From karl.reinl at fen-net.de Tue Nov 17 09:47:10 2020 From: karl.reinl at fen-net.de (Karl Reinl) Date: Tue, 17 Nov 2020 09:47:10 +0100 Subject: [Gambas-user] Missing gb.qt5.webview code in package from ppa In-Reply-To: References: <518860356.10405.1605454279108.JavaMail.zimbra@westwoodsvcs.com> <1652329315.10563.1605460992802.JavaMail.zimbra@westwoodsvcs.com> <667292868.10565.1605464420675.JavaMail.zimbra@westwoodsvcs.com> <3ca90980-ee71-4796-93b4-4da6a081e91e@gmail.com> Message-ID: <17240cfae39d153240ccb52f43e0a14ef6dfb661.camel@fen-net.de> Am Dienstag, den 17.11.2020, 07:15 +0100 schrieb Fabien Bodard: > If I remember well the libqt5qtwebkit5 does not exist anymore > > Le mar. 17 nov. 2020 ? 00:35, Beno?t Minisini a > ?crit : > > Le 15/11/2020 ? 19:20, Brian G a ?crit : > > > > > Ubuntu 18.04. 3 LTS = mint 19.3 > > > > > Ubuntu 20.04 = mint 20 > > > > > have same issues on both versions > > > > > > > > > > Thank You > > > > > Brian G > > > > > > > > > > > > > I confirm the problem: the gb-qt5-webview packages are void! > > > > > > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]-- try qtwebengine5-dev and/or qtwebengine5-dev to compile on ubuntu -- Amicalement Charlie -------------- next part -------------- An HTML attachment was scrubbed... URL: From gambas.fr at gmail.com Tue Nov 17 09:58:50 2020 From: gambas.fr at gmail.com (Fabien Bodard) Date: Tue, 17 Nov 2020 09:58:50 +0100 Subject: [Gambas-user] Missing gb.qt5.webview code in package from ppa In-Reply-To: <17240cfae39d153240ccb52f43e0a14ef6dfb661.camel@fen-net.de> References: <518860356.10405.1605454279108.JavaMail.zimbra@westwoodsvcs.com> <1652329315.10563.1605460992802.JavaMail.zimbra@westwoodsvcs.com> <667292868.10565.1605464420675.JavaMail.zimbra@westwoodsvcs.com> <3ca90980-ee71-4796-93b4-4da6a081e91e@gmail.com> <17240cfae39d153240ccb52f43e0a14ef6dfb661.camel@fen-net.de> Message-ID: Le mar. 17 nov. 2020 ? 09:55, Karl Reinl a ?crit : > > ]-- > > > try qtwebengine5-dev and/or qtwebengine5-dev to compile on ubuntu > It have solved my own problem -- Fabien Bodard From g4mba5 at gmail.com Tue Nov 17 10:18:44 2020 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Tue, 17 Nov 2020 10:18:44 +0100 Subject: [Gambas-user] Missing gb.qt5.webview code in package from ppa In-Reply-To: <667292868.10565.1605464420675.JavaMail.zimbra@westwoodsvcs.com> References: <518860356.10405.1605454279108.JavaMail.zimbra@westwoodsvcs.com> <1652329315.10563.1605460992802.JavaMail.zimbra@westwoodsvcs.com> <667292868.10565.1605464420675.JavaMail.zimbra@westwoodsvcs.com> Message-ID: Le 15/11/2020 ? 19:20, Brian G a ?crit?: > Ubuntu 18.04. 3 LTS = mint 19.3 > Ubuntu 20.04 = mint 20 > have same issues on both versions > > Thank You > Brian G > Is it fixed now? -- Beno?t Minisini From kicking177 at gmail.com Tue Nov 17 13:47:12 2020 From: kicking177 at gmail.com (KKing) Date: Tue, 17 Nov 2020 12:47:12 +0000 Subject: [Gambas-user] Float hidden precision? Message-ID: Is it possible for a float variable to have unwanted hidden distortion in a held value? I have a conundrum buried in a lot of code but essentially I have two monetary values which originally arrive as strings in a csv file. I then convert these to float values for other processing but by debugging I have come across the following issue where essentially the value has been distorted. I've summarised the code below, and as a standalone test it works as expected but as part of much larger project I get the result below. The question is how can a float value in debugger show 429761 and when converted to integer ends up as 429760 ? This occurs in a number of times with a large amount of data being passed. If I step through the code I can see in one instance the example below. So when a float is displayed in the debugger as 4297.61 is it possible Gambas really believes it is 4297.609 (even though the string was definitely "4297.61") and when 429761 is seen that actually it is being held has? 429760.9 and when the CInt() is done it's truncating to 4297.60 and 429760 respectively? I had fun with this back QB4 and powerbasic days and ended up writing a whole load of routines to handle monetary values as integers and converting to and from strings by my own routines. NB I've only added the * 100 and integers once I suddenly had Gambas seemingly telling me that 4297.61 did not equal 4297.61 Dim monValue1 As Float Dim monValue2 As Float Dim strValue1 as string Dim strValue2 as string strValue1 = "4297.61" strValue2 = "4297.61" monValue1 = CFloat(strValue1) monValue2 = CFloat(strValue2) Process(ByRef monValue1 , ByRef monValue2 ) ?- - - - - Public Sub Process(ByRef monValue1 as Float, ByRef monValue2 as Float) Dim monValue1_Adj As Float Dim monValue2_Adj2 As Float Dim intValue1_Adj As Integer Dim intValue2_Adj2 As Integer ' value seen in debugger monValue1 = 4297.61 ' value seen in debugger monValue2 = 4297.61 monValue1_Adj = monValue1 * 100 ? ? ? ? ' value seen in debugger 429761 monValue2_Adj = monValue2 * 100???????? ' value seen in debugger 429761 intValue1_Adj = CInt(monValue1_Adj)????? ' value seen in debugger 429760 intValue2_Adj = CInt(monValue2_Adj)?? ?? ' value seen in debugger 429761 End From g4mba5 at gmail.com Tue Nov 17 14:06:02 2020 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Tue, 17 Nov 2020 14:06:02 +0100 Subject: [Gambas-user] Float hidden precision? In-Reply-To: References: Message-ID: <8e79618c-844f-899a-451e-7798e102af1e@gmail.com> Le 17/11/2020 ? 13:47, KKing a ?crit?: > Is it possible for a float variable to have unwanted hidden distortion > in a held value? > > I have a conundrum buried in a lot of code but essentially I have two > monetary values which originally arrive as strings in a csv file. > > I then convert these to float values for other processing but by > debugging I have come across the following issue where essentially the > value has been distorted. > > I've summarised the code below, and as a standalone test it works as > expected but as part of much larger project I get the result below. > > The question is how can a float value in debugger show 429761 and when > converted to integer ends up as 429760 ? > Never use floating point for storing currencies. Always use integers. Floating point is binary, and a number with a finite number of decimal digits in base 10 often has an infinite number of decimal digits in binary, and so you have rounding error by converting between the two bases. -- Beno?t Minisini From bsteers4 at gmail.com Tue Nov 17 19:03:18 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Tue, 17 Nov 2020 18:03:18 +0000 Subject: [Gambas-user] Gambas scripting, Type mismatch error. Message-ID: Is this a bug in the scripter or bad coding technique on my part?... getting a type mismatch error if i do not wrap variables in parentheses? doesn't happen like this in normal gambas exe. If I use code like the following in a gbs script... Dim iVal As Integer = 1 Print iVal ' This prints '1' Print iVal + 1 ' this prints '2' Print "Val = " & iVal ' this prints 'Val = 1' Print "Val = " & iVal + 1 ' This gives the following error.. ' MMain.?.0: #6: Type mismatch: wanted Float, got String instead Print "Val = " & (iVal + 1) ' this works and prints 'i = 2' Cheers BruceS -------------- next part -------------- An HTML attachment was scrubbed... URL: From vuott at tiscali.it Tue Nov 17 20:23:51 2020 From: vuott at tiscali.it (vuott at tiscali.it) Date: Tue, 17 Nov 2020 20:23:51 +0100 Subject: [Gambas-user] Gambas scripting, Type mismatch error. In-Reply-To: References: Message-ID: I suggest: http://gambaswiki.org/wiki/cat/evalorder Il 17.11.2020 19:03 Bruce Steers ha scritto: > Is this a bug in the scripter or bad coding technique on my part?... > getting a type mismatch error if i do not wrap variables in > parentheses? > > doesnt happen like this in normal gambas exe. > > If I use code like the following in a gbs script... > > Dim iVal As Integer = 1 > > Print iVal? This prints 1 > > Print iVal + 1 this prints 2 > > Print "Val = " & iVal? this prints Val = 1 > > Print "Val = " & iVal + 1 > > This gives the following error.. > > MMain.?.0: #6: Type mismatch: wanted Float, got String instead > > Print "Val = " & (iVal + 1)? this works and prints i = 2 > > Cheers > BruceS From bsteers4 at gmail.com Tue Nov 17 21:15:46 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Tue, 17 Nov 2020 20:15:46 +0000 Subject: [Gambas-user] Gambas scripting, Type mismatch error. In-Reply-To: References: Message-ID: Thanks. the documentation for gbs3 scripting is hard to find. Would it be right to assume then when scripting every command is passed like an Eval command? Bruce On Tue, 17 Nov 2020 at 19:24, wrote: > I suggest: > http://gambaswiki.org/wiki/cat/evalorder > > > Il 17.11.2020 19:03 Bruce Steers ha scritto: > > Is this a bug in the scripter or bad coding technique on my part?... > > getting a type mismatch error if i do not wrap variables in > > parentheses? > > > > doesnt happen like this in normal gambas exe. > > > > If I use code like the following in a gbs script... > > > > Dim iVal As Integer = 1 > > > > Print iVal This prints 1 > > > > Print iVal + 1 this prints 2 > > > > Print "Val = " & iVal this prints Val = 1 > > > > Print "Val = " & iVal + 1 > > > > This gives the following error.. > > > > MMain.?.0: #6: Type mismatch: wanted Float, got String instead > > > > Print "Val = " & (iVal + 1) this works and prints i = 2 > > > > Cheers > > BruceS > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Tue Nov 17 21:22:22 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Tue, 17 Nov 2020 20:22:22 +0000 Subject: [Gambas-user] Gambas scripting, Type mismatch error. In-Reply-To: References: Message-ID: My appologies and thanks again. Not sure why i thought that kind of code worked in normal gambas but not with scripting. I just tested it and found it errors in all cases. My bad coding then lol. thanks for the link Vuott Bruce On Tue, 17 Nov 2020 at 20:15, Bruce Steers wrote: > Thanks. > the documentation for gbs3 scripting is hard to find. > > Would it be right to assume then when scripting every command is passed > like an Eval command? > > Bruce > > > On Tue, 17 Nov 2020 at 19:24, wrote: > >> I suggest: >> http://gambaswiki.org/wiki/cat/evalorder >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From jussi.lahtinen at gmail.com Tue Nov 17 22:20:05 2020 From: jussi.lahtinen at gmail.com (Jussi Lahtinen) Date: Tue, 17 Nov 2020 23:20:05 +0200 Subject: [Gambas-user] Float hidden precision? In-Reply-To: References: Message-ID: Floating points are always approximations to decimals in all languages, because of how computers work. Dim num1 As Single = 4.2 Dim num2 As Single = 4.3 Print num2 - num1 ''0.1000004 Use integers like Benoit suggested or if speed isn't critical use Strings and do the calculations with bc. Excellent wiki article for further information: https://en.wikipedia.org/wiki/Floating-point_arithmetic Jussi On Tue, Nov 17, 2020 at 2:48 PM KKing wrote: > Is it possible for a float variable to have unwanted hidden distortion > in a held value? > > I have a conundrum buried in a lot of code but essentially I have two > monetary values which originally arrive as strings in a csv file. > > I then convert these to float values for other processing but by > debugging I have come across the following issue where essentially the > value has been distorted. > > I've summarised the code below, and as a standalone test it works as > expected but as part of much larger project I get the result below. > > The question is how can a float value in debugger show 429761 and when > converted to integer ends up as 429760 ? > > This occurs in a number of times with a large amount of data being > passed. If I step through the code I can see in one instance the example > below. > > So when a float is displayed in the debugger as 4297.61 is it possible > Gambas really believes it is 4297.609 (even though the string was > definitely "4297.61") > and when 429761 is seen that actually it is being held has 429760.9 and > when the CInt() is done it's truncating to 4297.60 and 429760 respectively? > > I had fun with this back QB4 and powerbasic days and ended up writing a > whole load of routines to handle monetary values as integers and > converting to and from strings by my own routines. > > NB I've only added the * 100 and integers once I suddenly had Gambas > seemingly telling me that 4297.61 did not equal 4297.61 > > > Dim monValue1 As Float > Dim monValue2 As Float > > Dim strValue1 as string > Dim strValue2 as string > > strValue1 = "4297.61" > strValue2 = "4297.61" > > monValue1 = CFloat(strValue1) > monValue2 = CFloat(strValue2) > > Process(ByRef monValue1 , ByRef monValue2 ) > > - - - - - > > Public Sub Process(ByRef monValue1 as Float, ByRef monValue2 as Float) > > Dim monValue1_Adj As Float > Dim monValue2_Adj2 As Float > > Dim intValue1_Adj As Integer > Dim intValue2_Adj2 As Integer > > ' value seen in debugger monValue1 = 4297.61 > ' value seen in debugger monValue2 = 4297.61 > > monValue1_Adj = monValue1 * 100 ' value seen in debugger 429761 > monValue2_Adj = monValue2 * 100 ' value seen in debugger 429761 > > intValue1_Adj = CInt(monValue1_Adj) ' value seen in debugger 429760 > intValue2_Adj = CInt(monValue2_Adj) ' value seen in debugger 429761 > > End > > > > > > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jose.rodriguez at cenpalab.cu Tue Nov 17 22:30:41 2020 From: jose.rodriguez at cenpalab.cu (jose.rodriguez at cenpalab.cu) Date: Tue, 17 Nov 2020 21:30:41 +0000 Subject: [Gambas-user] Float hidden precision? In-Reply-To: References: Message-ID: November 17, 2020 4:19 PM, "Jussi Lahtinen" )> wrote: Use integers like Benoit suggested or if speed isn't critical use Strings and do the calculations with bc. Hmm... I just realized there is no currency datatype in Gambas. Or maybe I knew it back when I was actively programming in Gambas2 and then forgot? Regards, Joe1962 -------------- next part -------------- An HTML attachment was scrubbed... URL: From rwe-sse at osnanet.de Wed Nov 18 08:25:55 2020 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Wed, 18 Nov 2020 08:25:55 +0100 Subject: [Gambas-user] Float hidden precision? In-Reply-To: References: Message-ID: <7b17d591-f47e-11cc-ab6b-b52e51a66ccc@osnanet.de> Am 17.11.20 um 13:47 schrieb KKing: > Is it possible for a float variable to have unwanted hidden distortion > in a held value? > > I have a conundrum buried in a lot of code but essentially I have two > monetary values which originally arrive as strings in a csv file. > > I then convert these to float values for other processing but by > debugging I have come across the following issue where essentially the > value has been distorted. > A similar problem came up for me some years ago. As the others proposed, I convert these strings into integers, using cent values only. You could even use tenth of cents to meet commercial standards. You can write yourself some handy functions that do the conversion into integer and from cents back to currency strings the way you need it for your locale. Another way might be Format - but I never needed to dive into that one, so I know little about it. Regards Rolf From brian at westwoodsvcs.com Wed Nov 18 11:55:54 2020 From: brian at westwoodsvcs.com (=?UTF-8?B?QnJpYW4gRw==?=) Date: Wed, 18 Nov 2020 13:55:54 +0300 Subject: [Gambas-user] =?utf-8?q?Gambas_scripting=2C_Type_mismatch_error?= =?utf-8?q?=2E?= In-Reply-To: References: Message-ID: <1605696954.142887587@f37.my.com> No the entire script is turned into a project and compiled and executed -- Thanks Brian Tuesday, 17 November 2020, 00:16PM -08:00 from Bruce Steers bsteers4 at gmail.com : >Thanks. >the documentation for gbs3 scripting is hard to find. > >Would it be right to assume then when scripting every command is passed like an Eval command? > >Bruce > > >On Tue, 17 Nov 2020 at 19:24, < vuott at tiscali.it> wrote: >>I suggest: >>? ? http://gambaswiki.org/wiki/cat/evalorder >> >> >>Il 17.11.2020 19:03 Bruce Steers ha scritto: > Is this a bug in the scripter or bad coding technique on my part?... > getting a type mismatch error if i do not wrap variables in > parentheses? > > doesnt happen like this in normal gambas exe. > > If I use code like the following in a gbs script... > > Dim iVal As Integer = 1 > > Print iVal?? This prints 1 > > Print iVal + 1? this prints 2 > > Print "Val = " & iVal?? this prints Val = 1 > > Print "Val = " & iVal + 1 > > ? This gives the following error.. > > ? MMain.?.0: #6: Type mismatch: wanted Float, got String instead > > Print "Val = " & (iVal + 1)?? this works and prints i = 2 > > Cheers > BruceS >> >> >>----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > >----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From brian at westwoodsvcs.com Wed Nov 18 16:40:01 2020 From: brian at westwoodsvcs.com (Brian G) Date: Wed, 18 Nov 2020 07:40:01 -0800 (PST) Subject: [Gambas-user] Starting Daily ppa version using QT5 Message-ID: <124425783.11196.1605714001937.JavaMail.zimbra@westwoodsvcs.com> Hi, Yes the Daily build from the Team ppa now works correctly using GB_GUI=gb.qt5 from the command line It does produce this output: brian at brian-GTR-PRO:~$ export GB_GUI=gb.qt5 brian at brian-GTR-PRO:~$ gambas3 qt5ct: using qt5ct plugin qt5ct: D-Bus global menu: no Thanks Beno?t Thank You Brian G P.S. the Gambas website seems to be down from here! -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Wed Nov 18 20:55:10 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Wed, 18 Nov 2020 19:55:10 +0000 Subject: [Gambas-user] shell highlighting on non beta gambas Message-ID: How do you like these apples? I have edited and re-compiled 3 gambas controls on 3 gambas versions to enable shell highlights on older gambas because they're pretty unlikely to be updated by the busy dev team on 3.15.90.. gb.eval.highlight gb.form.editor gb.form.terminal. TerminalView is recompiled from the latest version and has all the latest official bug-fixes from 3.15.90 (like 'clear' not giving errors) The other 2 enable shell highlighting for TextEditor. I've recompiled on Gambas 3.12.2 / 3.14.3 and 3.15.2-stable Goto here... https://gitlab.com/bsteers4/gambas3-shell-highlighting Select the branch relevant to your version and clone the whole dir. (the whole gambas source files were not really needed but i thought to include them in case anyone wanted to do further modifications/bug-fixes) Repository contains a bash installer to copy the .gambas components to /usr/lib/gambas3/ or do it yourself. init. if you find it's not working the install can be quickly restored by typing something like.. sudo apt reinstall gambas3-gb-eval-highlight gambas3-gb-form-editor gambas3-gb-form-terminal I've only done this to get my script editor working better on older gambas. All the best. Bruce # if you want something done , do it yourself. -------------- next part -------------- An HTML attachment was scrubbed... URL: From g4mba5 at gmail.com Wed Nov 18 21:00:14 2020 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Wed, 18 Nov 2020 21:00:14 +0100 Subject: [Gambas-user] shell highlighting on non beta gambas In-Reply-To: References: Message-ID: Le 18/11/2020 ? 20:55, Bruce Steers a ?crit?: > How do you like these apples? > > I have edited and re-compiled 3 gambas controls on 3 gambas versions to > enable shell highlights on older gambas because they're pretty unlikely > to be updated by the busy dev team on 3.15.90.. You usually don't add new features to older versions of a software. Otherwise version means nothing. -- Beno?t Minisini From bsteers4 at gmail.com Thu Nov 19 00:38:21 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Wed, 18 Nov 2020 23:38:21 +0000 Subject: [Gambas-user] shell highlighting on non beta gambas In-Reply-To: References: Message-ID: haha fair point. :) And I fully understand my friend but I think you overestimate the public's ability or desire to get the latest beta on their systems. I don't. Even the stable version, for a lot if it's not in Synaptic it won't get installed. I'm thinking of the user not the programmer here. I think most with an ability to get into gambas programming will also have the ability to upgrade. But we are not taking into account the average idiot ;) That's always been my angle, i want to make programs everyone can use so i have to make them all compatible with at least 3.12 as that's what ships out of Debian. and still just 3.14 on Mint. and stable 3.12 to be brutally honest , is not that stable at all. I think many , like me, will install it, find a bunch of broken things, and go straight back to 3.14. (if they cannot or do not want to do all the compiling) for all those who are on their default repo versions I've made a quick fix (me and my tricks eh ;) ) I have found as a programmer it's a bit awkward using 3.15.90 , mostly because i will write code that only works on the beta. I did it yesterday lol , i added a nice web viewer to my editor to preview markdown files. it worked luuurvley , then I suddenly realised (after uploading it) the beta gambas is the only darn thing it will work with now as gb.gui.webview is new. So i had to re-edit it and make another version and remove the update. So that's my pickle me old pickle. I wish to remain compatible with the versions that are still very much out there, being used but not being updated/bugfixed I mean lets face it.. Gambas 3.12.2 on Debian. that's only 2 revisions and done, move on to a whole new version and leave Debian in the dark. I don't know when Debian is going to update and use a newer gambas but it's odd because a lot of other software on debian updates all the time. But not Gambas , 3.12 got stopped revising at revision 2 and that's that. I know you don't have time to mess about with old versions but i do. so I'm making a revision addition not a version change :) and like i said, I just want people to be able to use my editor without having to get into all the complicated upgrading to the beta. I think it's one of those things I could either hassle you about , or , just do something about it myself :) Bruce On Wed, 18 Nov 2020 at 20:01, Beno?t Minisini wrote: > Le 18/11/2020 ? 20:55, Bruce Steers a ?crit : > > How do you like these apples? > > > > I have edited and re-compiled 3 gambas controls on 3 gambas versions to > > enable shell highlights on older gambas because they're pretty unlikely > > to be updated by the busy dev team on 3.15.90.. > > You usually don't add new features to older versions of a software. > Otherwise version means nothing. > > -- > Beno?t Minisini > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jussi.lahtinen at gmail.com Thu Nov 19 00:38:46 2020 From: jussi.lahtinen at gmail.com (Jussi Lahtinen) Date: Thu, 19 Nov 2020 01:38:46 +0200 Subject: [Gambas-user] Compiling latest Gambas Message-ID: I always get this: || Unable to met pkg-config requirement: Qt5WebEngineWidgets || gb.qt5.webview is disabled I have libqt5webenginewidgets5 installed, but I can't find -dev for it. What I need to install? Or is this problem with configuration? I'm using Linux Mint 20. Jussi -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: compile.log.zip Type: application/zip Size: 11582 bytes Desc: not available URL: From jussi.lahtinen at gmail.com Thu Nov 19 00:52:58 2020 From: jussi.lahtinen at gmail.com (Jussi Lahtinen) Date: Thu, 19 Nov 2020 01:52:58 +0200 Subject: [Gambas-user] Compiling latest Gambas In-Reply-To: References: Message-ID: I did find qtwebengine5-dev, I think the problem is solved. Jussi On Thu, Nov 19, 2020 at 1:38 AM Jussi Lahtinen wrote: > I always get this: > || Unable to met pkg-config requirement: Qt5WebEngineWidgets > || gb.qt5.webview is disabled > > I have libqt5webenginewidgets5 installed, but I can't find -dev for it. > What I need to install? Or is this problem with configuration? > I'm using Linux Mint 20. > > > Jussi > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Thu Nov 19 00:53:44 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Wed, 18 Nov 2020 23:53:44 +0000 Subject: [Gambas-user] Compiling latest Gambas In-Reply-To: References: Message-ID: did you check the dependencies from the .gitlab-ci.yml file? https://gitlab.com/gambas/gambas/-/blob/master/.gitlab-ci.yml List for ubuntu-latest is currently.. apt-get install -y build-essential g++ automake autoconf libtool libbz2-dev libmysqlclient-dev unixodbc-dev libpq-dev postgresql-server-dev-12 libsqlite0-dev libsqlite3-dev libglib2.0-dev libgtk2.0-dev libcurl4-gnutls-dev libgtkglext1-dev libpcre3-dev libsdl-sound1.2-dev libsdl-mixer1.2-dev libsdl-image1.2-dev libxml2-dev libxslt1-dev librsvg2-dev libpoppler-dev libpoppler-glib-dev libpoppler-private-dev libasound2-dev libdirectfb-dev libxtst-dev libffi-dev libglew-dev libimlib2-dev libv4l-dev libsdl-ttf2.0-dev libgdk-pixbuf2.0-dev linux-libc-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libcairo2-dev libgsl-dev libncurses5-dev libgmime-2.6-dev llvm-dev llvm libalure-dev libgmp-dev libgtk-3-dev libsdl2-dev libsdl2-mixer-dev libsdl2-ttf-dev libsdl2-image-dev sane-utils libdumb1-dev libssl-dev libqt5opengl5-dev libqt5svg5-dev libqt5webkit5-dev libqt5x11extras5-dev qtbase5-dev qtwebengine5-dev libwebkit2gtk-4.0-dev git See if anything else installs from that list (there were recent changes) BruceS -------------- next part -------------- An HTML attachment was scrubbed... URL: From jussi.lahtinen at gmail.com Thu Nov 19 01:05:56 2020 From: jussi.lahtinen at gmail.com (Jussi Lahtinen) Date: Thu, 19 Nov 2020 02:05:56 +0200 Subject: [Gambas-user] Compiling latest Gambas In-Reply-To: References: Message-ID: Thanks, I'll keep that in mind next time. Jussi On Thu, Nov 19, 2020 at 1:58 AM Bruce Steers wrote: > did you check the dependencies from the .gitlab-ci.yml file? > https://gitlab.com/gambas/gambas/-/blob/master/.gitlab-ci.yml > > List for ubuntu-latest is currently.. > > apt-get install -y build-essential g++ automake autoconf libtool libbz2-dev libmysqlclient-dev unixodbc-dev libpq-dev postgresql-server-dev-12 libsqlite0-dev libsqlite3-dev libglib2.0-dev libgtk2.0-dev libcurl4-gnutls-dev libgtkglext1-dev libpcre3-dev libsdl-sound1.2-dev libsdl-mixer1.2-dev libsdl-image1.2-dev libxml2-dev libxslt1-dev librsvg2-dev libpoppler-dev libpoppler-glib-dev libpoppler-private-dev libasound2-dev libdirectfb-dev libxtst-dev libffi-dev libglew-dev libimlib2-dev libv4l-dev libsdl-ttf2.0-dev libgdk-pixbuf2.0-dev linux-libc-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libcairo2-dev libgsl-dev libncurses5-dev libgmime-2.6-dev llvm-dev llvm libalure-dev libgmp-dev libgtk-3-dev libsdl2-dev libsdl2-mixer-dev libsdl2-ttf-dev libsdl2-image-dev sane-utils libdumb1-dev libssl-dev libqt5opengl5-dev libqt5svg5-dev libqt5webkit5-dev libqt5x11extras5-dev qtbase5-dev qtwebengine5-dev libwebkit2gtk-4.0-dev git > > > See if anything else installs from that list (there were recent changes) > BruceS > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From adamnt42 at gmail.com Thu Nov 19 01:44:57 2020 From: adamnt42 at gmail.com (Bruce) Date: Thu, 19 Nov 2020 11:14:57 +1030 Subject: [Gambas-user] shell highlighting on non beta gambas In-Reply-To: References: Message-ID: On 19/11/20 10:08 am, Bruce Steers wrote: > haha fair point. > And I fully understand my friend but I think you overestimate the public's > ability or desire to get the latest beta on their systems. I don't. > Even the stable version, for a lot if it's not in Synaptic it won't get > installed. > I'm thinking of the user not the programmer here. I think most with an > ability to get into gambas programming will also have the ability to > upgrade. But we are not taking into account the average idiot > (That is as far as I read.) Bruce, As a developer and a user I do not, repeat DO NOT, want new features backported into gambas stable versiuons ever, repeat EVER! Critical emergency bug fixes maybe, but fully under BM's control and very largely highlighted if it were ever needed. IMHO Your whole concept of backporting Gambas is ludicrous. very few linux applications need to support multiple versions with backporting. In fact the only one I can think of is postgresql. Maybe the kernel development group should backport eveerything from 5.9.4 to 1.0.0 just because someone might need it. You have the means to backport Gambas if that is what you personally desire. As you said "do it youself". regards bruce (the small b one for people who might think this is self addressed). From adamnt42 at gmail.com Thu Nov 19 02:01:17 2020 From: adamnt42 at gmail.com (Bruce) Date: Thu, 19 Nov 2020 11:31:17 +1030 Subject: [Gambas-user] Compiling latest Gambas In-Reply-To: References: Message-ID: <33233b73-d912-7791-a408-456f4e889866@gmail.com> On 19/11/20 10:22 am, Jussi Lahtinen wrote: > I did find qtwebengine5-dev, I think the problem is solved. > > Jussi > > On Thu, Nov 19, 2020 at 1:38 AM Jussi Lahtinen > wrote: > >> I always get this: >> || Unable to met pkg-config requirement: Qt5WebEngineWidgets >> || gb.qt5.webview is disabled >> >> I have libqt5webenginewidgets5 installed, but I can't find -dev for it. >> What I need to install? Or is this problem with configuration? >> I'm using Linux Mint 20. >> >> >> Jussi >> Yes, I have seen a few distros that are using these strage hyphenated package names. I think it is just another trick to make it hard for us. When I am faced with that situation, i.e. a missing pkg-config file or a missing library file, when compiling something from source, I usually revert to using http://rpm.pbone.net/ regards bruce From bsteers4 at gmail.com Thu Nov 19 02:58:37 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Thu, 19 Nov 2020 01:58:37 +0000 Subject: [Gambas-user] shell highlighting on non beta gambas In-Reply-To: References: Message-ID: > And I fully understand my friend but I think you overestimate the > public's > > ability or desire to get the latest beta on their systems. I don't. > > Even the stable version, for a lot if it's not in Synaptic it won't get > > installed. > > I'm thinking of the user not the programmer here. I think most with an > > ability to get into gambas programming will also have the ability to > > upgrade. But we are not taking into account the average idiot > > > (That is as far as I read.) > Yeah this list for some isn't really the place for a conversation is it. brief bug/help (providing i've searched all i can through old info form previous versions) Duly noted Bruce. Bruce, > > As a developer and a user I do not, repeat DO NOT, want new features > backported into gambas stable versiuons ever, repeat EVER! > stable? > > Critical emergency bug fixes maybe, but fully under BM's control and > very largely highlighted if it were ever needed. > BM's clearly got his hands full at the forefront of the latest. > IMHO Your whole concept of backporting Gambas is ludicrous. very few > linux applications need to support multiple versions with backporting. > In fact the only one I can think of is postgresql. Maybe the kernel > development group should backport eveerything from 5.9.4 to 1.0.0 just > because someone might need it. > You are not thinking of others using your software though. You just use your own gambas to do your own thing. And it was you who said "gambas should not be a single user application" or words to that effect. To make software for others to use also you then have to think of compatibility issues they may face. for every piece of software, running on all (or at least the most popular) operating systems. When i get a visual basic app on windows it works. runtimes are installed to handle the apps, not just the latest hard to install version. the later newer apps involve a simple download and install of the vb runtime installer. Simples. Much simpler than Gambas. A developer and user like yourself can easily handle upgrading gambas. Your average monkey can't though. And you wonder why gambas does not go beyond a single programmer environment type of thing? You have the means to backport Gambas if that is what you personally > desire. As you said "do it youself". > Er, that's exactly what i just did do. maybe you should have read the rest of the email before drawing all your conclusions? just a couple of features. shell highlighting for example because i'm probably not going to suck up to anyone enough to get it added to the so called stable version innit. like it's my loss lol. ;) It matters not as i've provided a solution now for all regardless of how ludicrous you may think it is :) some people might just call it a "patch" the only issue is going to be with the 3.15.2 as i just noticed it hit 3.15.3 so i'll have to ensure my updates stay updated but meh , we'll probably hit 3.16 before long ;) :p but for now i can remove the updated terminal view as 3.15 caught up. Hope I'm not boring you with my personal predicaments / opinions / explanations / disapproval ? But you felt the need to tell me yours so here we are. Thanks for the , er , rebuff , anyway. BruceS (A very different Bruce, an old English bugger) -------------- next part -------------- An HTML attachment was scrubbed... URL: From kicking177 at gmail.com Thu Nov 19 09:24:04 2020 From: kicking177 at gmail.com (KKing) Date: Thu, 19 Nov 2020 08:24:04 +0000 Subject: [Gambas-user] shell highlighting on non beta gambas Message-ID: > A developer and user like yourself can easily handle upgrading gambas. > Your average monkey can't though. And you wonder why gambas does not go > beyond a single programmer environment type of thing? Or those and larger companies tend to do this, who will not install anything that is not available from their selected distro's repos. There is of course two sides (at least) to this. You need to have (as) stable (as possible) releases available in all major distro repos preferably all of the same version. But Gambas (thankfully) is constantly under development and improvement which means as "we" developers find new things we want to do (or things we used to do in other dialects) leads to more fixes and or additions (in some cases). Now there is one strand of thinking that fixes should go into the last (single declared) stable version. Part of the issue may be that is not a clear stable and separate development version(s) of Gambas? With Gambas improving (and evolving) so much so quickly and without cloning Benoit it may be difficult to achieve this. K. From chrisml at deganius.de Thu Nov 19 10:17:16 2020 From: chrisml at deganius.de (Christof Thalhofer) Date: Thu, 19 Nov 2020 10:17:16 +0100 Subject: [Gambas-user] shell highlighting on non beta gambas In-Reply-To: References: Message-ID: <8c462b4d-3ae0-32c8-5e89-ffa3cd1f4106@deganius.de> Am 19.11.20 um 02:58 schrieb Bruce Steers: > Yeah this list for some isn't really the place for a conversation is it. This list is for conversation for all about Gambas. That Gambas we all agree on. But you might want to admit that the people here are not willing to add new features to old versions of Gambas. I am also one of them. You found a bug, good! And it was fixed in the current dev version of Gambas. Great! But you will have to live with the fact that the fix will not be released in any stable version until the next stable version of Gambas is available. Everyone here does. I was also hit by bugs and had to wait. Because there are numerous bugs found in stable versions these bugs must be seen as features. If we do not see it that way, we will all go to hell! Others have been in that hell earlier, found this approach as a solution and therefor we all in the current world of software development agree in that: https://en.wikipedia.org/wiki/Software_release_life_cycle#Stable_release For the stability of your program you can write a small piece of code that warns a user if hit by the bug of the older Gambas version. Or you can disable a feature. For that you can use 'Application.Version'. But if you lead users of your software to install* the latest dev version of Gambas, you might put them at risk because dev versions are not stable and may contain far worse bugs! And if you fork Gambas and change old stable versions, you will probably not find anyone in this list who wants to talk to you about that, because this would no be the Gambas we all agree on. Alles Gute Christof Thalhofer * https://gitlab.com/bsteers4/scripted -- Dies ist keine Signatur -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From d4t4full at gmail.com Thu Nov 19 11:59:54 2020 From: d4t4full at gmail.com (ML) Date: Thu, 19 Nov 2020 07:59:54 -0300 Subject: [Gambas-user] Gambas scripting, Type mismatch error. In-Reply-To: References: Message-ID: <205edc72-573c-c0d8-c87e-358fdd40e247@gmail.com> *On 17/11/20 15:03, Bruce Steers wrote:* > Is this a bug in the scripter or bad coding technique on my part?... > getting a type mismatch error if i do not wrap variables in parentheses? > doesn't happen like this in normal gambas exe. > If I use code like the following in a gbs script... > Dim iVal As Integer = 1 > Print iVal? ' This prints '1' > Print iVal + 1 ' this prints '2' > Print "Val = " & iVal? ' this prints 'Val = 1' > Print "Val = " & iVal + 1 > ' This gives the following error.. > ' MMain.?.0: #6: Type mismatch: wanted Float, got String instead > Print "Val = " & (iVal + 1)? ' this works and prints 'i = 2' > Cheers > BruceS BruceS, I guess the problem is ambiguity between the numeric addition / string concatenation "+" operator and the numeric parameters supplied. The "&" expects and returns strings, the "+" expects and returns either numbers or strings. So you seem to have a string/number salad in Print "Val = " & iVal + 1 I guess the interpreter sees the "&" and "+" as having the same priority, so it works left to right: There's a string ("Val = "), then concatenate a number-coerced-to -string (iVal), and then, to that result (a string), ADD a number... That's not possible: TYPE MISMATCH. When the parenthesis are inserted, they give the "+" numeric operator priority over the "&" string operator and the numeric result is coerced to string: It works. I like clarity (sometimes too much, I confess); I would have used Print "Val = " & CStr(iVal + 1) And that should not fail. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Thu Nov 19 13:21:13 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Thu, 19 Nov 2020 12:21:13 +0000 Subject: [Gambas-user] shell highlighting on non beta gambas In-Reply-To: <8c462b4d-3ae0-32c8-5e89-ffa3cd1f4106@deganius.de> References: <8c462b4d-3ae0-32c8-5e89-ffa3cd1f4106@deganius.de> Message-ID: Personally i don't get it. where gambas is so "modular" based in essence with many components just being gambas apps in the /usr/lib/gambas3 folder it seems an obvious and harmless solution to me. It's like one of my apps , written on gambas 3.15 but PCODE variable set as no modern bytecode to conflict. I run this app on a lesser gambas and it works just fine, for anyone. But in this case with my adjustments i have used the version of gambas i intended the patches to be on so no PCODE needed. So i edited the TextEditor by making a harmless addition to eval.highlight.gambas and form.editor.gambas, using gambas too not getting into the C code compilation and seriously messing things around. The terminalview re-compilation was about addressing a bug (mostly the error when using the "clear" command) The texteditor change wasn't about a bug more about enabling more highlight features for others. (well apart from highlight_gambas rewriting code, re-compilation has included that fix too as i consider that dangerous) and yes i could (and have) written code in my app to warn others of that bug but even better, there's 2 better components i've compiled that fix the problem so nobody else falls over at that hurdle like i did and have to spend half a day fixing a bash script. I also added the ability to have quotes wrap text like braces do if you press the Alt key. A feature i've spoken to Ben about and he does not want it added the way i added it, and to be clear all i added was "And If Key.Alt" to commented existing code that used to do it without the alt key being pressed. I believe Ben didn't want it that way as he wants to rewrite the code on a deeper level , this i fully understand but the question is when ? and i have no desire to be pushy to try to get him to do it. and now no need, i can do it this way for now. then if and when the code gets re-written i can adapt. I sort of get it, if it were a race all you folks would be at the front getting all the cheers. i'm at the back helping those struggling, getting cheers of a different kind and jeers from others, meh so be it., we all have our different roles to play. we can't all be winners ;) I don't really see the problem, especially this way i've done it. before i forked a whole gambas branch and edited the controls for a whole compile and make install. but realised what i'm doing here is to help those who cannot or will not compile the whole thing so not addressing the problem. So, a slightly adjusted compile (or re-make) of 2 components for versions of gambas that will never be updated/changed and make the patched components a problem. I'm finding the patches to work brilliantly on lesser gambas's, now i got shell highlighting and no worries of gambas highlight mode rewriting code for me, and not terminalview error messages, wohoo :) how can this be bad? But if you lead users of your software to install* the latest dev > version of Gambas, you might put them at risk because dev versions are > not stable and may contain far worse bugs! > > And if you fork Gambas and change old stable versions, you will probably > not find anyone in this list who wants to talk to you about that, > because this would no be the Gambas we all agree on. > yes i realised forking a whole gambas and changing it's version number was a bit cheeky but at the time was the only solution i saw for my issues. I thought the versionchange was important in case anyone reports a bug, you could easily tell it was not an official version that way. Now though i've seen a different route of just recompiling a couple of components. just a patch. and the statement above that has a dilemma in the fact that 3.15.2 was far from stable. the dev version with it's fixes was much better but still has issues so for anything 3.15 all you could do was point people to an unstable version. Sorry but no. for better stability you'd go for 3.14 and no further. As i had to while 3.15.90 was unusable, 3.15.2 wasn't much better. so 3.14 I went. My coding ability is not good enough to help with the new dev gambas as things are happening on a deeper level that i do not understand, but my patches, this i can manage just fine. And they work just fine. for me the "gambas I agree on" being a developer is the gambas people will use or try to use my apps on, and that's all from 3.12 to 3.15 they are all out there being used and i have to think that way, for all, not just the forerunners. I hope that makes sense and doesn't upset too many people. Just being pragmatic. BruceS -------------- next part -------------- An HTML attachment was scrubbed... URL: From mbelmonte at belmotek.net Thu Nov 19 21:51:17 2020 From: mbelmonte at belmotek.net (Martin) Date: Thu, 19 Nov 2020 21:51:17 +0100 Subject: [Gambas-user] JSON Encoder Message-ID: Hi, I am trying to encode a json file, as source info I use a JSONCOllection but the result is not exactly I spect *Sample of the expected result.* /? {// //????? "object": "BLOCK_CONTROL",// //????? "index": 0,// //????? "type": 48,// //????? "handle": [0, 1],// //????? "size": 19,// //????? "bitsize": 72,// //????? "ownerhandle": [4, 0, 0, 0],// //????? "entries": [// //??????? [2, 1, 44, 44],// //??????? [2, 1, 48, 48]// //????? ],// //????? "model_space": [3, 1, 2, 2],// //????? "paper_space": [3, 1, 14, 14]// //??? },/ *JSONEncode result.? t = JSON.Encode(ox) where ox is a JSONCollection * /{"object":"BLOCK_CONTROL","index":0,"type":48,"handle":[0,1],"size":19,"bitsize":72,"ownerhandle":[4,0,0,0],"entries":[[2,1,44,44],[2,1,48,48]],"model_space":[3,1,2,2],"paper_space":[3,1,14,14]}/ As you see the "\n" is not present. I could try to replace coma "," by "\n," but structures like this [3, 1, 2, 2] will be splited also that's not kool. I wan to know if I am doing something wrong for encoding? If it is scheduled any improvement in the compoent gb.web ? Any other idea? Tanks for read. Martin -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.lee.davidson at gmail.com Thu Nov 19 23:17:15 2020 From: t.lee.davidson at gmail.com (T Lee Davidson) Date: Thu, 19 Nov 2020 17:17:15 -0500 Subject: [Gambas-user] JSON Encoder In-Reply-To: References: Message-ID: <3d4c7065-571f-06cd-92d4-f4949a4d6b81@gmail.com> On 11/19/20 3:51 PM, Martin wrote: > *JSONEncode result.? t = JSON.Encode(ox) where ox is a JSONCollection > * > > /{"object":"BLOCK_CONTROL","index":0,"type":48,"handle":[0,1],"size":19,"bitsize":72,"ownerhandle":[4,0,0,0],"entries":[[2,1,44,44],[2,1,48,48]],"model_space":[3,1,2,2],"paper_space":[3,1,14,14]}/ > > As you see the "\n" is not present. I could try to replace coma "," by "\n," but structures like this [3, 1, 2, 2] will be > splited also that's not kool. > JSON.Encode is only an encoder. It does not do formatting or pretty printing. If you need that, you could Shell out to `jq` or similar. -- Lee From mbelmonte at belmotek.net Fri Nov 20 00:15:04 2020 From: mbelmonte at belmotek.net (Martin) Date: Fri, 20 Nov 2020 00:15:04 +0100 Subject: [Gambas-user] JSON Encoder In-Reply-To: <3d4c7065-571f-06cd-92d4-f4949a4d6b81@gmail.com> References: <3d4c7065-571f-06cd-92d4-f4949a4d6b81@gmail.com> Message-ID: <6ac93914-48b4-291c-f432-446f709b32a3@belmotek.net> ok, i will try whit this. https://www.howtogeek.com/529219/how-to-parse-json-files-on-the-linux-command-line-with-jq/ Good idea, tanks, gracias totales. Martin On 19/11/20 23:17, T Lee Davidson wrote: > On 11/19/20 3:51 PM, Martin wrote: >> *JSONEncode result.? t = JSON.Encode(ox) where ox is a JSONCollection >> * >> >> /{"object":"BLOCK_CONTROL","index":0,"type":48,"handle":[0,1],"size":19,"bitsize":72,"ownerhandle":[4,0,0,0],"entries":[[2,1,44,44],[2,1,48,48]],"model_space":[3,1,2,2],"paper_space":[3,1,14,14]}/ >> >> >> As you see the "\n" is not present. I could try to replace coma "," >> by "\n," but structures like this [3, 1, 2, 2] will be splited also >> that's not kool. >> > > JSON.Encode is only an encoder. It does not do formatting or pretty > printing. If you need that, you could Shell out to `jq` or similar. > > From sharon at 455.co.il Fri Nov 20 12:21:22 2020 From: sharon at 455.co.il (Mayost Sharon) Date: Fri, 20 Nov 2020 13:21:22 +0200 Subject: [Gambas-user] gb.web.gui Message-ID: <20201120111441.M62995@455.co.il> Hello I saw in the documentation of Gambas It replaces the previous gb.web.form component, being faster and easier to use I have Gambas version 15.2.1 There are things missing in gb.web.gui For example: "WebUploader" and other controls Thanks From gambas at cd-bahia.com Fri Nov 20 14:59:51 2020 From: gambas at cd-bahia.com (Dag Jarle Nerland Johansen - Gambas) Date: Fri, 20 Nov 2020 14:59:51 +0100 Subject: [Gambas-user] Problem with generated form Message-ID: <48abe204-bcf7-77cb-b4e0-7e9f0007bc11@cd-bahia.com> Hi, to avoid a lot of typing, I wrote a program (in Gambas) generating a .form and a .class file. The .form file comes fine, but when I start the IDE to run, it stops with a syntax error, and the IDE inserts a new line a the top: ' Gambas class file In the source there are no errors. It seems to me, when a form is made with the IDE, it makes? entries somewhere, could be in the folder Gambas. But this (tried FMain which I found there) can't be edited by a normal editor. Until I know what the IDE makes different than only read text-files, it s a mystery to me, Grateful for any help. Dag JNJ From gambas at cd-bahia.com Fri Nov 20 15:20:55 2020 From: gambas at cd-bahia.com (Dag Jarle Nerland Johansen - Gambas) Date: Fri, 20 Nov 2020 15:20:55 +0100 Subject: [Gambas-user] Problem with generated form In-Reply-To: <48abe204-bcf7-77cb-b4e0-7e9f0007bc11@cd-bahia.com> References: <48abe204-bcf7-77cb-b4e0-7e9f0007bc11@cd-bahia.com> Message-ID: I was wrong with the .form it seems. I made a form in the IDE, pt the generated .class source there to test. AND I replaced the form with my generated .form. Now it tells me, that I have an error in the .form-file. I will look for that first, although the form looks fine in the IDE without running. Dag JNJ Am 20.11.20 um 14:59 schrieb Dag Jarle Nerland Johansen - Gambas: > Hi, > to avoid a lot of typing, I wrote a program (in Gambas) generating a > .form and a .class file. > The .form file comes fine, but when I start the IDE to run, it stops > with a syntax error, and the IDE inserts a new line a the top: ' > Gambas class file > In the source there are no errors. > It seems to me, when a form is made with the IDE, it makes entries > somewhere, could be in the folder Gambas. > But this (tried FMain which I found there) can't be edited by a normal > editor. > Until I know what the IDE makes different than only read text-files, > it s a mystery to me, > Grateful for any help. > Dag JNJ > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- From bsteers4 at gmail.com Fri Nov 20 20:26:15 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Fri, 20 Nov 2020 19:26:15 +0000 Subject: [Gambas-user] Merging with confidence Message-ID: Before when i merge requested a commit to add shell highlight to gambas i knew very little about git. I was completely unaware that any future modifications i made to that branch of mine would auto add to the previous merge , eek, that was a shocker and a risk with my little git understanding. i figured once the merge was done that would be that. but no, more complicated than that it seems. Since then i've noticed a different way to make a merge request. that is to go to the gambas official gitlab repository, navigate to a file and directly edit it in the web browser. Then you can hit Commit and it automatically makes me a temporary branch, makes the merge request and sets the branch to delete itself upon merging. That's much safer right? probably the safest way. Completely risk free from any new modifications. Just trying to be safe. BruceS -------------- next part -------------- An HTML attachment was scrubbed... URL: From gambas.fr at gmail.com Fri Nov 20 21:38:38 2020 From: gambas.fr at gmail.com (Fabien Bodard) Date: Fri, 20 Nov 2020 21:38:38 +0100 Subject: [Gambas-user] datacombo Message-ID: Hi, why if I set the Field value of a combobox it become not enabled ? -- Fabien Bodard From t.lee.davidson at gmail.com Sat Nov 21 01:26:23 2020 From: t.lee.davidson at gmail.com (T Lee Davidson) Date: Fri, 20 Nov 2020 19:26:23 -0500 Subject: [Gambas-user] datacombo In-Reply-To: References: Message-ID: On 11/20/20 3:38 PM, Fabien Bodard wrote: > Hi, > > why if I set the Field value of a combobox it become not enabled ? > What Field value? I see no Field property for a ComboBox. What am I missing? -- Lee From chrisml at deganius.de Sat Nov 21 07:24:11 2020 From: chrisml at deganius.de (Christof Thalhofer) Date: Sat, 21 Nov 2020 07:24:11 +0100 Subject: [Gambas-user] Merging with confidence In-Reply-To: References: Message-ID: Am 20.11.20 um 20:26 schrieb Bruce Steers: > Since then i've noticed a different way to make a merge request. > > that is to go to the gambas official gitlab repository, navigate to a > file and directly edit it in the web browser. > Then you can hit Commit and it automatically makes me a temporary > branch, makes the merge request and sets the branch to delete itself > upon merging. > > That's much safer right? probably the safest way. Completely risk free > from any new modifications. > > Just trying to be safe. I don't think it is ok to edit the official Gambas Git repo and add a branch there, even if Gitlab provides the opportunity to do that. But I'm not Beno?t ... it's his playground. The better way IMO is to fork Gambas, then create a feature branch in the fork, add the changes and then create a merge request in the official Gambas repo which points to your feature branch. As soon as the changes were taken over you can delete the feature branch in your fork. AFAICS Gitlab can do that for you if you have set it that way. Also write commit messages in the way Gambas needs it: https://gambaswiki.org/wiki/howto/contribute#t7 Alles Gute Christof Thalhofer -- Dies ist keine Signatur -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From gambas.fr at gmail.com Sat Nov 21 10:07:28 2020 From: gambas.fr at gmail.com (Fabien Bodard) Date: Sat, 21 Nov 2020 10:07:28 +0100 Subject: [Gambas-user] datacombo In-Reply-To: References: Message-ID: sorry my mistake I'm talking about a datacombo. It's the same if I set the record position on the underlaying datasource... I want to add an entry and then positionate on the last record... What I'm missing ? If I call Datasource1.MoveLast then the Combo is disabled :-/ Le sam. 21 nov. 2020 ? 01:27, T Lee Davidson a ?crit : > > On 11/20/20 3:38 PM, Fabien Bodard wrote: > > Hi, > > > > why if I set the Field value of a combobox it become not enabled ? > > > > What Field value? I see no Field property for a ComboBox. What am I missing? > > > -- > Lee > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -- Fabien Bodard From bsteers4 at gmail.com Sat Nov 21 16:07:36 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Sat, 21 Nov 2020 15:07:36 +0000 Subject: [Gambas-user] Merging with confidence In-Reply-To: References: Message-ID: On Sat, 21 Nov 2020 at 06:25, Christof Thalhofer wrote: > Am 20.11.20 um 20:26 schrieb Bruce Steers: > > > Since then i've noticed a different way to make a merge request. > > > > that is to go to the gambas official gitlab repository, navigate to a > > file and directly edit it in the web browser. > > Then you can hit Commit and it automatically makes me a temporary > > branch, makes the merge request and sets the branch to delete itself > > upon merging. > > > > That's much safer right? probably the safest way. Completely risk free > > from any new modifications. > > > > Just trying to be safe. > > I don't think it is ok to edit the official Gambas Git repo and add a > branch there, even if Gitlab provides the opportunity to do that. But > I'm not Beno?t ... it's his playground. > > The better way IMO is to fork Gambas, then create a feature branch in > the fork, add the changes and then create a merge request in the > official Gambas repo which points to your feature branch. > No you misunderstand. You cannot edit the gambas repository directly, when you do git automatically creates a branch (on you own fork), not the gambas one. It does everything you suggest (and i previously stated) automatically. It actually works quite well and so much easier and better than doing it the hard way. It is good. Bruce -------------- next part -------------- An HTML attachment was scrubbed... URL: From adamnt42 at gmail.com Sat Nov 21 19:26:01 2020 From: adamnt42 at gmail.com (Bruce) Date: Sun, 22 Nov 2020 04:56:01 +1030 Subject: [Gambas-user] gb.report2 Conditional sections Message-ID: Is there a way to set a reportSection to print or not print given a certain condition? For example, if there is no data for some reporthbox then the hbox should not print but instead a reportLabel with "NO DATA" should be printed. tia bruce From g4mba5 at gmail.com Sat Nov 21 21:04:26 2020 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Sat, 21 Nov 2020 21:04:26 +0100 Subject: [Gambas-user] gb.web.gui In-Reply-To: <20201120111441.M62995@455.co.il> References: <20201120111441.M62995@455.co.il> Message-ID: <6f172524-b2a8-33ba-45d4-e328d52184a8@gmail.com> Le 20/11/2020 ? 12:21, Mayost Sharon a ?crit?: > Hello > > I saw in the documentation of Gambas > It replaces the previous gb.web.form component, being faster and easier to use > > I have Gambas version 15.2.1 > There are things missing in gb.web.gui > For example: "WebUploader" and other controls > > Thanks > Hi, Now you have to use the WebFileButton control. It's a button that the user must click to select a file to upload to the server. Then the button raises the Click event when the user selects a file, the Progress event to indicate the progress of the download, the Finish event when the upload is finished, and the Abort event if it is aborted. Regards, -- Beno?t Minisini From t.lee.davidson at gmail.com Sat Nov 21 21:47:48 2020 From: t.lee.davidson at gmail.com (T Lee Davidson) Date: Sat, 21 Nov 2020 15:47:48 -0500 Subject: [Gambas-user] datacombo In-Reply-To: References: Message-ID: <8b20eff6-4177-d1d1-3945-5f5e221f9482@gmail.com> On 11/21/20 4:07 AM, Fabien Bodard wrote: > sorry my mistake I'm talking about a datacombo. > > It's the same if I set the record position on the underlaying datasource... > I want to add an entry and then positionate on the last record... What > I'm missing ? > > If I call Datasource1.MoveLast then the Combo is disabled :-/ Unfortunately, I can't be of much help. I can't even figure out what DataCombo is supposed to do nor how it is supposed to work. The doc says, "This control lets you edit the value of a field through another table whose primary key is that field" which doesn't make any sense to me. I tried figuring it out by placing on a DataSource: A DataBrowser, set to show two columns of a table, and A DataCombo with its Field set to primary key of that same table. The DataCombo showed the values in the second column of the table. And, when I clicked (or double-clicked?) a row in the DataBrowser, it copied the value of the second column into the primary key column and saved the data without me clicking on the Save icon. Plus, I got multiple exception notices which I did not separately log. The database data is now corrupted. -- Lee From chrisml at deganius.de Sun Nov 22 00:36:32 2020 From: chrisml at deganius.de (Christof Thalhofer) Date: Sun, 22 Nov 2020 00:36:32 +0100 Subject: [Gambas-user] Merging with confidence In-Reply-To: References: Message-ID: <702b00d0-b354-2ab9-f71e-351472c7886c@deganius.de> Am 21.11.20 um 16:07 schrieb Bruce Steers: > No you misunderstand. > You cannot edit the gambas repository directly, when you do git > automatically creates a branch (on you own fork), not the gambas one. > It does everything you suggest (and i previously stated) automatically. > > It actually works quite well and so much easier and better than doing it > the hard way. > It is good. Ah, sorry I didn't try it out. Then it's ok! :-) Alles Gute Christof Thalhofer -- Dies ist keine Signatur -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From bsteers4 at gmail.com Sun Nov 22 01:03:24 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Sun, 22 Nov 2020 00:03:24 +0000 Subject: [Gambas-user] run external form embedded? Message-ID: Is it possible to open an external compiled gambas exe into a form/panel? I tried using the Application.Embedder property but it's depreciated. Tried looking for info but not much around. My problem is i have a GTK app that needs to run a QT app. Currently it's opening the other app in another window as a complete separate thing. I need an example (or just a pointer in the right direction) of a simple way of opening an external app in a panel or something on another app. I'm sure from what i have read it is possible. I cannot do it by adding one apps code to the other because one uses gtk the other uses gb.gui.qt.webkit. Stumped. Many thanks for any suggestions/advice :) BruceS -------------- next part -------------- An HTML attachment was scrubbed... URL: From chrisml at deganius.de Sun Nov 22 01:13:47 2020 From: chrisml at deganius.de (Christof Thalhofer) Date: Sun, 22 Nov 2020 01:13:47 +0100 Subject: [Gambas-user] Merging with confidence In-Reply-To: <702b00d0-b354-2ab9-f71e-351472c7886c@deganius.de> References: <702b00d0-b354-2ab9-f71e-351472c7886c@deganius.de> Message-ID: Am 22.11.20 um 00:36 schrieb Christof Thalhofer: >> It actually works quite well and so much easier and better than doing it >> the hard way. >> It is good. > > Ah, sorry I didn't try it out. Then it's ok! :-) Ahm ... but I would prefer to clone the (own) Gitlab fork to the computer at home, create the feature branch there and then push it to Gitlab. And after that create the merge request. Because you can't test your changes without Gambas. You know, one wrong character and your code is broken. If you really want to participate in the development of Gambas, you should first understand Git. And you have to be careful. It's not like playing around with your own programs. It is much more bureaucratic. And rightly so. Because one mistake has the potential to destroy many programs around the world. Alles Gute Christof Thalhofer -- Dies ist keine Signatur -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From bsteers4 at gmail.com Sun Nov 22 02:22:51 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Sun, 22 Nov 2020 01:22:51 +0000 Subject: [Gambas-user] Merging with confidence In-Reply-To: References: <702b00d0-b354-2ab9-f71e-351472c7886c@deganius.de> Message-ID: On Sun, 22 Nov 2020 at 00:14, Christof Thalhofer wrote: > Am 22.11.20 um 00:36 schrieb Christof Thalhofer: > > >> It actually works quite well and so much easier and better than doing it > >> the hard way. > >> It is good. > > > > Ah, sorry I didn't try it out. Then it's ok! :-) > > Ahm ... but I would prefer to clone the (own) Gitlab fork to the > computer at home, create the feature branch there and then push it to > Gitlab. And after that create the merge request. > > Because you can't test your changes without Gambas. You know, one wrong > character and your code is broken. > Yes i agree for doing complex stuff, but i can accept my level of understanding of things and where my limits are of how i can do anything for gambas and my field i think is not with the big stuff but taking care of the little things :) Little tweaks here and there that i'm finding will be better for me both as a programmer of my own software so better apps for the user and as a gambas developement participator so a better IDE for me to use to make the apps :) but some of the merges i'd do would just be one liners. i can fix my argument losing problem (hehe, the irony ;) ) , i can fix that changing just one word. and less a change more a revert. I also have quote wrapping enabled like braces on my gambas but only if pressing the alt key. that commit involves uncommenting 6 lines of previously written code and adding "And If Key.Alt" to the first line. hardly worth the effort of making a local branch. I just considered for silly little changes like that just doing it on the gambas repository and having it do it for me not only was so very quick and easy but it also showed me the correct way to do it. > If you really want to participate in the development of Gambas, you > should first understand Git. > I understand it much better now, i've made an app to help manage my local clones and that's taught me a lot. And you have to be careful. It's not like playing around with your own > programs. It is much more bureaucratic. And rightly so. Because one > mistake has the potential to destroy many programs around the world. > Indeed , to be honest I always have and always will just participate in my own way however i can. Right now with my level of understanding i'm in the "it's good suggestion at least" kind of input :) Or at least i hope. :) the little fixes/additions merge requests I make are so small they are probably noted at one look and probably understood. their addition to gambas i'd consider an improvement. and have been suggested. if they are added or not is not so much a problem for me as my gambas has those changes, so my work is done ;) I'm not looking for credit or to be part of any development team really (all though lets face it, if you've reported a bug and got advised to update to the latest and now you use the bugtracker and are on this list.. , then welcome to the team innit :D ), i just have many good ideas. if commits don't get added because there is something wrong with them there's not feedback to say. if's a bit of a dark alley. I don't need to hear "cant add every commit every nobody adds" either i fully get it. I guess i'm just fishing for clarity to ensure i'm not doing it wrong. I've been known to do it wrong once or twice ;) All the best Bruce -------------- next part -------------- An HTML attachment was scrubbed... URL: From gambas.fr at gmail.com Sun Nov 22 08:12:22 2020 From: gambas.fr at gmail.com (Fabien Bodard) Date: Sun, 22 Nov 2020 08:12:22 +0100 Subject: [Gambas-user] shell highlighting on non beta gambas In-Reply-To: References: <8c462b4d-3ae0-32c8-5e89-ffa3cd1f4106@deganius.de> Message-ID: One solution if it is about just Gambas writen components will be to just copy and embedded these corrected component directly in your app. Then when the time come, you can modify your app and use the gb Env component again. In this way it is transparent for the end user. Fabien -------------- next part -------------- An HTML attachment was scrubbed... URL: From gambas at cd-bahia.com Sun Nov 22 08:50:15 2020 From: gambas at cd-bahia.com (Dag Jarle Nerland Johansen - Gambas) Date: Sun, 22 Nov 2020 08:50:15 +0100 Subject: [Gambas-user] Opening a project in LAN Message-ID: Hi, sometimes I work on the terrace with the laptop. I can't figure out how to open a project over the network. Both main PC and laptop are connected over the local network. No network connection is shown in the opening list. I connect via SSH. Glad for any help. Dag JNJ From dickson.tim at googlemail.com Sun Nov 22 09:36:23 2020 From: dickson.tim at googlemail.com (Tim Dickson) Date: Sun, 22 Nov 2020 08:36:23 +0000 Subject: [Gambas-user] Opening a project in LAN In-Reply-To: References: Message-ID: <496a4e6e-dc3b-49e6-b6da-e93e83337bda@googlemail.com> What I do is use samba (smb/cifs) and mount the share containing the program on your local (laptop) file system. That works well enough. You could use nfs instead, or vnc to the pc and remote the whole thing if you wanted. I do that for a vm I run on my lan. Regards, Tim On 22/11/2020 07:50, Dag Jarle Nerland Johansen - Gambas wrote: > Hi, > sometimes I work on the terrace with the laptop. > I can't figure out how to open a project over the network. > Both main PC and laptop are connected over the local network. > No network connection is shown in the opening list. > I connect via SSH. > Glad for any help. > Dag JNJ > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -- This email has been checked for viruses by AVG. https://www.avg.com From roberto.premoli at tiscali.it Sun Nov 22 09:57:40 2020 From: roberto.premoli at tiscali.it (roberto.premoli at tiscali.it) Date: Sun, 22 Nov 2020 09:57:40 +0100 Subject: [Gambas-user] Opening a project in LAN In-Reply-To: <496a4e6e-dc3b-49e6-b6da-e93e83337bda@googlemail.com> References: <496a4e6e-dc3b-49e6-b6da-e93e83337bda@googlemail.com> Message-ID: <9e87a5cffd4422d372c757e22123ce89@tiscali.it> > On 22/11/2020 07:50, Dag Jarle Nerland Johansen - Gambas wrote: > >> Hi, sometimes I work on the terrace with the laptop. I can't figure >> out >> how to open a project over the network. Both main PC and laptop are >> connected over the local network. No network connection is shown in >> the >> opening list. I connect via SSH. Glad for any help. Dag JNJ ----[ >> http://gambaswiki.org/wiki/doc/netiquette [1] ]---- > > -- This email has been checked for viruses by AVG. > https://www.avg.com > [2] ----[ http://gambaswiki.org/wiki/doc/netiquette [3] ]---- if gambas project is on "main PC" (and on main PC you have gambas installed) and you just wanto to operate it form "laptop", you can use "remote desktop" to control main PC from laptop. Con Tiscali Mobile Smart 30 4G hai minuti illimitati, 100 SMS e 30 Giga in 4G a soli 8,99? al mese. http://tisca.li/smart30 From gambas.fr at gmail.com Sun Nov 22 10:42:38 2020 From: gambas.fr at gmail.com (Fabien Bodard) Date: Sun, 22 Nov 2020 10:42:38 +0100 Subject: [Gambas-user] gb.report2 Conditional sections In-Reply-To: References: Message-ID: Hi Bruce, I need to know more about your need to go further. Le sam. 21 nov. 2020 ? 19:27, Bruce a ?crit : > > Is there a way to set a reportSection to print or not print given a > certain condition? For example, if there is no data for some reporthbox > then the hbox should not print but instead a reportLabel with "NO DATA" > should be printed. > > tia > bruce > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -- Fabien Bodard From gambas at cd-bahia.com Sun Nov 22 10:50:26 2020 From: gambas at cd-bahia.com (Dag Jarle Nerland Johansen - Gambas) Date: Sun, 22 Nov 2020 10:50:26 +0100 Subject: [Gambas-user] Opening a project in LAN In-Reply-To: <496a4e6e-dc3b-49e6-b6da-e93e83337bda@googlemail.com> References: <496a4e6e-dc3b-49e6-b6da-e93e83337bda@googlemail.com> Message-ID: <3e336f10-1f17-d5c4-894d-08c9b50a816b@cd-bahia.com> Samba is so bad, it never works well Am 22.11.20 um 09:36 schrieb Tim Dickson via User: > What I do is use samba (smb/cifs) and mount the share containing the > program on your local (laptop) file system. That works well enough. > You could use nfs instead, or vnc to the pc and remote the whole thing > if you wanted. I do that for a vm I run on my lan. > Regards, Tim > > On 22/11/2020 07:50, Dag Jarle Nerland Johansen - Gambas wrote: >> Hi, >> sometimes I work on the terrace with the laptop. >> I can't figure out how to open a project over the network. >> Both main PC and laptop are connected over the local network. >> No network connection is shown in the opening list. >> I connect via SSH. >> Glad for any help. >> Dag JNJ >> >> >> ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > > From gambas at cd-bahia.com Sun Nov 22 10:55:07 2020 From: gambas at cd-bahia.com (Dag Jarle Nerland Johansen - Gambas) Date: Sun, 22 Nov 2020 10:55:07 +0100 Subject: [Gambas-user] Opening a project in LAN In-Reply-To: <3e336f10-1f17-d5c4-894d-08c9b50a816b@cd-bahia.com> References: <496a4e6e-dc3b-49e6-b6da-e93e83337bda@googlemail.com> <3e336f10-1f17-d5c4-894d-08c9b50a816b@cd-bahia.com> Message-ID: <954b5e48-3eff-e41e-6709-b057f794ddc7@cd-bahia.com> Hi Tim, I have zero experience with nfs, and don't want to make a lot of research. Just want to program Programmer, not system admin Regards, Dag Am 22.11.20 um 10:50 schrieb Dag Jarle Nerland Johansen - Gambas: > Samba is so bad, it never works well > > Am 22.11.20 um 09:36 schrieb Tim Dickson via User: >> What I do is use samba (smb/cifs) and mount the share containing the >> program on your local (laptop) file system. That works well enough. >> You could use nfs instead, or vnc to the pc and remote the whole >> thing if you wanted. I do that for a vm I run on my lan. >> Regards, Tim >> >> On 22/11/2020 07:50, Dag Jarle Nerland Johansen - Gambas wrote: >>> Hi, >>> sometimes I work on the terrace with the laptop. >>> I can't figure out how to open a project over the network. >>> Both main PC and laptop are connected over the local network. >>> No network connection is shown in the opening list. >>> I connect via SSH. >>> Glad for any help. >>> Dag JNJ >>> >>> >>> ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- >> >> > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > From gambas at cd-bahia.com Sun Nov 22 11:01:01 2020 From: gambas at cd-bahia.com (Dag Jarle Nerland Johansen - Gambas) Date: Sun, 22 Nov 2020 11:01:01 +0100 Subject: [Gambas-user] a lot if crashes Message-ID: <8d52ceff-6dab-c8a9-10fa-33e6f0240c15@cd-bahia.com> Hi, lately Gambas crashes all the time. If I am lucky, I manage to save the latest changes before it goes, Especially when I make replacement (Ctrl-F) Any reasons? Have Mate 18.0.4.5. System up to date, no other crashes than Gambas. Regards, Dag JNJ From sharon at 455.co.il Sun Nov 22 11:36:29 2020 From: sharon at 455.co.il (Mayost Sharon) Date: Sun, 22 Nov 2020 12:36:29 +0200 Subject: [Gambas-user] gb.web.gui In-Reply-To: <6f172524-b2a8-33ba-45d4-e328d52184a8@gmail.com> References: <20201120111441.M62995@455.co.il> <6f172524-b2a8-33ba-45d4-e328d52184a8@gmail.com> Message-ID: <20201122101916.M21673@455.co.il> ---------- Original Message ----------- From: Beno?t Minisini To: user at lists.gambas-basic.org Sent: Sat, 21 Nov 2020 21:04:26 +0100 Subject: Re: [Gambas-user] gb.web.gui > Le 20/11/2020 ? 12:21, Mayost Sharon a ?crit?: > > Hello > > > > I saw in the documentation of Gambas > > It replaces the previous gb.web.form component, being faster and easier to use > > > > I have Gambas version 15.2.1 > > There are things missing in gb.web.gui > > For example: "WebUploader" and other controls > > > > Thanks > > > > Hi, > > Now you have to use the WebFileButton control. > > It's a button that the user must click to select a file to upload to the > server. > > Then the button raises the Click event when the user selects a file, the > Progress event to indicate the progress of the download, the Finish > event when the upload is finished, and the Abort event if it is aborted. > > Regards, > > -- > Beno?t Minisini > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- ------- End of Original Message ------- First of all thank you very much 1. I'm trying to upload a 500MB file I get an error in the "Abort" event in the "Reason" variable Error: Request too big How can this be solved? 2. When I upload a 35MB file I get a first event: Finsh And a second event: Progress Third event: Progress Is it okay? 3. Is it possible to select multiple files? Thank you From taboege at gmail.com Sun Nov 22 12:09:17 2020 From: taboege at gmail.com (Tobias Boege) Date: Sun, 22 Nov 2020 12:09:17 +0100 Subject: [Gambas-user] a lot if crashes In-Reply-To: <8d52ceff-6dab-c8a9-10fa-33e6f0240c15@cd-bahia.com> References: <8d52ceff-6dab-c8a9-10fa-33e6f0240c15@cd-bahia.com> Message-ID: <20201122110917.GG1811581@highrise.localdomain> On Sun, 22 Nov 2020, Dag Jarle Nerland Johansen - Gambas wrote: > Hi, > lately Gambas crashes all the time. By "lately", are you implying that you compile yourself regularly? What kind of crashes do you get? Is it a segfault or a Gambas error? > If I am lucky, I manage to save the latest changes before it goes, > Especially when I make replacement (Ctrl-F) So it is only the Gambas IDE that is crashing? I suspect it is a Gambas error then? One thing you should definitely do is open the IDE as a project inside the IDE and run it until it crashes. Then you will be able to see what the error is, where it comes from and give us a backtrace. If you know a Gambas version without the crashes, for example the latest stable, you might even be able to use `git bisect` to pin- point the commits that introduced the underlying bug. Do you know how to do that? Best, Tobias -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From bsteers4 at gmail.com Sun Nov 22 17:19:09 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Sun, 22 Nov 2020 16:19:09 +0000 Subject: [Gambas-user] a lot if crashes In-Reply-To: <8d52ceff-6dab-c8a9-10fa-33e6f0240c15@cd-bahia.com> References: <8d52ceff-6dab-c8a9-10fa-33e6f0240c15@cd-bahia.com> Message-ID: I've had similar problems with gambas recently. so you are not the only one. for a week or so , seems to have gotten worse and worse. also finding software i'm writing will start to misbehave / work wrong till i reboot also finding lots of folders in my /tmp/gambas.1000 directory after a long coding session. again better after a reboot. I'm not sure gambas is cleaning up it's mess, tmp stuff and memory addresses, etc. last night i started getting a gbx3 circular reference error (the ide had crashed more than once). and my app stopped working. rebooted and problem gone. its got a few issues at present. some big changes often cause big problems. i find (and have for a while , and reported bug) i cannot use right-click to pop up the menu on controls in my app in the IDE when it first loads.. Right click does not work until i hit Ctrl-C on the keyboard !! now that's a weird bug and a sign there is some things quite wrong with the IDE at present.little glitches like that here and there. Ooh , after saying that todays daily just fixed that issue :) whoop whoop, been happening for a long time that bug. :) > Any reasons? it's the experimental development version of gambas. there's bound to be bugs. hopefully not too many to make it unusable though. That's our job as beta testers, find bugs and report them. :) BruceS On Sun, 22 Nov 2020 at 10:02, Dag Jarle Nerland Johansen - Gambas < gambas at cd-bahia.com> wrote: > Hi, > lately Gambas crashes all the time. > If I am lucky, I manage to save the latest changes before it goes, > Especially when I make replacement (Ctrl-F) > Any reasons? > Have Mate 18.0.4.5. System up to date, no other crashes than Gambas. > Regards, > Dag JNJ > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From g4mba5 at gmail.com Sun Nov 22 18:15:46 2020 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Sun, 22 Nov 2020 18:15:46 +0100 Subject: [Gambas-user] Opening a project in LAN In-Reply-To: References: Message-ID: Le 22/11/2020 ? 08:50, Dag Jarle Nerland Johansen - Gambas a ?crit?: > Hi, > sometimes I work on the terrace with the laptop. > I can't figure out how to open a project over the network. > Both main PC and laptop are connected over the local network. > No network connection is shown in the opening list. > I connect via SSH. > Glad for any help. > Dag JNJ > There is no support for remote file access -inside- Gambas, but you can use 'fuse', that allows any program to access any local or remote file system supported. Example on ubuntu with ssh : https://doc.ubuntu-fr.org/sshfs Regards, -- Beno?t Minisini From adamnt42 at gmail.com Sun Nov 22 18:17:24 2020 From: adamnt42 at gmail.com (Bruce) Date: Mon, 23 Nov 2020 03:47:24 +1030 Subject: [Gambas-user] a lot if crashes In-Reply-To: References: <8d52ceff-6dab-c8a9-10fa-33e6f0240c15@cd-bahia.com> Message-ID: <952e3502-86c4-fdcd-6461-d9fc56c96b69@gmail.com> On 23/11/20 2:49 am, Bruce Steers wrote: > also finding lots of folders in my /tmp/gambas.1000 directory after a long > coding session. > again better after a reboot. You will get a new subfolder every time you click Run un the IDE. Most times these will be empty unless your program crashes. If they really worry you, there is no need to reboot, just close all running gambas processes and delete the /tmp/gambas.1000 directory. b From g4mba5 at gmail.com Sun Nov 22 18:22:42 2020 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Sun, 22 Nov 2020 18:22:42 +0100 Subject: [Gambas-user] gb.web.gui In-Reply-To: <20201122101916.M21673@455.co.il> References: <20201120111441.M62995@455.co.il> <6f172524-b2a8-33ba-45d4-e328d52184a8@gmail.com> <20201122101916.M21673@455.co.il> Message-ID: <0f6641b4-a83d-cc88-ea6a-09f937f6a529@gmail.com> Le 22/11/2020 ? 11:36, Mayost Sharon a ?crit?: > > First of all thank you very much > > 1. > I'm trying to upload a 500MB file > I get an error in the "Abort" event in the "Reason" variable > Error: Request too big > How can this be solved? It should be a limit of your http server. > > 2. > When I upload a 35MB file > I get a first event: Finsh > And a second event: Progress > Third event: Progress > Is it okay? No, you should have the Progress events first, then the Finish events. BUT... these events comes from the browser HttpXmlRequest object. And if they are sent in that order to the server (the Gambas web application), maybe they are not received in that order. Everything is asynchronous. > > 3. > Is it possible to select multiple files? No, it's one file only. Maybe I could add an option to that, I just didn't do it (or maybe because I encountered problems with that, I don't remember). I am actually busy with making a GTK+3 browser control, a GTK+3 version of the IDE, and chinese date formatting. But coming back on the gb.web.gui component is planned! Regards, -- Beno?t Minisini From g4mba5 at gmail.com Sun Nov 22 18:24:42 2020 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Sun, 22 Nov 2020 18:24:42 +0100 Subject: [Gambas-user] a lot if crashes In-Reply-To: <8d52ceff-6dab-c8a9-10fa-33e6f0240c15@cd-bahia.com> References: <8d52ceff-6dab-c8a9-10fa-33e6f0240c15@cd-bahia.com> Message-ID: <397520d3-4b97-6566-5e44-6acf161c2ef2@gmail.com> Le 22/11/2020 ? 11:01, Dag Jarle Nerland Johansen - Gambas a ?crit?: > Hi, > lately Gambas crashes all the time. > If I am lucky, I manage to save the latest changes before it goes, > Especially when I make replacement (Ctrl-F) > Any reasons? > Have Mate 18.0.4.5. System up to date, no other crashes than Gambas. > Regards, > Dag JNJ > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > . It's useless if you don't tell exactly which version of Gambas you are using, and what you do. I guess it's one of the "USE AT YOUR OWN RISK" development version, but which one? -- Beno?t Minisini From adamnt42 at gmail.com Sun Nov 22 18:26:31 2020 From: adamnt42 at gmail.com (Bruce) Date: Mon, 23 Nov 2020 03:56:31 +1030 Subject: [Gambas-user] a lot if crashes In-Reply-To: References: <8d52ceff-6dab-c8a9-10fa-33e6f0240c15@cd-bahia.com> Message-ID: <74235e14-3082-da05-6947-0bd3595753df@gmail.com> On 23/11/20 2:49 am, Bruce Steers wrote: > its got a few issues at present. some big changes often cause big problems. > i find (and have for a while , and reported bug) i cannot use right-click > to pop up the menu on controls in my app in the IDE when it first loads.. > Right click does not work until i hit Ctrl-C on the keyboard !! When you say "in my app in the IDE" do you mean that you can't use the form designer when your program is running? Or that the popup menu in your program active form is not working? b From adamnt42 at gmail.com Sun Nov 22 19:01:56 2020 From: adamnt42 at gmail.com (Bruce) Date: Mon, 23 Nov 2020 04:31:56 +1030 Subject: [Gambas-user] gb.report2 Conditional sections In-Reply-To: References: Message-ID: <24f7bb02-b441-1148-73ef-d82ad97af6e7@gmail.com> On 22/11/20 8:12 pm, Fabien Bodard wrote: > Hi Bruce, > > I need to know more about your need to go further. > > > Le sam. 21 nov. 2020 ? 19:27, Bruce a ?crit : >> >> Is there a way to set a reportSection to print or not print given a >> certain condition? For example, if there is no data for some reporthbox >> then the hbox should not print but instead a reportLabel with "NO DATA" >> should be printed. >> >> tia >> bruce >> >> ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > > > OK, Fabien, here goes. BACKGROUND I am writing a series of programs that analyse and report on various databases and database tables. These check the logical validity of the data and report inconsistencies. These report perograms are to run in the middle of the night, so there is no user interacction, chron just runs the report program via gbx3. An example is "check_duplicate_orders" (hereafter "CDO") which looks for instanes of orders created in the last 24 hours that look like they may be duplicates created by the user submitting an order, chnaging a detail and submitting it again. 99% of the time the report will be "empty". DESIRED DESIGN The CDO program runs its' validity checking logic on the orders database and if nay instances that nee to be followed up are encountered outputs the identification details to a "temporary" "suspects" table. It then runs the contained report that prints the contents of that suspects table to a file, The report consists of a header, a body and a footer sections. What I want is 2 body sections, one that prints the details of each suspect order (Body) and one that just prints "NO SUSPECT ORDERS FOUND" (AltBody). So I want these two to be conditional on the "suspects" table row count. WHAT I'VE TRIED In the Report_Open handler I query the suspects table and if the result row count is > 0 set the body section DataCount to that value and the AltBody.Visible to false. Or if the row count is 0 then set the body section visible to false and the AltBody.Visible to true.. If $CDO.RowCount > 0 Then hbxData.DataCount = $CDO.RowCount ' hbxData.Visible is True by default lblNoRows.Visible = False Else hbxData.Visible = False lblNoRows.Visible = True Endif But both sections are always printed. Is that clear now? tia bruce From bsteers4 at gmail.com Sun Nov 22 19:35:08 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Sun, 22 Nov 2020 18:35:08 +0000 Subject: [Gambas-user] a lot if crashes In-Reply-To: <74235e14-3082-da05-6947-0bd3595753df@gmail.com> References: <8d52ceff-6dab-c8a9-10fa-33e6f0240c15@cd-bahia.com> <74235e14-3082-da05-6947-0bd3595753df@gmail.com> Message-ID: I mean when i first run the IDE. Not running my app just loading the IDE. If i right click anything in the form designer i get no menu. so i hit ctrl-c on the keyboard and the menus show after that. Dunno why ctrl-c fixes it, i discovered that fix when i 1st reported the bug and found after opening the system info page and pressing "Copy" to copy the text, that also fixed the bug. so i tried ctrl-C on the designer and it worked too. Odd , and somewhat intermittent for some reason, i've reported it happening , gone , happening again, gone again. I thought it had gone after downloading todays daily but it started happening again. BruceS On Sun, 22 Nov 2020 at 17:27, Bruce wrote: > On 23/11/20 2:49 am, Bruce Steers wrote: > > its got a few issues at present. some big changes often cause big > problems. > > i find (and have for a while , and reported bug) i cannot use right-click > > to pop up the menu on controls in my app in the IDE when it first loads.. > > Right click does not work until i hit Ctrl-C on the keyboard !! > > When you say "in my app in the IDE" do you mean that you can't use the > form designer when your program is running? Or that the popup menu in > your program active form is not working? > > b > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Sun Nov 22 19:47:39 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Sun, 22 Nov 2020 18:47:39 +0000 Subject: [Gambas-user] a lot if crashes In-Reply-To: <952e3502-86c4-fdcd-6461-d9fc56c96b69@gmail.com> References: <8d52ceff-6dab-c8a9-10fa-33e6f0240c15@cd-bahia.com> <952e3502-86c4-fdcd-6461-d9fc56c96b69@gmail.com> Message-ID: I only thought it worth mentioning as the wiki says the temp folders get removed when your app closes. But that's not the case. so I thought maybe a fault? (often leaves a Jit folder in each one.) it does not worry me that they are there, tmp folder gets reset on reboot , the worry is if gambas is broken and not cleaning up properly, temp files/memory addresses/etc. the folders i can see, memory addresses are not so easy to notice. but defo experiencing odd behaviour and rebooting to sort it out. (deleting tmp folders does not help with this) BruceS On Sun, 22 Nov 2020 at 17:18, Bruce wrote: > On 23/11/20 2:49 am, Bruce Steers wrote: > > also finding lots of folders in my /tmp/gambas.1000 directory after a > long > > coding session. > > again better after a reboot. > > You will get a new subfolder every time you click Run un the IDE. Most > times these will be empty unless your program crashes. > > If they really worry you, there is no need to reboot, just close all > running gambas processes and delete the /tmp/gambas.1000 directory. > > b > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Sun Nov 22 21:31:20 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Sun, 22 Nov 2020 20:31:20 +0000 Subject: [Gambas-user] shell highlighting on non beta gambas In-Reply-To: References: <8c462b4d-3ae0-32c8-5e89-ffa3cd1f4106@deganius.de> Message-ID: ooh , that's a good idea :) Not sure how i go about that though? Is it possible to remove say "gb.form.terminalview" from my project properties so it does not use the /usr/lib/gambas3/ version and load my patched version manually ? and still see all the class properties in the IDE? Thanks :) BruceS On Sun, 22 Nov 2020 at 07:16, Fabien Bodard wrote: > One solution if it is about just Gambas writen components will be to just > copy and embedded these corrected component directly in your app. Then when > the time come, you can modify your app and use the gb Env component again. > In this way it is transparent for the end user. > > Fabien > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gambas.fr at gmail.com Sun Nov 22 22:21:25 2020 From: gambas.fr at gmail.com (Fabien Bodard) Date: Sun, 22 Nov 2020 22:21:25 +0100 Subject: [Gambas-user] gb.report2 Conditional sections In-Reply-To: <24f7bb02-b441-1148-73ef-d82ad97af6e7@gmail.com> References: <24f7bb02-b441-1148-73ef-d82ad97af6e7@gmail.com> Message-ID: SO ... h hohooo Well humm .. ;-) The problem is that I've not managed the visible property. Why ? ... I think I've been busy since this time. Are you using the devel version of Gambas ? The other way will be to make your report class dynamically and jump the section you not use. For Info a ReportSection in gambas Report2 is like a chapter. Can you send me your report.report and report.class ? best regards, Fabien Le dim. 22 nov. 2020 ? 19:03, Bruce a ?crit : > > On 22/11/20 8:12 pm, Fabien Bodard wrote: > > Hi Bruce, > > > > I need to know more about your need to go further. > > > > > > Le sam. 21 nov. 2020 ? 19:27, Bruce a ?crit : > >> > >> Is there a way to set a reportSection to print or not print given a > >> certain condition? For example, if there is no data for some reporthbox > >> then the hbox should not print but instead a reportLabel with "NO DATA" > >> should be printed. > >> > >> tia > >> bruce > >> > >> ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > > > > > > > > OK, Fabien, here goes. > > BACKGROUND > I am writing a series of programs that analyse and report on various > databases and database tables. These check the logical validity of the > data and report inconsistencies. These report perograms are to run in > the middle of the night, so there is no user interacction, chron just > runs the report program via gbx3. > > An example is "check_duplicate_orders" (hereafter "CDO") which looks for > instanes of orders created in the last 24 hours that look like they may > be duplicates created by the user submitting an order, chnaging a detail > and submitting it again. 99% of the time the report will be "empty". > > DESIRED DESIGN > The CDO program runs its' validity checking logic on the orders database > and if nay instances that nee to be followed up are encountered outputs > the identification details to a "temporary" "suspects" table. > It then runs the contained report that prints the contents of that > suspects table to a file, > > The report consists of a header, a body and a footer sections. What I > want is 2 body sections, one that prints the details of each suspect > order (Body) and one that just prints "NO SUSPECT ORDERS FOUND" > (AltBody). So I want these two to be conditional on the "suspects" table > row count. > > WHAT I'VE TRIED > In the Report_Open handler I query the suspects table and if the result > row count is > 0 set the body section DataCount to that value and the > AltBody.Visible to false. Or if the row count is 0 then set the body > section visible to false and the AltBody.Visible to true.. > If $CDO.RowCount > 0 Then > hbxData.DataCount = $CDO.RowCount > ' hbxData.Visible is True by default > lblNoRows.Visible = False > Else > hbxData.Visible = False > lblNoRows.Visible = True > Endif > > But both sections are always printed. > > Is that clear now? > > tia > bruce > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -- Fabien Bodard From chrisml at deganius.de Sun Nov 22 22:33:06 2020 From: chrisml at deganius.de (Christof Thalhofer) Date: Sun, 22 Nov 2020 22:33:06 +0100 Subject: [Gambas-user] a lot if crashes In-Reply-To: References: <8d52ceff-6dab-c8a9-10fa-33e6f0240c15@cd-bahia.com> <952e3502-86c4-fdcd-6461-d9fc56c96b69@gmail.com> Message-ID: <38869707-482b-e7c9-ef5e-2473ac0766f8@deganius.de> Am 22.11.20 um 19:47 schrieb Bruce Steers: > I only thought it worth mentioning as the wiki says the temp folders get > removed when your app closes. > But that's not the case. so I thought maybe a fault? If an app crashes Gambas cannot cleanup /tmp If you are developing an app, every time you hit F5 a separate Gambas process starts and creates it's environment in /tmp/gambas.$uid/$procid When you stop it while debugging or the process crashes the directory /tmp/gambas.$uid/$procid will not be cleaned up. So after a while of playing around while programming and debugging it creates a couple of directories there: ~ ? ls /tmp/gambas.1000 15914 15914.in 15914.out 16089 16271 16283 16293 16303 The IDE also has it's temp folder there. When you delete it the IDE crashes. Alles Gute Christof Thalhofer -- Dies ist keine Signatur -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From gambas.fr at gmail.com Sun Nov 22 22:47:56 2020 From: gambas.fr at gmail.com (Fabien Bodard) Date: Sun, 22 Nov 2020 22:47:56 +0100 Subject: [Gambas-user] shell highlighting on non beta gambas In-Reply-To: References: <8c462b4d-3ae0-32c8-5e89-ffa3cd1f4106@deganius.de> Message-ID: Le dim. 22 nov. 2020 ? 21:32, Bruce Steers a ?crit : > > ooh , that's a good idea :) > > Not sure how i go about that though? > > Is it possible to remove say "gb.form.terminalview" from my project properties so it does not use the /usr/lib/gambas3/ version and load my patched version manually ? > and still see all the class properties in the IDE? yes :-) One way is to copy the widget code in your own project add all the widget classesin a specific folder the ide will allow you to use it like with an extern widget. It's a little bit heavy the other way is to make a library stored on the side of your exe. In this library you share your own version of widget. > > Thanks :) > BruceS > > On Sun, 22 Nov 2020 at 07:16, Fabien Bodard wrote: >> >> One solution if it is about just Gambas writen components will be to just copy and embedded these corrected component directly in your app. Then when the time come, you can modify your app and use the gb Env component again. In this way it is transparent for the end user. >> >> Fabien >> >> ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -- Fabien Bodard From gambas.fr at gmail.com Sun Nov 22 22:59:21 2020 From: gambas.fr at gmail.com (Fabien Bodard) Date: Sun, 22 Nov 2020 22:59:21 +0100 Subject: [Gambas-user] DataSource Message-ID: I need help.. I want my datasource reach a given line given one field and not a line index... how can I achieve that quickly ... Actually I'm doing it by a Force and stupid way. Static Private reference As String Public Sub Run(Value As String) reference = Value FClientEdit.Showmodal End Public Sub Form_Open() Dim i As Integer Dim aGeo As String[] '----- HERE HOW TO FIND LINE :-/ -------------- DataSource1.MoveFirst For i = 0 To DataSource1.Count - 1 If DataSource1["reference"] = reference Then Break DataSource1.MoveNext Next '------------------------------------------- Me.Text = DataSource1["reference"] & " - " & DataSource1["nom"] & " " & DataSource1["prenom"] If Not DataSource1!geo Then MapView1.Enabled = False Else MapView1.Map.AddTile("OpenStreetMap", "http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", Null).Copyright = "? OpenStreetMap " & ("contributors") MapView1.Map.Zoom = 12 MapView1.Map.AddShape("clients") aGeo = Split(DataSource1!geo, " ") MapView1.Map.Center = MapPoint(aGeo[0], aGeo[1]) MapView1.Map["clients"].AddPoint(DataSource1!reference, MapPoint(aGeo[0], aGeo[1])) Endif End -- Fabien Bodard -------------- next part -------------- A non-text attachment was scrubbed... Name: Capture d??cran du 2020-11-22 22-59-05.png Type: image/png Size: 103331 bytes Desc: not available URL: From adamnt42 at gmail.com Mon Nov 23 00:30:10 2020 From: adamnt42 at gmail.com (Bruce) Date: Mon, 23 Nov 2020 10:00:10 +1030 Subject: [Gambas-user] gb.report2 Conditional sections In-Reply-To: References: <24f7bb02-b441-1148-73ef-d82ad97af6e7@gmail.com> Message-ID: <27c4f111-aa31-ccab-4e04-c098841b3628@gmail.com> On 23/11/20 7:51 am, Fabien Bodard wrote: > Are you using the > devel version of Gambas ? No, version 3.15.2 (origin/stable) > > Can you send me your report.report and report.class ? I have attached a modified version of Gialuigi's report tester that simulates the situation. Runningit should generate an empty report about 1 in three times. regards bruce -------------- next part -------------- A non-text attachment was scrubbed... Name: ReportTest-0.1.2.tar.gz Type: application/gzip Size: 25308 bytes Desc: not available URL: From t.lee.davidson at gmail.com Mon Nov 23 04:58:12 2020 From: t.lee.davidson at gmail.com (T Lee Davidson) Date: Sun, 22 Nov 2020 22:58:12 -0500 Subject: [Gambas-user] DataSource In-Reply-To: References: Message-ID: On 11/22/20 4:59 PM, Fabien Bodard wrote: > I need help.. > > I want my datasource reach a given line given one field and not a line > index... how can I achieve that quickly ... Actually I'm doing it by a > Force and stupid way. > > > Static Private reference As String > > Public Sub Run(Value As String) > > reference = Value > FClientEdit.Showmodal > > End > > Public Sub Form_Open() > > Dim i As Integer > Dim aGeo As String[] > > '----- HERE HOW TO FIND LINE :-/ -------------- > DataSource1.MoveFirst > For i = 0 To DataSource1.Count - 1 > If DataSource1["reference"] = reference Then Break > DataSource1.MoveNext > Next > '------------------------------------------- DataSource1.Table = "SELECT * FROM `table` where `reference`='reference'" ? -- Lee From adamnt42 at gmail.com Mon Nov 23 07:06:04 2020 From: adamnt42 at gmail.com (Bruce) Date: Mon, 23 Nov 2020 16:36:04 +1030 Subject: [Gambas-user] Version 3.15.3 Message-ID: No release notes, no announcement. Is this just a WIP release? b From mbelmonte at belmotek.net Mon Nov 23 09:38:29 2020 From: mbelmonte at belmotek.net (Martin) Date: Mon, 23 Nov 2020 09:38:29 +0100 Subject: [Gambas-user] DataSource In-Reply-To: References: Message-ID: Hi, I don't usually use the db.form component but maybe you could use the "filter" property to restrict to a single record and then Datasource.Filter = DB.Subst ("prenom = & 1", martin) If you have a test project to take a look maybe I can think of something else. Anyway this can help too Public Sub Form_Open() ? Dim f As ResultField ? Dim res As Result ? res = db.Current.Exec("SELECT * FROM tutabla WHERE id='3'") ? If res Then ??? If res.Fields.Exist("tucampo") Then ????? Print res.Fields["tucampo"] ??? Endif ? Endif End Martin On 22/11/20 22:59, Fabien Bodard wrote: > I need help.. > > I want my datasource reach a given line given one field and not a line > index... how can I achieve that quickly ... Actually I'm doing it by a > Force and stupid way. > > > Static Private reference As String > > Public Sub Run(Value As String) > > reference = Value > FClientEdit.Showmodal > > End > > Public Sub Form_Open() > > Dim i As Integer > Dim aGeo As String[] > > '----- HERE HOW TO FIND LINE :-/ -------------- > DataSource1.MoveFirst > For i = 0 To DataSource1.Count - 1 > If DataSource1["reference"] = reference Then Break > DataSource1.MoveNext > Next > '------------------------------------------- > > Me.Text = DataSource1["reference"] & " - " & DataSource1["nom"] & " > " & DataSource1["prenom"] > > If Not DataSource1!geo Then > MapView1.Enabled = False > Else > MapView1.Map.AddTile("OpenStreetMap", > "http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", Null).Copyright = > "? OpenStreetMap " & ("contributors") > MapView1.Map.Zoom = 12 > MapView1.Map.AddShape("clients") > aGeo = Split(DataSource1!geo, " ") > MapView1.Map.Center = MapPoint(aGeo[0], aGeo[1]) > MapView1.Map["clients"].AddPoint(DataSource1!reference, > MapPoint(aGeo[0], aGeo[1])) > Endif > > End > > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: From rwe-sse at osnanet.de Mon Nov 23 11:05:09 2020 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Mon, 23 Nov 2020 11:05:09 +0100 Subject: [Gambas-user] GridView Refresh under Mate Message-ID: <62373389-c810-b6a1-73e0-90b206f8cfdb@osnanet.de> As far as I could see, under Ubuntu Mate (18.04) the GridView doesn't refresh automagically as often as under KDE. Is that correct? I have several screens, and when I return to a screen with a Gambas program including a GridView, it will keep its old state until I click into it or actually do anything with the program and Refresh is called. Under KDE each time the screen appeared or another window changed within the screen, GridViews would call their Data loop. This was sometimes too much and kinda annoying, but you could at least be sure the contents was always up-to-date. Is there a way to force this behaviour, or would it be wiser to include a Timer with a Refresh call? Regards Rolf From gambas.fr at gmail.com Mon Nov 23 11:08:14 2020 From: gambas.fr at gmail.com (Fabien Bodard) Date: Mon, 23 Nov 2020 11:08:14 +0100 Subject: [Gambas-user] DataSource In-Reply-To: References: Message-ID: My question is just about the ability to edit data if I use a filter on the datasource. Le lun. 23 nov. 2020 ? 09:39, Martin a ?crit : > Hi, > > I don't usually use the db.form component but maybe you could use the > "filter" property to restrict to a single record and then > Datasource.Filter = DB.Subst ("prenom = & 1", martin) > If you have a test project to take a look maybe I can think of something > else. > > Anyway this can help too > > > Public Sub Form_Open() > > Dim f As ResultField > Dim res As Result > > res = db.Current.Exec("SELECT * FROM tutabla WHERE id='3'") > > If res Then > If res.Fields.Exist("tucampo") Then > Print res.Fields["tucampo"] > Endif > Endif > > End > > Martin > On 22/11/20 22:59, Fabien Bodard wrote: > > I need help.. > > I want my datasource reach a given line given one field and not a line > index... how can I achieve that quickly ... Actually I'm doing it by a > Force and stupid way. > > > Static Private reference As String > > Public Sub Run(Value As String) > > reference = Value > FClientEdit.Showmodal > > End > > Public Sub Form_Open() > > Dim i As Integer > Dim aGeo As String[] > > '----- HERE HOW TO FIND LINE :-/ -------------- > DataSource1.MoveFirst > For i = 0 To DataSource1.Count - 1 > If DataSource1["reference"] = reference Then Break > DataSource1.MoveNext > Next > '------------------------------------------- > > Me.Text = DataSource1["reference"] & " - " & DataSource1["nom"] & " > " & DataSource1["prenom"] > > If Not DataSource1!geo Then > MapView1.Enabled = False > Else > MapView1.Map.AddTile("OpenStreetMap","http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png" , Null).Copyright = > "? OpenStreetMap " & ("contributors") > MapView1.Map.Zoom = 12 > MapView1.Map.AddShape("clients") > aGeo = Split(DataSource1!geo, " ") > MapView1.Map.Center = MapPoint(aGeo[0], aGeo[1]) > MapView1.Map["clients"].AddPoint(DataSource1!reference, > MapPoint(aGeo[0], aGeo[1])) > Endif > > End > > > > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mbelmonte at belmotek.net Mon Nov 23 11:53:49 2020 From: mbelmonte at belmotek.net (Martin) Date: Mon, 23 Nov 2020 11:53:49 +0100 Subject: [Gambas-user] DataSource In-Reply-To: References: Message-ID: The answer is .Create In this example, I use a temporary control to edit the data and then delete the control, you could hide it instead of deleting it. If you already have controls on your form, simply use .Create Sorry but I couldn't find a way to do it without a data control. Public Sub Form_Open() ? Dim tb As Table ? Dim fd As Field ? Dim dt As DataControl ? DataSource1.Connection.Open ? DataSource1.Table = "clients" ? DataSource1.Filter = db.Subst("cname = &1", "martin") ? DataSource1.MoveFirst ? dt = New DataControl(DataSource1) As "dat" ? With dt ??? .Name = "temportal" ??? .Field = "cphone" ??? .Value = Format(Now(), "hhnnss.u") ? End With ? dt.Refresh End Public Sub Button1_Click() ? Dim tdat As Control ? DataSource1.Create ? For Each tdat In DataSource1.Children ??? If tdat.Name = "temportal" Then ????? tdat.Delete ??? Endif ? Next Martin On 23/11/20 11:08, Fabien Bodard wrote: > My question is just about the ability to edit data if I use a filter > on the datasource. > > Le lun. 23 nov. 2020 ? 09:39, Martin > a ?crit?: > > Hi, > > I don't usually use the db.form component but maybe you could use > the "filter" property to restrict to a single record and then > Datasource.Filter = DB.Subst ("prenom = & 1", martin) > If you have a test project to take a look maybe I can think of > something else. > > Anyway this can help too > > > Public Sub Form_Open() > > ? Dim f As ResultField > ? Dim res As Result > > ? res = db.Current.Exec("SELECT * FROM tutabla WHERE id='3'") > > ? If res Then > ??? If res.Fields.Exist("tucampo") Then > ????? Print res.Fields["tucampo"] > ??? Endif > ? Endif > > End > > Martin > > On 22/11/20 22:59, Fabien Bodard wrote: >> I need help.. >> >> I want my datasource reach a given line given one field and not a line >> index... how can I achieve that quickly ... Actually I'm doing it by a >> Force and stupid way. >> >> >> Static Private reference As String >> >> Public Sub Run(Value As String) >> >> reference = Value >> FClientEdit.Showmodal >> >> End >> >> Public Sub Form_Open() >> >> Dim i As Integer >> Dim aGeo As String[] >> >> '----- HERE HOW TO FIND LINE :-/ -------------- >> DataSource1.MoveFirst >> For i = 0 To DataSource1.Count - 1 >> If DataSource1["reference"] = reference Then Break >> DataSource1.MoveNext >> Next >> '------------------------------------------- >> >> Me.Text = DataSource1["reference"] & " - " & DataSource1["nom"] & " >> " & DataSource1["prenom"] >> >> If Not DataSource1!geo Then >> MapView1.Enabled = False >> Else >> MapView1.Map.AddTile("OpenStreetMap", >> "http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png" , Null).Copyright = >> "? OpenStreetMap " & ("contributors") >> MapView1.Map.Zoom = 12 >> MapView1.Map.AddShape("clients") >> aGeo = Split(DataSource1!geo, " ") >> MapView1.Map.Center = MapPoint(aGeo[0], aGeo[1]) >> MapView1.Map["clients"].AddPoint(DataSource1!reference, >> MapPoint(aGeo[0], aGeo[1])) >> Endif >> >> End >> >> >> >> ----[http://gambaswiki.org/wiki/doc/netiquette ]---- > > ----[ http://gambaswiki.org/wiki/doc/netiquette > ]---- > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: From g4mba5 at gmail.com Mon Nov 23 15:00:55 2020 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Mon, 23 Nov 2020 15:00:55 +0100 Subject: [Gambas-user] Version 3.15.3 In-Reply-To: References: Message-ID: <693fcd68-48a8-955a-a961-98fbe41acc64@gmail.com> Le 23/11/2020 ? 07:06, Bruce a ?crit?: > No release notes, no announcement. Is this just a WIP release? > b > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- Yes. -- Beno?t Minisini From g4mba5 at gmail.com Mon Nov 23 15:01:45 2020 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Mon, 23 Nov 2020 15:01:45 +0100 Subject: [Gambas-user] GridView Refresh under Mate In-Reply-To: <62373389-c810-b6a1-73e0-90b206f8cfdb@osnanet.de> References: <62373389-c810-b6a1-73e0-90b206f8cfdb@osnanet.de> Message-ID: Le 23/11/2020 ? 11:05, Rolf-Werner Eilert a ?crit?: > As far as I could see, under Ubuntu Mate (18.04) the GridView doesn't > refresh automagically as often as under KDE. > > Is that correct? I have several screens, and when I return to a screen > with a Gambas program including a GridView, it will keep its old state > until I click into it or actually do anything with the program and > Refresh is called. Under KDE each time the screen appeared or another > window changed within the screen, GridViews would call their Data loop. > > This was sometimes too much and kinda annoying, but you could at least > be sure the contents was always up-to-date. > > Is there a way to force this behaviour, or would it be wiser to include > a Timer with a Refresh call? > > Regards > Rolf > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- It's a bug, but I need a project that reproduces it. -- Beno?t Minisini From rwe-sse at osnanet.de Mon Nov 23 16:04:22 2020 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Mon, 23 Nov 2020 16:04:22 +0100 Subject: [Gambas-user] GridView Refresh under Mate In-Reply-To: References: <62373389-c810-b6a1-73e0-90b206f8cfdb@osnanet.de> Message-ID: Am 23.11.20 um 15:01 schrieb Beno?t Minisini: > Le 23/11/2020 ? 11:05, Rolf-Werner Eilert a ?crit?: >> As far as I could see, under Ubuntu Mate (18.04) the GridView doesn't >> refresh automagically as often as under KDE. >> >> Is that correct? I have several screens, and when I return to a screen >> with a Gambas program including a GridView, it will keep its old state >> until I click into it or actually do anything with the program and >> Refresh is called. Under KDE each time the screen appeared or another >> window changed within the screen, GridViews would call their Data loop. >> >> This was sometimes too much and kinda annoying, but you could at least >> be sure the contents was always up-to-date. >> >> Is there a way to force this behaviour, or would it be wiser to >> include a Timer with a Refresh call? >> >> Regards >> Rolf >> >> ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > > It's a bug, but I need a project that reproduces it. > Ok... I will try to make a short digest of the project. It runs within the data scope of our school, so I cannot copy the data it handles. Or would the pure code help alreay? Regards Rolf From g4mba5 at gmail.com Mon Nov 23 16:12:48 2020 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Mon, 23 Nov 2020 16:12:48 +0100 Subject: [Gambas-user] GridView Refresh under Mate In-Reply-To: References: <62373389-c810-b6a1-73e0-90b206f8cfdb@osnanet.de> Message-ID: <48baece3-98cf-ab95-26f7-d4e4312317ba@gmail.com> Le 23/11/2020 ? 16:04, Rolf-Werner Eilert a ?crit?: > Am 23.11.20 um 15:01 schrieb Beno?t Minisini: >> Le 23/11/2020 ? 11:05, Rolf-Werner Eilert a ?crit?: >>> As far as I could see, under Ubuntu Mate (18.04) the GridView doesn't >>> refresh automagically as often as under KDE. >>> >>> Is that correct? I have several screens, and when I return to a >>> screen with a Gambas program including a GridView, it will keep its >>> old state until I click into it or actually do anything with the >>> program and Refresh is called. Under KDE each time the screen >>> appeared or another window changed within the screen, GridViews would >>> call their Data loop. >>> >>> This was sometimes too much and kinda annoying, but you could at >>> least be sure the contents was always up-to-date. >>> >>> Is there a way to force this behaviour, or would it be wiser to >>> include a Timer with a Refresh call? >>> >>> Regards >>> Rolf >>> >>> ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- >> >> It's a bug, but I need a project that reproduces it. >> > > Ok... I will try to make a short digest of the project. It runs within > the data scope of our school, so I cannot copy the data it handles. Or > would the pure code help alreay? > > Regards > Rolf > I just need a project that reproduces the refresh bug, otherwise I won't be able to do anything, as I have never seen such a bug on my own computer. You have to call the GridView Refresh method explicitely only if the GridView contents comes from the Data event, and when you have changed the associated data. But maybe you are doing something weird... And of course I need your system information, especially which version of Gambas you run with which toolkit. Regards, -- Beno?t Minisini From rwe-sse at osnanet.de Mon Nov 23 16:14:19 2020 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Mon, 23 Nov 2020 16:14:19 +0100 Subject: [Gambas-user] GridView Refresh under Mate In-Reply-To: References: <62373389-c810-b6a1-73e0-90b206f8cfdb@osnanet.de> Message-ID: Am 23.11.20 um 15:01 schrieb Beno?t Minisini: > Le 23/11/2020 ? 11:05, Rolf-Werner Eilert a ?crit?: >> As far as I could see, under Ubuntu Mate (18.04) the GridView doesn't >> refresh automagically as often as under KDE. >> >> Is that correct? I have several screens, and when I return to a screen >> with a Gambas program including a GridView, it will keep its old state >> until I click into it or actually do anything with the program and >> Refresh is called. Under KDE each time the screen appeared or another >> window changed within the screen, GridViews would call their Data loop. >> >> This was sometimes too much and kinda annoying, but you could at least >> be sure the contents was always up-to-date. >> >> Is there a way to force this behaviour, or would it be wiser to >> include a Timer with a Refresh call? >> >> Regards >> Rolf >> >> ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > > It's a bug, but I need a project that reproduces it. > I just found that it includes gb.qt4 and gb.qt4.ext (I remember vaguely it was necessary to get some functionality or avoid some other problem). Could that be the reason? Rolf From g4mba5 at gmail.com Mon Nov 23 16:20:53 2020 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Mon, 23 Nov 2020 16:20:53 +0100 Subject: [Gambas-user] GridView Refresh under Mate In-Reply-To: References: <62373389-c810-b6a1-73e0-90b206f8cfdb@osnanet.de> Message-ID: <5956fb26-35eb-f3b3-2e55-efdb81aaa8f2@gmail.com> Le 23/11/2020 ? 16:14, Rolf-Werner Eilert a ?crit?: > Am 23.11.20 um 15:01 schrieb Beno?t Minisini: >> Le 23/11/2020 ? 11:05, Rolf-Werner Eilert a ?crit?: >>> As far as I could see, under Ubuntu Mate (18.04) the GridView doesn't >>> refresh automagically as often as under KDE. >>> >>> Is that correct? I have several screens, and when I return to a >>> screen with a Gambas program including a GridView, it will keep its >>> old state until I click into it or actually do anything with the >>> program and Refresh is called. Under KDE each time the screen >>> appeared or another window changed within the screen, GridViews would >>> call their Data loop. >>> >>> This was sometimes too much and kinda annoying, but you could at >>> least be sure the contents was always up-to-date. >>> >>> Is there a way to force this behaviour, or would it be wiser to >>> include a Timer with a Refresh call? >>> >>> Regards >>> Rolf >>> >>> ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- >> >> It's a bug, but I need a project that reproduces it. >> > > I just found that it includes gb.qt4 and gb.qt4.ext (I remember vaguely > it was necessary to get some functionality or avoid some other problem). > > Could that be the reason? > > Rolf > No idea. -- Beno?t Minisini From gambas.fr at gmail.com Mon Nov 23 16:30:21 2020 From: gambas.fr at gmail.com (Fabien Bodard) Date: Mon, 23 Nov 2020 16:30:21 +0100 Subject: [Gambas-user] DataSource In-Reply-To: References: Message-ID: Well thank you Martin ... But that's not exactly what I'm looking for :-). I need to wait about Benoit answer ... or read myself datasource code ... Le lun. 23 nov. 2020 ? 11:54, Martin a ?crit : > > The answer is .Create > > In this example, I use a temporary control to edit the data and then delete the control, you could hide it instead of deleting it. > If you already have controls on your form, simply use .Create > > Sorry but I couldn't find a way to do it without a data control. > > Public Sub Form_Open() > > > Dim tb As Table > Dim fd As Field > Dim dt As DataControl > > DataSource1.Connection.Open > DataSource1.Table = "clients" > DataSource1.Filter = db.Subst("cname = &1", "martin") > DataSource1.MoveFirst > > dt = New DataControl(DataSource1) As "dat" > With dt > .Name = "temportal" > .Field = "cphone" > .Value = Format(Now(), "hhnnss.u") > End With > dt.Refresh > > End > > Public Sub Button1_Click() > > Dim tdat As Control > > DataSource1.Create > For Each tdat In DataSource1.Children > If tdat.Name = "temportal" Then > tdat.Delete > Endif > > Next > > Martin > > On 23/11/20 11:08, Fabien Bodard wrote: > > My question is just about the ability to edit data if I use a filter on the datasource. > > Le lun. 23 nov. 2020 ? 09:39, Martin a ?crit : >> >> Hi, >> >> I don't usually use the db.form component but maybe you could use the "filter" property to restrict to a single record and then >> Datasource.Filter = DB.Subst ("prenom = & 1", martin) >> If you have a test project to take a look maybe I can think of something else. >> >> Anyway this can help too >> >> >> Public Sub Form_Open() >> >> Dim f As ResultField >> Dim res As Result >> >> res = db.Current.Exec("SELECT * FROM tutabla WHERE id='3'") >> >> If res Then >> If res.Fields.Exist("tucampo") Then >> Print res.Fields["tucampo"] >> Endif >> Endif >> >> End >> >> Martin >> >> On 22/11/20 22:59, Fabien Bodard wrote: >> >> I need help.. >> >> I want my datasource reach a given line given one field and not a line >> index... how can I achieve that quickly ... Actually I'm doing it by a >> Force and stupid way. >> >> >> Static Private reference As String >> >> Public Sub Run(Value As String) >> >> reference = Value >> FClientEdit.Showmodal >> >> End >> >> Public Sub Form_Open() >> >> Dim i As Integer >> Dim aGeo As String[] >> >> '----- HERE HOW TO FIND LINE :-/ -------------- >> DataSource1.MoveFirst >> For i = 0 To DataSource1.Count - 1 >> If DataSource1["reference"] = reference Then Break >> DataSource1.MoveNext >> Next >> '------------------------------------------- >> >> Me.Text = DataSource1["reference"] & " - " & DataSource1["nom"] & " >> " & DataSource1["prenom"] >> >> If Not DataSource1!geo Then >> MapView1.Enabled = False >> Else >> MapView1.Map.AddTile("OpenStreetMap", >> "http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", Null).Copyright = >> "? OpenStreetMap " & ("contributors") >> MapView1.Map.Zoom = 12 >> MapView1.Map.AddShape("clients") >> aGeo = Split(DataSource1!geo, " ") >> MapView1.Map.Center = MapPoint(aGeo[0], aGeo[1]) >> MapView1.Map["clients"].AddPoint(DataSource1!reference, >> MapPoint(aGeo[0], aGeo[1])) >> Endif >> >> End >> >> >> >> ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- >> >> >> ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -- Fabien Bodard From gambas.fr at gmail.com Mon Nov 23 16:45:40 2020 From: gambas.fr at gmail.com (Fabien Bodard) Date: Mon, 23 Nov 2020 16:45:40 +0100 Subject: [Gambas-user] gb.report2 Conditional sections In-Reply-To: <27c4f111-aa31-ccab-4e04-c098841b3628@gmail.com> References: <24f7bb02-b441-1148-73ef-d82ad97af6e7@gmail.com> <27c4f111-aa31-ccab-4e04-c098841b3628@gmail.com> Message-ID: If hResult.Count > 0 Then TableLine.DataCount = hResult.Count rptAltBody.Parent.Children.Remove(rptAltBody.Parent.Children.Find(rptAltBody)) Else TableLine.Parent.Children.Remove(TableLine.Parent.Children.Find(TableLine)) Endif This do the job ... Yes It's like a work around :-) Le lun. 23 nov. 2020 ? 00:31, Bruce a ?crit : > > On 23/11/20 7:51 am, Fabien Bodard wrote: > > Are you using the > > devel version of Gambas ? > > No, version 3.15.2 (origin/stable) > > > > > Can you send me your report.report and report.class ? > > I have attached a modified version of Gialuigi's report tester that > simulates the situation. Runningit should generate an empty report about > 1 in three times. > > regards > bruce > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -- Fabien Bodard From hans at gambas-buch.de Mon Nov 23 18:53:06 2020 From: hans at gambas-buch.de (Hans Lehmann) Date: Mon, 23 Nov 2020 18:53:06 +0100 Subject: [Gambas-user] Web-Interface Message-ID: Hello, in a project i measure the temperature, which is read in via RS232 interface from a NTC temperature sensor. From the program you only see a tray icon in the task bar. Its context menu allows to display the temperature. Is it possible to add a web interface to the project, so that it is possible to display the temperature in a web browser in the local network? If this is possible, I would like to know HOW to implement it. With kind regards Hans From adamnt42 at gmail.com Mon Nov 23 19:39:22 2020 From: adamnt42 at gmail.com (Bruce) Date: Tue, 24 Nov 2020 05:09:22 +1030 Subject: [Gambas-user] gb.report2 Conditional sections In-Reply-To: References: <24f7bb02-b441-1148-73ef-d82ad97af6e7@gmail.com> <27c4f111-aa31-ccab-4e04-c098841b3628@gmail.com> Message-ID: <82f08700-721d-fa74-6255-4727977af553@gmail.com> On 24/11/20 2:15 am, Fabien Bodard wrote: > If hResult.Count > 0 Then > TableLine.DataCount = hResult.Count > rptAltBody.Parent.Children.Remove(rptAltBody.Parent.Children.Find(rptAltBody)) > > Else > > TableLine.Parent.Children.Remove(TableLine.Parent.Children.Find(TableLine)) > > Endif > > This do the job ... Yes It's like a work around:-) Thank you Fabien, that solves about 80% of my tasks! I do not think though that it would work if the conditional sections are ontained within a hicher level section. Suppose we have "alternitve subsections like: Report Body Section for Type A data Section for Type B data and I need to print 24 type A's and 12 Type B's in random order. Would the workaround work in that case? (Just a quick answer needed.) Or also "Optional" sections like: Report Body Section for say "Order.lineItem" Optional section for line item comments like "Out of Stock" Option Section for say "Promo message" e.g. "Have you tried ... I have a feeling that removing the children wont work for these. I am not too worried about these cases at the moment as I need to get the 80% done. I just raise them as other "section types" that need to be considered, i.e. "conditional", "alternative" and "optional". regards bruce From adamnt42 at gmail.com Mon Nov 23 19:52:18 2020 From: adamnt42 at gmail.com (Bruce) Date: Tue, 24 Nov 2020 05:22:18 +1030 Subject: [Gambas-user] gb.report2 Conditional sections In-Reply-To: References: <24f7bb02-b441-1148-73ef-d82ad97af6e7@gmail.com> <27c4f111-aa31-ccab-4e04-c098841b3628@gmail.com> Message-ID: Also, :-) If you are considering revitalising the component it would be really nice if we could have more control over the preview like setting the magnifivation to 100% snd hiding the printer toolbox. regards bruce From gambas.fr at gmail.com Mon Nov 23 19:57:32 2020 From: gambas.fr at gmail.com (Fabien Bodard) Date: Mon, 23 Nov 2020 19:57:32 +0100 Subject: [Gambas-user] gb.report2 Conditional sections In-Reply-To: <82f08700-721d-fa74-6255-4727977af553@gmail.com> References: <24f7bb02-b441-1148-73ef-d82ad97af6e7@gmail.com> <27c4f111-aa31-ccab-4e04-c098841b3628@gmail.com> <82f08700-721d-fa74-6255-4727977af553@gmail.com> Message-ID: Le lun. 23 nov. 2020 ? 19:40, Bruce a ?crit : > On 24/11/20 2:15 am, Fabien Bodard wrote: > > If hResult.Count > 0 Then > > TableLine.DataCount = hResult.Count > > > rptAltBody.Parent.Children.Remove(rptAltBody.Parent.Children.Find(rptAltBody)) > > > > Else > > > > > TableLine.Parent.Children.Remove(TableLine.Parent.Children.Find(TableLine)) > > > > Endif > > > > This do the job ... Yes It's like a work around:-) > > Thank you Fabien, that solves about 80% of my tasks! > > I do not think though that it would work if the conditional sections are > ontained within a hicher level section. Suppose we have "alternitve > subsections like: > > Report > Body > Section for Type A data > Section for Type B data > > and I need to print 24 type A's and 12 Type B's in random order. > Would the workaround work in that case? (Just a quick answer needed.) > Yes.. all depend of you basis structure.. Removing the line container disable the Reading loop from datacount. There is not difference between removing a child and doing like it not exist in the visible property case.. just the second is reversible and not need a new instance to be reinitialisate. I'm nevertheless going to activate visible property for next releases. Another thing that can be usefull can be a way to escape the line repetition if a result is not good.. well but report is just a display tool. > Or also "Optional" sections like: > > Report > Body > Section for say "Order.lineItem" > Optional section for line item comments like "Out of Stock" > Option Section for say "Promo message" e.g. "Have you > tried ... > > I have a feeling that removing the children wont work for these. > I am not too worried about these cases at the moment as I need to get > the 80% done. I just raise them as other "section types" that need to be > considered, i.e. "conditional", "alternative" and "optional". > > regards > bruce > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Mon Nov 23 21:27:08 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Mon, 23 Nov 2020 20:27:08 +0000 Subject: [Gambas-user] shell highlighting on non beta gambas In-Reply-To: References: <8c462b4d-3ae0-32c8-5e89-ffa3cd1f4106@deganius.de> Message-ID: Oh this is perfect :) i can't thank you enough Fabien. for teminalview (i wanted to use some of it's private functions and added ctrl-c/v copy/paste) just perfect, with method 1 , i didn't really want to have an external library but to be all inclusive so i added the code folder and made it fit the puzzle and it's ideal, now it's included in the app and compatible down to 3.12 The answer to all my problems :) TextEditor is being a pain though. if i can get working shell highlight in my editor across versions i'm happy. gotta include gb.eval.highlight too, i think my mistake was migrating in the controls from a newer gambas, had issues with an unknown command. I will study it further. But loving this solution, it stops me getting people to install a custom components into their gambas ;) Thanks again :) BruceS On Sun, 22 Nov 2020 at 21:49, Fabien Bodard wrote: > Le dim. 22 nov. 2020 ? 21:32, Bruce Steers a ?crit : > > > > ooh , that's a good idea :) > > > > Not sure how i go about that though? > > > > Is it possible to remove say "gb.form.terminalview" from my project > properties so it does not use the /usr/lib/gambas3/ version and load my > patched version manually ? > > and still see all the class properties in the IDE? > > yes :-) > > One way is to copy the widget code in your own project add all the > widget classesin a specific folder > > the ide will allow you to use it like with an extern widget. It's a > little bit heavy > > the other way is to make a library stored on the side of your exe. In > this library you share your own version of widget. > > > > > > > > Thanks :) > > BruceS > > > > On Sun, 22 Nov 2020 at 07:16, Fabien Bodard wrote: > >> > >> One solution if it is about just Gambas writen components will be to > just copy and embedded these corrected component directly in your app. Then > when the time come, you can modify your app and use the gb Env component > again. In this way it is transparent for the end user. > >> > >> Fabien > >> > >> ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > > > > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > > > > -- > Fabien Bodard > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From g4mba5 at gmail.com Mon Nov 23 21:36:11 2020 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Mon, 23 Nov 2020 21:36:11 +0100 Subject: [Gambas-user] DataSource In-Reply-To: References: Message-ID: Le 22/11/2020 ? 22:59, Fabien Bodard a ?crit?: > I need help.. > > I want my datasource reach a given line given one field and not a line > index... how can I achieve that quickly ... Actually I'm doing it by a > Force and stupid way. > > > Static Private reference As String > > Public Sub Run(Value As String) > > reference = Value > FClientEdit.Showmodal > > End > > Public Sub Form_Open() > > Dim i As Integer > Dim aGeo As String[] > > '----- HERE HOW TO FIND LINE :-/ -------------- > DataSource1.MoveFirst > For i = 0 To DataSource1.Count - 1 > If DataSource1["reference"] = reference Then Break > DataSource1.MoveNext > Next > '------------------------------------------- Hi Fabien, I have added in the last commit the Find() and FindNext() method to the DataSource class. They should do what your want. I first thought it was impossible, but I didn't know the ROW_NUMBER() SQL function, that hopefully is present in Sqlite, MySQL and PostgreSQL. But beware, only since version 8 in MySQL. You use them that way: iIndex = DataSource1.Find("reference = &1", reference) Find() returns the index of the first matching row. FindNext() returns the index of the first matching row next to the current DataSource position. Anyway, it will be faster to not use DataSource for that, and use direct requests to the database. Regards, -- Beno?t Minisini From gambas.fr at gmail.com Tue Nov 24 05:14:50 2020 From: gambas.fr at gmail.com (Fabien Bodard) Date: Tue, 24 Nov 2020 05:14:50 +0100 Subject: [Gambas-user] DataSource In-Reply-To: References: Message-ID: > > > Hi Fabien, > > I have added in the last commit the Find() and FindNext() method to the > DataSource class. They should do what your want. > > Thank you ? > > I first thought it was impossible, but I didn't know the ROW_NUMBER() > SQL function, that hopefully is present in Sqlite, MySQL and PostgreSQL. > But beware, only since version 8 in MySQL. > > You use them that way: > > iIndex = DataSource1.Find("reference = &1", reference) > > Find() returns the index of the first matching row. > FindNext() returns the index of the first matching row next to the > current DataSource position. > > Anyway, it will be faster to not use DataSource for that, and use direct > requests to the database. > Not use for what thing ? Editing or finding the row ? Regards, > > -- > Beno?t Minisini > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]----,x > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gambas.fr at gmail.com Tue Nov 24 11:11:43 2020 From: gambas.fr at gmail.com (Fabien Bodard) Date: Tue, 24 Nov 2020 11:11:43 +0100 Subject: [Gambas-user] shell highlighting on non beta gambas In-Reply-To: References: <8c462b4d-3ae0-32c8-5e89-ffa3cd1f4106@deganius.de> Message-ID: Le lun. 23 nov. 2020 ? 21:28, Bruce Steers a ?crit : > Oh this is perfect :) i can't thank you enough Fabien. > > for teminalview (i wanted to use some of it's private functions and added > ctrl-c/v copy/paste) > just perfect, with method 1 , i didn't really want to have an external > library but to be all inclusive > so i added the code folder and made it fit the puzzle and it's ideal, now > it's included in the app and compatible down to 3.12 > > The answer to all my problems :) > > TextEditor is being a pain though. > if i can get working shell highlight in my editor across versions i'm > happy. > gotta include gb.eval.highlight too, i think my mistake was migrating in > the controls from a newer gambas, had issues with an unknown command. I > will study it further. > > But loving this solution, it stops me getting people to install a custom > components into their gambas ;) > > Thanks again :) > BruceS > > > On Sun, 22 Nov 2020 at 21:49, Fabien Bodard wrote: > >> Le dim. 22 nov. 2020 ? 21:32, Bruce Steers a ?crit : >> > >> > ooh , that's a good idea :) >> > >> > Not sure how i go about that though? >> > >> > Is it possible to remove say "gb.form.terminalview" from my project >> properties so it does not use the /usr/lib/gambas3/ version and load my >> patched version manually ? >> > and still see all the class properties in the IDE? >> >> yes :-) >> >> One way is to copy the widget code in your own project add all the >> widget classesin a specific folder >> >> the ide will allow you to use it like with an extern widget. It's a >> little bit heavy >> >> the other way is to make a library stored on the side of your exe. In >> this library you share your own version of widget. >> > Just remember Gambas is really really powerfull and under understrand ans under estimate ?. But part of the fault is the lack of hands and time. But for sure for me it will be the linux tool of my life .. near to 20 year now.. arf > >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From gambas.fr at gmail.com Tue Nov 24 12:13:59 2020 From: gambas.fr at gmail.com (Fabien Bodard) Date: Tue, 24 Nov 2020 12:13:59 +0100 Subject: [Gambas-user] Web-Interface In-Reply-To: References: Message-ID: I think the best will be to share the value via a common file. Then you write a secondary program for web that display the value from the file ... and read the file regularly. But in all cases the both programs must to be separate. Another funny thing can be to share the value via dbus :-P so you can sync the update. Use the gambas web form :-) Le lun. 23 nov. 2020 ? 19:17, Hans Lehmann a ?crit : > > Hello, > > in a project i measure the temperature, which is read in via RS232 > interface from a NTC temperature sensor. From the program you only see a > tray icon in the task bar. Its context menu allows to display the > temperature. Is it possible to add a web interface to the project, so > that it is possible to display the temperature in a web browser in the > local network? If this is possible, I would like to know HOW to > implement it. > > With kind regards > > Hans > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -- Fabien Bodard From bsteers4 at gmail.com Tue Nov 24 17:32:29 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Tue, 24 Nov 2020 16:32:29 +0000 Subject: [Gambas-user] shell highlighting on non beta gambas In-Reply-To: References: <8c462b4d-3ae0-32c8-5e89-ffa3cd1f4106@deganius.de> Message-ID: The answer to all my problems :) >> >> TextEditor is being a pain though. >> if i can get working shell highlight in my editor across versions i'm >> happy. >> gotta include gb.eval.highlight too, i think my mistake was migrating in >> the controls from a newer gambas, had issues with an unknown command. I >> will study it further. >> >> But loving this solution, it stops me getting people to install a custom >> components into their gambas ;) >> >> Thanks again :) >> BruceS >> > I figured out importing the texteditor :) my editor now supports shell highlighting internally and other fixes even on gambas 3.12 :) i'm so happy :) Thanks again. Just remember Gambas is really really powerfull and under understrand ans > under estimate ?. But part of the fault is the lack of hands and time. But > for sure for me it will be the linux tool of my life .. near to 20 year > now.. arf > Yes i completely understand and agree. I found Gambas many years ago (was gambas2 then) and was saved as far as programming goes. I'd been on window$ using VB before that. Gambas i found wasn't as good as VB, it was better, way better. :) I wish i could help more with the lack of hands/time but i fear my knowledge just isn't good enough. Alas my eagerness to help outweighs my ability to :( All I can help with is the simpler things i think. Little adjustments I do what i can and what I think is for the better for all (and me) :) Wishing Well BruceS -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Wed Nov 25 02:37:28 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Wed, 25 Nov 2020 01:37:28 +0000 Subject: [Gambas-user] a lot if crashes In-Reply-To: <38869707-482b-e7c9-ef5e-2473ac0766f8@deganius.de> References: <8d52ceff-6dab-c8a9-10fa-33e6f0240c15@cd-bahia.com> <952e3502-86c4-fdcd-6461-d9fc56c96b69@gmail.com> <38869707-482b-e7c9-ef5e-2473ac0766f8@deganius.de> Message-ID: There is a bigger problem i think. If i load gambas IDE and do not load or run or crash anything just close the ide again it creates a folder in /tmp/gambas.1000 and leaves it there. It leaves a jit folder with some stuff in it. (i've attached the contents) this happens on every single launch of gambas IDE , a new folder is made and does not get removed on exit even if you do not do anything. Also If i load Gambas IDE into gambas IDE and run it when i close it the stop/play buttons do not change as gambas is not closing cleanly, something is holding it open like an open file handle of something like that. I have to press the stop button to go into edit mode again. So something is not right. BruceS On Sun, 22 Nov 2020 at 21:34, Christof Thalhofer wrote: > Am 22.11.20 um 19:47 schrieb Bruce Steers: > > > I only thought it worth mentioning as the wiki says the temp folders get > > removed when your app closes. > > But that's not the case. so I thought maybe a fault? > > If an app crashes Gambas cannot cleanup /tmp > > If you are developing an app, every time you hit F5 a separate Gambas > process starts and creates it's environment in /tmp/gambas.$uid/$procid > > When you stop it while debugging or the process crashes the directory > /tmp/gambas.$uid/$procid will not be cleaned up. > > So after a while of playing around while programming and debugging it > creates a couple of directories there: > > ~ ? ls /tmp/gambas.1000 > 15914 15914.in 15914.out 16089 16271 16283 16293 16303 > > The IDE also has it's temp folder there. When you delete it the IDE > crashes. > > Alles Gute > > Christof Thalhofer > > -- > Dies ist keine Signatur > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 45691.zip Type: application/zip Size: 63823 bytes Desc: not available URL: From chrisml at deganius.de Wed Nov 25 10:46:26 2020 From: chrisml at deganius.de (Christof Thalhofer) Date: Wed, 25 Nov 2020 10:46:26 +0100 Subject: [Gambas-user] a lot if crashes In-Reply-To: References: <8d52ceff-6dab-c8a9-10fa-33e6f0240c15@cd-bahia.com> <952e3502-86c4-fdcd-6461-d9fc56c96b69@gmail.com> <38869707-482b-e7c9-ef5e-2473ac0766f8@deganius.de> Message-ID: <56b74cbb-1ae7-6b9f-3b7c-5d59203a356c@deganius.de> Am 25.11.20 um 02:37 schrieb Bruce Steers: > There is a bigger problem i think. Please write a bug for that with system information and the description of what happens when. Alles Gute Christof Thalhofer -- Dies ist keine Signatur -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From bsteers4 at gmail.com Wed Nov 25 15:49:43 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Wed, 25 Nov 2020 14:49:43 +0000 Subject: [Gambas-user] a lot if crashes In-Reply-To: <56b74cbb-1ae7-6b9f-3b7c-5d59203a356c@deganius.de> References: <8d52ceff-6dab-c8a9-10fa-33e6f0240c15@cd-bahia.com> <952e3502-86c4-fdcd-6461-d9fc56c96b69@gmail.com> <38869707-482b-e7c9-ef5e-2473ac0766f8@deganius.de> <56b74cbb-1ae7-6b9f-3b7c-5d59203a356c@deganius.de> Message-ID: I gave up on the beta and uninstalled it last night. it has far too many instabilities to be usable at present. literally the only reason to install it now is to beta-test it for Ben, When it comes to my own projects it's best not to as I can't use it for all the lock ups. So as for reporting the bug, I already have here. Ben reads these mails, my last bug report showed my system. I'm not going through the hoo ha of re-installing the unstable/unusable version just to report a bug that will read ,, crashes a lot from the start, don't know why? then re-install a working version. (though actually after saying that i might have it installed on another disk, will have a look) I can't even use right mouse in 3.15.90 to popup menus in the designer at present till i copy something to the clipboard??. have reported that odd bug, weeks ago. Ben cannot reproduce the problem so not easy for him to track the bug, . You could say "must by my system then" but i got no other software doing this sort of thing, just Gambas 3.15.90. And with an issue like that happening right from launch i don't trust it anymore not to be corrupting memory. Hope that makes sense. BruceS On Wed, 25 Nov 2020 at 09:47, Christof Thalhofer wrote: > Am 25.11.20 um 02:37 schrieb Bruce Steers: > > > There is a bigger problem i think. > > Please write a bug for that with system information and the description > of what happens when. > > Alles Gute > > Christof Thalhofer > > -- > Dies ist keine Signatur > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Wed Nov 25 15:53:36 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Wed, 25 Nov 2020 14:53:36 +0000 Subject: [Gambas-user] using search crashing ide (sometimes) Message-ID: Anybody else finding the IDE locks up (3.15.90) when using the search function from the ide searchbox not the pop up search window? And not all the time, just sometimes making it impossible to know just why? Or is it just me? BruceS -------------- next part -------------- An HTML attachment was scrubbed... URL: From g4mba5 at gmail.com Wed Nov 25 15:57:45 2020 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Wed, 25 Nov 2020 15:57:45 +0100 Subject: [Gambas-user] a lot if crashes In-Reply-To: References: <8d52ceff-6dab-c8a9-10fa-33e6f0240c15@cd-bahia.com> <952e3502-86c4-fdcd-6461-d9fc56c96b69@gmail.com> <38869707-482b-e7c9-ef5e-2473ac0766f8@deganius.de> <56b74cbb-1ae7-6b9f-3b7c-5d59203a356c@deganius.de> Message-ID: <6cdd9f42-3e3c-e8e1-51b5-d4f73f2ebdde@gmail.com> Le 25/11/2020 ? 15:49, Bruce Steers a ?crit?: > I gave up on the beta and uninstalled it last night. > it has far too many instabilities to be usable at present. > literally the only reason to install it now is to beta-test it for Ben, > When it comes to my own projects it's best not to as I can't use it for > all the lock ups. I mostly have none of the problems you have, and according to some of the warning messages you sent me in issue comments, I have guessed that your system and/or your Gambas installation are broken. > > So as for reporting the bug, I already have here. Ben reads these mails, > my last bug report showed my system. I'm not going through the hoo ha of > re-installing the unstable/unusable version just to report a bug that > will read ,, crashes a lot from the start, don't know why? then > re-install a working version. > (though actually after saying that i might have it installed on another > disk, will have a look) > > I can't even use right mouse in 3.15.90 to popup menus in the designer > at present till i copy something to the clipboard??. have reported that > odd bug, weeks ago. Ben cannot reproduce the problem so not easy for him > to track the bug, . > You could say "must by my system then" but i got no other software doing > this sort of thing, just Gambas 3.15.90. And with an issue like that > happening right from launch i don't trust it anymore not to be > corrupting memory. I don't know. How do you know if any other program use the same libraries than the Gambas IDE in the same way? Maybe I'm wrong, but anyway if I can't reproduce the problems you describe, I can't fix them. We will see if other people have the same issues. Regards, -- Beno?t Minisini From bsteers4 at gmail.com Wed Nov 25 17:04:27 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Wed, 25 Nov 2020 16:04:27 +0000 Subject: [Gambas-user] Fwd: a lot if crashes In-Reply-To: References: <8d52ceff-6dab-c8a9-10fa-33e6f0240c15@cd-bahia.com> <952e3502-86c4-fdcd-6461-d9fc56c96b69@gmail.com> <38869707-482b-e7c9-ef5e-2473ac0766f8@deganius.de> <56b74cbb-1ae7-6b9f-3b7c-5d59203a356c@deganius.de> <6cdd9f42-3e3c-e8e1-51b5-d4f73f2ebdde@gmail.com> Message-ID: On Wed, 25 Nov 2020 at 14:58, Beno?t Minisini wrote: > Le 25/11/2020 ? 15:49, Bruce Steers a ?crit : > > I gave up on the beta and uninstalled it last night. > > it has far too many instabilities to be usable at present. > > literally the only reason to install it now is to beta-test it for Ben, > > When it comes to my own projects it's best not to as I can't use it for > > all the lock ups. > > I mostly have none of the problems you have, and according to some of > the warning messages you sent me in issue comments, I have guessed that > your system and/or your Gambas installation are broken. > So i've booted into a completely different fresh LinuxMint drive right now that's only ever had gambas 3.15.90 on it. Getting all the same problems. I'm compiling latest commit as we speak but before i started that i loaded gambas and guess what , no right-click menu just like on the other OS I'm guessing it's gambas as this is a different system with just 3.15.90 on it. I have done make uninstall first. ./reconf-all --force to ensure full renewal. If it's a problem with the gambas installation then it's a problem with the way it's installed as i've not messed it about. > > So as for reporting the bug, I already have here. Ben reads these mails, > > my last bug report showed my system. I'm not going through the hoo ha of > > re-installing the unstable/unusable version just to report a bug that > > will read ,, crashes a lot from the start, don't know why? then > > re-install a working version. > > (though actually after saying that i might have it installed on another > > disk, will have a look) > > > > I can't even use right mouse in 3.15.90 to popup menus in the designer > > at present till i copy something to the clipboard??. have reported that > > odd bug, weeks ago. Ben cannot reproduce the problem so not easy for him > > to track the bug, . > > You could say "must by my system then" but i got no other software doing > > this sort of thing, just Gambas 3.15.90. And with an issue like that > > happening right from launch i don't trust it anymore not to be > > corrupting memory. > > I don't know. How do you know if any other program use the same > libraries than the Gambas IDE in the same way? > > Maybe I'm wrong, but anyway if I can't reproduce the problems you > describe, I can't fix them. > > We will see if other people have the same issues. > Well the guy who first wrote this post obviously has similar issues. I completely understand Ben, have had to track a few bugs in my own software that i could not reproduce myself. not an easy task and i feel for you fella. All i can do is give what information i can about it and hopefully a problem will be noticed in the code sometime. Okay,,, it's now compiled and installed.. Notes.. Fresh LinuxMint 20 hardly anything installed on it Gambas version 3.15.90 pure (none of my patches, a separate gambas-master clone download folder grom gitlab/gambas/gambas. nothing to do with me) ./reconf-all --force used I load the IDe and no right click menu. I used the search box a couple of times and the IDE locked up. ALL the same issues i have on the other system. Sorry but i really do not think it's a problem my end. Perhaps you could partition a drive and install a clean mint on it and compile the latest gambas on it ? as i have just done for you. Then maybe you will be able to reproduce the errors? attached is an image of what happened when i used the search box twice , it worked okay first time. Thank you Ben. Bruce -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot at 2020-11-25 15-44-22.png Type: image/png Size: 172766 bytes Desc: not available URL: From g4mba5 at gmail.com Wed Nov 25 17:11:55 2020 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Wed, 25 Nov 2020 17:11:55 +0100 Subject: [Gambas-user] Fwd: a lot if crashes In-Reply-To: References: <8d52ceff-6dab-c8a9-10fa-33e6f0240c15@cd-bahia.com> <952e3502-86c4-fdcd-6461-d9fc56c96b69@gmail.com> <38869707-482b-e7c9-ef5e-2473ac0766f8@deganius.de> <56b74cbb-1ae7-6b9f-3b7c-5d59203a356c@deganius.de> <6cdd9f42-3e3c-e8e1-51b5-d4f73f2ebdde@gmail.com> Message-ID: <916658e1-f615-a8dc-4e62-8b6945261a31@gmail.com> Le 25/11/2020 ? 17:04, Bruce Steers a ?crit?: > > I load the IDe and no right click menu. > I used the search box a couple of times and the IDE locked up. > ALL the same issues i have on the other system. > Sorry but i really do not think it's a problem my end. > Perhaps you could partition a drive and install a clean mint on it and > compile the latest gambas on it ? > as i have just done for you. > Then maybe you will be able to reproduce the errors? > > attached is an image of what happened when i used the search box twice , > it worked okay first time. > > Thank you Ben. > Bruce > At the moment I have tried the GTK+3 IDE on my Ubuntu 20.04 and on a Fedora 33. The right click opens the popup menu of the different editors. I didn't have check searching twice yet. Maybe it could be related to the GTK+3 widget theme in use? -- Beno?t Minisini From g4mba5 at gmail.com Wed Nov 25 17:12:43 2020 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Wed, 25 Nov 2020 17:12:43 +0100 Subject: [Gambas-user] Fwd: a lot if crashes In-Reply-To: <916658e1-f615-a8dc-4e62-8b6945261a31@gmail.com> References: <8d52ceff-6dab-c8a9-10fa-33e6f0240c15@cd-bahia.com> <952e3502-86c4-fdcd-6461-d9fc56c96b69@gmail.com> <38869707-482b-e7c9-ef5e-2473ac0766f8@deganius.de> <56b74cbb-1ae7-6b9f-3b7c-5d59203a356c@deganius.de> <6cdd9f42-3e3c-e8e1-51b5-d4f73f2ebdde@gmail.com> <916658e1-f615-a8dc-4e62-8b6945261a31@gmail.com> Message-ID: Le 25/11/2020 ? 17:11, Beno?t Minisini a ?crit?: > At the moment I have tried the GTK+3 IDE on my Ubuntu 20.04 and on a > Fedora 33. The right click opens the popup menu of the different > editors. I didn't have check searching twice yet. > --> I haven't checked... -- Beno?t Minisini From jose.rodriguez at cenpalab.cu Wed Nov 25 17:39:46 2020 From: jose.rodriguez at cenpalab.cu (jose.rodriguez at cenpalab.cu) Date: Wed, 25 Nov 2020 16:39:46 +0000 Subject: [Gambas-user] Fwd: a lot if crashes In-Reply-To: <916658e1-f615-a8dc-4e62-8b6945261a31@gmail.com> References: <916658e1-f615-a8dc-4e62-8b6945261a31@gmail.com> <8d52ceff-6dab-c8a9-10fa-33e6f0240c15@cd-bahia.com> <952e3502-86c4-fdcd-6461-d9fc56c96b69@gmail.com> <38869707-482b-e7c9-ef5e-2473ac0766f8@deganius.de> <56b74cbb-1ae7-6b9f-3b7c-5d59203a356c@deganius.de> <6cdd9f42-3e3c-e8e1-51b5-d4f73f2ebdde@gmail.com> Message-ID: <1025191526b1271aefd2a56839217dfb@cenpalab.cu> November 25, 2020 11:11 AM, "Beno?t Minisini" wrote: > > Maybe it could be related to the GTK+3 widget theme in use? > I've read in a lot of replies to problems from many different software that some GTK+3 themes are broken and cause problems with the GUIs. Regards, Joe1962 From bsteers4 at gmail.com Wed Nov 25 18:37:53 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Wed, 25 Nov 2020 17:37:53 +0000 Subject: [Gambas-user] Fwd: a lot if crashes In-Reply-To: <916658e1-f615-a8dc-4e62-8b6945261a31@gmail.com> References: <8d52ceff-6dab-c8a9-10fa-33e6f0240c15@cd-bahia.com> <952e3502-86c4-fdcd-6461-d9fc56c96b69@gmail.com> <38869707-482b-e7c9-ef5e-2473ac0766f8@deganius.de> <56b74cbb-1ae7-6b9f-3b7c-5d59203a356c@deganius.de> <6cdd9f42-3e3c-e8e1-51b5-d4f73f2ebdde@gmail.com> <916658e1-f615-a8dc-4e62-8b6945261a31@gmail.com> Message-ID: On Wed, 25 Nov 2020 at 16:12, Beno?t Minisini wrote: > Le 25/11/2020 ? 17:04, Bruce Steers a ?crit : > > > > I load the IDe and no right click menu. > > I used the search box a couple of times and the IDE locked up. > > ALL the same issues i have on the other system. > > Sorry but i really do not think it's a problem my end. > > Perhaps you could partition a drive and install a clean mint on it and > > compile the latest gambas on it ? > > as i have just done for you. > > Then maybe you will be able to reproduce the errors? > > > > attached is an image of what happened when i used the search box twice , > > it worked okay first time. > > > > Thank you Ben. > > Bruce > > > > At the moment I have tried the GTK+3 IDE on my Ubuntu 20.04 and on a > Fedora 33. The right click opens the popup menu of the different > editors. I didn't have check searching twice yet. > > Maybe it could be related to the GTK+3 widget theme in use? > I'm now thinking it is only a LinuxMint issue. I just installed the latest on debian and not getting the errors. Although before installing i deleted the following (after running make uninstall)... /usr/lib/gambas3 (full of .so files, see attachment for ls result) /usr/share/gambas3 (3 icons) $HOME/.local/share/gambas3 (700mb+ in 235,000 files) am doing the same on mint now to see if it's any better. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- gb.cairo.so gb.cairo.so.0 gb.cairo.so.0.0.0 gb.clipper.so gb.clipper.so.0 gb.clipper.so.0.0.0 gb.complex.so gb.complex.so.0 gb.complex.so.0.0.0 gb.compress.bzlib2.so gb.compress.bzlib2.so.0 gb.compress.bzlib2.so.0.0.0 gb.compress.so gb.compress.so.0 gb.compress.so.0.0.0 gb.compress.zlib.so gb.compress.zlib.so.0 gb.compress.zlib.so.0.0.0 gb.crypt.so gb.crypt.so.0 gb.crypt.so.0.0.0 gb.data.so gb.data.so.0 gb.data.so.0.0.0 gb.db.mysql.so gb.db.mysql.so.0 gb.db.mysql.so.0.0.0 gb.db.odbc.so gb.db.odbc.so.0 gb.db.odbc.so.0.0.0 gb.db.postgresql.so gb.db.postgresql.so.0 gb.db.postgresql.so.0.0.0 gb.db.so gb.db.so.0 gb.db.so.0.0.0 gb.db.sqlite2.so gb.db.sqlite2.so.0 gb.db.sqlite2.so.0.0.0 gb.db.sqlite3.so gb.db.sqlite3.so.0 gb.db.sqlite3.so.0.0.0 gb.dbus.so gb.dbus.so.0 gb.dbus.so.0.0.0 gb.debug.so gb.debug.so.0 gb.debug.so.0.0.0 gb.desktop.x11.so gb.desktop.x11.so.0 gb.desktop.x11.so.0.0.0 gb.draw.so gb.draw.so.0 gb.draw.so.0.0.0 gb.eval.so gb.eval.so.0 gb.eval.so.0.0.0 gb.geom.so gb.geom.so.0 gb.geom.so.0.0.0 gb.gmp.so gb.gmp.so.0 gb.gmp.so.0.0.0 gb.gsl.so gb.gsl.so.0 gb.gsl.so.0.0.0 gb.gtk3.so gb.gtk3.so.0 gb.gtk3.so.0.0.0 gb.gtk3.webview.so gb.gtk3.webview.so.0 gb.gtk3.webview.so.0.0.0 gb.gtk.opengl.so gb.gtk.opengl.so.0 gb.gtk.opengl.so.0.0.0 gb.gtk.so gb.gtk.so.0 gb.gtk.so.0.0.0 gb.gui.opengl.so gb.gui.opengl.so.0 gb.gui.opengl.so.0.0.0 gb.gui.qt.opengl.so gb.gui.qt.opengl.so.0 gb.gui.qt.opengl.so.0.0.0 gb.gui.qt.so gb.gui.qt.so.0 gb.gui.qt.so.0.0.0 gb.gui.qt.webkit.so gb.gui.qt.webkit.so.0 gb.gui.qt.webkit.so.0.0.0 gb.gui.so gb.gui.so.0 gb.gui.so.0.0.0 gb.gui.trayicon.so gb.gui.trayicon.so.0 gb.gui.trayicon.so.0.0.0 gb.gui.webview.so gb.gui.webview.so.0 gb.gui.webview.so.0.0.0 gb.httpd.so gb.httpd.so.0 gb.httpd.so.0.0.0 gb.image.effect.so gb.image.effect.so.0 gb.image.effect.so.0.0.0 gb.image.imlib.so gb.image.imlib.so.0 gb.image.imlib.so.0.0.0 gb.image.io.so gb.image.io.so.0 gb.image.io.so.0.0.0 gb.image.so gb.image.so.0 gb.image.so.0.0.0 gb.inotify.so gb.inotify.so.0 gb.inotify.so.0.0.0 gb.jit.so gb.jit.so.0 gb.jit.so.0.0.0 gb.libxml.so gb.libxml.so.0 gb.libxml.so.0.0.0 gb.media.so gb.media.so.0 gb.media.so.0.0.0 gb.mime.so gb.mime.so.0 gb.mime.so.0.0.0 gb.ncurses.so gb.ncurses.so.0 gb.ncurses.so.0.0.0 gb.net.curl.so gb.net.curl.so.0 gb.net.curl.so.0.0.0 gb.net.so gb.net.so.0 gb.net.so.0.0.0 gb.openal.so gb.openal.so.0 gb.openal.so.0.0.0 gb.opengl.glsl.so gb.opengl.glsl.so.0 gb.opengl.glsl.so.0.0.0 gb.opengl.glu.so gb.opengl.glu.so.0 gb.opengl.glu.so.0.0.0 gb.opengl.sge.so gb.opengl.sge.so.0 gb.opengl.sge.so.0.0.0 gb.opengl.so gb.opengl.so.0 gb.opengl.so.0.0.0 gb.openssl.so gb.openssl.so.0 gb.openssl.so.0.0.0 gb.option.so gb.option.so.0 gb.option.so.0.0.0 gb.pcre.so gb.pcre.so.0 gb.pcre.so.0.0.0 gb.pdf.so gb.pdf.so.0 gb.pdf.so.0.0.0 gb.poppler.so gb.poppler.so.0 gb.poppler.so.0.0.0 gb.qt5.ext.so gb.qt5.ext.so.0 gb.qt5.ext.so.0.0.0 gb.qt5.opengl.so gb.qt5.opengl.so.0 gb.qt5.opengl.so.0.0.0 gb.qt5.so gb.qt5.so.0 gb.qt5.so.0.0.0 gb.qt5.webkit.so gb.qt5.webkit.so.0 gb.qt5.webkit.so.0.0.0 gb.qt5.webview.so gb.qt5.webview.so.0 gb.qt5.webview.so.0.0.0 gb.sdl2.audio.so gb.sdl2.audio.so.0 gb.sdl2.audio.so.0.0.0 gb.sdl2.so gb.sdl2.so.0 gb.sdl2.so.0.0.0 gb.sdl.so gb.sdl.so.0 gb.sdl.so.0.0.0 gb.sdl.sound.so gb.sdl.sound.so.0 gb.sdl.sound.so.0.0.0 gb.signal.so gb.signal.so.0 gb.signal.so.0.0.0 gb.term.so gb.term.so.0 gb.term.so.0.0.0 gb.test.so gb.test.so.0 gb.test.so.0.0.0 gb.v4l.so gb.v4l.so.0 gb.v4l.so.0.0.0 gb.vb.so gb.vb.so.0 gb.vb.so.0.0.0 gb.xml.html.so gb.xml.html.so.0 gb.xml.html.so.0.0.0 gb.xml.so gb.xml.so.0 gb.xml.so.0.0.0 gb.xml.xslt.so gb.xml.xslt.so.0 gb.xml.xslt.so.0.0.0 From jussi.lahtinen at gmail.com Wed Nov 25 19:03:59 2020 From: jussi.lahtinen at gmail.com (Jussi Lahtinen) Date: Wed, 25 Nov 2020 20:03:59 +0200 Subject: [Gambas-user] using search crashing ide (sometimes) In-Reply-To: References: Message-ID: If it is freeze rather than crash, then try to open the IDE in the IDE and then use the search function there. That way you can see where it freezes. I haven't seen it happening. Do you mean the search box in the hierarchy tab? Jussi On Wed, Nov 25, 2020 at 4:54 PM Bruce Steers wrote: > Anybody else finding the IDE locks up (3.15.90) when using the search > function from the ide searchbox not the pop up search window? > > And not all the time, just sometimes making it impossible to know just why? > > Or is it just me? > BruceS > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jussi.lahtinen at gmail.com Wed Nov 25 19:08:23 2020 From: jussi.lahtinen at gmail.com (Jussi Lahtinen) Date: Wed, 25 Nov 2020 20:08:23 +0200 Subject: [Gambas-user] Fwd: a lot if crashes In-Reply-To: References: <8d52ceff-6dab-c8a9-10fa-33e6f0240c15@cd-bahia.com> <952e3502-86c4-fdcd-6461-d9fc56c96b69@gmail.com> <38869707-482b-e7c9-ef5e-2473ac0766f8@deganius.de> <56b74cbb-1ae7-6b9f-3b7c-5d59203a356c@deganius.de> <6cdd9f42-3e3c-e8e1-51b5-d4f73f2ebdde@gmail.com> <916658e1-f615-a8dc-4e62-8b6945261a31@gmail.com> Message-ID: > > I'm now thinking it is only a LinuxMint issue. > I'm using Linux Mint 20 and I don't have any of these problems. Jussi -------------- next part -------------- An HTML attachment was scrubbed... URL: From jussi.lahtinen at gmail.com Wed Nov 25 19:09:57 2020 From: jussi.lahtinen at gmail.com (Jussi Lahtinen) Date: Wed, 25 Nov 2020 20:09:57 +0200 Subject: [Gambas-user] Fwd: a lot if crashes In-Reply-To: References: <8d52ceff-6dab-c8a9-10fa-33e6f0240c15@cd-bahia.com> <952e3502-86c4-fdcd-6461-d9fc56c96b69@gmail.com> <38869707-482b-e7c9-ef5e-2473ac0766f8@deganius.de> <56b74cbb-1ae7-6b9f-3b7c-5d59203a356c@deganius.de> <6cdd9f42-3e3c-e8e1-51b5-d4f73f2ebdde@gmail.com> <916658e1-f615-a8dc-4e62-8b6945261a31@gmail.com> Message-ID: Maybe it is because I use Qt5? System information below. Jussi [System] Gambas=3.15.90 4d47240a7 (master) OperatingSystem=Linux Kernel=5.4.0-54-generic Architecture=x86_64 Distribution=Linux Mint 20 Ulyana Desktop=CINNAMON Theme=qt5ctproxy Language=en_US.UTF-8 Memory=7961M [Libraries] Cairo=libcairo.so.2.11600.0 Curl=libcurl.so.4.6.0 DBus=libdbus-1.so.3.19.11 GDK2=libgdk-x11-2.0.so.0.2400.32 GDK3=libgdk-3.so.0.2404.16 GStreamer=libgstreamer-1.0.so.0.1602.0 GTK+2=libgtk-x11-2.0.so.0.2400.32 GTK+3=libgtk-3.so.0.2404.16 OpenGL=libGL.so.1.7.0 Poppler=libpoppler.so.97.0.0 QT5=libQt5Core.so.5.12.8 SDL=libSDL-1.2.so.0.11.4 SQLite=libsqlite3.so.0.8.6 [Environment] DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus DESKTOP_SESSION=cinnamon DISPLAY=:0 GB_GUI=gb.qt5 GB_PROFILE_MAX=1000 GDMSESSION=cinnamon GDM_LANG=en_US GIO_LAUNCHED_DESKTOP_FILE=/Desktop/Gambas3.desktop GIO_LAUNCHED_DESKTOP_FILE_PID=14507 GNOME_DESKTOP_SESSION_ID=this-is-deprecated GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1 GTK_MODULES=gail:atk-bridge GTK_OVERLAY_SCROLLING=1 HOME= INSIDE_NEMO_PYTHON= LANG=en_US.UTF-8 LANGUAGE=en_US.UTF-8 LC_ADDRESS=fi_FI.UTF-8 LC_ALL=en_US.UTF-8 LC_IDENTIFICATION=fi_FI.UTF-8 LC_MEASUREMENT=fi_FI.UTF-8 LC_MONETARY=fi_FI.UTF-8 LC_NAME=fi_FI.UTF-8 LC_NUMERIC=fi_FI.UTF-8 LC_PAPER=fi_FI.UTF-8 LC_TELEPHONE=fi_FI.UTF-8 LOGNAME= PATH=/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin PWD= QT_ACCESSIBILITY=1 QT_LOGGING_RULES=*.debug=false QT_QPA_PLATFORMTHEME=qt5ct SESSION_MANAGER=local/:@/tmp/.ICE-unix/1042,unix/:/tmp/.ICE-unix/1042 SHELL=/bin/bash SHLVL=0 SSH_AGENT_PID=1113 SSH_AUTH_SOCK=/run/user/1000/keyring/ssh TZ=:/etc/localtime USER= XAUTHORITY=/.Xauthority XDG_CONFIG_DIRS=/etc/xdg/xdg-cinnamon:/etc/xdg XDG_CURRENT_DESKTOP=X-Cinnamon XDG_DATA_DIRS=/usr/share/cinnamon:/usr/share/gnome:/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/ XDG_RUNTIME_DIR=/run/user/1000 XDG_SEAT=seat0 XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0 XDG_SESSION_CLASS=user XDG_SESSION_DESKTOP=cinnamon XDG_SESSION_ID=c1 XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0 XDG_SESSION_TYPE=x11 XDG_VTNR=7 force_s3tc_enable=true On Wed, Nov 25, 2020 at 8:08 PM Jussi Lahtinen wrote: > I'm now thinking it is only a LinuxMint issue. >> > > I'm using Linux Mint 20 and I don't have any of these problems. > > > Jussi > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Wed Nov 25 19:23:08 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Wed, 25 Nov 2020 18:23:08 +0000 Subject: [Gambas-user] Fwd: a lot if crashes In-Reply-To: References: <8d52ceff-6dab-c8a9-10fa-33e6f0240c15@cd-bahia.com> <952e3502-86c4-fdcd-6461-d9fc56c96b69@gmail.com> <38869707-482b-e7c9-ef5e-2473ac0766f8@deganius.de> <56b74cbb-1ae7-6b9f-3b7c-5d59203a356c@deganius.de> <6cdd9f42-3e3c-e8e1-51b5-d4f73f2ebdde@gmail.com> <916658e1-f615-a8dc-4e62-8b6945261a31@gmail.com> Message-ID: > At the moment I have tried the GTK+3 IDE on my Ubuntu 20.04 and on a >> Fedora 33. The right click opens the popup menu of the different >> editors. I didn't have check searching twice yet. >> >> Maybe it could be related to the GTK+3 widget theme in use? >> > > I'm now thinking it is only a LinuxMint issue. > I just installed the latest on debian and not getting the errors. > Although before installing i deleted the following (after running make > uninstall)... > /usr/lib/gambas3 (full of .so files, see attachment for ls result) > /usr/share/gambas3 (3 icons) > $HOME/.local/share/gambas3 (700mb+ in 235,000 files) > > am doing the same on mint now to see if it's any better. > ok , yet another fresh install on mint , still got the issues , tried changing desktop theme. tried using different window managers (marco,compiz,metacity) Makes no difference. It's safe to say LinuxMint simply does not comply with how you're doing things with GTK3 (no errors in QT IDE) -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Wed Nov 25 19:41:05 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Wed, 25 Nov 2020 18:41:05 +0000 Subject: [Gambas-user] Fwd: a lot if crashes In-Reply-To: References: <8d52ceff-6dab-c8a9-10fa-33e6f0240c15@cd-bahia.com> <952e3502-86c4-fdcd-6461-d9fc56c96b69@gmail.com> <38869707-482b-e7c9-ef5e-2473ac0766f8@deganius.de> <56b74cbb-1ae7-6b9f-3b7c-5d59203a356c@deganius.de> <6cdd9f42-3e3c-e8e1-51b5-d4f73f2ebdde@gmail.com> <916658e1-f615-a8dc-4e62-8b6945261a31@gmail.com> Message-ID: Yes , the issues do not occur on QT just the new gtk3 components try loading it up with mint in it's default config that is to use gtk3. you won't be as happy. I have just found this out... if using GTK3 IDE , If i open the system properties page and select "copy" as i did for the information below , then the bug does not happen? there is a glitch in the gambas gtk3 matrix. the way it fixes itself when copying the system info is not only rather odd but tells me it's gambas and the GTK3 interface , not my system config , or if it IS my config then my config is standard so gambas needs to adapt to the error. Or the answer is simply "forget using 3.15.90 gtk3 if on mint , because LinuxMint is wrong not gambas" (sorry for the sarcasm) My config.. [System] Gambas=3.15.90 03c5e93c7 (master) OperatingSystem=Linux Kernel=5.4.0-26-generic Architecture=x86_64 Distribution=Linux Mint 20 Ulyana Desktop=MATE Theme=mint-y-sand Language=en_GB.UTF-8 Memory=7952M [Libraries] Cairo=libcairo.so.2.11600.0 Curl=libcurl.so.4.6.0 DBus=libdbus-1.so.3.19.11 GDK2=libgdk-x11-2.0.so.0.2400.32 GDK3=libgdk-3.so.0.2404.16 GStreamer=libgstreamer-1.0.so.0.1602.0 GTK+2=libgtk-x11-2.0.so.0.2400.32 GTK+3=libgtk-3.so.0.2404.16 OpenGL=libGL.so.1.7.0 Poppler=libpoppler.so.97.0.0 QT5=libQt5Core.so.5.12.8 SDL=libSDL-1.2.so.0.11.4 SQLite=libsqlite3.so.0.8.6 [Environment] CLUTTER_BACKEND=x11 DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus DESKTOP_SESSION=mate DISPLAY=:0 GB_GUI=gb.gtk3 GDMSESSION=mate GDM_LANG=en_GB GIO_LAUNCHED_DESKTOP_FILE_PID=133572 GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1 GTK_MODULES=gail:atk-bridge GTK_OVERLAY_SCROLLING=0 HOME= LANG=en_GB.UTF-8 LANGUAGE=en_GB.UTF-8 LC_ALL=en_GB.UTF-8 LOGNAME= MATE_DESKTOP_SESSION_ID=this-is-deprecated PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games PWD= QT_ACCESSIBILITY=1 QT_AUTO_SCREEN_SCALE_FACTOR=0 QT_LOGGING_RULES=*.debug=false QT_QPA_PLATFORMTHEME=qt5ct QT_SCALE_FACTOR=1 SESSION_MANAGER=local/:@/tmp/.ICE-unix/1028,unix/:/tmp/.ICE-unix/1028 SHELL=/bin/bash SHLVL=0 SSH_AGENT_PID=1169 SSH_AUTH_SOCK=/run/user/1000/keyring/ssh TZ=:/etc/localtime USER= XAUTHORITY=/.Xauthority XDG_CONFIG_DIRS=/etc/xdg/xdg-mate:/etc/xdg XDG_CURRENT_DESKTOP=MATE XDG_DATA_DIRS=/usr/share/mate:/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/ XDG_RUNTIME_DIR=/run/user/1000 XDG_SEAT=seat0 XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0 XDG_SESSION_CLASS=user XDG_SESSION_DESKTOP=mate XDG_SESSION_ID=c1 XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0 XDG_SESSION_TYPE=x11 XDG_VTNR=7 On Wed, 25 Nov 2020 at 18:11, Jussi Lahtinen wrote: > Maybe it is because I use Qt5? > System information below. > > Jussi > > > [System] > Gambas=3.15.90 4d47240a7 (master) > OperatingSystem=Linux > Kernel=5.4.0-54-generic > Architecture=x86_64 > Distribution=Linux Mint 20 Ulyana > Desktop=CINNAMON > Theme=qt5ctproxy > Language=en_US.UTF-8 > Memory=7961M > > [Libraries] > Cairo=libcairo.so.2.11600.0 > Curl=libcurl.so.4.6.0 > DBus=libdbus-1.so.3.19.11 > GDK2=libgdk-x11-2.0.so.0.2400.32 > GDK3=libgdk-3.so.0.2404.16 > GStreamer=libgstreamer-1.0.so.0.1602.0 > GTK+2=libgtk-x11-2.0.so.0.2400.32 > GTK+3=libgtk-3.so.0.2404.16 > OpenGL=libGL.so.1.7.0 > Poppler=libpoppler.so.97.0.0 > QT5=libQt5Core.so.5.12.8 > SDL=libSDL-1.2.so.0.11.4 > SQLite=libsqlite3.so.0.8.6 > > [Environment] > DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus > DESKTOP_SESSION=cinnamon > DISPLAY=:0 > GB_GUI=gb.qt5 > GB_PROFILE_MAX=1000 > GDMSESSION=cinnamon > GDM_LANG=en_US > GIO_LAUNCHED_DESKTOP_FILE=/Desktop/Gambas3.desktop > GIO_LAUNCHED_DESKTOP_FILE_PID=14507 > GNOME_DESKTOP_SESSION_ID=this-is-deprecated > GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1 > GTK_MODULES=gail:atk-bridge > GTK_OVERLAY_SCROLLING=1 > HOME= > INSIDE_NEMO_PYTHON= > LANG=en_US.UTF-8 > LANGUAGE=en_US.UTF-8 > LC_ADDRESS=fi_FI.UTF-8 > LC_ALL=en_US.UTF-8 > LC_IDENTIFICATION=fi_FI.UTF-8 > LC_MEASUREMENT=fi_FI.UTF-8 > LC_MONETARY=fi_FI.UTF-8 > LC_NAME=fi_FI.UTF-8 > LC_NUMERIC=fi_FI.UTF-8 > LC_PAPER=fi_FI.UTF-8 > LC_TELEPHONE=fi_FI.UTF-8 > LOGNAME= > > PATH=/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin > PWD= > QT_ACCESSIBILITY=1 > QT_LOGGING_RULES=*.debug=false > QT_QPA_PLATFORMTHEME=qt5ct > > SESSION_MANAGER=local/:@/tmp/.ICE-unix/1042,unix/:/tmp/.ICE-unix/1042 > SHELL=/bin/bash > SHLVL=0 > SSH_AGENT_PID=1113 > SSH_AUTH_SOCK=/run/user/1000/keyring/ssh > TZ=:/etc/localtime > USER= > XAUTHORITY=/.Xauthority > XDG_CONFIG_DIRS=/etc/xdg/xdg-cinnamon:/etc/xdg > XDG_CURRENT_DESKTOP=X-Cinnamon > > XDG_DATA_DIRS=/usr/share/cinnamon:/usr/share/gnome:/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share > XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/ > XDG_RUNTIME_DIR=/run/user/1000 > XDG_SEAT=seat0 > XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0 > XDG_SESSION_CLASS=user > XDG_SESSION_DESKTOP=cinnamon > XDG_SESSION_ID=c1 > XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0 > XDG_SESSION_TYPE=x11 > XDG_VTNR=7 > force_s3tc_enable=true > > On Wed, Nov 25, 2020 at 8:08 PM Jussi Lahtinen > wrote: > >> I'm now thinking it is only a LinuxMint issue. >>> >> >> I'm using Linux Mint 20 and I don't have any of these problems. >> >> >> Jussi >> > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Wed Nov 25 19:52:21 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Wed, 25 Nov 2020 18:52:21 +0000 Subject: [Gambas-user] using search crashing ide (sometimes) In-Reply-To: References: Message-ID: On Wed, 25 Nov 2020 at 18:05, Jussi Lahtinen wrote: > If it is freeze rather than crash, then try to open the IDE in the IDE and > then use the search function there. That way you can see where it freezes. > Tried it, the launched IDE locks up and does not release, I have to force quit it and not get any error messages/clues. I found some anomalies i reported to Ben where when the menu glitch is occurring the IDE seems to be running the wrong function Control_MouseUp() in app/src/gambas3/.src/Editor/FFmain.class while in error a breakpoint catches the running in that function. if i Ctrl-C or use the copy function in system info to fix the glitch then the menu pops up and the function Control_MouseUp() does not run (no stopping at breakpoint) This i think is getting to the root of the problem. i find that difference in function call particularly odd. > I haven't seen it happening. Do you mean the search box in the hierarchy > tab? > No the main search box in the form designer toolbar Jussi > > On Wed, Nov 25, 2020 at 4:54 PM Bruce Steers wrote: > >> Anybody else finding the IDE locks up (3.15.90) when using the search >> function from the ide searchbox not the pop up search window? >> >> And not all the time, just sometimes making it impossible to know just >> why? >> >> Or is it just me? >> BruceS >> >> >> ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- >> > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From g4mba5 at gmail.com Wed Nov 25 20:01:15 2020 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Wed, 25 Nov 2020 20:01:15 +0100 Subject: [Gambas-user] Fwd: a lot if crashes In-Reply-To: References: <8d52ceff-6dab-c8a9-10fa-33e6f0240c15@cd-bahia.com> <952e3502-86c4-fdcd-6461-d9fc56c96b69@gmail.com> <38869707-482b-e7c9-ef5e-2473ac0766f8@deganius.de> <56b74cbb-1ae7-6b9f-3b7c-5d59203a356c@deganius.de> <6cdd9f42-3e3c-e8e1-51b5-d4f73f2ebdde@gmail.com> <916658e1-f615-a8dc-4e62-8b6945261a31@gmail.com> Message-ID: <9212cc37-55ea-c22c-477a-a31ddd883a60@gmail.com> Le 25/11/2020 ? 19:23, Bruce Steers a ?crit?: > > At the moment I have tried the GTK+3 IDE on my Ubuntu 20.04 and > on a > Fedora 33. The right click opens the popup menu of the different > editors. I didn't have check searching twice yet. > > Maybe it could be related to the GTK+3 widget theme in use? > > > I'm now thinking it is only a LinuxMint issue. > I just installed the latest on debian and not getting the errors. > Although before installing i deleted the following (after running > make uninstall)... > /usr/lib/gambas3? (full of .so files, see attachment for ls result) > /usr/share/gambas3 (3 icons) > $HOME/.local/share/gambas3 (700mb+ in 235,000 files) > > am doing the same on mint now to see if it's any better. > > > ok , yet another fresh install on mint , still got the issues , tried > changing desktop theme. tried using different window managers > (marco,compiz,metacity) > Makes no difference. > It's safe to say LinuxMint simply does not comply with how you're doing > things with GTK3 (no errors in QT IDE) > I will make a Mint VM to look at that. -- Beno?t Minisini From g4mba5 at gmail.com Wed Nov 25 20:08:10 2020 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Wed, 25 Nov 2020 20:08:10 +0100 Subject: [Gambas-user] Fwd: a lot if crashes In-Reply-To: <9212cc37-55ea-c22c-477a-a31ddd883a60@gmail.com> References: <8d52ceff-6dab-c8a9-10fa-33e6f0240c15@cd-bahia.com> <952e3502-86c4-fdcd-6461-d9fc56c96b69@gmail.com> <38869707-482b-e7c9-ef5e-2473ac0766f8@deganius.de> <56b74cbb-1ae7-6b9f-3b7c-5d59203a356c@deganius.de> <6cdd9f42-3e3c-e8e1-51b5-d4f73f2ebdde@gmail.com> <916658e1-f615-a8dc-4e62-8b6945261a31@gmail.com> <9212cc37-55ea-c22c-477a-a31ddd883a60@gmail.com> Message-ID: Le 25/11/2020 ? 20:01, Beno?t Minisini a ?crit?: >> It's safe to say LinuxMint simply does not comply with how you're >> doing things with GTK3 (no errors in QT IDE) >> > > I will make a Mint VM to look at that. > Note that to make a usable Gambas GTK+3 component, I have to do a lot of horrible hacks and workarounds. For example, you noticed that hitting CTRL+V inside the search box triggers the current editor menu shortcut instead of the textbox one, as anyone would expect. This is done -by design- by the GTK+ developer, and you will find a lot of complain on the internet about that. Fixing that stupid behaviour inside GTK+ source code is just a matter of swapping four lines of code. Outside of it, i.e. inside the gb.gtk component, it becomes a hack. These are these kind of hacks that I suspect. Regards, -- Beno?t Minisini From bsteers4 at gmail.com Wed Nov 25 20:08:51 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Wed, 25 Nov 2020 19:08:51 +0000 Subject: [Gambas-user] Fwd: a lot if crashes In-Reply-To: <9212cc37-55ea-c22c-477a-a31ddd883a60@gmail.com> References: <8d52ceff-6dab-c8a9-10fa-33e6f0240c15@cd-bahia.com> <952e3502-86c4-fdcd-6461-d9fc56c96b69@gmail.com> <38869707-482b-e7c9-ef5e-2473ac0766f8@deganius.de> <56b74cbb-1ae7-6b9f-3b7c-5d59203a356c@deganius.de> <6cdd9f42-3e3c-e8e1-51b5-d4f73f2ebdde@gmail.com> <916658e1-f615-a8dc-4e62-8b6945261a31@gmail.com> <9212cc37-55ea-c22c-477a-a31ddd883a60@gmail.com> Message-ID: > I'm now thinking it is only a LinuxMint issue. > > I just installed the latest on debian and not getting the errors. > > Although before installing i deleted the following (after running > > make uninstall)... > > /usr/lib/gambas3 (full of .so files, see attachment for ls result) > > /usr/share/gambas3 (3 icons) > > $HOME/.local/share/gambas3 (700mb+ in 235,000 files) > > > > am doing the same on mint now to see if it's any better. > > > I will make a Mint VM to look at that. > > -- > Beno?t Minisini Thank you Ben. Note. I just loaded Debian again as i wondered if the IDE ran with QT not gtk (it was gtk) and found on debian i cannot reproduce the searchbox lockup but the non appearing menus until i ctrl-c , this IS happening also on Debian for me. All the best BruceS -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Wed Nov 25 20:35:07 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Wed, 25 Nov 2020 19:35:07 +0000 Subject: [Gambas-user] Fwd: a lot if crashes In-Reply-To: References: <8d52ceff-6dab-c8a9-10fa-33e6f0240c15@cd-bahia.com> <952e3502-86c4-fdcd-6461-d9fc56c96b69@gmail.com> <38869707-482b-e7c9-ef5e-2473ac0766f8@deganius.de> <56b74cbb-1ae7-6b9f-3b7c-5d59203a356c@deganius.de> <6cdd9f42-3e3c-e8e1-51b5-d4f73f2ebdde@gmail.com> <916658e1-f615-a8dc-4e62-8b6945261a31@gmail.com> <9212cc37-55ea-c22c-477a-a31ddd883a60@gmail.com> Message-ID: I do not envy the challenge you have set yourself there m8. I have enough trouble with my simple editor where the keyboard macros only work on gtk but then i added a markdown previewer using webview :-\ so either trying to make a seperate qt version work with it or use the new gtk one but that's only available on the beta so a bit of a pickle. A very very tiny pickle compared to the size of your pickle i think. But we eat pickles for breakfast right? ;) if only all these things worked together nicely :( Best of luck kind sir . BruceS On Wed, 25 Nov 2020 at 19:09, Beno?t Minisini wrote: > Le 25/11/2020 ? 20:01, Beno?t Minisini a ?crit : > >> It's safe to say LinuxMint simply does not comply with how you're > >> doing things with GTK3 (no errors in QT IDE) > >> > > > > I will make a Mint VM to look at that. > > > > Note that to make a usable Gambas GTK+3 component, I have to do a lot of > horrible hacks and workarounds. > > For example, you noticed that hitting CTRL+V inside the search box > triggers the current editor menu shortcut instead of the textbox one, as > anyone would expect. This is done -by design- by the GTK+ developer, and > you will find a lot of complain on the internet about that. > > Fixing that stupid behaviour inside GTK+ source code is just a matter of > swapping four lines of code. Outside of it, i.e. inside the gb.gtk > component, it becomes a hack. > > These are these kind of hacks that I suspect. > > Regards, > > -- > Beno?t Minisini > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From brian at westwoodsvcs.com Wed Nov 25 21:11:14 2020 From: brian at westwoodsvcs.com (Brian G) Date: Wed, 25 Nov 2020 12:11:14 -0800 (PST) Subject: [Gambas-user] using search crashing ide (sometimes) In-Reply-To: References: Message-ID: <46130180.706.1606335074822.JavaMail.zimbra@westwoodsvcs.com> I am having the same problem with the filter/search box the ide hangs or crashes randomly Thank You Brian G From: "Bruce Steers" To: "Gambas mailing list" Sent: Wednesday, November 25, 2020 6:52:21 PM Subject: Re: [Gambas-user] using search crashing ide (sometimes) On Wed, 25 Nov 2020 at 18:05, Jussi Lahtinen < [ mailto:jussi.lahtinen at gmail.com | jussi.lahtinen at gmail.com ] > wrote: If it is freeze rather than crash, then try to open the IDE in the IDE and then use the search function there. That way you can see where it freezes. Tried it, the launched IDE locks up and does not release, I have to force quit it and not get any error messages/clues. I found some anomalies i reported to Ben where when the menu glitch is occurring the IDE seems to be running the wrong function Control_MouseUp() in app/src/gambas3/.src/Editor/FFmain.class while in error a breakpoint catches the running in that function. if i Ctrl-C or use the copy function in system info to fix the glitch then the menu pops up and the function Control_MouseUp() does not run (no stopping at breakpoint) This i think is getting to the root of the problem. i find that difference in function call particularly odd. BQ_BEGIN I haven't seen it happening. Do you mean the search box in the hierarchy tab? BQ_END No the main search box in the form designer toolbar BQ_BEGIN Jussi On Wed, Nov 25, 2020 at 4:54 PM Bruce Steers < [ mailto:bsteers4 at gmail.com | bsteers4 at gmail.com ] > wrote: BQ_BEGIN Anybody else finding the IDE locks up (3.15.90) when using the search function from the ide searchbox not the pop up search window? And not all the time, just sometimes making it impossible to know just why? Or is it just me? BruceS ----[ [ http://gambaswiki.org/wiki/doc/netiquette | http://gambaswiki.org/wiki/doc/netiquette ] ]---- BQ_END ----[ [ http://gambaswiki.org/wiki/doc/netiquette | http://gambaswiki.org/wiki/doc/netiquette ] ]---- BQ_END ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: From kicking177 at gmail.com Thu Nov 26 10:55:52 2020 From: kicking177 at gmail.com (KKing) Date: Thu, 26 Nov 2020 09:55:52 +0000 Subject: [Gambas-user] Removing a runtime created control Message-ID: <96be87d7-4b58-f1b0-f0d8-e40f783cd1ea@gmail.com> I create a variable number of controls at runtime (depending on data being processed) with below. ??? hToolButton = New ToolButton(Me) As "My_Button" ??? hToolButton.Text = "MyButton" & CStr(intIndex) ??? hToolButton.Tag = "MyButton" & CStr(intIndex) Is there a way to delete an individual "intIndex" based "My_Button" control and or all the "My_Button" controls? K. From mbelmonte at belmotek.net Thu Nov 26 10:59:59 2020 From: mbelmonte at belmotek.net (Martin) Date: Thu, 26 Nov 2020 10:59:59 +0100 Subject: [Gambas-user] Removing a runtime created control In-Reply-To: <96be87d7-4b58-f1b0-f0d8-e40f783cd1ea@gmail.com> References: <96be87d7-4b58-f1b0-f0d8-e40f783cd1ea@gmail.com> Message-ID: <0f596b94-11af-65e2-110b-c986acd4817b@belmotek.net> Hi, you could use me.childrens.clear for delete all the controls. then if you want to delete a specific control what you know its name you could use Me["controlnametokill"].delete Regards. On 26/11/20 10:55, KKing wrote: > I create a variable number of controls at runtime (depending on data > being processed) with below. > ??? hToolButton = New ToolButton(Me) As "My_Button" > ??? hToolButton.Text = "MyButton" & CStr(intIndex) > ??? hToolButton.Tag = "MyButton" & CStr(intIndex) > Is there a way to delete an individual "intIndex" based "My_Button" > control and or all the "My_Button" controls? > K. > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- From gambas.fr at gmail.com Thu Nov 26 12:06:45 2020 From: gambas.fr at gmail.com (Fabien Bodard) Date: Thu, 26 Nov 2020 12:06:45 +0100 Subject: [Gambas-user] Need help Message-ID: Hi, can you quickly answer me please, I'm looking for a serious SMS sending service with external API, to use in my customer management app. Free is cool but It's for my job so even a payable one will be good for me. Thank you -- Fabien Bodard From patrick.maguer at sfr.fr Thu Nov 26 12:35:17 2020 From: patrick.maguer at sfr.fr (Patrick Maguer) Date: Thu, 26 Nov 2020 12:35:17 +0100 Subject: [Gambas-user] Need help In-Reply-To: References: Message-ID: Hello Fabien, Look at kdeconnect and kdeconnect-cli from the command line. Patrick Le 26/11/2020 ? 12:06, Fabien Bodard a ?crit?: > Hi, can you quickly answer me please, I'm looking for a serious SMS > sending service with external API, to use in my customer management > app. > > Free is cool but It's for my job so even a payable one will be good for me. > > Thank you > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pata.karlstrom at gmail.com Thu Nov 26 14:07:09 2020 From: pata.karlstrom at gmail.com (=?UTF-8?Q?Patrik_Karlstr=C3=B6m?=) Date: Thu, 26 Nov 2020 14:07:09 +0100 Subject: [Gambas-user] Need help In-Reply-To: References: Message-ID: Have a look at https://46elks.com/ Met them at oredev a couple of years ago. Den tors 26 nov. 2020 12:07Fabien Bodard skrev: > Hi, can you quickly answer me please, I'm looking for a serious SMS > sending service with external API, to use in my customer management > app. > > Free is cool but It's for my job so even a payable one will be good for me. > > Thank you > > -- > Fabien Bodard > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kicking177 at gmail.com Thu Nov 26 14:48:18 2020 From: kicking177 at gmail.com (KKing) Date: Thu, 26 Nov 2020 13:48:18 +0000 Subject: [Gambas-user] Removing a runtime created control Message-ID: I'll need to do some more tests... suspect maybe running into another LXDE issue ... I tried both ????? Me.Controls["My_Button"].Delete and ????? Me["My_Button"].Delete both executed without error but the toolbar buttons remained on the form and the My_Button_Click event still fired from. I did try me.childrens.clear but that obviously removed other controls I didn't want removed > Hi, you could use me.childrens.clear for delete all the controls. > > then if you want to delete a specific control what you know its name you > could use Me["controlnametokill"].delete From adamnt42 at gmail.com Thu Nov 26 16:12:38 2020 From: adamnt42 at gmail.com (Bruce) Date: Fri, 27 Nov 2020 01:42:38 +1030 Subject: [Gambas-user] Need help In-Reply-To: References: Message-ID: <4206cecd-07c9-fbf2-8f52-fe72ff442785@gmail.com> On 26/11/20 9:36 pm, Fabien Bodard wrote: > Hi, can you quickly answer me please, I'm looking for a serious SMS > sending service with external API, to use in my customer management > app. > > Free is cool but It's for my job so even a payable one will be good for me. > > Thank you > Have a look at https://textbelt.com/ b From adamnt42 at gmail.com Thu Nov 26 16:44:48 2020 From: adamnt42 at gmail.com (Bruce) Date: Fri, 27 Nov 2020 02:14:48 +1030 Subject: [Gambas-user] Removing a runtime created control In-Reply-To: References: Message-ID: On 27/11/20 12:18 am, KKing wrote: > I'll need to do some more tests... suspect maybe running into another > LXDE issue ... I tried both > ????? Me.Controls["My_Button"].Delete > and > ????? Me["My_Button"].Delete > both executed without error but the toolbar buttons remained on the form > and the My_Button_Click event still fired from. > > I did try > > ????me.childrens.clear > > but that obviously removed other controls I didn't want removed > >> Hi, you could use me.childrens.clear for delete all the controls. >> >> then if you want to delete a specific control what you know its name you >> could use Me["controlnametokill"].delete > > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- You appear to be trying yo remove the Event bame in that code above. You need to remove the control name! bruce From gambas.fr at gmail.com Thu Nov 26 19:23:41 2020 From: gambas.fr at gmail.com (Fabien Bodard) Date: Thu, 26 Nov 2020 19:23:41 +0100 Subject: [Gambas-user] Need help In-Reply-To: <4206cecd-07c9-fbf2-8f52-fe72ff442785@gmail.com> References: <4206cecd-07c9-fbf2-8f52-fe72ff442785@gmail.com> Message-ID: Thank you all ? Le jeu. 26 nov. 2020 ? 16:13, Bruce a ?crit : > On 26/11/20 9:36 pm, Fabien Bodard wrote: > > Hi, can you quickly answer me please, I'm looking for a serious SMS > > sending service with external API, to use in my customer management > > app. > > > > Free is cool but It's for my job so even a payable one will be good for > me. > > > > Thank you > > > > > Have a look at https://textbelt.com/ > > b > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sharon at 455.co.il Thu Nov 26 20:39:02 2020 From: sharon at 455.co.il (Mayost Sharon) Date: Thu, 26 Nov 2020 21:39:02 +0200 Subject: [Gambas-user] Add Arguments using the IDE Message-ID: <20201126185705.M20279@455.co.il> Hello In previous versions it was possible to Add arguments using the IDE Project -> Properties -> Arguments In version 3.15.2 it is not found Is it in another location? Thanks From sharon at 455.co.il Thu Nov 26 20:45:55 2020 From: sharon at 455.co.il (Mayost Sharon) Date: Thu, 26 Nov 2020 21:45:55 +0200 Subject: [Gambas-user] Add Arguments using the IDE In-Reply-To: <20201126185705.M20279@455.co.il> References: <20201126185705.M20279@455.co.il> Message-ID: <20201126194411.M25289@455.co.il> ---------- Original Message ----------- From: "Mayost Sharon" To: Gambas Mailing List Sent: Thu, 26 Nov 2020 21:39:02 +0200 Subject: [Gambas-user] Add Arguments using the IDE > Hello > > In previous versions it was possible to Add arguments using the IDE > > Project -> Properties -> Arguments > > In version 3.15.2 it is not found > Is it in another location? > > Thanks > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- ------- End of Original Message ------- Sorry I did not notice that there was an answer to that Through: Run With From g4mba5 at gmail.com Thu Nov 26 23:20:09 2020 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Thu, 26 Nov 2020 23:20:09 +0100 Subject: [Gambas-user] using search crashing ide (sometimes) In-Reply-To: References: Message-ID: Le 25/11/2020 ? 15:53, Bruce Steers a ?crit?: > Anybody else finding the IDE locks up (3.15.90) when using the search > function from the ide searchbox not the pop up search window? > > And not all the time, just sometimes making it impossible to know just why? > > Or is it just me? > BruceS > I have set up a Mint Mate 20 inside a Virtual Box VM, and compiled and installed the latest Gambas master in it. Everything is normal : using the top search box repeatedly does not lock the IDE, and the popup menus pop up normally. I just confirm the problem of too small menu icons when the default font size is less than 15 pixels high. Regards, -- Beno?t Minisini From bsteers4 at gmail.com Thu Nov 26 23:40:53 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Thu, 26 Nov 2020 22:40:53 +0000 Subject: [Gambas-user] using search crashing ide (sometimes) In-Reply-To: References: Message-ID: Merd. Thank you for trying Ben. I've been trying various things like running it with break points but I'm in an alien world. Its obviously a gtk thing as it does not do it in qt mode. I will investigate further having breaks cycling between using qt mode for my own projects then going gtk bug hunting for you... Seems on not the only one experiencing it. I would imagine if you installed mint on a partition and booted from it you'd get the problem. Unless it's a hardware thing? Sorry to pull you away from other things and thanks again for looking into it for us. I was so hoping you'd find it ? Merci beaucoup BruceS On Thu, 26 Nov 2020, 22:21 Beno?t Minisini, wrote: > Le 25/11/2020 ? 15:53, Bruce Steers a ?crit : > > Anybody else finding the IDE locks up (3.15.90) when using the search > > function from the ide searchbox not the pop up search window? > > > > And not all the time, just sometimes making it impossible to know just > why? > > > > Or is it just me? > > BruceS > > > > I have set up a Mint Mate 20 inside a Virtual Box VM, and compiled and > installed the latest Gambas master in it. > > Everything is normal : using the top search box repeatedly does not lock > the IDE, and the popup menus pop up normally. > > I just confirm the problem of too small menu icons when the default font > size is less than 15 pixels high. > > Regards, > > -- > Beno?t Minisini > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsteers4 at gmail.com Fri Nov 27 00:36:29 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Thu, 26 Nov 2020 23:36:29 +0000 Subject: [Gambas-user] using search crashing ide (sometimes) In-Reply-To: References: Message-ID: Can you suggest where I should be looking? I can run tests, add debug code in various places. Help track this little bugger down? I was debugging the ide but thinking about it I was looking In the wrong place as works on qt. If you want me to run some tests maybe make a branch with a bunch of debug code where you need it and I'll install it, happy to run tests and send output. Maybe Brian would too and anyone else experiencing the problem? All the best BruceS On Thu, 26 Nov 2020, 22:21 Beno?t Minisini, wrote: > Le 25/11/2020 ? 15:53, Bruce Steers a ?crit : > > Anybody else finding the IDE locks up (3.15.90) when using the search > > function from the ide searchbox not the pop up search window? > > > > And not all the time, just sometimes making it impossible to know just > why? > > > > Or is it just me? > > BruceS > > > > I have set up a Mint Mate 20 inside a Virtual Box VM, and compiled and > installed the latest Gambas master in it. > > Everything is normal : using the top search box repeatedly does not lock > the IDE, and the popup menus pop up normally. > > I just confirm the problem of too small menu icons when the default font > size is less than 15 pixels high. > > Regards, > > -- > Beno?t Minisini > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From g4mba5 at gmail.com Fri Nov 27 00:53:45 2020 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Fri, 27 Nov 2020 00:53:45 +0100 Subject: [Gambas-user] using search crashing ide (sometimes) In-Reply-To: References: Message-ID: <3324e44a-fc4b-f333-db49-aae97bfa6af1@gmail.com> Le 27/11/2020 ? 00:36, Bruce Steers a ?crit?: > Can you suggest where I should be looking? > I suggest you entirely remove Gambas from your system (i.e. at least delete '/usr/lib/gambas3', '/usr/share/gambas3', '/usr/bin/gb*3' and '/usr/bin/gambas3*'). Then clone the git repository, recompile and reinstall everything from scratch. And send me the full output of the reconf, configure, and install process. Regards, -- Beno?t Minisini From bsteers4 at gmail.com Fri Nov 27 07:37:20 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Fri, 27 Nov 2020 06:37:20 +0000 Subject: [Gambas-user] using search crashing ide (sometimes) In-Reply-To: <3324e44a-fc4b-f333-db49-aae97bfa6af1@gmail.com> References: <3324e44a-fc4b-f333-db49-aae97bfa6af1@gmail.com> Message-ID: your wish is my command. do you really need a fresh clone? i did 'git reset --hard' on my local dir and pulled the upstream master (i've installed my patched version (problem is the same on 3.15.90)) Attached is output from my script... if you want me to do the same with a fresh downloaded 3.15.90 clone let me know. On Thu, 26 Nov 2020 at 23:54, Beno?t Minisini wrote: > Le 27/11/2020 ? 00:36, Bruce Steers a ?crit : > > Can you suggest where I should be looking? > > > > I suggest you entirely remove Gambas from your system (i.e. at least > delete '/usr/lib/gambas3', '/usr/share/gambas3', '/usr/bin/gb*3' and > '/usr/bin/gambas3*'). > > Then clone the git repository, recompile and reinstall everything from > scratch. > > And send me the full output of the reconf, configure, and install process. > > Regards, > > -- > Beno?t Minisini > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: gambas-compile-install.log.zip Type: application/zip Size: 20891 bytes Desc: not available URL: From kicking177 at gmail.com Fri Nov 27 11:34:43 2020 From: kicking177 at gmail.com (KKing) Date: Fri, 27 Nov 2020 10:34:43 +0000 Subject: [Gambas-user] Removing a runtime created control Message-ID: <949073e8-5c93-6371-ff41-18bcad827e73@gmail.com> I've just run the following code in 3.12.2 on Debian10 LXDE and Debian10 KDE. NB I'm creating as just "Graphical Application" (i.e. not QT or GTK) ?- - - - - - Private hToolButton As ToolButton Public Sub btnTest_Click() ? Dim intIndex As Integer ? For intIndex = 0 To 2 ??? hToolButton = New ToolButton(Me) As "My_Button" ??? hToolButton.Top = 0 + (intIndex * 30) ??? hToolButton.Left = 0 ??? hToolButton.Width = 300 ??? hToolButton.Height = 30 ??? hToolButton.Text = "MyButton" & CStr(intIndex) ? Next End Public Sub btnRemove_Click() ? Me["My_Button"].Delete End Public Sub My_Button_Click() ? Message.Info("Hello") End ?- - - - - - On LXDE the btnTest generates the 3 buttons click btnRemove once removes the first drawn button the remaining buttons still function click again and it removes the second drawn button the remaining button still functions click again and it removes the third and last drawn button. *** How could I just selectively remove a button based on index? NB the index for 0 to 2 is just for this example test, in desired application there would be a variable and large number of buttons determined by data and user interaction. As a workaround I could do ?? ?hToolButton = New ToolButton(Me) As "My_Button" & CStr(intIndex) which allows me to absolutely delete individual buttons but it means instead of having one ?? ?Public Sub My_Button_Click() I would have to code a large number sub just in case needed, for this example it would just need ?? ?Public Sub My_Button0_Click() ?? ?Public Sub My_Button1_Click() ?? ?Public Sub My_Button2_Click() But in the real application I may needs something like potentially 60 of them! ALSO running the same code in Debian10 KDE does not work the same. Clicking btnRemove once removes the last drawn button only (and the first two buttons still work) But when click btnRemove again to remove next button it complains Me["My_Button"] is a null object K. From rwe-sse at osnanet.de Fri Nov 27 11:50:54 2020 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Fri, 27 Nov 2020 11:50:54 +0100 Subject: [Gambas-user] Removing a runtime created control In-Reply-To: <949073e8-5c93-6371-ff41-18bcad827e73@gmail.com> References: <949073e8-5c93-6371-ff41-18bcad827e73@gmail.com> Message-ID: Am 27.11.20 um 11:34 schrieb KKing: > I've just run the following code in 3.12.2 on Debian10 LXDE and Debian10 > KDE. > NB I'm creating as just "Graphical Application" (i.e. not QT or GTK) > ?- - - - - - > Private hToolButton As ToolButton > > Public Sub btnTest_Click() > ? Dim intIndex As Integer > ? For intIndex = 0 To 2 > ??? hToolButton = New ToolButton(Me) As "My_Button" > ??? hToolButton.Top = 0 + (intIndex * 30) > ??? hToolButton.Left = 0 > ??? hToolButton.Width = 300 > ??? hToolButton.Height = 30 > ??? hToolButton.Text = "MyButton" & CStr(intIndex) > ? Next > End > > Public Sub btnRemove_Click() > > ? Me["My_Button"].Delete > > End > > Public Sub My_Button_Click() > > ? Message.Info("Hello") > > End > ?- - - - - - > > On LXDE the btnTest generates the 3 buttons > click btnRemove once removes the first drawn button the remaining > buttons still function > click again and it removes the second drawn button the remaining button > still functions > click again and it removes the third and last drawn button. > > *** How could I just selectively remove a button based on index? > > NB the index for 0 to 2 is just for this example test, in desired > application there would be a variable and large number of buttons > determined by data and user interaction. > > As a workaround I could do > ?? ?hToolButton = New ToolButton(Me) As "My_Button" & CStr(intIndex) > which allows me to absolutely delete individual buttons but it means > instead of having one > ?? ?Public Sub My_Button_Click() > I would have to code a large number sub just in case needed, for this > example it would just need > ?? ?Public Sub My_Button0_Click() > ?? ?Public Sub My_Button1_Click() > ?? ?Public Sub My_Button2_Click() > But in the real application I may needs something like potentially 60 of > them! > > ALSO > running the same code in Debian10 KDE does not work the same. > Clicking btnRemove once removes the last drawn button only (and the > first two buttons still work) > But when click btnRemove again to remove next button it complains > Me["My_Button"] is a null object > K. > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > When I needed this, I deleted all objects from last to first with a for-next loop step -1. Like this: Inc fldNr mTxt.Resize(fldNr + 1) mTxt[fldNr] = New TextBox(Maske) As "MaskeFeld" mTxt[fldNr].Tag = wert[8] 'fldNr mTxt[fldNr].ToolTip = wert[8] mTxt[fldNr].X = Val(wert[2]) mTxt[fldNr].Y = Val(wert[3]) And later this: For i = mTxt.Count - 1 To 0 Step -1 mTxt[i].Delete Next mTxt.Clear As long as you point directly to the object, everything runs fine, and I included a separate counter (integer variable) to keep control over the absolute number of objects. Then delete them one-by-one referencing them with this counter. Regards Rolf From d4t4full at gmail.com Fri Nov 27 12:25:21 2020 From: d4t4full at gmail.com (ML) Date: Fri, 27 Nov 2020 08:25:21 -0300 Subject: [Gambas-user] Removing a runtime created control In-Reply-To: References: <949073e8-5c93-6371-ff41-18bcad827e73@gmail.com> Message-ID: <095a78f2-421e-1755-b90f-dfec52d8f03d@gmail.com> On 27/11/20 07:50, Rolf-Werner Eilert wrote: > Am 27.11.20 um 11:34 schrieb KKing: >> I've just run the following code in 3.12.2 on Debian10 LXDE and >> Debian10 KDE. >> NB I'm creating as just "Graphical Application" (i.e. not QT or GTK) >> ??- - - - - - >> Private hToolButton As ToolButton >> >> Public Sub btnTest_Click() >> ?? Dim intIndex As Integer >> ?? For intIndex = 0 To 2 >> ???? hToolButton = New ToolButton(Me) As "My_Button" >> ???? hToolButton.Top = 0 + (intIndex * 30) >> ???? hToolButton.Left = 0 >> ???? hToolButton.Width = 300 >> ???? hToolButton.Height = 30 >> ???? hToolButton.Text = "MyButton" & CStr(intIndex) >> ?? Next >> End >> >> Public Sub btnRemove_Click() >> >> ?? Me["My_Button"].Delete >> >> End >> >> Public Sub My_Button_Click() >> >> ?? Message.Info("Hello") >> >> End >> ??- - - - - - >> >> On LXDE the btnTest generates the 3 buttons >> click btnRemove once removes the first drawn button the remaining >> buttons still function >> click again and it removes the second drawn button the remaining >> button still functions >> click again and it removes the third and last drawn button. >> >> *** How could I just selectively remove a button based on index? >> >> NB the index for 0 to 2 is just for this example test, in desired >> application there would be a variable and large number of buttons >> determined by data and user interaction. >> >> As a workaround I could do >> ??? ?hToolButton = New ToolButton(Me) As "My_Button" & CStr(intIndex) >> which allows me to absolutely delete individual buttons but it means >> instead of having one >> ??? ?Public Sub My_Button_Click() >> I would have to code a large number sub just in case needed, for this >> example it would just need >> ??? ?Public Sub My_Button0_Click() >> ??? ?Public Sub My_Button1_Click() >> ??? ?Public Sub My_Button2_Click() >> But in the real application I may needs something like potentially 60 >> of them! >> >> ALSO >> running the same code in Debian10 KDE does not work the same. >> Clicking btnRemove once removes the last drawn button only (and the >> first two buttons still work) >> But when click btnRemove again to remove next button it complains >> Me["My_Button"] is a null object >> K. >> >> ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- >> > > When I needed this, I deleted all objects from last to first with a > for-next loop step -1. > Like this: > ??????? Inc fldNr > ??????? mTxt.Resize(fldNr + 1) > ??????? mTxt[fldNr] = New TextBox(Maske) As "MaskeFeld" > ??????? mTxt[fldNr].Tag = wert[8] 'fldNr > ??????? mTxt[fldNr].ToolTip = wert[8] > ??????? mTxt[fldNr].X = Val(wert[2]) > ??????? mTxt[fldNr].Y = Val(wert[3]) > And later this: > ? For i = mTxt.Count - 1 To 0 Step -1 > ??? mTxt[i].Delete > ? Next > ? mTxt.Clear > As long as you point directly to the object, everything runs fine, and > I included a separate counter (integer variable) to keep control over > the absolute number of objects. Then delete them one-by-one > referencing them with this counter. > Regards > Rolf Try this (beware - not tested, pulled straight out of my brains, but I think the concept gets through): Private hToolButton As ToolButton Private targetIndex As Integer??? '<-- The form-scoped button index to remove Public Sub btnTest_Click() ?? Dim intIndex As Integer ?? For intIndex = 0 To 2 ???? hToolButton = New ToolButton(Me) As "My_Button" ???? hToolButton.Top = 0 + (intIndex * 30) ???? hToolButton.Left = 0 ???? hToolButton.Width = 300 ???? hToolButton.Height = 30 ???? hToolButton.Text = "MyButton" & CStr(intIndex) ???? hToolButton.Tag = CStr(intIndex)??? '<-- This here makes the difference! ?? Next End Public Sub btnRemove_Click() ?? 'Assume the index to kill is set somehow OUTSIDE THIS SUB in this variable - The variable thus needs to be in the form's scope ?? 'You could have this test program show a textbox with the target index to remove just to check this method works ?? targetIndex = 1 ?? 'Here, search for the proper tag-based index in the button array and kill just that element. ?? For intIndex = 0 To hToolButton.Lenght - 1 'Take any possible removed indices into account (the array shrinks, indices change... but tags stay) ???? If (hToolButton[intIndex].Tag = CStr(targetIndex)) Then ?????? hToolButton[intIndex].Delete ???? End If ?? Next End Public Sub My_Button_Click() ?? Message.Info("Hello") End Another possibility would be having a Keyed Collection instead of an array, and remove buttons from the Collection based on the key: No for loops needed that way. Hope it helps, zxMarce. From kicking177 at gmail.com Fri Nov 27 14:41:25 2020 From: kicking177 at gmail.com (KKing) Date: Fri, 27 Nov 2020 13:41:25 +0000 Subject: [Gambas-user] Removing a runtime created control Message-ID: Hi Rolf, many thanks, that works for me > ??? Inc fldNr > ??? mTxt.Resize(fldNr + 1) > ??? mTxt[fldNr] = New TextBox(Maske) As "MaskeFeld" > ..... > ??? mTxt[i].Delete From jussi.lahtinen at gmail.com Fri Nov 27 16:17:41 2020 From: jussi.lahtinen at gmail.com (Jussi Lahtinen) Date: Fri, 27 Nov 2020 17:17:41 +0200 Subject: [Gambas-user] Removing a runtime created control In-Reply-To: <949073e8-5c93-6371-ff41-18bcad827e73@gmail.com> References: <949073e8-5c93-6371-ff41-18bcad827e73@gmail.com> Message-ID: I'm surprised that works at all, because you are using the same handle and the event name for multiple buttons. Dim intIndex As Integer[3] For intIndex = 0 To 2 hToolButton[intIndex] = New ToolButton(Me) As "My_Button" & CStr(intIndex) ... That should behave predictable. Jussi On Fri, Nov 27, 2020 at 12:35 PM KKing wrote: > I've just run the following code in 3.12.2 on Debian10 LXDE and Debian10 > KDE. > NB I'm creating as just "Graphical Application" (i.e. not QT or GTK) > - - - - - - > Private hToolButton As ToolButton > > Public Sub btnTest_Click() > Dim intIndex As Integer > For intIndex = 0 To 2 > hToolButton = New ToolButton(Me) As "My_Button" > hToolButton.Top = 0 + (intIndex * 30) > hToolButton.Left = 0 > hToolButton.Width = 300 > hToolButton.Height = 30 > hToolButton.Text = "MyButton" & CStr(intIndex) > Next > End > > Public Sub btnRemove_Click() > > Me["My_Button"].Delete > > End > > Public Sub My_Button_Click() > > Message.Info("Hello") > > End > - - - - - - > > On LXDE the btnTest generates the 3 buttons > click btnRemove once removes the first drawn button the remaining > buttons still function > click again and it removes the second drawn button the remaining button > still functions > click again and it removes the third and last drawn button. > > *** How could I just selectively remove a button based on index? > > NB the index for 0 to 2 is just for this example test, in desired > application there would be a variable and large number of buttons > determined by data and user interaction. > > As a workaround I could do > hToolButton = New ToolButton(Me) As "My_Button" & CStr(intIndex) > which allows me to absolutely delete individual buttons but it means > instead of having one > Public Sub My_Button_Click() > I would have to code a large number sub just in case needed, for this > example it would just need > Public Sub My_Button0_Click() > Public Sub My_Button1_Click() > Public Sub My_Button2_Click() > But in the real application I may needs something like potentially 60 of > them! > > ALSO > running the same code in Debian10 KDE does not work the same. > Clicking btnRemove once removes the last drawn button only (and the > first two buttons still work) > But when click btnRemove again to remove next button it complains > Me["My_Button"] is a null object > K. > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rwe-sse at osnanet.de Fri Nov 27 16:34:50 2020 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Fri, 27 Nov 2020 16:34:50 +0100 Subject: [Gambas-user] Removing a runtime created control In-Reply-To: References: <949073e8-5c93-6371-ff41-18bcad827e73@gmail.com> Message-ID: Interesting, Jussi! My version also uses the same handle and event name for each object, and it finds its events with the .Last property. This was described in some help text. Maybe it's obsolete meanwhile? I always wondered how it could work, but I just accepted it as given. Your version "New ToolButton(Me) As "My_Button" & CStr(intIndex)" is much clearer to me, but how would I use .Last in this case? Or: how can I find just "the object which has produced the Change event (for example)? Rolf Am 27.11.20 um 16:17 schrieb Jussi Lahtinen: > I'm surprised that works at all, because you are using the same handle > and the event name for multiple buttons. > > ? Dim intIndex As Integer[3] > ?? For intIndex = 0 To 2 > ???? hToolButton[intIndex] = New ToolButton(Me) As "My_Button" & > CStr(intIndex) > ... > > That should behave predictable. > > Jussi > > > > On Fri, Nov 27, 2020 at 12:35 PM KKing > wrote: > > I've just run the following code in 3.12.2 on Debian10 LXDE and > Debian10 > KDE. > NB I'm creating as just "Graphical Application" (i.e. not QT or GTK) > ??- - - - - - > Private hToolButton As ToolButton > > Public Sub btnTest_Click() > ?? Dim intIndex As Integer > ?? For intIndex = 0 To 2 > ???? hToolButton = New ToolButton(Me) As "My_Button" > ???? hToolButton.Top = 0 + (intIndex * 30) > ???? hToolButton.Left = 0 > ???? hToolButton.Width = 300 > ???? hToolButton.Height = 30 > ???? hToolButton.Text = "MyButton" & CStr(intIndex) > ?? Next > End > > Public Sub btnRemove_Click() > > ?? Me["My_Button"].Delete > > End > > Public Sub My_Button_Click() > > ?? Message.Info("Hello") > > End > ??- - - - - - > > On LXDE the btnTest generates the 3 buttons > click btnRemove once removes the first drawn button the remaining > buttons still function > click again and it removes the second drawn button the remaining button > still functions > click again and it removes the third and last drawn button. > > *** How could I just selectively remove a button based on index? > > NB the index for 0 to 2 is just for this example test, in desired > application there would be a variable and large number of buttons > determined by data and user interaction. > > As a workaround I could do > ??? ?hToolButton = New ToolButton(Me) As "My_Button" & CStr(intIndex) > which allows me to absolutely delete individual buttons but it means > instead of having one > ??? ?Public Sub My_Button_Click() > I would have to code a large number sub just in case needed, for this > example it would just need > ??? ?Public Sub My_Button0_Click() > ??? ?Public Sub My_Button1_Click() > ??? ?Public Sub My_Button2_Click() > But in the real application I may needs something like potentially > 60 of > them! > > ALSO > running the same code in Debian10 KDE does not work the same. > Clicking btnRemove once removes the last drawn button only (and the > first two buttons still work) > But when click btnRemove again to remove next button it complains > Me["My_Button"] is a null object > K. > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > From jussi.lahtinen at gmail.com Fri Nov 27 19:39:40 2020 From: jussi.lahtinen at gmail.com (Jussi Lahtinen) Date: Fri, 27 Nov 2020 20:39:40 +0200 Subject: [Gambas-user] Removing a runtime created control In-Reply-To: References: <949073e8-5c93-6371-ff41-18bcad827e73@gmail.com> Message-ID: At least here you seem to give a new handle: mTxt[fldNr] = New TextBox(Maske) As "MaskeFeld" The events are raised by the name: My_Button1_Change, My_Button2_Change, etc. If they are grouped you can just use Last (no dot) keyword. Jussi On Fri, Nov 27, 2020 at 5:35 PM Rolf-Werner Eilert wrote: > Interesting, Jussi! > > My version also uses the same handle and event name for each object, and > it finds its events with the .Last property. This was described in some > help text. Maybe it's obsolete meanwhile? I always wondered how it could > work, but I just accepted it as given. > > Your version "New ToolButton(Me) As "My_Button" & CStr(intIndex)" is > much clearer to me, but how would I use .Last in this case? Or: how can > I find just "the object which has produced the Change event (for example)? > > Rolf > > > Am 27.11.20 um 16:17 schrieb Jussi Lahtinen: > > I'm surprised that works at all, because you are using the same handle > > and the event name for multiple buttons. > > > > Dim intIndex As Integer[3] > > For intIndex = 0 To 2 > > hToolButton[intIndex] = New ToolButton(Me) As "My_Button" & > > CStr(intIndex) > > ... > > > > That should behave predictable. > > > > Jussi > > > > > > > > On Fri, Nov 27, 2020 at 12:35 PM KKing > > wrote: > > > > I've just run the following code in 3.12.2 on Debian10 LXDE and > > Debian10 > > KDE. > > NB I'm creating as just "Graphical Application" (i.e. not QT or GTK) > > - - - - - - > > Private hToolButton As ToolButton > > > > Public Sub btnTest_Click() > > Dim intIndex As Integer > > For intIndex = 0 To 2 > > hToolButton = New ToolButton(Me) As "My_Button" > > hToolButton.Top = 0 + (intIndex * 30) > > hToolButton.Left = 0 > > hToolButton.Width = 300 > > hToolButton.Height = 30 > > hToolButton.Text = "MyButton" & CStr(intIndex) > > Next > > End > > > > Public Sub btnRemove_Click() > > > > Me["My_Button"].Delete > > > > End > > > > Public Sub My_Button_Click() > > > > Message.Info("Hello") > > > > End > > - - - - - - > > > > On LXDE the btnTest generates the 3 buttons > > click btnRemove once removes the first drawn button the remaining > > buttons still function > > click again and it removes the second drawn button the remaining > button > > still functions > > click again and it removes the third and last drawn button. > > > > *** How could I just selectively remove a button based on index? > > > > NB the index for 0 to 2 is just for this example test, in desired > > application there would be a variable and large number of buttons > > determined by data and user interaction. > > > > As a workaround I could do > > hToolButton = New ToolButton(Me) As "My_Button" & > CStr(intIndex) > > which allows me to absolutely delete individual buttons but it means > > instead of having one > > Public Sub My_Button_Click() > > I would have to code a large number sub just in case needed, for this > > example it would just need > > Public Sub My_Button0_Click() > > Public Sub My_Button1_Click() > > Public Sub My_Button2_Click() > > But in the real application I may needs something like potentially > > 60 of > > them! > > > > ALSO > > running the same code in Debian10 KDE does not work the same. > > Clicking btnRemove once removes the last drawn button only (and the > > first two buttons still work) > > But when click btnRemove again to remove next button it complains > > Me["My_Button"] is a null object > > K. > > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > > > > > > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > > > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jussi.lahtinen at gmail.com Fri Nov 27 19:41:39 2020 From: jussi.lahtinen at gmail.com (Jussi Lahtinen) Date: Fri, 27 Nov 2020 20:41:39 +0200 Subject: [Gambas-user] Removing a runtime created control In-Reply-To: References: <949073e8-5c93-6371-ff41-18bcad827e73@gmail.com> Message-ID: I mean Last works inside the event handler, whatever had raised it. Jussi On Fri, Nov 27, 2020 at 8:39 PM Jussi Lahtinen wrote: > At least here you seem to give a new handle: mTxt[fldNr] = New > TextBox(Maske) As "MaskeFeld" > The events are raised by the name: My_Button1_Change, My_Button2_Change, > etc. > If they are grouped you can just use Last (no dot) keyword. > > Jussi > > > On Fri, Nov 27, 2020 at 5:35 PM Rolf-Werner Eilert > wrote: > >> Interesting, Jussi! >> >> My version also uses the same handle and event name for each object, and >> it finds its events with the .Last property. This was described in some >> help text. Maybe it's obsolete meanwhile? I always wondered how it could >> work, but I just accepted it as given. >> >> Your version "New ToolButton(Me) As "My_Button" & CStr(intIndex)" is >> much clearer to me, but how would I use .Last in this case? Or: how can >> I find just "the object which has produced the Change event (for example)? >> >> Rolf >> >> >> Am 27.11.20 um 16:17 schrieb Jussi Lahtinen: >> > I'm surprised that works at all, because you are using the same handle >> > and the event name for multiple buttons. >> > >> > Dim intIndex As Integer[3] >> > For intIndex = 0 To 2 >> > hToolButton[intIndex] = New ToolButton(Me) As "My_Button" & >> > CStr(intIndex) >> > ... >> > >> > That should behave predictable. >> > >> > Jussi >> > >> > >> > >> > On Fri, Nov 27, 2020 at 12:35 PM KKing > > > wrote: >> > >> > I've just run the following code in 3.12.2 on Debian10 LXDE and >> > Debian10 >> > KDE. >> > NB I'm creating as just "Graphical Application" (i.e. not QT or GTK) >> > - - - - - - >> > Private hToolButton As ToolButton >> > >> > Public Sub btnTest_Click() >> > Dim intIndex As Integer >> > For intIndex = 0 To 2 >> > hToolButton = New ToolButton(Me) As "My_Button" >> > hToolButton.Top = 0 + (intIndex * 30) >> > hToolButton.Left = 0 >> > hToolButton.Width = 300 >> > hToolButton.Height = 30 >> > hToolButton.Text = "MyButton" & CStr(intIndex) >> > Next >> > End >> > >> > Public Sub btnRemove_Click() >> > >> > Me["My_Button"].Delete >> > >> > End >> > >> > Public Sub My_Button_Click() >> > >> > Message.Info("Hello") >> > >> > End >> > - - - - - - >> > >> > On LXDE the btnTest generates the 3 buttons >> > click btnRemove once removes the first drawn button the remaining >> > buttons still function >> > click again and it removes the second drawn button the remaining >> button >> > still functions >> > click again and it removes the third and last drawn button. >> > >> > *** How could I just selectively remove a button based on index? >> > >> > NB the index for 0 to 2 is just for this example test, in desired >> > application there would be a variable and large number of buttons >> > determined by data and user interaction. >> > >> > As a workaround I could do >> > hToolButton = New ToolButton(Me) As "My_Button" & >> CStr(intIndex) >> > which allows me to absolutely delete individual buttons but it means >> > instead of having one >> > Public Sub My_Button_Click() >> > I would have to code a large number sub just in case needed, for >> this >> > example it would just need >> > Public Sub My_Button0_Click() >> > Public Sub My_Button1_Click() >> > Public Sub My_Button2_Click() >> > But in the real application I may needs something like potentially >> > 60 of >> > them! >> > >> > ALSO >> > running the same code in Debian10 KDE does not work the same. >> > Clicking btnRemove once removes the last drawn button only (and the >> > first two buttons still work) >> > But when click btnRemove again to remove next button it complains >> > Me["My_Button"] is a null object >> > K. >> > >> > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- >> > >> > >> > >> > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- >> > >> >> >> ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jussi.lahtinen at gmail.com Fri Nov 27 20:00:41 2020 From: jussi.lahtinen at gmail.com (Jussi Lahtinen) Date: Fri, 27 Nov 2020 21:00:41 +0200 Subject: [Gambas-user] Removing a runtime created control In-Reply-To: References: <949073e8-5c93-6371-ff41-18bcad827e73@gmail.com> Message-ID: See the attachment. Jussi On Fri, Nov 27, 2020 at 8:41 PM Jussi Lahtinen wrote: > I mean Last works inside the event handler, whatever had raised it. > > Jussi > > > On Fri, Nov 27, 2020 at 8:39 PM Jussi Lahtinen > wrote: > >> At least here you seem to give a new handle: mTxt[fldNr] = New >> TextBox(Maske) As "MaskeFeld" >> The events are raised by the name: My_Button1_Change, My_Button2_Change, >> etc. >> If they are grouped you can just use Last (no dot) keyword. >> >> Jussi >> >> >> On Fri, Nov 27, 2020 at 5:35 PM Rolf-Werner Eilert >> wrote: >> >>> Interesting, Jussi! >>> >>> My version also uses the same handle and event name for each object, and >>> it finds its events with the .Last property. This was described in some >>> help text. Maybe it's obsolete meanwhile? I always wondered how it could >>> work, but I just accepted it as given. >>> >>> Your version "New ToolButton(Me) As "My_Button" & CStr(intIndex)" is >>> much clearer to me, but how would I use .Last in this case? Or: how can >>> I find just "the object which has produced the Change event (for >>> example)? >>> >>> Rolf >>> >>> >>> Am 27.11.20 um 16:17 schrieb Jussi Lahtinen: >>> > I'm surprised that works at all, because you are using the same handle >>> > and the event name for multiple buttons. >>> > >>> > Dim intIndex As Integer[3] >>> > For intIndex = 0 To 2 >>> > hToolButton[intIndex] = New ToolButton(Me) As "My_Button" & >>> > CStr(intIndex) >>> > ... >>> > >>> > That should behave predictable. >>> > >>> > Jussi >>> > >>> > >>> > >>> > On Fri, Nov 27, 2020 at 12:35 PM KKing >> > > wrote: >>> > >>> > I've just run the following code in 3.12.2 on Debian10 LXDE and >>> > Debian10 >>> > KDE. >>> > NB I'm creating as just "Graphical Application" (i.e. not QT or >>> GTK) >>> > - - - - - - >>> > Private hToolButton As ToolButton >>> > >>> > Public Sub btnTest_Click() >>> > Dim intIndex As Integer >>> > For intIndex = 0 To 2 >>> > hToolButton = New ToolButton(Me) As "My_Button" >>> > hToolButton.Top = 0 + (intIndex * 30) >>> > hToolButton.Left = 0 >>> > hToolButton.Width = 300 >>> > hToolButton.Height = 30 >>> > hToolButton.Text = "MyButton" & CStr(intIndex) >>> > Next >>> > End >>> > >>> > Public Sub btnRemove_Click() >>> > >>> > Me["My_Button"].Delete >>> > >>> > End >>> > >>> > Public Sub My_Button_Click() >>> > >>> > Message.Info("Hello") >>> > >>> > End >>> > - - - - - - >>> > >>> > On LXDE the btnTest generates the 3 buttons >>> > click btnRemove once removes the first drawn button the remaining >>> > buttons still function >>> > click again and it removes the second drawn button the remaining >>> button >>> > still functions >>> > click again and it removes the third and last drawn button. >>> > >>> > *** How could I just selectively remove a button based on index? >>> > >>> > NB the index for 0 to 2 is just for this example test, in desired >>> > application there would be a variable and large number of buttons >>> > determined by data and user interaction. >>> > >>> > As a workaround I could do >>> > hToolButton = New ToolButton(Me) As "My_Button" & >>> CStr(intIndex) >>> > which allows me to absolutely delete individual buttons but it >>> means >>> > instead of having one >>> > Public Sub My_Button_Click() >>> > I would have to code a large number sub just in case needed, for >>> this >>> > example it would just need >>> > Public Sub My_Button0_Click() >>> > Public Sub My_Button1_Click() >>> > Public Sub My_Button2_Click() >>> > But in the real application I may needs something like potentially >>> > 60 of >>> > them! >>> > >>> > ALSO >>> > running the same code in Debian10 KDE does not work the same. >>> > Clicking btnRemove once removes the last drawn button only (and the >>> > first two buttons still work) >>> > But when click btnRemove again to remove next button it complains >>> > Me["My_Button"] is a null object >>> > K. >>> > >>> > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- >>> > >>> > >>> > >>> > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- >>> > >>> >>> >>> ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Buttons-0.0.1.tar.gz Type: application/gzip Size: 11750 bytes Desc: not available URL: From bsteers4 at gmail.com Fri Nov 27 20:40:36 2020 From: bsteers4 at gmail.com (Bruce Steers) Date: Fri, 27 Nov 2020 19:40:36 +0000 Subject: [Gambas-user] customising my gambas TextEditorMode Message-ID: Hi I'm trying to customise my gambas a bit. but i cannot find the code (not for a lack of looking) What i want to do is alter the auto-fill when i type a property. If i type for example .. *Property Runable As Boolean* (then hit return) I get automatically written at the bottom of my file *Private Function Runable_Read() As Boolean EndPrivate Sub Runable_Write(Value As Boolean)End* --- That's awesome but i want it to add something more like this ... *Private $Runable As Boolean *(this added just below the property declaration) *Private Function Runable_Read() As BooleanReturn $RunableEndPrivate Sub Runable_Write(Value As Boolean)* *$Runable = Value * *End* Have been through the highlight and mode and editor code but not seeing where it happens to modify it, ? tia all the best BruceS -------------- next part -------------- An HTML attachment was scrubbed... URL: From vuott at tiscali.it Sat Nov 28 00:08:37 2020 From: vuott at tiscali.it (vuott at tiscali.it) Date: Sat, 28 Nov 2020 00:08:37 +0100 Subject: [Gambas-user] WARNING with commit master 2c173c0a Message-ID: Hello, updating my Gambas with Master 2c173c0a, This warning is always shown in "Make" report: gbi3: warning: component not found: gb regards Con Tiscali Mobile Smart 30 4G hai minuti illimitati, 100 SMS e 30 Giga in 4G a soli 8,99? al mese. http://tisca.li/smart30 -------------- next part -------------- An HTML attachment was scrubbed... URL: From vuott at tiscali.it Sat Nov 28 00:42:03 2020 From: vuott at tiscali.it (vuott at tiscali.it) Date: Sat, 28 Nov 2020 00:42:03 +0100 Subject: [Gambas-user] WARNING with commit master 2c173c0a In-Reply-To: References: Message-ID: Rectius: the warning is in "Make install". Il 28.11.2020 00:08 vuott at tiscali.it ha scritto: > Hello, > updating my Gambas with Master 2c173c0a, This warning is always shown in "Make" report: > gbi3: warning: component not found: gb > regards > > Con Tiscali Mobile Smart 30 4G hai minuti illimitati, 100 SMS e 30 Giga in 4G a soli 8,99EUR al mese. http://tisca.li/smart30 [1] Con Tiscali Mobile Smart 30 4G hai minuti illimitati, 100 SMS e 30 Giga in 4G a soli 8,99? al mese. http://tisca.li/smart30 -------------- next part -------------- An HTML attachment was scrubbed... URL: From g4mba5 at gmail.com Sat Nov 28 00:48:24 2020 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Sat, 28 Nov 2020 00:48:24 +0100 Subject: [Gambas-user] WARNING with commit master 2c173c0a In-Reply-To: References: Message-ID: <303c7d33-20c5-1a81-6a8e-a5b2edf32480@gmail.com> Le 28/11/2020 ? 00:42, vuott at tiscali.it a ?crit?: > Rectius:? the warning is in? "Make install". > It should be fixed now. -- Beno?t Minisini From vuott at tiscali.it Sat Nov 28 02:19:02 2020 From: vuott at tiscali.it (vuott at tiscali.it) Date: Sat, 28 Nov 2020 02:19:02 +0100 Subject: [Gambas-user] WARNING with commit master 2c173c0a In-Reply-To: <303c7d33-20c5-1a81-6a8e-a5b2edf32480@gmail.com> References: <303c7d33-20c5-1a81-6a8e-a5b2edf32480@gmail.com> Message-ID: <68852e5fb7820e5cf300a4538a4f1b34@tiscali.it> Yes, now it's ok. Il 28.11.2020 00:48 Beno?t Minisini ha scritto: > Le 28/11/2020 ? 00:42, vuott at tiscali.it [1]a ?crit : > >> Rectius: the warning is in "Make install". > > It should be fixed now. > > -- Beno?t Minisini ----[ http://gambaswiki.org/wiki/doc/netiquette [2] ]---- Con Tiscali Mobile Smart 30 4G hai minuti illimitati, 100 SMS e 30 Giga in 4G a soli 8,99? al mese. http://tisca.li/smart30 -------------- next part -------------- An HTML attachment was scrubbed... URL: From kicking177 at gmail.com Sat Nov 28 12:06:50 2020 From: kicking177 at gmail.com (KKing) Date: Sat, 28 Nov 2020 11:06:50 +0000 Subject: [Gambas-user] Removing a runtime created control Message-ID: <28cc5bf4-11e3-79ad-f5a8-b26018a70445@gmail.com> I'm using the Last.Text and serves my purpose. I'm actually using? hToolButton.Text = "MyButton" & "_" & CStr(intIndex) and in the My_Button_Click event I split the Last.Text into "MyButton" and the intIndex. The "MyButton" is actually a psuedo column name (can be various columns) and use that with the intIndex to know the original data item I'm looking to maintain. K. From hans at gambas-buch.de Sat Nov 28 18:22:45 2020 From: hans at gambas-buch.de (Hans Lehmann) Date: Sat, 28 Nov 2020 18:22:45 +0100 Subject: [Gambas-user] Component gb.web.gui Message-ID: Hello, i am experimenting with the component gb.web.gui for a chapter for the Gambas book. The web form consists of 3 areas: (1) Header (2) Main (3) Footer. The main area contains on the left (2.1) the navigation with several buttons and on the right (2.2) the content. All areas are of type Web-Container. Three tasks present me with considerable problems: * The actual navigation currently consists of only 5 web buttons. How do I realize that when I click on a selected button, a specific web page is loaded into the content area and displayed? * How can I achieve that only the content of the content area is scrolled (if its height becomes too large), so that the navigation (and footer also !) remains static in its place (and does not scroll with it) and is thus partially no longer visible? * Where do I insert a CSS file in the project directory for a uniform design and how do I integrate this CSS file into the project? With kind regards Hans -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: webgui.png Type: image/png Size: 36340 bytes Desc: not available URL: From gambas at cd-bahia.com Sun Nov 29 14:18:55 2020 From: gambas at cd-bahia.com (Dag Jarle Nerland Johansen - Gambas) Date: Sun, 29 Nov 2020 14:18:55 +0100 Subject: [Gambas-user] SQL connections all failing Message-ID: <3540a84b-7122-5e67-c4d1-0b2561fcda94@cd-bahia.com> Hi, suddenly none of my sql-connections work any more, Manually with same login-data no problem to access. Haven't changed a thing in the source of the connection to MySQL. But whether on localhost (my pc of course) nor on the server from my web-provider I don't get access via Gambas. I wasn't aware of some updates from Gambas lately either, so I am confused. Ubuntu Mate 18.04.5 Gambas 3.15.2 (http://ppa.launchpad.net/gambas-team/gambas3/ubuntu) source for connection, ? Try $Con.Close() ' Close the connection ? $Con.Type = "mysql"?????? ' Type of connection ? $Con.Host = "server..." ' Name of the server ? $Con.Name = "wdb..." ' Name of the database we want to use ? $Con.Login = "wuse.." ' User's name for the connection ? $Con.Port = "3306" ' Port to use in the connection, usually 3306 ? $Con.Password = "pwd" ? $Con.Open Regards, Dag From gambas at cd-bahia.com Sun Nov 29 14:39:38 2020 From: gambas at cd-bahia.com (Dag Jarle Nerland Johansen - Gambas) Date: Sun, 29 Nov 2020 14:39:38 +0100 Subject: [Gambas-user] SQL connections all failing In-Reply-To: <3540a84b-7122-5e67-c4d1-0b2561fcda94@cd-bahia.com> References: <3540a84b-7122-5e67-c4d1-0b2561fcda94@cd-bahia.com> Message-ID: <52bbaaf0-2b23-e378-cf8f-bdeae257d63a@cd-bahia.com> Hi, forget it, get connection wih localhost Am 29.11.20 um 14:18 schrieb Dag Jarle Nerland Johansen - Gambas: > Hi, > suddenly none of my sql-connections work any more, > Manually with same login-data no problem to access. > Haven't changed a thing in the source of the connection to MySQL. > But whether on localhost (my pc of course) nor on the server from my > web-provider I don't get access via Gambas. > I wasn't aware of some updates from Gambas lately either, so I am > confused. > > Ubuntu Mate 18.04.5 > Gambas 3.15.2 (http://ppa.launchpad.net/gambas-team/gambas3/ubuntu) > > source for connection, > ? Try $Con.Close() ' Close the connection > ? $Con.Type = "mysql"?????? ' Type of connection > ? $Con.Host = "server..." ' Name of the server > ? $Con.Name = "wdb..." ' Name of the database we want to use > ? $Con.Login = "wuse.." ' User's name for the connection > ? $Con.Port = "3306" ' Port to use in the connection, usually 3306 > ? $Con.Password = "pwd" > ? $Con.Open > > Regards, > Dag > > > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- From adamnt42 at gmail.com Sun Nov 29 16:15:24 2020 From: adamnt42 at gmail.com (Bruce) Date: Mon, 30 Nov 2020 01:45:24 +1030 Subject: [Gambas-user] Report woes again Message-ID: <2a3714ba-6492-a4c3-c266-d6869b3ee91c@gmail.com> After the update the Visible property now works OK, thank you! But now it seems to want to print 4200 odd pages or at least thats how far it gets before appearing to hang. ??? regards bruce From gambas.fr at gmail.com Mon Nov 30 20:39:21 2020 From: gambas.fr at gmail.com (Fabien Bodard) Date: Mon, 30 Nov 2020 20:39:21 +0100 Subject: [Gambas-user] Report woes again In-Reply-To: <2a3714ba-6492-a4c3-c266-d6869b3ee91c@gmail.com> References: <2a3714ba-6492-a4c3-c266-d6869b3ee91c@gmail.com> Message-ID: Give me a fail exemple so I can debug Le dim. 29 nov. 2020 ? 16:16, Bruce a ?crit : > After the update the Visible property now works OK, thank you! > But now it seems to want to print 4200 odd pages or at least thats how > far it gets before appearing to hang. > > ??? > > regards > bruce > > ----[ http://gambaswiki.org/wiki/doc/netiquette ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sharon at 455.co.il Mon Nov 30 21:20:55 2020 From: sharon at 455.co.il (Mayost Sharon) Date: Mon, 30 Nov 2020 22:20:55 +0200 Subject: [Gambas-user] Cancel the closing of a WebForm Message-ID: <20201130201222.M63338@455.co.il> Hello How to prevent a window WebForm2 closing by clicking the X on the left side of the WebForm2 In WebForm1 When I press a button I display WebForm2 as follows Export Public Sub WebButton1_Click() Webform2.ShowModal(Webform1) End How to cancel close WebForm2 by the X on the side Thanks From g4mba5 at gmail.com Mon Nov 30 21:27:40 2020 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Mon, 30 Nov 2020 21:27:40 +0100 Subject: [Gambas-user] Cancel the closing of a WebForm In-Reply-To: <20201130201222.M63338@455.co.il> References: <20201130201222.M63338@455.co.il> Message-ID: <4d2be4e8-7999-aa3a-71e7-260f4093f560@gmail.com> Le 30/11/2020 ? 21:20, Mayost Sharon a ?crit?: > Hello > > How to prevent a window WebForm2 closing by clicking the X on the left side of the WebForm2 > > > In WebForm1 When I press a button I display WebForm2 as follows > > Export > > > Public Sub WebButton1_Click() > > Webform2.ShowModal(Webform1) > > End > > > How to cancel close WebForm2 by the X on the side > > Thanks > You have to cancel the Close event with STOP EVENT. Regards, -- Beno?t Minisini