[Gambas-user] How to click Databowser-Buttons by code ?
Dear Gambas Cracks Sorry for the following question. I'm sure the answer will be simple, but I'm searching for it since weeks... My question: Is there a way to click the Databowser-Buttons (Save, NewRec, GotoLast) by code? As for example: DatbrwsrCsv2SqlTbl.Save .NewRec .ShowLast? My Situation: Migrating thousands of records from a csv into a databrowser connected to a SqlDB, my form and its scripts: - repairs most common syntax-errors and then - imports each record into datacontrols connected to the databrowser - if everything is fine -- script then shall save, show last record, open a new record, do next record-migration-loop -- if not, user needs to resolve "advanced errors" manually and then continue the "semi-auto-migration-script" again. This is also the reason why I do not work with an "invisible" 2-connection-2-result-comparison (as discussed in this mailing list some weeks ago). Thanks for Gambas, thanks for your support, and a good start into 2015 to all gambinos! Hubi u...@gmx.ch -- Dive into the World of Parallel Programming! The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Databowser-Buttons, How to "click" them by code ?
(My last mail got lost somewhere in another thread. I don't know why but try again.) Dear Gambas Cracks Sorry for this question. I'm sure the answer will be simple, but I'm searching for it since weeks... A short hint would be very appreciated. My question: Is there a way to "click" the Databowser-Buttons (Save, NewRec, GotoLast) by a script? Something like Databrowser.SaveRec or .NewRec or .ShowLast? My Situation: Migrating thousands of records from a csv into a Sql-DB I use a databrowser. On a form I have different buttons with scripts which: - repair/modify most common csv-syntax-errors and then - import each record into datacontrols connected to the databrowser/datasource - if everything is fine -- script then shall "click" save, show last record, open new record, and then start next "record-migration-loop" -- if not, user needs to resolve "advanced errors" manually and then continue the "semi-auto-migration-script" again. This is also the reason why I do not work with an "invisible" 2-connection-2-result-comparison (as discussed in this mailing list some weeks ago). Thanks for Gambas, thanks for your support, and a good start into 2015 to all Gambas! Hubi u...@gmx.ch -- Dive into the World of Parallel Programming! The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] How to get current procedurename, codelinenumber and raising element
Dear cracks After fooling hours/days in Wikipedia, Googling etc I'd like to place my issue here (before driving nuts). If this is not appropriate please sb indicate where I can find help. Thanks. For debugging I'd like to write the following info in a string: procedure name, code line number, element which has started current running/failing procedure. my code: '--- 'Public Procedure ProcXYZ( ' ' Dim $CheckVar as String ' Dim $Testmode as Integer ' Dim $ResSPos as Result ' ' ... ' $ResSPos = HiModSql.Sql2Res("TblVerknAkt",". ' $x = $ResSPos!x ' If $Testmode > 0 Then '$CheckVar &= Chr(10) & ?codeline? &": $x=" & $x '... ' ... ' Catch ' Message.Warning("Catch ?procname?, Error=" & Error.code & ", " & 'Error.text & Chr(10) & "$CheckVar:" & Chr(10) & $CheckVar, "ok") ' 'End ' My questions: How to deviate Debug into a string? How to get codelinenumber? (Is there a list of useful things?) How to get element which started procedure? Please apologize if code formatting is not state of the art. I'm autodidact. Thanks for your help. Regards, ub2 Note: I'm an quite enthusiastic Gambas user. Thanks, you're doing great. Go ahead and do not bother never ending "Basic-Discussion-bigots". -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] How to get codelinenumber
Dear Fabien You're my hero. Thanks! The only thing I'm still working on is getting the codelinenumber also in cases without error. $CheckVar &= Chr(10) & ?codelinenumber? &": $x=" & $x Does "error.where" also have, lets say an "MeRightNow.where" sister? I'll keep on trying. Regards, Hubert Am 29.11.2013 18:41,schrieb Fabien Bodard: > 2013/11/29 u...@gmx.ch : >> Dear cracks >> >> After fooling hours/days in Wikipedia, Googling etc I'd like to place my >> issue here (before driving nuts). If this is not appropriate please sb >> indicate where I can find help. Thanks. >> >> For debugging I'd like to write the following info in a >> string: procedure name, code line number, element which has started >> current running/failing procedure. >> >> my code: >> '--- >> 'Public Procedure ProcXYZ( >> ' >> ' Dim $CheckVar as String >> ' Dim $Testmode as Integer >> ' Dim $ResSPos as Result >> ' >> ' ... >> ' $ResSPos = HiModSql.Sql2Res("TblVerknAkt",". >> ' $x = $ResSPos!x >> ' If $Testmode > 0 Then >> '$CheckVar &= Chr(10) & ?codeline? &": $x=" & $x >> '... >> ' ... >> ' Catch >> ' Message.Warning("Catch ?procname?, Error=" & Error.code & ", " & >> 'Error.text & Chr(10) & "$CheckVar:" & Chr(10) & $CheckVar, "ok") >> ' >> 'End >> ' >> >> My questions: >> How to deviate Debug into a string? > in the catch part : > myerror = Error.text &/ error.where ... for example > http://gambasdoc.org/help/comp/gb/error/text?v3 >> How to get codelinenumber? (Is there a list of useful things?) > Error.Where >> How to get element which started procedure? > Error.Where > http://gambasdoc.org/help/comp/gb/error/where?v3 >> >> >> Please apologize if code formatting is not state of the art. >> I'm autodidact. >> >> >> Thanks for your help. >> >> Regards, >> ub2 >> >> >> Note: I'm an quite enthusiastic Gambas user. Thanks, you're doing great. >> Go ahead and do not bother never ending "Basic-Discussion-bigots". >> >> >> >> >> -- >> Rapidly troubleshoot problems before they affect your business. Most IT >> organizations don't have a clear picture of how application performance >> affects their revenue. With AppDynamics, you get 100% visibility into your >> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics >> Pro! >> http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk >> ___ >> Gambas-user mailing list >> Gambas-user@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user > > > -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] How to get codelinenumber and procname (solved - Thanks)
Dear Fabien, Bruce and Tobias Gents you're great, my 'issue' is completely solved. Thanks for your patience! My code (.. if it helps other newbies) ___ 'Public Sub Button1_Click() 'Dim $ResVerkn As Result 'Dim $ModDtm, $CheckVar As String 'Dim $Testmode As Integer ' '$Testmode = 1 'Docu on/off ' ''...(Plenty of other code) ' '$ResVerkn = HiModSql.Sql2Res("TblVerknAkt", "IDVerkn = 123") '$ModDtm = $ResVerkn!ModDtm 'If $Testmode > 0 Then $CheckVar &= Chr(10) & System.BackTrace[0] & ": $ModDtm=" & $ModDtm ' ''...(Plenty of other code) ' 'If $Testmode > 0 Then 'Message.Info("$CheckVar collected so far:" & Chr(10) & '$CheckVar, "ok") 'Endif ' 'Catch 'Message.Warning("Catch Error at " & Error.where & Chr(10) & "Error: " & Error.code & ", " & Error.text & Chr(10) & " $CheckVar: " & Chr(10) & $CheckVar, " ok ") ' 'End ___ Have a nice weekend Regards Hubert Am 30.11.2013 15:10,schrieb Fabien Bodard: > I'm don't understand what you want here > > 2013/11/30 Bruce : >> On Sat, 2013-11-30 at 09:46 +0100, u...@gmx.ch wrote: >>> Dear Fabien >>> >>> You're my hero. Thanks! >>> >>> The only thing I'm still working on is getting the codelinenumber also >>> in cases without error. >> System.BackTrace may help here. But I am tired and emotional so check >> the help. >> >> >> -- >> Rapidly troubleshoot problems before they affect your business. Most IT >> organizations don't have a clear picture of how application performance >> affects their revenue. With AppDynamics, you get 100% visibility into your >> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics >> Pro! >> http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk >> ___ >> Gambas-user mailing list >> Gambas-user@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user > > > -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Database-manager in 3.5.1 missing, Sql-Visualisation-Tool ?
Dear cracks In Gambas2 I found the gambas-database-manager under tools, but nowhere in Gambas 3.5.1 anymore. Did I miss something at installation? Redoing an MSAccess-project, I'm using Gambas3, MariaDB and PhpMyAdmin. Missing is a visualization-tool for the relational links. Any recommendations ? Sorry for asking. Found plenty of ideas but nothing related to Gambas. Thanks for any help or links. Regards, ub2 [System] Gambas=3.5.1 OperatingSystem=Linux Kernel=3.2.0-57-generic Architecture=x86_64 Distribution=Ubuntu 12.04.3 LTS Desktop=XFCE Theme=QGtk Language=de_DE.UTF-8 Memory=3012M [Libraries] Cairo=libcairo.so.2.11000.2 Curl=libcurl.so.4.2.0 DBus=libdbus-1.so.3.5.8 GStreamer=libgstreamer-0.10.so.0.30.0 GStreamer=libgstreamer-1.0.so.0.1.0 GTK+=libgtk-x11-2.0.so.0.2400.10 Poppler=libpoppler.so.19.0.0 Qt4=libQtCore.so.4.8.1 SDL=libSDL-1.2.so.0.11.3 -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Database-manager in 3.5.1 missing, Sql-Visualisation-Tool ?
Dear Benoît Life is so easy, .. if you have the right answers. Thanks a lot and have a nice weekend. Regards, Hubert PS: Thanks also to all 'Gambinos'. Great Job! (I bow humbly before the Creation.) Am 13.12.2013 19:15,schrieb Beno=EEt_Minisini: > Le 13/12/2013 18:24, u...@gmx.ch a écrit : >> Dear cracks >> >> In Gambas2 I found the gambas-database-manager under tools, >> but nowhere in Gambas 3.5.1 anymore. >> Did I miss something at installation? >> >> Redoing an MSAccess-project, I'm using Gambas3, MariaDB and >> PhpMyAdmin. Missing is a visualization-tool for the relational >> links. Any recommendations ? >> >> Sorry for asking. Found plenty of ideas but nothing related to Gambas. >> Thanks for any help or links. >> >> Regards, >> ub2 >> > > The database manager is now part of the IDE. > > Create a project that uses the 'gb.db' component, and you will get a new > "Connection" folder in the project tree view. > > Inside this folder, you can create... "connections" to any database > supported by Gambas. Once you have configure the new connection, you can > double-click on it to open the new database manager. > > Regards, > -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] How to copy a frame containing various controls
Dear Cracks, I want to show various CsvLines in a ScrollView. Each line will be splitted and filled in a bunch of controls which are all neatly placed and formatted in a "SourceFrame". My question: Is there an easy way to copy/paste that "SourceFrame" depending on the (flexible) amount of CsvLines ? Or in other 'words': FrameDat0: TextBoxTxt0, CheckBoxLock0, .., BtnSaveFrameDat0 and N=AmountCsvLines shall become FrameDat0: TextBoxTxt0, CheckBoxLock0, .., BtnSaveFrameDat0 FrameDat1: TextBoxTxt1, CheckBoxLock1, .., BtnSaveFrameDat1 FrameDat2: TextBoxTxt2, CheckBoxLock2, .., BtnSaveFrameDat2 .. FrameDatN: TextBoxTxtN, CheckBoxLockN, .., BtnSaveFrameDatN I can do that in the IDE by copy/paste, but how to do it by code? Using a gridview does not allow all the formatting I need. Any good ideas or 'magic strategies' ? (I got stuck. Code explodes and becomes unflexible) Thanks in advance Regards, ub2 -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] How to copy a frame containing various controls - Thanks
Dear Tobi Thanks for showing me the "sane OOP way" in such a detailed manner. ;-) Well, you wrote, it's "quite advanced topic". And you're right, I do not have a clue right now. .. but there are still long winter nights and I know where to dig now! (If not succeeding, I might escape by copy/paste manually and making invisible all not needed Frames.) Thanks for your help and a nice holidays to all. Regards, Hubert Am 21.12.2013 11:12,schrieb Tobias Boege: > On Fri, 20 Dec 2013, u...@gmx.ch wrote: >> Dear Cracks, >> >> >> I want to show various CsvLines in a ScrollView. >> Each line will be splitted and filled in a bunch of controls which are >> all neatly placed and formatted in a "SourceFrame". >> >> My question: >> Is there an easy way to copy/paste that "SourceFrame" depending on the >> (flexible) amount of CsvLines ? >> >> >> Or in other 'words': >> FrameDat0: TextBoxTxt0, CheckBoxLock0, .., BtnSaveFrameDat0 >> and >> N=AmountCsvLines >> >> shall become >> FrameDat0: TextBoxTxt0, CheckBoxLock0, .., BtnSaveFrameDat0 >> FrameDat1: TextBoxTxt1, CheckBoxLock1, .., BtnSaveFrameDat1 >> FrameDat2: TextBoxTxt2, CheckBoxLock2, .., BtnSaveFrameDat2 >> .. >> FrameDatN: TextBoxTxtN, CheckBoxLockN, .., BtnSaveFrameDatN >> >> >> I can do that in the IDE by copy/paste, but how to do it by code? >> Using a gridview does not allow all the formatting I need. >> >> >> Any good ideas or 'magic strategies' ? >> (I got stuck. Code explodes and becomes unflexible) >> > > Well, you can copy your SourceFrame and stuff but I won't elaborate on this > way until you explicitly rejected the sane OOP way :-) > > Which goes like this: > > - create a form "CsvLine", > - arrange your TextBoxes, CheckBoxes, ..., Buttons on it, > - write a _new() method which takes a CSV line and parses it into the >controls, > - create an array of these Forms into a container on your main form (one >for each CSV line). > > This is a quite advanced topic; hope you can deal with the strategy above... > > IIRC, you're german. You can have a look at an article where we created > custom controls using Forms[0], or my project[1] where this is done more > excessively. > > Regards, > Tobi > > [0] http://www.gambas-buch.de/dw/doku.php?id=k18:k18.12:start > [1] http://www.gambas-buch.de/dw/doku.php?id=k27:k27.4:start > > -- > Rapidly troubleshoot problems before they affect your business. Most IT > organizations don't have a clear picture of how application performance > affects their revenue. With AppDynamics, you get 100% visibility into your > Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! > http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk > ___ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Load modules dynamically ?
Dear Gambas users, The situation: - Different gambas-programs, - all using similar functions - All those functions are packed in modules. The question: I there a way to load those modules at runtime? As for example in the FMain.Form_Open, something like: - "ModuleXY.Load(Path_to_Module)", or - "ImportModule("Path_to_module","LoadAsModuleName") My hope: Stopping to struggle with similar but diverging functions in different programs by loading a "Master-Module" at runtime. Sorry if there is a simple and stupid answer, I've not found it yet. Thanks for any ideas, links or snippets. -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Load modules dynamically ? Works as promised. Thanks. Closed
Dear gbWilly Works as promised, great! Maintaining becomes much easier now. Thanks a lot! Regarding http://gambaswiki.org/wiki/doc/library: - My system: Xubuntu 16.04 LTS, Gambas 3.9.1 - The "project properties" looks slightly different (no problem) - The "Component property" I could not find at all. (but the given EXPORT-Link did it) Again, thanks very much for much your very quick and applicable support. ub2 > Am 14.11.2016 um 19:56 schrieb gbwi...@openmailbox.org: > > In short: > I would put the modules in a seperate gambas application and make that a > library, instead of regular application. > Next make your applications depend on the library (done in project > properties of the applications -> refers to an executable of the > library), and they can use the common functions. > > More info: http://gambaswiki.org/wiki/doc/library > > If you have any questions, just ask. > > gbWilly > >> On 2016-11-14 18:17, u...@gmx.ch wrote: >> Dear Gambas users, >> >> >> The situation: >> - Different gambas-programs, >> - all using similar functions >> - All those functions are packed in modules. >> >> The question: >> I there a way to load those modules at runtime? >> As for example in the FMain.Form_Open, something like: >> - "ModuleXY.Load(Path_to_Module)", or >> - "ImportModule("Path_to_module","LoadAsModuleName") >> >> My hope: >> Stopping to struggle with similar but diverging functions in different >> programs by loading a "Master-Module" at runtime. >> >> >> Sorry if there is a simple and stupid answer, I've not found it yet. -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user