From ron at ...572... Tue Sep 2 12:15:15 2014 From: ron at ...572... (Ron) Date: Tue, 2 Sep 2014 12:15:15 +0200 Subject: [Gambas-devel] Request Message-ID: Please add a 'Submit Bug Report' menu to IDE's ? menu. With his code behind it: ' open url in browser Public Sub MenuSubmitBugReport_Click() Try Desktop.Open("https://code.google.com/p/gambas/issues/list") If Error Then Message.Error("No internet connection available?") End Saves me to search the web for the correct url... ;O{ Thanks. Regards, Ron. From jleake at ...741... Thu Sep 4 17:40:26 2014 From: jleake at ...741... (John Leake) Date: Thu, 04 Sep 2014 16:40:26 +0100 Subject: [Gambas-devel] Add-ins Message-ID: <540887EA.6080001@...741...> Hi All, Background ---------- I have been a self-employed software engineer for more than 30-years and it is now time to give something back to the open-source community. I have written in several languages over the years but mainly C, VB (M$ vb2 through to vb6) and Ruby. Relevance --------- My vb work extended into custom controls and add-ins that enhanced the IDE with single-click insertion/removal of syslog call templates, copyright notices and software version control history. Does the IDE support Add-Ins ? If not which are the relevant source modules ? Best regards, John From taboege at ...176... Fri Sep 5 11:02:31 2014 From: taboege at ...176... (Tobias Boege) Date: Fri, 5 Sep 2014 11:02:31 +0200 Subject: [Gambas-devel] Add-ins In-Reply-To: <540887EA.6080001@...741...> References: <540887EA.6080001@...741...> Message-ID: <20140905090231.GA915@...693...> On Thu, 04 Sep 2014, John Leake wrote: > Hi All, > > Background > ---------- > I have been a self-employed software engineer for more than 30-years and > it is now time to give something back to the open-source community. > Very nice! > > I have written in several languages over the years but mainly C, VB (M$ > vb2 through to vb6) and Ruby. > > Relevance > --------- > My vb work extended into custom controls and add-ins that enhanced the > IDE with single-click insertion/removal of syslog call templates, > copyright notices and software version control history. > > Does the IDE support Add-Ins ? > If not which are the relevant source modules ? > Do you use "add-in" in the sense that you want to augment the official IDE source code, and _not_ provide an (un)loadable, optional module ("add-on") which may or may not be contained in the source tree? I'm no expert of the IDE (I haven't fully explored the GUI yet after six years with Gambas) but I don't think there are designated interfaces for either interpretation. (With some advanced Gambas+OOP knowledge it should be possible to implement a framework for the latter, though.) However, with near zero idea about the IDE, I wrote the Patch dialogs you can find in there today (menu Project -> Patch). It was (nearly) as easy as writing the code[*] and dropping it into a separate folder in the source code. [*] This involved searching and reading _quite some_ code of the IDE itself (which is the thing with add-ins), of course, but it's still pretty straight-forward once you're into it a little. First you need to clone the Gambas sources [0], then the IDE sources are at app/src/gambas3. Regards, Tobi [0] http://gambaswiki.org/wiki/howto/svn -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From jleake at ...741... Fri Sep 5 12:52:17 2014 From: jleake at ...741... (John Leake) Date: Fri, 05 Sep 2014 11:52:17 +0100 Subject: [Gambas-devel] Add-ins In-Reply-To: <20140905090231.GA915@...693...> References: <540887EA.6080001@...741...> <20140905090231.GA915@...693...> Message-ID: <540995E1.2070608@...741...> Hi Tobi, Thank you for your response. By "add-in" I mean an IDE toolbar that can load/remove modules when the IDE starts. This code would have a reference to the whole project (or a group of projects) source tree and would allow iteration of sub/func/class/module names and their contents. As an example the kind of productivity functions I implemented for M$ VB6 were; Syslog - When clicked this automatically inserted/removed syslog code into either the currently displayed sub/function/class/module or all sub/func/class/mods of the source file open in the editor. Copyright - This inserted/removed customisable comments at the head of the current source file. ErrorTrap - As syslog but error trap code using FINALLY and CATCH. CallChart - As above but call chart code with graphvis output. I would not envisage the functions of the "add-in" code to be part of the source tree but the interface that facilitated "add-ins" would have to be. Best regards, John Leake On 05/09/14 10:02, Tobias Boege wrote: > On Thu, 04 Sep 2014, John Leake wrote: >> Hi All, >> >> Background >> ---------- >> I have been a self-employed software engineer for more than 30-years and >> it is now time to give something back to the open-source community. >> > > Very nice! > >> >> I have written in several languages over the years but mainly C, VB (M$ >> vb2 through to vb6) and Ruby. >> >> Relevance >> --------- >> My vb work extended into custom controls and add-ins that enhanced the >> IDE with single-click insertion/removal of syslog call templates, >> copyright notices and software version control history. >> >> Does the IDE support Add-Ins ? >> If not which are the relevant source modules ? >> > > Do you use "add-in" in the sense that you want to augment the official IDE > source code, and _not_ provide an (un)loadable, optional module ("add-on") > which may or may not be contained in the source tree? > > I'm no expert of the IDE (I haven't fully explored the GUI yet after six > years with Gambas) but I don't think there are designated interfaces for > either interpretation. (With some advanced Gambas+OOP knowledge it should > be possible to implement a framework for the latter, though.) > > However, with near zero idea about the IDE, I wrote the Patch dialogs you > can find in there today (menu Project -> Patch). It was (nearly) as easy > as writing the code[*] and dropping it into a separate folder in the source > code. > > [*] This involved searching and reading _quite some_ code of the IDE itself > (which is the thing with add-ins), of course, but it's still pretty > straight-forward once you're into it a little. > > First you need to clone the Gambas sources [0], then the IDE sources are at > app/src/gambas3. > > Regards, > Tobi > > [0] http://gambaswiki.org/wiki/howto/svn > From gambas at ...1... Fri Sep 5 13:02:26 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Fri, 05 Sep 2014 13:02:26 +0200 Subject: [Gambas-devel] Add-ins In-Reply-To: <540995E1.2070608@...741...> References: <540887EA.6080001@...741...> <20140905090231.GA915@...693...> <540995E1.2070608@...741...> Message-ID: <54099842.7090808@...1...> Le 05/09/2014 12:52, John Leake a ?crit : > Hi Tobi, > Thank you for your response. > > By "add-in" I mean an IDE toolbar that can load/remove modules when the > IDE starts. This code would have a reference to the whole project (or a > group of projects) source tree and would allow iteration of > sub/func/class/module names and their contents. As an example the kind > of productivity functions I implemented for M$ VB6 were; > > Syslog - When clicked this automatically inserted/removed syslog code > into either the currently displayed sub/function/class/module or all > sub/func/class/mods of the source file open in the editor. Can you show me an example of what you mean? > > Copyright - This inserted/removed customisable comments at the head of > the current source file. OK. Maybe code snippets can already do that? > > ErrorTrap - As syslog but error trap code using FINALLY and CATCH. > An example? > CallChart - As above but call chart code with graphvis output. An example? > > I would not envisage the functions of the "add-in" code to be part of > the source tree but the interface that facilitated "add-ins" would have > to be. > > Best regards, > > John Leake > Technically there is no need of having "add-ins". I mean, there is no problem in putting everything in the IDE source code, as Gambas only loads the classes when they are first executed. The IDE executable being 1 Mb or 1 Gb won't change its startup nor its execution time. Moreover, I prefer that you put your code directly inside the IDE source code (carefully of course!), without me having to develop an add-in interface. -- Beno?t Minisini From jleake at ...741... Fri Sep 5 14:23:57 2014 From: jleake at ...741... (John Leake) Date: Fri, 05 Sep 2014 13:23:57 +0100 Subject: [Gambas-devel] Add-ins In-Reply-To: <54099842.7090808@...1...> References: <540887EA.6080001@...741...> <20140905090231.GA915@...693...> <540995E1.2070608@...741...> <54099842.7090808@...1...> Message-ID: <5409AB5D.50003@...741...> Hi Beno?t, Syslog - Example from a vb6 source file called "frmAppLauncherMain.frm" ------ Private Sub Form_Load() 'Code for Form_Load '... Call SysLog(LogLevel.Info, "frmAppLauncherMain->Sub Form_Load()", "") 'Code for Form_Load '... End Sub When the syslog tool is clicked the call to syslog would automatically be generated and inserted into the source at the current line and showing the correct source file name and event info. ErrorTrap Example from a vb6 source file called "frmAppLauncherMain.frm" --------- Private Sub Form_Load() '// Begin Error Handler On Error GoTo Err_Form_Load 'Code for Form_Load '... '// End Error Handler Exit_Form_Load: On Error Resume Next Exit Sub Err_Form_Load: Process_Error LogLevel.Error, "frmAppLauncherMain->Sub Form_Load()", err.Number, err.Description, err.Source, err.LastDllError GoTo Exit_Form_Load End Sub Gambas Example ------ SUB PrintFile(FileName AS STRING) 'Existing code '... FINALLY ' Always executed, even if a error is raised RETURN CATCH ' Executed only if there is an error Process_Error LogLevel.Error, "SourceFileName->SUB PrintFile()", Error.Code, Error.Text, Error.Where, ... END With a single click this code is automatically /inserted/removed from the current sub/func/class/module or all sub/func/class/modules in the current source file. CallChart --------- This is used to aid comprehension of when and where code is executed in real-time. The output stream is like a customisable trace. The graphvis output is useful when determining code structure and object hierarchies so that the extent of proposed changes to code can be easily seen and assessed before embarking on any mods. Overall ------- The above are just a few examples that we found useful in our business when developing large applications. The syslog calls worked alongside a syslog ActiveX control that could be dropped on any form to show the current peak syslog level and which showed where in the source that peak error was activated and the ability to reset the peak and set the recording level at any time. On fairly significant advantage of "add-ins" is that they allow new functions and tools to be added/removed to/from the IDE when needed, preventing the IDE GUI from being bloated and over complex. For example a hobbyist is not likely to be writing headless apps where syslog is a must. They are also not likely to use SMTP for example or want to get involved with source code control issues. I hope this helps to explain the mindset behind this approach. Best regards, John Leake On 05/09/14 12:02, Beno?t Minisini wrote: > Le 05/09/2014 12:52, John Leake a ?crit : >> Hi Tobi, >> Thank you for your response. >> >> By "add-in" I mean an IDE toolbar that can load/remove modules when the >> IDE starts. This code would have a reference to the whole project (or a >> group of projects) source tree and would allow iteration of >> sub/func/class/module names and their contents. As an example the kind >> of productivity functions I implemented for M$ VB6 were; >> >> Syslog - When clicked this automatically inserted/removed syslog code >> into either the currently displayed sub/function/class/module or all >> sub/func/class/mods of the source file open in the editor. > > Can you show me an example of what you mean? > >> >> Copyright - This inserted/removed customisable comments at the head of >> the current source file. > > OK. Maybe code snippets can already do that? > >> >> ErrorTrap - As syslog but error trap code using FINALLY and CATCH. >> > > An example? > >> CallChart - As above but call chart code with graphvis output. > > An example? > >> >> I would not envisage the functions of the "add-in" code to be part of >> the source tree but the interface that facilitated "add-ins" would have >> to be. >> >> Best regards, >> >> John Leake >> > > Technically there is no need of having "add-ins". I mean, there is no > problem in putting everything in the IDE source code, as Gambas only > loads the classes when they are first executed. The IDE executable being > 1 Mb or 1 Gb won't change its startup nor its execution time. > > Moreover, I prefer that you put your code directly inside the IDE source > code (carefully of course!), without me having to develop an add-in > interface. > From jleake at ...741... Fri Sep 5 16:37:12 2014 From: jleake at ...741... (John Leake) Date: Fri, 05 Sep 2014 15:37:12 +0100 Subject: [Gambas-devel] Source Code Familiarisation Message-ID: <5409CA98.6060209@...741...> Hi All, In order to get to grips with the Gambas3 source code, is it possible to load up the IDE into Gambas itself ? Best regards, John Leake From taboege at ...176... Fri Sep 5 16:38:41 2014 From: taboege at ...176... (Tobias Boege) Date: Fri, 5 Sep 2014 16:38:41 +0200 Subject: [Gambas-devel] Source Code Familiarisation In-Reply-To: <5409CA98.6060209@...741...> References: <5409CA98.6060209@...741...> Message-ID: <20140905143840.GD915@...693...> On Fri, 05 Sep 2014, John Leake wrote: > Hi All, > > In order to get to grips with the Gambas3 source code, is it possible to > load up the IDE into Gambas itself ? > Yes, the IDE is an ordinary Gambas project and developed in (an older copy of) itself. -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From gambas at ...1... Fri Sep 5 16:53:47 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Fri, 05 Sep 2014 16:53:47 +0200 Subject: [Gambas-devel] Source Code Familiarisation In-Reply-To: <20140905143840.GD915@...693...> References: <5409CA98.6060209@...741...> <20140905143840.GD915@...693...> Message-ID: <5409CE7B.2070501@...1...> Le 05/09/2014 16:38, Tobias Boege a ?crit : > On Fri, 05 Sep 2014, John Leake wrote: >> Hi All, >> >> In order to get to grips with the Gambas3 source code, is it possible to >> load up the IDE into Gambas itself ? >> > > Yes, the IDE is an ordinary Gambas project and developed in (an older copy > of) itself. > It's actually directly developed with itself in the same version. :-) -- Beno?t Minisini From jleake at ...741... Fri Sep 5 17:12:02 2014 From: jleake at ...741... (John Leake) Date: Fri, 05 Sep 2014 16:12:02 +0100 Subject: [Gambas-devel] Source Code Familiarisation In-Reply-To: <5409CE7B.2070501@...1...> References: <5409CA98.6060209@...741...> <20140905143840.GD915@...693...> <5409CE7B.2070501@...1...> Message-ID: <5409D2C2.7070306@...741...> Many thanks. So, I have Gambas3-3.5.4 installed where is the project file in the source tree ? On 05/09/14 15:53, Beno?t Minisini wrote: > Le 05/09/2014 16:38, Tobias Boege a ?crit : >> On Fri, 05 Sep 2014, John Leake wrote: >>> Hi All, >>> >>> In order to get to grips with the Gambas3 source code, is it possible to >>> load up the IDE into Gambas itself ? >>> >> >> Yes, the IDE is an ordinary Gambas project and developed in (an older copy >> of) itself. >> > > It's actually directly developed with itself in the same version. :-) > From gambas at ...1... Fri Sep 5 17:16:40 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Fri, 05 Sep 2014 17:16:40 +0200 Subject: [Gambas-devel] Source Code Familiarisation In-Reply-To: <5409D2C2.7070306@...741...> References: <5409CA98.6060209@...741...> <20140905143840.GD915@...693...> <5409CE7B.2070501@...1...> <5409D2C2.7070306@...741...> Message-ID: <5409D3D8.6060004@...1...> Le 05/09/2014 17:12, John Leake a ?crit : > Many thanks. So, I have Gambas3-3.5.4 installed where is the project > file in the source tree ? > If you download the source package, the IDE project is in /app/src/gambas3. To develop, you must use subversion and the development branch (/trunk) of the gambas source repository. Regards, -- Beno?t Minisini From taboege at ...176... Fri Sep 5 17:14:30 2014 From: taboege at ...176... (Tobias Boege) Date: Fri, 5 Sep 2014 17:14:30 +0200 Subject: [Gambas-devel] Source Code Familiarisation In-Reply-To: <5409D2C2.7070306@...741...> References: <5409CA98.6060209@...741...> <20140905143840.GD915@...693...> <5409CE7B.2070501@...1...> <5409D2C2.7070306@...741...> Message-ID: <20140905151430.GE915@...693...> On Fri, 05 Sep 2014, John Leake wrote: > Many thanks. So, I have Gambas3-3.5.4 installed where is the project > file in the source tree ? > Projects are stored in a directory hierarchy, not a single project file. The IDE is at app/src/gambas3. Just open the IDE and point it to this path. It will detect that the directory is a Gambas project. -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From jleake at ...741... Fri Sep 5 17:51:16 2014 From: jleake at ...741... (John Leake) Date: Fri, 05 Sep 2014 16:51:16 +0100 Subject: [Gambas-devel] Source Code Familiarisation In-Reply-To: <20140905151430.GE915@...693...> References: <5409CA98.6060209@...741...> <20140905143840.GD915@...693...> <5409CE7B.2070501@...1...> <5409D2C2.7070306@...741...> <20140905151430.GE915@...693...> Message-ID: <5409DBF4.4040101@...741...> That worked OK. Does Gambas3 have a concept like a project group as in vb6 ? On 05/09/14 16:14, Tobias Boege wrote: > On Fri, 05 Sep 2014, John Leake wrote: >> Many thanks. So, I have Gambas3-3.5.4 installed where is the project >> file in the source tree ? >> > > Projects are stored in a directory hierarchy, not a single project file. The > IDE is at app/src/gambas3. Just open the IDE and point it to this path. It > will detect that the directory is a Gambas project. > From taboege at ...176... Fri Sep 5 21:26:58 2014 From: taboege at ...176... (Tobias Boege) Date: Fri, 5 Sep 2014 21:26:58 +0200 Subject: [Gambas-devel] Multi-level virtual objects, inheritance and symbol resolution mess Message-ID: <20140905192658.GF915@...693...> Hi Benoit, I'm almost done with implementing an adjacency matrix based Graph class (GraphMatrix), to then set the Graph interface in stone. See #6451 for the code I'll talk about. Only there is one obstacle to overcome: accessing symbols of a GraphMatrix.Vertices[sVertex] object. The situation is as follows: - GraphMatrix Inherits Graph (which is an "abstract" class). - .Vertices is a virtual object whose _get method calls back: - Me._getVertex (which is within GraphMatrix and) which returns a: - _Graph_Vertex, a virtual class which is the base of all implementation- specific vertex classes. - In case of GraphMatrix, this is a _Matrix_Vertex virtual class which Inherits _Graph_Vertex. >From there I want to access the InDegree property which is properly implemented in the _Matrix_Vertex class but all I get is ("a" is an existing vertex in the graph): hGraph.Vertices["a"].InDegree >> (Function GraphMatrix:3) Indeed, InDegree is the 3rd symbol in _Matrix_Vertex. If I issue hGraph.Vertices["a"].InDegree() >> Error: Not enough arguments The 3rd symbol in GraphMatrix is _getEdge which needs two arguments... If I try that: hGraph.Vertices["a"].InDegree("b", "a") >> Error: Edge does not exist which is the error I would expect from my graph if I called the _getEdge method! It seems like the InDegree property is not mapped to my _Matrix_Vertex.InDegree implementation but to the method of same index in GraphMatrix. _Matrix_Vertex actually is a virtual class obtained via a virtual class interface from GraphMatrix. Is the virtual class information lost somewhere on the way or do I exceed a limit here? --- So, in a nutshell: GraphMatrix.Vertices is a virtual class which calls back GraphMatrix._getVertex which returns another virtual object from which I want to access a property. In a graph class (ImageGraph) implemented in Gambas -- where there are no virtual classes -- the _ImageGraph_Vertex Inherits _Graph_Vertex is a real class. And there it works! Attached are: the project which uses the native GraphMatrix class and fails, and the working ImageGraph Gambas class. I would really like to finish this thing soon. If you could take a good look, that would surely be a great help. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk -------------- next part -------------- A non-text attachment was scrubbed... Name: graphmatrix-test-0.0.1.tar.gz Type: application/octet-stream Size: 3870 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: GraphFloodfill-0.1.1.tar.gz Type: application/octet-stream Size: 7545 bytes Desc: not available URL: From gambas at ...1... Sat Sep 6 16:39:25 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Sat, 06 Sep 2014 16:39:25 +0200 Subject: [Gambas-devel] Multi-level virtual objects, inheritance and symbol resolution mess In-Reply-To: <20140905192658.GF915@...693...> References: <20140905192658.GF915@...693...> Message-ID: <540B1C9D.6060401@...1...> Le 05/09/2014 21:26, Tobias Boege a ?crit : > Hi Benoit, > > I'm almost done with implementing an adjacency matrix based Graph class > (GraphMatrix), to then set the Graph interface in stone. See #6451 for > the code I'll talk about. > > Only there is one obstacle to overcome: accessing symbols of a > GraphMatrix.Vertices[sVertex] object. The situation is as follows: > > - GraphMatrix Inherits Graph (which is an "abstract" class). > - .Vertices is a virtual object whose _get method calls back: > - Me._getVertex (which is within GraphMatrix and) which returns a: > - _Graph_Vertex, a virtual class which is the base of all implementation- > specific vertex classes. > - In case of GraphMatrix, this is a _Matrix_Vertex virtual class which > Inherits _Graph_Vertex. > >>From there I want to access the InDegree property which is properly > implemented in the _Matrix_Vertex class but all I get is ("a" is an existing > vertex in the graph): > > hGraph.Vertices["a"].InDegree > >> (Function GraphMatrix:3) > > Indeed, InDegree is the 3rd symbol in _Matrix_Vertex. If I issue > > hGraph.Vertices["a"].InDegree() > >> Error: Not enough arguments > > The 3rd symbol in GraphMatrix is _getEdge which needs two arguments... If I > try that: > > hGraph.Vertices["a"].InDegree("b", "a") > >> Error: Edge does not exist > > which is the error I would expect from my graph if I called the _getEdge > method! It seems like the InDegree property is not mapped to my > _Matrix_Vertex.InDegree implementation but to the method of same index in > GraphMatrix. > > _Matrix_Vertex actually is a virtual class obtained via a virtual class > interface from GraphMatrix. Is the virtual class information lost somewhere > on the way or do I exceed a limit here? > > --- > > So, in a nutshell: GraphMatrix.Vertices is a virtual class which calls back > GraphMatrix._getVertex which returns another virtual object from which I > want to access a property. > > In a graph class (ImageGraph) implemented in Gambas -- where there are no > virtual classes -- the _ImageGraph_Vertex Inherits _Graph_Vertex is a real > class. And there it works! > > Attached are: the project which uses the native GraphMatrix class and fails, > and the working ImageGraph Gambas class. I would really like to finish this > thing soon. If you could take a good look, that would surely be a great help. > > Regards, > Tobi > I'm currently looking at it... But why didn't you do as I told you, i.e. use an internal dispatch interface (a structure of function pointers) like I did for the Paint class? Otherwise things are so slow. Calling GB.GetFunction() implies a symbol table lookup and signature verification at each call! I suggest: - Creating a struct of function pointers that represents the graph node interface. - Adding a pointer on that struct in each graph. - Use it everywhere you need. - All classes written in C/C++ inheriting Graph must implement that struct of function pointers and put a pointer on it in its objects. - For classes written in Gambas inheriting Graph, you must create a struct of function pointers that calls the Gambas functions you defined ('_getVertex', '_getEdge', ...). Calls to GB.GetFunction() should be done once and cached, the first time you instanciate an object of that class. That way, performance should be acceptable. :-) By the way: you should use GB_DECLARE_VIRTUAL() instead of GB_DECLARE() for declaring virtual classes. No need to use GB_VIRTUAL_CLASS() then. And virtual classes name should begin with a dot, not an underscore. I'm not sure at the moment it has no impact in the interpreter... Regards, -- Beno?t Minisini From taboege at ...176... Sat Sep 6 17:05:07 2014 From: taboege at ...176... (Tobias Boege) Date: Sat, 6 Sep 2014 17:05:07 +0200 Subject: [Gambas-devel] Multi-level virtual objects, inheritance and symbol resolution mess In-Reply-To: <540B1C9D.6060401@...1...> References: <20140905192658.GF915@...693...> <540B1C9D.6060401@...1...> Message-ID: <20140906150507.GA20781@...693...> On Sat, 06 Sep 2014, Beno?t Minisini wrote: > Le 05/09/2014 21:26, Tobias Boege a ?crit : > > Hi Benoit, > > > > I'm almost done with implementing an adjacency matrix based Graph class > > (GraphMatrix), to then set the Graph interface in stone. See #6451 for > > the code I'll talk about. > > > > Only there is one obstacle to overcome: accessing symbols of a > > GraphMatrix.Vertices[sVertex] object. The situation is as follows: > > > > - GraphMatrix Inherits Graph (which is an "abstract" class). > > - .Vertices is a virtual object whose _get method calls back: > > - Me._getVertex (which is within GraphMatrix and) which returns a: > > - _Graph_Vertex, a virtual class which is the base of all implementation- > > specific vertex classes. > > - In case of GraphMatrix, this is a _Matrix_Vertex virtual class which > > Inherits _Graph_Vertex. > > > >>From there I want to access the InDegree property which is properly > > implemented in the _Matrix_Vertex class but all I get is ("a" is an existing > > vertex in the graph): > > > > hGraph.Vertices["a"].InDegree > > >> (Function GraphMatrix:3) > > > > Indeed, InDegree is the 3rd symbol in _Matrix_Vertex. If I issue > > > > hGraph.Vertices["a"].InDegree() > > >> Error: Not enough arguments > > > > The 3rd symbol in GraphMatrix is _getEdge which needs two arguments... If I > > try that: > > > > hGraph.Vertices["a"].InDegree("b", "a") > > >> Error: Edge does not exist > > > > which is the error I would expect from my graph if I called the _getEdge > > method! It seems like the InDegree property is not mapped to my > > _Matrix_Vertex.InDegree implementation but to the method of same index in > > GraphMatrix. > > > > _Matrix_Vertex actually is a virtual class obtained via a virtual class > > interface from GraphMatrix. Is the virtual class information lost somewhere > > on the way or do I exceed a limit here? > > > > --- > > > > So, in a nutshell: GraphMatrix.Vertices is a virtual class which calls back > > GraphMatrix._getVertex which returns another virtual object from which I > > want to access a property. > > > > In a graph class (ImageGraph) implemented in Gambas -- where there are no > > virtual classes -- the _ImageGraph_Vertex Inherits _Graph_Vertex is a real > > class. And there it works! > > > > Attached are: the project which uses the native GraphMatrix class and fails, > > and the working ImageGraph Gambas class. I would really like to finish this > > thing soon. If you could take a good look, that would surely be a great help. > > > > Regards, > > Tobi > > > > I'm currently looking at it... > > But why didn't you do as I told you, i.e. use an internal dispatch > interface (a structure of function pointers) like I did for the Paint > class? > Ah right. I knew there was something... I just picked this up after a long pause. I'm on it now. > Otherwise things are so slow. Calling GB.GetFunction() implies a symbol > table lookup and signature verification at each call! > > I suggest: > > - Creating a struct of function pointers that represents the graph node > interface. > > - Adding a pointer on that struct in each graph. > > - Use it everywhere you need. > > - All classes written in C/C++ inheriting Graph must implement that > struct of function pointers and put a pointer on it in its objects. > > - For classes written in Gambas inheriting Graph, you must create a > struct of function pointers that calls the Gambas functions you defined > ('_getVertex', '_getEdge', ...). Calls to GB.GetFunction() should be > done once and cached, the first time you instanciate an object of that > class. > So, I would keep a structure of GB_FUNCTIONs? Can I keep this struct once for each class and substitute GB_FUNCTION.object for each call or is this not supported (depends on what is in GB_FUNCTION.desc)? > That way, performance should be acceptable. :-) > > By the way: you should use GB_DECLARE_VIRTUAL() instead of GB_DECLARE() > for declaring virtual classes. No need to use GB_VIRTUAL_CLASS() then. > And virtual classes name should begin with a dot, not an underscore. I'm > not sure at the moment it has no impact in the interpreter... > I wanted to adhere to this rule but the problem is/was that _Graph_Vertex was virtual and Gambas classes needed to inherit it but IIRC you cannot inherit classes beginning with a dot in Gambas (syntactically). Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From gambas at ...1... Sat Sep 6 17:50:00 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Sat, 06 Sep 2014 17:50:00 +0200 Subject: [Gambas-devel] Multi-level virtual objects, inheritance and symbol resolution mess In-Reply-To: <540B1C9D.6060401@...1...> References: <20140905192658.GF915@...693...> <540B1C9D.6060401@...1...> Message-ID: <540B2D28.6030607@...1...> Le 06/09/2014 16:39, Beno?t Minisini a ?crit : > Le 05/09/2014 21:26, Tobias Boege a ?crit : >> Hi Benoit, >> >> I'm almost done with implementing an adjacency matrix based Graph class >> (GraphMatrix), to then set the Graph interface in stone. See #6451 for >> the code I'll talk about. >> >> Only there is one obstacle to overcome: accessing symbols of a >> GraphMatrix.Vertices[sVertex] object. The situation is as follows: >> >> - GraphMatrix Inherits Graph (which is an "abstract" class). >> - .Vertices is a virtual object whose _get method calls back: >> - Me._getVertex (which is within GraphMatrix and) which returns a: >> - _Graph_Vertex, a virtual class which is the base of all >> implementation- >> specific vertex classes. >> - In case of GraphMatrix, this is a _Matrix_Vertex virtual class which >> Inherits _Graph_Vertex. >> >>> From there I want to access the InDegree property which is properly >> implemented in the _Matrix_Vertex class but all I get is ("a" is an >> existing >> vertex in the graph): >> >> hGraph.Vertices["a"].InDegree >> >> (Function GraphMatrix:3) >> >> Indeed, InDegree is the 3rd symbol in _Matrix_Vertex. If I issue >> >> hGraph.Vertices["a"].InDegree() >> >> Error: Not enough arguments >> >> The 3rd symbol in GraphMatrix is _getEdge which needs two arguments... >> If I >> try that: >> >> hGraph.Vertices["a"].InDegree("b", "a") >> >> Error: Edge does not exist >> >> which is the error I would expect from my graph if I called the _getEdge >> method! It seems like the InDegree property is not mapped to my >> _Matrix_Vertex.InDegree implementation but to the method of same index in >> GraphMatrix. >> >> _Matrix_Vertex actually is a virtual class obtained via a virtual class >> interface from GraphMatrix. Is the virtual class information lost >> somewhere >> on the way or do I exceed a limit here? >> >> --- >> >> So, in a nutshell: GraphMatrix.Vertices is a virtual class which calls >> back >> GraphMatrix._getVertex which returns another virtual object from which I >> want to access a property. >> >> In a graph class (ImageGraph) implemented in Gambas -- where there are no >> virtual classes -- the _ImageGraph_Vertex Inherits _Graph_Vertex is a >> real >> class. And there it works! >> >> Attached are: the project which uses the native GraphMatrix class and >> fails, >> and the working ImageGraph Gambas class. I would really like to finish >> this >> thing soon. If you could take a good look, that would surely be a >> great help. >> >> Regards, >> Tobi >> > > I'm currently looking at it... > OK. As I thought, the "_" prefix was the problem. I fixed the interpreter so that it decides that a native class is virtual by taking into account the "GB_VIRTUAL_CLASS()" declaration, not just the initial dot in the name. But there is another problem: hGraphMatrix.Vertices[] calls GraphVertices_get, which calls the "_getVertex" method. As "_getVertex" returns a "virtual object", no dynamic calling can occur, and the InDegree property of _Graph_Vertex is called, never the InDegree property of _Matrix_Vertex. I have no solution at the moment... -- Beno?t Minisini From gambas at ...1... Sat Sep 6 17:51:12 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Sat, 06 Sep 2014 17:51:12 +0200 Subject: [Gambas-devel] Multi-level virtual objects, inheritance and symbol resolution mess In-Reply-To: <20140906150507.GA20781@...693...> References: <20140905192658.GF915@...693...> <540B1C9D.6060401@...1...> <20140906150507.GA20781@...693...> Message-ID: <540B2D70.2010006@...1...> Le 06/09/2014 17:05, Tobias Boege a ?crit : >> >> I suggest: >> >> - Creating a struct of function pointers that represents the graph node >> interface. >> >> - Adding a pointer on that struct in each graph. >> >> - Use it everywhere you need. >> >> - All classes written in C/C++ inheriting Graph must implement that >> struct of function pointers and put a pointer on it in its objects. >> >> - For classes written in Gambas inheriting Graph, you must create a >> struct of function pointers that calls the Gambas functions you defined >> ('_getVertex', '_getEdge', ...). Calls to GB.GetFunction() should be >> done once and cached, the first time you instanciate an object of that >> class. >> > > So, I would keep a structure of GB_FUNCTIONs? Can I keep this struct once > for each class and substitute GB_FUNCTION.object for each call or is this > not supported (depends on what is in GB_FUNCTION.desc)? > Yes. "desc" is the method description, "object" the object pointer. >> That way, performance should be acceptable. :-) >> >> By the way: you should use GB_DECLARE_VIRTUAL() instead of GB_DECLARE() >> for declaring virtual classes. No need to use GB_VIRTUAL_CLASS() then. >> And virtual classes name should begin with a dot, not an underscore. I'm >> not sure at the moment it has no impact in the interpreter... >> > > I wanted to adhere to this rule but the problem is/was that _Graph_Vertex > was virtual and Gambas classes needed to inherit it but IIRC you cannot > inherit classes beginning with a dot in Gambas (syntactically). > See my previous answer. Inheriting virtual classes does not really work, as dynamic symbol dispatching cannot occur with virtual classes. -- Beno?t Minisini From gambas at ...1... Sat Sep 6 17:53:16 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Sat, 06 Sep 2014 17:53:16 +0200 Subject: [Gambas-devel] Multi-level virtual objects, inheritance and symbol resolution mess In-Reply-To: <540B2D70.2010006@...1...> References: <20140905192658.GF915@...693...> <540B1C9D.6060401@...1...> <20140906150507.GA20781@...693...> <540B2D70.2010006@...1...> Message-ID: <540B2DEC.4000004@...1...> Le 06/09/2014 17:51, Beno?t Minisini a ?crit : >> >> I wanted to adhere to this rule but the problem is/was that _Graph_Vertex >> was virtual and Gambas classes needed to inherit it but IIRC you cannot >> inherit classes beginning with a dot in Gambas (syntactically). >> > > See my previous answer. Inheriting virtual classes does not really work, > as dynamic symbol dispatching cannot occur with virtual classes. > There is a solution : - Do not inherit _Graph_Vertex, or anyother virtual class. - But add _Graph_Vertext methods and properties to the internal interface. Regards, -- Beno?t Minisini From jleake at ...741... Sun Sep 7 17:20:48 2014 From: jleake at ...741... (John Leake) Date: Sun, 07 Sep 2014 16:20:48 +0100 Subject: [Gambas-devel] Creating a Control Message-ID: <540C77D0.1010404@...741...> Hi All, I am struggling to understand how to create a new control. Please forgive me, I have read the help on this but I am none the wiser. As a test I just want to create a control that behaves like a ToggleButton but changes colour each time it is clicked. Could anyone help me get started ? Best regards, John Leake From taboege at ...176... Sun Sep 7 17:50:48 2014 From: taboege at ...176... (Tobias Boege) Date: Sun, 7 Sep 2014 17:50:48 +0200 Subject: [Gambas-devel] Creating a Control In-Reply-To: <540C77D0.1010404@...741...> References: <540C77D0.1010404@...741...> Message-ID: <20140907155048.GA28596@...693...> On Sun, 07 Sep 2014, John Leake wrote: > Hi All, > I am struggling to understand how to create a new control. > > Please forgive me, I have read the help on this but I am none the wiser. > > As a test I just want to create a control that behaves like a > ToggleButton but changes colour each time it is clicked. > > Could anyone help me get started ? > Hui, I don't know how simple you think this is but depending on from where you want to start, it can require quite some code (involving drawing every part of your control if you want to write it from scratch). Of course, you can, on the other side, start with a ToggleButton and add just the colour plays to it which would require significantly less code. It depends on how much control you need to have. There are different approaches (hard ~ more control): - inherit ToggleButton [0] (easy), - inherit UserControl [1] (harder, chosen often in Gambas sources), - create a Form and put your things together [2] (less applicable here but useful to remember when you want to create compound controls) (also easy). You may also want to integrate the control into the IDE's Form editor [3]. I tried to put example classes together for the above approaches but you are way better off subscribing to the gambas-user mailing list (you are still on gambas-devel here which is for discussion about contributions to Gambas, not questions about programming in it). Some people there have done this sort of thing way more often than me. See the SF info page [4]. Regards, Tobi General advice: if you have a slight idea already of what to search for, it is a very good idea to look at the Gambas source code. Lots of things you use as a Gambas programmer are implemented in Gambas itself. [0] http://sourceforge.net/p/gambas/code/HEAD/tree/gambas/trunk/comp/src/gb.form/.src/MessageLabel.class or have a look at http://sourceforge.net/p/gambas/code/HEAD/tree/gambas/trunk/comp/src/gb.form/.src/TagBox/TagComboBox.class for an example of a very lazy coder :-) [1] http://sourceforge.net/p/gambas/code/HEAD/tree/gambas/trunk/comp/src/gb.form/.src/Spinner.class This is actually a pretty good example! [2] http://sourceforge.net/p/gambas/code/HEAD/tree/gambas/trunk/comp/src/gb.form/.src/FInputBox.class Plus the other *InputBox.{form,class} files in that directory. [3] http://gambaswiki.org/wiki/dev/gambas [4] https://lists.sourceforge.net/lists/listinfo/gambas-user -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From gambas at ...1... Sun Sep 7 19:26:45 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Sun, 07 Sep 2014 19:26:45 +0200 Subject: [Gambas-devel] Creating a Control In-Reply-To: <540C77D0.1010404@...741...> References: <540C77D0.1010404@...741...> Message-ID: <540C9555.4000508@...1...> Le 07/09/2014 17:20, John Leake a ?crit : > Hi All, > I am struggling to understand how to create a new control. > > Please forgive me, I have read the help on this but I am none the wiser. > > As a test I just want to create a control that behaves like a > ToggleButton but changes colour each time it is clicked. > > Could anyone help me get started ? > > Best regards, > John Leake > You have a bunch of controls made in Gambas in the gb.form component. The sources of all components made in Gambas are located in `/trunk/comp/src/`. Then read that, to know how to make a control: http://gambaswiki.org/wiki/dev/gambas Then ask your questions! Regards, -- Beno?t Minisini From jleake at ...741... Mon Sep 8 13:35:48 2014 From: jleake at ...741... (John Leake) Date: Mon, 08 Sep 2014 12:35:48 +0100 Subject: [Gambas-devel] Creating a Control In-Reply-To: <540C77D0.1010404@...741...> References: <540C77D0.1010404@...741...> Message-ID: <540D9494.8050305@...741...> Hi All, Many thanks for your responses. I am posting this in the devel list because I am prepared to spend the time improving the IDE. So for directions I go to http://www.gambasdoc.org/help/dev/gambas?v3 Lets say I just want to create a ToggleButton of my own that is unchanged from that which exists already Except for the name of course. Start ----- 1) create a new project and set its project type to 'Graphical application' and check the option 'Component programming'. 2) Select the parent directory (my work is in ~/dev/Gambas3). 3) Give the project a name and title of 'MyToggleButton'. 4) Drop a toggle button onto 'FTest' and run. All good so far. The docs say:- "Only the _IsControl and the _Properties constants are mandatory." and "These hidden constants are inherited like any other constant. So you don't have to actually declare them in each control, as soon as there is some inheritance relationships between them. " So there is not much more to do since I do not want to change any behaviour or control properties. Just get the control to show up in the control toolbox and allow users to design with it just like the original ToggleButton. 5) From the docs "Each control must have an icon that will be displayed in the IDE control tool box.". I was hoping that I would inherit these also. There are already two png files in '~/dev/gambas3/MyToggleButton/.hidden/control' so I change the images so I can distinguish them from the originals. The docs say "The IDE can make binary packages of your component, as it does for any other normal projects." so 6) Project/Make/Executable - good no errors. 7) Close and save the project and create a new one that should show 'MyToggleButton' in the 'Form/Controls' tab but alas it is not there ! End --- This may be a naive point of view but shouldn?t it just work like this if ? Best regards, John Leake From taboege at ...176... Mon Sep 8 14:34:45 2014 From: taboege at ...176... (Tobias Boege) Date: Mon, 8 Sep 2014 14:34:45 +0200 Subject: [Gambas-devel] Creating a Control In-Reply-To: <540D9494.8050305@...741...> References: <540C77D0.1010404@...741...> <540D9494.8050305@...741...> Message-ID: <20140908123445.GA889@...693...> On Mon, 08 Sep 2014, John Leake wrote: > Hi All, > > Many thanks for your responses. I am posting this in the devel list > because I am prepared to spend the time improving the IDE. > Yes, but you only see 3 - 4 people regularly on gambas-devel (and mainly through gambas-devel-svn when they do commits), as opposed to at least 10 on gambas-user. In the difference are people like Bruce Bruen who earns a living programming in Gambas and doing such things. > So for directions I go to http://www.gambasdoc.org/help/dev/gambas?v3 > > Lets say I just want to create a ToggleButton of my own that is > unchanged from that which exists already Except for the name of course. > > Start > ----- > 1) create a new project and set its project type to 'Graphical > application' and check the option 'Component programming'. > No, you are not programming a component here. A component is a shared library which you can plug into the interpreter to add functionality. You don't do that here (yet?), you're just experimenting in an ordinary project, not a component project. This decision isn't messing things up. Components written in Gambas are just a superset of ordinary projects (IIRC?). But you shouldn't include the additional meta data if you don't need to. > 2) Select the parent directory (my work is in ~/dev/Gambas3). > > 3) Give the project a name and title of 'MyToggleButton'. > > 4) Drop a toggle button onto 'FTest' and run. All good so far. > > The docs say:- > > "Only the _IsControl and the _Properties constants are mandatory." > > and > > "These hidden constants are inherited like any other constant. So you > don't have to actually declare them in each control, as soon as there is > some inheritance relationships between them. " > > So there is not much more to do since I do not want to change any > behaviour or control properties. Just get the control to show up in the > control toolbox and allow users to design with it just like the original > ToggleButton. > > 5) From the docs "Each control must have an icon that will be displayed > in the IDE control tool box.". I was hoping that I would inherit these > also. There are already two png files in > '~/dev/gambas3/MyToggleButton/.hidden/control' so I change the images so > I can distinguish them from the originals. > > The docs say "The IDE can make binary packages of your component, as it > does for any other normal projects." so > > 6) Project/Make/Executable - good no errors. > Very good so far. > 7) Close and save the project and create a new one that should show > 'MyToggleButton' in the 'Form/Controls' tab but alas it is not there ! > > End > --- > > This may be a naive point of view but shouldn?t it just work like this if ? > It's very natural that it is not there: your MyToggleButton is a class in your first project. That's why the IDE can read it and add it to the Controls tab. If you open another project without this class, the class... cannot be found. Your custom controls are local to your project, so to say. If you want to use it in other projects, you can - create a component, install it and plug it in (Project -> Properties -> Components), - create a so-called library [0] or - copy your classes over or create symlinks to them. Regards, Tobi [0] http://gambaswiki.org/wiki/doc/library -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From jleake at ...741... Mon Sep 8 15:56:43 2014 From: jleake at ...741... (John Leake) Date: Mon, 08 Sep 2014 14:56:43 +0100 Subject: [Gambas-devel] Creating a Control In-Reply-To: <20140908123445.GA889@...693...> References: <540C77D0.1010404@...741...> <540D9494.8050305@...741...> <20140908123445.GA889@...693...> Message-ID: <540DB59B.7000006@...741...> Hi Tobi, Thank you for the response. Please do not forget I am a complete newbie to Gambas and just trying to get bye following the docs without bothering anyone. >> Start >> ----- >> 1) create a new project and set its project type to 'Graphical >> application' and check the option 'Component programming'. >> > > No, you are not programming a component here. A component is a shared > library which you can plug into the interpreter to add functionality. > You don't do that here (yet?), you're just experimenting in an ordinary > project, not a component project. The docs say create a new project and mark its type as component. They also say that component controls are just ordinary projects. What should I do instead of 1) ? > It's very natural that it is not there: your MyToggleButton is a class in > your first project. Again from a newbies perspective I have made a new component. Perhaps it should be found by Gambas (at least as a locally created new component) where my new projects can make use of it and also where it can be combined with additional new local controls to create more aggregated controls. One way of achieving this would be to have a publish function that copies or moves the new code into the correct place for it to be picked up along with all the existing/native controls. > cannot be found. Your custom controls are local to your project, so to say. How can I use my new local control an new projects ? > If you want to use it in other projects, you can > - create a component, install it and plug it in (Project -> Properties -> > Components), Sorry I cannot find instruction for this. w.r.t. 5) From the docs "Each control must have an icon that will be displayed in the IDE control tool box.". Shouldn't the default be images from the original control ? Best regards, John From jleake at ...741... Mon Sep 8 16:14:05 2014 From: jleake at ...741... (John Leake) Date: Mon, 08 Sep 2014 15:14:05 +0100 Subject: [Gambas-devel] Creating a Control In-Reply-To: <540DB59B.7000006@...741...> References: <540C77D0.1010404@...741...> <540D9494.8050305@...741...> <20140908123445.GA889@...693...> <540DB59B.7000006@...741...> Message-ID: <540DB9AD.3080904@...741...> Hi Tobi, So I made an installation package and guessed where to put it. Could I suggest that since the new control is a form control that it should automatically be installed into the correct location. When I create a new project the new control is visible in the toolbox but if I add it to a form the IDE complains with:- "Cannot open file. File or directory does not exist Project.IsTextfile.1909" Best regards, John P.S. I think I could probably fix this behaviour. From gambas at ...1... Mon Sep 8 16:35:56 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Mon, 08 Sep 2014 16:35:56 +0200 Subject: [Gambas-devel] Creating a Control In-Reply-To: <540DB9AD.3080904@...741...> References: <540C77D0.1010404@...741...> <540D9494.8050305@...741...> <20140908123445.GA889@...693...> <540DB59B.7000006@...741...> <540DB9AD.3080904@...741...> Message-ID: <540DBECC.3010103@...1...> Le 08/09/2014 16:14, John Leake a ?crit : > Hi Tobi, > > So I made an installation package and guessed where to put it. > > Could I suggest that since the new control is a form control that it > should automatically be installed into the correct location. > > When I create a new project the new control is visible in the toolbox > but if I add it to a form the IDE complains with:- > > "Cannot open file. > File or directory does not exist > Project.IsTextfile.1909" > > Best regards, > John > > P.S. I think I could probably fix this behaviour. > Please post your project, and information on your system, especially the gambas version you are using. -- Beno?t Minisini From taboege at ...176... Mon Sep 8 16:47:50 2014 From: taboege at ...176... (Tobias Boege) Date: Mon, 8 Sep 2014 16:47:50 +0200 Subject: [Gambas-devel] Creating a Control In-Reply-To: <540DB59B.7000006@...741...> References: <540C77D0.1010404@...741...> <540D9494.8050305@...741...> <20140908123445.GA889@...693...> <540DB59B.7000006@...741...> Message-ID: <20140908144750.GB889@...693...> On Mon, 08 Sep 2014, John Leake wrote: > Hi Tobi, > > Thank you for the response. Please do not forget I am a complete newbie > to Gambas and just trying to get bye following the docs without > bothering anyone. > Yes, I lose focus of such information while writing. Sorry. > >> Start > >> ----- > >> 1) create a new project and set its project type to 'Graphical > >> application' and check the option 'Component programming'. > >> > > > > No, you are not programming a component here. A component is a shared > > library which you can plug into the interpreter to add functionality. > > You don't do that here (yet?), you're just experimenting in an ordinary > > project, not a component project. > > The docs say create a new project and mark its type as component. They > also say that component controls are just ordinary projects. > Yes, the link is actually about writing an own component (shared library) but it's also cited frequently as a resource of how to implement your own (graphical) control. Both topics are technically independent of one another, i.e. you don't need to create a component to add new controls to your project and new components don't always contain controls. But typically (?) they're used together. > What should I do instead of 1) ? > If you just want to experiment/exercise, then don't check the "Component programming" box. It's not a big deal if you do. The IDE will just behave a little differently and the project contains some more bits of meta data. You only need to check this box if you are a) exploring how to integrate your own component into other projects or b) seriously writing a useful component. > > It's very natural that it is not there: your MyToggleButton is a class in > > your first project. > > Again from a newbies perspective I have made a new component. Perhaps > it should be found by Gambas (at least as a locally created new > component) > Look at it from a developer's point of view: what would it take to collect all custom controls from projects the user might have? It would need to scan at least the entire home directory of the user (not all projects containing custom controls might have ever been opened by that IDE; you could have just downloaded them, e.g.). No sane program would do that on each startup. The Gambas IDE requires *you* to put your stuff into one of the (very) finite number of standard locations so that it can be found. One of those standard locations is the project's source code directory and /usr/lib/gambas3 for components. [ But note (again?): I don't really work with custom (not in the official source tree) components and libraries. I just don't create them because my projects are simple and heterogenous enough to be self-contained. Almost all my experience here is from reading the docs and occasional mails about it. I just answer because I'm afraid Benoit is too busy and so nobody else will respond. Maybe I should stop doing that so that others don't think you are already "being treated"? Or maybe you should write to gambas-user where the chances are higher that people with custom components/libraries listen. Ceterum censeo Carthaginem esse delendam ;-) ] > where my new projects can make use of it and also where it > can be combined with additional new local controls to create more > aggregated controls. > > One way of achieving this would be to have a publish function that > copies or moves the new code into the correct place for it to be picked > up along with all the existing/native controls. > Yes, this "publish" function is the "cp" program :-) Except there is no great global "pool" of classes when using "cp". If you miss an integrated function for this way of organisation, you are very welcome to implement it once you can imagine how to do it. > > cannot be found. Your custom controls are local to your project, so to say. > > How can I use my new local control an new projects ? > > > If you want to use it in other projects, you can > > - create a component, install it and plug it in (Project -> Properties -> > > Components), > > Sorry I cannot find instruction for this. > I think your next mail addresses this... > w.r.t. 5) From the docs "Each control must have an icon that will be > displayed > in the IDE control tool box.". > > Shouldn't the default be images from the original control ? > So you suppose that if there is no picture to symbolise a control, the parent class should be drawn. I would agree. But maybe this logic is just not integrated yet (I think it would require to extract files from other components). Let's (implicitely) ask Benoit. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From gambas at ...1... Mon Sep 8 17:04:15 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Mon, 08 Sep 2014 17:04:15 +0200 Subject: [Gambas-devel] Creating a Control In-Reply-To: <20140908144750.GB889@...693...> References: <540C77D0.1010404@...741...> <540D9494.8050305@...741...> <20140908123445.GA889@...693...> <540DB59B.7000006@...741...> <20140908144750.GB889@...693...> Message-ID: <540DC56F.1030802@...1...> Le 08/09/2014 16:47, Tobias Boege a ?crit : > > So you suppose that if there is no picture to symbolise a control, the > parent class should be drawn. I would agree. But maybe this logic is just > not integrated yet (I think it would require to extract files from other > components). Let's (implicitely) ask Benoit. Exactly. There is no inheritance of control icons. What for? Two different controls should not have the same icons, otherwise we can't distinguish them in the toolbar. -- Beno?t Minisini From jleake at ...741... Mon Sep 8 17:43:39 2014 From: jleake at ...741... (John Leake) Date: Mon, 08 Sep 2014 16:43:39 +0100 Subject: [Gambas-devel] Creating a Control In-Reply-To: <20140908144750.GB889@...693...> References: <540C77D0.1010404@...741...> <540D9494.8050305@...741...> <20140908123445.GA889@...693...> <540DB59B.7000006@...741...> <20140908144750.GB889@...693...> Message-ID: <540DCEAB.4010304@...741...> > Yes, the link is actually about writing an own component (shared library) > but it's also cited frequently as a resource of how to implement your own > (graphical) control. Both topics are technically independent of one another, > i.e. you don't need to create a component to add new controls to your > project and new components don't always contain controls. But typically (?) > they're used together. > You only need to check this box if you are > a) exploring how to integrate your own component into other projects or > b) seriously writing a useful component. > I have several components/controls I wish to create and share. So I am trying to keep it simple. i.e. create a togglebutton from an existing control and see if I can use it just like the original before overriding/adding functionality and combining it with other controls. > Look at it from a developer's point of view: what would it take to collect > all custom controls from projects the user might have? It would need to scan > at least the entire home directory of the user (not all projects containing > custom controls might have ever been opened by that IDE; you could have just > downloaded them, e.g.). No sane program would do that on each startup. I am a developer and have been for 30+ years and would like to contribute to this fantastic IDE. Turning this point on its head then we should be thinking from the perspective of a users point of view. If I am in the IDE and have created a component (from an existing component) then the IDE knows all about my project and where it is. After all it remembers my IDE preferences. > The Gambas IDE requires *you* to put your stuff into one of the (very) finite > number of standard locations so that it can be found. One of those standard > locations is the project's source code directory and /usr/lib/gambas3 for > components. How is a user supposed to know that ? Another problem with this point of view is the coupling that you create between how developers implement the IDE and the documents that the user reads in order to use the IDE. If the user chooses to publish (make part of Gambas) a control then the IDE can choose where it should go. > > [ But note (again?): I don't really work with custom (not in the official > source tree) components and libraries. I just don't create them because my > projects are simple and heterogenous enough to be self-contained. Almost > all my experience here is from reading the docs and occasional mails about > it. I just answer because I'm afraid Benoit is too busy and so nobody else > will respond. > I appreciate your responses and your time very much. > Maybe I should stop doing that so that others don't think you are already > "being treated"? Or maybe you should write to gambas-user where the chances > are higher that people with custom components/libraries listen. Ceterum > censeo Carthaginem esse delendam ;-) ] I have posted a similar question on gambas-user. I would like to contribute to the development of the IDE. Because I am a gambas newbie I can see what will trip newcomers up and turn them away, (It nearly happened to me). > Yes, this "publish" function is the "cp" program :-) Except there is no > great global "pool" of classes when using "cp". I will have a look at it. > > If you miss an integrated function for this way of organisation, you are > very welcome to implement it once you can imagine how to do it. > That is what I am trying to do. >> How can I use my new local control an new projects ? >> >>> If you want to use it in other projects, you can >>> - create a component, install it and plug it in (Project -> Properties -> >>> Components), >> >> Sorry I cannot find instruction for this. >> > > I think your next mail addresses this... > >> w.r.t. 5) From the docs "Each control must have an icon that will be >> displayed >> in the IDE control tool box.". >> >> Shouldn't the default be images from the original control ? >> > > So you suppose that if there is no picture to symbolise a control, the > parent class should be drawn. If a user creates a new ToggleButton from the Gambas ToggleButton and does not change it then it should behave just like the original with the exception of its name. I would agree. But maybe this logic is just > not integrated yet (I think it would require to extract files from other > components). Let's (implicitely) ask Benoit. Again that is what I am trying to do. One general point about drag and drop GUI design is that the holy grail would be for all the components an app would require would already exist and all a user needs to do is wire them up and integrate some application domain logic and we all sail into the sunset. Clearly one cannot anticipate the shape and form of these components ahead of time. Bloat sets in and that is not acceptable these days. If however it is made trivial to combine existing low level controls to create new ones then we are getting somewhere. Best regards, John Leake From jleake at ...741... Mon Sep 8 17:50:40 2014 From: jleake at ...741... (John Leake) Date: Mon, 08 Sep 2014 16:50:40 +0100 Subject: [Gambas-devel] Creating a Control In-Reply-To: <540DC56F.1030802@...1...> References: <540C77D0.1010404@...741...> <540D9494.8050305@...741...> <20140908123445.GA889@...693...> <540DB59B.7000006@...741...> <20140908144750.GB889@...693...> <540DC56F.1030802@...1...> Message-ID: <540DD050.1080502@...741...> > > Exactly. There is no inheritance of control icons. What for? Two > different controls should not have the same icons, otherwise we can't > distinguish them in the toolbar. > Stand back, think and pause for a moment. Let say a user wants to test the IDE and create a control quickly and effortlessly. They create MyToggleButton based on ToggleButton and that should be all. They can then edit the graphic and can visually tell them apart. It allows users to stand on the shoulders of giants and feel confident that there are no errors (except for those that may have existed already of course). From jleake at ...741... Mon Sep 8 17:58:04 2014 From: jleake at ...741... (John Leake) Date: Mon, 08 Sep 2014 16:58:04 +0100 Subject: [Gambas-devel] Creating a Control In-Reply-To: <540DBECC.3010103@...1...> References: <540C77D0.1010404@...741...> <540D9494.8050305@...741...> <20140908123445.GA889@...693...> <540DB59B.7000006@...741...> <540DB9AD.3080904@...741...> <540DBECC.3010103@...1...> Message-ID: <540DD20C.9030104@...741...> > Please post your project, and information on your system, especially the > gambas version you are using. > [System] Gambas=3.5.4 OperatingSystem=Linux Kernel=3.11.0-26-generic Architecture=x86_64 Distribution=Ubuntu 12.04.5 LTS Desktop=XFCE Theme=QGtk Language=en_GB.UTF-8 Memory=7863M [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 Sorry I cannot reproduce this again but if it crops up again I will do so. From jusabejusabe at ...176... Mon Sep 8 22:26:31 2014 From: jusabejusabe at ...176... (Julio Sanchez) Date: Mon, 8 Sep 2014 22:26:31 +0200 Subject: [Gambas-devel] Creating a Control In-Reply-To: <540DD20C.9030104@...741...> References: <540C77D0.1010404@...741...> <540D9494.8050305@...741...> <20140908123445.GA889@...693...> <540DB59B.7000006@...741...> <540DB9AD.3080904@...741...> <540DBECC.3010103@...1...> <540DD20C.9030104@...741...> Message-ID: John: I made a simple example of creating and using a new component that inherits from another already created. Also there is a video explaining the steps (this in Spanish), but I think you can understand. http://jsbsan.blogspot.com.es/2014/09/crear-un-componente-partir-de-otro.html I hope you find it useful Julio 2014-09-08 17:58 GMT+02:00 John Leake : > > > Please post your project, and information on your system, especially the > > gambas version you are using. > > > [System] > Gambas=3.5.4 > OperatingSystem=Linux > Kernel=3.11.0-26-generic > Architecture=x86_64 > Distribution=Ubuntu 12.04.5 LTS > Desktop=XFCE > Theme=QGtk > Language=en_GB.UTF-8 > Memory=7863M > [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 > > Sorry I cannot reproduce this again but if it crops up again I will do so. > > > ------------------------------------------------------------------------------ > Want excitement? > Manually upgrade your production database. > When you want reliability, choose Perforce > Perforce version control. Predictably reliable. > > http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk > _______________________________________________ > Gambas-devel mailing list > Gambas-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jusabejusabe at ...176... Mon Sep 8 22:26:31 2014 From: jusabejusabe at ...176... (Julio Sanchez) Date: Mon, 8 Sep 2014 22:26:31 +0200 Subject: [Gambas-devel] Creating a Control In-Reply-To: <540DD20C.9030104@...741...> References: <540C77D0.1010404@...741...> <540D9494.8050305@...741...> <20140908123445.GA889@...693...> <540DB59B.7000006@...741...> <540DB9AD.3080904@...741...> <540DBECC.3010103@...1...> <540DD20C.9030104@...741...> Message-ID: John: I made a simple example of creating and using a new component that inherits from another already created. Also there is a video explaining the steps (this in Spanish), but I think you can understand. http://jsbsan.blogspot.com.es/2014/09/crear-un-componente-partir-de-otro.html I hope you find it useful Julio 2014-09-08 17:58 GMT+02:00 John Leake : > > > Please post your project, and information on your system, especially the > > gambas version you are using. > > > [System] > Gambas=3.5.4 > OperatingSystem=Linux > Kernel=3.11.0-26-generic > Architecture=x86_64 > Distribution=Ubuntu 12.04.5 LTS > Desktop=XFCE > Theme=QGtk > Language=en_GB.UTF-8 > Memory=7863M > [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 > > Sorry I cannot reproduce this again but if it crops up again I will do so. > > > ------------------------------------------------------------------------------ > Want excitement? > Manually upgrade your production database. > When you want reliability, choose Perforce > Perforce version control. Predictably reliable. > > http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk > _______________________________________________ > Gambas-devel mailing list > Gambas-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jleake at ...741... Mon Sep 8 23:21:29 2014 From: jleake at ...741... (John Leake) Date: Mon, 08 Sep 2014 22:21:29 +0100 Subject: [Gambas-devel] Creating a Control In-Reply-To: References: <540C77D0.1010404@...741...> <540D9494.8050305@...741...> <20140908123445.GA889@...693...> <540DB59B.7000006@...741...> <540DB9AD.3080904@...741...> <540DBECC.3010103@...1...> <540DD20C.9030104@...741...> Message-ID: <540E1DD9.2010301@...741...> Julio: Thank you for your response. I think you give me more credit than I deserve when it comes to understanding the Spanish language however it is certainly interesting and I will re-run it until I understand more fully what is being said. Do you concur that it would be desirable and certainly possible to simply create a new component based on an existing component without writing a single line of code ? John On 08/09/14 21:26, Julio Sanchez wrote: > John: > > I made a simple example of creating and using a new component that > inherits from another already created. Also there is a video explaining > the steps (this in Spanish), but I think you can understand. > > http://jsbsan.blogspot.com.es/2014/09/crear-un-componente-partir-de-otro.html > > > I hope you find it useful > > Julio > > > > 2014-09-08 17:58 GMT+02:00 John Leake >: > > > > Please post your project, and information on your system, especially the > > gambas version you are using. > > > [System] > Gambas=3.5.4 > OperatingSystem=Linux > Kernel=3.11.0-26-generic > Architecture=x86_64 > Distribution=Ubuntu 12.04.5 LTS > Desktop=XFCE > Theme=QGtk > Language=en_GB.UTF-8 > Memory=7863M > [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 > > Sorry I cannot reproduce this again but if it crops up again I will > do so. > > ------------------------------------------------------------------------------ > Want excitement? > Manually upgrade your production database. > When you want reliability, choose Perforce > Perforce version control. Predictably reliable. > http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk > _______________________________________________ > Gambas-devel mailing list > Gambas-devel at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-devel > > > > > ------------------------------------------------------------------------------ > Want excitement? > Manually upgrade your production database. > When you want reliability, choose Perforce > Perforce version control. Predictably reliable. > http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk > > > > _______________________________________________ > Gambas-devel mailing list > Gambas-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-devel > From jleake at ...741... Mon Sep 8 23:31:57 2014 From: jleake at ...741... (John Leake) Date: Mon, 08 Sep 2014 22:31:57 +0100 Subject: [Gambas-devel] Creating a Control In-Reply-To: References: <540C77D0.1010404@...741...> <540D9494.8050305@...741...> <20140908123445.GA889@...693...> <540DB59B.7000006@...741...> <540DB9AD.3080904@...741...> <540DBECC.3010103@...1...> <540DD20C.9030104@...741...> Message-ID: <540E204D.9090701@...741...> Hi Julio, Could you create a project that does exactly the same thing as an existing control (a ToggleButton perhaps) and gzip the whole project source so I can work from there to try and automate the process still further? John On 08/09/14 21:26, Julio Sanchez wrote: > John: > > I made a simple example of creating and using a new component that > inherits from another already created. Also there is a video explaining > the steps (this in Spanish), but I think you can understand. > > http://jsbsan.blogspot.com.es/2014/09/crear-un-componente-partir-de-otro.html > > > I hope you find it useful > > Julio > > > > 2014-09-08 17:58 GMT+02:00 John Leake >: > > > > Please post your project, and information on your system, especially the > > gambas version you are using. > > > [System] > Gambas=3.5.4 > OperatingSystem=Linux > Kernel=3.11.0-26-generic > Architecture=x86_64 > Distribution=Ubuntu 12.04.5 LTS > Desktop=XFCE > Theme=QGtk > Language=en_GB.UTF-8 > Memory=7863M > [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 > > Sorry I cannot reproduce this again but if it crops up again I will > do so. > > ------------------------------------------------------------------------------ > Want excitement? > Manually upgrade your production database. > When you want reliability, choose Perforce > Perforce version control. Predictably reliable. > http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk > _______________________________________________ > Gambas-devel mailing list > Gambas-devel at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-devel > > > > > ------------------------------------------------------------------------------ > Want excitement? > Manually upgrade your production database. > When you want reliability, choose Perforce > Perforce version control. Predictably reliable. > http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk > > > > _______________________________________________ > Gambas-devel mailing list > Gambas-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-devel > From jusabejusabe at ...176... Tue Sep 9 01:14:52 2014 From: jusabejusabe at ...176... (Julio Sanchez) Date: Tue, 9 Sep 2014 01:14:52 +0200 Subject: [Gambas-devel] Creating a Control In-Reply-To: <540E204D.9090701@...741...> References: <540C77D0.1010404@...741...> <540D9494.8050305@...741...> <20140908123445.GA889@...693...> <540DB59B.7000006@...741...> <540DB9AD.3080904@...741...> <540DBECC.3010103@...1...> <540DD20C.9030104@...741...> <540E204D.9090701@...741...> Message-ID: John; Simple example of new component that inherits from ToggleButton: SuperToggleButton https://drive.google.com/folderview?id=0B02Ro2CNt-OOQlNSUjc2Q09yNEU&usp=sharing#list "video in spanish" I try to put some subtitles in English of what I say Regards Julio 2014-09-08 23:31 GMT+02:00 John Leake : > Hi Julio, > > Could you create a project that does exactly the same thing as an > existing control (a ToggleButton perhaps) and gzip the whole project > source so I can work from there to try and automate the process still > further? > > John > > On 08/09/14 21:26, Julio Sanchez wrote: > > John: > > > > I made a simple example of creating and using a new component that > > inherits from another already created. Also there is a video explaining > > the steps (this in Spanish), but I think you can understand. > > > > > http://jsbsan.blogspot.com.es/2014/09/crear-un-componente-partir-de-otro.html > > > > > > I hope you find it useful > > > > Julio > > > > > > > > 2014-09-08 17:58 GMT+02:00 John Leake > >: > > > > > > > Please post your project, and information on your system, > especially the > > > gambas version you are using. > > > > > [System] > > Gambas=3.5.4 > > OperatingSystem=Linux > > Kernel=3.11.0-26-generic > > Architecture=x86_64 > > Distribution=Ubuntu 12.04.5 LTS > > Desktop=XFCE > > Theme=QGtk > > Language=en_GB.UTF-8 > > Memory=7863M > > [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 > > > > Sorry I cannot reproduce this again but if it crops up again I will > > do so. > > > > > ------------------------------------------------------------------------------ > > Want excitement? > > Manually upgrade your production database. > > When you want reliability, choose Perforce > > Perforce version control. Predictably reliable. > > > http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk > > _______________________________________________ > > Gambas-devel mailing list > > Gambas-devel at lists.sourceforge.net > > > > https://lists.sourceforge.net/lists/listinfo/gambas-devel > > > > > > > > > > > ------------------------------------------------------------------------------ > > Want excitement? > > Manually upgrade your production database. > > When you want reliability, choose Perforce > > Perforce version control. Predictably reliable. > > > http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk > > > > > > > > _______________________________________________ > > Gambas-devel mailing list > > Gambas-devel at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-devel > > > > > ------------------------------------------------------------------------------ > Want excitement? > Manually upgrade your production database. > When you want reliability, choose Perforce > Perforce version control. Predictably reliable. > > http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk > _______________________________________________ > Gambas-devel mailing list > Gambas-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jleake at ...741... Tue Sep 9 11:28:09 2014 From: jleake at ...741... (John Leake) Date: Tue, 09 Sep 2014 10:28:09 +0100 Subject: [Gambas-devel] Creating a Control In-Reply-To: References: <540C77D0.1010404@...741...> <540D9494.8050305@...741...> <20140908123445.GA889@...693...> <540DB59B.7000006@...741...> <540DB9AD.3080904@...741...> <540DBECC.3010103@...1...> <540DD20C.9030104@...741...> <540E204D.9090701@...741...> Message-ID: <540EC829.20605@...741...> Hi Julio, Thank you very much for the two source projects. I will use them as my reference point. My objective is to explore the possibility of allowing a user to make a SuperToggleButton control without writing a single line of code. I run two instances of gambas3 (not simultaneously of course). One is the unchanged Gambas3-3.5.4 executable and the other I run from source. I open the source version with the executable when I want to debug/explore what the IDE is up to and to try out various things. Can the SuperToggleButton folder be placed somewhere within the Gambas3 source so that is automatically picked up by the IDE when it is started and thus be seen as a control in the ToolBox of new projects ? John From jusabejusabe at ...176... Tue Sep 9 11:54:33 2014 From: jusabejusabe at ...176... (Julio Sanchez) Date: Tue, 9 Sep 2014 11:54:33 +0200 Subject: [Gambas-devel] Creating a Control In-Reply-To: <540EC829.20605@...741...> References: <540C77D0.1010404@...741...> <540D9494.8050305@...741...> <20140908123445.GA889@...693...> <540DB59B.7000006@...741...> <540DB9AD.3080904@...741...> <540DBECC.3010103@...1...> <540DD20C.9030104@...741...> <540E204D.9090701@...741...> <540EC829.20605@...741...> Message-ID: I do not know John. What I do is install the deb of the new component, as you saw in the video, so it is integrated into the ide of gambas3 smoothly. 2014-09-09 11:28 GMT+02:00 John Leake : > Hi Julio, > > Thank you very much for the two source projects. I will use them as my > reference point. My objective is to explore the possibility of allowing > a user to make a SuperToggleButton control without writing a single line > of code. > > I run two instances of gambas3 (not simultaneously of course). One is > the unchanged Gambas3-3.5.4 executable and the other I run from source. > I open the source version with the executable when I want to > debug/explore what the IDE is up to and to try out various things. > > Can the SuperToggleButton folder be placed somewhere within the Gambas3 > source so that is automatically picked up by the IDE when it is started > and thus be seen as a control in the ToolBox of new projects ? > > John > > > ------------------------------------------------------------------------------ > Want excitement? > Manually upgrade your production database. > When you want reliability, choose Perforce. > Perforce version control. Predictably reliable. > > http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk > _______________________________________________ > Gambas-devel mailing list > Gambas-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jleake at ...741... Tue Sep 9 11:59:50 2014 From: jleake at ...741... (John Leake) Date: Tue, 09 Sep 2014 10:59:50 +0100 Subject: [Gambas-devel] Creating a Control In-Reply-To: References: <540C77D0.1010404@...741...> <540D9494.8050305@...741...> <20140908123445.GA889@...693...> <540DB59B.7000006@...741...> <540DB9AD.3080904@...741...> <540DBECC.3010103@...1...> <540DD20C.9030104@...741...> <540E204D.9090701@...741...> <540EC829.20605@...741...> Message-ID: <540ECF96.7010905@...741...> Do you know what is actually happening when the deb is installed ? i.e. is there a compilation step and the installation of an executable. > What I do is install the deb of the new component, as you saw in the > video, so it is integrated into the ide of gambas3 smoothly. From jusabejusabe at ...176... Tue Sep 9 12:12:23 2014 From: jusabejusabe at ...176... (Julio Sanchez) Date: Tue, 9 Sep 2014 12:12:23 +0200 Subject: [Gambas-devel] Creating a Control In-Reply-To: <540ECF96.7010905@...741...> References: <540C77D0.1010404@...741...> <540D9494.8050305@...741...> <20140908123445.GA889@...693...> <540DB59B.7000006@...741...> <540DB9AD.3080904@...741...> <540DBECC.3010103@...1...> <540DD20C.9030104@...741...> <540E204D.9090701@...741...> <540EC829.20605@...741...> <540ECF96.7010905@...741...> Message-ID: No, I guess during installation, component files are placed in a "common" folder to components. When starting the ide check that folder, and adds it to the list of available components. Almost certainly there is no compilation or ide or control .. Surely, seeing the source code of the IDE, you can see that folder checked. Surely Benoit can give more information on this topic 2014-09-09 11:59 GMT+02:00 John Leake : > Do you know what is actually happening when the deb is installed ? > i.e. is there a compilation step and the installation of an executable. > > > What I do is install the deb of the new component, as you saw in the > > video, so it is integrated into the ide of gambas3 smoothly. > > > ------------------------------------------------------------------------------ > Want excitement? > Manually upgrade your production database. > When you want reliability, choose Perforce. > Perforce version control. Predictably reliable. > > http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk > _______________________________________________ > Gambas-devel mailing list > Gambas-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jleake at ...741... Tue Sep 9 12:14:08 2014 From: jleake at ...741... (John Leake) Date: Tue, 09 Sep 2014 11:14:08 +0100 Subject: [Gambas-devel] Creating a Control In-Reply-To: References: <540C77D0.1010404@...741...> <540D9494.8050305@...741...> <20140908123445.GA889@...693...> <540DB59B.7000006@...741...> <540DB9AD.3080904@...741...> <540DBECC.3010103@...1...> <540DD20C.9030104@...741...> <540E204D.9090701@...741...> <540EC829.20605@...741...> <540ECF96.7010905@...741...> Message-ID: <540ED2F0.2050204@...741...> Thank you. From Karl.Reinl at ...646... Tue Sep 9 14:07:17 2014 From: Karl.Reinl at ...646... (Charlie Reinl) Date: Tue, 09 Sep 2014 14:07:17 +0200 Subject: [Gambas-devel] Creating a Control In-Reply-To: <540ED2F0.2050204@...741...> References: <540C77D0.1010404@...741...> <540D9494.8050305@...741...> <20140908123445.GA889@...693...> <540DB59B.7000006@...741...> <540DB9AD.3080904@...741...> <540DBECC.3010103@...1...> <540DD20C.9030104@...741...> <540E204D.9090701@...741...> <540EC829.20605@...741...> <540ECF96.7010905@...741...> <540ED2F0.2050204@...741...> Message-ID: <1410264437.3654.5.camel@...102...> Am Dienstag, den 09.09.2014, 11:14 +0100 schrieb John Leake: > Thank you. > Salut John, maybe, that can help you. This project can install components, libraries, using links or copy files. I wrote that, because I use svn only, so I can't install gambas packages, claims gambas is not installed. For me it worked. -- Amicalement Charlie -------------- next part -------------- A non-text attachment was scrubbed... Name: instGA3-0.0.19.tar.gz Type: application/x-compressed-tar Size: 12615 bytes Desc: not available URL: From taboege at ...176... Tue Sep 9 15:18:51 2014 From: taboege at ...176... (Tobias Boege) Date: Tue, 9 Sep 2014 15:18:51 +0200 Subject: [Gambas-devel] Add a Delete event to DataBrowser? Message-ID: <20140909131851.GD994@...693...> Hi Benoit, couldn't it be useful sometimes to intercept clicks on the "Delete" button in a DataBrowser and be able to Stop Event the deletion? Attached is a patch which accomplishes this. I don't commit yet to ask what you think about it and if you immediately see something wrong with it. The database controls are so woven into each other that I, with my limited experience with them, fear to miss something. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk -------------- next part -------------- A non-text attachment was scrubbed... Name: DataBrowser-Delete-event.patch Type: text/x-diff Size: 1498 bytes Desc: not available URL: From gambas at ...1... Tue Sep 9 16:09:39 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Tue, 09 Sep 2014 16:09:39 +0200 Subject: [Gambas-devel] Add a Delete event to DataBrowser? In-Reply-To: <20140909131851.GD994@...693...> References: <20140909131851.GD994@...693...> Message-ID: <540F0A23.5020201@...1...> Le 09/09/2014 15:18, Tobias Boege a ?crit : > Hi Benoit, > > couldn't it be useful sometimes to intercept clicks on the "Delete" button > in a DataBrowser and be able to Stop Event the deletion? > > Attached is a patch which accomplishes this. I don't commit yet to ask what > you think about it and if you immediately see something wrong with it. The > database controls are so woven into each other that I, with my limited > experience with them, fear to miss something. > > Regards, > Tobi > To keep the component logic, it must be a "BeforeDelete" event in the DataSource control. I will do it. -- Beno?t Minisini From jleake at ...741... Tue Sep 9 16:18:45 2014 From: jleake at ...741... (John Leake) Date: Tue, 09 Sep 2014 15:18:45 +0100 Subject: [Gambas-devel] Creating a Control In-Reply-To: <1410264437.3654.5.camel@...102...> References: <540C77D0.1010404@...741...> <540D9494.8050305@...741...> <20140908123445.GA889@...693...> <540DB59B.7000006@...741...> <540DB9AD.3080904@...741...> <540DBECC.3010103@...1...> <540DD20C.9030104@...741...> <540E204D.9090701@...741...> <540EC829.20605@...741...> <540ECF96.7010905@...741...> <540ED2F0.2050204@...741...> <1410264437.3654.5.camel@...102...> Message-ID: <540F0C45.6070903@...741...> Hi Charlie, Thank you for the reply. I am sorry but I do not understand the context of your response. > maybe, that can help you. Sorry what can help me ? > This project can install components, libraries, using links or copy > files. Do you mean the deb file ? > I wrote that, because I use svn only, so I can't install gambas > packages, claims gambas is not installed. Sorry what did you write ? > For me it worked. Sorry again, what exactly worked ? An Explanation of What I am trying to do ---------------------------------------- First of all this thread has wandered a little so I will try to clarify for the benefit of all those interested. Initially I was struggling to find out how to create controls by following the documentation (from a complete Gambas newbie point of view). My intention is to improve the user experience when creating Controls. These are my own ideas and in no way are they criticisms of the existing architecture. If I am successful in my aims you can all be assured that I will make it my highest priority to minimise if not eliminate any changes to the existing code base. So to elaborate: If a user wishes to create a new type of control then it is highly likely that the control will be based on existing controls. So as an example, if the new control contains a ToggleButton and the way that ToggleButton is used in the new control is no different from the original stock ToggleButton then the user should not be required to write any code to implement the ToggleButton. If this idea is extrapolated to its simplest form then a user should be able to create a new ToggleButton by informing the IDE that this is a new control and that the control is based on the stock ToggleButton and that is all that needs to be done. After all what is the point of inheritance if you have to add code just to get back the functionality that was already there in the first place. To achieve this goal I needed a new unadulterated toggle button project to be used as my gold standard that has been written by someone who knows what they are doing (thank you to Julio for this). From there I can write a new set of IDE dialogs (just in order to avoid messing with the existing code base) that will spit out a project that is exactly like my gold standard project. And that is it ! Best regards, John Leake From gambas at ...1... Tue Sep 9 17:21:34 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Tue, 09 Sep 2014 17:21:34 +0200 Subject: [Gambas-devel] Add a Delete event to DataBrowser? In-Reply-To: <540F0A23.5020201@...1...> References: <20140909131851.GD994@...693...> <540F0A23.5020201@...1...> Message-ID: <540F1AFE.3080703@...1...> Le 09/09/2014 16:09, Beno?t Minisini a ?crit : > Le 09/09/2014 15:18, Tobias Boege a ?crit : >> Hi Benoit, >> >> couldn't it be useful sometimes to intercept clicks on the "Delete" >> button >> in a DataBrowser and be able to Stop Event the deletion? >> >> Attached is a patch which accomplishes this. I don't commit yet to ask >> what >> you think about it and if you immediately see something wrong with it. >> The >> database controls are so woven into each other that I, with my limited >> experience with them, fear to miss something. >> >> Regards, >> Tobi >> > > To keep the component logic, it must be a "BeforeDelete" event in the > DataSource control. I will do it. > Done in revision #6463. Regards, -- Beno?t Minisini From taboege at ...176... Tue Sep 9 17:21:30 2014 From: taboege at ...176... (Tobias Boege) Date: Tue, 9 Sep 2014 17:21:30 +0200 Subject: [Gambas-devel] Add a Delete event to DataBrowser? In-Reply-To: <540F1AFE.3080703@...1...> References: <20140909131851.GD994@...693...> <540F0A23.5020201@...1...> <540F1AFE.3080703@...1...> Message-ID: <20140909152130.GE994@...693...> On Tue, 09 Sep 2014, Beno?t Minisini wrote: > Le 09/09/2014 16:09, Beno?t Minisini a ?crit : > > Le 09/09/2014 15:18, Tobias Boege a ?crit : > >> Hi Benoit, > >> > >> couldn't it be useful sometimes to intercept clicks on the "Delete" > >> button > >> in a DataBrowser and be able to Stop Event the deletion? > >> > >> Attached is a patch which accomplishes this. I don't commit yet to ask > >> what > >> you think about it and if you immediately see something wrong with it. > >> The > >> database controls are so woven into each other that I, with my limited > >> experience with them, fear to miss something. > >> > >> Regards, > >> Tobi > >> > > > > To keep the component logic, it must be a "BeforeDelete" event in the > > DataSource control. I will do it. > > > > Done in revision #6463. > Thanks. -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From Karl.Reinl at ...646... Tue Sep 9 19:08:03 2014 From: Karl.Reinl at ...646... (Charlie Reinl) Date: Tue, 09 Sep 2014 19:08:03 +0200 Subject: [Gambas-devel] Creating a Control In-Reply-To: <540F0C45.6070903@...741...> References: <540C77D0.1010404@...741...> <540D9494.8050305@...741...> <20140908123445.GA889@...693...> <540DB59B.7000006@...741...> <540DB9AD.3080904@...741...> <540DBECC.3010103@...1...> <540DD20C.9030104@...741...> <540E204D.9090701@...741...> <540EC829.20605@...741...> <540ECF96.7010905@...741...> <540ED2F0.2050204@...741...> <1410264437.3654.5.camel@...102...> <540F0C45.6070903@...741...> Message-ID: <1410282483.4574.38.camel@...102...> Salut John, Am Dienstag, den 09.09.2014, 15:18 +0100 schrieb John Leake: > Hi Charlie, > > Thank you for the reply. I am sorry but I do not understand the context > of your response. you talked with Julio about component installation, places where the IDE finds components, putting your parts into the IDE directory didn't you. > > maybe, that can help you. > > Sorry what can help me ? Find the directories concerned, the files needed. > > > This project can install components, libraries, using links or copy > > files. > > Do you mean the deb file ? No, the base of that project is the gambas3 project directory. > > > I wrote that, because I use svn only, so I can't install gambas > > packages, claims gambas is not installed. > > Sorry what did you write ? > The project, that was attached, wasn't it? long Version:I wrote that Installer, because I use for gambas3, svn only, so I can't install gambas3 packages (like .deb), the deb-installer claims, that gambas3 is not installed (and stops). > > For me it worked. > > Sorry again, what exactly worked ? my project, the Installer > > An Explanation of What I am trying to do > ---------------------------------------- > First of all this thread has wandered a little so I will try to clarify > for the benefit of all those interested. Initially I was struggling to > find out how to create controls by following the documentation (from a > complete Gambas newbie point of view). > > My intention is to improve the user experience when creating Controls. > These are my own ideas and in no way are they criticisms of the existing > architecture. If I am successful in my aims you can all be assured that > I will make it my highest priority to minimise if not eliminate any > changes to the existing code base. > > So to elaborate: If a user wishes to create a new type of control then > it is highly likely that the control will be based on existing controls. > So as an example, if the new control contains a ToggleButton and the > way that ToggleButton is used in the new control is no different from > the original stock ToggleButton then the user should not be required to > write any code to implement the ToggleButton. > > If this idea is extrapolated to its simplest form then a user should be > able to create a new ToggleButton by informing the IDE that this is a > new control and that the control is based on the stock ToggleButton and > that is all that needs to be done. After all what is the point of > inheritance if you have to add code just to get back the functionality > that was already there in the first place. > > To achieve this goal I needed a new unadulterated toggle button project > to be used as my gold standard that has been written by someone who > knows what they are doing (thank you to Julio for this). From there I > can write a new set of IDE dialogs (just in order to avoid messing with > the existing code base) that will spit out a project that is exactly > like my gold standard project. > > And that is it ! > > Best regards, > John Leake > -- Amicalement Charlie From jleake at ...741... Tue Sep 9 20:59:43 2014 From: jleake at ...741... (John Leake) Date: Tue, 09 Sep 2014 19:59:43 +0100 Subject: [Gambas-devel] Creating a Control In-Reply-To: <1410264437.3654.5.camel@...102...> References: <540C77D0.1010404@...741...> <540D9494.8050305@...741...> <20140908123445.GA889@...693...> <540DB59B.7000006@...741...> <540DB9AD.3080904@...741...> <540DBECC.3010103@...1...> <540DD20C.9030104@...741...> <540E204D.9090701@...741...> <540EC829.20605@...741...> <540ECF96.7010905@...741...> <540ED2F0.2050204@...741...> <1410264437.3654.5.camel@...102...> Message-ID: <540F4E1F.5030501@...741...> Hi Charlie, Thank you very much. I am really sorry about my misunderstanding, I was very tired when I read your email and did not see the attachment so had no idea what you were talking about. The project is just what I was looking for. May I ask what OS you use for your gambas development ? John From Karl.Reinl at ...646... Tue Sep 9 22:45:36 2014 From: Karl.Reinl at ...646... (Charlie Reinl) Date: Tue, 09 Sep 2014 22:45:36 +0200 Subject: [Gambas-devel] Creating a Control In-Reply-To: <540F4E1F.5030501@...741...> References: <540C77D0.1010404@...741...> <540D9494.8050305@...741...> <20140908123445.GA889@...693...> <540DB59B.7000006@...741...> <540DB9AD.3080904@...741...> <540DBECC.3010103@...1...> <540DD20C.9030104@...741...> <540E204D.9090701@...741...> <540EC829.20605@...741...> <540ECF96.7010905@...741...> <540ED2F0.2050204@...741...> <1410264437.3654.5.camel@...102...> <540F4E1F.5030501@...741...> Message-ID: <1410295536.4574.51.camel@...102...> Am Dienstag, den 09.09.2014, 19:59 +0100 schrieb John Leake: > Hi Charlie, > > Thank you very much. I am really sorry about my misunderstanding, I > was very tired when I read your email and did not see the attachment so > had no idea what you were talking about. > > The project is just what I was looking for. May I ask what OS you use > for your gambas development ? > > John Salut John, yes, sure you did! Mainly : a mix of lubuntu (due to problems with Intel-Graphics on 08.04), ubuntu, based on Ubuntu 06.06 and since LTS updated on that branch. But I use also virtual xubuntu, debian, suse, mint also with kde and/or gnome for testing. -- Amicalement Charlie From taboege at ...176... Tue Sep 9 23:15:19 2014 From: taboege at ...176... (Tobias Boege) Date: Tue, 9 Sep 2014 23:15:19 +0200 Subject: [Gambas-devel] Creating a Control In-Reply-To: <540F0C45.6070903@...741...> References: <540E204D.9090701@...741...> <540EC829.20605@...741...> <540ECF96.7010905@...741...> <540ED2F0.2050204@...741...> <1410264437.3654.5.camel@...102...> <540F0C45.6070903@...741...> Message-ID: <20140909211519.GI994@...693...> On Tue, 09 Sep 2014, John Leake wrote: > So to elaborate: If a user wishes to create a new type of control then > it is highly likely that the control will be based on existing controls. > So as an example, if the new control contains a ToggleButton and the > way that ToggleButton is used in the new control is no different from > the original stock ToggleButton then the user should not be required to > write any code to implement the ToggleButton. > I can't imagine what you are trying to do. It sounds like you want to take a class A and derive another class A' from it -- but so that A = A' ("=" means equality of code). The way to go here would be: just use A. No coding effort needed then. (See, optimising this task seems pointless because nobody ever does it.) BUT, what you *may* want to do is to compose a new control out of existing ones, one of which is of class A. This we would call (at least I do it) a "compound control". (If that's not your goal you might still want to remember this for later.) You can't do that without some coding because most likely you write such a thing for a purpose (so that it does something special, which, in turn, you must code) -- but it's a task that is actually kinda fun (!) in Gambas. There is a small compound control of mine which I could rip out of its project for you to see: it is a smaller version of the ColorChooser from gb.form with discrete colour steps. (I needed a dialog-less, visual and not-so-fine-grained way to pick some colours out of little space on a Form, so the MinimalColorChooser was born.) The general strategy to create a compound control whose name shall be A, is the following: 1. Create a form named F##A (you know the C preprocessor's token paste operator, right?), 2. Arrange the controls you want A to be made of on the form (the good thing is that you can design this by using the IDE's Form editor), 3. Wire the controls' actions together in the Form's class file, 4. Create properties, methods and events for your purpose in F##A, 5. Create your actual class A which is Export'd and Inherits UserControl. You create an instance of F##A on yourself in the constructor of that class (since you inherit UserControl, you can create controls on your own surface and a Form can be created as a container on a window, too, not only as a top-level window), 6. Expose the needed parts of F##A's interface to public through the interface of your exported class A, 7. Do the IDE integration stuff, i.e. draw an icon and set the public constants which govern IDE integration, in A. That's at least what I do and just did to create the attached project. The relevant parts are in the directory MinimalColorChooser. I think it's normal if it takes you a while to get to grips with it as I consider custom control creation an advanced topic. But it's beautiful to do with Gambas. If you have any questions, don't hesitate! [ You *will* also want to explore the automatic layouting capabilities of Gambas, if you don't already have experience with it from other languages. You will see that the FMain in my project is full of containers like HBox and VBox. These arrange their children in special ways. The key properties to look at here are: Arrangement, Expand, Margin, Spacing and sometimes AutoResize. Take a weekend or so off (judging from my own experience) to experiment with these and how a wrong setting can mess up everything :-) To get motivated: arrange some controls on a Form, run your project and resize the Form -- not very pretty. Now resize the window in my project. ] > If this idea is extrapolated to its simplest form then a user should be > able to create a new ToggleButton by informing the IDE that this is a > new control and that the control is based on the stock ToggleButton and > that is all that needs to be done. After all what is the point of > inheritance if you have to add code just to get back the functionality > that was already there in the first place. Note that you are talking about IDE integration here (right?). You can write --8<--[ MyToggleButton.class ]---------------------------------------------- ' Gambas class file Inherits ToggleButton --8<------------------------------------------------------------------------ and the interpreter will be happy and everything will be there. Integrating a control into the IDE requires some more things. I don't see yet why it is so important to make it require even less effort. Maybe you've got real world experience here [ heck, you've worked longer as a developer than I am alive :-) ], but I deem custom controls to be a thing which newbies should stay away from. Regards, Tobi PS: I insist on keeping gambas-user CC'd :-P -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk -------------- next part -------------- A non-text attachment was scrubbed... Name: MinimalColorChooser-0.0.1.tar.gz Type: application/octet-stream Size: 6345 bytes Desc: not available URL: From Karl.Reinl at ...646... Wed Sep 10 11:18:43 2014 From: Karl.Reinl at ...646... (Charlie Reinl) Date: Wed, 10 Sep 2014 11:18:43 +0200 Subject: [Gambas-devel] Creating a Control In-Reply-To: <540F4E1F.5030501@...741...> References: <540C77D0.1010404@...741...> <540D9494.8050305@...741...> <20140908123445.GA889@...693...> <540DB59B.7000006@...741...> <540DB9AD.3080904@...741...> <540DBECC.3010103@...1...> <540DD20C.9030104@...741...> <540E204D.9090701@...741...> <540EC829.20605@...741...> <540ECF96.7010905@...741...> <540ED2F0.2050204@...741...> <1410264437.3654.5.camel@...102...> <540F4E1F.5030501@...741...> Message-ID: <1410340723.3499.7.camel@...102...> Am Dienstag, den 09.09.2014, 19:59 +0100 schrieb John Leake: > Hi Charlie, > > Thank you very much. I am really sorry about my misunderstanding, I > was very tired when I read your email and did not see the attachment so > had no idea what you were talking about. > > The project is just what I was looking for. May I ask what OS you use > for your gambas development ? > > John > Salut John, here is a new version of instGA3, because at least for the svn version, the path to the executable for libraries, is no more stored in the .project file, but in .settings. For 3.5.4 I do not know. Your question about my OS, I'v not yet updated to 10.04.1 LTS because of an nVidia problem. -- Amicalement Charlie -------------- next part -------------- A non-text attachment was scrubbed... Name: instGA3-0.0.20.tar.gz Type: application/x-compressed-tar Size: 12414 bytes Desc: not available URL: From jleake at ...741... Wed Sep 10 11:41:40 2014 From: jleake at ...741... (John Leake) Date: Wed, 10 Sep 2014 10:41:40 +0100 Subject: [Gambas-devel] Creating a Control In-Reply-To: <20140909211519.GI994@...693...> References: <540E204D.9090701@...741...> <540EC829.20605@...741...> <540ECF96.7010905@...741...> <540ED2F0.2050204@...741...> <1410264437.3654.5.camel@...102...> <540F0C45.6070903@...741...> <20140909211519.GI994@...693...> Message-ID: <54101CD4.5090403@...741...> Hi Tobias, Thank you for your response. I am simply trying to improve the user experience while I can still see things from a newbies perspective. Not all users find writing code fun. Many have a problem to solve or wish to make boring or time consuming actions less so. Surely the Gambas community want to expand their user base ! > 1. Create a form named F##A (you know the C preprocessor's token paste > operator, right?), > 2. Arrange the controls you want A to be made of on the form (the good > thing is that you can design this by using the IDE's Form editor), > 3. Wire the controls' actions together in the Form's class file, > 4. Create properties, methods and events for your purpose in F##A, > 5. Create your actual class A which is Export'd and Inherits UserControl. > You create an instance of F##A on yourself in the constructor of that > class (since you inherit UserControl, you can create controls on your > own surface and a Form can be created as a container on a window, too, > not only as a top-level window), > 6. Expose the needed parts of F##A's interface to public through the > interface of your exported class A, > 7. Do the IDE integration stuff, i.e. draw an icon and set the public > constants which govern IDE integration, in A. > Wouldn't the following be more preferable (from a users perspective) ? 1) Create a new 'control project'. 2) Drop a ToggleButton into it. 3) When tested, click 'publish' to add the control to Gambas toolbox. > I think it's normal > if it takes you a while to get to grips with it as I consider custom control > creation an advanced topic. Not all users are programmers. When you use a system for the first time the process should be intuitive and just work with minimal effort. Newbies are like children, they learn best by trying things out and following the visual clues that they are presented with and look at the results. Kind of like a picture makes a thousand words. > But it's beautiful to do with Gambas. I agree. My intention is to improve the newbie experience. > If you have any questions, don't hesitate! Thank you. > > [ You *will* also want to explore the automatic layouting capabilities of > Gambas, if you don't already have experience with it from other languages. > You will see that the FMain in my project is full of containers like HBox > and VBox. These arrange their children in special ways. The key properties > to look at here are: Arrangement, Expand, Margin, Spacing and sometimes > AutoResize. Take a weekend or so off (judging from my own experience) to > experiment with these and how a wrong setting can mess up everything :-) > > To get motivated: arrange some controls on a Form, run your project and > resize the Form -- not very pretty. Now resize the window in my project. ] > This complicated area also needs to be looked at. Ever checked out 'slots' an 'stacks' written by Why ? What about the default behaviour wouldn't it be much better if it behaved like 'CodeFlower' ? This is another thing I would like to introduce. My experience as a software engineer has spanned hardware and software design in the field of real-time embedded systems, right through to large scale business systems consisting of in excess of 12,000 source files and 25+ developers. The more sophisticated dev envs automatically generated docs, tests, diagrams, performance profiles and god knows what else. They also cost ?50k / seat and were useless when put in front of a newbie. Things need not be like this. Again, I am just trying to give something back to the open source community and remove barriers for newbies. If I could not figure out from the documentation how to create a custom control then what chance do newbies have if they possess little or no experience at all ? > Note that you are talking about IDE integration here (right?). You can write > > --8<--[ MyToggleButton.class ]---------------------------------------------- > ' Gambas class file > > Inherits ToggleButton > --8<------------------------------------------------------------------------ > > and the interpreter will be happy and everything will be there. Integrating May be the documentation should reflect that. > I don't see yet why it is > so important to make it require even less effort. Maybe you've got real > world experience here [ heck, you've worked longer as a developer than I am > alive :-) ], but I deem custom controls to be a thing which newbies should > stay away from. Should they be excluded by technical jargon or have to read reams of documentation and learn strange (to them) concepts ? > PS: I insist on keeping gambas-user CC'd :-P Sorry what is this ? Best regards, John From jleake at ...741... Wed Sep 10 11:48:14 2014 From: jleake at ...741... (John Leake) Date: Wed, 10 Sep 2014 10:48:14 +0100 Subject: [Gambas-devel] Creating a Control In-Reply-To: <1410340723.3499.7.camel@...102...> References: <540C77D0.1010404@...741...> <540D9494.8050305@...741...> <20140908123445.GA889@...693...> <540DB59B.7000006@...741...> <540DB9AD.3080904@...741...> <540DBECC.3010103@...1...> <540DD20C.9030104@...741...> <540E204D.9090701@...741...> <540EC829.20605@...741...> <540ECF96.7010905@...741...> <540ED2F0.2050204@...741...> <1410264437.3654.5.camel@...102...> <540F4E1F.5030501@...741...> <1410340723.3499.7.camel@...102...> Message-ID: <54101E5E.1030909@...741...> > > here is a new version of instGA3, because at least for the svn version, > the path to the executable for libraries, is no more stored in > the .project file, but in .settings. For 3.5.4 I do not know. > Thank you. Are these things documented anywhere ? I have found BackBox OK on i5 CPU (Ubuntu 12.04 64bit). From Karl.Reinl at ...646... Wed Sep 10 12:15:17 2014 From: Karl.Reinl at ...646... (Charlie Reinl) Date: Wed, 10 Sep 2014 12:15:17 +0200 Subject: [Gambas-devel] Creating a Control In-Reply-To: <54101E5E.1030909@...741...> References: <540C77D0.1010404@...741...> <540D9494.8050305@...741...> <20140908123445.GA889@...693...> <540DB59B.7000006@...741...> <540DB9AD.3080904@...741...> <540DBECC.3010103@...1...> <540DD20C.9030104@...741...> <540E204D.9090701@...741...> <540EC829.20605@...741...> <540ECF96.7010905@...741...> <540ED2F0.2050204@...741...> <1410264437.3654.5.camel@...102...> <540F4E1F.5030501@...741...> <1410340723.3499.7.camel@...102...> <54101E5E.1030909@...741...> Message-ID: <1410344117.3499.16.camel@...102...> Am Mittwoch, den 10.09.2014, 10:48 +0100 schrieb John Leake: > > > > here is a new version of instGA3, because at least for the svn version, > > the path to the executable for libraries, is no more stored in > > the .project file, but in .settings. For 3.5.4 I do not know. > > > Thank you. Are these things documented anywhere ? > > I have found BackBox OK on i5 CPU (Ubuntu 12.04 64bit). > Salut John, for the changed storing, no, but I don't know, I just found the project do no more work as expected. If you ask for the used directories, files and file names, that is partly documented and took out of the IDE. Do you have a 3.5.4 version installed? If yes, are the path to the executable for libraries still stored in .project? -- Amicalement Charlie From taboege at ...176... Wed Sep 10 12:19:01 2014 From: taboege at ...176... (Tobias Boege) Date: Wed, 10 Sep 2014 12:19:01 +0200 Subject: [Gambas-devel] Creating a Control In-Reply-To: <54101E5E.1030909@...741...> References: <540EC829.20605@...741...> <540ECF96.7010905@...741...> <540ED2F0.2050204@...741...> <1410264437.3654.5.camel@...102...> <540F4E1F.5030501@...741...> <1410340723.3499.7.camel@...102...> <54101E5E.1030909@...741...> Message-ID: <20140910101901.GA1118@...693...> On Wed, 10 Sep 2014, John Leake wrote: > > > > here is a new version of instGA3, because at least for the svn version, > > the path to the executable for libraries, is no more stored in > > the .project file, but in .settings. For 3.5.4 I do not know. > > > Thank you. Are these things documented anywhere ? > No, he's talking about revision #6289 (2014-05-26 22:58:05) which is still "brand-new" because since then only a bugfix version (3.5.4) was released which apparently didn't contain that commit. (Normally, bugfix releases only bring bugfixes, but you can't be completely sure that it doesn't bring some easy and/or strongly needed new features from the development branch.) You can find release notes for each version in the wiki [0]. Alas, documentation of new things is rare in general and sometimes old documentation is not up to date [ my components are no exceptions from this, but instead classic examples, most of the time ]. For a Gambas developer, the commit logs are the documentation (if you are subscribed to gambas-devel, you should automatically receive commit logs via gambas-devel-svn when someone does a commit). I can't say how many questions I answered from things I learned from the commit logs only. About the project directory structure which was affected by the change Charlie mentioned: there is a document here [1]. Regards, Tobi [0] http://gambaswiki.org/wiki/doc/release [1] http://gambaswiki.org/wiki/doc/project_structure -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From taboege at ...176... Wed Sep 10 13:25:30 2014 From: taboege at ...176... (Tobias Boege) Date: Wed, 10 Sep 2014 13:25:30 +0200 Subject: [Gambas-devel] Creating a Control In-Reply-To: <54101CD4.5090403@...741...> References: <540EC829.20605@...741...> <540ECF96.7010905@...741...> <540ED2F0.2050204@...741...> <1410264437.3654.5.camel@...102...> <540F0C45.6070903@...741...> <20140909211519.GI994@...693...> <54101CD4.5090403@...741...> Message-ID: <20140910112530.GB1118@...693...> On Wed, 10 Sep 2014, John Leake wrote: > Hi Tobias, > > Thank you for your response. > > I am simply trying to improve the user experience while I can still see > things from a newbies perspective. > > Not all users find writing code fun. Many have a problem to solve or > wish to make boring or time consuming actions less so. > > Surely the Gambas community want to expand their user base ! > Yes! OK, I'll stop arguing about it. It's a noble objective and we can discuss things when there is an actual manifestation of it. > [ big 8< ] > > Note that you are talking about IDE integration here (right?). You can write > > > > --8<--[ MyToggleButton.class ]---------------------------------------------- > > ' Gambas class file > > > > Inherits ToggleButton > > --8<------------------------------------------------------------------------ > > > > and the interpreter will be happy and everything will be there. Integrating > > May be the documentation should reflect that. > > > I don't see yet why it is > > so important to make it require even less effort. Maybe you've got real > > world experience here [ heck, you've worked longer as a developer than I am > > > alive :-) ], but I deem custom controls to be a thing which newbies should > > stay away from. > > Should they be excluded by technical jargon or have to read reams of > documentation and learn strange (to them) concepts ? > Maybe we hit a mentality border here. Gambas was my first programming language and I taught the basics myself in a few months (by looking at the examples only and spending way too much time at the computer; I didn't know what forums and mailing lists _were_ back then). I believe a newbie should take time to explore things themselves and make lots of errors. The frustration one experiences helps to remember important points ;-) -- that's at least what served me well enough and I always found the fruits to be rewarding. With time comes a good understanding of how the Gambas system "thinks" about your code and you can understand more advanced topics with great ease. I have programmed quite some time in Gambas without knowing about custom controls. But when I first needed to make one, I just did it. With the experience I had, it fell into shape naturally. As a Mathematics student, I like the analogy to... Mathematics: if you're a normal person, you _need_ to go through vast amounts of exercises to get a feeling for your objects and ideas. So technically, yes, I want people to work hard and know Gambas before they go to custom controls because if they do, they are probably already fit enough to do it by themselves. You must understand: That's the way I went and since I'm content with it, my reflex is to try to impose it on others. But OTOH, I realise that not everyone likes to go through this process -- let alone have time to do so -- just to learn a programming language so your attempts are very appreciated. Whatever helps people, right? > > PS: I insist on keeping gambas-user CC'd :-P > > Sorry what is this ? > I already talked about it. It's a mailing list dedicated to questions about programming *in* Gambas. Things like how to integrate controls into the IDE, make custom controls, feature requests and everything that has to do with writing code in Gambas, as opposed to gambas-devel (which we're currently at) which is for questions related to contributions/internals and programming *for* Gambas (mostly in C/C++). I keep CC'ing them because I think this discussion is relevant to that list mostly. Also the people there are _the_ users of the IDE and may have opinions/suggestions. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From jleake at ...741... Wed Sep 10 13:28:59 2014 From: jleake at ...741... (John Leake) Date: Wed, 10 Sep 2014 12:28:59 +0100 Subject: [Gambas-devel] Creating a Control In-Reply-To: <1410344117.3499.16.camel@...102...> References: <540C77D0.1010404@...741...> <540D9494.8050305@...741...> <20140908123445.GA889@...693...> <540DB59B.7000006@...741...> <540DB9AD.3080904@...741...> <540DBECC.3010103@...1...> <540DD20C.9030104@...741...> <540E204D.9090701@...741...> <540EC829.20605@...741...> <540ECF96.7010905@...741...> <540ED2F0.2050204@...741...> <1410264437.3654.5.camel@...102...> <540F4E1F.5030501@...741...> <1410340723.3499.7.camel@...102...> <54101E5E.1030909@...741...> <1410344117.3499.16.camel@...102...> Message-ID: <541035FB.7040207@...741...> > Do you have a 3.5.4 version installed? If yes, are the path to the > executable for libraries still stored in .project? Yes. No the paths to the exe are not in .project. From Karl.Reinl at ...646... Wed Sep 10 13:33:08 2014 From: Karl.Reinl at ...646... (Charlie Reinl) Date: Wed, 10 Sep 2014 13:33:08 +0200 Subject: [Gambas-devel] Creating a Control In-Reply-To: <541035FB.7040207@...741...> References: <540C77D0.1010404@...741...> <540D9494.8050305@...741...> <20140908123445.GA889@...693...> <540DB59B.7000006@...741...> <540DB9AD.3080904@...741...> <540DBECC.3010103@...1...> <540DD20C.9030104@...741...> <540E204D.9090701@...741...> <540EC829.20605@...741...> <540ECF96.7010905@...741...> <540ED2F0.2050204@...741...> <1410264437.3654.5.camel@...102...> <540F4E1F.5030501@...741...> <1410340723.3499.7.camel@...102...> <54101E5E.1030909@...741...> <1410344117.3499.16.camel@...102...> <541035FB.7040207@...741...> Message-ID: <1410348788.6336.1.camel@...102...> Am Mittwoch, den 10.09.2014, 12:28 +0100 schrieb John Leake: > > Do you have a 3.5.4 version installed? If yes, are the path to the > > executable for libraries still stored in .project? > Yes. No the paths to the exe are not in .project. > Thanks John, but I will make a version for both...coming soon (I hope) -- Charlie From jleake at ...741... Wed Sep 10 14:36:31 2014 From: jleake at ...741... (John Leake) Date: Wed, 10 Sep 2014 13:36:31 +0100 Subject: [Gambas-devel] Creating a Control In-Reply-To: <20140910112530.GB1118@...693...> References: <540EC829.20605@...741...> <540ECF96.7010905@...741...> <540ED2F0.2050204@...741...> <1410264437.3654.5.camel@...102...> <540F0C45.6070903@...741...> <20140909211519.GI994@...693...> <54101CD4.5090403@...741...> <20140910112530.GB1118@...693...> Message-ID: <541045CF.7080504@...741...> > I believe a newbie should take time to explore things themselves and make > lots of errors. The frustration one experiences helps to remember important > points ;-) -- that's at least what served me well enough and I always found > the fruits to be rewarding. This will exclude all those users that do not want to have to learn what maybe a new language to them, when all they wish to do is create a GUI program that does something and helps them in their problem domain. > With time comes a good understanding of how the Gambas system "thinks" about > your code and you can understand more advanced topics with great ease. Some newbie users do not care about how things are done internally. > like the analogy to... Mathematics: if you're a normal person, you _need_ to > go through vast amounts of exercises to get a feeling for your objects and > ideas. This is not Mathematics. Gambas is an IDE for writing programs that do stuff. > You must understand: That's the way I went and since I'm content with it, > my reflex is to try to impose it on others. Sorry if my comments sound like criticism. They are definitely not. And yes I understand I used to be like that. > just to learn a programming language so your attempts are very appreciated. Thank you. I just have a wider view of what could make up a user base. If you create a system that exposes technical details unnecessarily then you end up with a technically orientated user base. Everyone else will just run a mile. As some food for thought, take controlling form layout for example. I think there is plenty of scope for improvement in this area. The low level layout mechanisms in the graphics libraries (qt, GTK etc) are just that, i.e. 'low level'. With a little more abstraction the same results can be achieved whilst hiding the nasty details of their implementation. > I already talked about it. It's a mailing list dedicated to questions about > programming *in* Gambas. Sorry I did not see the connection. > make custom controls, feature requests and everything that has to do with > writing code in Gambas, as opposed to gambas-devel (which we're currently > at) which is for questions related to contributions/internals and programming > *for* Gambas (mostly in C/C++). I am hoping to improve the IDE and make it more accessible to a wider audience. I assumed the devel. mailing list was the correct place for me to get started. > I keep CC'ing them because I think this > discussion is relevant to that list mostly. Also the people there are _the_ > users of the IDE and may have opinions/suggestions. I don?t' really care where they end up but If I am in the wrong place then just tell me. As Gambas stands now I bet the majority of your users are all technical. But what about the future. Be brave and abstract your knowledge of the terribly complicated details (which are irrelevant to some people) and empower them with simple drag n drop. I must state again that I am not criticising I am just observing that the pretty good architecture of the IDE facilitates the creation of a much higher view that can be presented to the user. Best regards, John From jleake at ...741... Wed Sep 10 14:49:23 2014 From: jleake at ...741... (John Leake) Date: Wed, 10 Sep 2014 13:49:23 +0100 Subject: [Gambas-devel] Creating a Control In-Reply-To: <20140910101901.GA1118@...693...> References: <540EC829.20605@...741...> <540ECF96.7010905@...741...> <540ED2F0.2050204@...741...> <1410264437.3654.5.camel@...102...> <540F4E1F.5030501@...741...> <1410340723.3499.7.camel@...102...> <54101E5E.1030909@...741...> <20140910101901.GA1118@...693...> Message-ID: <541048D3.5070601@...741...> > but instead classic examples, most of the time ]. For a Gambas developer, > the commit logs are the documentation (if you are subscribed to gambas-devel, > you should automatically receive commit logs via gambas-devel-svn when > someone does a commit). I can't say how many questions I answered from > things I learned from the commit logs only. Hi Tobi, Unfortunately (or fortunately) I do not use SVN any more. I do not wish to rock the boat further but have you seen this video from 2009. https://www.youtube.com/watch?v=4XpnKHJAok8 Filter out the personality stuff and personal abuse and watch it to the end. He does not answer all the questions but he does answer all the important ones. Out of interest do you know what the overall conclusion was when Git was last discussed ? John From taboege at ...176... Wed Sep 10 15:08:39 2014 From: taboege at ...176... (Tobias Boege) Date: Wed, 10 Sep 2014 15:08:39 +0200 Subject: [Gambas-devel] Creating a Control In-Reply-To: <541048D3.5070601@...741...> References: <540ECF96.7010905@...741...> <540ED2F0.2050204@...741...> <1410264437.3654.5.camel@...102...> <540F4E1F.5030501@...741...> <1410340723.3499.7.camel@...102...> <54101E5E.1030909@...741...> <20140910101901.GA1118@...693...> <541048D3.5070601@...741...> Message-ID: <20140910130839.GC1118@...693...> On Wed, 10 Sep 2014, John Leake wrote: > > but instead classic examples, most of the time ]. For a Gambas developer, > > the commit logs are the documentation (if you are subscribed to gambas-devel, > > you should automatically receive commit logs via gambas-devel-svn when > > someone does a commit). I can't say how many questions I answered from > > things I learned from the commit logs only. > Hi Tobi, > > Unfortunately (or fortunately) I do not use SVN any more. I do not wish > to rock the boat further but have you seen this video from 2009. > > https://www.youtube.com/watch?v=4XpnKHJAok8 > > Filter out the personality stuff and personal abuse and watch it to the > end. He does not answer all the questions but he does answer all the > important ones. > Maybe I'll have time for that this evening. But if you want to make a single point only, please make it in short written form, as I'm preparing for an exam these days ;-) > Out of interest do you know what the overall conclusion was when Git was > last discussed ? > Yes, I was involved in that discussion. Let me dig the thread out for you: [0]. Seems it's time to ask again :-) Regards, Tobi [0] http://sourceforge.net/p/gambas/mailman/gambas-user/thread/503EBF73.6020003%40users.sourceforge.net/#msg29741178 -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From gambas.fr at ...176... Wed Sep 10 15:40:25 2014 From: gambas.fr at ...176... (Fabien Bodard) Date: Wed, 10 Sep 2014 15:40:25 +0200 Subject: [Gambas-devel] Creating a Control In-Reply-To: <20140910130839.GC1118@...693...> References: <540ECF96.7010905@...741...> <540ED2F0.2050204@...741...> <1410264437.3654.5.camel@...102...> <540F4E1F.5030501@...741...> <1410340723.3499.7.camel@...102...> <54101E5E.1030909@...741...> <20140910101901.GA1118@...693...> <541048D3.5070601@...741...> <20140910130839.GC1118@...693...> Message-ID: My two cents, Be carefull to not trying to automate every things too much... In some case it reduce the user individual imagination, and can make them less creative. They need to learn many things to know how to program. Note that i'm not against fun tools too... but learning is not easy ... there is no easy way to be good... and vb2 was not easy !! Fabien Bodard 2014-09-10 15:08 GMT+02:00 Tobias Boege : > On Wed, 10 Sep 2014, John Leake wrote: >> > but instead classic examples, most of the time ]. For a Gambas developer, >> > the commit logs are the documentation (if you are subscribed to gambas-devel, >> > you should automatically receive commit logs via gambas-devel-svn when >> > someone does a commit). I can't say how many questions I answered from >> > things I learned from the commit logs only. >> Hi Tobi, >> >> Unfortunately (or fortunately) I do not use SVN any more. I do not wish >> to rock the boat further but have you seen this video from 2009. >> >> https://www.youtube.com/watch?v=4XpnKHJAok8 >> >> Filter out the personality stuff and personal abuse and watch it to the >> end. He does not answer all the questions but he does answer all the >> important ones. >> > > Maybe I'll have time for that this evening. But if you want to make a single > point only, please make it in short written form, as I'm preparing for an > exam these days ;-) > >> Out of interest do you know what the overall conclusion was when Git was >> last discussed ? >> > > Yes, I was involved in that discussion. Let me dig the thread out for you: > [0]. Seems it's time to ask again :-) > > Regards, > Tobi > > [0] http://sourceforge.net/p/gambas/mailman/gambas-user/thread/503EBF73.6020003%40users.sourceforge.net/#msg29741178 > > -- > "There's an old saying: Don't change anything... ever!" -- Mr. Monk > > ------------------------------------------------------------------------------ > Want excitement? > Manually upgrade your production database. > When you want reliability, choose Perforce > Perforce version control. Predictably reliable. > http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk > _______________________________________________ > Gambas-devel mailing list > Gambas-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-devel -- Fabien Bodard From Karl.Reinl at ...646... Wed Sep 10 16:01:25 2014 From: Karl.Reinl at ...646... (Charlie Reinl) Date: Wed, 10 Sep 2014 16:01:25 +0200 Subject: [Gambas-devel] Question about .project ExecPath and .settings [Executable]/Path Message-ID: <1410357685.6336.13.camel@...102...> Salut Beno?t, first I thought it only concerns projects where type=Library, but now I think you changed that everywhere. The .project ExecPath moved to .settings [Executable]/Path, right? I ask you, because I didn't find anything about in svn commit logs. -- Amicalement Charlie From gambas at ...1... Wed Sep 10 16:26:11 2014 From: gambas at ...1... (=?UTF-8?B?QmVub8OudCBNaW5pc2luaQ==?=) Date: Wed, 10 Sep 2014 16:26:11 +0200 Subject: [Gambas-devel] Question about .project ExecPath and .settings [Executable]/Path In-Reply-To: <1410357685.6336.13.camel@...102...> References: <1410357685.6336.13.camel@...102...> Message-ID: <54105F83.3020708@...1...> Le 10/09/2014 16:01, Charlie Reinl a ?crit : > Salut Beno?t, > > first I thought it only concerns projects where type=Library, > but now I think you changed that everywhere. > The .project ExecPath moved to .settings [Executable]/Path, right? > > I ask you, because I didn't find anything about in svn commit logs. > Yes. But I don't remember the svn commit, must search... -- Beno?t Minisini From jleake at ...741... Wed Sep 10 16:47:28 2014 From: jleake at ...741... (John Leake) Date: Wed, 10 Sep 2014 15:47:28 +0100 Subject: [Gambas-devel] Creating a Control In-Reply-To: References: <540ECF96.7010905@...741...> <540ED2F0.2050204@...741...> <1410264437.3654.5.camel@...102...> <540F4E1F.5030501@...741...> <1410340723.3499.7.camel@...102...> <54101E5E.1030909@...741...> <20140910101901.GA1118@...693...> <541048D3.5070601@...741...> <20140910130839.GC1118@...693...> Message-ID: <54106480.3070505@...741...> > Be carefull to not trying to automate every things too much... In some > case it reduce the user individual imagination, and can make them > less creative. I will. > They need to learn many things to know how to program. Note that i'm > not against fun tools too... but learning is not easy ... there is no > easy way to be good... and vb2 was not easy !! Vb2 was crap but it was way ahead of the rest at the time. Vb3 solved some issues but from an architectural point of view it was also crap. Even vb6 was crap in many areas. The only reason vb6 was pulled was because it allowed developers to push the IDE and code productivity tools further than ever before and to avoid ActiveX licensing revenues. M$ needed a new vehicle to milk more money from and just look at the pile of rubbish they have created. We are very lucky that Gambas is open source. I will not impose any of my work on others. If the community want it they can have it. From jleake at ...741... Wed Sep 10 19:45:02 2014 From: jleake at ...741... (John Leake) Date: Wed, 10 Sep 2014 18:45:02 +0100 Subject: [Gambas-devel] Question about singleton class In-Reply-To: <54105F83.3020708@...1...> References: <1410357685.6336.13.camel@...102...> <54105F83.3020708@...1...> Message-ID: <54108E1E.3070307@...741...> Hi All, Is the Singleton Class thread safe ? John From taboege at ...176... Wed Sep 10 19:50:45 2014 From: taboege at ...176... (Tobias Boege) Date: Wed, 10 Sep 2014 19:50:45 +0200 Subject: [Gambas-devel] Question about singleton class In-Reply-To: <54108E1E.3070307@...741...> References: <1410357685.6336.13.camel@...102...> <54105F83.3020708@...1...> <54108E1E.3070307@...741...> Message-ID: <20140910175045.GD1118@...693...> On Wed, 10 Sep 2014, John Leake wrote: > Hi All, > Is the Singleton Class thread safe ? > John > There are no threads in Gambas (yet). -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From jleake at ...741... Wed Sep 10 20:05:55 2014 From: jleake at ...741... (John Leake) Date: Wed, 10 Sep 2014 19:05:55 +0100 Subject: [Gambas-devel] Question about singleton class In-Reply-To: <20140910175045.GD1118@...693...> References: <1410357685.6336.13.camel@...102...> <54105F83.3020708@...1...> <54108E1E.3070307@...741...> <20140910175045.GD1118@...693...> Message-ID: <54109303.6020800@...741...> > There are no threads in Gambas (yet). Does the singleton class implementation use a linux mutex ? From gambas at ...1... Wed Sep 10 20:21:56 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Wed, 10 Sep 2014 20:21:56 +0200 Subject: [Gambas-devel] Question about singleton class In-Reply-To: <54109303.6020800@...741...> References: <1410357685.6336.13.camel@...102...> <54105F83.3020708@...1...> <54108E1E.3070307@...741...> <20140910175045.GD1118@...693...> <54109303.6020800@...741...> Message-ID: <541096C4.8010605@...1...> Le 10/09/2014 20:05, John Leake a ?crit : >> There are no threads in Gambas (yet). > Does the singleton class implementation use a linux mutex ? > What for? The interpreter is not multi-threaded. -- Beno?t Minisini From jleake at ...741... Wed Sep 10 20:29:38 2014 From: jleake at ...741... (John Leake) Date: Wed, 10 Sep 2014 19:29:38 +0100 Subject: [Gambas-devel] Question about singleton class In-Reply-To: <541096C4.8010605@...1...> References: <1410357685.6336.13.camel@...102...> <54105F83.3020708@...1...> <54108E1E.3070307@...741...> <20140910175045.GD1118@...693...> <54109303.6020800@...741...> <541096C4.8010605@...1...> Message-ID: <54109892.1070809@...741...> > > What for? The interpreter is not multi-threaded. > I am looking for a system wide singleton with guaranteed mutual exclusion to any executable written in Gambas. From gambas at ...1... Wed Sep 10 20:41:54 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Wed, 10 Sep 2014 20:41:54 +0200 Subject: [Gambas-devel] Question about singleton class In-Reply-To: <54109892.1070809@...741...> References: <1410357685.6336.13.camel@...102...> <54105F83.3020708@...1...> <54108E1E.3070307@...741...> <20140910175045.GD1118@...693...> <54109303.6020800@...741...> <541096C4.8010605@...1...> <54109892.1070809@...741...> Message-ID: <54109B72.3070708@...1...> Le 10/09/2014 20:29, John Leake a ?crit : >> >> What for? The interpreter is not multi-threaded. >> > I am looking for a system wide singleton with guaranteed mutual > exclusion to any executable written in Gambas. > At the moment, you just have the LOCK instruction for that. -- Beno?t Minisini From gambas at ...1... Wed Sep 10 20:43:07 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Wed, 10 Sep 2014 20:43:07 +0200 Subject: [Gambas-devel] Multi-level virtual objects, inheritance and symbol resolution mess In-Reply-To: <540B2D28.6030607@...1...> References: <20140905192658.GF915@...693...> <540B1C9D.6060401@...1...> <540B2D28.6030607@...1...> Message-ID: <54109BBB.4000807@...1...> Le 06/09/2014 17:50, Beno?t Minisini a ?crit : > > OK. As I thought, the "_" prefix was the problem. I fixed the > interpreter so that it decides that a native class is virtual by taking > into account the "GB_VIRTUAL_CLASS()" declaration, not just the initial > dot in the name. > > But there is another problem: > > hGraphMatrix.Vertices[] calls GraphVertices_get, which calls the > "_getVertex" method. As "_getVertex" returns a "virtual object", no > dynamic calling can occur, and the InDegree property of _Graph_Vertex is > called, never the InDegree property of _Matrix_Vertex. > > I have no solution at the moment... > Hi Tobias, Did you succeed in dealing with that tricky stuff? -- Beno?t Minisini From taboege at ...176... Wed Sep 10 20:45:52 2014 From: taboege at ...176... (Tobias Boege) Date: Wed, 10 Sep 2014 20:45:52 +0200 Subject: [Gambas-devel] Question about singleton class In-Reply-To: <54109892.1070809@...741...> References: <1410357685.6336.13.camel@...102...> <54105F83.3020708@...1...> <54108E1E.3070307@...741...> <20140910175045.GD1118@...693...> <54109303.6020800@...741...> <541096C4.8010605@...1...> <54109892.1070809@...741...> Message-ID: <20140910184552.GE1118@...693...> On Wed, 10 Sep 2014, John Leake wrote: > > > > What for? The interpreter is not multi-threaded. > > > I am looking for a system wide singleton with guaranteed mutual > exclusion to any executable written in Gambas. > As if all instances of the interpreter (i.e. independent processes) on a system were just (well-behaved) threads of one instance? You want to use the *same* object in *all* interpreters -- but of course access it mutually exclusively? Some kind of persistent object which does not belong to a single process and would be deallocated when that process terminates, but an object which survives until the last of all Gambas interpreters gets killed (or even survive that, too)? That's definitely not built into Gambas. Maybe you can try to shm_open() some memory and hack the interpreter to allocate your object and all objects it ever references (doesn't sound that easy) in that shared memory region. If you got there, it should be no big deal to have the "mutually exclusive" part by using pthreads or futex. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From jleake at ...741... Wed Sep 10 21:04:22 2014 From: jleake at ...741... (John Leake) Date: Wed, 10 Sep 2014 20:04:22 +0100 Subject: [Gambas-devel] Question about singleton class In-Reply-To: <54109B72.3070708@...1...> References: <1410357685.6336.13.camel@...102...> <54105F83.3020708@...1...> <54108E1E.3070307@...741...> <20140910175045.GD1118@...693...> <54109303.6020800@...741...> <541096C4.8010605@...1...> <54109892.1070809@...741...> <54109B72.3070708@...1...> Message-ID: <5410A0B6.3010606@...741...> > > At the moment, you just have the LOCK instruction for that. > I see the docs say that the content is not of interest. Can you see any reason why I shouldn?t write my own PID and a sha1 of my process into the file if my process is granted access ? This way another process could delete the file if the content pid either does not exist or if the pid has been recycled and the sha1 does not match. From gambas at ...1... Wed Sep 10 21:34:45 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Wed, 10 Sep 2014 21:34:45 +0200 Subject: [Gambas-devel] Question about singleton class In-Reply-To: <5410A0B6.3010606@...741...> References: <1410357685.6336.13.camel@...102...> <54105F83.3020708@...1...> <54108E1E.3070307@...741...> <20140910175045.GD1118@...693...> <54109303.6020800@...741...> <541096C4.8010605@...1...> <54109892.1070809@...741...> <54109B72.3070708@...1...> <5410A0B6.3010606@...741...> Message-ID: <5410A7D5.900@...1...> Le 10/09/2014 21:04, John Leake a ?crit : >> >> At the moment, you just have the LOCK instruction for that. >> > I see the docs say that the content is not of interest. > > Can you see any reason why I shouldn?t write my own PID and a sha1 of my > process into the file if my process is granted access ? > > This way another process could delete the file if the content pid either > does not exist or if the pid has been recycled and the sha1 does not match. > I quote you: ? I am looking for a system wide singleton with guaranteed mutual exclusion to any executable written in Gambas. ? This is exactly what a file lock can do. I'm already doing that in the big application I'm making for my job. -- Beno?t Minisini From taboege at ...176... Wed Sep 10 21:34:35 2014 From: taboege at ...176... (Tobias Boege) Date: Wed, 10 Sep 2014 21:34:35 +0200 Subject: [Gambas-devel] Multi-level virtual objects, inheritance and symbol resolution mess In-Reply-To: <54109BBB.4000807@...1...> References: <20140905192658.GF915@...693...> <540B1C9D.6060401@...1...> <540B2D28.6030607@...1...> <54109BBB.4000807@...1...> Message-ID: <20140910193435.GF1118@...693...> On Wed, 10 Sep 2014, Beno?t Minisini wrote: > Le 06/09/2014 17:50, Beno?t Minisini a ?crit : > > > > OK. As I thought, the "_" prefix was the problem. I fixed the > > interpreter so that it decides that a native class is virtual by taking > > into account the "GB_VIRTUAL_CLASS()" declaration, not just the initial > > dot in the name. > > > > But there is another problem: > > > > hGraphMatrix.Vertices[] calls GraphVertices_get, which calls the > > "_getVertex" method. As "_getVertex" returns a "virtual object", no > > dynamic calling can occur, and the InDegree property of _Graph_Vertex is > > called, never the InDegree property of _Matrix_Vertex. > > > > I have no solution at the moment... > > > > Hi Tobias, > > Did you succeed in dealing with that tricky stuff? > Tricky indeed. So far I have essentially nothing (working)... [ Good thing I just finished the elementary number theory part of my exam preparation and am tackling the graph theory part. I think I can afford to work a little on Gambas now since it is about graphs, too :-) ] I had a problem which is at least unrelated to the design difficulties: After going through the interface of a Gambas class, the program aborts due to an error "Symbol not found". Indeed some of the methods I search via GB.GetFunction() are not implemented (because they're optional). How can I clear the error information in this case? I saw a way in gb.eval which requires linking gb_error.c to my component. I'm surprised there doesn't seem to be a GB.ClearError() or something... Is the gb.eval way the advised one? Also: to get the graph interfaces, I would do the following: a native implementation provides a structure of function pointers to its objects themselves. A Graph in Gambas gets scanned in its _init() special method and a structure of Gambas function pointers are stored in a hashtable, indexed by the class name. Whenever an object of the latter is instantiated, the structure is looked up -- or is there already a standard mechanism to save per-class information? Like a spare place of memory in the CLASS structure. As each object can access its class very quickly, this would save a hashtable lookup on object creation. Not a big saving but a question that came to my mind. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From jleake at ...741... Wed Sep 10 21:40:54 2014 From: jleake at ...741... (John Leake) Date: Wed, 10 Sep 2014 20:40:54 +0100 Subject: [Gambas-devel] Question about singleton class In-Reply-To: <5410A7D5.900@...1...> References: <1410357685.6336.13.camel@...102...> <54105F83.3020708@...1...> <54108E1E.3070307@...741...> <20140910175045.GD1118@...693...> <54109303.6020800@...741...> <541096C4.8010605@...1...> <54109892.1070809@...741...> <54109B72.3070708@...1...> <5410A0B6.3010606@...741...> <5410A7D5.900@...1...> Message-ID: <5410A946.6000604@...741...> > > This is exactly what a file lock can do. I'm already doing that in the > big application I'm making for my job. > Thank you. A sha1 is probably overkill since I can at least get the process name/command line from the PID. The reason for this requirement is to prevent deadlock in the event that the originator of the lock has died or exited without calling UNLOCK. From taboege at ...176... Wed Sep 10 21:48:52 2014 From: taboege at ...176... (Tobias Boege) Date: Wed, 10 Sep 2014 21:48:52 +0200 Subject: [Gambas-devel] Multi-level virtual objects, inheritance and symbol resolution mess In-Reply-To: <20140910193435.GF1118@...693...> References: <20140905192658.GF915@...693...> <540B1C9D.6060401@...1...> <540B2D28.6030607@...1...> <54109BBB.4000807@...1...> <20140910193435.GF1118@...693...> Message-ID: <20140910194852.GG1118@...693...> On Wed, 10 Sep 2014, Tobias Boege wrote: > A Graph in Gambas gets scanned in its _init() special method > and a structure of Gambas function pointers are stored in a hashtable, > indexed by the class name. Forget about that. I can't hijack the _init() method of Gambas Graph classes from the parent "Graph" class. So I would have to scan the interface in the _new() method if the class was not scanned already... -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From gambas at ...1... Wed Sep 10 22:07:00 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Wed, 10 Sep 2014 22:07:00 +0200 Subject: [Gambas-devel] Question about singleton class In-Reply-To: <5410A946.6000604@...741...> References: <1410357685.6336.13.camel@...102...> <54105F83.3020708@...1...> <54108E1E.3070307@...741...> <20140910175045.GD1118@...693...> <54109303.6020800@...741...> <541096C4.8010605@...1...> <54109892.1070809@...741...> <54109B72.3070708@...1...> <5410A0B6.3010606@...741...> <5410A7D5.900@...1...> <5410A946.6000604@...741...> Message-ID: <5410AF64.8080506@...1...> Le 10/09/2014 21:40, John Leake a ?crit : >> >> This is exactly what a file lock can do. I'm already doing that in the >> big application I'm making for my job. >> > Thank you. A sha1 is probably overkill since I can at least get the > process name/command line from the PID. > > The reason for this requirement is to prevent deadlock in the event that > the originator of the lock has died or exited without calling UNLOCK. > Locks are automatically freed if the program ends or crash. This is a system thing. Read the man page of the lockf() function if you want the details. -- Beno?t Minisini From gambas at ...1... Wed Sep 10 22:11:45 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Wed, 10 Sep 2014 22:11:45 +0200 Subject: [Gambas-devel] Multi-level virtual objects, inheritance and symbol resolution mess In-Reply-To: <20140910193435.GF1118@...693...> References: <20140905192658.GF915@...693...> <540B1C9D.6060401@...1...> <540B2D28.6030607@...1...> <54109BBB.4000807@...1...> <20140910193435.GF1118@...693...> Message-ID: <5410B081.1070400@...1...> Le 10/09/2014 21:34, Tobias Boege a ?crit : > On Wed, 10 Sep 2014, Beno?t Minisini wrote: >> Le 06/09/2014 17:50, Beno?t Minisini a ?crit : >>> >>> OK. As I thought, the "_" prefix was the problem. I fixed the >>> interpreter so that it decides that a native class is virtual by taking >>> into account the "GB_VIRTUAL_CLASS()" declaration, not just the initial >>> dot in the name. >>> >>> But there is another problem: >>> >>> hGraphMatrix.Vertices[] calls GraphVertices_get, which calls the >>> "_getVertex" method. As "_getVertex" returns a "virtual object", no >>> dynamic calling can occur, and the InDegree property of _Graph_Vertex is >>> called, never the InDegree property of _Matrix_Vertex. >>> >>> I have no solution at the moment... >>> >> >> Hi Tobias, >> >> Did you succeed in dealing with that tricky stuff? >> > > Tricky indeed. So far I have essentially nothing (working)... [ Good thing > I just finished the elementary number theory part of my exam preparation and > am tackling the graph theory part. I think I can afford to work a little on > Gambas now since it is about graphs, too :-) ] > > I had a problem which is at least unrelated to the design difficulties: > After going through the interface of a Gambas class, the program aborts due > to an error "Symbol not found". Indeed some of the methods I search via > GB.GetFunction() are not implemented (because they're optional). How can I > clear the error information in this case? I saw a way in gb.eval which > requires linking gb_error.c to my component. I'm surprised there doesn't > seem to be a GB.ClearError() or something... Is the gb.eval way the advised > one? GB.Error(NULL) clears the error. > > Also: to get the graph interfaces, I would do the following: a native > implementation provides a structure of function pointers to its objects > themselves. A Graph in Gambas gets scanned in its _init() special method > and a structure of Gambas function pointers are stored in a hashtable, > indexed by the class name. Whenever an object of the latter is instantiated, > the structure is looked up -- or is there already a standard mechanism to > save per-class information? Like a spare place of memory in the CLASS > structure. You must call GB.GetFunction() for each method you search and stores the result. The class implementation must stay opaque to the components. > As each object can access its class very quickly, this would save > a hashtable lookup on object creation. Not a big saving but a question that > came to my mind. I don't see how you can save a hashtable lookup (technically it's not a hashtable, but something faster) if you look for the method "_getVertex" with a specific signature. Regards, -- Beno?t Minisini From taboege at ...176... Wed Sep 10 22:39:58 2014 From: taboege at ...176... (Tobias Boege) Date: Wed, 10 Sep 2014 22:39:58 +0200 Subject: [Gambas-devel] Multi-level virtual objects, inheritance and symbol resolution mess In-Reply-To: <5410B081.1070400@...1...> References: <20140905192658.GF915@...693...> <540B1C9D.6060401@...1...> <540B2D28.6030607@...1...> <54109BBB.4000807@...1...> <20140910193435.GF1118@...693...> <5410B081.1070400@...1...> Message-ID: <20140910203958.GI1118@...693...> On Wed, 10 Sep 2014, Beno?t Minisini wrote: > > As each object can access its class very quickly, this would save > > a hashtable lookup on object creation. Not a big saving but a question that > > came to my mind. > > I don't see how you can save a hashtable lookup (technically it's not a > hashtable, but something faster) if you look for the method "_getVertex" > with a specific signature. > I meant: if I had a "tag" field in the CLASS structure for my component to use freely (which I haven't, for good reasons, as you said), I could store the structure of function pointers there after I scanned the interface and if I need it with any object of that class, I can retrieve it in no time: BEGIN_METHOD(Graph_getVertex, GB_STRING vert) GRAPH_DESC *desc = THIS->class->tag; /* desc->_getVertex() can be used now... */ END_METHOD But I don't want to get trapped in premature optimisation here... -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From gambas at ...1... Wed Sep 10 22:57:43 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Wed, 10 Sep 2014 22:57:43 +0200 Subject: [Gambas-devel] Multi-level virtual objects, inheritance and symbol resolution mess In-Reply-To: <20140910203958.GI1118@...693...> References: <20140905192658.GF915@...693...> <540B1C9D.6060401@...1...> <540B2D28.6030607@...1...> <54109BBB.4000807@...1...> <20140910193435.GF1118@...693...> <5410B081.1070400@...1...> <20140910203958.GI1118@...693...> Message-ID: <5410BB47.5090902@...1...> Le 10/09/2014 22:39, Tobias Boege a ?crit : > On Wed, 10 Sep 2014, Beno?t Minisini wrote: >>> As each object can access its class very quickly, this would save >>> a hashtable lookup on object creation. Not a big saving but a question that >>> came to my mind. >> >> I don't see how you can save a hashtable lookup (technically it's not a >> hashtable, but something faster) if you look for the method "_getVertex" >> with a specific signature. >> > > I meant: if I had a "tag" field in the CLASS structure for my component to > use freely (which I haven't, for good reasons, as you said), I could store > the structure of function pointers there after I scanned the interface and > if I need it with any object of that class, I can retrieve it in no time: > > BEGIN_METHOD(Graph_getVertex, GB_STRING vert) > > GRAPH_DESC *desc = THIS->class->tag; > > /* desc->_getVertex() can be used now... */ > > END_METHOD > > But I don't want to get trapped in premature optimisation here... > Store the pointer to the interface inside each object. Free it when the last object is freed. -- Beno?t Minisini From taboege at ...176... Wed Sep 10 23:07:37 2014 From: taboege at ...176... (Tobias Boege) Date: Wed, 10 Sep 2014 23:07:37 +0200 Subject: [Gambas-devel] Multi-level virtual objects, inheritance and symbol resolution mess In-Reply-To: <54109BBB.4000807@...1...> References: <20140905192658.GF915@...693...> <540B1C9D.6060401@...1...> <540B2D28.6030607@...1...> <54109BBB.4000807@...1...> Message-ID: <20140910210737.GJ1118@...693...> On Wed, 10 Sep 2014, Beno?t Minisini wrote: > Le 06/09/2014 17:50, Beno?t Minisini a ?crit : > > > > OK. As I thought, the "_" prefix was the problem. I fixed the > > interpreter so that it decides that a native class is virtual by taking > > into account the "GB_VIRTUAL_CLASS()" declaration, not just the initial > > dot in the name. > > > > But there is another problem: > > > > hGraphMatrix.Vertices[] calls GraphVertices_get, which calls the > > "_getVertex" method. As "_getVertex" returns a "virtual object", no > > dynamic calling can occur, and the InDegree property of _Graph_Vertex is > > called, never the InDegree property of _Matrix_Vertex. > > > > I have no solution at the moment... > > > > Hi Tobias, > > Did you succeed in dealing with that tricky stuff? > Oh, I just remembered the one thing which made me give up the last night I tried to make progress on this: With the former implementation I had a Graph and a _Graph_Vertex class which both contained methods on their own and this separation was a good thing. Now, to get the function pointers together, I would need all special functions be implemented in the graph class alone, like _nextAdjacent which enumerates vertices adjacent to the currently selected virtual .Graph.Vertex object... Not so pretty. It would make the .Graph.Vertex and .Graph.Edge classes useless because all the information needs to be in the graph class anyway in order to implement those special methods. I could require the user to name their descendent of .Graph.Vertex -- if their main graph class is called MyGraph --, as .MyGraph.Vertex and then search this class explicitely. What do you say? -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From gambas at ...1... Wed Sep 10 23:43:35 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Wed, 10 Sep 2014 23:43:35 +0200 Subject: [Gambas-devel] Multi-level virtual objects, inheritance and symbol resolution mess In-Reply-To: <20140910210737.GJ1118@...693...> References: <20140905192658.GF915@...693...> <540B1C9D.6060401@...1...> <540B2D28.6030607@...1...> <54109BBB.4000807@...1...> <20140910210737.GJ1118@...693...> Message-ID: <5410C607.1060600@...1...> Le 10/09/2014 23:07, Tobias Boege a ?crit : > On Wed, 10 Sep 2014, Beno?t Minisini wrote: >> Le 06/09/2014 17:50, Beno?t Minisini a ?crit : >>> >>> OK. As I thought, the "_" prefix was the problem. I fixed the >>> interpreter so that it decides that a native class is virtual by taking >>> into account the "GB_VIRTUAL_CLASS()" declaration, not just the initial >>> dot in the name. >>> >>> But there is another problem: >>> >>> hGraphMatrix.Vertices[] calls GraphVertices_get, which calls the >>> "_getVertex" method. As "_getVertex" returns a "virtual object", no >>> dynamic calling can occur, and the InDegree property of _Graph_Vertex is >>> called, never the InDegree property of _Matrix_Vertex. >>> >>> I have no solution at the moment... >>> >> >> Hi Tobias, >> >> Did you succeed in dealing with that tricky stuff? >> > > Oh, I just remembered the one thing which made me give up the last night I > tried to make progress on this: > > With the former implementation I had a Graph and a _Graph_Vertex class which > both contained methods on their own and this separation was a good thing. > Now, to get the function pointers together, I would need all special > functions be implemented in the graph class alone, like _nextAdjacent which > enumerates vertices adjacent to the currently selected virtual .Graph.Vertex > object... Not so pretty. It would make the .Graph.Vertex and .Graph.Edge > classes useless because all the information needs to be in the graph class > anyway in order to implement those special methods. > > I could require the user to name their descendent of .Graph.Vertex -- if > their main graph class is called MyGraph --, as .MyGraph.Vertex and then > search this class explicitely. > > What do you say? > I say that I'm not shocked if the entire interface is in the Graph class. But I don't see why you can't keep .Graph.Vertex and .Graph.Edge. The user just won't have to inherit them anymore. Regards, -- Beno?t Minisini From jleake at ...741... Thu Sep 11 01:24:35 2014 From: jleake at ...741... (John Leake) Date: Thu, 11 Sep 2014 00:24:35 +0100 Subject: [Gambas-devel] Question about singleton class In-Reply-To: <5410AF64.8080506@...1...> References: <1410357685.6336.13.camel@...102...> <54105F83.3020708@...1...> <54108E1E.3070307@...741...> <20140910175045.GD1118@...693...> <54109303.6020800@...741...> <541096C4.8010605@...1...> <54109892.1070809@...741...> <54109B72.3070708@...1...> <5410A0B6.3010606@...741...> <5410A7D5.900@...1...> <5410A946.6000604@...741...> <5410AF64.8080506@...1...> Message-ID: <5410DDB3.8090802@...741...> > Locks are automatically freed if the program ends or crash. This is a > system thing. Read the man page of the lockf() function if you want the > details. Thank you I did not realise Lock was based on lockf(). From taboege at ...176... Thu Sep 11 05:07:38 2014 From: taboege at ...176... (Tobias Boege) Date: Thu, 11 Sep 2014 05:07:38 +0200 Subject: [Gambas-devel] Multi-level virtual objects, inheritance and symbol resolution mess In-Reply-To: <5410C607.1060600@...1...> References: <20140905192658.GF915@...693...> <540B1C9D.6060401@...1...> <540B2D28.6030607@...1...> <54109BBB.4000807@...1...> <20140910210737.GJ1118@...693...> <5410C607.1060600@...1...> Message-ID: <20140911030738.GK1118@...693...> On Wed, 10 Sep 2014, Beno?t Minisini wrote: > Le 10/09/2014 23:07, Tobias Boege a ?crit : > > On Wed, 10 Sep 2014, Beno?t Minisini wrote: > >> Le 06/09/2014 17:50, Beno?t Minisini a ?crit : > >>> > >>> OK. As I thought, the "_" prefix was the problem. I fixed the > >>> interpreter so that it decides that a native class is virtual by taking > >>> into account the "GB_VIRTUAL_CLASS()" declaration, not just the initial > >>> dot in the name. > >>> > >>> But there is another problem: > >>> > >>> hGraphMatrix.Vertices[] calls GraphVertices_get, which calls the > >>> "_getVertex" method. As "_getVertex" returns a "virtual object", no > >>> dynamic calling can occur, and the InDegree property of _Graph_Vertex is > >>> called, never the InDegree property of _Matrix_Vertex. > >>> > >>> I have no solution at the moment... > >>> > >> > >> Hi Tobias, > >> > >> Did you succeed in dealing with that tricky stuff? > >> > > > > Oh, I just remembered the one thing which made me give up the last night I > > tried to make progress on this: > > > > With the former implementation I had a Graph and a _Graph_Vertex class which > > both contained methods on their own and this separation was a good thing. > > Now, to get the function pointers together, I would need all special > > functions be implemented in the graph class alone, like _nextAdjacent which > > enumerates vertices adjacent to the currently selected virtual .Graph.Vertex > > object... Not so pretty. It would make the .Graph.Vertex and .Graph.Edge > > classes useless because all the information needs to be in the graph class > > anyway in order to implement those special methods. > > > > I could require the user to name their descendent of .Graph.Vertex -- if > > their main graph class is called MyGraph --, as .MyGraph.Vertex and then > > search this class explicitely. > > > > What do you say? > > > > I say that I'm not shocked if the entire interface is in the Graph > class. But I don't see why you can't keep .Graph.Vertex and .Graph.Edge. > The user just won't have to inherit them anymore. > I have the things from my test projects working now (with my ImageGraph in Gambas and the native GraphMatrix class). Except the problem you mentioned in the upmost citation above. There is .Graph.Vertex which is virtual. I can't access properties of .Matrix.Vertex which is virtual and inherits from .Graph.Vertex, which you said above. Also, I can't inherit this dot-containing class (name) from within Gambas code. Inheriting it may be needed when the user wants to add custom properties and methods to their vertices and edges... The sole purpose of the .Graph.Vertex and .Graph.Edge classes is to dictate an interface but I want to keep them and also to keep them virtual (if only for native classes) if at all possible. I have, in turn, eliminated all virtual properties from *them*, so maybe I can find a solution to this tomorrow, but now I need some sleep. But except for that, everything seems to work, and there is already a full native graph class implemented and a working graph in Gambas which has an implementation just comprehensive enough to allow a BFS on it. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From karl.reinl at ...16... Thu Sep 11 18:26:39 2014 From: karl.reinl at ...16... (Karl Reinl) Date: Thu, 11 Sep 2014 18:26:39 +0200 Subject: [Gambas-devel] Creating a Control In-Reply-To: <541035FB.7040207@...741...> References: <540C77D0.1010404@...741...> <540D9494.8050305@...741...> <20140908123445.GA889@...693...> <540DB59B.7000006@...741...> <540DB9AD.3080904@...741...> <540DBECC.3010103@...1...> <540DD20C.9030104@...741...> <540E204D.9090701@...741...> <540EC829.20605@...741...> <540ECF96.7010905@...741...> <540ED2F0.2050204@...741...> <1410264437.3654.5.camel@...102...> <540F4E1F.5030501@...741...> <1410340723.3499.7.camel@...102...> <54101E5E.1030909@...741...> <1410344117.3499.16.camel@...102...> <541035FB.7040207@...741...> Message-ID: <1410452799.3496.2.camel@...102...> Am Mittwoch, den 10.09.2014, 12:28 +0100 schrieb John Leake: > > Do you have a 3.5.4 version installed? If yes, are the path to the > > executable for libraries still stored in .project? > Yes. No the paths to the exe are not in .project. > Thanks John, but I will make a version for both...coming soon (I hope) the last version of instGB3 you find here: http://dashboard68.users.sourceforge.net/ -- Charlie From jleake at ...741... Fri Sep 12 07:45:59 2014 From: jleake at ...741... (John Leake) Date: Fri, 12 Sep 2014 06:45:59 +0100 Subject: [Gambas-devel] Question about singleton class In-Reply-To: <5410DDB3.8090802@...741...> References: <1410357685.6336.13.camel@...102...> <54105F83.3020708@...1...> <54108E1E.3070307@...741...> <20140910175045.GD1118@...693...> <54109303.6020800@...741...> <541096C4.8010605@...1...> <54109892.1070809@...741...> <54109B72.3070708@...1...> <5410A0B6.3010606@...741...> <5410A7D5.900@...1...> <5410A946.6000604@...741...> <5410AF64.8080506@...1...> <5410DDB3.8090802@...741...> Message-ID: <54128897.4020802@...741...> Hi All, I have some unexplained behaviour relating to the Lock and Unlock functions. Attached is a small project that allows you to call Lock/Unlock at will. It shows the return status of Error.Text following a Try call. I have spent several hours searching the source tree and cannot find the implementations of Lock and Unlock in order to suggest a fix (assuming of course that there is a problem in the first place and I have not done something stupid in the source). Does anyone know where the implemented source is for version 3-3.5.4 ? The Problem ----------- If you launch several instances of the executable SystemwideSingleton.gambas and you Attempt to Lock twice from the same instance then:- 1) The second call does not return an error or any idea that you already have lock. 2) Worse still if you then go to a different instance and Attempt a Lock it returns no error and you end up with both instances believing they have exclusive Lock on the file. 3) Starting from scratch. Attempt to Unlock the file and you see an error returned which is OK. But when you then Attempt Lock it returns OK but the empty string from Error.Text does not wipe out the previous error text. Surely I am doing something wrong in the code ? 4) How can an app decide when to clean up and remove the lock file ? Best regards, John Leake P.S. I will fix this if I can find it. -------------- next part -------------- A non-text attachment was scrubbed... Name: SystemwideSingleton.tar.gz Type: application/x-gzip Size: 6971 bytes Desc: not available URL: From taboege at ...176... Sat Sep 13 05:05:33 2014 From: taboege at ...176... (Tobias Boege) Date: Sat, 13 Sep 2014 05:05:33 +0200 Subject: [Gambas-devel] Multi-level virtual objects, inheritance and symbol resolution mess In-Reply-To: <540B2D28.6030607@...1...> References: <20140905192658.GF915@...693...> <540B1C9D.6060401@...1...> <540B2D28.6030607@...1...> Message-ID: <20140913030533.GE976@...693...> On Sat, 06 Sep 2014, Beno?t Minisini wrote: > But there is another problem: > > hGraphMatrix.Vertices[] calls GraphVertices_get, which calls the > "_getVertex" method. As "_getVertex" returns a "virtual object", no > dynamic calling can occur, and the InDegree property of _Graph_Vertex is > called, never the InDegree property of _Matrix_Vertex. > > I have no solution at the moment... > In #6468, for native classes, I circumvented it by overriding the "Vertices" symbol in the graph class: GB_PROPERTY_SELF("Vertices", ".Matrix.Vertices") where it was previously inherited from the common Graph class as a ".Graph.Vertices". This way I can say in the description of .Matrix.Vertices that the _get() method returns a .Matrix.Vertex instead of the .Graph.Vertex. Then the right methods are called. For Gambas classes, this won't work at all because it involved inheriting virtual classes (impossible) and staying a virtual class in this course (also impossible). So I thought I would just give .Graph.Vertex _property and _unknown methods and mirror them, again, to _vertexProperty and _vertexUnknown in the graph class. It is yet another indirection but it's for Gambas graphs only and there shouldn't be too many things a person wants to add to a vertex or edge class. Seems like the way it is now, everything is working and it doesn't seem too hard to implement a graph in Gambas. I'll write a tutorial on how to do it, if you're as content as you can be with the system. I'll send three test projects to gambas-user in a minute. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From taboege at ...176... Sat Sep 13 06:31:12 2014 From: taboege at ...176... (Tobias Boege) Date: Sat, 13 Sep 2014 06:31:12 +0200 Subject: [Gambas-devel] Question about singleton class In-Reply-To: <54128897.4020802@...741...> References: <54109303.6020800@...741...> <541096C4.8010605@...1...> <54109892.1070809@...741...> <54109B72.3070708@...1...> <5410A0B6.3010606@...741...> <5410A7D5.900@...1...> <5410A946.6000604@...741...> <5410AF64.8080506@...1...> <5410DDB3.8090802@...741...> <54128897.4020802@...741...> Message-ID: <20140913043112.GG976@...693...> On Fri, 12 Sep 2014, John Leake wrote: > Hi All, > I have some unexplained behaviour relating to the Lock and Unlock > functions. Attached is a small project that allows you to call > Lock/Unlock at will. It shows the return status of Error.Text following > a Try call. > > I have spent several hours searching the source tree and cannot find the > implementations of Lock and Unlock in order to suggest a fix (assuming > of course that there is a problem in the first place and I have not done > something stupid in the source). > > Does anyone know where the implemented source is for version 3-3.5.4 ? > It's in main/gbx/gbx_subr_file.c:SUBR_lock. From there it will take you to main/gbx/gbx_stream.c:STREAM_lock. > The Problem > ----------- > > If you launch several instances of the executable > SystemwideSingleton.gambas and you Attempt to Lock twice from the same > instance then:- > 1) The second call does not return an error or any idea that you already > have lock. Allegedly[0] this is by design. Multiple POSIX locks on the same file from the same process never conflict. > 2) Worse still if you then go to a different instance and Attempt a Lock > it returns no error and you end up with both instances believing they > have exclusive Lock on the file. First, I run your project in a slightly modified version: I needed to change the path to the lock because I'm not "john", and you had a breakpoint set in the IDE on line 28. This makes the program stop. Obviously I needed to remove it. Then, what you mentioned above only happens to me when I acquire the lock in one process and then acquire it again from there. Then I can get the lock from the other process, too. This is also to be expected. The article [0] says: "More troublingly, the standard states that all locks held by a process are dropped any time the process closes any file descriptor that corresponds to the locked file" When you lock the file again, the code Try h = Lock f in your function is executed again which drops the last reference count of the object in the variable h (NB: *after* the Lock instruction was executed) and thus destroys the object, which closes the stream and releases the lock(s), in accordance with the standard. You would modify your function to first test if h is already an object (different from Null) and if it is, then you bail out of your locking attempt. > 3) Starting from scratch. Attempt to Unlock the file and you see an > error returned which is OK. But when you then Attempt Lock it returns OK > but the empty string from Error.Text does not wipe out the previous > error text. Surely I am doing something wrong in the code ? No you don't. Error.Text "returns the last error message". (It isn't automatically cleared once you read its value or any other action is carried out because we then would have the trouble of defining what an "action" is in the interpreter and insert clear calls everywhere, risking that the information is erased before the user could see it.) > 4) How can an app decide when to clean up and remove the lock file ? > I don't think I get your question right but in case I do, I'd say: It removes the lock when it's done with its job. When this event occurs must be wired into the program's logic. Regards, Tobi [0] http://lwn.net/Articles/586904/ -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From jleake at ...741... Sat Sep 13 10:53:11 2014 From: jleake at ...741... (John Leake) Date: Sat, 13 Sep 2014 09:53:11 +0100 Subject: [Gambas-devel] Question about singleton class In-Reply-To: <20140913043112.GG976@...693...> References: <54109303.6020800@...741...> <541096C4.8010605@...1...> <54109892.1070809@...741...> <54109B72.3070708@...1...> <5410A0B6.3010606@...741...> <5410A7D5.900@...1...> <5410A946.6000604@...741...> <5410AF64.8080506@...1...> <5410DDB3.8090802@...741...> <54128897.4020802@...741...> <20140913043112.GG976@...693...> Message-ID: <541405F7.4050802@...741...> Hi Tobi, Thank you for your response and confirming the same behaviour. Sorry for the break point I left in the code and a path that was not relevant to your test. If you step back from the detail and look at this from a programming perspective and look at the gambas docs then it appears to be a bug. I have looked at the code but cannot quite work out where the bug is. This is not because it is written in C but more to do with following the program flow. Do calls to THROW return ? Anyway could I be bold and suggest what should happen and how it can be implemented: If a proc is granted a write Lock it should obviously be an exclusive lock and remain in place until Unlock is called or the proc terminates. All OS write lock mechanisms do this no matter whos standard you look at. If the same proc calls Lock a second time without calling Unlock in between then the original lock should be left in place and a 'no-error' status returned to the caller. To achieve this simply retain the file handle to the locked resource and keep it open until Unlock is called or the proc dies/exits. >> 3) Starting from scratch. Attempt to Unlock the file and you see an >> error returned which is OK. But when you then Attempt Lock it returns OK >> but the empty string from Error.Text does not wipe out the previous >> error text. Surely I am doing something wrong in the code ? > > No you don't. Error.Text "returns the last error message". > Are you saying that Try followed by a test on Error is not the right way to code in Gambas ? > >> 4) How can an app decide when to clean up and remove the lock file ? >> > > I don't think I get your question right but in case I do, I'd say: It > removes the lock when it's done with its job. When this event occurs > must be wired into the program's logic. > So do you mean that to use Lock and Unlock an app also has to Delete files ? John From taboege at ...176... Sat Sep 13 15:17:12 2014 From: taboege at ...176... (Tobias Boege) Date: Sat, 13 Sep 2014 15:17:12 +0200 Subject: [Gambas-devel] Question about singleton class In-Reply-To: <541405F7.4050802@...741...> References: <54109892.1070809@...741...> <54109B72.3070708@...1...> <5410A0B6.3010606@...741...> <5410A7D5.900@...1...> <5410A946.6000604@...741...> <5410AF64.8080506@...1...> <5410DDB3.8090802@...741...> <54128897.4020802@...741...> <20140913043112.GG976@...693...> <541405F7.4050802@...741...> Message-ID: <20140913131712.GI976@...693...> On Sat, 13 Sep 2014, John Leake wrote: > Hi Tobi, > Thank you for your response and confirming the same behaviour. Sorry for > the break point I left in the code and a path that was not relevant to > your test. > No need to excuse. > If you step back from the detail and look at this from a programming > perspective and look at the gambas docs then it appears to be a bug. > Something that could be fixed by inserting "this works with POSIX locks; expect POSIX lock behaviour" into the documentation doesn't seem to be a bug to me. But this sort of thing is Benoit's realm. > I have looked at the code but cannot quite work out where the bug is. > This is not because it is written in C but more to do with following the > program flow. > > Do calls to THROW return ? > Knowing C is far away from knowing "Gambas interpreter C", I can tell ;-) ctags is of some help for me. THROW calls PROPAGATE which, in turn, does a longjmp(), so it doesn't return. However, it sort of returns when you are in your own TRY block (it then continues in your CATCH block). If you look at main/gbx/gbx.c, you see that the event loop is started from inside a TRY block, so if there are no other TRYs down your path and the Gambas program itself doesn't provide some Try/ Catch/Application_Error logic, a THROW will kick you back right to the interpreter's main() function which reports the error. (You should read the above paragraph with an "I guess" prefixed to every sentence! The interpreter internals aren't my domain.) > Anyway could I be bold and suggest what should happen and how it can be > implemented: > > If a proc is granted a write Lock it should obviously be an exclusive > lock and remain in place until Unlock is called or the proc terminates. > All OS write lock mechanisms do this no matter whos standard you look > at. If the same proc calls Lock a second time without calling Unlock in > between then the original lock should be left in place and a 'no-error' > status returned to the caller. > > To achieve this simply retain the file handle to the locked resource and > keep it open until Unlock is called or the proc dies/exits. > Yes, this is exactly how it is supposed to be done... by the Gambas programmer. This is the solution I advised in my last mail. You get the file handle in a Stream object from the Lock instruction. If you, as a programmer, drop the last reference count of that object and thereby close the stream, this is exactly what unlocks a POSIX lock. You may have done that by accident, but that's what happened. I would agree that a note in the docs is due that closing a lock Stream is the same as unlocking it and that you can close your stream in some subtle ways such as the above one. > >> 3) Starting from scratch. Attempt to Unlock the file and you see an > >> error returned which is OK. But when you then Attempt Lock it returns OK > >> but the empty string from Error.Text does not wipe out the previous > >> error text. Surely I am doing something wrong in the code ? > > > > No you don't. Error.Text "returns the last error message". > > > Are you saying that Try followed by a test on Error is not the right way > to code in Gambas ? > Yes it is. You often see code like Try ' this and that If Error Then ' Try to recover / display an error ' Most likely a Return here Endif ' Continue but Error.Text is set only when a new error happens. Things going well don't affect its value. It's much like the errno variable. > > > >> 4) How can an app decide when to clean up and remove the lock file ? > >> > > > > I don't think I get your question right but in case I do, I'd say: It > > removes the lock when it's done with its job. When this event occurs > > must be wired into the program's logic. > > > So do you mean that to use Lock and Unlock an app also has to Delete files ? > By no means I meant that. Apparently, removing a lock and removing a *lock file* are two different things. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From gambas at ...1... Sat Sep 13 17:32:15 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Sat, 13 Sep 2014 17:32:15 +0200 Subject: [Gambas-devel] Question about singleton class In-Reply-To: <20140913131712.GI976@...693...> References: <54109892.1070809@...741...> <54109B72.3070708@...1...> <5410A0B6.3010606@...741...> <5410A7D5.900@...1...> <5410A946.6000604@...741...> <5410AF64.8080506@...1...> <5410DDB3.8090802@...741...> <54128897.4020802@...741...> <20140913043112.GG976@...693...> <541405F7.4050802@...741...> <20140913131712.GI976@...693...> Message-ID: <5414637F.5080500@...1...> Le 13/09/2014 15:17, Tobias Boege a ?crit : > I would agree that a note in the docs is due that closing a lock Stream > is the same as unlocking it and that you can close your stream in some > subtle ways such as the above one. > I will add a warning in the documentation about that. > > By no means I meant that. Apparently, removing a lock and removing a > *lock file* are two different things. > Yes. LOCK = Create a file if it does not exist, open it, and then do a lockf() on the entire file contents. UNLOCK = Just close the file descriptor. The only problem I see is that LOCK truncates the file to zero bytes, which is not necessary. I may change that in the future. Regards, -- Beno?t Minisini From ron at ...572... Sat Sep 13 18:23:44 2014 From: ron at ...572... (Ron) Date: Sat, 13 Sep 2014 18:23:44 +0200 Subject: [Gambas-devel] Gambas IDE trunk slow start Message-ID: If you have a project with 100000+ lines starting the trunk version of the Gambas IDE takes several seconds (close to 4-5) on a system with 8GB memory with i5-2500K 3.3.GHz x4 running Ubuntu 14.04 LTS It starts to look like a Microsoft product, which I don't like. ;P The stable version starts instantly within a second. I suspect gathering statistics is the issue. Can this be solved/sped up? Regards, Ron. From taboege at ...176... Sat Sep 13 18:33:59 2014 From: taboege at ...176... (Tobias Boege) Date: Sat, 13 Sep 2014 18:33:59 +0200 Subject: [Gambas-devel] Gambas IDE trunk slow start In-Reply-To: References: Message-ID: <20140913163359.GK976@...693...> On Sat, 13 Sep 2014, Ron wrote: > If you have a project with 100000+ lines starting the trunk version of > the Gambas IDE takes several seconds (close to 4-5) on a system with > 8GB memory with i5-2500K 3.3.GHz x4 running Ubuntu 14.04 LTS > 4 - 5 seconds are normal here (i3-550 3.2 GHz on two cores) when I first fire the IDE up -- always, without opening any project. I'd be glad if this can be sped up. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From gambas at ...1... Sat Sep 13 18:51:17 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Sat, 13 Sep 2014 18:51:17 +0200 Subject: [Gambas-devel] Gambas IDE trunk slow start In-Reply-To: References: Message-ID: <54147605.5040607@...1...> Le 13/09/2014 18:23, Ron a ?crit : > If you have a project with 100000+ lines starting the trunk version of > the Gambas IDE takes several seconds (close to 4-5) on a system with > 8GB memory with i5-2500K 3.3.GHz x4 running Ubuntu 14.04 LTS > > It starts to look like a Microsoft product, which I don't like. ;P > > The stable version starts instantly within a second. > I suspect gathering statistics is the issue. > > Can this be solved/sped up? > > Regards, > Ron. > No idea, I notice nothing there. Can you send your full project so that I profile the IDE with it? -- Beno?t Minisini From ron at ...572... Sat Sep 13 19:21:04 2014 From: ron at ...572... (Ron) Date: Sat, 13 Sep 2014 19:21:04 +0200 Subject: [Gambas-devel] Gambas IDE trunk slow start In-Reply-To: <54147605.5040607@...1...> References: <54147605.5040607@...1...> Message-ID: Did more testing, it's only slow when a lot of files are open on startup (forms, classes)... Did a ctrl-alt-w and it's fast. But the stable Gambas doesn't have this issue. Every 60 files (some big ones) gives a 2 Second delay I think I may be nitpicking... but we (I) don't want a slower IDE unless there is a good reason for it :-) Regards, Ron. 2014-09-13 18:51 GMT+02:00 Beno?t Minisini : > Le 13/09/2014 18:23, Ron a ?crit : >> If you have a project with 100000+ lines starting the trunk version of >> the Gambas IDE takes several seconds (close to 4-5) on a system with >> 8GB memory with i5-2500K 3.3.GHz x4 running Ubuntu 14.04 LTS >> >> It starts to look like a Microsoft product, which I don't like. ;P >> >> The stable version starts instantly within a second. >> I suspect gathering statistics is the issue. >> >> Can this be solved/sped up? >> >> Regards, >> Ron. >> > > No idea, I notice nothing there. Can you send your full project so that > I profile the IDE with it? > > -- > Beno?t Minisini > > ------------------------------------------------------------------------------ > Want excitement? > Manually upgrade your production database. > When you want reliability, choose Perforce > Perforce version control. Predictably reliable. > http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk > _______________________________________________ > Gambas-devel mailing list > Gambas-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-devel From jleake at ...741... Sat Sep 13 20:17:59 2014 From: jleake at ...741... (John Leake) Date: Sat, 13 Sep 2014 19:17:59 +0100 Subject: [Gambas-devel] Question about singleton class In-Reply-To: <5414637F.5080500@...1...> References: <54109892.1070809@...741...> <54109B72.3070708@...1...> <5410A0B6.3010606@...741...> <5410A7D5.900@...1...> <5410A946.6000604@...741...> <5410AF64.8080506@...1...> <5410DDB3.8090802@...741...> <54128897.4020802@...741...> <20140913043112.GG976@...693...> <541405F7.4050802@...741...> <20140913131712.GI976@...693...> <5414637F.5080500@...1...> Message-ID: <54148A57.7080700@...741...> Hi All, >> I would agree that a note in the docs is due that closing a lock Stream >> is the same as unlocking it and that you can close your stream in some >> subtle ways such as the above one. This is the bug. Calling Lock twice from the same proc/instance should not close the existing fd. The semantics of Lock should be such that a no error return from the function tells the caller that they have a Lock and the Lock should be the same as the first call without any gaps where another proc can gain access. To restate all OS locking functions, if a Write Lock is granted then the caller is guaranteed to have exclusive access no mater what happens that until the Unlock is called or the proc terminates. There is no semantic reference to Unlock when a program call Lock. > > I will add a warning in the documentation about that. > What are you going to say ? Watch out programmers, if you call Lock twice it will allow two independent procs to believe that they both have exclusive access. How can a proc know if it already has a Lock ? Are you suggesting that before Lock is called the user should test to see if it already has Lock ? >> >> By no means I meant that. Apparently, removing a lock and removing a >> *lock file* are two different things. >> > > Yes. Of course they are. If this is going to be fixed then why not make things simple for the programmer and take care if these details within the Lock and Unlock implementation. This way when unlock is called the file can automatically removed. > > LOCK = Create a file if it does not exist, open it, and then do a > lockf() on the entire file contents. > > UNLOCK = Just close the file descriptor. > > The only problem I see is that LOCK truncates the file to zero bytes, > which is not necessary. I may change that in the future. > In the meantime is there a recognised way of calling lockf() from within a Gambas source file ? Best regards, John Leake P.S. Just another observation what does Lock and Unlock have to do with streams ? I am trying to implement a system wide singleton design pattern here. From taboege at ...176... Sat Sep 13 21:03:46 2014 From: taboege at ...176... (Tobias Boege) Date: Sat, 13 Sep 2014 21:03:46 +0200 Subject: [Gambas-devel] Question about singleton class In-Reply-To: <54148A57.7080700@...741...> References: <5410A7D5.900@...1...> <5410A946.6000604@...741...> <5410AF64.8080506@...1...> <5410DDB3.8090802@...741...> <54128897.4020802@...741...> <20140913043112.GG976@...693...> <541405F7.4050802@...741...> <20140913131712.GI976@...693...> <5414637F.5080500@...1...> <54148A57.7080700@...741...> Message-ID: <20140913190346.GL976@...693...> On Sat, 13 Sep 2014, John Leake wrote: > Hi All, > > >> I would agree that a note in the docs is due that closing a lock Stream > >> is the same as unlocking it and that you can close your stream in some > >> subtle ways such as the above one. > > This is the bug. Calling Lock twice from the same proc/instance should > not close the existing fd. You can call Lock as often as resources permit to gain as many valid locks, all to the same file or to many different files. The error is in your program. You have a valid lock in "h" but by replacing that object with another object you are closing the stream represented by the former object (because its reference count reaches zero) which removes the lock according to POSIX. In essence, you are releasing the lock when you assign a new value to "h". In this case this happens through the invocation of the Lock instruction which opens a new stream and assigns it to "h". Then the above happens. Lock has absolutely no means to detect what variable its return value is written to to take obscure actions based on that information. Do you want it to refuse to do its job whenever it notices that it is about to replace a lock stream with another lock stream which it already opened at some point during the process' lifetime? This isn't KISS anymore. It is the same situation as assigning "h = Null". Do you think this should keep the lock open, too? If you do, there is one thing you can do about it. You can define your very personal lock class which will never close the accompanying fd, even if the lock object is destroyed. The only way you would close the fd is by an invocation of the Unlock instruction. Your last question below sort of goes into this direction, but you can't implement Lock and Unlock handlers in Gambas classes, so you would provide respective Lock()/Unlock() methods from your class or write your own native component. > How can a proc know if it already has a Lock ? > Under the premise that you use Lock and Unlock properly, this is equivalent to your lock stream being unequal to Null. Or you can use lockf on your stream's Handle property to be sure. If a valid stream object references a still valid lock. But, as I said, if you do things properly, these two tests are equivalent. "Properly" means here: before you call Lock, check if you already have it. If yes, do nothing. After you call Unlock, set your variable to Null. > Are you suggesting that before Lock is called the user should test to > see if it already has Lock ? > Yes, or you need to store all locks you acquire. As soon as one of these objects gets destroyed, your lock is free again. > In the meantime is there a recognised way of calling lockf() from within > a Gambas source file ? > Yep, Extern[0]. Regards, Tobi [0] http://gambaswiki.org/wiki/lang/extern, etc. -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From taboege at ...176... Sat Sep 13 21:40:02 2014 From: taboege at ...176... (Tobias Boege) Date: Sat, 13 Sep 2014 21:40:02 +0200 Subject: [Gambas-devel] Question about singleton class In-Reply-To: <20140913190346.GL976@...693...> References: <5410A946.6000604@...741...> <5410AF64.8080506@...1...> <5410DDB3.8090802@...741...> <54128897.4020802@...741...> <20140913043112.GG976@...693...> <541405F7.4050802@...741...> <20140913131712.GI976@...693...> <5414637F.5080500@...1...> <54148A57.7080700@...741...> <20140913190346.GL976@...693...> Message-ID: <20140913194002.GM976@...693...> On Sat, 13 Sep 2014, Tobias Boege wrote: > It is the same situation as assigning "h = Null". Do you think this should > keep the lock open, too? If you do, there is one thing you can do about it. > You can define your very personal lock class which will never close the > accompanying fd, even if the lock object is destroyed. The only way you > would close the fd is by an invocation of the Unlock instruction. Your last > question below sort of goes into this direction, but you can't implement > Lock and Unlock handlers in Gambas classes, so you would provide respective > Lock()/Unlock() methods from your class or write your own native component. > Or an even better way would be to add a static "Locks" class. This acts like an array for all your locks, so they are always referenced and never closed. -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From taboege at ...176... Sat Sep 13 22:33:44 2014 From: taboege at ...176... (Tobias Boege) Date: Sat, 13 Sep 2014 22:33:44 +0200 Subject: [Gambas-devel] Question about singleton class In-Reply-To: <20140913194002.GM976@...693...> References: <5410AF64.8080506@...1...> <5410DDB3.8090802@...741...> <54128897.4020802@...741...> <20140913043112.GG976@...693...> <541405F7.4050802@...741...> <20140913131712.GI976@...693...> <5414637F.5080500@...1...> <54148A57.7080700@...741...> <20140913190346.GL976@...693...> <20140913194002.GM976@...693...> Message-ID: <20140913203344.GN976@...693...> On Sat, 13 Sep 2014, Tobias Boege wrote: > On Sat, 13 Sep 2014, Tobias Boege wrote: > > It is the same situation as assigning "h = Null". Do you think this should > > keep the lock open, too? If you do, there is one thing you can do about it. > > You can define your very personal lock class which will never close the > > accompanying fd, even if the lock object is destroyed. The only way you > > would close the fd is by an invocation of the Unlock instruction. Your last > > question below sort of goes into this direction, but you can't implement > > Lock and Unlock handlers in Gambas classes, so you would provide respective > > Lock()/Unlock() methods from your class or write your own native component. > > > > Or an even better way would be to add a static "Locks" class. This acts like > an array for all your locks, so they are always referenced and never closed. > The attached project shows what I mean. There you have to pay zero attention to your lock variables. -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk -------------- next part -------------- A non-text attachment was scrubbed... Name: SystemwideSingleton-0.0.11.tar.gz Type: application/octet-stream Size: 4862 bytes Desc: not available URL: From jleake at ...741... Sat Sep 13 22:42:17 2014 From: jleake at ...741... (John Leake) Date: Sat, 13 Sep 2014 21:42:17 +0100 Subject: [Gambas-devel] Question about singleton class In-Reply-To: <20140913190346.GL976@...693...> References: <5410A7D5.900@...1...> <5410A946.6000604@...741...> <5410AF64.8080506@...1...> <5410DDB3.8090802@...741...> <54128897.4020802@...741...> <20140913043112.GG976@...693...> <541405F7.4050802@...741...> <20140913131712.GI976@...693...> <5414637F.5080500@...1...> <54148A57.7080700@...741...> <20140913190346.GL976@...693...> Message-ID: <5414AC29.60503@...741...> Hi Tobi, Thanks again for your reply. It looks like the Lock and Unlock implementation is a very poor abstraction of lockf() and I would go as far as to say that the functions are useless when trying to implement a system wide singleton. Why don't you just pass h by reference and hide all this low level stuff. What is the point of a high level language if the programmer has to deal with details that are of no interest to the application. Are you really suggesting that every where Lock is called the calling program should first test h to see if it already has Lock ? Some one looking at your source may see:- if h==Null then Try h = Lock 'res' if Error.Text = "" then 'We have lock. else 'Not this time. endif else 'We have lock endif Instead of:- Try h = Lock 'res' if Error.text == "" then if Error.Text = "" then 'We have lock. else 'Not this time. endif endif The former example will definitely prevent any multi-threading from ever getting into Gambas. The latter will still work if some complex code ends up calling Lock twice. > You can call Lock as often as resources permit to gain as many valid locks, > all to the same file or to many different files. If two procs are granted Lock to the same resource it is a bug. > during the process' lifetime? This isn't KISS anymore. Sorry 'KISS' - what is this ? > Under the premise that you use Lock and Unlock properly, this is equivalent > to your lock stream being unequal to Null. You are assuming that complex software written by large teams of engineers contain exact Lock Unlock pairs (pie in the sky I think). > Yep, Extern[0]. Thank you I will use Extern instead. Best regards, John From jleake at ...741... Sat Sep 13 22:52:33 2014 From: jleake at ...741... (John Leake) Date: Sat, 13 Sep 2014 21:52:33 +0100 Subject: [Gambas-devel] Question about singleton class In-Reply-To: <20140913203344.GN976@...693...> References: <5410AF64.8080506@...1...> <5410DDB3.8090802@...741...> <54128897.4020802@...741...> <20140913043112.GG976@...693...> <541405F7.4050802@...741...> <20140913131712.GI976@...693...> <5414637F.5080500@...1...> <54148A57.7080700@...741...> <20140913190346.GL976@...693...> <20140913194002.GM976@...693...> <20140913203344.GN976@...693...> Message-ID: <5414AE91.9070908@...741...> >> Or an even better way would be to add a static "Locks" class. This acts like >> an array for all your locks, so they are always referenced and never closed. >> > > The attached project shows what I mean. There you have to pay zero attention > to your lock variables. > Thank you very much. I will use this instead of Extern. This way there is a better chance that platform independence can me managed more easily. I still think that all this additional code could be avoided by passing h by ref ? From gambas at ...1... Mon Sep 15 22:19:55 2014 From: gambas at ...1... (=?UTF-8?B?QmVub8OudCBNaW5pc2luaQ==?=) Date: Mon, 15 Sep 2014 22:19:55 +0200 Subject: [Gambas-devel] Release of Gambas 3.6? Message-ID: <541749EB.7060903@...1...> Hi, I'd like to release Gambas 3.6 "soon". @Fabien: Is there anything important that muse be done in gb.report or gb.map before? @Tobias: Have you finished with gb.data? -- Beno?t Minisini From taboege at ...176... Mon Sep 15 22:47:01 2014 From: taboege at ...176... (Tobias Boege) Date: Mon, 15 Sep 2014 22:47:01 +0200 Subject: [Gambas-devel] Release of Gambas 3.6? In-Reply-To: <541749EB.7060903@...1...> References: <541749EB.7060903@...1...> Message-ID: <20140915204701.GC4437@...693...> On Mon, 15 Sep 2014, Beno??t Minisini wrote: > Hi, > > I'd like to release Gambas 3.6 "soon". > > @Fabien: Is there anything important that muse be done in gb.report or > gb.map before? > > @Tobias: Have you finished with gb.data? > AFAICS, the Graph foundation is finished. I'll try to commit a Trie class the next day(s). But either way, gb.data will be in a consistent state. PS: For 3.7 I want to target mainly trees. Randall Morgan wants a freely navigatable Tree class (with variable number of children on each node, I guess). There are some search tree classes I can steal from libtree[0]. And I want to provide some standard algorithms (like the BreadthFirstSearch class I wrote for the ImageGraph project) in the Gambas part of gb.data. [0] https://github.com/fbuihuu/libtree -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From willy at ...732... Mon Sep 22 00:55:37 2014 From: willy at ...732... (Willy Raets) Date: Mon, 22 Sep 2014 00:55:37 +0200 Subject: [Gambas-devel] Commits rev# 6491 and 6492 Message-ID: <1411340137.3278.47.camel@...735...> Hi all, I added Dutch translations for the Networking examples in two commits. I accidentally wrote [Examples] instead of [EXAMPLES] in uppercase as requested on Gambas wiki. My apologies and I hope this brings no inconvenience. Another strange thing happed. For the HTTPGet example in iDE I accidentally translated in empty English instead of adding an empty Dutch file. This is because I always run systems with English instead of Dutch, so English appears default in IDE translator form. When I discovered this, in a file manager, I simply renamed the .mo and .po files to nl.mo and nl.po and I could see them in IDE. I then, in IDE, I cleared the English translations. I had to update from IDE before I could commit. When I commited the revision I saw the en_GB.mo and .po file pass by but no nl.mo or .po, although they are in the same folder on my system. What went wrong and why are the nl.po and .mo file not uploaded? And how to correct? I ask this so I understand and don't make the same mistakes twice. -- Kind regards, Willy (aka gbWilly) http://gambasshowcase.org/ http://howtogambas.org http://gambos.org From gambas at ...1... Mon Sep 22 05:00:51 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Mon, 22 Sep 2014 05:00:51 +0200 Subject: [Gambas-devel] Commits rev# 6491 and 6492 In-Reply-To: <1411340137.3278.47.camel@...735...> References: <1411340137.3278.47.camel@...735...> Message-ID: <541F90E3.4000308@...1...> Le 22/09/2014 00:55, Willy Raets a ?crit : > Hi all, > > I added Dutch translations for the Networking examples in two commits. > > I accidentally wrote [Examples] instead of [EXAMPLES] in uppercase as > requested on Gambas wiki. > > My apologies and I hope this brings no inconvenience. > > Another strange thing happed. For the HTTPGet example in iDE I > accidentally translated in empty English instead of adding an empty > Dutch file. This is because I always run systems with English instead of > Dutch, so English appears default in IDE translator form. > > When I discovered this, in a file manager, I simply renamed the .mo > and .po files to nl.mo and nl.po and I could see them in IDE. > I then, in IDE, I cleared the English translations. > > I had to update from IDE before I could commit. > > When I commited the revision I saw the en_GB.mo and .po file pass by but > no nl.mo or .po, although they are in the same folder on my system. > > What went wrong and why are the nl.po and .mo file not uploaded? And how > to correct? I ask this so I understand and don't make the same mistakes > twice. > > You must rename files by using "svn move", otherwise subversion is not aware that the files have been renamed, and you get two missing files and two new files that are not versioned, and things start going bad... -- Beno?t Minisini From taboege at ...176... Mon Sep 22 16:04:47 2014 From: taboege at ...176... (Tobias Boege) Date: Mon, 22 Sep 2014 16:04:47 +0200 Subject: [Gambas-devel] GB_DECLARE_STATIC makes empty classes Message-ID: <20140922140447.GE684@...693...> Hi Benoit, you told me recently to use GB_DECLARE_VIRTUAL instead of GB_DECLARE and GB_VIRTUAL_CLASS. There is a problem with the GB_NOT_CREATABLE() pendant of this: GB_DECLARE_STATIC sets the object size (2nd argument to GB_DECLARE) to zero which may not be appropriate for all non-instantiable classes, e.g. Stream in the interpreter whose class contains data but can not be created at will (i.e. using New). This sort of thing. Is this worth doing something about? Adding a second argument would break, according to grep, 17 places, so nothing which I couldn't fix along... Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From gambas at ...1... Mon Sep 22 16:10:32 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Mon, 22 Sep 2014 16:10:32 +0200 Subject: [Gambas-devel] GB_DECLARE_STATIC makes empty classes In-Reply-To: <20140922140447.GE684@...693...> References: <20140922140447.GE684@...693...> Message-ID: <54202DD8.4070808@...1...> Le 22/09/2014 16:04, Tobias Boege a ?crit : > Hi Benoit, > > you told me recently to use GB_DECLARE_VIRTUAL instead of GB_DECLARE and > GB_VIRTUAL_CLASS. There is a problem with the GB_NOT_CREATABLE() pendant > of this: GB_DECLARE_STATIC sets the object size (2nd argument to GB_DECLARE) > to zero which may not be appropriate for all non-instantiable classes, e.g. > Stream in the interpreter whose class contains data but can not be created > at will (i.e. using New). This sort of thing. Is this worth doing something > about? > > Adding a second argument would break, according to grep, 17 places, so > nothing which I couldn't fix along... > > Regards, > Tobi > If your class is not static but not instanciable, you must not use GB_DECLARE_STATIC(), but GB_DECLARE() + GB_NOT_CREATABLE(). You use GB_DECLARE_VIRTUAL() for true virtual classes only, even if makes not a lot of difference with GB_DECLARE_STATIC() behind the curtain. Regards, -- Beno?t Minisini From mckaygerhard at ...176... Mon Sep 22 17:11:47 2014 From: mckaygerhard at ...176... (PICCORO McKAY Lenz) Date: Mon, 22 Sep 2014 10:41:47 -0430 Subject: [Gambas-devel] Release of Gambas 3.6? Message-ID: > > From: Beno?t Minisini > > Hi, > > I'd like to release Gambas 3.6 "soon". > Thanks benoit for this great work, gambas as a solution of many complicated languajes such python and php are easy to my man powers that do not know nothing about linux!!! i have some questions: 1. there's will be included the help (at least on english) offline? (VERY IMPORTANT when developer are in journeis working on a laptop) 2. gtk2 its still supoorted fully as qt and gtk3? this are important for me due i already have too many project implementd with older version of linux!!!!! 3. there's some problems loading binary files from sqlite db's example (for ejemp: wtable!ccolumn = File.Load(binary.bin) and then File.Save(binary2.bin, wtable!column.Data dont work, the resulting binary2.bin are different respect binary.bin original; if necesary i can report a bug issue again?) 4. wiki markup and example are ready to 3.6 and stable -------------- next part -------------- An HTML attachment was scrubbed... URL: From gambas at ...1... Mon Sep 22 17:38:47 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Mon, 22 Sep 2014 17:38:47 +0200 Subject: [Gambas-devel] Release of Gambas 3.6? In-Reply-To: References: Message-ID: <54204287.7000705@...1...> Le 22/09/2014 17:11, PICCORO McKAY Lenz a ?crit : > From: Beno?t Minisini > > > Hi, > > I'd like to release Gambas 3.6 "soon". > > Thanks benoit for this great work, gambas as a solution of many > complicated languajes such python and php are easy to my man powers that > do not know nothing about linux!!! > > i have some questions: > > 1. there's will be included the help (at least on english) offline? > (VERY IMPORTANT when developer are in journeis working on a laptop) Gambas 3.6 = /trunk So if you have the offline help in /trunk, you will get it in Gambas 3.6. > 2. gtk2 its still supoorted fully as qt and gtk3? this are important > for me due i already have too many project implementd with older > version of linux!!!!! Yes. There are too many problems with GTK+3 to drop GTK+2. > 3. there's some problems loading binary files from sqlite db's example > (for ejemp: wtable!ccolumn = File.Load(binary.bin) and then > File.Save(binary2.bin, wtable!column.Data dont work, the resulting > binary2.bin are different respect binary.bin original; if necesary i > can report a bug issue again?) I need a little project that reproduces the bug. > 4. wiki markup and example are ready to 3.6 and stable "wiki markup"? What are you talking about? -- Beno?t Minisini From taboege at ...176... Mon Sep 22 17:41:25 2014 From: taboege at ...176... (Tobias Boege) Date: Mon, 22 Sep 2014 17:41:25 +0200 Subject: [Gambas-devel] Release of Gambas 3.6? In-Reply-To: <20140915204701.GC4437@...693...> References: <541749EB.7060903@...1...> <20140915204701.GC4437@...693...> Message-ID: <20140922154125.GF684@...693...> On Mon, 15 Sep 2014, Tobias Boege wrote: > On Mon, 15 Sep 2014, Beno??t Minisini wrote: > > Hi, > > > > I'd like to release Gambas 3.6 "soon". > > > > @Fabien: Is there anything important that muse be done in gb.report or > > gb.map before? > > > > @Tobias: Have you finished with gb.data? > > > > AFAICS, the Graph foundation is finished. I'll try to commit a Trie class > the next day(s). But either way, gb.data will be in a consistent state. > I am on the Trie class now. If you could wait with your release preparations until tomorrow and no unforeseen complications arise, I can get that class in. -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From gambas.fr at ...176... Mon Sep 22 18:05:48 2014 From: gambas.fr at ...176... (Fabien Bodard) Date: Mon, 22 Sep 2014 18:05:48 +0200 Subject: [Gambas-devel] Release of Gambas 3.6? In-Reply-To: <541749EB.7060903@...1...> References: <541749EB.7060903@...1...> Message-ID: 2014-09-15 22:19 GMT+02:00 Beno?t Minisini : > Hi, > > I'd like to release Gambas 3.6 "soon". > > @Fabien: Is there anything important that muse be done in gb.report or > gb.map before? Well it is Harvesting time ... (Grappes cutting). Yes i have any things to do on gb.report such as finding why the automatic clone index working so strangely. and many mini things. AT this state it can wait the next release. I have added the beginnig for a shadow support in a css3 way. It work quite well but only by code (the editor is not done yet) for gb.map... hum ...in december ? > > @Tobias: Have you finished with gb.data? > > -- > Beno?t Minisini > > ------------------------------------------------------------------------------ > Want excitement? > Manually upgrade your production database. > When you want reliability, choose Perforce > Perforce version control. Predictably reliable. > http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk > _______________________________________________ > Gambas-devel mailing list > Gambas-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-devel -- Fabien Bodard From gambas at ...1... Mon Sep 22 18:12:37 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Mon, 22 Sep 2014 18:12:37 +0200 Subject: [Gambas-devel] Release of Gambas 3.6? In-Reply-To: <20140922154125.GF684@...693...> References: <541749EB.7060903@...1...> <20140915204701.GC4437@...693...> <20140922154125.GF684@...693...> Message-ID: <54204A75.6070604@...1...> Le 22/09/2014 17:41, Tobias Boege a ?crit : > On Mon, 15 Sep 2014, Tobias Boege wrote: >> On Mon, 15 Sep 2014, Beno??t Minisini wrote: >>> Hi, >>> >>> I'd like to release Gambas 3.6 "soon". >>> >>> @Fabien: Is there anything important that muse be done in gb.report or >>> gb.map before? >>> >>> @Tobias: Have you finished with gb.data? >>> >> >> AFAICS, the Graph foundation is finished. I'll try to commit a Trie class >> the next day(s). But either way, gb.data will be in a consistent state. >> > > I am on the Trie class now. If you could wait with your release preparations > until tomorrow and no unforeseen complications arise, I can get that class > in. > I won't do the release immediately, because I have just added support for collation in gb.db and sql drivers, so I want to be sure that every database things still work. :-) You just have to be sure about your interfaces. It's not dramatic if they are bugs, because you can fix them in point releases. But you won't be able to fix the interface of your component! Regards, -- Beno?t Minisini From gambas.fr at ...176... Mon Sep 22 22:07:18 2014 From: gambas.fr at ...176... (Fabien Bodard) Date: Mon, 22 Sep 2014 22:07:18 +0200 Subject: [Gambas-devel] Release of Gambas 3.6? Message-ID: ---------- Forwarded message ---------- From: Fabien Bodard Date: 2014-09-22 22:04 GMT+02:00 Subject: Re: [Gambas-devel] Release of Gambas 3.6? To: Benoit Minisini > > Did you see I added Paint.DrawTextShadow() and Paint.DrawRichTextShadow() to > help drawing text with shadows? Yes Benoit, even if i have not so many time i take time to read all Svn notification. ;-) I have just added the BoxShadow. With XOffset, YOffset, Blur,Spread ReportLabel3.BoxShadow.XOffset = "1mm" ReportLabel3.BoxShadow.YOffset = "1mm" ReportLabel3.BoxShadow.Blur = "1mm" > > -- > Beno?t Minisini -- Fabien Bodard -- Fabien Bodard -------------- next part -------------- A non-text attachment was scrubbed... Name: capture d'?cran26.png Type: image/png Size: 46288 bytes Desc: not available URL: From willy at ...732... Mon Sep 22 22:36:03 2014 From: willy at ...732... (Willy Raets) Date: Mon, 22 Sep 2014 22:36:03 +0200 Subject: [Gambas-devel] Commits rev# 6491 and 6492 In-Reply-To: <541F90E3.4000308@...1...> References: <1411340137.3278.47.camel@...735...> <541F90E3.4000308@...1...> Message-ID: <1411418163.5486.3.camel@...735...> On ma, 2014-09-22 at 05:00 +0200, Beno?t Minisini wrote: > Le 22/09/2014 00:55, Willy Raets a ?crit : > > Hi all, > > > > I added Dutch translations for the Networking examples in two commits. > > > > I accidentally wrote [Examples] instead of [EXAMPLES] in uppercase as > > requested on Gambas wiki. > > > > My apologies and I hope this brings no inconvenience. > > > > Another strange thing happed. For the HTTPGet example in iDE I > > accidentally translated in empty English instead of adding an empty > > Dutch file. This is because I always run systems with English instead of > > Dutch, so English appears default in IDE translator form. > > > > When I discovered this, in a file manager, I simply renamed the .mo > > and .po files to nl.mo and nl.po and I could see them in IDE. > > I then, in IDE, I cleared the English translations. > > > > I had to update from IDE before I could commit. > > > > When I commited the revision I saw the en_GB.mo and .po file pass by but > > no nl.mo or .po, although they are in the same folder on my system. > > > > What went wrong and why are the nl.po and .mo file not uploaded? And how > > to correct? I ask this so I understand and don't make the same mistakes > > twice. > > > > > > You must rename files by using "svn move", otherwise subversion is not > aware that the files have been renamed, and you get two missing files > and two new files that are not versioned, and things start going bad... > Thank you, I have corrected the problem and made sure the HTTPGet dutch translation is now seen by subversion. Rev. #6495 contained the Ditch .po and .mo. I'll try to check as much of trunk for Dutch translations as possible in the upcoming days, so as much as possible is translated to Dutch for 3.6 release. -- Kind regards, Willy (aka gbWilly) http://gambasshowcase.org/ http://howtogambas.org http://gambos.org From willy at ...732... Mon Sep 22 23:28:35 2014 From: willy at ...732... (Willy Raets) Date: Mon, 22 Sep 2014 23:28:35 +0200 Subject: [Gambas-devel] Short question on slots in subversion revision log Message-ID: <1411421315.5486.7.camel@...735...> Short question before I commit the Dutch translations. In what slots of the revision log do I place: doc.cgi gambas-wiki gb.wiki I checked instructions at: http://gambaswiki.org/wiki/howto/svn Can it be [WIKI CGI SCRIPT]? -- Kind regards, Willy (aka gbWilly) http://gambasshowcase.org/ http://howtogambas.org http://gambos.org From mckaygerhard at ...176... Mon Sep 22 23:55:41 2014 From: mckaygerhard at ...176... (PICCORO McKAY Lenz) Date: Mon, 22 Sep 2014 17:25:41 -0430 Subject: [Gambas-devel] Release of Gambas 3.6? Message-ID: hi again.. also will' still gambas be compilable in older distributions (excep for git and media components) currently i have running gambas 3.5 and/or 3.4 in debian lenny jejeje that's its the most important for me...specially the web and wiki components >> 3. there's some problems loading binary files from sqlite db's example >> (for ejemp: wtable!ccolumn = File.Load(binary.bin) and then >> File.Save(binary2.bin, wtable!column.Data dont work, the resulting >> binary2.bin are different respect binary.bin original; if necesary i >> can report a bug issue again?) >I need a little project that reproduces the bug. ufff ok ok , i'll report a bug with a little project and a binary file.. >> 4. wiki markup and example are ready to 3.6 and stable >"wiki markup"? What are you talking about? i mean that components that made posible the wiki/help feature offline such gb.markdown and complete stable gb.web also the examples of small wiki! Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com From taboege at ...176... Mon Sep 22 23:55:12 2014 From: taboege at ...176... (Tobias Boege) Date: Mon, 22 Sep 2014 23:55:12 +0200 Subject: [Gambas-devel] Short question on slots in subversion revision log In-Reply-To: <1411421315.5486.7.camel@...735...> References: <1411421315.5486.7.camel@...735...> Message-ID: <20140922215512.GI684@...693...> On Mon, 22 Sep 2014, Willy Raets wrote: > Short question before I commit the Dutch translations. > > In what slots of the revision log do I place: > doc.cgi > gambas-wiki > gb.wiki > > > I checked instructions at: http://gambaswiki.org/wiki/howto/svn > Can it be [WIKI CGI SCRIPT]? > This answer may be too late but: - doc.cgi is the old wiki; in a recent commit (#6487) Benoit used the slot [OLD WIKI CGI SCRIPT], - gambas-wiki is the current wiki. [WIKI CGI SCRIPT] is right and - gb.wiki is an unfinished attempt of a modular wiki by Sebastian Kulesz, it is not used by anyone (?). [GB.WIKI] was the slot he used, although it's not a component. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From gambas at ...1... Tue Sep 23 00:04:11 2014 From: gambas at ...1... (=?UTF-8?B?QmVub8OudCBNaW5pc2luaQ==?=) Date: Tue, 23 Sep 2014 00:04:11 +0200 Subject: [Gambas-devel] Release of Gambas 3.6? In-Reply-To: <54209CC0.3070203@...1...> References: <54209CC0.3070203@...1...> Message-ID: <54209CDB.9010700@...1...> Le 22/09/2014 22:04, Fabien Bodard a ?crit : >> >> Did you see I added Paint.DrawTextShadow() and Paint.DrawRichTextShadow() to >> help drawing text with shadows? > Yes Benoit, even if i have not so many time i take time to read all > Svn notification. ;-) > > I have just added the BoxShadow. With XOffset, YOffset, Blur,Spread > > ReportLabel3.BoxShadow.XOffset = "1mm" > ReportLabel3.BoxShadow.YOffset = "1mm" > ReportLabel3.BoxShadow.Blur = "1mm" > > Don't forget that shadow blur radius is an integer amount of pixels, and that pixels are device-dependents! -- Beno?t Minisini From willy at ...732... Tue Sep 23 00:08:06 2014 From: willy at ...732... (Willy Raets) Date: Tue, 23 Sep 2014 00:08:06 +0200 Subject: [Gambas-devel] Short question on slots in subversion revision log In-Reply-To: <20140922215512.GI684@...693...> References: <1411421315.5486.7.camel@...735...> <20140922215512.GI684@...693...> Message-ID: <1411423686.5486.8.camel@...735...> On ma, 2014-09-22 at 23:55 +0200, Tobias Boege wrote: > On Mon, 22 Sep 2014, Willy Raets wrote: > > Short question before I commit the Dutch translations. > > > > In what slots of the revision log do I place: > > doc.cgi > > gambas-wiki > > gb.wiki > > > > > > I checked instructions at: http://gambaswiki.org/wiki/howto/svn > > Can it be [WIKI CGI SCRIPT]? > > > > This answer may be too late but: Yes, too late > > - doc.cgi is the old wiki; in a recent commit (#6487) Benoit used the slot > [OLD WIKI CGI SCRIPT], > - gambas-wiki is the current wiki. [WIKI CGI SCRIPT] is right and > - gb.wiki is an unfinished attempt of a modular wiki by Sebastian Kulesz, > it is not used by anyone (?). [GB.WIKI] was the slot he used, although > it's not a component. > > Regards, > Tobi Good to know anyway for next time. Thanks > -- Kind regards, Willy (aka gbWilly) http://gambasshowcase.org/ http://howtogambas.org http://gambos.org From willy at ...732... Tue Sep 23 02:20:17 2014 From: willy at ...732... (Willy Raets) Date: Tue, 23 Sep 2014 02:20:17 +0200 Subject: [Gambas-devel] A note on the MakeWebSite project Message-ID: <1411431617.5486.12.camel@...735...> I did a complete Dutch translation of the MakeWebSite project and committed it. I guess if a Dutch flag and some code changes where done, Gambas main site can be viewed in Dutch as well :) Attached a Dutch flag, if you might look for one. -- Kind regards, Willy (aka gbWilly) http://gambasshowcase.org/ http://howtogambas.org http://gambos.org -------------- next part -------------- A non-text attachment was scrubbed... Name: Netherlands.png Type: image/png Size: 209 bytes Desc: not available URL: From taboege at ...176... Wed Sep 24 14:34:12 2014 From: taboege at ...176... (Tobias Boege) Date: Wed, 24 Sep 2014 14:34:12 +0200 Subject: [Gambas-devel] GB.Realloc() on NULL pointers Message-ID: <20140924123412.GH868@...693...> Hi Benoit, I saw that GB.Realloc() can't deal with NULL pointers. The manpage of my C library's realloc says: "If ptr is NULL, then the call is equivalent to malloc(size)". Do you think this would be good in GB.Realloc(), too, or should I implement this logic myself? -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From gambas at ...1... Wed Sep 24 17:39:22 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Wed, 24 Sep 2014 17:39:22 +0200 Subject: [Gambas-devel] GB.Realloc() on NULL pointers In-Reply-To: <20140924123412.GH868@...693...> References: <20140924123412.GH868@...693...> Message-ID: <5422E5AA.30900@...1...> Le 24/09/2014 14:34, Tobias Boege a ?crit : > Hi Benoit, > > I saw that GB.Realloc() can't deal with NULL pointers. The manpage of my C > library's realloc says: > > "If ptr is NULL, then the call is equivalent to malloc(size)". > > Do you think this would be good in GB.Realloc(), too, or should I implement > this logic myself? > I will add it. I didn't use that feature because if I see a function named "realloc", it for re-allocating things, not for allocating it for the first time. :-) -- Beno?t Minisini From gambas at ...1... Wed Sep 24 17:40:49 2014 From: gambas at ...1... (=?windows-1252?Q?Beno=EEt_Minisini?=) Date: Wed, 24 Sep 2014 17:40:49 +0200 Subject: [Gambas-devel] A note on the MakeWebSite project In-Reply-To: <1411431617.5486.12.camel@...735...> References: <1411431617.5486.12.camel@...735...> Message-ID: <5422E601.8060504@...1...> Le 23/09/2014 02:20, Willy Raets a ?crit : > I did a complete Dutch translation of the MakeWebSite project and > committed it. > > I guess if a Dutch flag and some code changes where done, Gambas main > site can be viewed in Dutch as well :) > > Attached a Dutch flag, if you might look for one. > > I updated the project with your new translation. I didn't use your flag, because it was not the same size and inner gradient as the others. Note that most of the web site is actually pages from the wiki, which are usually not translated. Regards, -- Beno?t Minisini From willy at ...732... Wed Sep 24 18:17:45 2014 From: willy at ...732... (Willy Raets) Date: Wed, 24 Sep 2014 18:17:45 +0200 Subject: [Gambas-devel] A note on the MakeWebSite project In-Reply-To: <5422E601.8060504@...1...> References: <1411431617.5486.12.camel@...735...> <5422E601.8060504@...1...> Message-ID: <1411575465.3390.4.camel@...735...> On wo, 2014-09-24 at 17:40 +0200, Beno?t Minisini wrote: > Le 23/09/2014 02:20, Willy Raets a ?crit : > > I did a complete Dutch translation of the MakeWebSite project and > > committed it. > > > > I guess if a Dutch flag and some code changes where done, Gambas main > > site can be viewed in Dutch as well :) > > > > Attached a Dutch flag, if you might look for one. > > > > > > I updated the project with your new translation. I didn't use your flag, > because it was not the same size and inner gradient as the others. I've seen your update. Thanks > > Note that most of the web site is actually pages from the wiki, which > are usually not translated. I've seen that to. I'll try to translate some of ones directly linked to the main page menu into Dutch, but I won't manage (time wise) to translate the whole wiki:) I also noticed some small translation errors in MakeWebSite project that I will correct a.s.p. -- Kind regards, Willy (aka gbWilly) http://gambasshowcase.org/ http://howtogambas.org http://gambos.org From taboege at ...176... Sun Sep 28 22:02:03 2014 From: taboege at ...176... (Tobias Boege) Date: Sun, 28 Sep 2014 22:02:03 +0200 Subject: [Gambas-devel] [Gambas-devel-svn] SF.net SVN: gambas:[6515] gambas/trunk/main/lib/data In-Reply-To: References: Message-ID: <20140928200203.GB1232@...693...> On Sun, 28 Sep 2014, tobiasboe at ...1... wrote: > Revision: 6515 > http://sourceforge.net/p/gambas/code/6515 > Author: tobiasboe > Date: 2014-09-28 20:01:52 +0000 (Sun, 28 Sep 2014) With this commit, all I wanted to do on gb.data is done. For all I care, 3.6 can be released :-) -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk