From shordi at ...626... Tue Apr 1 09:44:24 2014 From: shordi at ...626... (=?ISO-8859-1?Q?Jorge_Carri=F3n?=) Date: Tue, 1 Apr 2014 09:44:24 +0200 Subject: [Gambas-user] About Dirview control. Message-ID: Benoit: Related with my last message about a Dirview problem (can't create a Folder when the folder's list its too big for be shown in screen and the "New Folder" line isn't visible), I've found a solution... but I don't know if it's a bug or just a bad use of class by my side. I've downloaded the DirView Class code from Gambasdoc and -after comment the Inherits UserControl Line- I've modified the NewFolder sub: Public Sub NewFolder() Dim sDir As String Dim sPath As String Dim iInd As Integer Dim clave As String sDir = ("New Folder") clave = $hTreeView.Current.Key iInd = 1 Do If Not Exist(clave &/ sDir) Then Break Inc iInd sDir = ("New Folder") & " (" & CStr(iInd) & ")" Loop sPath = clave &/ sDir Mkdir sPath AddDir(clave, sDir) $bDeleteOnCancel = True $bInRename = True ' 'The next two lines are mine $hTreeView[sPath].EnsureVisible Wait 0.01 $hTreeView[sPath].Rename Catch Message.Error(("Cannot create directory.") & "\n\n" & Error.Text) End Now it works as I expected -The new Folder is created even it's row isn't visible-. BUT I don't know if this modification is "correct" or interferes in some other behaviour of the class... Can you give some feedback about this topic? Regards From nigelverity at ...67... Tue Apr 1 15:21:18 2014 From: nigelverity at ...67... (Nigel Verity) Date: Tue, 1 Apr 2014 14:21:18 +0100 Subject: [Gambas-user] DataControl Validation Message-ID: Hi I have posted a couple of questions recently on using the data-bound controls. My long-term aim is to design some template applications, combining Gambas3 with Sqlite, to fill the role of MS Access on Linux for creating "quick and simple" databases. LibreOffice Base is such a poor tool for developing database applications, I am convinced that Gambas provides a much more effective platform. The .validate() procedure on the datacontrol enables values to be tested and modified before saving. If the validation rules require that the record save be abandoned, this is achieved very simply using the STOP EVENT statement. However, this causes the display of a message box showing "Invalid value". Is it possible to suppress this message box or to modify its text? I am using 3.1.1 on Debian. Thanks Nige From pinozollo at ...626... Wed Apr 2 13:38:56 2014 From: pinozollo at ...626... (Pino Zollo) Date: Wed, 02 Apr 2014 07:38:56 -0400 Subject: [Gambas-user] FileChooser Message-ID: <533BF6D0.7000500@...626...> HI, Please, can somebody point me to an example of code using FileChooser ? I would like to do something like in the IDE when "Projec-Create-SourceCode" Thanks Pino From taboege at ...626... Wed Apr 2 13:49:52 2014 From: taboege at ...626... (Tobias Boege) Date: Wed, 2 Apr 2014 13:49:52 +0200 Subject: [Gambas-user] FileChooser In-Reply-To: <533BF6D0.7000500@...626...> References: <533BF6D0.7000500@...626...> Message-ID: <20140402114952.GA513@...2774...> On Wed, 02 Apr 2014, Pino Zollo wrote: > HI, > > Please, can somebody point me to an example of code using FileChooser ? > > I would like to do something like in the IDE when "Projec-Create-SourceCode" > You want to do something like in the IDE... So why not look at the IDE's source code[0]? Is it too complicated for your learning curve? Regards, Tobi [0] http://sourceforge.net/p/gambas/code/HEAD/tree/gambas/trunk/app/src/gambas3/ -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From vkanatas13 at ...626... Thu Apr 3 08:07:32 2014 From: vkanatas13 at ...626... (Vasilis Kanatas) Date: Thu, 3 Apr 2014 09:07:32 +0300 Subject: [Gambas-user] How to overcome: Bytecode too recent. Please upgrade Gambas Message-ID: I have made a project on Gambas 3.5.2 (on OpenSuse 13.1) which works fine! Now I try to open it with Gambas 3.3.4 (on Puppy Slacko 0.5.7) and get the message: "Bytecode too recet. Please upgrade Gambas" I have tried to delete temporary Gambas files from /tmp but nothing! Unfortunately on Puppy there is no gambas 3.5.2 sfs ready yet! Should I try to compile the 3.5.2 ? Will it compile and get installed? Is there any other easier way to fix the problem? From jusabejusabe at ...626... Thu Apr 3 09:41:53 2014 From: jusabejusabe at ...626... (Julio Sanchez) Date: Thu, 3 Apr 2014 09:41:53 +0200 Subject: [Gambas-user] How to overcome: Bytecode too recent. Please upgrade Gambas In-Reply-To: References: Message-ID: Hello Vasilis "Is there any other easier way to fix the problem?" Yes, Load the project (source) in Gambas 3.3.4, and compile it there again. So the executable (or the installation package) that you can use it creees. regards 2014-04-03 8:07 GMT+02:00 Vasilis Kanatas : > I have made a project on Gambas 3.5.2 (on OpenSuse 13.1) which works fine! > Now I try to open it with Gambas 3.3.4 (on Puppy Slacko 0.5.7) and get the > message: > "Bytecode too recet. Please upgrade Gambas" > I have tried to delete temporary Gambas files from /tmp but nothing! > Unfortunately on Puppy there is no gambas 3.5.2 sfs ready yet! > Should I try to compile the 3.5.2 ? Will it compile and get installed? > Is there any other easier way to fix the problem? > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From vkanatas13 at ...626... Thu Apr 3 10:09:11 2014 From: vkanatas13 at ...626... (Vasilis Kanatas) Date: Thu, 3 Apr 2014 11:09:11 +0300 Subject: [Gambas-user] How to overcome: Bytecode too recent. Please upgrade Gambas In-Reply-To: References: Message-ID: Hello Julio, thanks for replying! I'm opening (or loading as you said) the project with Gambas 3.3.4 and get the message : Bytecode too recent.... (at this point the program stops!) I cannot get to run the project because it's not loaded! On Thu, Apr 3, 2014 at 10:41 AM, Julio Sanchez wrote: > Hello Vasilis > "Is there any other easier way to fix the problem?" > Yes, Load the project (source) in Gambas 3.3.4, and compile it there again. > So the executable (or the installation package) that you can use it creees. > > regards > > > 2014-04-03 8:07 GMT+02:00 Vasilis Kanatas : > > > I have made a project on Gambas 3.5.2 (on OpenSuse 13.1) which works > fine! > > Now I try to open it with Gambas 3.3.4 (on Puppy Slacko 0.5.7) and get > the > > message: > > "Bytecode too recet. Please upgrade Gambas" > > I have tried to delete temporary Gambas files from /tmp but nothing! > > Unfortunately on Puppy there is no gambas 3.5.2 sfs ready yet! > > Should I try to compile the 3.5.2 ? Will it compile and get installed? > > Is there any other easier way to fix the problem? > > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From shordi at ...626... Thu Apr 3 10:24:40 2014 From: shordi at ...626... (=?ISO-8859-1?Q?Jorge_Carri=F3n?=) Date: Thu, 3 Apr 2014 10:24:40 +0200 Subject: [Gambas-user] How to overcome: Bytecode too recent. Please upgrade Gambas In-Reply-To: References: Message-ID: Vasili, I think that you have to delete all compliated files on .gambas folder inside the downlade code before try to open it! Regards 2014-04-03 10:09 GMT+02:00 Vasilis Kanatas : > Hello Julio, > thanks for replying! > I'm opening (or loading as you said) the project with Gambas 3.3.4 > and get the message : Bytecode too recent.... (at this point the program > stops!) > I cannot get to run the project because it's not loaded! > > > > On Thu, Apr 3, 2014 at 10:41 AM, Julio Sanchez >wrote: > > > Hello Vasilis > > "Is there any other easier way to fix the problem?" > > Yes, Load the project (source) in Gambas 3.3.4, and compile it there > again. > > So the executable (or the installation package) that you can use it > creees. > > > > regards > > > > > > 2014-04-03 8:07 GMT+02:00 Vasilis Kanatas : > > > > > I have made a project on Gambas 3.5.2 (on OpenSuse 13.1) which works > > fine! > > > Now I try to open it with Gambas 3.3.4 (on Puppy Slacko 0.5.7) and get > > the > > > message: > > > "Bytecode too recet. Please upgrade Gambas" > > > I have tried to delete temporary Gambas files from /tmp but nothing! > > > Unfortunately on Puppy there is no gambas 3.5.2 sfs ready yet! > > > Should I try to compile the 3.5.2 ? Will it compile and get installed? > > > Is there any other easier way to fix the problem? > > > > > > > > > ------------------------------------------------------------------------------ > > > _______________________________________________ > > > Gambas-user mailing list > > > Gambas-user at lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From eilert-sprachen at ...221... Thu Apr 3 11:17:11 2014 From: eilert-sprachen at ...221... (Rolf-Werner Eilert) Date: Thu, 03 Apr 2014 11:17:11 +0200 Subject: [Gambas-user] Documentation about gb.web Message-ID: <533D2717.1030009@...221...> Just browsed through the documentation for gb.web and this made me wonder: In the example on http://gambaswiki.org/wiki/doc/webpage aren't the two code snippets swapped? I mean, when I think about what the text says, this one <>

Gambas WebPage are easy!

Time is <%=Format(Now, "hh:nn:ss")%>

<
> should be the includED page, the other one the includING one. In other words, the big one is the Main.Webpage and the small one the Page.Webpage. Or haven't I got it yet? Regards Rolf From vkanatas13 at ...626... Thu Apr 3 12:32:22 2014 From: vkanatas13 at ...626... (Vasilis Kanatas) Date: Thu, 3 Apr 2014 13:32:22 +0300 Subject: [Gambas-user] How to overcome: Bytecode too recent. Please upgrade Gambas In-Reply-To: References: Message-ID: Actually, I run the project and it stops when loading the first class with this message: Cannot load class "Arxiki". Bytecode too recent. Please upgrade Gambas. I deleted all compiled files in the project (I suppose they are the class~ files ) and still get the same message. I also deleted every other file except for the .form and .class files, and still the same! (My project is from gambas 2.0, so it has two folders) On Thu, Apr 3, 2014 at 11:24 AM, Jorge Carri?n wrote: > Vasili, I think that you have to delete all compliated files on .gambas > folder inside the downlade code before try to open it! > > Regards > > > 2014-04-03 10:09 GMT+02:00 Vasilis Kanatas : > > > Hello Julio, > > thanks for replying! > > I'm opening (or loading as you said) the project with Gambas 3.3.4 > > and get the message : Bytecode too recent.... (at this point the program > > stops!) > > I cannot get to run the project because it's not loaded! > > > > > > > > On Thu, Apr 3, 2014 at 10:41 AM, Julio Sanchez > >wrote: > > > > > Hello Vasilis > > > "Is there any other easier way to fix the problem?" > > > Yes, Load the project (source) in Gambas 3.3.4, and compile it there > > again. > > > So the executable (or the installation package) that you can use it > > creees. > > > > > > regards > > > > > > > > > 2014-04-03 8:07 GMT+02:00 Vasilis Kanatas : > > > > > > > I have made a project on Gambas 3.5.2 (on OpenSuse 13.1) which works > > > fine! > > > > Now I try to open it with Gambas 3.3.4 (on Puppy Slacko 0.5.7) and > get > > > the > > > > message: > > > > "Bytecode too recet. Please upgrade Gambas" > > > > I have tried to delete temporary Gambas files from /tmp but nothing! > > > > Unfortunately on Puppy there is no gambas 3.5.2 sfs ready yet! > > > > Should I try to compile the 3.5.2 ? Will it compile and get > installed? > > > > Is there any other easier way to fix the problem? > > > > > > > > > > > > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > > > > Gambas-user mailing list > > > > Gambas-user at lists.sourceforge.net > > > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > > > > > > > > ------------------------------------------------------------------------------ > > > _______________________________________________ > > > Gambas-user mailing list > > > Gambas-user at lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From taboege at ...626... Thu Apr 3 12:42:00 2014 From: taboege at ...626... (Tobias Boege) Date: Thu, 3 Apr 2014 12:42:00 +0200 Subject: [Gambas-user] How to overcome: Bytecode too recent. Please upgrade Gambas In-Reply-To: References: Message-ID: <20140403104200.GA477@...2774...> On Thu, 03 Apr 2014, Vasilis Kanatas wrote: > Actually, I run the project and it stops when loading the first class with > this message: > > Cannot load class "Arxiki". Bytecode too recent. Please upgrade Gambas. > > I deleted all compiled files in the project (I suppose they are the class~ > files ) and still get the same message. > I also deleted every other file except for the .form and .class files, and > still the same! > (My project is from gambas 2.0, so it has two folders) > *~ are backups, not compiled files. There are actually at least three ways to force recompilation: (1) Go to IDE and hit the "Compile all" button (2) Open a terminal, cd into your project's directory and do $ gbc3 -a (3) Open a terminal, cd into your project's directory and do $ rm -rf .gambas (in there are the compiled classes) and then try to run the project from the IDE normally. This is exactly what the IDE does for you in (1). Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From vkanatas13 at ...626... Thu Apr 3 13:13:06 2014 From: vkanatas13 at ...626... (Vasilis Kanatas) Date: Thu, 3 Apr 2014 14:13:06 +0300 Subject: [Gambas-user] How to overcome: Bytecode too recent. Please upgrade Gambas In-Reply-To: <20140403104200.GA477@...2774...> References: <20140403104200.GA477@...2774...> Message-ID: Hi Tobi, Yes No 1 worked fine for me. Probably I should have done it from the beginning. Problem Solved! Thanks On Thu, Apr 3, 2014 at 1:42 PM, Tobias Boege wrote: > On Thu, 03 Apr 2014, Vasilis Kanatas wrote: > > Actually, I run the project and it stops when loading the first class > with > > this message: > > > > Cannot load class "Arxiki". Bytecode too recent. Please upgrade Gambas. > > > > I deleted all compiled files in the project (I suppose they are the > class~ > > files ) and still get the same message. > > I also deleted every other file except for the .form and .class files, > and > > still the same! > > (My project is from gambas 2.0, so it has two folders) > > > > *~ are backups, not compiled files. There are actually at least three ways > to force recompilation: > > (1) Go to IDE and hit the "Compile all" button > (2) Open a terminal, cd into your project's directory and do > $ gbc3 -a > (3) Open a terminal, cd into your project's directory and do > $ rm -rf .gambas > (in there are the compiled classes) and then try to run the project > from > the IDE normally. This is exactly what the IDE does for you in (1). > > Regards, > Tobi > > -- > "There's an old saying: Don't change anything... ever!" -- Mr. Monk > > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas at ...1... Fri Apr 4 20:36:41 2014 From: gambas at ...1... (=?ISO-8859-1?Q?Beno=EEt_Minisini?=) Date: Fri, 04 Apr 2014 20:36:41 +0200 Subject: [Gambas-user] Documentation about gb.web In-Reply-To: <533D2717.1030009@...221...> References: <533D2717.1030009@...221...> Message-ID: <533EFBB9.6080909@...1...> Le 03/04/2014 11:17, Rolf-Werner Eilert a ?crit : > Just browsed through the documentation for gb.web and this made me > wonder: > > In the example on http://gambaswiki.org/wiki/doc/webpage > > aren't the two code snippets swapped? I mean, when I think about what > the text says, this one > > <> > >

Gambas WebPage are easy!

> >

Time is <%=Format(Now, "hh:nn:ss")%>

> > <
> > > should be the includED page, the other one the includING one. No. The 'Main.webpage' generated code *call*s the 'Page.webpage' generated code. So 'Page.webpage' is the included page. It's just that the '<<--CONTENTS-->>' trick allows to use <> and < markups, and so allows the included page to generate HTML that surrounds part of the including page. > In other words, the big one is the Main.Webpage and the small one the > Page.Webpage. Or haven't I got it yet? That's right. The big one is Main.Webpage. Regards, -- Beno?t Minisini From jussi.lahtinen at ...626... Sat Apr 5 01:04:37 2014 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sat, 5 Apr 2014 02:04:37 +0300 Subject: [Gambas-user] New console Message-ID: Is there possibility to have option for old styled IDE console? I found it handier, because it showed not only results but exactly from where the results came. I used it even as general calculator. Jussi From gambas at ...1... Sat Apr 5 01:06:13 2014 From: gambas at ...1... (=?ISO-8859-1?Q?Beno=EEt_Minisini?=) Date: Sat, 05 Apr 2014 01:06:13 +0200 Subject: [Gambas-user] New console In-Reply-To: References: Message-ID: <533F3AE5.8060901@...1...> Le 05/04/2014 01:04, Jussi Lahtinen a ?crit : > Is there possibility to have option for old styled IDE console? > I found it handier, because it showed not only results but exactly from > where the results came. I used it even as general calculator. > > > Jussi And if I add an echo of the entered command? -- Beno?t Minisini From gambas at ...1... Sat Apr 5 02:30:36 2014 From: gambas at ...1... (=?ISO-8859-1?Q?Beno=EEt_Minisini?=) Date: Sat, 05 Apr 2014 02:30:36 +0200 Subject: [Gambas-user] New console In-Reply-To: <533F3AE5.8060901@...1...> References: <533F3AE5.8060901@...1...> Message-ID: <533F4EAC.6080209@...1...> Le 05/04/2014 01:06, Beno?t Minisini a ?crit : > Le 05/04/2014 01:04, Jussi Lahtinen a ?crit : >> Is there possibility to have option for old styled IDE console? >> I found it handier, because it showed not only results but exactly from >> where the results came. I used it even as general calculator. >> >> >> Jussi > > And if I add an echo of the entered command? > I added an echo mode in revision #6222, through a toggle button. Regards, -- Beno?t Minisini From gambas at ...2524... Sat Apr 5 03:21:24 2014 From: gambas at ...2524... (gambas at ...2524...) Date: Sat, 05 Apr 2014 01:21:24 +0000 Subject: [Gambas-user] Issue 518 in gambas: Crash with too many Dims Message-ID: <0-6813199134517018827-4912358215953129910-gambas=googlecode.com@...2524...> Status: New Owner: ---- Labels: Version Type-Crash Priority-Medium OpSys-Any Dist-Any Arch-Any Desktop-Any GUI-Any New issue 518 by jussi.la... at ...626...: Crash with too many Dims http://code.google.com/p/gambas/issues/detail?id=518 1) Describe the problem. Crash with too many Dims. I doubt this crash happens in real life applications... 2) GIVE THE FOLLOWING INFORMATIONS (if they are appropriate): Version: TRUNK Revision: r6217 Operating system: Linux Distribution: Xubuntu Architecture: x86_64 GUI component: - Desktop used: XFCE 3) Provide a little project that reproduces the bug or the crash. Attached. 5) Explain clearly how to reproduce the bug or the crash. Click on the button. Attachments: DimBug-0.0.1.tar.gz 5.3 KB -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings From gambas at ...2524... Sat Apr 5 17:31:25 2014 From: gambas at ...2524... (gambas at ...2524...) Date: Sat, 05 Apr 2014 15:31:25 +0000 Subject: [Gambas-user] Issue 444 in gambas: Balloon location is wrong for a textbox In-Reply-To: <3-6813199134517018827-4662149372359897761-gambas=googlecode.com@...2524...> References: <3-6813199134517018827-4662149372359897761-gambas=googlecode.com@...2524...> <0-6813199134517018827-4662149372359897761-gambas=googlecode.com@...2524...> Message-ID: <4-6813199134517018827-4662149372359897761-gambas=googlecode.com@...2524...> Updates: Status: Fixed Comment #4 on issue 444 by benoit.m... at ...626...: Balloon location is wrong for a textbox http://code.google.com/p/gambas/issues/detail?id=444 Fixed in revision #6226. -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings From jussi.lahtinen at ...626... Sat Apr 5 18:53:00 2014 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Sat, 5 Apr 2014 19:53:00 +0300 Subject: [Gambas-user] New console In-Reply-To: <533F4EAC.6080209@...1...> References: <533F3AE5.8060901@...1...> <533F4EAC.6080209@...1...> Message-ID: Yes, it's good now. Thanks! Jussi On Sat, Apr 5, 2014 at 3:30 AM, Beno?t Minisini < gambas at ...1...> wrote: > Le 05/04/2014 01:06, Beno?t Minisini a ?crit : > > Le 05/04/2014 01:04, Jussi Lahtinen a ?crit : > >> Is there possibility to have option for old styled IDE console? > >> I found it handier, because it showed not only results but exactly from > >> where the results came. I used it even as general calculator. > >> > >> > >> Jussi > > > > And if I add an echo of the entered command? > > > > I added an echo mode in revision #6222, through a toggle button. > > Regards, > > -- > Beno?t Minisini > > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From karl.reinl at ...9... Sat Apr 5 21:55:58 2014 From: karl.reinl at ...9... (Karl Reinl) Date: Sat, 05 Apr 2014 21:55:58 +0200 Subject: [Gambas-user] rev 6229 stops with error Message-ID: <1396727758.3448.4.camel@...40...> Salut Beno?t, rev 6229 stops with error. sysInfo.log talks about my box, because could not make a gambas.sysInfo, the IDE don't start. -- Amicalement Charlie -------------- next part -------------- A non-text attachment was scrubbed... Name: gambas3-rev-6229.tar.bz2 Type: application/x-bzip-compressed-tar Size: 16788 bytes Desc: not available URL: From gambas at ...1... Sat Apr 5 22:09:55 2014 From: gambas at ...1... (=?ISO-8859-1?Q?Beno=EEt_Minisini?=) Date: Sat, 05 Apr 2014 22:09:55 +0200 Subject: [Gambas-user] rev 6229 stops with error In-Reply-To: <1396727758.3448.4.camel@...40...> References: <1396727758.3448.4.camel@...40...> Message-ID: <53406313.8040508@...1...> Le 05/04/2014 21:55, Karl Reinl a ?crit : > Salut Beno?t, > > rev 6229 stops with error. > > sysInfo.log talks about my box, because could not make a gambas.sysInfo, > the IDE don't start. > According to the logs, there is a problem on your system with the OpenGL libraries. 'pkg-config' seems to tell that the OpenGL library is in /usr/lib, but the linker cannot find it there. Regards, -- Beno?t Minisini From karl.reinl at ...9... Sat Apr 5 22:26:38 2014 From: karl.reinl at ...9... (Karl Reinl) Date: Sat, 05 Apr 2014 22:26:38 +0200 Subject: [Gambas-user] rev 6229 stops with error In-Reply-To: <53406313.8040508@...1...> References: <1396727758.3448.4.camel@...40...> <53406313.8040508@...1...> Message-ID: <1396729598.3448.9.camel@...40...> Am Samstag, den 05.04.2014, 22:09 +0200 schrieb Beno?t Minisini: > Le 05/04/2014 21:55, Karl Reinl a ?crit : > > Salut Beno?t, > > > > rev 6229 stops with error. > > > > sysInfo.log talks about my box, because could not make a gambas.sysInfo, > > the IDE don't start. > > > > According to the logs, there is a problem on your system with the OpenGL > libraries. 'pkg-config' seems to tell that the OpenGL library is in > /usr/lib, but the linker cannot find it there. > > Regards, > Salut Beno?t, last successful compile was on rev 6206 , and me ;?) I only updated my box. Only diff I compiled from scratch. OK will have a look -- Amicalement Charlie From karl.reinl at ...9... Sat Apr 5 23:09:00 2014 From: karl.reinl at ...9... (Karl Reinl) Date: Sat, 05 Apr 2014 23:09:00 +0200 Subject: [Gambas-user] rev 6229 stops with error In-Reply-To: <53406313.8040508@...1...> References: <1396727758.3448.4.camel@...40...> <53406313.8040508@...1...> Message-ID: <1396732140.24166.1.camel@...40...> Am Samstag, den 05.04.2014, 22:09 +0200 schrieb Beno?t Minisini: > Le 05/04/2014 21:55, Karl Reinl a ?crit : > > Salut Beno?t, > > > > rev 6229 stops with error. > > > > sysInfo.log talks about my box, because could not make a gambas.sysInfo, > > the IDE don't start. > > > > According to the logs, there is a problem on your system with the OpenGL > libraries. 'pkg-config' seems to tell that the OpenGL library is in > /usr/lib, but the linker cannot find it there. > > Regards, > Salut Beno?t, I could solve this problem by installing bumblebee -- Amicalement Charlie From gambas at ...1... Sat Apr 5 23:25:20 2014 From: gambas at ...1... (=?ISO-8859-1?Q?Beno=EEt_Minisini?=) Date: Sat, 05 Apr 2014 23:25:20 +0200 Subject: [Gambas-user] Update of autoconf macros in revision #6230 Message-ID: <534074C0.1080007@...1...> Hi, I have fixed all autoconf files so that deprecated autoconf macros are not used anymore. I hope compilation won't break on older Linux systems, but with GNU tools you can be sure that there will be problems. So you will tell me! Remember that you have to run "./reconf-all" to regenerate all configuration script from the new autoconf files. Regards, -- Beno?t Minisini From taboege at ...626... Sun Apr 6 11:27:17 2014 From: taboege at ...626... (Tobias Boege) Date: Sun, 6 Apr 2014 11:27:17 +0200 Subject: [Gambas-user] Update of autoconf macros in revision #6230 In-Reply-To: <534074C0.1080007@...1...> References: <534074C0.1080007@...1...> Message-ID: <20140406092717.GB516@...2774...> On Sat, 05 Apr 2014, Beno?t Minisini wrote: > Hi, > > I have fixed all autoconf files so that deprecated autoconf macros are > not used anymore. > > I hope compilation won't break on older Linux systems, but with GNU > tools you can be sure that there will be problems. So you will tell me! > Hehe. Builds fine here, though. -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From ihaywood3 at ...626... Sun Apr 6 13:52:34 2014 From: ihaywood3 at ...626... (Ian Haywood) Date: Sun, 6 Apr 2014 21:52:34 +1000 Subject: [Gambas-user] autogenerated files (was: Update of autoconf macros in revision #6230) Message-ID: On Sat, Apr 5, 2014 at 9:25 PM, Beno?t Minisini wrote: > Remember that you have to run "./reconf-all" to regenerate all > configuration script from the new autoconf files. Would it be possible for the source tarballs to not contain files autogenerated by reconf-all (such as the Makefile.in and various copies of the m4 macros). This would help with building on Debian. Ian From taboege at ...626... Sun Apr 6 16:03:37 2014 From: taboege at ...626... (Tobias Boege) Date: Sun, 6 Apr 2014 16:03:37 +0200 Subject: [Gambas-user] Make {H,V}Split raise expressive Layout errors? Message-ID: <20140406140337.GE516@...2774...> Hi Benoit, if I have an {H,V}Split and happen to assign to Layout an Integer[] whose size is lower than the number of children in the split, an error is raised about wanting a number but getting Null instead. (I don't do such things but other people seem to do and they're confused about the error they see.) Looking at gb.gui.base, the splits seem to be supposed to handle such cases but they're apparently not doing it right. Attached is a project. What is the expected behaviour when giving too few elements to Layout, anyway? There is nothing (I can find) about that in the docs. I would personally like to see an error message in that case - but I'm satisfied when the strategy is documented. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk -------------- next part -------------- A non-text attachment was scrubbed... Name: hsplit-layout-count-0.0.1.tar.gz Type: application/octet-stream Size: 4742 bytes Desc: not available URL: From gambas at ...1... Sun Apr 6 16:33:08 2014 From: gambas at ...1... (=?ISO-8859-1?Q?Beno=EEt_Minisini?=) Date: Sun, 06 Apr 2014 16:33:08 +0200 Subject: [Gambas-user] Make {H,V}Split raise expressive Layout errors? In-Reply-To: <20140406140337.GE516@...2774...> References: <20140406140337.GE516@...2774...> Message-ID: <534165A4.6050007@...1...> Le 06/04/2014 16:03, Tobias Boege a ?crit : > Hi Benoit, > > if I have an {H,V}Split and happen to assign to Layout an Integer[] whose > size is lower than the number of children in the split, an error is raised > about wanting a number but getting Null instead. (I don't do such things but > other people seem to do and they're confused about the error they see.) > > Looking at gb.gui.base, the splits seem to be supposed to handle such cases > but they're apparently not doing it right. Attached is a project. > > What is the expected behaviour when giving too few elements to Layout, > anyway? There is nothing (I can find) about that in the docs. I would > personally like to see an error message in that case - but I'm satisfied > when the strategy is documented. > > Regards, > Tobi > Fixed in revision #6232. Regards, -- Beno?t Minisini From taboege at ...626... Sun Apr 6 16:44:55 2014 From: taboege at ...626... (Tobias Boege) Date: Sun, 6 Apr 2014 16:44:55 +0200 Subject: [Gambas-user] Make {H,V}Split raise expressive Layout errors? In-Reply-To: <534165A4.6050007@...1...> References: <20140406140337.GE516@...2774...> <534165A4.6050007@...1...> Message-ID: <20140406144455.GF516@...2774...> On Sun, 06 Apr 2014, Beno?t Minisini wrote: > Le 06/04/2014 16:03, Tobias Boege a ?crit : > > Hi Benoit, > > > > if I have an {H,V}Split and happen to assign to Layout an Integer[] whose > > size is lower than the number of children in the split, an error is raised > > about wanting a number but getting Null instead. (I don't do such things but > > other people seem to do and they're confused about the error they see.) > > > > Looking at gb.gui.base, the splits seem to be supposed to handle such cases > > but they're apparently not doing it right. Attached is a project. > > > > What is the expected behaviour when giving too few elements to Layout, > > anyway? There is nothing (I can find) about that in the docs. I would > > personally like to see an error message in that case - but I'm satisfied > > when the strategy is documented. > > > > Regards, > > Tobi > > > > Fixed in revision #6232. > I fixed the documentation. -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From eilert-sprachen at ...221... Mon Apr 7 12:24:41 2014 From: eilert-sprachen at ...221... (Rolf-Werner Eilert) Date: Mon, 07 Apr 2014 12:24:41 +0200 Subject: [Gambas-user] Documentation about gb.web In-Reply-To: <533EFBB9.6080909@...1...> References: <533D2717.1030009@...221...> <533EFBB9.6080909@...1...> Message-ID: <53427CE9.7060901@...221...> Am 04.04.2014 20:36, schrieb Beno?t Minisini: > Le 03/04/2014 11:17, Rolf-Werner Eilert a ?crit : >> Just browsed through the documentation for gb.web and this made me >> wonder: >> >> In the example on http://gambaswiki.org/wiki/doc/webpage >> >> aren't the two code snippets swapped? I mean, when I think about what >> the text says, this one >> >> <> >> >>

Gambas WebPage are easy!

>> >>

Time is <%=Format(Now, "hh:nn:ss")%>

>> >> <
> >> >> should be the includED page, the other one the includING one. > > No. The 'Main.webpage' generated code *call*s the 'Page.webpage' > generated code. So 'Page.webpage' is the included page. > > It's just that the '<<--CONTENTS-->>' trick allows to use <> and > < markups, and so allows the included page to generate HTML that > surrounds part of the including page. > >> In other words, the big one is the Main.Webpage and the small one the >> Page.Webpage. Or haven't I got it yet? > > That's right. The big one is Main.Webpage. > > Regards, > Yes. Then we should swap the examples or the headers for the examples, as it says it the other way round. Thank you! Rolf From gambas at ...1... Mon Apr 7 13:36:22 2014 From: gambas at ...1... (=?ISO-8859-1?Q?Beno=EEt_Minisini?=) Date: Mon, 07 Apr 2014 13:36:22 +0200 Subject: [Gambas-user] Documentation about gb.web In-Reply-To: <53427CE9.7060901@...221...> References: <533D2717.1030009@...221...> <533EFBB9.6080909@...1...> <53427CE9.7060901@...221...> Message-ID: <53428DB6.4060806@...1...> Le 07/04/2014 12:24, Rolf-Werner Eilert a ?crit : > > Yes. Then we should swap the examples or the headers for the examples, > as it says it the other way round. > > Thank you! > > Rolf > No, where does it say the other way round? Just try the example. -- Beno?t Minisini From jusabejusabe at ...626... Mon Apr 7 13:53:15 2014 From: jusabejusabe at ...626... (Julio Sanchez) Date: Mon, 7 Apr 2014 13:53:15 +0200 Subject: [Gambas-user] New Gambas wiki is online! In-Reply-To: <20140312000152.GB508@...2774...> References: <531CAE1E.5050903@...1...> <20140309202227.GD513@...2774...> <531CCF87.8020406@...1...> <20140312000152.GB508@...2774...> Message-ID: Hello: It would be interesting to add a search button so that users could search for words, and get a list of addresses where they appear For example: Search: combobox And you see the following addresses: http://gambaswiki.org/wiki/comp/gb.qt4/combobox Regards 2014-03-12 1:01 GMT+01:00 Tobias Boege : > On Sun, 09 Mar 2014, Beno?t Minisini wrote: > > Le 09/03/2014 21:22, Tobias Boege a ?crit : > > > On Sun, 09 Mar 2014, Beno?t Minisini wrote: > > >> Hi, > > >> > > >> The new Gambas wiki is now online at: > > >> > > >> http://gambaswiki.org > > >> > > >> Please register to check the registration process, and then play > > >> with it, so that I can eventually fix the automatic conversion from > > >> the old wiki syntax. > > > > > > Hmm, is that "Please run the following Gambas code and enter its > > > result" phase of registration a bot protection? If it is, it is not a > > > very effective one for bots written in Gambas :-) > > > > Yes, it will encourage spammers to use Gambas, so that there are more > > Gambas applications. :-) > > > > > Besides, my confirmation mail did not came in yet (I registered like > > > 2 hours ago). It's not in spam... Any ideas? > > > > No. There were four other registrations that succeeded. > > > > I have destroyed your registration so that you can try again. > > > > Ok. NOW, three days later, both mails (first and second try) arrived and > I'm > finally registered. No idea what could have caused that delay. Never (to my > knowledge) happened to me with that email address before. > > Regards, > Tobi > > -- > "There's an old saying: Don't change anything... ever!" -- Mr. Monk > > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > http://p.sf.net/sfu/13534_NeoTech > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From gambas at ...1... Mon Apr 7 21:51:04 2014 From: gambas at ...1... (=?ISO-8859-1?Q?Beno=EEt_Minisini?=) Date: Mon, 07 Apr 2014 21:51:04 +0200 Subject: [Gambas-user] Testing Gambas 3.5.3 Message-ID: <534301A8.9080302@...1...> Hi, I have uploaded a source package of the upcoming Gambas 3.5.3 so that people can test it before an official release. It's there: http://sourceforge.net/projects/gambas/files/gambas3/gambas3-3.5.3.tar.bz2/download So please test it and report! I will write the changelog soon... Regards, -- Beno?t Minisini From gambas at ...1... Mon Apr 7 21:54:28 2014 From: gambas at ...1... (=?ISO-8859-1?Q?Beno=EEt_Minisini?=) Date: Mon, 07 Apr 2014 21:54:28 +0200 Subject: [Gambas-user] Testing Gambas 3.5.3 In-Reply-To: <534301A8.9080302@...1...> References: <534301A8.9080302@...1...> Message-ID: <53430274.6030704@...1...> Le 07/04/2014 21:51, Beno?t Minisini a ?crit : > Hi, > > I have uploaded a source package of the upcoming Gambas 3.5.3 so that > people can test it before an official release. > > It's there: > > http://sourceforge.net/projects/gambas/files/gambas3/gambas3-3.5.3.tar.bz2/download > > So please test it and report! > > I will write the changelog soon... > > Regards, > Especially I'd like to know if the IDE now correctly uses the new wiki (this is already the case in the development version). -- Beno?t Minisini From taboege at ...626... Mon Apr 7 22:18:20 2014 From: taboege at ...626... (Tobias Boege) Date: Mon, 7 Apr 2014 22:18:20 +0200 Subject: [Gambas-user] Array.Remove() documentation Message-ID: <20140407201820.GC510@...2774...> Hi, the documentation[0] says about Array.Remove() that if Length is negative, then all the elements from Index on backwards are removed, i.e. hArray.Remove(i, -42) is equivalent to For j = 0 To i hArray.Remove(0) Next But in practice (using Dim hArray As Array = myIntegerArray), it does For j = i To hArray.Max hArray.Remove(i) Next What is the intended behaviour? [0] http://gambaswiki.org/wiki/comp/gb/array/remove -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From gambas at ...1... Mon Apr 7 22:34:29 2014 From: gambas at ...1... (=?ISO-8859-1?Q?Beno=EEt_Minisini?=) Date: Mon, 07 Apr 2014 22:34:29 +0200 Subject: [Gambas-user] Array.Remove() documentation In-Reply-To: <20140407201820.GC510@...2774...> References: <20140407201820.GC510@...2774...> Message-ID: <53430BD5.9010604@...1...> Le 07/04/2014 22:18, Tobias Boege a ?crit : > Hi, > > the documentation[0] says about Array.Remove() that if Length is negative, > then all the elements from Index on backwards are removed, i.e. > > hArray.Remove(i, -42) > > is equivalent to > > For j = 0 To i > hArray.Remove(0) > Next > > But in practice (using Dim hArray As Array = myIntegerArray), it does > > For j = i To hArray.Max > hArray.Remove(i) > Next > > What is the intended behaviour? > > [0] http://gambaswiki.org/wiki/comp/gb/array/remove > The second version. See: http://gambasdoc.org/hist/comp/gb/array/remove?v3 "p.wheeler" changed my sentence, but I don't know if his new sentence means what I wanted. -- Beno?t Minisini From jussi.lahtinen at ...626... Tue Apr 8 01:04:29 2014 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Tue, 8 Apr 2014 02:04:29 +0300 Subject: [Gambas-user] Array.Remove() documentation In-Reply-To: <53430BD5.9010604@...1...> References: <20140407201820.GC510@...2774...> <53430BD5.9010604@...1...> Message-ID: The "backwards" bit is wrong. As it would imply counting indexes ... , 3, 2, 1, 0. I think it would be good thing to put examples if possible. Something like: Dim iArr As New Integer[] iArr.Insert([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) iArr.Remove(5, 5) and iArr.Remove(5, -1) yields same result, which is: [1, 2, 3, 4, 5] Jussi On Mon, Apr 7, 2014 at 11:34 PM, Beno?t Minisini < gambas at ...1...> wrote: > Le 07/04/2014 22:18, Tobias Boege a ?crit : > > Hi, > > > > the documentation[0] says about Array.Remove() that if Length is > negative, > > then all the elements from Index on backwards are removed, i.e. > > > > hArray.Remove(i, -42) > > > > is equivalent to > > > > For j = 0 To i > > hArray.Remove(0) > > Next > > > > But in practice (using Dim hArray As Array = myIntegerArray), it does > > > > For j = i To hArray.Max > > hArray.Remove(i) > > Next > > > > What is the intended behaviour? > > > > [0] http://gambaswiki.org/wiki/comp/gb/array/remove > > > > The second version. > > See: http://gambasdoc.org/hist/comp/gb/array/remove?v3 > > "p.wheeler" changed my sentence, but I don't know if his new sentence > means what I wanted. > > -- > Beno?t Minisini > > > ------------------------------------------------------------------------------ > Put Bad Developers to Shame > Dominate Development with Jenkins Continuous Integration > Continuously Automate Build, Test & Deployment > Start a new project now. Try Jenkins in the cloud. > http://p.sf.net/sfu/13600_Cloudbees > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From jussi.lahtinen at ...626... Tue Apr 8 01:14:37 2014 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Tue, 8 Apr 2014 02:14:37 +0300 Subject: [Gambas-user] Testing Gambas 3.5.3 In-Reply-To: <53430274.6030704@...1...> References: <534301A8.9080302@...1...> <53430274.6030704@...1...> Message-ID: I see only this small oddity. See attached screenshot. Otherwise everything seems to work correctly. Jussi On Mon, Apr 7, 2014 at 10:54 PM, Beno?t Minisini < gambas at ...1...> wrote: > Le 07/04/2014 21:51, Beno?t Minisini a ?crit : > > Hi, > > > > I have uploaded a source package of the upcoming Gambas 3.5.3 so that > > people can test it before an official release. > > > > It's there: > > > > > http://sourceforge.net/projects/gambas/files/gambas3/gambas3-3.5.3.tar.bz2/download > > > > So please test it and report! > > > > I will write the changelog soon... > > > > Regards, > > > > Especially I'd like to know if the IDE now correctly uses the new wiki > (this is already the case in the development version). > > -- > Beno?t Minisini > > > ------------------------------------------------------------------------------ > Put Bad Developers to Shame > Dominate Development with Jenkins Continuous Integration > Continuously Automate Build, Test & Deployment > Start a new project now. Try Jenkins in the cloud. > http://p.sf.net/sfu/13600_Cloudbees > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot.jpg Type: image/jpeg Size: 21506 bytes Desc: not available URL: From gambas at ...1... Wed Apr 9 01:01:35 2014 From: gambas at ...1... (=?ISO-8859-1?Q?Beno=EEt_Minisini?=) Date: Wed, 09 Apr 2014 01:01:35 +0200 Subject: [Gambas-user] feature suggestions: detach and rearrange tabs In-Reply-To: <530412C3.4090300@...1887...> References: <530412C3.4090300@...1887...> Message-ID: <53447FCF.3050008@...1...> Le 19/02/2014 03:11, Kevin Fishburne a ?crit : > I don't know how difficult this would be, but if detachable tabs could > be implemented (think Chrome browser), that would be awesome. Tangential > to that would be the ability to rearrange tabs by dragging and dropping, > or perhaps doing a right-click "Sort by Name". > > Having them detachable would allow productive use of a multi-head setup. > Often I find myself switching back and forth between two procedures in a > very long module, or needing to use one code block as a reference as I'm > writing code elsewhere. I often resort to pasting the code in a text > editor on my right monitor. > > I know there is a split pane option, but sometimes a program gets a > little crazy and you have 10000 lines of code in a module with some > 300-character-long lines; that is difficult to work with even in a > non-split view. Perhaps for GAMBAS 4? > IDE workspace tabs are now moveable in revision #6239. But you cannot detach them yet. -- Beno?t Minisini From willy at ...2734... Wed Apr 9 23:35:55 2014 From: willy at ...2734... (Willy Raets) Date: Wed, 09 Apr 2014 23:35:55 +0200 Subject: [Gambas-user] Install Gambas 3 on Raspbian instruction in Gambas wiki Message-ID: <1397079355.2432.3.camel@...3024...> Hi All, Since I'm now the owner of a Raspberry Pi running Raspbian I wrote some short instructions for installing Gambas3 on Raspbian. http://gambaswiki.org/wiki/install/raspbian Also added Raspbian to the index of distributions. -- Kind regards, Willy (aka gbWilly) http://gambasshowcase.org/ http://howtogambas.org http://gambos.org From gambas at ...1... Wed Apr 9 23:50:15 2014 From: gambas at ...1... (=?ISO-8859-1?Q?Beno=EEt_Minisini?=) Date: Wed, 09 Apr 2014 23:50:15 +0200 Subject: [Gambas-user] Install Gambas 3 on Raspbian instruction in Gambas wiki In-Reply-To: <1397079355.2432.3.camel@...3024...> References: <1397079355.2432.3.camel@...3024...> Message-ID: <5345C097.9010308@...1...> Le 09/04/2014 23:35, Willy Raets a ?crit : > Hi All, > > Since I'm now the owner of a Raspberry Pi running Raspbian I wrote some > short instructions for installing Gambas3 on Raspbian. > > http://gambaswiki.org/wiki/install/raspbian > > Also added Raspbian to the index of distributions. > > Cool! -- Beno?t Minisini From david.villalobos.c at ...626... Wed Apr 9 23:52:48 2014 From: david.villalobos.c at ...626... (David Villalobos Cambronero) Date: Wed, 9 Apr 2014 15:52:48 -0600 Subject: [Gambas-user] Install Gambas 3 on Raspbian instruction in Gambas wiki In-Reply-To: <5345C097.9010308@...1...> References: <1397079355.2432.3.camel@...3024...> <5345C097.9010308@...1...> Message-ID: That's nice!!! Gracias --- David On Wed, Apr 9, 2014 at 3:50 PM, Beno?t Minisini < gambas at ...1...> wrote: > Le 09/04/2014 23:35, Willy Raets a ?crit : > > Hi All, > > > > Since I'm now the owner of a Raspberry Pi running Raspbian I wrote some > > short instructions for installing Gambas3 on Raspbian. > > > > http://gambaswiki.org/wiki/install/raspbian > > > > Also added Raspbian to the index of distributions. > > > > > > Cool! > > -- > Beno?t Minisini > > > ------------------------------------------------------------------------------ > Put Bad Developers to Shame > Dominate Development with Jenkins Continuous Integration > Continuously Automate Build, Test & Deployment > Start a new project now. Try Jenkins in the cloud. > http://p.sf.net/sfu/13600_Cloudbees > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From jussi.lahtinen at ...626... Thu Apr 10 01:32:05 2014 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Thu, 10 Apr 2014 02:32:05 +0300 Subject: [Gambas-user] feature suggestions: detach and rearrange tabs In-Reply-To: <53447FCF.3050008@...1...> References: <530412C3.4090300@...1887...> <53447FCF.3050008@...1...> Message-ID: Great! Thanks! Jussi On Wed, Apr 9, 2014 at 2:01 AM, Beno?t Minisini < gambas at ...1...> wrote: > Le 19/02/2014 03:11, Kevin Fishburne a ?crit : > > I don't know how difficult this would be, but if detachable tabs could > > be implemented (think Chrome browser), that would be awesome. Tangential > > to that would be the ability to rearrange tabs by dragging and dropping, > > or perhaps doing a right-click "Sort by Name". > > > > Having them detachable would allow productive use of a multi-head setup. > > Often I find myself switching back and forth between two procedures in a > > very long module, or needing to use one code block as a reference as I'm > > writing code elsewhere. I often resort to pasting the code in a text > > editor on my right monitor. > > > > I know there is a split pane option, but sometimes a program gets a > > little crazy and you have 10000 lines of code in a module with some > > 300-character-long lines; that is difficult to work with even in a > > non-split view. Perhaps for GAMBAS 4? > > > > IDE workspace tabs are now moveable in revision #6239. But you cannot > detach them yet. > > -- > Beno?t Minisini > > > ------------------------------------------------------------------------------ > Put Bad Developers to Shame > Dominate Development with Jenkins Continuous Integration > Continuously Automate Build, Test & Deployment > Start a new project now. Try Jenkins in the cloud. > http://p.sf.net/sfu/13600_Cloudbees > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From ihaywood3 at ...626... Thu Apr 10 05:03:50 2014 From: ihaywood3 at ...626... (Ian Haywood) Date: Thu, 10 Apr 2014 13:03:50 +1000 Subject: [Gambas-user] Install Gambas 3 on Raspbian instruction in Gambas wiki In-Reply-To: <1397079355.2432.3.camel@...3024...> References: <1397079355.2432.3.camel@...3024...> Message-ID: On Thu, Apr 10, 2014 at 7:35 AM, Willy Raets wrote: > Hi All, > > Since I'm now the owner of a Raspberry Pi running Raspbian I wrote some > short instructions for installing Gambas3 on Raspbian. > > http://gambaswiki.org/wiki/install/raspbian > > Also added Raspbian to the index of distributions. the current jessie packages are a bit buggy, the IDE can crash. 3.5.2-2 is slowly percolating through the debian system and should be reasonably stable. have a look at https://wiki.debian.org/AptPreferences, it explains how to grab packages from a later release but leave the rest as-is. From kevinfishburne at ...1887... Thu Apr 10 06:43:27 2014 From: kevinfishburne at ...1887... (Kevin Fishburne) Date: Thu, 10 Apr 2014 00:43:27 -0400 Subject: [Gambas-user] Precision immediately lost when assigning value to type Single structure property Message-ID: <5346216F.7040907@...1887...> I have an array (Plan) of a structure (PlanStructure) which contains several other structures (PlanPortalStructure, etc.): ' Architectural plan portal structure (server). Public Struct PlanPortalStructure PlanX As Short ' Position in architectural plan. PlanY As Short ' Position in architectural plan. Created As Boolean ' If portal PWO has already been created. Skin As Short ' Portal skin. Orientation As Single ' Portal orientation. End Struct ' Architectural plan structure (server). Public Struct PlanStructure Stage As Byte ' Current build stage (0 = design, 1 = clear and grade, 2 = wall construction, 3 = roofing construction, 4 = flooring construction, 5 = lighting installation, 6 = finished/maintenance). Index As Integer ' Current position in block type array. GradingTarget As Long ' Elevation in inches to grade landscape and/or create block PWOs at. CenterX As Integer ' Build site center coordinate. CenterY As Integer ' Build site center coordinate. Grading As PlanGradingStructure[] ' Grading blocks. Wall As PlanWallStructure[] ' Wall blocks. Roofing As PlanRoofingStructure[] ' Roofing blocks. Flooring As PlanFlooringStructure[] ' Flooring blocks. Lighting As PlanLightingStructure[] ' Lighting blocks. Portal As PlanPortalStructure[] ' Portal blocks. Furnishing As PlanFurnishingStructure[] ' Furnishing blocks. WallHeightTallest As Single ' Maximum wall target height (temporarily used to set roofing height). WallHeightTotal As Single ' Total height in feet of all walls (used to know when wall construction has been completed). WallHeightCurrent As Single ' Current height in feet of all walls constructed (used to know when wall construction has been completed). End Struct Public Plan[10] As Struct PlanStructure When I assign the value 180.2 to the Orientation property (type Single) of PlanPortalStructure like this: Plan[p].Portal[Index].Orientation = 180.2 the value is assigned as 180.1999969. Any idea why this is happening?Seems strange that explicitly setting a type Single to a value would immediately cause precision to be lost; maybe it has to do with a structure being embedded in another structure? -- Kevin Fishburne Eight Virtues www: http://sales.eightvirtues.com e-mail: sales at ...1887... phone: (770) 853-6271 From ihaywood3 at ...626... Thu Apr 10 07:08:21 2014 From: ihaywood3 at ...626... (Ian Haywood) Date: Thu, 10 Apr 2014 15:08:21 +1000 Subject: [Gambas-user] Precision immediately lost when assigning value to type Single structure property In-Reply-To: <5346216F.7040907@...1887...> References: <5346216F.7040907@...1887...> Message-ID: On Thu, Apr 10, 2014 at 2:43 PM, Kevin Fishburne wrote: > I have an array (Plan) of a structure (PlanStructure) which contains > several other structures (PlanPortalStructure, etc.): > Plan[p].Portal[Index].Orientation = 180.2 > > > the value is assigned as 180.1999969. > > Any idea why this is happening?Seems strange that explicitly setting a > type Single to a value would immediately cause precision to be lost; > maybe it has to do with a structure being embedded in another structure? i doubt structures are the issue. floating point values are stored in binary internally so there is a translation between decimal for humans and binary which imparts a slight rounding error can you try Double: this won't fix the problem but will reduce it at a cost of more RAM if you need 100% decimal accuracy (it's usually only high-end financial stuff where you do), then look at gb.gmp component. Again it will cost you in RAM and speed. Ian From gambas.fr at ...626... Thu Apr 10 12:57:42 2014 From: gambas.fr at ...626... (Fabien Bodard) Date: Thu, 10 Apr 2014 12:57:42 +0200 Subject: [Gambas-user] Precision immediately lost when assigning value to type Single structure property In-Reply-To: References: <5346216F.7040907@...1887...> Message-ID: Or store the value as integer an then divide by 10 on use Le 10 avr. 2014 07:09, "Ian Haywood" a ?crit : > On Thu, Apr 10, 2014 at 2:43 PM, Kevin Fishburne > wrote: > > I have an array (Plan) of a structure (PlanStructure) which contains > > several other structures (PlanPortalStructure, etc.): > > > Plan[p].Portal[Index].Orientation = 180.2 > > > > > > the value is assigned as 180.1999969. > > > > Any idea why this is happening?Seems strange that explicitly setting a > > type Single to a value would immediately cause precision to be lost; > > maybe it has to do with a structure being embedded in another structure? > i doubt structures are the issue. floating point values are stored in > binary internally so there is a translation between decimal for humans > and binary which imparts a slight rounding error > can you try Double: this won't fix the problem but will reduce it at a > cost of more RAM > > if you need 100% decimal accuracy (it's usually only high-end > financial stuff where you do), then look at gb.gmp component. Again it > will cost you in RAM and speed. > > Ian > > > ------------------------------------------------------------------------------ > Put Bad Developers to Shame > Dominate Development with Jenkins Continuous Integration > Continuously Automate Build, Test & Deployment > Start a new project now. Try Jenkins in the cloud. > http://p.sf.net/sfu/13600_Cloudbees > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From jussi.lahtinen at ...626... Thu Apr 10 16:50:02 2014 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Thu, 10 Apr 2014 17:50:02 +0300 Subject: [Gambas-user] Precision immediately lost when assigning value to type Single structure property In-Reply-To: <5346216F.7040907@...1887...> References: <5346216F.7040907@...1887...> Message-ID: That is completely expected just try: Print csingle(180.2) 180,1999969 You cannot express 180.2 precisely with 32 bits. Even with 64 bits it's something like: 180.199999999999988631 ... Jussi On Thu, Apr 10, 2014 at 7:43 AM, Kevin Fishburne < kevinfishburne at ...1887...> wrote: > I have an array (Plan) of a structure (PlanStructure) which contains > several other structures (PlanPortalStructure, etc.): > > ' Architectural plan portal structure (server). > Public Struct PlanPortalStructure > PlanX As Short ' Position in architectural plan. > PlanY As Short ' Position in architectural plan. > Created As Boolean ' If portal PWO has already been created. > Skin As Short ' Portal skin. > Orientation As Single ' Portal orientation. > End Struct > > ' Architectural plan structure (server). > Public Struct PlanStructure > Stage As Byte ' Current build stage (0 > = design, 1 = clear and grade, 2 = wall construction, 3 = roofing > construction, 4 = flooring construction, 5 = lighting installation, > 6 = finished/maintenance). > Index As Integer ' Current position in > block type array. > GradingTarget As Long ' Elevation in inches to > grade landscape and/or create block PWOs at. > CenterX As Integer ' Build site center > coordinate. > CenterY As Integer ' Build site center > coordinate. > Grading As PlanGradingStructure[] ' Grading blocks. > Wall As PlanWallStructure[] ' Wall blocks. > Roofing As PlanRoofingStructure[] ' Roofing blocks. > Flooring As PlanFlooringStructure[] ' Flooring blocks. > Lighting As PlanLightingStructure[] ' Lighting blocks. > Portal As PlanPortalStructure[] ' Portal blocks. > Furnishing As PlanFurnishingStructure[] ' Furnishing blocks. > WallHeightTallest As Single ' Maximum wall target > height (temporarily used to set roofing height). > WallHeightTotal As Single ' Total height in feet of > all walls (used to know when wall construction has been completed). > WallHeightCurrent As Single ' Current height in feet > of all walls constructed (used to know when wall construction has > been completed). > End Struct > Public Plan[10] As Struct PlanStructure > > > When I assign the value 180.2 to the Orientation property (type Single) > of PlanPortalStructure like this: > > Plan[p].Portal[Index].Orientation = 180.2 > > > the value is assigned as 180.1999969. > > Any idea why this is happening?Seems strange that explicitly setting a > type Single to a value would immediately cause precision to be lost; > maybe it has to do with a structure being embedded in another structure? > > -- > Kevin Fishburne > Eight Virtues > www: http://sales.eightvirtues.com > e-mail: sales at ...1887... > phone: (770) 853-6271 > > > > ------------------------------------------------------------------------------ > Put Bad Developers to Shame > Dominate Development with Jenkins Continuous Integration > Continuously Automate Build, Test & Deployment > Start a new project now. Try Jenkins in the cloud. > http://p.sf.net/sfu/13600_Cloudbees > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From shordi at ...626... Thu Apr 10 20:58:34 2014 From: shordi at ...626... (=?ISO-8859-1?Q?Jorge_Carri=F3n?=) Date: Thu, 10 Apr 2014 20:58:34 +0200 Subject: [Gambas-user] About TextEdit defaults... Message-ID: Hi It's possible to change the default style of TextEdit. I mean that when you just pulse Enter key the rich text produced is something like this:

I like to change the text-indent:0px value by default... It's possible? Regards From gambas at ...2524... Thu Apr 10 21:50:19 2014 From: gambas at ...2524... (gambas at ...2524...) Date: Thu, 10 Apr 2014 19:50:19 +0000 Subject: [Gambas-user] Issue 519 in gambas: allocations non freed when no obvious cross references Message-ID: <0-6813199134517018827-1142676416793980477-gambas=googlecode.com@...2524...> Status: New Owner: ---- Labels: Version Type-Bug Priority-Medium OpSys-Any Dist-Any Arch-Any Desktop-Any GUI-Any New issue 519 by fabianfl... at ...626...: allocations non freed when no obvious cross references http://code.google.com/p/gambas/issues/detail?id=519 1) The warning: "warning: gbx3: warning: 2 allocation(s) non freed" appears when no obvious cross-references. 2) GIVE THE FOLLOWING INFORMATIONS (if they are appropriate): ' [System] ' Gambas = 3.5.2 ' OperatingSystem = Linux ' Kernel = 3.11.0-18-generic ' Architecture = x86 ' Distribution = Ubuntu 13.10 ' Desktop = LXDE ' Theme = QGtk ' Language = es_AR.UTF-8 ' Memory = 1477 M ' [Libraries] ' GTK += libgtk-x11-2.0.so.0.2400.20 3) Provide a little project that reproduces the bug or the crash. ' Gambas class file Static Public Sub main() Print AMethod() End Static Private Sub AMethod() As String Dim sTrimmedLow, sItem As String Dim sArray As String[] sArray = ["'A short text'", "'", "\n", "Other text", "'", "More text", "'Final text"] 'This data not reproduce the problem: 'sArray = ["A short text", "Other text", "More text", "Final text"] 'This data not reproduce the problem: 'sArray = [] For Each sItem In sArray 'gbx3: warning: 2 allocation(s) non freed. sTrimmedLow = Lower(Trim(sItem)) 'This not reproduce the problem: 'sTrimmedLow = Trim(Lower(sItem)) Next End -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings From abbat.81 at ...787... Thu Apr 10 22:58:39 2014 From: abbat.81 at ...787... (abbat81) Date: Thu, 10 Apr 2014 13:58:39 -0700 (PDT) Subject: [Gambas-user] How to set name of control Message-ID: <1397163519029-46134.post@...3046...> How to do this: Dim i as integer For i = 1 to 3 Textbox[i].Text = i ' Textbox1.Text, Textbox2.Text and Textbox3.Text Next Thanks -- View this message in context: http://gambas.8142.n7.nabble.com/How-to-set-name-of-control-tp46134.html Sent from the gambas-user mailing list archive at Nabble.com. From gambas at ...2524... Thu Apr 10 23:50:16 2014 From: gambas at ...2524... (gambas at ...2524...) Date: Thu, 10 Apr 2014 21:50:16 +0000 Subject: [Gambas-user] Issue 519 in gambas: allocations non freed when no obvious cross references In-Reply-To: <0-6813199134517018827-1142676416793980477-gambas=googlecode.com@...2524...> References: <0-6813199134517018827-1142676416793980477-gambas=googlecode.com@...2524...> Message-ID: <1-6813199134517018827-1142676416793980477-gambas=googlecode.com@...2524...> Updates: Status: Accepted Labels: -Version Version-3.5.0 Comment #1 on issue 519 by benoit.m... at ...626...: allocations non freed when no obvious cross references http://code.google.com/p/gambas/issues/detail?id=519 (No comment was entered for this change.) -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings From gambas at ...2524... Thu Apr 10 23:56:35 2014 From: gambas at ...2524... (gambas at ...2524...) Date: Thu, 10 Apr 2014 21:56:35 +0000 Subject: [Gambas-user] Issue 519 in gambas: allocations non freed when no obvious cross references In-Reply-To: <1-6813199134517018827-1142676416793980477-gambas=googlecode.com@...2524...> References: <1-6813199134517018827-1142676416793980477-gambas=googlecode.com@...2524...> <0-6813199134517018827-1142676416793980477-gambas=googlecode.com@...2524...> Message-ID: <2-6813199134517018827-1142676416793980477-gambas=googlecode.com@...2524...> Comment #2 on issue 519 by benoit.m... at ...626...: allocations non freed when no obvious cross references http://code.google.com/p/gambas/issues/detail?id=519 Fixed in revision #6241. -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings From gambas at ...2524... Thu Apr 10 23:57:37 2014 From: gambas at ...2524... (gambas at ...2524...) Date: Thu, 10 Apr 2014 21:57:37 +0000 Subject: [Gambas-user] Issue 519 in gambas: allocations non freed when no obvious cross references In-Reply-To: <2-6813199134517018827-1142676416793980477-gambas=googlecode.com@...2524...> References: <2-6813199134517018827-1142676416793980477-gambas=googlecode.com@...2524...> <0-6813199134517018827-1142676416793980477-gambas=googlecode.com@...2524...> Message-ID: <3-6813199134517018827-1142676416793980477-gambas=googlecode.com@...2524...> Updates: Status: Fixed Comment #3 on issue 519 by benoit.m... at ...626...: allocations non freed when no obvious cross references http://code.google.com/p/gambas/issues/detail?id=519 (No comment was entered for this change.) -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings From jussi.lahtinen at ...626... Fri Apr 11 00:45:45 2014 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Fri, 11 Apr 2014 01:45:45 +0300 Subject: [Gambas-user] How to set name of control In-Reply-To: <1397163519029-46134.post@...3046...> References: <1397163519029-46134.post@...3046...> Message-ID: What are you trying to achieve? Dim hTextBoxes As New TextBox[10] For ii = 1 To 3 hTextBoxes[ii] = New TextBox(Me) As "Textbox" & CStr(ii) Next There is also Name property if you want to change name of existing textbox... Jussi On Thu, Apr 10, 2014 at 11:58 PM, abbat81 wrote: > > How to do this: > > Dim i as integer > > For i = 1 to 3 > Textbox[i].Text = i ' Textbox1.Text, Textbox2.Text and Textbox3.Text > Next > > Thanks > > > > -- > View this message in context: > http://gambas.8142.n7.nabble.com/How-to-set-name-of-control-tp46134.html > Sent from the gambas-user mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > Put Bad Developers to Shame > Dominate Development with Jenkins Continuous Integration > Continuously Automate Build, Test & Deployment > Start a new project now. Try Jenkins in the cloud. > http://p.sf.net/sfu/13600_Cloudbees > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From jussi.lahtinen at ...626... Fri Apr 11 00:51:49 2014 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Fri, 11 Apr 2014 01:51:49 +0300 Subject: [Gambas-user] How to set name of control In-Reply-To: References: <1397163519029-46134.post@...3046...> Message-ID: If the textboxes are already existing, then I think you should put them into some container or collection. Example, in container: Dim hTextBox As TextBox For Each hTextBox In ToolPanel1.Children 'or hMyCollection .... Next You can identify the boxes with Tag, Name, or whatever. Jussi On Fri, Apr 11, 2014 at 1:45 AM, Jussi Lahtinen wrote: > What are you trying to achieve? > > > Dim hTextBoxes As New TextBox[10] > > For ii = 1 To 3 > hTextBoxes[ii] = New TextBox(Me) As "Textbox" & CStr(ii) > Next > > > There is also Name property if you want to change name of existing > textbox... > > > Jussi > > > > On Thu, Apr 10, 2014 at 11:58 PM, abbat81 wrote: > >> >> How to do this: >> >> Dim i as integer >> >> For i = 1 to 3 >> Textbox[i].Text = i ' Textbox1.Text, Textbox2.Text and Textbox3.Text >> Next >> >> Thanks >> >> >> >> -- >> View this message in context: >> http://gambas.8142.n7.nabble.com/How-to-set-name-of-control-tp46134.html >> Sent from the gambas-user mailing list archive at Nabble.com. >> >> >> ------------------------------------------------------------------------------ >> Put Bad Developers to Shame >> Dominate Development with Jenkins Continuous Integration >> Continuously Automate Build, Test & Deployment >> Start a new project now. Try Jenkins in the cloud. >> http://p.sf.net/sfu/13600_Cloudbees >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > From vuott at ...325... Fri Apr 11 01:20:21 2014 From: vuott at ...325... (Ru Vuott) Date: Fri, 11 Apr 2014 00:20:21 +0100 (BST) Subject: [Gambas-user] How editing more than 1024 bytes in a field of the DataBrowser Message-ID: <1397172021.13190.YahooMailBasic@...3274...> Hello Beno?t, fiiiiinally our friend replied, and sent its project (which I am attaching here). He explains: start the program, the menu "Impostazioni" -> "tabelle varie" -> "testi a scelta", click on "sblocca", choose the row, for example, "descrizione generale" and you can verify that in the column "testo" the text, that appears, is not the same as in the DB: it is cut exactly 1024 bytes. It seems to him that the cut is only in the reading from the DB, saving seems to get it right. Regards vuott Le 25/03/2014 00:47, Ru Vuott a ?crit : > Hello, > > our friend, member of Gambas-it.org forum, asks how he > can edit (or paste) more than 1024 bytes in a field of type > 'text' using a control DataBrowser connected to a mysql db > that comes to hold up 64 Kb. > He says that the databrowser cuts the text to 1024 characters, > thereby preventing the modification of the cut data. > > Regards > vuott > I don't get the problem: can you send me a project that shows what you are talking about? -- Beno?t Minisini -------------- next part -------------- A non-text attachment was scrubbed... Name: calcsogg-3.0.5.tar.bz2 Type: application/x-bzip Size: 97546 bytes Desc: not available URL: From gambas at ...1... Fri Apr 11 02:58:41 2014 From: gambas at ...1... (=?ISO-8859-1?Q?Beno=EEt_Minisini?=) Date: Fri, 11 Apr 2014 02:58:41 +0200 Subject: [Gambas-user] How editing more than 1024 bytes in a field of the DataBrowser In-Reply-To: <1397172021.13190.YahooMailBasic@...3274...> References: <1397172021.13190.YahooMailBasic@...3274...> Message-ID: <53473E41.2020003@...1...> Le 11/04/2014 01:20, Ru Vuott a ?crit : > Hello Beno?t, > > fiiiiinally our friend replied, and sent its project (which I am attaching here). > He explains: > start the program, the menu "Impostazioni" -> "tabelle varie" -> "testi a scelta", click on "sblocca", choose the row, for example, "descrizione generale" and you can verify that in the column "testo" the text, that appears, is not the same as in the DB: it is cut exactly 1024 bytes. > It seems to him that the cut is only in the reading from the DB, saving seems to get it right. > > Regards > vuott > OK. This 1024 is just an arbitrary cut done by the DataView & DataBrowser control, to not do display too much data. A bit stupid... I will find a solution and tell you. -- Beno?t Minisini From oitofelix at ...181... Fri Apr 11 05:17:40 2014 From: oitofelix at ...181... (Bruno =?UTF-8?B?RsOpbGl4?= Rezende Ribeiro) Date: Fri, 11 Apr 2014 00:17:40 -0300 Subject: [Gambas-user] Interpreter's treatment of classes Message-ID: <20140411001740.591d8a96@...3316...> Hello Gambas users and developers! I've been studying Gambas for almost a week and a half and I'm very impressed with the simplicity and elegance of Gambas' object oriented Basic language implementation. Congratulations to all developers, specially Beno?t Minisini. What a superb software development environment you've shared with us! I hope I can join you soon to work on its development. In the mean time, I'd like to kindly ask for some clarifications regarding the treatment of classes by the interpreter. Let 'MMain' be the main module of a Gambas program and the meta-syntactic variables 'CLASS-CLASS' and 'OBJECT-CLASS' be the expressions 'MMain' and 'Class.Load("MMain")' respectivelly. Consider the evaluation of the following expressions inside the 'Main' method of 'MMain' module: TypeOf(CLASS-CLASS) ==> gb.Class TypeOf(OBJECT-CLASS) ==> gb.Object As you can see the CLASS-CLASS expression yields a class, while OBJECT-CLASS expression yields an object. One might wonder what's the class of the latter: OBJECT-CLASS Is Class ==> True That's expected as we may presume OBJECT-CLASS evaluates to an object, of the class 'Class', which describes the class 'MMain', which in its turn is the result of the evaluation of CLASS-CLASS. Surprisingly enough, when one applies the same expression to CLASS-CLASS they obtain: CLASS-CLASS Is Class ==> True The only possible explanation is that CLASS-CLASS is simultaneously a class and an object. However, it doesn't behave as an usual instance of the class 'Class'. For instance, it is impossible to access the public methods and properties defined within the class 'Class' using some expression like 'CLASS-CLASS.SYMBOL' where the meta-syntactic variable 'SYMBOL' is a public symbol of the class 'Class'. Therefore, the assertion that CLASS-CLASS evaluates to some object which is an instance of the class 'Class' is somewhat meaningless underneath the usual concept of class/instance of object oriented programming. My first question is: why does Gambas behave this way? What's the reasoning backing up the exception to the general rule that the evaluation of 'CLASS-CLASS', while an instance of the class 'Class', represents? Would not it be simpler and more intuitive (hopefully without loss of technical merits) to take CLASS-CLASS as just a "pure" class? I came to this issue while writing a method for validation of function signatures in a component I'm working on. It works well with methods residing in dynamic classes, since given an object 'OBJECT' which is an instance of a dynamic class 'CLASS' which implements the method 'METHOD', one can easily obtain the method's signature with the expression 'Object.Class(OBJECT)["METHOD"].Signature'. However, for static classes I couldn't find a way to obtain the signature directly from the class object given that 'Object.Class(CLASS)["METHOD"].Signature' wouldn't work since 'Object.Class(CLASS)' evaluates to the class 'Class' and not 'CLASS' as would be desired, and we couldn't use it directly as in the expression 'CLASS["METHOD"].Signature' as one would naturally expect after pondering about the fact, pointed out above, that 'CLASS Is Class' yields 'True'. The only way I have succeeded to obtain the signature is using the name 'NAME' of the static class 'CLASS' within the expression 'Class.Load("NAME")["METHOD"].Signature'. That is unfortunate because I'm compelled to discriminate between static and dynamic classes, not to mention I need to find a way to obtain the name of a static class from itself. I thought there could be a more elegant solution. Is there? The ideal solution would be to provide a general way to get the "true" object of the class 'Class' which describes the class 'CLASS', since the fact that 'CLASS' is a "false" (and bastard) object of the class 'Class', and therefore doesn't describe its own properties while a Class --- but the properties of its objects --- is immaterial to any practical application I could think of. Summarizing: currently it seems only to be possible to obtain an object of the class 'Class' which describes the class 'CLASS' if you have an object which is an instance of it; therefore it only works for dynamic classes, and you have the burden of instantiation. Maybe I haven't looked into the right place. Could you, please, help me? Related to this issue is the problem of having a variable callback function as a property of some object from a given class. What do you think is the best way to setup a callback function for a method? Just to make it less abstract: I'm writing a component for plotting arbitrary numeric functions. The class 'Plot' implements all the plot logic, but it must callback a function, defined by the parent which instantiates it, to calculate the plot points. What's the best way to implement this behavior? I've tried defining an event for 'Plot' class so each time the 'Plot' object would need to (re)calculate the points, let's say for a change in the intended interval of the function's domain, the event would be raised, so the parent would have to be observing the 'Plot' object to intercept the raised event and then do the calculation. The problem is that by design the event handlers don't return values to the offending object, so the event handler at hand would have to make sure of returning it in some other pre-established manner, like storing the computed point in 'Last.Y', and there would be no check from the interpreter about the implementation following the function's signature and returning a 'Float' value, for example. So, I decided instead to store the object and method's name that implements the mathematical function into the Plot object, so it could call it for the computation of points and invariably receive a return value. But for that to work correctly I needed to check the function's signature. That's why I ultimately came to the issues presented above. One initial hope I had was that 'Function' were a native type of Gambas, as suggested by the expression evaluation 'TypeOf(FUNCTION) ==> gb.Function', where FUNCTION is the meta-syntactic variable for a function symbol in the current scope. Unfortunately, that turned out to not be true. Is there any reason to not make functions first-class citizens? That would solve my entire problem from the root, albeit the considerations given above are somewhat unrelated and should be considered anyway. Do you suggest a fourth way of implementing the callback function? Is there a standard or ad-hoc way I'm missing? Thank you in advance. -- ,= ,-_-. =. Bruno F?lix Rezende Ribeiro (oitofelix) [0x28D618AF] ((_/)o o(\_)) There is no system but GNU; `-'(. .)`-' GNU Linux-Libre is one of its official kernels; \_/ All software must be free as in freedom; -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 490 bytes Desc: not available URL: From vuott at ...325... Fri Apr 11 09:02:51 2014 From: vuott at ...325... (Ru Vuott) Date: Fri, 11 Apr 2014 08:02:51 +0100 (BST) Subject: [Gambas-user] How editing more than 1024 bytes in a field of the DataBrowser In-Reply-To: <53473E41.2020003@...1...> Message-ID: <1397199771.28596.YahooMailBasic@...3273...> Ok. -------------------------------------------- Ven 11/4/14, Beno?t Minisini ha scritto: Oggetto: Re: [Gambas-user] How editing more than 1024 bytes in a field of the DataBrowser A: "mailing list for gambas users" Data: Venerd? 11 Aprile 2014, 02:58 Le 11/04/2014 01:20, Ru Vuott a ?crit : > Hello Beno?t, > > fiiiiinally our friend replied, and sent its project (which I am attaching here). > He explains: >???start the program, the menu "Impostazioni" -> "tabelle varie" -> "testi a scelta", click on "sblocca", choose the row, for example, "descrizione generale" and you can verify that in the column "testo"? the text, that appears, is not the same as in the DB: it is cut exactly 1024 bytes. >???It seems to him that the cut is only in the reading from the DB, saving seems to get it right. > > Regards > vuott > OK. This 1024 is just an arbitrary cut done by the DataView & DataBrowser control, to not do display too much data. A bit stupid... I will find a solution and tell you. -- Beno?t Minisini ------------------------------------------------------------------------------ Put Bad Developers to Shame Dominate Development with Jenkins Continuous Integration Continuously Automate Build, Test & Deployment Start a new project now. Try Jenkins in the cloud. http://p.sf.net/sfu/13600_Cloudbees _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From abbat.81 at ...787... Fri Apr 11 11:22:12 2014 From: abbat.81 at ...787... (abbat81) Date: Fri, 11 Apr 2014 02:22:12 -0700 (PDT) Subject: [Gambas-user] How to set name of control In-Reply-To: References: <1397163519029-46134.post@...3046...> Message-ID: <1397208132740-46144.post@...3046...> I need not each of control but I need to set text to some of each controls, for example Textbox2.text. So, I have a digit from property of other control "2" How can I set a etxt to Textbox2.Text? -- View this message in context: http://gambas.8142.n7.nabble.com/How-to-set-name-of-control-tp46134p46144.html Sent from the gambas-user mailing list archive at Nabble.com. From gambas.fr at ...626... Fri Apr 11 12:41:18 2014 From: gambas.fr at ...626... (Fabien Bodard) Date: Fri, 11 Apr 2014 12:41:18 +0200 Subject: [Gambas-user] How to set name of control In-Reply-To: <1397208132740-46144.post@...3046...> References: <1397163519029-46134.post@...3046...> <1397208132740-46144.post@...3046...> Message-ID: Use a collection Assign existing textboxes like that: Mycol["2"]=textbox2 Then call the textbox like : Mycol[myindex].text="Toto" Le 11 avr. 2014 11:23, "abbat81" a ?crit : > I need not each of control but I need to set text to some of each controls, > for example Textbox2.text. > > So, I have a digit from property of other control "2" > > How can I set a etxt to Textbox2.Text? > > > > > -- > View this message in context: > http://gambas.8142.n7.nabble.com/How-to-set-name-of-control-tp46134p46144.html > Sent from the gambas-user mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > Put Bad Developers to Shame > Dominate Development with Jenkins Continuous Integration > Continuously Automate Build, Test & Deployment > Start a new project now. Try Jenkins in the cloud. > http://p.sf.net/sfu/13600_Cloudbees > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From jussi.lahtinen at ...626... Fri Apr 11 15:00:23 2014 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Fri, 11 Apr 2014 16:00:23 +0300 Subject: [Gambas-user] Interpreter's treatment of classes In-Reply-To: <20140411001740.591d8a96@...3316...> References: <20140411001740.591d8a96@...3316...> Message-ID: > However, it doesn't behave as an usual instance of > the class 'Class'. For instance, it is impossible to access the public > methods and properties defined within the class 'Class' using some > expression like 'CLASS-CLASS.SYMBOL' where the meta-syntactic variable > 'SYMBOL' is a public symbol of the class 'Class'. Therefore, the > assertion that CLASS-CLASS evaluates to some object which is an > instance of the class 'Class' is somewhat meaningless underneath the > usual concept of class/instance of object oriented programming. > If I have understood correctly you are referring to MMain which is module, not normal class. And in modules everything is static automatically. I will look more closely later. Jussi From abbat.81 at ...787... Fri Apr 11 17:22:00 2014 From: abbat.81 at ...787... (abbat81) Date: Fri, 11 Apr 2014 08:22:00 -0700 (PDT) Subject: [Gambas-user] How to set name of control In-Reply-To: References: <1397163519029-46134.post@...3046...> <1397208132740-46144.post@...3046...> Message-ID: <1397229720764-46147.post@...3046...> Please, help to understand it. Dim Mycol As Collection Mycol["2"] = TextBox2 ="Null Object" How to use it? I realy cant find any example of using a controls by names. Thanks -- View this message in context: http://gambas.8142.n7.nabble.com/How-to-set-name-of-control-tp46134p46147.html Sent from the gambas-user mailing list archive at Nabble.com. From dquinter at ...626... Fri Apr 11 17:35:07 2014 From: dquinter at ...626... (Daniel Quintero) Date: Fri, 11 Apr 2014 10:35:07 -0500 Subject: [Gambas-user] How to set name of control In-Reply-To: <1397229720764-46147.post@...3046...> References: <1397163519029-46134.post@...3046...> <1397208132740-46144.post@...3046...> <1397229720764-46147.post@...3046...> Message-ID: The object TextBox2 must already exist Regards *_________________________* *Lic. Daniel Quintero Rojas* *?Saludos desde M?xico!________* On Fri, Apr 11, 2014 at 10:22 AM, abbat81 wrote: > Please, help to understand it. > > Dim Mycol As Collection > Mycol["2"] = TextBox2 > ="Null Object" > > How to use it? > I realy cant find any example of using a controls by names. > Thanks > > > > > -- > View this message in context: > http://gambas.8142.n7.nabble.com/How-to-set-name-of-control-tp46134p46147.html > Sent from the gambas-user mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > Put Bad Developers to Shame > Dominate Development with Jenkins Continuous Integration > Continuously Automate Build, Test & Deployment > Start a new project now. Try Jenkins in the cloud. > http://p.sf.net/sfu/13600_Cloudbees > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From abbat.81 at ...787... Fri Apr 11 18:23:22 2014 From: abbat.81 at ...787... (abbat81) Date: Fri, 11 Apr 2014 09:23:22 -0700 (PDT) Subject: [Gambas-user] How to set name of control In-Reply-To: References: <1397163519029-46134.post@...3046...> <1397208132740-46144.post@...3046...> <1397229720764-46147.post@...3046...> Message-ID: <1397233402111-46149.post@...3046...> The Textbox2 exist allready ((( -- View this message in context: http://gambas.8142.n7.nabble.com/How-to-set-name-of-control-tp46134p46149.html Sent from the gambas-user mailing list archive at Nabble.com. From dquinter at ...626... Fri Apr 11 18:35:22 2014 From: dquinter at ...626... (Daniel Quintero) Date: Fri, 11 Apr 2014 11:35:22 -0500 Subject: [Gambas-user] How to set name of control In-Reply-To: <1397233402111-46149.post@...3046...> References: <1397163519029-46134.post@...3046...> <1397208132740-46144.post@...3046...> <1397229720764-46147.post@...3046...> <1397233402111-46149.post@...3046...> Message-ID: TextBox1, TextBox2 and TextBox1 already exist in my form FMain (Obviously, Button1 too): Public Sub Button1_Click() Dim col As New Collection Dim i As Integer col["1"] = TextBox1 col["2"] = TextBox2 col["3"] = TextBox3 For i = 1 To 3 col[CStr(i)].Text = "TextBox: " & CStr(i) Next End *_________________________* *Lic. Daniel Quintero Rojas* *?Saludos desde M?xico!________* On Fri, Apr 11, 2014 at 11:23 AM, abbat81 wrote: > The Textbox2 exist allready ((( > > > > -- > View this message in context: > http://gambas.8142.n7.nabble.com/How-to-set-name-of-control-tp46134p46149.html > Sent from the gambas-user mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > Put Bad Developers to Shame > Dominate Development with Jenkins Continuous Integration > Continuously Automate Build, Test & Deployment > Start a new project now. Try Jenkins in the cloud. > http://p.sf.net/sfu/13600_Cloudbees > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From Karl.Reinl at ...9... Fri Apr 11 18:36:03 2014 From: Karl.Reinl at ...9... (Charlie Reinl) Date: Fri, 11 Apr 2014 18:36:03 +0200 Subject: [Gambas-user] How to set name of control In-Reply-To: <1397233402111-46149.post@...3046...> References: <1397163519029-46134.post@...3046...> <1397208132740-46144.post@...3046...> <1397229720764-46147.post@...3046...> <1397233402111-46149.post@...3046...> Message-ID: <6ec893158f49457dbc9e06d20832854e@...2896...> On Fri, 11 Apr 2014 09:23:22 -0700 (PDT), abbat81 wrote: > The Textbox2 exist allready ((( Dim Mycol As Collection Mycol["2"] = TextBox2 Null Object comes from Mycol try Dim Mycol As New Collection Mycol["2"] = TextBox2 Amicalement Charlie From abbat.81 at ...787... Fri Apr 11 18:55:40 2014 From: abbat.81 at ...787... (abbat81) Date: Fri, 11 Apr 2014 09:55:40 -0700 (PDT) Subject: [Gambas-user] How to set name of control In-Reply-To: References: <1397163519029-46134.post@...3046...> <1397208132740-46144.post@...3046...> <1397229720764-46147.post@...3046...> <1397233402111-46149.post@...3046...> Message-ID: <1397235340696-46152.post@...3046...> Thank you, finelly I got it. -- View this message in context: http://gambas.8142.n7.nabble.com/How-to-set-name-of-control-tp46134p46152.html Sent from the gambas-user mailing list archive at Nabble.com. From oitofelix at ...181... Fri Apr 11 19:09:35 2014 From: oitofelix at ...181... (Bruno =?UTF-8?B?RsOpbGl4?= Rezende Ribeiro) Date: Fri, 11 Apr 2014 14:09:35 -0300 Subject: [Gambas-user] Interpreter's treatment of classes In-Reply-To: References: <20140411001740.591d8a96@...3316...> Message-ID: <20140411140935.17b231c8@...3316...> Em Fri, 11 Apr 2014 16:00:23 +0300 Jussi Lahtinen escreveu: > > However, it doesn't behave as an usual instance of > > the class 'Class'. For instance, it is impossible to access the > > public methods and properties defined within the class 'Class' > > using some expression like 'CLASS-CLASS.SYMBOL' where the > > meta-syntactic variable 'SYMBOL' is a public symbol of the class > > 'Class'. Therefore, the assertion that CLASS-CLASS evaluates to > > some object which is an instance of the class 'Class' is somewhat > > meaningless underneath the usual concept of class/instance of > > object oriented programming. > > > > If I have understood correctly you are referring to MMain which is > module, not normal class. > And in modules everything is static automatically. I think you mean they aren't dynamic classes. Modules are static classes by definition, aren't they? Anyway, the reasoning until the paragraph you quoted above is independent of that attribute of classes; I mean, regardless of 'CLASS-CLASS' being static or dynamic every expression described until that paragraph works the same way. In the text I wrote, the differences between dynamic and static classes only show up in the process of obtaining a proper object of the class 'Class' which describes the given class 'CLASS-CLASS', what is perfectly possible for dynamic classes, but I fail to see how to accomplish the same with static classes without the knowledge of its name at compilation time. > I will look more closely later. Please do. Thank you. -- ,= ,-_-. =. Bruno F?lix Rezende Ribeiro (oitofelix) [0x28D618AF] ((_/)o o(\_)) There is no system but GNU; `-'(. .)`-' GNU Linux-Libre is one of its official kernels; \_/ All software must be free as in freedom; -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 490 bytes Desc: not available URL: From taboege at ...626... Fri Apr 11 20:21:38 2014 From: taboege at ...626... (Tobias Boege) Date: Fri, 11 Apr 2014 20:21:38 +0200 Subject: [Gambas-user] Interpreter's treatment of classes In-Reply-To: <20140411001740.591d8a96@...3316...> References: <20140411001740.591d8a96@...3316...> Message-ID: <20140411182138.GA515@...2774...> On Fri, 11 Apr 2014, Bruno F??lix Rezende Ribeiro wrote: > Hello Gambas users and developers! > > I've been studying Gambas for almost a week and a half and I'm very > impressed with the simplicity and elegance of Gambas' object oriented > Basic language implementation. Congratulations to all developers, > specially Beno??t Minisini. What a superb software development > environment you've shared with us! I hope I can join you soon to work > on its development. > That's good news. > In the mean time, I'd like to kindly ask for some clarifications > regarding the treatment of classes by the interpreter. > > Let 'MMain' be the main module of a Gambas program and the > meta-syntactic variables 'CLASS-CLASS' and 'OBJECT-CLASS' be the > expressions 'MMain' and 'Class.Load("MMain")' respectivelly. Consider > the evaluation of the following expressions inside the 'Main' method of > 'MMain' module: > > TypeOf(CLASS-CLASS) ==> gb.Class > TypeOf(OBJECT-CLASS) ==> gb.Object > > As you can see the CLASS-CLASS expression yields a class, while > OBJECT-CLASS expression yields an object. One might wonder what's the > class of the latter: > > OBJECT-CLASS Is Class ==> True > > That's expected as we may presume OBJECT-CLASS evaluates to an object, > of the class 'Class', which describes the class 'MMain', which in its > turn is the result of the evaluation of CLASS-CLASS. With you so far. But, as Jussi pointed out, we aren't talking about classes in general but - and that may be related to the problem following - about a Module which is a static class. And it is not at all for granted that they behave similarly. We can also have a singleton (Create Static) class which is to be classified as a dynamic class but behaves like an object most of the time you use the class name. > Surprisingly > enough, when one applies the same expression to CLASS-CLASS they > obtain: > > CLASS-CLASS Is Class ==> True > > The only possible explanation is that CLASS-CLASS is simultaneously a > class and an object. However, it doesn't behave as an usual instance of > the class 'Class'. For instance, it is impossible to access the public > methods and properties defined within the class 'Class' using some > expression like 'CLASS-CLASS.SYMBOL' where the meta-syntactic variable > 'SYMBOL' is a public symbol of the class 'Class'. Therefore, the > assertion that CLASS-CLASS evaluates to some object which is an > instance of the class 'Class' is somewhat meaningless underneath the > usual concept of class/instance of object oriented programming. > > My first question is: why does Gambas behave this way? What's the > reasoning backing up the exception to the general rule that the > evaluation of 'CLASS-CLASS', while an instance of the class 'Class', > represents? Would not it be simpler and more intuitive (hopefully > without loss of technical merits) to take CLASS-CLASS as just a "pure" > class? > I think the notion of class is ambiguous at this point in Gambas - but only Benoit can tell us if that's true. Besides the normal class/object model where a Class class would only be used for reflection, we want to, like, access class constants from the class name, like Align.Center in the Align class. That would be impossible if the symbol "Align" referred to an object of the Class class because it then wouldn't have the possibility to exhibit its own symbols. On the other hand, it _is_ a class and that's why TypeOf() is right. Basta. :-) > I came to this issue while writing a method for validation of function > signatures in a component I'm working on. Pretty strange but sure a good way to learn Gambas primitives if you can deal with it :-) And your first component after a week and half. An impressive learning curve! > It works well with methods > residing in dynamic classes, since given an object 'OBJECT' which is an > instance of a dynamic class 'CLASS' which implements the method > 'METHOD', one can easily obtain the method's signature with the > expression 'Object.Class(OBJECT)["METHOD"].Signature'. However, for > static classes I couldn't find a way to obtain the signature directly > from the class object given that > 'Object.Class(CLASS)["METHOD"].Signature' wouldn't work since > 'Object.Class(CLASS)' evaluates to the class 'Class' and not 'CLASS' as > would be desired, and we couldn't use it directly as in the expression > 'CLASS["METHOD"].Signature' as one would naturally expect after > pondering about the fact, pointed out above, that 'CLASS Is Class' > yields 'True'. > > The only way I have succeeded to obtain the signature is using the name > 'NAME' of the static class 'CLASS' within the expression > 'Class.Load("NAME")["METHOD"].Signature'. That is unfortunate because > I'm compelled to discriminate between static and dynamic classes, not > to mention I need to find a way to obtain the name of a static class > from itself. I thought there could be a more elegant solution. Is > there? The ideal solution would be to provide a general way to get the > "true" object of the class 'Class' which describes the class 'CLASS', > since the fact that 'CLASS' is a "false" (and bastard) object of the > class 'Class', and therefore doesn't describe its own properties while > a Class --- but the properties of its objects --- is immaterial to any > practical application I could think of. Summarizing: currently it > seems only to be possible to obtain an object of the class 'Class' > which describes the class 'CLASS' if you have an object which is an > instance of it; therefore it only works for dynamic classes, and you > have the burden of instantiation. Maybe I haven't looked into the > right place. Could you, please, help me? > OK, this is tricky (thanks by the way for that very interesting question!). It seems that TypeOf(CLASS) served you well with MMain. It may not be an instance of the Class class but you can cast it to one :-) I attach you a project that, in its heart, uses the following procedure to print the signature of the first found method in some object's class: --8<------------------------------------------------------------------------ Public Sub PrintFirstMethod(hObj As Object) Dim hClass As Class Dim sSym As String ' Static class? Try hClass = hObj ' Not a static class, then we can use Object.Class If Error Then hClass = Object.Class(hObj) For Each sSym In hClass.Symbols If hClass[sSym].Kind <> Class.Method Then Continue Print "Signature of";; sSym;; "in";; hClass.Name; ":";; hClass[sSym].Signature Return Next Print "No method found in";; hClass.Name End --8<------------------------------------------------------------------------ It first tries to cast the given object to a Class object which will succeed if you give a static class, like in PrintFirstMethod(MMain), and will fail else. If it fails, we can be sure that it is a real object and can use the Object class. > Related to this issue is the problem of having a variable callback > function as a property of some object from a given class. What do you > think is the best way to setup a callback function for a method? Just > to make it less abstract: I'm writing a component for plotting > arbitrary numeric functions. The class 'Plot' implements all the plot > logic, but it must callback a function, defined by the parent which > instantiates it, to calculate the plot points. What's the best way to > implement this behavior? I've tried defining an event for 'Plot' class > so each time the 'Plot' object would need to (re)calculate the points, > let's say for a change in the intended interval of the function's > domain, the event would be raised, so the parent would have to be > observing the 'Plot' object to intercept the raised event and then do > the calculation. The problem is that by design the event handlers > don't return values to the offending object, so the event handler at > hand would have to make sure of returning it in some other > pre-established manner, like storing the computed point in 'Last.Y', and > there would be no check from the interpreter about the implementation > following the function's signature and returning a 'Float' value, for > example. In Gambas, you mostly do it the other way around. If your Plot object wants data, it would raise its Plot_Data event which needs to be intercepted by your code. Then you would fill a property of the *Plot* object, like Plot.Data which you can decide to be a Float or whatever. You can see this strategy being used rather successfully in the interplay of Editor and Highlight of gb.qt4.ext or in DataBrowser of gb.db.form and others. > So, I decided instead to store the object and method's name > that implements the mathematical function into the Plot object, so it > could call it for the computation of points and invariably receive a > return value. But for that to work correctly I needed to check the > function's signature. That's why I ultimately came to the issues > presented above. One initial hope I had was that 'Function' were a > native type of Gambas, as suggested by the expression evaluation > 'TypeOf(FUNCTION) ==> gb.Function', where FUNCTION is the > meta-syntactic variable for a function symbol in the current scope. > Unfortunately, that turned out to not be true. Is there any reason to > not make functions first-class citizens? That would solve my entire > problem from the root, albeit the considerations given above are > somewhat unrelated and should be considered anyway. > Dealing with functions in variables has never been very fertile in Gambas, if I tried it correctly. I don't know why, maybe because there are better alternatives, or functions - which are actually methods - don't act very object-like (they have no methods themselves or data you could manipulate [ hmm, actually they have a signature... but there are better ways to do what you want ]). You need to have an object that just *resembles* a function but isn't simply an array of bytecode. > Do you suggest a fourth way of implementing the callback function? Is > there a standard or ad-hoc way I'm missing? > There is the way I described above, there is the Eval() function which _may_ suffice for your needs and there is another possibility: define your interfaces. If your Plot object has a plottee (how I call the object providing plot data), require that the plottee exhibits a specific interface which the interpreter can check. It works like this: 1) Create a non-creatable Plottee.class and define a method to access points for the plot from it. This is the base class for all things that can deliver plot data. 2) In your Plotter.class, request a Plottee object as an argument to get your points. Consequently, your user has to define their own Plottee-like class to interface with your Plotter logic, by inheriting the Plottee.class. The interpreter will check if they inherits correctly (which includes overriding methods and properties with the correct signature). Attached is a project that shows this. If you, e.g., declare _next() in EvalPlottee as returning an Integer or anything not PointF, the interpreter will raise a runtime error. There may also be some things you didn't know yet. Feel free to ask. This may not be best way. Actually, I find it myself way too Java-like but I'm hungry and this mail stands between me and dinner. You should also consider the event-based approach outlined above which is more like how things are done in Gambas. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk -------------- next part -------------- A non-text attachment was scrubbed... Name: module-class-object-0.0.1.tar.gz Type: application/octet-stream Size: 4973 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: plotter-plottee-0.0.1.tar.gz Type: application/octet-stream Size: 5380 bytes Desc: not available URL: From oitofelix at ...181... Sat Apr 12 00:27:10 2014 From: oitofelix at ...181... (Bruno =?UTF-8?B?RsOpbGl4?= Rezende Ribeiro) Date: Fri, 11 Apr 2014 19:27:10 -0300 Subject: [Gambas-user] Interpreter's treatment of classes In-Reply-To: <20140411182138.GA515@...2774...> References: <20140411001740.591d8a96@...3316...> <20140411182138.GA515@...2774...> Message-ID: <20140411192710.06641529@...3316...> Em Fri, 11 Apr 2014 20:21:38 +0200 Tobias Boege escreveu: > On Fri, 11 Apr 2014, Bruno F??lix Rezende Ribeiro wrote: > > [...] > > That's expected as we may presume OBJECT-CLASS evaluates to an > > object, of the class 'Class', which describes the class 'MMain', > > which in its turn is the result of the evaluation of CLASS-CLASS. > > With you so far. But, as Jussi pointed out, we aren't talking about > classes in general but - and that may be related to the problem > following - about a Module which is a static class. And it is not at > all for granted that they behave similarly. We can also have a > singleton (Create Static) class which is to be classified as a > dynamic class but behaves like an object most of the time you use the > class name. > > > [...] > > My first question is: why does Gambas behave this way? What's the > > reasoning backing up the exception to the general rule that the > > evaluation of 'CLASS-CLASS', while an instance of the class 'Class', > > represents? Would not it be simpler and more intuitive (hopefully > > without loss of technical merits) to take CLASS-CLASS as just a > > "pure" class? > > > > I think the notion of class is ambiguous at this point in Gambas - > but only Benoit can tell us if that's true. > > Besides the normal class/object model where a Class class would only > be used for reflection, we want to, like, access class constants from > the class name, like Align.Center in the Align class. That would be > impossible if the symbol "Align" referred to an object of the Class > class because it then wouldn't have the possibility to exhibit its > own symbols. > > On the other hand, it _is_ a class and that's why TypeOf() is right. > Basta. :-) I just want to point out that I'm not arguing that every class should work as an instance of the class 'Class'. As you have shown that'd be impractical. After all we have the class 'Class' to derive objects that grants type introspection capabilities, the way it ought to be. I'm just very concerned about the 'Is' operator which says that every class is somehow an object which is an instance of the class 'Class'. That seems to me rather inconsistent. Notice that 'TypeOf' is a consistent function as far as I'm aware of: it says that classes are classes and objects are objects. In fact, I share with you the opinion that it's the authoritative reference about such matters. ;-) Now, having a class named "Class" that is in fact intended for introspection is a bit confusing for newcomers but it's not inconsistent at all. Maybe it should be called 'ClassIntrospection' or something to avoid that. I think what we can't do is to assert that every class is an instance of the class 'ClassIntrospection', because it's clearly not the case, regardless of what the operator 'Is' thinks; either it knows something about inheritance that I do not or it has a lot to learn with its cousin 'TypeOf'. I can't help but ask: am I missing some metaphysical principle about the way classes are arranged? Am I, 'Is'? ;-) Anyway we do need classes as first-class citizens of Gambas, but we can't use the name 'Class' for it until we change its meaning as described above. The root of all evil seems to be that the expression 'Dim hClass As Class' makes 'hClass' a handler for introspection objects of the class 'Class', while it actually should be making a handler for pure classes, as 'MMain', for example. I think it'd be far more intuitive, and perhaps yet more useful. If one wants an introspection object, they could declare it as 'Dim hObject As ClassIntrospection'. Good or not, one consequence of that is that it would be possible to make multiple aliases for a single class. But what's the problem? Isn't this the current situation for a single object? > > I came to this issue while writing a method for validation of > > function signatures in a component I'm working on. > > Pretty strange but sure a good way to learn Gambas primitives if you > can deal with it :-) And your first component after a week and half. > An impressive learning curve! Thanks. That's the result of the combination of excitement, dedication and diligence :-P > > [...] Maybe I haven't looked into the right place. Could you, > > please, help me? > > > > OK, this is tricky (thanks by the way for that very interesting > question!). It seems that TypeOf(CLASS) served you well with MMain. > It may not be an instance of the Class class but you can cast it to > one :-) > > I attach you a project that, in its heart, uses the following > procedure to print the signature of the first found method in some > object's class: > > --8<------------------------------------------------------------------------ > Public Sub PrintFirstMethod(hObj As Object) > Dim hClass As Class > Dim sSym As String > > ' Static class? > Try hClass = hObj > ' Not a static class, then we can use Object.Class > If Error Then hClass = Object.Class(hObj) > For Each sSym In hClass.Symbols > If hClass[sSym].Kind <> Class.Method Then Continue > Print "Signature of";; sSym;; "in";; hClass.Name; ":";; > hClass[sSym].Signature Return > Next > Print "No method found in";; hClass.Name > End > --8<------------------------------------------------------------------------ > > It first tries to cast the given object to a Class object which will > succeed if you give a static class, like in PrintFirstMethod(MMain), > and will fail else. If it fails, we can be sure that it is a real > object and can use the Object class. > Wow! That is exactly what I was looking for! I've looked into language statements, native functions, operators and classes and have found nothing. It just happened to be the wrong place: all the magic is in a simple casting; a somewhat unpredictable one, though. Casting is really a subject matter that seems to be almost entirely overlooked in the language documentation. I couldn't find anything specifically about it at Gambas' Wiki. Is it even an official language feature? The only meaningful casting I did know about were those involving different numeric types, including booleans. Interesting enough, I've found that casting classes to objects results in introspection objects for the original classes, so you don't have to specifically cast them to the class 'Class'. That's a really meaningful and useful behavior. Take a look: Dim hObject As Object = MMain TypeOf(MMain) ==> gb.Class TypeOf(hObject) ==> gb.Object hObject Is Class ==> True hObject.Name ==> "MMain" It means that classes are already casted to introspection objects of the class 'Class' when your function starts. > > Related to this issue is the problem of having a variable callback > > function as a property of some object from a given class. What do > > you think is the best way to setup a callback function for a > > method? Just to make it less abstract: I'm writing a component for > > plotting arbitrary numeric functions. The class 'Plot' implements > > all the plot logic, but it must callback a function, defined by the > > parent which instantiates it, to calculate the plot points. What's > > the best way to implement this behavior? I've tried defining an > > event for 'Plot' class so each time the 'Plot' object would need to > > (re)calculate the points, let's say for a change in the intended > > interval of the function's domain, the event would be raised, so > > the parent would have to be observing the 'Plot' object to > > intercept the raised event and then do the calculation. The > > problem is that by design the event handlers don't return values to > > the offending object, so the event handler at hand would have to > > make sure of returning it in some other pre-established manner, > > like storing the computed point in 'Last.Y', and there would be no > > check from the interpreter about the implementation following the > > function's signature and returning a 'Float' value, for example. > > In Gambas, you mostly do it the other way around. If your Plot object > wants data, it would raise its Plot_Data event which needs to be > intercepted by your code. Then you would fill a property of the > *Plot* object, like Plot.Data which you can decide to be a Float or > whatever. > > You can see this strategy being used rather successfully in the > interplay of Editor and Highlight of gb.qt4.ext or in DataBrowser of > gb.db.form and others. > I think I've failed to convey my idea here. I'm describing exactly what you call "the other way around". After rereading it I can see how you may have misinterpreted it as the opposite of what I intended to mean. Sorry, it's my fault to not have made it clearer. > > So, I decided instead to store the object and method's name > > that implements the mathematical function into the Plot object, so > > it could call it for the computation of points and invariably > > receive a return value. But for that to work correctly I needed to > > check the function's signature. That's why I ultimately came to the > > issues presented above. One initial hope I had was that 'Function' > > were a native type of Gambas, as suggested by the expression > > evaluation 'TypeOf(FUNCTION) ==> gb.Function', where FUNCTION is the > > meta-syntactic variable for a function symbol in the current scope. > > Unfortunately, that turned out to not be true. Is there any reason > > to not make functions first-class citizens? That would solve my > > entire problem from the root, albeit the considerations given above > > are somewhat unrelated and should be considered anyway. > > > > Dealing with functions in variables has never been very fertile in > Gambas, if I tried it correctly. I don't know why, maybe because > there are better alternatives, or functions - which are actually > methods - don't act very object-like (they have no methods themselves > or data you could manipulate [ hmm, actually they have a signature... > but there are better ways to do what you want ]). > > You need to have an object that just *resembles* a function but isn't > simply an array of bytecode. > You are right --- there are arguably better alternatives which are more object-like. However, making them first-class citizens is a first step towards reflection[1], don't you think? Is Gambas in any way a reflexive language? > > Do you suggest a fourth way of implementing the callback function? > > Is there a standard or ad-hoc way I'm missing? > > > > There is the way I described above, there is the Eval() function > which _may_ suffice for your needs and there is another possibility: > define your interfaces. The idea you described above was my first implementation. Thinking better now, it's actually a good method. The flaw I saw within it is not a real concern; it was just a (perhaps silly) matter of style. Indeed the 'Eval' function will be of opportune use when I start to think about functions only known at runtime. Define my own interfaces? Hummm... let me see... > If your Plot object has a plottee (how I call the object providing > plot data), require that the plottee exhibits a specific interface > which the interpreter can check. It works like this: > > 1) Create a non-creatable Plottee.class and define a method to access > points for the plot from it. This is the base class for all > things that can deliver plot data. > 2) In your Plotter.class, request a Plottee object as an argument to > get your points. > > Consequently, your user has to define their own Plottee-like class to > interface with your Plotter logic, by inheriting the Plottee.class. > The interpreter will check if they inherits correctly (which includes > overriding methods and properties with the correct signature). > Attached is a project that shows this. If you, e.g., declare _next() > in EvalPlottee as returning an Integer or anything not PointF, the > interpreter will raise a runtime error. > That's a good idea! My current implementation does kind of that, I mean, it defines a Plottee class, which the Plotter class uses for retrieving the points. However I was struggling with how to make the Plottee class instantiate objects which could use arbitrary functions. So I've resorted to implement it in an obscure way referencing objects and methods by its name and checking its signatures. As you have shown it turns out to not be necessary at all. Notwithstanding, it was very useful to learn about the guts of class treatment; the issue which originated this correspondence. :-) There is only a down side of this interface method: every new function needs a entire new class to implement it. Furthermore it's only useful for functions known at compilation time. > There may also be some things you didn't know yet. Feel free to ask. Thanks, I took note of that. I won't be shy. :-) > This may not be best way. Actually, I find it myself way too > Java-like but I'm hungry and this mail stands between me and dinner. > You should also consider the event-based approach outlined above > which is more like how things are done in Gambas. Yeah, perhaps the initial event-driven interface is actually the best one. Thank you so much for the enlightening response and source code examples. Happy Hacking! [1] https://en.wikipedia.org/wiki/Reflection_%28computer_programming%29 -- ,= ,-_-. =. Bruno F?lix Rezende Ribeiro (oitofelix) [0x28D618AF] ((_/)o o(\_)) There is no system but GNU; `-'(. .)`-' GNU Linux-Libre is one of its official kernels; \_/ All software must be free as in freedom; -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 490 bytes Desc: not available URL: From gambas at ...1... Sat Apr 12 17:38:03 2014 From: gambas at ...1... (=?ISO-8859-1?Q?Beno=EEt_Minisini?=) Date: Sat, 12 Apr 2014 17:38:03 +0200 Subject: [Gambas-user] Interpreter's treatment of classes In-Reply-To: <20140411001740.591d8a96@...3316...> References: <20140411001740.591d8a96@...3316...> Message-ID: <53495DDB.40304@...1...> Le 11/04/2014 05:17, Bruno F?lix Rezende Ribeiro a ?crit : > Hello Gambas users and developers! > > I've been studying Gambas for almost a week and a half and I'm very > impressed with the simplicity and elegance of Gambas' object oriented > Basic language implementation. Congratulations to all developers, > specially Beno?t Minisini. What a superb software development > environment you've shared with us! I hope I can join you soon to work > on its development. > > In the mean time, I'd like to kindly ask for some clarifications > regarding the treatment of classes by the interpreter. > > Let 'MMain' be the main module of a Gambas program and the > meta-syntactic variables 'CLASS-CLASS' and 'OBJECT-CLASS' be the > expressions 'MMain' and 'Class.Load("MMain")' respectivelly. Consider > the evaluation of the following expressions inside the 'Main' method of > 'MMain' module: > > TypeOf(CLASS-CLASS) ==> gb.Class > TypeOf(OBJECT-CLASS) ==> gb.Object > > As you can see the CLASS-CLASS expression yields a class, while > OBJECT-CLASS expression yields an object. One might wonder what's the > class of the latter: > > OBJECT-CLASS Is Class ==> True > > That's expected as we may presume OBJECT-CLASS evaluates to an object, > of the class 'Class', which describes the class 'MMain', which in its > turn is the result of the evaluation of CLASS-CLASS. Surprisingly > enough, when one applies the same expression to CLASS-CLASS they > obtain: > > CLASS-CLASS Is Class ==> True > > The only possible explanation is that CLASS-CLASS is simultaneously a > class and an object. However, it doesn't behave as an usual instance of > the class 'Class'. For instance, it is impossible to access the public > methods and properties defined within the class 'Class' using some > expression like 'CLASS-CLASS.SYMBOL' where the meta-syntactic variable > 'SYMBOL' is a public symbol of the class 'Class'. Therefore, the > assertion that CLASS-CLASS evaluates to some object which is an > instance of the class 'Class' is somewhat meaningless underneath the > usual concept of class/instance of object oriented programming. > > My first question is: why does Gambas behave this way? What's the > reasoning backing up the exception to the general rule that the > evaluation of 'CLASS-CLASS', while an instance of the class 'Class', > represents? Would not it be simpler and more intuitive (hopefully > without loss of technical merits) to take CLASS-CLASS as just a "pure" > class? All that is because, "is a" has two meanings in Gambas. 1) An object reference A "is a" class B. It means that the class of the object A is the class B. 2) An expression "is a" datatype. And there are two datatypes, "gb.Object" and "gb.Class". "gb.Object" is any expression that returns a non-null object reference. An object reference internally includes two pointers: a class pointer, and an object data pointer. "gb.Class" is any expression that returns a class. It includes one pointer, the class pointer. "gb.Class" exists only for internal optimization reasons. I could have used instead a "gb.Object", with a null object data pointer. But it would have been slower. Now, as stated in the wiki, classes are really objects whose class is the "Class" class. But a reference to a class as an object is not the same thing as a reference to the class. The first one has methods that describe the class structure, the second one allows to call the static methods of the class. > > I came to this issue while writing a method for validation of function > signatures in a component I'm working on. It works well with methods > residing in dynamic classes, since given an object 'OBJECT' which is an > instance of a dynamic class 'CLASS' which implements the method > 'METHOD', one can easily obtain the method's signature with the > expression 'Object.Class(OBJECT)["METHOD"].Signature'. However, for > static classes I couldn't find a way to obtain the signature directly > from the class object given that > 'Object.Class(CLASS)["METHOD"].Signature' wouldn't work since > 'Object.Class(CLASS)' evaluates to the class 'Class' and not 'CLASS' as > would be desired, and we couldn't use it directly as in the expression > 'CLASS["METHOD"].Signature' as one would naturally expect after > pondering about the fact, pointed out above, that 'CLASS Is Class' > yields 'True'. > > The only way I have succeeded to obtain the signature is using the name > 'NAME' of the static class 'CLASS' within the expression > 'Class.Load("NAME")["METHOD"].Signature'. That is unfortunate because > I'm compelled to discriminate between static and dynamic classes, not > to mention I need to find a way to obtain the name of a static class > from itself. I thought there could be a more elegant solution. Is > there? The ideal solution would be to provide a general way to get the > "true" object of the class 'Class' which describes the class 'CLASS', > since the fact that 'CLASS' is a "false" (and bastard) object of the > class 'Class', and therefore doesn't describe its own properties while > a Class --- but the properties of its objects --- is immaterial to any > practical application I could think of. Summarizing: currently it > seems only to be possible to obtain an object of the class 'Class' > which describes the class 'CLASS' if you have an object which is an > instance of it; therefore it only works for dynamic classes, and you > have the burden of instantiation. Maybe I haven't looked into the > right place. Could you, please, help me? > > Related to this issue is the problem of having a variable callback > function as a property of some object from a given class. What do you > think is the best way to setup a callback function for a method? Just > to make it less abstract: I'm writing a component for plotting > arbitrary numeric functions. The class 'Plot' implements all the plot > logic, but it must callback a function, defined by the parent which > instantiates it, to calculate the plot points. What's the best way to > implement this behavior? I've tried defining an event for 'Plot' class > so each time the 'Plot' object would need to (re)calculate the points, > let's say for a change in the intended interval of the function's > domain, the event would be raised, so the parent would have to be > observing the 'Plot' object to intercept the raised event and then do > the calculation. The problem is that by design the event handlers > don't return values to the offending object, so the event handler at > hand would have to make sure of returning it in some other > pre-established manner, like storing the computed point in 'Last.Y', and > there would be no check from the interpreter about the implementation > following the function's signature and returning a 'Float' value, for > example. So, I decided instead to store the object and method's name > that implements the mathematical function into the Plot object, so it > could call it for the computation of points and invariably receive a > return value. But for that to work correctly I needed to check the > function's signature. That's why I ultimately came to the issues > presented above. One initial hope I had was that 'Function' were a > native type of Gambas, as suggested by the expression evaluation > 'TypeOf(FUNCTION) ==> gb.Function', where FUNCTION is the > meta-syntactic variable for a function symbol in the current scope. > Unfortunately, that turned out to not be true. Is there any reason to > not make functions first-class citizens? That would solve my entire > problem from the root, albeit the considerations given above are > somewhat unrelated and should be considered anyway. > > Do you suggest a fourth way of implementing the callback function? Is > there a standard or ad-hoc way I'm missing? > > Thank you in advance. > As there is no true function datatype at the moment, there is no true generic solution. (Internally, the function datatype exists, but all non-official things do no exist. By the way I told you nothing). When I need doing these sorts of things, I'm only using dynamic object. And if I have a static class, I transform it into a auto-instanciable dynamic class (like Forms objects, for example). If a class is auto-instanciable, using the class name as an object automatically transforms the "gb.Class" expression into a reference to the auto-created internal singleton object. So you exactly have the syntax you need. And when I will succeed in implementing a clean global syntax, you will just have to transform your auto-creatable class back to a static class. Regards, -- Beno?t Minisini From gambas at ...1... Sat Apr 12 19:30:41 2014 From: gambas at ...1... (=?ISO-8859-1?Q?Beno=EEt_Minisini?=) Date: Sat, 12 Apr 2014 19:30:41 +0200 Subject: [Gambas-user] Official release of Gambas 3.5.3 Message-ID: <53497841.6000406@...1...> Hi, Gambas 3.5.3 is now officially available. I backported two fixes since the unofficial release: one in the IDE help system, and another more serious in the interpreter: a memory leak in Upper$() and Lower$(). Download it there: http://sourceforge.net/projects/gambas/files/gambas3/gambas3-3.5.3.tar.bz2/download And get the release notes there: http://gambaswiki.org/wiki/doc/release/3.5.3 Enjoy it! P.S. I'm offline for a week, I come back April, 22th. -- Beno?t Minisini From jusabejusabe at ...626... Sat Apr 12 21:13:54 2014 From: jusabejusabe at ...626... (Julio Sanchez) Date: Sat, 12 Apr 2014 21:13:54 +0200 Subject: [Gambas-user] Example of scrollArea Message-ID: Hello I would like to see an example of ScrollArea, I think the IconView control is done with it. ( http://gambas.8142.n7.nabble.com/DrawArea-vs-ScrollArea-td10261.html ) I can not find the source code of this control Can you tell me where to find it? Regards Jsbsan From gambas at ...1... Sat Apr 12 21:36:26 2014 From: gambas at ...1... (=?ISO-8859-1?Q?Beno=EEt_Minisini?=) Date: Sat, 12 Apr 2014 21:36:26 +0200 Subject: [Gambas-user] Example of scrollArea In-Reply-To: References: Message-ID: <534995BA.7030707@...1...> Le 12/04/2014 21:13, Julio Sanchez a ?crit : > Hello > I would like to see an example of ScrollArea, I think the IconView control > is done with it. ( > http://gambas.8142.n7.nabble.com/DrawArea-vs-ScrollArea-td10261.html ) > I can not find the source code of this control > Can you tell me where to find it? > > Regards > > Jsbsan The ScrollArea sources are in the 'gb.gui.base' component project in '/comp/src'. A simpler example of its use is the ImageView control located in 'gb.form'. You use the ScrollArea exactly like the DrawingArea, except that: 1) You must define the contents size with the ResizeContents() method. 2) You must take the vaue of ScrollX and ScrollY properties into account when drawing inside the Draw event handler (at least for things that must move with the scrollbars). 3) A ScrollArea has no "Cached" property. You must implement the Draw event handler. 4) You have a "Shadow" property if you want to draw nice shadows on borders where scrolling is possible. Regards, -- Beno?t Minisini From taboege at ...626... Sat Apr 12 21:36:56 2014 From: taboege at ...626... (Tobias Boege) Date: Sat, 12 Apr 2014 21:36:56 +0200 Subject: [Gambas-user] Example of scrollArea In-Reply-To: References: Message-ID: <20140412193656.GA513@...2774...> On Sat, 12 Apr 2014, Julio Sanchez wrote: > Hello > I would like to see an example of ScrollArea, I think the IconView control > is done with it. ( > http://gambas.8142.n7.nabble.com/DrawArea-vs-ScrollArea-td10261.html ) > I can not find the source code of this control > Can you tell me where to find it? > Attached is our canonical example for the ScrollArea. If you need to know more you need to ask a more precise question. The source code of the IconView is in gb.gui.base[0] - and you had a good nose, it uses a ScrollArea! Regards, Tobi [0] http://sourceforge.net/p/gambas/code/HEAD/tree/gambas/trunk/comp/src/gb.gui.base/.src/IconView/ -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From oitofelix at ...181... Sat Apr 12 22:18:55 2014 From: oitofelix at ...181... (Bruno =?UTF-8?B?RsOpbGl4?= Rezende Ribeiro) Date: Sat, 12 Apr 2014 17:18:55 -0300 Subject: [Gambas-user] Interpreter's treatment of classes In-Reply-To: <53495DDB.40304@...1...> References: <20140411001740.591d8a96@...3316...> <53495DDB.40304@...1...> Message-ID: <20140412171855.04cac90f@...3316...> Em Sat, 12 Apr 2014 17:38:03 +0200 Beno?t Minisini escreveu: > All that is because, "is a" has two meanings in Gambas. > > 1) An object reference A "is a" class B. It means that the class of > the object A is the class B. > > 2) An expression "is a" datatype. And there are two datatypes, > "gb.Object" and "gb.Class". > > "gb.Object" is any expression that returns a non-null object > reference. An object reference internally includes two pointers: a > class pointer, and an object data pointer. > > "gb.Class" is any expression that returns a class. It includes one > pointer, the class pointer. > > "gb.Class" exists only for internal optimization reasons. I could > have used instead a "gb.Object", with a null object data pointer. But > it would have been slower. > > Now, as stated in the wiki, classes are really objects whose class is > the "Class" class. But a reference to a class as an object is not the > same thing as a reference to the class. The first one has methods > that describe the class structure, the second one allows to call the > static methods of the class. I think I can see what you mean here. But I can't quite understand how have you reached the conclusion that "classes are really objects whose class is the 'Class' class"? What is the criteria classes are satisfying that 1) Makes them objects. 2) Granted (1), makes them instances of the class "Class". Are the answers to these two questions consistent with the Gambas' meaning of "object", "class" and "instance"? Or is that just a particular exception to the general rule? Do you see any problem with the perhaps more intuitive and consistent approach of making 'Class' a primitive type as explained in the model below? ** Reformulation of the interpreter's behavior regarding classes ** The declaration Dim hClass As Class = MMain would make 'hClass' point to the same class that 'MMain' points to so that TypeOf(MMain) ==> gb.Class TypeOf(hClass) ==> gb.Class If(hClass = MMain, "Equal", "Not Equal") ==> "Equal" MMain Is Class ==> [Error: Unexpected Class] hClass Is Class ==> [Error: Unexpected Class] The errors are the same current raised by the expression MMain Is Integer ==> [Error: Expected Integer] This is consistent because like the type 'Integer', the type 'Class' would be not a class, and therefore would not make sense as the right-hand side operand of the 'Is' operator which is intended to check instantiation regarding inheritance, which is clearly not applicable to classes in the reformulated model. On the other hand to obtain the introspection capabilities the declaration Dim hClassIntrospection As ClassInstropection = MMain would make 'hClassIntrospection' points to the object which describes the class 'MMain' so that TypeOf(hClassIntrospection) ==> gb.Object hClassIntrospection Is ClassIntrospection ==> True MMain Is ClassIntrospection ==> False hClass Is ClassIntrospection ==> False hClassIntrospection.Name ==> "MMain" If(hClassIntrospection = MMain, "Equal", "Not Equal") ==> [Error: Type mismatch: wanted Object, got Class Instead] If(hClassIntrospection = hClass, "Equal", "Not Equal") ==> [Error: Type mismatch: wanted Object, got Class Instead] Casting of classes to objects as in the declaration, Dim hObject As Object = MMain would retain the useful behavior of resulting in introspection objects: hObject Is ClassIntrospection ==> True I think this reformulation of the model would avoid the apparent ambiguity and the exceptional status of classes as objects while aiding consistency and maintaining introspection features. What do you think? Do you see any inconsistencies or pitfalls within it? > As there is no true function datatype at the moment, there is no true > generic solution. (Internally, the function datatype exists, but all > non-official things do no exist. By the way I told you nothing). Told me about what? I don't know what you're talking about! ;-) > When I need doing these sorts of things, I'm only using dynamic > object. And if I have a static class, I transform it into a > auto-instanciable dynamic class (like Forms objects, for example). > > If a class is auto-instanciable, using the class name as an object > automatically transforms the "gb.Class" expression into a reference > to the auto-created internal singleton object. So you exactly have > the syntax you need. Interesting... I'll play with "auto-instantiable" classes to grasp its practical benefits. > And when I will succeed in implementing a clean global syntax, you > will just have to transform your auto-creatable class back to a > static class. It sounds like good news! Thanks you for your attention. Keep up the good work! Happy Hacking! -- ,= ,-_-. =. Bruno F?lix Rezende Ribeiro (oitofelix) [0x28D618AF] ((_/)o o(\_)) There is no system but GNU; `-'(. .)`-' GNU Linux-Libre is one of its official kernels; \_/ All software must be free as in freedom; -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 490 bytes Desc: not available URL: From oitofelix at ...181... Sun Apr 13 02:17:01 2014 From: oitofelix at ...181... (Bruno =?UTF-8?B?RsOpbGl4?= Rezende Ribeiro) Date: Sat, 12 Apr 2014 21:17:01 -0300 Subject: [Gambas-user] Interpreter's treatment of classes In-Reply-To: <5349B5B0.3090603@...1...> References: <20140411001740.591d8a96@...3316...> <53495DDB.40304@...1...> <20140412171855.04cac90f@...3316...> <5349B23E.7070103@...1...> <5349B5B0.3090603@...1...> Message-ID: <20140412211701.6db125d6@...3316...> Em Sat, 12 Apr 2014 23:52:48 +0200 Beno?t Minisini escreveu: > I said rubbish, as it already works like that. If you use a gb.Class > with something that requests an object, the it is automatically > converted to the Class object *except if* the class is > auto-creatable. In that case it is converted to the automatic hidden > singleton instance. You just gave me the last missing piece of the puzzle! Thank you so much! For a given class named 'CLASS' the expression 'CLASS Is Class' evaluates to 'True' not because 'CLASS' is an instance of the class 'Class', but because in a object context 'CLASS' gets cast to its introspection object which in its turn is an instance of the class 'Class'. It's so obvious and clear now! The interpreter's behavior is perfectly consistent and unambiguous with respect to this matter. I feel I owe you and the operator 'Is' an apology, as I've suggested the interpreter's behavior was somewhat inconsistent. Sorry. In the end it's very good that this has happened. Now this subject is solved once and for all, and available in the mailing list for posterity. That said, I still would love to have a "pure" class type. It'd be like 'Class' or 'Object' but it wouldn't cast classes from 'gb.Class' to 'gb.Object'. That way we could store classes inside variables, make them accessible under properties and pass them as arguments to methods. Something like: Dim hPureClass As PureClass = MMain TypeOf(MMain) ==> gb.Class If(hPureClass = Identity(MMain), "Equal", "Not Equal") ==> "Equal" Public Sub Identity(hPureClass As PureClass) TypeOf(hPureClass) ==> gb.Class Return hPureClass End As far as I can see, it would not disrupt any existing code and would add a feature to the language that allows some things that are not strictly possible now, for example the implementation of callback functions by anonymous references to static or dynamic classes. However, if you happen to think that although being backward compatible this change would be too big or not worthy, it'd be sufficient, although not optimal (or so convenient as it could be), to circumvent the current limitations by being able to (un)cast an introspection 'Class' object to the class it describes, perhaps by a method or property thereof, intended for immediate use (a little bit like virtual classes). So it'd look like: Dim hClass As Class = MMain TypeOf(hClass) ==> gb.Object TypeOf(hClass.Class) ==> gb.Class If(hClass.Class = MMain, "Equal", "Not Equal") ==> "Equal" I don't know if it's possible at all given the current implementation of the interpreter. In the case it happens to be possible and relatively easy to implement, it'd solve the biggest drawback presented in this correspondence. Thank you for your attention and interest. Happy Hacking! -- ,= ,-_-. =. Bruno F?lix Rezende Ribeiro (oitofelix) [0x28D618AF] ((_/)o o(\_)) There is no system but GNU; `-'(. .)`-' GNU Linux-Libre is one of its official kernels; \_/ All software must be free as in freedom; -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 490 bytes Desc: not available URL: From jusabejusabe at ...626... Sun Apr 13 02:17:02 2014 From: jusabejusabe at ...626... (Julio Sanchez) Date: Sun, 13 Apr 2014 02:17:02 +0200 Subject: [Gambas-user] Example of scrollArea In-Reply-To: <20140412193656.GA513@...2774...> References: <20140412193656.GA513@...2774...> Message-ID: Beno?t and Tobi: Thank you very much. You can see a simple example that I've done this link: http://cursogambas.blogspot.com.es/2014/04/dibujar-en-gambas-drawingarea-y.html Regards, Jsbsan 2014-04-12 21:36 GMT+02:00 Tobias Boege : > On Sat, 12 Apr 2014, Julio Sanchez wrote: > > Hello > > I would like to see an example of ScrollArea, I think the IconView > control > > is done with it. ( > > http://gambas.8142.n7.nabble.com/DrawArea-vs-ScrollArea-td10261.html ) > > I can not find the source code of this control > > Can you tell me where to find it? > > > > Attached is our canonical example for the ScrollArea. If you need to know > more you need to ask a more precise question. > > The source code of the IconView is in gb.gui.base[0] - and you had a good > nose, it uses a ScrollArea! > > Regards, > Tobi > > [0] > http://sourceforge.net/p/gambas/code/HEAD/tree/gambas/trunk/comp/src/gb.gui.base/.src/IconView/ > > -- > "There's an old saying: Don't change anything... ever!" -- Mr. Monk > > > ------------------------------------------------------------------------------ > Put Bad Developers to Shame > Dominate Development with Jenkins Continuous Integration > Continuously Automate Build, Test & Deployment > Start a new project now. Try Jenkins in the cloud. > http://p.sf.net/sfu/13600_Cloudbees > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From kevinfishburne at ...1887... Sun Apr 13 03:45:25 2014 From: kevinfishburne at ...1887... (Kevin Fishburne) Date: Sat, 12 Apr 2014 21:45:25 -0400 Subject: [Gambas-user] Precision immediately lost when assigning value to type Single structure property In-Reply-To: References: <5346216F.7040907@...1887...> Message-ID: <5349EC35.6030009@...1887...> On 04/10/2014 10:50 AM, Jussi Lahtinen wrote: > That is completely expected just try: > Print csingle(180.2) > 180,1999969 > > You cannot express 180.2 precisely with 32 bits. > Even with 64 bits it's something like: 180.199999999999988631 ... > Thanks everyone. I knew floating point variables worked differently than integer types but didn't realize the extent of the limitations of their precision. I was using the value after the decimal as a flag, or a way to store two numbers in one. I've worked around the issue by rounding it. -- Kevin Fishburne Eight Virtues www: http://sales.eightvirtues.com e-mail: sales at ...1887... phone: (770) 853-6271 From kevinfishburne at ...1887... Sun Apr 13 03:50:57 2014 From: kevinfishburne at ...1887... (Kevin Fishburne) Date: Sat, 12 Apr 2014 21:50:57 -0400 Subject: [Gambas-user] feature suggestions: detach and rearrange tabs In-Reply-To: <53447FCF.3050008@...1...> References: <530412C3.4090300@...1887...> <53447FCF.3050008@...1...> Message-ID: <5349ED81.1010601@...1887...> On 04/08/2014 07:01 PM, Beno?t Minisini wrote: > Le 19/02/2014 03:11, Kevin Fishburne a ?crit : >> I don't know how difficult this would be, but if detachable tabs could >> be implemented (think Chrome browser), that would be awesome. Tangential >> to that would be the ability to rearrange tabs by dragging and dropping, >> or perhaps doing a right-click "Sort by Name". >> >> Having them detachable would allow productive use of a multi-head setup. >> Often I find myself switching back and forth between two procedures in a >> very long module, or needing to use one code block as a reference as I'm >> writing code elsewhere. I often resort to pasting the code in a text >> editor on my right monitor. >> >> I know there is a split pane option, but sometimes a program gets a >> little crazy and you have 10000 lines of code in a module with some >> 300-character-long lines; that is difficult to work with even in a >> non-split view. Perhaps for GAMBAS 4? >> > IDE workspace tabs are now moveable in revision #6239. But you cannot > detach them yet. > Works brilliantly, thanks. Once they can be detached/reattached, dual-monitor configurations around the world will be deafened by cheers of joy, and mothers will tell their children of that most glorious of days. -- Kevin Fishburne Eight Virtues www: http://sales.eightvirtues.com e-mail: sales at ...1887... phone: (770) 853-6271 From kevinfishburne at ...1887... Sun Apr 13 03:52:45 2014 From: kevinfishburne at ...1887... (Kevin Fishburne) Date: Sat, 12 Apr 2014 21:52:45 -0400 Subject: [Gambas-user] customizable background color of unfocused split-view pane In-Reply-To: <53278939.8080605@...1...> References: <53227B00.1030509@...1887...> <53278939.8080605@...1...> Message-ID: <5349EDED.7000901@...1887...> On 03/17/2014 07:46 PM, Beno?t Minisini wrote: > Le 14/03/2014 04:44, Kevin Fishburne a ?crit : >> Under Tools, Preferences, Theme I can find no way to set the background >> color used when splitting the panes to view two sections of code at >> once. The background color, at least for the "Quick" theme, is light >> gray which makes the code very difficult to read. >> >> An alternative to allowing manually setting the color could be to >> multiply the RGB values of the normal background color by 0.8, which >> would darken them by 20%. If you use a solid black background there >> would be no noticeable difference, although the presence of the blinking >> cursor should be enough for that rare occurrence. >> > > It should be fixed in revision #6201. > > Regards, > Tested and working; looks quite nice! -- Kevin Fishburne Eight Virtues www: http://sales.eightvirtues.com e-mail: sales at ...1887... phone: (770) 853-6271 From kevinfishburne at ...1887... Sun Apr 13 07:03:47 2014 From: kevinfishburne at ...1887... (Kevin Fishburne) Date: Sun, 13 Apr 2014 01:03:47 -0400 Subject: [Gambas-user] Exist function for checking files seems slower Message-ID: <534A1AB3.9010100@...1887...> Previous to installing the PPA daily build earlier this evening the loop: Dim Counter1 As Short ' General Counter. For Counter1 = 0 To 32766 If Exist(BasePath & "/image/pwo/" & Counter1 & "_0.png") Then ' Load the texture. ' Code commented out for brevity. Endif Next executed fairly quickly. I tested the bare loop by removing any code executedif Exist returned True, and the loop is slower than it used to be when actually loading textures. Unless the underlying packages in [K]ubuntu (13.10) or my network are causing the problem (the file checks are performed over an NFS share on my file server), there is a massive increase in the overhead of the Exist function with respect to files on a network share. The empty loop over NFS takes 43 seconds. Performed locally on my workstation's SSD it takes 0.04 seconds. Were any changes made to Gambas that could have caused this, or should I start investigating my file server and/or network's performance? Copying a file from my server to my workstation transfers at 120 MiB/s, which is extremely fast. The Exist function checks transfer at 500 KiB/s. So it's either Gambas or some package update in Ubuntu, I'm guessing. -- Kevin Fishburne Eight Virtues www:http://sales.eightvirtues.com e-mail:sales at ...1887... phone: (770) 853-6271 From iss_boss at ...770... Sun Apr 13 20:36:37 2014 From: iss_boss at ...770... (ISS Boss) Date: Sun, 13 Apr 2014 14:36:37 -0400 Subject: [Gambas-user] Severe problem with update... Message-ID: <534AD935.6020707@...770...> I have 76 updates -- ALL from Gambas. I am currently running Gambas 3.5.2 and apparently that is as far as I can go unless someone can tell me how to get past this error from the Update manager: "Requires installation of untrusted packages." "This action would require the installation of packages from not authenticated sources" Following that, my only option is to close the error window, which resets the Update Manager back to the start point again, displaying all 76 updates available. My system: [System] Gambas=3.5.2 OperatingSystem=Linux Kernel=3.5.0-48-generic Architecture=x86 Distribution=Ubuntu 12.04.4 LTS Desktop=GNOME Theme=QGtk Language=en_US.UTF-8 Memory=2017M [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 OpenGL=libGL.so.1.2.0 Poppler=libpoppler.so.19.0.0 Qt4=libQtCore.so.4.8.1 SDL=libSDL-1.2.so.0.11.3 From iss_boss at ...770... Mon Apr 14 01:36:55 2014 From: iss_boss at ...770... (ISS Boss) Date: Sun, 13 Apr 2014 19:36:55 -0400 Subject: [Gambas-user] Repeat: Severe problem with update... Message-ID: <534B1F97.7050001@...770...> Can anyone help me here. I am very new to Linux and haven't a clue how to fix this error. I have 76 updates -- ALL from Gambas. I am currently running Gambas 3.5.2 and apparently that is as far as I can go unless someone can tell me how to get past this error from the Update manager: "Requires installation of untrusted packages." "This action would require the installation of packages from not authenticated sources" Following that, my only option is to close the error window, which resets the Update Manager back to the start point again, displaying all 76 updates available. My system: [System] Gambas=3.5.2 OperatingSystem=Linux Kernel=3.5.0-48-generic Architecture=x86 Distribution=Ubuntu 12.04.4 LTS Desktop=GNOME Theme=QGtk Language=en_US.UTF-8 Memory=2017M [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 OpenGL=libGL.so.1.2.0 Poppler=libpoppler.so.19.0.0 Qt4=libQtCore.so.4.8.1 SDL=libSDL-1.2.so.0.11.3 From jussi.lahtinen at ...626... Mon Apr 14 02:20:40 2014 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Mon, 14 Apr 2014 03:20:40 +0300 Subject: [Gambas-user] Repeat: Severe problem with update... In-Reply-To: <534B1F97.7050001@...770...> References: <534B1F97.7050001@...770...> Message-ID: How did you install Gambas in the first place? What repository you are using..? Maybe these warnings are from PPA you are using? Jussi On Mon, Apr 14, 2014 at 2:36 AM, ISS Boss wrote: > Can anyone help me here. I am very new to Linux and haven't a clue how > to fix this error. > > I have 76 updates -- ALL from Gambas. I am currently running Gambas > 3.5.2 and apparently that is as far as I can go unless someone can tell > me how to get past this error from the Update manager: > > "Requires installation of untrusted packages." > > "This action would require the installation of packages from not > authenticated sources" > > Following that, my only option is to close the error window, which > resets the Update Manager back to the start point again, displaying all > 76 updates available. > > My system: > > [System] > Gambas=3.5.2 > OperatingSystem=Linux > Kernel=3.5.0-48-generic > Architecture=x86 > Distribution=Ubuntu 12.04.4 LTS > Desktop=GNOME > Theme=QGtk > Language=en_US.UTF-8 > Memory=2017M > [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 > OpenGL=libGL.so.1.2.0 > Poppler=libpoppler.so.19.0.0 > Qt4=libQtCore.so.4.8.1 > SDL=libSDL-1.2.so.0.11.3 > > > > > ------------------------------------------------------------------------------ > Put Bad Developers to Shame > Dominate Development with Jenkins Continuous Integration > Continuously Automate Build, Test & Deployment > Start a new project now. Try Jenkins in the cloud. > http://p.sf.net/sfu/13600_Cloudbees > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From iss_boss at ...770... Mon Apr 14 02:34:39 2014 From: iss_boss at ...770... (ISS Boss) Date: Sun, 13 Apr 2014 20:34:39 -0400 Subject: [Gambas-user] Repeat: Severe problem with update... In-Reply-To: References: <534B1F97.7050001@...770...> Message-ID: <534B2D1F.8090209@...770...> I installed it using the PPA given on SourceForge. It installed just fine, and I am using it now. If it didn't give me warnings when I installed it, why get them now for just updates? I am not at the computer right now so I can't check what PPA it came from (and is there a way to get that PPA?)? Bill Jussi Lahtinen wrote, On 04/13/2014 20:20: How did you install Gambas in the first place? What repository you are using..? Maybe these warnings are from PPA you are using? Jussi On Mon, Apr 14, 2014 at 2:36 AM, ISS Boss [1] wrote: Can anyone help me here. I am very new to Linux and haven't a clue how to fix this error. I have 76 updates -- ALL from Gambas. I am currently running Gambas 3.5.2 and apparently that is as far as I can go unless someone can tell me how to get past this error from the Update manager: "Requires installation of untrusted packages." "This action would require the installation of packages from not authenticated sources" Following that, my only option is to close the error window, which resets the Update Manager back to the start point again, displaying all 76 updates available. My system: [System] Gambas=3.5.2 OperatingSystem=Linux Kernel=3.5.0-48-generic Architecture=x86 Distribution=Ubuntu 12.04.4 LTS Desktop=GNOME Theme=QGtk Language=en_US.UTF-8 Memory=2017M [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 OpenGL=libGL.so.1.2.0 Poppler=libpoppler.so.19.0.0 Qt4=libQtCore.so.4.8.1 SDL=libSDL-1.2.so.0.11.3 ------------------------------------------------------------------------------ Put Bad Developers to Shame Dominate Development with Jenkins Continuous Integration Continuously Automate Build, Test & Deployment Start a new project now. Try Jenkins in the cloud. [2]http://p.sf.net/sfu/13600_Cloudbees _______________________________________________ Gambas-user mailing list [3]Gambas-user at lists.sourceforge.net [4]https://lists.sourceforge.net/lists/listinfo/gambas-user ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! [5]http://p.sf.net/sfu/NeoTech _______________________________________________ Gambas-user mailing list [6]Gambas-user at lists.sourceforge.net [7]https://lists.sourceforge.net/lists/listinfo/gambas-user References 1. mailto:iss_boss at ...770... 2. http://p.sf.net/sfu/13600_Cloudbees 3. mailto:Gambas-user at lists.sourceforge.net 4. https://lists.sourceforge.net/lists/listinfo/gambas-user 5. http://p.sf.net/sfu/NeoTech 6. mailto:Gambas-user at lists.sourceforge.net 7. https://lists.sourceforge.net/lists/listinfo/gambas-user From jussi.lahtinen at ...626... Mon Apr 14 02:59:17 2014 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Mon, 14 Apr 2014 03:59:17 +0300 Subject: [Gambas-user] Repeat: Severe problem with update... In-Reply-To: <534B2D1F.8090209@...770...> References: <534B1F97.7050001@...770...> <534B2D1F.8090209@...770...> Message-ID: Open terminal and type: sudo apt-get update Please copy & paste the output to here. It's probably due PPA changing it's gpg key.... not sure. Jussi On Mon, Apr 14, 2014 at 3:34 AM, ISS Boss wrote: > > I installed it using the PPA given on SourceForge. It installed just > fine, > and I am using it now. If it didn't give me warnings when I installed > it, > why get them now for just updates? I am not at the computer right now > so I > can't check what PPA it came from (and is there a way to get that PPA?)? > Bill > > Jussi Lahtinen wrote, On 04/13/2014 20:20: > > How did you install Gambas in the first place? What repository you are > using..? > Maybe these warnings are from PPA you are using? > > > Jussi > > > On Mon, Apr 14, 2014 at 2:36 AM, ISS Boss [1] > wrote: > > Can anyone help me here. I am very new to Linux and haven't a clue how > to fix this error. > > I have 76 updates -- ALL from Gambas. I am currently running Gambas > 3.5.2 and apparently that is as far as I can go unless someone can tell > me how to get past this error from the Update manager: > > "Requires installation of untrusted packages." > > "This action would require the installation of packages from not > authenticated sources" > > Following that, my only option is to close the error window, which > resets the Update Manager back to the start point again, displaying all > 76 updates available. > > My system: > > [System] > Gambas=3.5.2 > OperatingSystem=Linux > Kernel=3.5.0-48-generic > Architecture=x86 > Distribution=Ubuntu 12.04.4 LTS > Desktop=GNOME > Theme=QGtk > Language=en_US.UTF-8 > Memory=2017M > [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 > OpenGL=libGL.so.1.2.0 > Poppler=libpoppler.so.19.0.0 > Qt4=libQtCore.so.4.8.1 > SDL=libSDL-1.2.so.0.11.3 > > > > > > ------------------------------------------------------------------------------ > Put Bad Developers to Shame > Dominate Development with Jenkins Continuous Integration > Continuously Automate Build, Test & Deployment > Start a new project now. Try Jenkins in the cloud. > [2]http://p.sf.net/sfu/13600_Cloudbees > _______________________________________________ > Gambas-user mailing list > [3]Gambas-user at lists.sourceforge.net > [4]https://lists.sourceforge.net/lists/listinfo/gambas-user > > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > [5]http://p.sf.net/sfu/NeoTech > _______________________________________________ > Gambas-user mailing list > [6]Gambas-user at lists.sourceforge.net > [7]https://lists.sourceforge.net/lists/listinfo/gambas-user > > References > > 1. mailto:iss_boss at ...770... > 2. http://p.sf.net/sfu/13600_Cloudbees > 3. mailto:Gambas-user at lists.sourceforge.net > 4. https://lists.sourceforge.net/lists/listinfo/gambas-user > 5. http://p.sf.net/sfu/NeoTech > 6. mailto:Gambas-user at lists.sourceforge.net > 7. https://lists.sourceforge.net/lists/listinfo/gambas-user > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > http://p.sf.net/sfu/NeoTech > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From iss_boss at ...770... Mon Apr 14 03:44:29 2014 From: iss_boss at ...770... (ISS Boss) Date: Sun, 13 Apr 2014 21:44:29 -0400 Subject: [Gambas-user] Repeat: Severe problem with update... In-Reply-To: References: <534B1F97.7050001@...770...> <534B2D1F.8090209@...770...> Message-ID: <534B3D7D.8040408@...770...> Here's the results: bill at ...3318...:~$ sudo apt-get update [sudo] password for bill: Hit [1]http://security.ubuntu.com precise-security Release.gpg Hit [2]http://us.archive.ubuntu.com precise Release.gpg Hit [3]http://us.archive.ubuntu.com precise-updates Release.gpg Get:1 [4]http://us.archive.ubuntu.com precise-backports Release.gpg [198 B] Hit [5]http://security.ubuntu.com precise-security Release Get:2 [6]http://extras.ubuntu.com precise Release.gpg [72 B] Hit [7]http://us.archive.ubuntu.com precise Release Hit [8]http://archive.canonical.com precise Release.gpg Get:3 [9]http://ppa.launchpad.net precise Release.gpg [316 B] Hit [10]http://security.ubuntu.com precise-security/main Sources Hit [11]http://extras.ubuntu.com precise Release Hit [12]http://archive.canonical.com precise Release Hit [13]http://ppa.launchpad.net precise Release Hit [14]http://security.ubuntu.com precise-security/restricted Sources Hit [15]http://security.ubuntu.com precise-security/universe Sources Hit [16]http://security.ubuntu.com precise-security/multiverse Sources Hit [17]http://security.ubuntu.com precise-security/main i386 Packages Hit [18]http://security.ubuntu.com precise-security/restricted i386 Packages Ign [19]http://ppa.launchpad.net precise Release Hit [20]http://security.ubuntu.com precise-security/universe i386 Packages Hit [21]http://security.ubuntu.com precise-security/multiverse i386 Packages Hit [22]http://security.ubuntu.com precise-security/main TranslationIndex Hit [23]http://security.ubuntu.com precise-security/multiverse TranslationIndex Hit [24]http://security.ubuntu.com precise-security/restricted TranslationIndex Hit [25]http://security.ubuntu.com precise-security/universe TranslationIndex Hit [26]http://extras.ubuntu.com precise/main Sources Hit [27]http://archive.canonical.com precise/partner Sources Ign [28]http://ppa.launchpad.net precise/main Sources/DiffIndex Hit [29]http://security.ubuntu.com precise-security/main Translation-en Hit [30]http://security.ubuntu.com precise-security/multiverse Translation-en Hit [31]http://us.archive.ubuntu.com precise-updates Release Hit [32]http://extras.ubuntu.com precise/main i386 Packages Ign [33]http://extras.ubuntu.com precise/main TranslationIndex Hit [34]http://security.ubuntu.com precise-security/restricted Translation-en Hit [35]http://archive.canonical.com precise/partner i386 Packages Ign [36]http://archive.canonical.com precise/partner TranslationIndex Get:4 [37]http://us.archive.ubuntu.com precise-backports Release [49.6 kB] Ign [38]http://ppa.launchpad.net precise/main i386 Packages/DiffIndex Ign [39]http://ppa.launchpad.net precise/main TranslationIndex Hit [40]http://security.ubuntu.com precise-security/universe Translation-en Hit [41]http://ppa.launchpad.net precise/main Sources Hit [42]http://ppa.launchpad.net precise/main i386 Packages Hit [43]http://us.archive.ubuntu.com precise/main Sources Hit [44]http://us.archive.ubuntu.com precise/restricted Sources Hit [45]http://us.archive.ubuntu.com precise/universe Sources Hit [46]http://us.archive.ubuntu.com precise/multiverse Sources Hit [47]http://us.archive.ubuntu.com precise/main i386 Packages Hit [48]http://us.archive.ubuntu.com precise/restricted i386 Packages Hit [49]http://us.archive.ubuntu.com precise/universe i386 Packages Hit [50]http://us.archive.ubuntu.com precise/multiverse i386 Packages Hit [51]http://us.archive.ubuntu.com precise/main TranslationIndex Hit [52]http://us.archive.ubuntu.com precise/multiverse TranslationIndex Hit [53]http://us.archive.ubuntu.com precise/restricted TranslationIndex Hit [54]http://us.archive.ubuntu.com precise/universe TranslationIndex Hit [55]http://us.archive.ubuntu.com precise-updates/main Sources Hit [56]http://us.archive.ubuntu.com precise-updates/restricted Sources Hit [57]http://us.archive.ubuntu.com precise-updates/universe Sources Hit [58]http://us.archive.ubuntu.com precise-updates/multiverse Sources Hit [59]http://us.archive.ubuntu.com precise-updates/main i386 Packages Hit [60]http://us.archive.ubuntu.com precise-updates/restricted i386 Packages Hit [61]http://us.archive.ubuntu.com precise-updates/universe i386 Packages Hit [62]http://us.archive.ubuntu.com precise-updates/multiverse i386 Packages Hit [63]http://us.archive.ubuntu.com precise-updates/main TranslationIndex Hit [64]http://us.archive.ubuntu.com precise-updates/multiverse TranslationIndex Hit [65]http://us.archive.ubuntu.com precise-updates/restricted TranslationIndex Hit [66]http://us.archive.ubuntu.com precise-updates/universe TranslationIndex Hit [67]http://us.archive.ubuntu.com precise/main Translation-en Get:5 [68]http://us.archive.ubuntu.com precise-backports/main Sources [4,850 B] Get:6 [69]http://us.archive.ubuntu.com precise-backports/restricted Sources [14 B] Get:7 [70]http://us.archive.ubuntu.com precise-backports/universe Sources [37.8 kB] Ign [71]http://extras.ubuntu.com precise/main Translation-en_US Ign [72]http://archive.canonical.com precise/partner Translation-en_US Ign [73]http://extras.ubuntu.com precise/main Translation-en Ign [74]http://archive.canonical.com precise/partner Translation-en Ign [75]http://ppa.launchpad.net precise/main Translation-en_US Ign [76]http://ppa.launchpad.net precise/main Translation-en Get:8 [77]http://us.archive.ubuntu.com precise-backports/multiverse Sources [5,311 B] Get:9 [78]http://us.archive.ubuntu.com precise-backports/main i386 Packages [6,182 B] Get:10 [79]http://us.archive.ubuntu.com precise-backports/restricted i386 Packages [14 B] Get:11 [80]http://us.archive.ubuntu.com precise-backports/universe i386 Packages [39.0 kB] Get:12 [81]http://us.archive.ubuntu.com precise-backports/multiverse i386 Packages [5,178 B] Hit [82]http://us.archive.ubuntu.com precise-backports/main TranslationIndex Hit [83]http://us.archive.ubuntu.com precise-backports/multiverse TranslationIndex Hit [84]http://us.archive.ubuntu.com precise-backports/restricted TranslationIndex Hit [85]http://us.archive.ubuntu.com precise-backports/universe TranslationIndex Hit [86]http://us.archive.ubuntu.com precise/multiverse Translation-en Hit [87]http://us.archive.ubuntu.com precise/restricted Translation-en Hit [88]http://us.archive.ubuntu.com precise/universe Translation-en Hit [89]http://us.archive.ubuntu.com precise-updates/main Translation-en Hit [90]http://us.archive.ubuntu.com precise-updates/multiverse Translation-en Hit [91]http://us.archive.ubuntu.com precise-updates/restricted Translation-en Hit [92]http://us.archive.ubuntu.com precise-updates/universe Translation-en Hit [93]http://us.archive.ubuntu.com precise-backports/main Translation-en Hit [94]http://us.archive.ubuntu.com precise-backports/multiverse Translation-en Hit [95]http://us.archive.ubuntu.com precise-backports/restricted Translation-en Hit [96]http://us.archive.ubuntu.com precise-backports/universe Translation-en Fetched 149 kB in 4s (36.7 kB/s) Reading package lists... Done W: GPG error: [97]http://ppa.launchpad.net precise Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 14E4942973C62A1B Bill Jussi Lahtinen wrote, On 04/13/2014 20:59: Open terminal and type: sudo apt-get update Please copy & paste the output to here. It's probably due PPA changing it's gpg key.... not sure. Jussi On Mon, Apr 14, 2014 at 3:34 AM, ISS Boss [98] wrote: I installed it using the PPA given on SourceForge. It installed just fine, and I am using it now. If it didn't give me warnings when I installed it, why get them now for just updates? I am not at the computer right now so I can't check what PPA it came from (and is there a way to get that PPA?)? Bill Jussi Lahtinen wrote, On 04/13/2014 20:20: How did you install Gambas in the first place? What repository you are using..? Maybe these warnings are from PPA you are using? Jussi On Mon, Apr 14, 2014 at 2:36 AM, ISS Boss [1][99] wrote: Can anyone help me here. I am very new to Linux and haven't a clue how to fix this error. I have 76 updates -- ALL from Gambas. I am currently running Gambas 3.5.2 and apparently that is as far as I can go unless someone can tell me how to get past this error from the Update manager: "Requires installation of untrusted packages." "This action would require the installation of packages from not authenticated sources" Following that, my only option is to close the error window, which resets the Update Manager back to the start point again, displaying all 76 updates available. My system: [System] Gambas=3.5.2 OperatingSystem=Linux Kernel=3.5.0-48-generic Architecture=x86 Distribution=Ubuntu 12.04.4 LTS Desktop=GNOME Theme=QGtk Language=en_US.UTF-8 Memory=2017M [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 OpenGL=libGL.so.1.2.0 Poppler=libpoppler.so.19.0.0 Qt4=libQtCore.so.4.8.1 SDL=libSDL-1.2.so.0.11.3 References 1. http://security.ubuntu.com/ 2. http://us.archive.ubuntu.com/ 3. http://us.archive.ubuntu.com/ 4. http://us.archive.ubuntu.com/ 5. http://security.ubuntu.com/ 6. http://extras.ubuntu.com/ 7. http://us.archive.ubuntu.com/ 8. http://archive.canonical.com/ 9. http://ppa.launchpad.net/ 10. http://security.ubuntu.com/ 11. http://extras.ubuntu.com/ 12. http://archive.canonical.com/ 13. http://ppa.launchpad.net/ 14. http://security.ubuntu.com/ 15. http://security.ubuntu.com/ 16. http://security.ubuntu.com/ 17. http://security.ubuntu.com/ 18. http://security.ubuntu.com/ 19. http://ppa.launchpad.net/ 20. http://security.ubuntu.com/ 21. http://security.ubuntu.com/ 22. http://security.ubuntu.com/ 23. http://security.ubuntu.com/ 24. http://security.ubuntu.com/ 25. http://security.ubuntu.com/ 26. http://extras.ubuntu.com/ 27. http://archive.canonical.com/ 28. http://ppa.launchpad.net/ 29. http://security.ubuntu.com/ 30. http://security.ubuntu.com/ 31. http://us.archive.ubuntu.com/ 32. http://extras.ubuntu.com/ 33. http://extras.ubuntu.com/ 34. http://security.ubuntu.com/ 35. http://archive.canonical.com/ 36. http://archive.canonical.com/ 37. http://us.archive.ubuntu.com/ 38. http://ppa.launchpad.net/ 39. http://ppa.launchpad.net/ 40. http://security.ubuntu.com/ 41. http://ppa.launchpad.net/ 42. http://ppa.launchpad.net/ 43. http://us.archive.ubuntu.com/ 44. http://us.archive.ubuntu.com/ 45. http://us.archive.ubuntu.com/ 46. http://us.archive.ubuntu.com/ 47. http://us.archive.ubuntu.com/ 48. http://us.archive.ubuntu.com/ 49. http://us.archive.ubuntu.com/ 50. http://us.archive.ubuntu.com/ 51. http://us.archive.ubuntu.com/ 52. http://us.archive.ubuntu.com/ 53. http://us.archive.ubuntu.com/ 54. http://us.archive.ubuntu.com/ 55. http://us.archive.ubuntu.com/ 56. http://us.archive.ubuntu.com/ 57. http://us.archive.ubuntu.com/ 58. http://us.archive.ubuntu.com/ 59. http://us.archive.ubuntu.com/ 60. http://us.archive.ubuntu.com/ 61. http://us.archive.ubuntu.com/ 62. http://us.archive.ubuntu.com/ 63. http://us.archive.ubuntu.com/ 64. http://us.archive.ubuntu.com/ 65. http://us.archive.ubuntu.com/ 66. http://us.archive.ubuntu.com/ 67. http://us.archive.ubuntu.com/ 68. http://us.archive.ubuntu.com/ 69. http://us.archive.ubuntu.com/ 70. http://us.archive.ubuntu.com/ 71. http://extras.ubuntu.com/ 72. http://archive.canonical.com/ 73. http://extras.ubuntu.com/ 74. http://archive.canonical.com/ 75. http://ppa.launchpad.net/ 76. http://ppa.launchpad.net/ 77. http://us.archive.ubuntu.com/ 78. http://us.archive.ubuntu.com/ 79. http://us.archive.ubuntu.com/ 80. http://us.archive.ubuntu.com/ 81. http://us.archive.ubuntu.com/ 82. http://us.archive.ubuntu.com/ 83. http://us.archive.ubuntu.com/ 84. http://us.archive.ubuntu.com/ 85. http://us.archive.ubuntu.com/ 86. http://us.archive.ubuntu.com/ 87. http://us.archive.ubuntu.com/ 88. http://us.archive.ubuntu.com/ 89. http://us.archive.ubuntu.com/ 90. http://us.archive.ubuntu.com/ 91. http://us.archive.ubuntu.com/ 92. http://us.archive.ubuntu.com/ 93. http://us.archive.ubuntu.com/ 94. http://us.archive.ubuntu.com/ 95. http://us.archive.ubuntu.com/ 96. http://us.archive.ubuntu.com/ 97. http://ppa.launchpad.net/ 98. mailto:iss_boss at ...770... 99. mailto:iss_boss at ...770... From iss_boss at ...770... Mon Apr 14 04:35:12 2014 From: iss_boss at ...770... (ISS Boss) Date: Sun, 13 Apr 2014 22:35:12 -0400 Subject: [Gambas-user] Repeat: Severe problem with update... Message-ID: <534B4960.5010000@...770...> New information on my problem. I went to the GambasWIKI site and followed these three instructions under the "Gambas3 Stable" header (which is how I installed it the first time): sudo add-apt-repository ppa:nemh/gambas3 sudo apt-get update sudo apt-get install gambas3 What I have now when I open Gambas is and get system info is: [System] Gambas=3.5.3 OperatingSystem=Linux Kernel=3.5.0-48-generic Architecture=x86 Distribution=Ubuntu 12.04.4 LTS Desktop=GNOME Theme=QGtk Language=en_US.UTF-8 Memory=2017M [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 OpenGL=libGL.so.1.2.0 Poppler=libpoppler.so.19.0.0 Qt4=libQtCore.so.4.8.1 SDL=libSDL-1.2.so.0.11.3 NOTE that Gambas 3.5.2 has been replaced by Gambas 3.5.3 (the only change). When I issued the first install instruction, I get results I was not anticipating. They were as follows: bill at ...3318...:~$ sudo add-apt-repository ppa:nemh/gambas3 [sudo] password for bill: You are about to add the following PPA to your system: This PPA contain the stable version of Gambas 3. More info: https://launchpad.net/~nemh/+archive/gambas3 Press [ENTER] to continue or ctrl-c to cancel adding it Exception in thread Thread-1: Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner self.run() File "/usr/lib/python2.7/dist-packages/softwareproperties/ppa.py", line 99, in run self.add_ppa_signing_key(self.ppa_path) File "/usr/lib/python2.7/dist-packages/softwareproperties/ppa.py", line 132, in add_ppa_signing_key tmp_keyring_dir = tempfile.mkdtemp() File "/usr/lib/python2.7/tempfile.py", line 322, in mkdtemp name = names.next() File "/usr/lib/python2.7/tempfile.py", line 141, in next letters = [choose(c) for dummy in "123456"] File "/usr/lib/python2.7/random.py", line 274, in choice return seq[int(self.random() * len(seq))] # raises IndexError if seq is empty ValueError: cannot convert float NaN to integer This indicates that something is wrong with an installation script somewhere doesn't it? Shouldn't that be fixed? When I executed the "Install" command, I asked me if I wanted to install "unverified" packages. I answered "Y". and it installed. Now, when I run the Update Manager it says I have no updates to install. So, I guess my "problem" is solved for the time being. Will this happen the next time updates are up for Gambas? Bill From willy at ...2734... Mon Apr 14 22:01:42 2014 From: willy at ...2734... (Willy Raets) Date: Mon, 14 Apr 2014 22:01:42 +0200 Subject: [Gambas-user] Repeat: Severe problem with update... In-Reply-To: <534B4960.5010000@...770...> References: <534B4960.5010000@...770...> Message-ID: <1397505702.4306.10.camel@...3024...> On Sun, 2014-04-13 at 22:35 -0400, ISS Boss wrote: > New information on my problem. I went to the GambasWIKI site and > followed these three instructions under the "Gambas3 Stable" header > (which is how I installed it the first time): > > sudo add-apt-repository ppa:nemh/gambas3 > > sudo apt-get update > > sudo apt-get install gambas3 > > What I have now when I open Gambas is and get system info is: > > > [System] > Gambas=3.5.3 > OperatingSystem=Linux > Kernel=3.5.0-48-generic > Architecture=x86 > Distribution=Ubuntu 12.04.4 LTS > Desktop=GNOME > Theme=QGtk > Language=en_US.UTF-8 > Memory=2017M > [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 > OpenGL=libGL.so.1.2.0 > Poppler=libpoppler.so.19.0.0 > Qt4=libQtCore.so.4.8.1 > SDL=libSDL-1.2.so.0.11.3 > > NOTE that Gambas 3.5.2 has been replaced by Gambas 3.5.3 (the only change). > > When I issued the first install instruction, I get results I was not > anticipating. They were as follows: > > bill at ...3318...:~$ sudo add-apt-repository ppa:nemh/gambas3 > [sudo] password for bill: > You are about to add the following PPA to your system: > This PPA contain the stable version of Gambas 3. > More info: https://launchpad.net/~nemh/+archive/gambas3 > Press [ENTER] to continue or ctrl-c to cancel adding it > > Exception in thread Thread-1: > Traceback (most recent call last): > File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner > self.run() > File "/usr/lib/python2.7/dist-packages/softwareproperties/ppa.py", > line 99, in run > self.add_ppa_signing_key(self.ppa_path) > File "/usr/lib/python2.7/dist-packages/softwareproperties/ppa.py", > line 132, in add_ppa_signing_key > tmp_keyring_dir = tempfile.mkdtemp() > File "/usr/lib/python2.7/tempfile.py", line 322, in mkdtemp > name = names.next() > File "/usr/lib/python2.7/tempfile.py", line 141, in next > letters = [choose(c) for dummy in "123456"] > File "/usr/lib/python2.7/random.py", line 274, in choice > return seq[int(self.random() * len(seq))] # raises IndexError if > seq is empty > ValueError: cannot convert float NaN to integer > > This indicates that something is wrong with an installation script > somewhere doesn't it? Shouldn't that be fixed? > > When I executed the "Install" command, I asked me if I wanted to install > "unverified" packages. I answered "Y". and it installed. > > Now, when I run the Update Manager it says I have no updates to > install. So, I guess my "problem" is solved for the time being. Will > this happen the next time updates are up for Gambas? > > Bill You should be good now if: 1. The proper PPA is added to your sources.list. 2. The Public Key of all PPA's used are on your system These PPA's are the software repositories that are checked when running: $ sudo apt-get update And these are the repositories updates will be installed from when running: $ sudo apt-get upgrade Next time when PPA memh/gambas3 gets an updated gambas version the apt-get update and upgrade will upgrade your version. The message: ----- "Requires installation of untrusted packages." "This action would require the installation of packages from not authenticated sources" ------ could have originated from another PPA as your output in previous mail said: ------ W: GPG error: [97]http://ppa.launchpad.net precise Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 14E4942973C62A1B ------- This means that packages from this PPA are not trusted because of public key missing for this PPA. Check: http://blog.launchpad.net/ppa/adding-a-ppas-key-to-ubuntu for more info on how to install a Public Key from a PPA. -- Kind regards, Willy (aka gbWilly) http://gambasshowcase.org/ http://howtogambas.org http://gambos.org From iss_boss at ...770... Mon Apr 14 22:10:23 2014 From: iss_boss at ...770... (ISS Boss) Date: Mon, 14 Apr 2014 16:10:23 -0400 Subject: [Gambas-user] Repeat: Severe problem with update... In-Reply-To: <1397505702.4306.10.camel@...3024...> References: <534B4960.5010000@...770...> <1397505702.4306.10.camel@...3024...> Message-ID: <534C40AF.9070702@...770...> Outstanding! I can understand that, Willy. Thanks for all the information. I printed out your email and stuck it in my loose-leaf notebook of "things to try if something blows up in Linux". I did notice the change in PPA, so it is very possible I did get the initial install from a PPA who later changed their key and messed me up. Thanks for the detailed explanation. I need stuff like that if I'm going to learn anything. I've been in computers/electronics since 1963, but relatively new to Linux. Bill Willy Raets wrote, On 04/14/2014 16:01: On Sun, 2014-04-13 at 22:35 -0400, ISS Boss wrote: New information on my problem. I went to the GambasWIKI site and followed these three instructions under the "Gambas3 Stable" header (which is how I installed it the first time): sudo add-apt-repository ppa:nemh/gambas3 sudo apt-get update sudo apt-get install gambas3 What I have now when I open Gambas is and get system info is: [System] Gambas=3.5.3 OperatingSystem=Linux Kernel=3.5.0-48-generic Architecture=x86 Distribution=Ubuntu 12.04.4 LTS Desktop=GNOME Theme=QGtk Language=en_US.UTF-8 Memory=2017M [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 OpenGL=libGL.so.1.2.0 Poppler=libpoppler.so.19.0.0 Qt4=libQtCore.so.4.8.1 SDL=libSDL-1.2.so.0.11.3 NOTE that Gambas 3.5.2 has been replaced by Gambas 3.5.3 (the only change). When I issued the first install instruction, I get results I was not anticipating. They were as follows: bill at ...3318...:~$ sudo add-apt-repository ppa:nemh/gambas3 [sudo] password for bill: You are about to add the following PPA to your system: This PPA contain the stable version of Gambas 3. More info: [1]https://launchpad.net/~nemh/+archive/gambas3 Press [ENTER] to continue or ctrl-c to cancel adding it Exception in thread Thread-1: Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner self.run() File "/usr/lib/python2.7/dist-packages/softwareproperties/ppa.py", line 99, in run self.add_ppa_signing_key(self.ppa_path) File "/usr/lib/python2.7/dist-packages/softwareproperties/ppa.py", line 132, in add_ppa_signing_key tmp_keyring_dir = tempfile.mkdtemp() File "/usr/lib/python2.7/tempfile.py", line 322, in mkdtemp name = names.next() File "/usr/lib/python2.7/tempfile.py", line 141, in next letters = [choose(c) for dummy in "123456"] File "/usr/lib/python2.7/random.py", line 274, in choice return seq[int(self.random() * len(seq))] # raises IndexError if seq is empty ValueError: cannot convert float NaN to integer This indicates that something is wrong with an installation script somewhere doesn't it? Shouldn't that be fixed? When I executed the "Install" command, I asked me if I wanted to install "unverified" packages. I answered "Y". and it installed. Now, when I run the Update Manager it says I have no updates to install. So, I guess my "problem" is solved for the time being. Will this happen the next time updates are up for Gambas? Bill You should be good now if: 1. The proper PPA is added to your sources.list. 2. The Public Key of all PPA's used are on your system These PPA's are the software repositories that are checked when running: $ sudo apt-get update And these are the repositories updates will be installed from when running: $ sudo apt-get upgrade Next time when PPA memh/gambas3 gets an updated gambas version the apt-get update and upgrade will upgrade your version. The message: ----- "Requires installation of untrusted packages." "This action would require the installation of packages from not authenticated sources" ------ could have originated from another PPA as your output in previous mail said: ------ W: GPG error: [97][2]http://ppa.launchpad.net precise Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 14E4942973C62A1B ------- This means that packages from this PPA are not trusted because of public key missing for this PPA. Check: [3]http://blog.launchpad.net/ppa/adding-a-ppas-key-to-ubuntu for more info on how to install a Public Key from a PPA. References 1. https://launchpad.net/~nemh/+archive/gambas3 2. http://ppa.launchpad.net/ 3. http://blog.launchpad.net/ppa/adding-a-ppas-key-to-ubuntu From oitofelix at ...181... Tue Apr 15 03:56:05 2014 From: oitofelix at ...181... (Bruno =?UTF-8?B?RsOpbGl4?= Rezende Ribeiro) Date: Mon, 14 Apr 2014 22:56:05 -0300 Subject: [Gambas-user] Advising methods of non-fixed argument tuple in a parent class Message-ID: <20140414225605.1f499874@...3316...> Hello all! Suppose we want an array of variants which has the nice property of raising an event after any modification, like addition or removal of elements, has occurred to itself. Since the class 'Variant[]' does not have this specific capability but, on the order hand, has every other desired array handling functionality we need, we'll make good use of the OOP philosophy of re-usability and extend it to add our desired functionality. Our extended class will be called 'VariantArray' and will have an event called "Update" that will be raised after any modification procedure has taken place. Therefore, in its header we so declare: Inherits Variant[] Event Update() We now need to advise[1] the parent's methods intended for modification of the array structure. The idea is rather simple: we supplement a parent's method definition by simply raising the 'Update' event after its completion. Let's use the special method '_put' as our example case. This method allows instances of our class to be used as arrays in assignments. In a hypothetical N-dimensional array we'd have the following signature: Public Sub _put(vVariant As Variant, iIndex1 As Integer, ..., iIndexN As Integer) Where '...' is a meta-syntactical symbol which represents the full list of indexes parameters varying from 2 to N-1. Thus the override function would be: Public Sub _put(vVariant As Variant, iIndex1 As Integer, ..., iIndexN As Integer) Super._put(vVariant, iIndex1, ..., iIndexN) Raise Update() End For an array of non-fixed size we'd have the following signature: Public Sub _put(vVariant As Variant, iIndex1 As Integer, ...) Where the syntactical symbol '...' means the method can take extra arguments. As the result of the definition of an arbitrary argument tuple there is no way the previous syntax for calling the parent's method definition could possibly work, i.e., in the expression Super._put(vVariant, iIndex1, ...) there is no string of syntactical symbols one could replace the meta-syntactical symbol '...' in order to make the parent's '_put' method receive the same argument tuple of the child '_put' method. The only hope to solve this problem is to use the static class 'Param' to access the extra arguments in the form of an array. However, we can't use an ordinary function call to accomplish what we want, because it won't accept an array as a meta-argument. Fortunately that's what the method 'Call' of the 'Object' class provides us. Therefore, being 'PARENT' the meta-syntactical variable whose hypothetical syntactic expression points to the parent's method implementations, we'd use: Object.Call(PARENT, "_put", [vVariant, iIndex1].Insert(Param.All)) Even so, there is no expression one could fit in 'PARENT' that would make the call work as intended. In the previous case of an arbitrary but defined number of arguments we used the 'Super' keyword to reference the parent's method implementation. This worked there because it was a direct and imediate use, and would not work here in place of 'PARENT'. So we are stuck, because to reference the parent's method implementation we need to use a syntax which doesn't allow the use of a non-fixed tuple of arguments, and in order to use a non-fixed tuple of arguments we have to give up our ability of referencing the parent's method implementation. The conclusion is quite clear: it can't be done. My questions are: is there any error with the reasoning given above? If not, is there a workaround? If not, how could we improve Gambas to solve this problem? Irrespective to all of this, do you suggest another approach to accomplish the initial objective of obtaining an array which raises events when modified? What about the general idea of advising methods of an inherited class? In general, how can we make it work? Thank you for your attention. I look forward to your answer. Footnotes: [1] I've borrowed the term "advice" from the GNU Emacs terminology for a very similar concept. Here is what its manual says about it: The "advice" feature lets you add to the existing definition of a function, by "advising the function". This is a cleaner method for a library to customize functions defined within Emacs--cleaner than redefining the whole function." -- ,= ,-_-. =. Bruno F?lix Rezende Ribeiro (oitofelix) [0x28D618AF] ((_/)o o(\_)) There is no system but GNU; `-'(. .)`-' GNU Linux-Libre is one of its official kernels; \_/ All software must be free as in freedom; -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 490 bytes Desc: not available URL: From gambas at ...2524... Tue Apr 15 09:51:49 2014 From: gambas at ...2524... (gambas at ...2524...) Date: Tue, 15 Apr 2014 07:51:49 +0000 Subject: [Gambas-user] Issue 520 in gambas: System.DataTypes is writeable Message-ID: <0-6813199134517018827-4762429888877162900-gambas=googlecode.com@...2524...> Status: New Owner: ---- Labels: Version Type-Bug Priority-Medium OpSys-Any Dist-Any Arch-Any Desktop-Any GUI-Any New issue 520 by adamn... at ...626...: System.DataTypes is writeable http://code.google.com/p/gambas/issues/detail?id=520 1) Describe the problem. The System class override in gb.eval provides the System.DataTypes property which is according to the help docs (and common sense would dictate) a readonly property returning a string[]. However, the propert appears to be read/write 2) GIVE THE FOLLOWING INFORMATIONS (if they are appropriate): Version: TRUNK Revision: r6235 Operating system: Linux Distribution: PCLinuxOS Architecture: x86 3) Provide a little project that reproduces the bug or the crash. The simplest demo is MMain.Main System.DataTypes.Clear Print System.DataTypes.Join("\n") 4) If your project needs a database, try to provide it, or part of it. N/A 5) Explain clearly how to reproduce the bug or the crash. Create a console project Add the gb.eval component Insert the above code in MMain.Main() Run 6) By doing that carefully, you have done 50% of the bug fix job! IMPORTANT NOTE: If you encounter several different problems or bugs, (for example, a bug in your project, and an interpreter crash while debugging it), please create distinct issues! ANOTHER NOTE: Don't create an issue if you have a compilation problem on the development version. Send a mail to the mailing-list instead, thanks. -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings From taboege at ...626... Tue Apr 15 12:55:51 2014 From: taboege at ...626... (Tobias Boege) Date: Tue, 15 Apr 2014 12:55:51 +0200 Subject: [Gambas-user] Advising methods of non-fixed argument tuple in a parent class In-Reply-To: <20140414225605.1f499874@...3316...> References: <20140414225605.1f499874@...3316...> Message-ID: <20140415105551.GB514@...2774...> On Mon, 14 Apr 2014, Bruno F??lix Rezende Ribeiro wrote: > Hello all! > > Suppose we want an array of variants which has the nice property of > raising an event after any modification, like addition or removal of > elements, has occurred to itself. Since the class 'Variant[]' does not > have this specific capability but, on the order hand, has every other > desired array handling functionality we need, we'll make good use of > the OOP philosophy of re-usability and extend it to add our desired > functionality. > > Our extended class will be called 'VariantArray' and will have an > event called "Update" that will be raised after any modification > procedure has taken place. Therefore, in its header we so declare: > > Inherits Variant[] > Event Update() > > We now need to advise[1] the parent's methods intended for modification > of the array structure. The idea is rather simple: we supplement a > parent's method definition by simply raising the 'Update' event > after its completion. Let's use the special method '_put' as our > example case. This method allows instances of our class to be used > as arrays in assignments. > > In a hypothetical N-dimensional array we'd have the following signature: > > Public Sub _put(vVariant As Variant, iIndex1 As Integer, ..., > iIndexN As Integer) > > Where '...' is a meta-syntactical symbol which represents the full list > of indexes parameters varying from 2 to N-1. Thus the > override function would be: > > Public Sub _put(vVariant As Variant, iIndex1 As Integer, ..., > iIndexN As Integer) > > Super._put(vVariant, iIndex1, ..., iIndexN) > Raise Update() > > End > > For an array of non-fixed size we'd have the following signature: > > Public Sub _put(vVariant As Variant, iIndex1 As Integer, ...) > > Where the syntactical symbol '...' means the method can take extra > arguments. As the result of the definition of an arbitrary argument > tuple there is no way the previous syntax for calling the parent's > method definition could possibly work, i.e., in the expression > > Super._put(vVariant, iIndex1, ...) > > there is no string of syntactical symbols one could replace the > meta-syntactical symbol '...' in order to make the parent's '_put' > method receive the same argument tuple of the child '_put' method. > > The only hope to solve this problem is to use the static class 'Param' > to access the extra arguments in the form of an array. However, we > can't use an ordinary function call to accomplish what we want, because > it won't accept an array as a meta-argument. Fortunately that's what > the method 'Call' of the 'Object' class provides us. Therefore, being > 'PARENT' the meta-syntactical variable whose hypothetical syntactic > expression points to the parent's method implementations, we'd use: > > Object.Call(PARENT, "_put", [vVariant, iIndex1].Insert(Param.All)) > > Even so, there is no expression one could fit in 'PARENT' that would > make the call work as intended. In the previous case of an arbitrary > but defined number of arguments we used the 'Super' keyword to > reference the parent's method implementation. This worked there > because it was a direct and imediate use, and would not work here in > place of 'PARENT'. > > So we are stuck, because to reference the parent's method > implementation we need to use a syntax which doesn't allow the use of > a non-fixed tuple of arguments, and in order to use a non-fixed tuple of > arguments we have to give up our ability of referencing the parent's > method implementation. The conclusion is quite clear: it can't be done. > > My questions are: is there any error with the reasoning given above? If > not, is there a workaround? If not, how could we improve Gambas to > solve this problem? Irrespective to all of this, do you suggest another > approach to accomplish the initial objective of obtaining an array > which raises events when modified? What about the general idea of > advising methods of an inherited class? In general, how can we make it > work? > > > Thank you for your attention. > I look forward to your answer. > > > Footnotes: > > [1] I've borrowed the term "advice" from the GNU Emacs > terminology for a very similar concept. Here is what its manual says > about it: > > The "advice" feature lets you add to the existing definition > of a function, by "advising the function". This is a cleaner > method for a library to customize functions defined within > Emacs--cleaner than redefining the whole function." > If I was to sum up your post: you want to call a method of Super with a variable argument list? AFAIK, you are right that we cannot call Super._put() directly when we want to pass a variable number of arguments. For that, we need to manipulate the Gambas stack to push that stuff and then call the method. That's precisely when Object.Call() would come into play and AFAIK, you are right, too, in that we cannot use Super there as it cannot be used alone. And there is no other way of accessing our inherited class. That looks like a limitation. However, multi-dimensional arrays are limited to eight dimensions in Gambas, so there is no practical problem at present that would you keep you from Select-Case'ing Param.Count and doing Super[cased-arg-list-here] = vValue. But I believe in the existence of problems of bigger importance than practical problems, like ideational ones [ hope that's the right English word... ] where the above solution fails miserably. In the Tobias-Boegian school of Gambas, we distinguish between "real" multi- dimensional arrays and "derived" multi-dimensional arrays. Real m-d arrays are those you were about to use, the ones you declare with Variant[iDim1, iDim2, ..., iDimN] where N <= 8. These have at least three drawbacks: (1) their number of dimensions is limited by 8; (2) the size of each dimension is static; and (3) they can only shape like matrices. Derived m-d arrays are array classes built by the interpreter out of other classes. If you have a class x, then x[] denotes an array type containing elements of type x. Moreover, x[] is again a class. So if you repeat that process, you obtain x[][] which is an array class that can hold x[] objects. Let's look at the three above points. It turns out that derived m-d arrays are superior: (1) no limit; (2) sizes of dimensions are fully dynamic; and (3) we are not limited to matrix-shape. Maybe now it becomes clear what I meant with matrix-shaped: if you have real m-d arrays, any dimension must have the same size at every point, e.g. if you have a m-d array of three dimensions, it will always look like a cuboid. Whereas 3d derived m-d arrays are arrays of arrays of arrays and every two arrays in that system may have different sizes. [ I first posted that explanation here[0]. ] If you are willing to use derived arrays (there seems no reason against), you don't have that problem of variable argument lists, as there is no syntactic multi-dimensional-ity, you just happen to access 1d arrays whose elements are again arrays. And finally let me tell you something about extending classes: it gets especially cool when you call your extending class like the extended class. Above, you would not call your class VariantArray but Variant[]. [ At present, you have to create .src/Variant[].class outside of the IDE in your project because the IDE forbids use of brackets in class names. However, the interpreter doesn't seem to have any problems with that. ] That way, you are overriding the Variant[] class in the interpreter's global symbol table, using inheritance, i.e. you extend it. You can add features to Variant[] which are immediately available to all users of the Variant[] class without having to change any code. That's explained in the docs as well[1]. Regards, Tobi [0] http://gambas-club.de/viewtopic.php?f=3&t=4688#p9975 [1] http://gambaswiki.org/wiki/doc/object-model -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From bbruen at ...2308... Tue Apr 15 14:34:39 2014 From: bbruen at ...2308... (B Bruen) Date: Tue, 15 Apr 2014 22:04:39 +0930 Subject: [Gambas-user] Advising methods of non-fixed argument tuple in a parent class In-Reply-To: <20140415105551.GB514@...2774...> References: <20140414225605.1f499874@...3316...> <20140415105551.GB514@...2774...> Message-ID: <20140415220439.2b8f63c46b215f183fcc726f@...2308...> On Tue, 15 Apr 2014 12:55:51 +0200 Tobias Boege wrote: > At > present, you have to create .src/Variant[].class outside of the IDE in your > project because the IDE forbids use of brackets in class names. However, the > interpreter doesn't seem to have any problems with that. Nice tip Tobi, I never could solve that! -- B Bruen From oitofelix at ...181... Tue Apr 15 22:14:12 2014 From: oitofelix at ...181... (Bruno =?UTF-8?B?RsOpbGl4?= Rezende Ribeiro) Date: Tue, 15 Apr 2014 17:14:12 -0300 Subject: [Gambas-user] Advising methods of non-fixed argument tuple in a parent class In-Reply-To: <20140415105551.GB514@...2774...> References: <20140414225605.1f499874@...3316...> <20140415105551.GB514@...2774...> Message-ID: <20140415171412.6d1e041e@...3316...> Em Tue, 15 Apr 2014 12:55:51 +0200 Tobias Boege escreveu: > If I was to sum up your post: you want to call a method of Super with > a variable argument list? Yup. You got that perfectly right! ;-) I wonder if using your summarizing sentence right away from the beginning of my original text would have had the same effect. In affirmative case I'm being overly verbose, but it happens that I'm not the biggest fan of misunderstanding, so I'd rather prefer to play a little bit safer. :-P Nevertheless, it'd be pointless if actually the extensive explanation achieves the contrary effect: hard comprehension. I welcome feedback on this matter too. > AFAIK, you are right that we cannot call Super._put() directly when > we want to pass a variable number of arguments. For that, we need to > manipulate the Gambas stack to push that stuff and then call the > method. That's precisely when Object.Call() would come into play and > AFAIK, you are right, too, in that we cannot use Super there as it > cannot be used alone. And there is no other way of accessing our > inherited class. That looks like a limitation. So, I guess it'd be a reasonable feature request to include at least a way to bypass this particular limitation. By the way, are you a Gambas developer? > However, multi-dimensional arrays are limited to eight dimensions in > Gambas, so there is no practical problem at present that would you > keep you from Select-Case'ing Param.Count and doing > Super[cased-arg-list-here] = vValue. Oh... I just forgot for a moment that hard-coded limitation of 8 dimensions. But yeah, given that our concerns are attached to practical situations you've suggested a perfectly acceptable solution, unfortunately somewhat inconvenient, though; yet as convenient as it could possibly be with the current interpreter. > But I believe in the existence of problems of bigger importance than > practical problems, like ideational ones [ hope that's the right > English word... ] where the above solution fails miserably. I couldn't agree more on that. > In the Tobias-Boegian school of Gambas, we distinguish between "real" > multi- dimensional arrays and "derived" multi-dimensional arrays. > Real m-d arrays are those you were about to use, the ones you declare > with Variant[iDim1, iDim2, ..., iDimN] where N <= 8. These have at > least three drawbacks: > > (1) their number of dimensions is limited by 8; > (2) the size of each dimension is static; and > (3) they can only shape like matrices. > > Derived m-d arrays are array classes built by the interpreter out of > other classes. If you have a class x, then x[] denotes an array type > containing elements of type x. Moreover, x[] is again a class. So if > you repeat that process, you obtain x[][] which is an array class > that can hold x[] objects. > > Let's look at the three above points. It turns out that derived m-d > arrays are superior: > > (1) no limit; > (2) sizes of dimensions are fully dynamic; and > (3) we are not limited to matrix-shape. Congratulations. Very good characterization of "real" and "derived" m-d arrays disadvantages and advantages respectively. > Maybe now it becomes clear what I meant with matrix-shaped: if you > have real m-d arrays, any dimension must have the same size at every > point, e.g. if you have a m-d array of three dimensions, it will > always look like a cuboid. Whereas 3d derived m-d arrays are arrays > of arrays of arrays and every two arrays in that system may have > different sizes. [ I first posted that explanation here[0]. ] I guess [0] is in German, and thus unfortunately I can't read it. I have the feeling, though I could be deadly wrong, that outside this mailing list, there are a lot more information and discussion about Gambas in languages other than English. It seems that [1] supports this claim. It's unfortunate because fewer people can have access to that information, and it segregates the user-base to some extent. > If you are willing to use derived arrays (there seems no reason > against), you don't have that problem of variable argument lists, as > there is no syntactic multi-dimensional-ity, you just happen to > access 1d arrays whose elements are again arrays. I agree with you that the use of m-d derived arrays is entirely taken care of by the interpreter and it's quite transparent to my code. However, if I'm going to replace the class 'Variant[]' presupposing full backward compatibility, as you've suggested below, I must make sure my code properly handle "real" arrays as well. > And finally let me tell you something about extending classes: it gets > especially cool when you call your extending class like the extended > class. Above, you would not call your class VariantArray but > Variant[]. [ At present, you have to create .src/Variant[].class > outside of the IDE in your project because the IDE forbids use of > brackets in class names. However, the interpreter doesn't seem to > have any problems with that. ] What a neat tip! If the behavior of having classes with brackets in their names is useful --- and even the interpreter is fine with that --- I don't see why this wouldn't be an IDE bug. Have you or anyone else addressed this bug or submitted a bug report on this? > That way, you are overriding the Variant[] class in the interpreter's > global symbol table, using inheritance, i.e. you extend it. You can > add features to Variant[] which are immediately available to all > users of the Variant[] class without having to change any code. > That's explained in the docs as well[1]. Talking about that, don't you think that an 'Update' event as I've described would be a very nice core addition to the 'Array' class in the main distribution? It seems to me it would be generally useful for users. Poor 'Array' class... it doesn't have any events --- let's give it some useful ones. ;-) I really appreciate your very interesting response. Happy Hacking! Footnotes: [1] http://gambaswiki.org/wiki/doc/forum -- ,= ,-_-. =. Bruno F?lix Rezende Ribeiro (oitofelix) [0x28D618AF] ((_/)o o(\_)) There is no system but GNU; `-'(. .)`-' GNU Linux-Libre is one of its official kernels; \_/ All software must be free as in freedom; -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 490 bytes Desc: not available URL: From whenamalone at ...626... Wed Apr 16 02:37:36 2014 From: whenamalone at ...626... (monika) Date: Tue, 15 Apr 2014 17:37:36 -0700 (PDT) Subject: [Gambas-user] my belated vishu gift Message-ID: =?UTF-8?B?4LS14LS/4LS34LWB4LSa4LWN4LSa4LS/4LSw4LS/4LSq4LWN4LSq4LSf4LSV4LWN4LSV4LSCLm1wNA==?= (2M) -- View this message in context: http://gambas.8142.n7.nabble.com/my-belated-vishu-gift-tp46185.html Sent from the gambas-user mailing list archive at Nabble.com. From oitofelix at ...181... Wed Apr 16 03:21:37 2014 From: oitofelix at ...181... (Bruno =?UTF-8?B?RsOpbGl4?= Rezende Ribeiro) Date: Tue, 15 Apr 2014 22:21:37 -0300 Subject: [Gambas-user] Wrapping methods which accept optional arguments Message-ID: <20140415222137.4cef7beb@...3316...> Hello Again! Suppose we are overriding the class 'Array' to add the event 'Update' which will be raised after the completion of any method which could possibly modify the array structure. We start by the 'Remove' method which has the following signature: Public Sub Remove(iIndex As Integer, Optional iLength As Integer) As our override method is not much more than a wrapper around the parent's method, it needs to call 'Super.Remove' method with the same arguments it has received in the first place. Consider our first attempt to do just that, which would be: Super.Remove(iIndex, iLength) However, that call won't work as expected because although 'iLength' is received as an optional argument, it's invariably passed along to the parent's method, be it originally given or not, in which case it would default to '0'. In order to solve that problem we may consider to discriminate semantically the optional argument, if that is at all possible. To discover if that is actually the case, we must prove that either one of the following properties must hold about the semantics of the method for some possible default value of the optional argument: 1. The method's semantics is defined for the default value of the optional argument, but would be indistinguishable if the optional argument were otherwise omitted. 2. The method's semantics is undefined for the default value of the optional argument. It turns out in this particular case the 'Remove' method satisfies both properties. For the first property we can just take 'iLength' as '1', since the default behavior (when iLength is omitted) is to remove just one element of the array. Then, our method would look like: Public Sub Remove(iIndex As Integer, Optional iLength As Integer = 1) Super.Remove(iIndex, iLength) Raise Update() End For the second property we could take 'iLength' as '0' because there is no a-priori nor auto-evident distinction between removing zero elements of an array and not executing the procedure of removal at all. Therefore we can be assured that no one would expect a meaningful behavior from a non-meaningful argument and then reserve that for internal use, promoting the semantics of the method as undefined/unpredictable for that particular optional argument's default value. Our override method would be: Public Sub Remove(iIndex As Integer, Optional iLength As Integer = 0) If iLength = 0 Then Super.Remove(iIndex) Else Super.Remove(iIndex, iLength) EndIf Raise Update() End Notice that this latter method's form could be used to obtain a method functionally indistinguishable from the former method's form by just replacing the zeros by ones. Nevertheless, the converse is not true. Although, we could successfully solve the problem for this particular instance of the problem resorting to semantical analysis, it does not help much with other methods which have an entire different semantics whose analysis must always be done in a case-by-case basis. Even worse, it's possible to prove the following statement: There is a primitive method, which accepts optional arguments, that can't be perfectly wrapped by any non-primitive method of the same signature if, and only if, there is a way for primitive methods to unambiguously check whether a particular optional argument was supplied and there is no way of doing so for non-primitive methods. Where 'primitive method' is defined as a method not written in Gambas which is callable from at least one method written in Gambas; and 'non-primitive method' is defined as a method written in Gambas. Furthermore we admit the premise that it's impossible for a non-primitive method to call another method referencing the unchanged original argument tuple. The theorem makes explicit our necessity of providing a way of checking unambiguously, in Gambas code, whether any given optional argument were actually supplied or, alternatively, preventing primitive methods of doing so. Otherwise, there will be methods for which it is impossible to remedy the situation of perfect-wrapping by pure semantic analysis. Now for a more pragmatic approach, it'd be very useful to document the default value of optional arguments as part of the method's signature for all primitive and non-primitive methods where it is applicable. Those methods can always be perfectly wrapped using the first property of the semantical analysis given above. Moreover there is a trivial algorithm to do so, granted we know the default values of every optional argument. That way we eliminate the step of semantical analysis even without modification to the interpreter's code. My questions are: do you see any problem with the reasoning outlined above? Have you ever faced the same problem? Do you know some workaround? How do you think Gambas may be improved to solve this problem? Thank you. -- ,= ,-_-. =. Bruno F?lix Rezende Ribeiro (oitofelix) [0x28D618AF] ((_/)o o(\_)) There is no system but GNU; `-'(. .)`-' GNU Linux-Libre is one of its official kernels; \_/ All software must be free as in freedom; -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 490 bytes Desc: not available URL: From oitofelix at ...181... Wed Apr 16 06:01:43 2014 From: oitofelix at ...181... (Bruno =?UTF-8?B?RsOpbGl4?= Rezende Ribeiro) Date: Wed, 16 Apr 2014 01:01:43 -0300 Subject: [Gambas-user] Possible bug extending array class of non-native classes [Was: Advising methods of non-fixed argument tuple in a parent class] In-Reply-To: <20140415105551.GB514@...2774...> References: <20140414225605.1f499874@...3316...> <20140415105551.GB514@...2774...> Message-ID: <20140416010143.50a4f335@...3316...> Em Tue, 15 Apr 2014 12:55:51 +0200 Tobias Boege escreveu: > And finally let me tell you something about extending classes: it gets > especially cool when you call your extending class like the extended > class. Above, you would not call your class VariantArray but > Variant[]. [ At present, you have to create .src/Variant[].class > outside of the IDE in your project because the IDE forbids use of > brackets in class names. However, the interpreter doesn't seem to > have any problems with that. ] > > That way, you are overriding the Variant[] class in the interpreter's > global symbol table, using inheritance, i.e. you extend it. You can > add features to Variant[] which are immediately available to all > users of the Variant[] class without having to change any code. > That's explained in the docs as well[1]. Strangely this extension trick doesn't work with an array of a non-native class. The interpreter doesn't complain, but no events or methods defined in the extended class are raised or called. Could you please confirm this? Do you think this is a bug? If not, do you have an explanation for this strange behavior? -- ,= ,-_-. =. Bruno F?lix Rezende Ribeiro (oitofelix) [0x28D618AF] ((_/)o o(\_)) There is no system but GNU; `-'(. .)`-' GNU Linux-Libre is one of its official kernels; \_/ All software must be free as in freedom; -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 490 bytes Desc: not available URL: From gambas at ...2524... Wed Apr 16 13:35:07 2014 From: gambas at ...2524... (gambas at ...2524...) Date: Wed, 16 Apr 2014 11:35:07 +0000 Subject: [Gambas-user] Issue 521 in gambas: Unimplemented function HtmlDocument_GetElementById() Message-ID: <0-6813199134517018827-4260407520019238221-gambas=googlecode.com@...2524...> Status: New Owner: ---- Labels: Version Type-Bug Priority-Medium OpSys-Any Dist-Any Arch-Any Desktop-Any GUI-Any New issue 521 by sibsk... at ...626...: Unimplemented function HtmlDocument_GetElementById() http://code.google.com/p/gambas/issues/detail?id=521 Function HtmlDocument_GetElementById() is defined in htmldocument.h, but there is no implementation in code. Please, look at my patch to fix it. Attachments: gambas3-3.5.3-remove-undefined-symbols.patch 686 bytes -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings From taboege at ...626... Wed Apr 16 13:40:52 2014 From: taboege at ...626... (Tobias Boege) Date: Wed, 16 Apr 2014 13:40:52 +0200 Subject: [Gambas-user] Possible bug extending array class of non-native classes [Was: Advising methods of non-fixed argument tuple in a parent class] In-Reply-To: <20140416010143.50a4f335@...3316...> References: <20140414225605.1f499874@...3316...> <20140415105551.GB514@...2774...> <20140416010143.50a4f335@...3316...> Message-ID: <20140416114052.GA513@...2774...> On Wed, 16 Apr 2014, Bruno F??lix Rezende Ribeiro wrote: > Em Tue, 15 Apr 2014 12:55:51 +0200 > Tobias Boege escreveu: > > > And finally let me tell you something about extending classes: it gets > > especially cool when you call your extending class like the extended > > class. Above, you would not call your class VariantArray but > > Variant[]. [ At present, you have to create .src/Variant[].class > > outside of the IDE in your project because the IDE forbids use of > > brackets in class names. However, the interpreter doesn't seem to > > have any problems with that. ] > > > > That way, you are overriding the Variant[] class in the interpreter's > > global symbol table, using inheritance, i.e. you extend it. You can > > add features to Variant[] which are immediately available to all > > users of the Variant[] class without having to change any code. > > That's explained in the docs as well[1]. > > Strangely this extension trick doesn't work with an array of a > non-native class. The interpreter doesn't complain, but no events or > methods defined in the extended class are raised or called. Could you > please confirm this? Do you think this is a bug? If not, do you have > an explanation for this strange behavior? > Interesting point. We were only interested in Variant[] when we worked out that solution (our goal was to make homogeneous (all elements have the same type) Variant[] sortable as if it was a specialised native array of that type), so that problem didn't emerge. If my understanding is right (s. gbx_class.c), the behaviour makes sense as follows: native array classes are included explicitely in the interpreter, but non-native arrays are derived on-the-fly at runtime. So, if you create a NativeDatatype[].class, you override that included class, as you have seen, and everything is OK. If you create MyClass[].class, this will actually be the original class, as there is no MyClass[] in the interpreter's global symbol table yet. If you later reference MyClass[] somewhere in actual code, the interpreter will derive an array class from MyClass and override *your* class. That means that your class' logic is irretrievably lost for the interpreter (as his derived array classes will not call Super methods). This would explain what happens, but Benoit knows better. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From taboege at ...626... Wed Apr 16 14:41:02 2014 From: taboege at ...626... (Tobias Boege) Date: Wed, 16 Apr 2014 14:41:02 +0200 Subject: [Gambas-user] Advising methods of non-fixed argument tuple in a parent class In-Reply-To: <20140415171412.6d1e041e@...3316...> References: <20140414225605.1f499874@...3316...> <20140415105551.GB514@...2774...> <20140415171412.6d1e041e@...3316...> Message-ID: <20140416124102.GB513@...2774...> On Tue, 15 Apr 2014, Bruno F??lix Rezende Ribeiro wrote: > > AFAIK, you are right that we cannot call Super._put() directly when > > we want to pass a variable number of arguments. For that, we need to > > manipulate the Gambas stack to push that stuff and then call the > > method. That's precisely when Object.Call() would come into play and > > AFAIK, you are right, too, in that we cannot use Super there as it > > cannot be used alone. And there is no other way of accessing our > > inherited class. That looks like a limitation. > > So, I guess it'd be a reasonable feature request to include at least a > way to bypass this particular limitation. By the way, are you a Gambas > developer? > Not one of the kind that could do such a thing. I'm working on C/C++ components for Gambas (and if you write C/C++ components for Gambas, it is inevitable to look at the interpreter's source once in a while). In the source tree: $ grep -R Tobias * | egrep "\.(class|project|component)" should show you where I've been. I develop components as there is time but mathematics students aren't very famed around here for having much spare time. > > Maybe now it becomes clear what I meant with matrix-shaped: if you > > have real m-d arrays, any dimension must have the same size at every > > point, e.g. if you have a m-d array of three dimensions, it will > > always look like a cuboid. Whereas 3d derived m-d arrays are arrays > > of arrays of arrays and every two arrays in that system may have > > different sizes. [ I first posted that explanation here[0]. ] > > I guess [0] is in German, and thus unfortunately I can't read it. I > have the feeling, though I could be deadly wrong, that outside this > mailing list, there are a lot more information and discussion about > Gambas in languages other than English. It seems that [1] supports > this claim. It's unfortunate because fewer people can have access to > that information, and it segregates the user-base to some extent. > Yeah, there is likely quite some information about Gambas only available to a very limited community in their language - and I must admit that I don't even attend those famous French or Spanish sites (not even whiteislandsoftware.com). BUT there is only one German Gambas community I know of and that's the Gambas-Club of which I have taken care recently. Since I'm active on this list, the link is established (it's just not broadband). Of Ru Vuott and Willy Raets, I have noticed that they must have taken similar positions. I suppose that this is how it works with the other forums as well. So potentially, we can transfer most of the stuff into this list if people ask the right questions... maybe. :-) Too bad that you can't understand German, though. I had luck with others in the past who could at least somewhat read German. Actually, I have translated everything about array classes I said in that post in my last mail but there is also a German online book[0] we're writing about Gambas which happens to contain "original research" and "exclusive material" :-) (may it only be up-to-date documentation of some classes). > > > And finally let me tell you something about extending classes: it gets > > especially cool when you call your extending class like the extended > > class. Above, you would not call your class VariantArray but > > Variant[]. [ At present, you have to create .src/Variant[].class > > outside of the IDE in your project because the IDE forbids use of > > brackets in class names. However, the interpreter doesn't seem to > > have any problems with that. ] > > What a neat tip! If the behavior of having classes with brackets in > their names is useful --- and even the interpreter is fine with that --- > I don't see why this wouldn't be an IDE bug. Have you or anyone else > addressed this bug or submitted a bug report on this? > It was discussed already in this thread [1]. > > > That way, you are overriding the Variant[] class in the interpreter's > > global symbol table, using inheritance, i.e. you extend it. You can > > add features to Variant[] which are immediately available to all > > users of the Variant[] class without having to change any code. > > That's explained in the docs as well[1]. > > Talking about that, don't you think that an 'Update' event as I've > described would be a very nice core addition to the 'Array' class in > the main distribution? It seems to me it would be generally useful for > users. Poor 'Array' class... it doesn't have any events --- let's give > it some useful ones. ;-) > That would mean overhead which is unnecessary - I dare to say - _most_ of the time. I myself never needed a data container which would tell me when it changed. That is also a decision I have made for gb.data: classes in there are data containers. They don't communicate with me (raise events), they only contain. And raising an event in code means to execute some functions, no matter if that object is actually able to generate events. It is not, e.g. when it has no event name which is the case for all current code. Since changing data in an array is surely one of its most used functions, it would be cool to see a benchmark with and without that event. But I bet the benchmark with event wouldn't look too nice... Regards, Tobi [0] http://www.gambas-buch.de [1] http://sourceforge.net/p/gambas/mailman/message/29417207/ -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From gambas at ...2524... Wed Apr 16 20:18:39 2014 From: gambas at ...2524... (gambas at ...2524...) Date: Wed, 16 Apr 2014 18:18:39 +0000 Subject: [Gambas-user] Issue 521 in gambas: Unimplemented function HtmlDocument_GetElementById() In-Reply-To: <0-6813199134517018827-4260407520019238221-gambas=googlecode.com@...2524...> References: <0-6813199134517018827-4260407520019238221-gambas=googlecode.com@...2524...> Message-ID: <1-6813199134517018827-4260407520019238221-gambas=googlecode.com@...2524...> Updates: Status: Fixed Owner: adrien.p... at ...626... Labels: -Version Version-TRUNK Comment #1 on issue 521 by adrien.p... at ...626...: Unimplemented function HtmlDocument_GetElementById() http://code.google.com/p/gambas/issues/detail?id=521 Hi, I fixed this bug in revision #6244, thanks. However, your patch would not have worked : the GetElement() function returns the first element with the given tag name, and creates it if it was not found. I use it when some special tags in the HTML document are required by the user, like the tag or the tag. I used the XMLNode_getFirstChildByAttributeValue() function, which is much more appropriate. :) Regards, -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings From rmorgan62 at ...626... Thu Apr 17 03:10:16 2014 From: rmorgan62 at ...626... (Randall Morgan) Date: Wed, 16 Apr 2014 18:10:16 -0700 Subject: [Gambas-user] Calling a function via variable name Message-ID: I'm hoping someone here can help me. I am trying to port a genetic program from C to Gambas 3. The original code passes various function as pointers in an array. They are then called using the function pointer. How can I best pass functions around in Gambas via variable. FYI: This program randomly selects a sub set of functions from a list in random order and stores them in an array. The array of pointers is then updated for the next generation, after testing the solution. Thanks for your help From taboege at ...626... Thu Apr 17 12:20:35 2014 From: taboege at ...626... (Tobias Boege) Date: Thu, 17 Apr 2014 12:20:35 +0200 Subject: [Gambas-user] Calling a function via variable name In-Reply-To: References: Message-ID: <20140417102035.GA623@...2774...> On Wed, 16 Apr 2014, Randall Morgan wrote: > I'm hoping someone here can help me. I am trying to port a genetic program > from C to Gambas 3. The original code passes various function as pointers > in an array. They are then called using the function pointer. How can I > best pass functions around in Gambas via variable. > > FYI: This program randomly selects a sub set of functions from a list in > random order and stores them in an array. The array of pointers is then > updated for the next generation, after testing the solution. > You can emulate functions pointers through objects. Depending on how your set of functions is structured and how many you have of them, you could do one of at least two things: 1) Define a (Create Static) class that represents your function, implement the function in its _call() special method, and then you can pass that class (which is actually a singleton object) as a surrogate function pointer. [ There are other variants of that trick but this one is as close to the syntax of function pointers as I could get it. ] E.g. you want to pass a function pointer that just prints something, then you define your --8<--[ PrintFunction.class ]----------------------------------------- ' Gambas class file Create Static Public Sub _call(sMessage As String) Print sMessage End --8<------------------------------------------------------------------ and use it like PassAFunctionPointer(PrintFunction) where Public Sub PassAFunctionPointer(hFunc As Object) hFunc("wherever you get your arguments from") End 2) Define a (Create Static) class that represents your entire set of functions. That class implements functions of known names that you can later refer to: --8<--[ PrintFunctionSet.class ]-------------------------------------- ' Gambas class file Create Static Public Sub NormalPrint(sMessage As String) Print sMessage End Public Sub DecoratePrint(sMessage As String) Print "[*]";; sMessage End --8<------------------------------------------------------------------ You'd use this set like PassAFunctionSet(PrintFunctionSet, ["NormalPrint", "DecoratePrint", "DecoratePrint"]) i.e. you give the set and then a sequence of function names to be executed: Public Sub PassAFunctionSet(hSet As Object, aFuncs As String[]) Dim sFunc As String Dim iInd As Integer For Each sFunc In aFuncs Object.Call(hSet, sFunc, ["your argument #" & iInd]) Next End Of course, if you have lots of functions of similar purpose, you would opt for the second way because it means less classes and better organisation. Attached is a project so you can play around. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk -------------- next part -------------- A non-text attachment was scrubbed... Name: function-pointer-0.0.1.tar.gz Type: application/octet-stream Size: 4867 bytes Desc: not available URL: From rmorgan62 at ...626... Thu Apr 17 12:44:10 2014 From: rmorgan62 at ...626... (Randall Morgan) Date: Thu, 17 Apr 2014 03:44:10 -0700 Subject: [Gambas-user] Calling a function via variable name In-Reply-To: <20140417102035.GA623@...2774...> References: <20140417102035.GA623@...2774...> Message-ID: Thanks Tobi, I stumbled onto the idea in #2 myself. I also thought about creating an Gene class that uses and index value to call one of it's many methods. The methods being encoded in the dna array. Thanks for the ideas and the code! On Thu, Apr 17, 2014 at 3:20 AM, Tobias Boege wrote: > On Wed, 16 Apr 2014, Randall Morgan wrote: > > I'm hoping someone here can help me. I am trying to port a genetic > program > > from C to Gambas 3. The original code passes various function as pointers > > in an array. They are then called using the function pointer. How can I > > best pass functions around in Gambas via variable. > > > > FYI: This program randomly selects a sub set of functions from a list in > > random order and stores them in an array. The array of pointers is then > > updated for the next generation, after testing the solution. > > > > You can emulate functions pointers through objects. Depending on how your > set of functions is structured and how many you have of them, you could do > one of at least two things: > > 1) Define a (Create Static) class that represents your function, implement > the function in its _call() special method, and then you can pass that > class (which is actually a singleton object) as a surrogate function > pointer. [ There are other variants of that trick but this one is as > close to the syntax of function pointers as I could get it. ] > > E.g. you want to pass a function pointer that just prints something, > then you define your > > --8<--[ PrintFunction.class > ]----------------------------------------- > ' Gambas class file > > Create Static > > Public Sub _call(sMessage As String) > Print sMessage > End > > --8<------------------------------------------------------------------ > > and use it like > > PassAFunctionPointer(PrintFunction) > > where > > Public Sub PassAFunctionPointer(hFunc As Object) > hFunc("wherever you get your arguments from") > End > > 2) Define a (Create Static) class that represents your entire set of > functions. That class implements functions of known names that you can > later refer to: > > --8<--[ PrintFunctionSet.class > ]-------------------------------------- > ' Gambas class file > > Create Static > > Public Sub NormalPrint(sMessage As String) > Print sMessage > End > > Public Sub DecoratePrint(sMessage As String) > Print "[*]";; sMessage > End > > --8<------------------------------------------------------------------ > > You'd use this set like > > PassAFunctionSet(PrintFunctionSet, ["NormalPrint", "DecoratePrint", > "DecoratePrint"]) > > i.e. you give the set and then a sequence of function names to be > executed: > > Public Sub PassAFunctionSet(hSet As Object, aFuncs As String[]) > Dim sFunc As String > Dim iInd As Integer > > For Each sFunc In aFuncs > Object.Call(hSet, sFunc, ["your argument #" & iInd]) > Next > End > > Of course, if you have lots of functions of similar purpose, you would opt > for the second way because it means less classes and better organisation. > > Attached is a project so you can play around. > > Regards, > Tobi > > -- > "There's an old saying: Don't change anything... ever!" -- Mr. Monk > > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > http://p.sf.net/sfu/NeoTech > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > -- If you ask me if it can be done. The answer is YES, it can always be done. The correct questions however are... What will it cost, and how long will it take? From oitofelix at ...181... Thu Apr 17 21:01:51 2014 From: oitofelix at ...181... (Bruno =?UTF-8?B?RsOpbGl4?= Rezende Ribeiro) Date: Thu, 17 Apr 2014 16:01:51 -0300 Subject: [Gambas-user] Inheriting, wrapping and casting Message-ID: <20140417160151.1e6bcc3c@...3316...> Hello Gambas fellows! Suppose we are overriding the class 'Variant[]' to add the event 'Update' which will be raised after the completion of any method which could possibly modify the array structure. In particular, we need to override appropriately any function that happens to do so. For exposition purposes let's consider the 'Extract' function, which removes one or more elements from the array and returns them. It's signature is as follow: Public Function Extract(iStart As Integer, \ Optional iLength As Integer) As Variant[] Our inherited class has, hence, to override this function with another of the exact same signature, by Gambas' rules. However, it doesn't make sense to return an object of the base class, while the operation is executed by a derived class over an object thereof. It seems there is no easy or natural way around it. We could declare a second extraction function for the derived class named after a different symbol like "ExtractDerived", but we'd break the interface, what isn't a desired outcome. Another approach would be to forget this particular base class and go upwards until there is no possible conflicting functions and to inherit from there, what happens to be in this case the immediate base class of 'Variant[]' called "Array". However, we'd have to re-implement large portions of the 'Variant[]' class, that could otherwise be immediately deployed if not by our particular design problem at hand. One last, and arguably more reasonable, approach is to give up the syntactical native language's feature of inheritance --- and its useful properties -- and to define a dedicated container base class, which inherits from nowhere, semantically wrapping all functionality of the class 'Variant[]'. It'd work as a layer for accessing the underlying variant array which would be stored in a private variable and isolated from the outside world, i.e., not directly accessible by any property. The only way to modify the array's content would be to use the class' interface which would mimic that of 'Variant[]'. As we've seen, there is no way if not by modifications of the interpreter's very core. Thus, I'd like to know why Gambas enforces the signature of functions onwards inherited classes. If not by technical reasons, but only for methodological consistency requirements, I'd like to suggest that we make it, at least, allows to use the inherited class in place of the parent class within method signatures. Personally, I'd find yet more useful if there were no restriction at all. A very interesting and useful feature, related but independent of this suggestion, is that the interpreter could take care of casting objects in both directions in an hierarchy of classes. In order to accomplish it, there would be introduced two special methods which would be implemented in any class the programmer deems them meaningful and useful: '_castUp' and '_castDown', for casting an object from the inherited to the parent class, and from the parent to the inherited class, respectively. Being 'ThisClass' the inherited class and 'UpClass' its parent, the special methods signatures would be: Static Public Function _castUp (hThisClass As ThisClass) As UpClass Static Public Function _castDown (hUpClass As UpClass) As ThisClass The job of the interpreter would be to call these functions, in a possible chain, to cast automatically upside or downside every time an object of certain class is used in a context that requires an object of another class but in the same hierarchy. What are your thoughts on that? Thank you. -- ,= ,-_-. =. Bruno F?lix Rezende Ribeiro (oitofelix) [0x28D618AF] ((_/)o o(\_)) There is no system but GNU; `-'(. .)`-' GNU Linux-Libre is one of its official kernels; \_/ All software must be free as in freedom; -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 490 bytes Desc: not available URL: From gambas.fr at ...626... Thu Apr 17 21:13:41 2014 From: gambas.fr at ...626... (Fabien Bodard) Date: Thu, 17 Apr 2014 21:13:41 +0200 Subject: [Gambas-user] Inheriting, wrapping and casting In-Reply-To: <20140417160151.1e6bcc3c@...3316...> References: <20140417160151.1e6bcc3c@...3316...> Message-ID: Well ... I'm surely not good as you are but I didn't understand the meanning of castup or down... What is it for ? Le 17 avr. 2014 21:02, "Bruno F?lix Rezende Ribeiro" a ?crit : > Hello Gambas fellows! > > Suppose we are overriding the class 'Variant[]' to add the event > 'Update' which will be raised after the completion of any method which > could possibly modify the array structure. In particular, we need > to override appropriately any function that happens to do so. For > exposition purposes let's consider the 'Extract' function, which removes > one or more elements from the array and returns them. It's signature > is as follow: > > Public Function Extract(iStart As Integer, \ > Optional iLength As Integer) As Variant[] > > Our inherited class has, hence, to override this function with another > of the exact same signature, by Gambas' rules. However, it doesn't > make sense to return an object of the base class, while the operation > is executed by a derived class over an object thereof. > > It seems there is no easy or natural way around it. We could declare a > second extraction function for the derived class named after a different > symbol like "ExtractDerived", but we'd break the interface, what isn't > a desired outcome. > > Another approach would be to forget this particular base class and go > upwards until there is no possible conflicting functions and to inherit > from there, what happens to be in this case the immediate base class of > 'Variant[]' called "Array". However, we'd have to re-implement large > portions of the 'Variant[]' class, that could otherwise be immediately > deployed if not by our particular design problem at hand. > > One last, and arguably more reasonable, approach is to give up the > syntactical native language's feature of inheritance --- and its useful > properties -- and to define a dedicated container base class, which > inherits from nowhere, semantically wrapping all functionality of the > class 'Variant[]'. It'd work as a layer for accessing the underlying > variant array which would be stored in a private variable and isolated > from the outside world, i.e., not directly accessible by any property. > The only way to modify the array's content would be to use the > class' interface which would mimic that of 'Variant[]'. > > As we've seen, there is no way if not by modifications of the > interpreter's very core. Thus, I'd like to know why Gambas enforces > the signature of functions onwards inherited classes. If not by > technical reasons, but only for methodological consistency requirements, > I'd like to suggest that we make it, at least, allows to use the > inherited class in place of the parent class within method signatures. > Personally, I'd find yet more useful if there were no restriction at > all. > > A very interesting and useful feature, related but independent of this > suggestion, is that the interpreter could take care of casting objects > in both directions in an hierarchy of classes. In order to accomplish > it, there would be introduced two special methods which would be > implemented in any class the programmer deems them meaningful and > useful: '_castUp' and '_castDown', for casting an object from the > inherited to the parent class, and from the parent to the inherited > class, respectively. Being 'ThisClass' the inherited class and > 'UpClass' its parent, the special methods signatures would be: > > Static Public Function _castUp (hThisClass As ThisClass) As UpClass > Static Public Function _castDown (hUpClass As UpClass) As ThisClass > > The job of the interpreter would be to call these functions, in a > possible chain, to cast automatically upside or downside every time an > object of certain class is used in a context that requires an object of > another class but in the same hierarchy. > > What are your thoughts on that? > > > Thank you. > > > -- > ,= ,-_-. =. Bruno F?lix Rezende Ribeiro (oitofelix) [0x28D618AF] > ((_/)o o(\_)) There is no system but GNU; > `-'(. .)`-' GNU Linux-Libre is one of its official kernels; > \_/ All software must be free as in freedom; > > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > http://p.sf.net/sfu/NeoTech > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > From bbruen at ...2308... Fri Apr 18 02:19:36 2014 From: bbruen at ...2308... (B Bruen) Date: Fri, 18 Apr 2014 09:49:36 +0930 Subject: [Gambas-user] Inheriting, wrapping and casting In-Reply-To: References: <20140417160151.1e6bcc3c@...3316...> Message-ID: <20140418094936.91b6856cdad8a8186c28cfc2@...2308...> I don't believe there is a need for "castUp" as the object can be referenced as any parent type up the chain. Dim hChild as CChild Dim hParent as CParent hChild= New CChild hParent = hChild However, there is a use for a generalised castDown method. We have quite a few situations when the exact "child-type" is unknown at the time the object is created, but we know that when the methods that create the object are complete then that specialisation will be resolved. Particularly this happens with single pass parsers where the specialisation can't be resolved until some subsequent line of data is parsed. (A specific example, in many of the auction lists we receive, line N can be recognised as a new horse by virtue of the fact that the line begins "Lot [1-9]* " but the fact that it is a yearling or a mare or whatever is not disclosed until we get to line N+2 or N+3), As far as I know, something along the lines of Dim hParent as CParent Dim hChild as CChild hParent = New CParent With hParent .set the property values as we know them initially End With ... hChild=hParent <-- This bit doesn't "work" hChild.someproperty = somenewdata Here is how we do it, (which goes in the most ancestral class of the chain) (and appears to have worked OK for ~3 years): '' Casts the current object as an instance of the **sNewClass** class. The ''`new class must be a descendant of the current class. Public Function Cast(sNewClass As String) As Object Dim hNew As Object Dim sSymbol As String hNew = Object.New(sNewClass) ' If morphing downwards, then the cast is allowed! If (Object.Is(hNew, Object.Type(Me))) Then Goto DO_CAST ' Check we are trying for a cast in the proper chain If Classes[sNewClass].Parent <> Object.Class(Me).Parent Then Error.Raise(Subst("Illegal cast: &1 --/--> &2", Object.Type(Me), Object.Type(hNew))) Endif DO_CAST: For Each sSymbol In Object.Class(Me).Symbols If sSymbol = "." Then Continue If Not Object.Class(hNew).Symbols.Exist(sSymbol) Then Continue If Object.Class(Me)[sSymbol].Kind = Class.Property Then If Not Object.Class(hNew)[sSymbol].ReadOnly Then Object.SetProperty(hNew, sSymbol, Object.GetProperty(Me, sSymbol)) Endif Endif Next Return hNew Catch Error Subst("&1\nERR: &2 (&3)\n&4\n&1\n", String$(40, "-"), Error.Text, Error.Code, Error.Backtrace.Join("\n")) Message.Error("General cast error! Check stderr output for details") End regards Bruce On Thu, 17 Apr 2014 21:13:41 +0200 Fabien Bodard wrote: > Well ... I'm surely not good as you are but I didn't understand the > meanning of castup or down... What is it for ? > Le 17 avr. 2014 21:02, "Bruno F?lix Rezende Ribeiro" a > ?crit : > > > Hello Gambas fellows! > > > > Suppose we are overriding the class 'Variant[]' to add the event > > 'Update' which will be raised after the completion of any method which > > could possibly modify the array structure. In particular, we need > > to override appropriately any function that happens to do so. For > > exposition purposes let's consider the 'Extract' function, which removes > > one or more elements from the array and returns them. It's signature > > is as follow: > > > > Public Function Extract(iStart As Integer, \ > > Optional iLength As Integer) As Variant[] > > > > Our inherited class has, hence, to override this function with another > > of the exact same signature, by Gambas' rules. However, it doesn't > > make sense to return an object of the base class, while the operation > > is executed by a derived class over an object thereof. > > > > It seems there is no easy or natural way around it. We could declare a > > second extraction function for the derived class named after a different > > symbol like "ExtractDerived", but we'd break the interface, what isn't > > a desired outcome. > > > > Another approach would be to forget this particular base class and go > > upwards until there is no possible conflicting functions and to inherit > > from there, what happens to be in this case the immediate base class of > > 'Variant[]' called "Array". However, we'd have to re-implement large > > portions of the 'Variant[]' class, that could otherwise be immediately > > deployed if not by our particular design problem at hand. > > > > One last, and arguably more reasonable, approach is to give up the > > syntactical native language's feature of inheritance --- and its useful > > properties -- and to define a dedicated container base class, which > > inherits from nowhere, semantically wrapping all functionality of the > > class 'Variant[]'. It'd work as a layer for accessing the underlying > > variant array which would be stored in a private variable and isolated > > from the outside world, i.e., not directly accessible by any property. > > The only way to modify the array's content would be to use the > > class' interface which would mimic that of 'Variant[]'. > > > > As we've seen, there is no way if not by modifications of the > > interpreter's very core. Thus, I'd like to know why Gambas enforces > > the signature of functions onwards inherited classes. If not by > > technical reasons, but only for methodological consistency requirements, > > I'd like to suggest that we make it, at least, allows to use the > > inherited class in place of the parent class within method signatures. > > Personally, I'd find yet more useful if there were no restriction at > > all. > > > > A very interesting and useful feature, related but independent of this > > suggestion, is that the interpreter could take care of casting objects > > in both directions in an hierarchy of classes. In order to accomplish > > it, there would be introduced two special methods which would be > > implemented in any class the programmer deems them meaningful and > > useful: '_castUp' and '_castDown', for casting an object from the > > inherited to the parent class, and from the parent to the inherited > > class, respectively. Being 'ThisClass' the inherited class and > > 'UpClass' its parent, the special methods signatures would be: > > > > Static Public Function _castUp (hThisClass As ThisClass) As UpClass > > Static Public Function _castDown (hUpClass As UpClass) As ThisClass > > > > The job of the interpreter would be to call these functions, in a > > possible chain, to cast automatically upside or downside every time an > > object of certain class is used in a context that requires an object of > > another class but in the same hierarchy. > > > > What are your thoughts on that? > > > > > > Thank you. > > > > > > -- > > ,= ,-_-. =. Bruno F?lix Rezende Ribeiro (oitofelix) [0x28D618AF] > > ((_/)o o(\_)) There is no system but GNU; > > `-'(. .)`-' GNU Linux-Libre is one of its official kernels; > > \_/ All software must be free as in freedom; > > > > > > ------------------------------------------------------------------------------ > > Learn Graph Databases - Download FREE O'Reilly Book > > "Graph Databases" is the definitive new guide to graph databases and their > > applications. Written by three acclaimed leaders in the field, > > this first edition is now available. Download your free book today! > > http://p.sf.net/sfu/NeoTech > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > http://p.sf.net/sfu/NeoTech > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user -- B Bruen From oitofelix at ...181... Fri Apr 18 05:10:43 2014 From: oitofelix at ...181... (Bruno =?UTF-8?B?RsOpbGl4?= Rezende Ribeiro) Date: Fri, 18 Apr 2014 00:10:43 -0300 Subject: [Gambas-user] Inheriting, wrapping and casting In-Reply-To: References: <20140417160151.1e6bcc3c@...3316...> Message-ID: <20140418001043.45dfdfbe@...3316...> Em Thu, 17 Apr 2014 21:13:41 +0200 Fabien Bodard escreveu: > Well ... I'm surely not good as you are but I didn't understand the > meanning of castup or down... What is it for ? Let me give you an abstract example. Suppose we have the class 'SuperClass' which implements the function 'Frobnicate' that has the following signature: Static Public Function Frobnicate(hSuperClass As SuperClass) \ As SuperClass Suppose now that we've extended our original class, and thus derived the class 'SubClass', and let 'hSubClass' be any object thereof. Suppose the function 'Frobnicate' was not overridden and that 'SuperClass.Frobnicate(hSubClass)' is generally not that useful because the implicit identity casting doesn't generate a very meaningful 'SuperClass' object for the problem at hand. However, we have a much more interesting idea than the interpreter of how to map 'SubClass' objects to meaningful and useful 'SuperClass' objects. Here the proposed special method '_castUp' comes in hand. We add it to the code of 'SubClass' in order to do the desired up-cast automatically: Static Public Function _castUp(hSubClass As SubClass) As SuperClass ' Do a magical conversion using arbitrary processing in accordance ' with our idea of a canonical map from 'SubClass' to 'SuperClass'. End Now when the interpreter evaluates the expression 'SuperClass.Frobnicate(hSubClass)' it'll notice there is an up-cast method and then it'll give this precedence over the implicit identity casting. Now we have a meaningful object to work with! The '_castDown' special method works analogously but the other way around. The only major difference is that the interpreter doesn't have a standard implicit identity cast in this direction and therefore raises an error when one tries to use a 'SuperClass' object in a 'SubClass' context. The main point to emphasize here is that we are interested in non-trivial castings. Therefore, we need it both directions and identity casts (the copy of common properties) doesn't suffice. Hope it helps. Happy Hacking! -- ,= ,-_-. =. Bruno F?lix Rezende Ribeiro (oitofelix) [0x28D618AF] ((_/)o o(\_)) There is no system but GNU; `-'(. .)`-' GNU Linux-Libre is one of its official kernels; \_/ All software must be free as in freedom; -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 490 bytes Desc: not available URL: From taboege at ...626... Sat Apr 19 00:59:03 2014 From: taboege at ...626... (Tobias Boege) Date: Sat, 19 Apr 2014 00:59:03 +0200 Subject: [Gambas-user] Inheriting, wrapping and casting In-Reply-To: <20140417160151.1e6bcc3c@...3316...> References: <20140417160151.1e6bcc3c@...3316...> Message-ID: <20140418225903.GD507@...2774...> On Thu, 17 Apr 2014, Bruno F??lix Rezende Ribeiro wrote: > Hello Gambas fellows! > > Suppose we are overriding the class 'Variant[]' to add the event > 'Update' which will be raised after the completion of any method which > could possibly modify the array structure. In particular, we need > to override appropriately any function that happens to do so. For > exposition purposes let's consider the 'Extract' function, which removes > one or more elements from the array and returns them. It's signature > is as follow: > > Public Function Extract(iStart As Integer, \ > Optional iLength As Integer) As Variant[] > > Our inherited class has, hence, to override this function with another > of the exact same signature, by Gambas' rules. However, it doesn't > make sense to return an object of the base class, while the operation > is executed by a derived class over an object thereof. > > It seems there is no easy or natural way around it. We could declare a > second extraction function for the derived class named after a different > symbol like "ExtractDerived", but we'd break the interface, what isn't > a desired outcome. > > Another approach would be to forget this particular base class and go > upwards until there is no possible conflicting functions and to inherit > from there, what happens to be in this case the immediate base class of > 'Variant[]' called "Array". However, we'd have to re-implement large > portions of the 'Variant[]' class, that could otherwise be immediately > deployed if not by our particular design problem at hand. > > One last, and arguably more reasonable, approach is to give up the > syntactical native language's feature of inheritance --- and its useful > properties -- and to define a dedicated container base class, which > inherits from nowhere, semantically wrapping all functionality of the > class 'Variant[]'. It'd work as a layer for accessing the underlying > variant array which would be stored in a private variable and isolated > from the outside world, i.e., not directly accessible by any property. > The only way to modify the array's content would be to use the > class' interface which would mimic that of 'Variant[]'. > > As we've seen, there is no way if not by modifications of the > interpreter's very core. Thus, I'd like to know why Gambas enforces > the signature of functions onwards inherited classes. If not by > technical reasons, but only for methodological consistency requirements, > I'd like to suggest that we make it, at least, allows to use the > inherited class in place of the parent class within method signatures. > Personally, I'd find yet more useful if there were no restriction at > all. > > A very interesting and useful feature, related but independent of this > suggestion, is that the interpreter could take care of casting objects > in both directions in an hierarchy of classes. In order to accomplish > it, there would be introduced two special methods which would be > implemented in any class the programmer deems them meaningful and > useful: '_castUp' and '_castDown', for casting an object from the > inherited to the parent class, and from the parent to the inherited > class, respectively. Being 'ThisClass' the inherited class and > 'UpClass' its parent, the special methods signatures would be: > > Static Public Function _castUp (hThisClass As ThisClass) As UpClass > Static Public Function _castDown (hUpClass As UpClass) As ThisClass > > The job of the interpreter would be to call these functions, in a > possible chain, to cast automatically upside or downside every time an > object of certain class is used in a context that requires an object of > another class but in the same hierarchy. > Hmm. I hacked the interpreter today - just to get a better idea of what is going on in this case - and my patched gbx3 now accepts that you substitute, e.g. VariantArray for Variant[] in the signature of VariantArray.Extract() (of course, VariantArray Inherits Variant[]). Generally, if you override a class' method or property, you can substitute any class farther up the inheritance hierarchy with the overriding class. Here is a slightly related post by Benoit about signature checks[0] but I don't know if the reasoning applies to inherited classes, too... but continue reading: After I got the signature accepted, there were type conversion problems when I tried to convert the return value of Super.Extract(), which is Variant[], as a VariantArray. I hacked that away too in the two possible ways: (1) When VariantArray = Variant[], leave the value be a Variant[] behind the scenes. This imposed the problem that a subsequent call to Extract() would use Variant[]'s version and thus make the object useless (e.g. no Update events anymore). (2) When VariantArray = Variant[], I told the type system that the Variant[] is legally a VariantArray and that made the interpreter segfault deep inside its gears (which was expected). So there must be some serious technical reason against that. But only Benoit can tell us the truth. We could circumvent that crash when we simply disallowed that conversion and had a method that would create a VariantArray from a Variant[], by copying elements. There is a _convert interface available for native classes (those written in C/C++) to convert an object into another one of a different class. That this is unavailable to Gambas programmers has obvious technical reasons. But the one _convert() implementation I looked at (in gb.clipper), did the same: it created a new object of the destination type and copied the relevant parts of itself into that new object. Regards, Tobi [0] http://sourceforge.net/p/gambas/mailman/message/30783547/ PS: I know that this post doesn't really show any results but it took me some hours to get all the stuff done to write it so I feel that I deserved to send it :-) -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From taboege at ...626... Sat Apr 19 01:07:21 2014 From: taboege at ...626... (Tobias Boege) Date: Sat, 19 Apr 2014 01:07:21 +0200 Subject: [Gambas-user] Inheriting, wrapping and casting In-Reply-To: <20140418225903.GD507@...2774...> References: <20140417160151.1e6bcc3c@...3316...> <20140418225903.GD507@...2774...> Message-ID: <20140418230721.GE507@...2774...> On Sat, 19 Apr 2014, Tobias Boege wrote: > We could circumvent that crash when we simply disallowed that conversion and > had a method that would create a VariantArray from a Variant[], by copying > elements. > Oh, I forgot to ask: do you want the patch that allows inheritance- compatible[*] classes to be used in place of a class in method and property signatures to test the above approach - even if it's unlikely that it goes mainline? [*] Inheritance-compatibility is an antisymmetrical relation! -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From oitofelix at ...181... Sat Apr 19 07:12:45 2014 From: oitofelix at ...181... (Bruno =?UTF-8?B?RsOpbGl4?= Rezende Ribeiro) Date: Sat, 19 Apr 2014 02:12:45 -0300 Subject: [Gambas-user] Inheriting, wrapping and casting In-Reply-To: <20140418230721.GE507@...2774...> References: <20140417160151.1e6bcc3c@...3316...> <20140418225903.GD507@...2774...> <20140418230721.GE507@...2774...> Message-ID: <20140419021245.269353d3@...3316...> Em Sat, 19 Apr 2014 01:07:21 +0200 Tobias Boege escreveu: > Oh, I forgot to ask: do you want the patch that allows inheritance- > compatible[*] classes to be used in place of a class in method and > property signatures to test the above approach - even if it's > unlikely that it goes mainline? Sure! Reading [1] and [2], it seems that the main technical reason Gambas doesn't support overriding signatures within inherited classes is an optimization. IMHO, the only way to justify such a restriction on functionality is if the table symbol lookup were impracticably slow. I'm usually much more concerned about powerfulness than speed. I think one language like Gambas should have its generality and expressiveness maximized to the extent that its execution speed stays reasonable. I really like the "freedom" of choosing how to structure my code. The idea that the interpreter is passive about my natural and intuitive programming creative process, as long it's still logically consistent, is priceless. Paraphrasing "The GNU Coding Standards"[3]: The interpreter should be your servant, not your master. Thank you very much for your efforts coding on the interpreter. Footnotes: [1] http://sourceforge.net/p/gambas/mailman/message/30783547/ [2] http://code.google.com/p/gambas/issues/detail?id=78 [3] http://www.gnu.org/prep/standards/html_node/index.html -- ,= ,-_-. =. Bruno F?lix Rezende Ribeiro (oitofelix) [0x28D618AF] ((_/)o o(\_)) There is no system but GNU; `-'(. .)`-' GNU Linux-Libre is one of its official kernels; \_/ All software must be free as in freedom; -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 490 bytes Desc: not available URL: From gambas.fr at ...626... Sat Apr 19 10:54:20 2014 From: gambas.fr at ...626... (Fabien Bodard) Date: Sat, 19 Apr 2014 10:54:20 +0200 Subject: [Gambas-user] Inheriting, wrapping and casting In-Reply-To: <20140419021245.269353d3@...3316...> References: <20140417160151.1e6bcc3c@...3316...> <20140418225903.GD507@...2774...> <20140418230721.GE507@...2774...> <20140419021245.269353d3@...3316...> Message-ID: You will have to wait alf a week to get Benoit's answer :-). It's an old limitation, but i remember when it was not. 2014-04-19 7:12 GMT+02:00 Bruno F?lix Rezende Ribeiro : > Em Sat, 19 Apr 2014 01:07:21 +0200 > Tobias Boege escreveu: > >> Oh, I forgot to ask: do you want the patch that allows inheritance- >> compatible[*] classes to be used in place of a class in method and >> property signatures to test the above approach - even if it's >> unlikely that it goes mainline? > > Sure! Reading [1] and [2], it seems that the main technical reason > Gambas doesn't support overriding signatures within inherited classes > is an optimization. IMHO, the only way to justify such a restriction on > functionality is if the table symbol lookup were impracticably slow. > I'm usually much more concerned about powerfulness than speed. I > think one language like Gambas should have its generality and > expressiveness maximized to the extent that its execution speed stays > reasonable. I really like the "freedom" of choosing how to > structure my code. The idea that the interpreter is passive about my > natural and intuitive programming creative process, as long it's still > logically consistent, is priceless. Paraphrasing "The GNU Coding > Standards"[3]: > > The interpreter should be your servant, not your master. > > > Thank you very much for your efforts coding on the interpreter. > > > Footnotes: > > [1] http://sourceforge.net/p/gambas/mailman/message/30783547/ > [2] http://code.google.com/p/gambas/issues/detail?id=78 > [3] http://www.gnu.org/prep/standards/html_node/index.html > > -- > ,= ,-_-. =. Bruno F?lix Rezende Ribeiro (oitofelix) [0x28D618AF] > ((_/)o o(\_)) There is no system but GNU; > `-'(. .)`-' GNU Linux-Libre is one of its official kernels; > \_/ All software must be free as in freedom; > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > http://p.sf.net/sfu/NeoTech > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Fabien Bodard From taboege at ...626... Sat Apr 19 20:40:39 2014 From: taboege at ...626... (Tobias Boege) Date: Sat, 19 Apr 2014 20:40:39 +0200 Subject: [Gambas-user] Inheriting, wrapping and casting In-Reply-To: <20140419021245.269353d3@...3316...> References: <20140417160151.1e6bcc3c@...3316...> <20140418225903.GD507@...2774...> <20140418230721.GE507@...2774...> <20140419021245.269353d3@...3316...> Message-ID: <20140419184039.GB800@...2774...> On Sat, 19 Apr 2014, Bruno F??lix Rezende Ribeiro wrote: > Em Sat, 19 Apr 2014 01:07:21 +0200 > Tobias Boege escreveu: > > > Oh, I forgot to ask: do you want the patch that allows inheritance- > > compatible[*] classes to be used in place of a class in method and > > property signatures to test the above approach - even if it's > > unlikely that it goes mainline? > > Sure! Attached. But be warned (again?): the interpreter is actually not my business. Virtually, I don't even know what I've done to the code as an entire with my patch but it worked in the single test case I had. I tested code like this to have VariantArray implement Extract() and it succeeded: Public Sub Extract(Start As Integer, Optional Length As Integer = 1) As VariantArray Dim hNew As New VariantArray Dim vElt As Variant For Each vElt in Super.Extract(Start, Length) hNew.Add(vElt) Next Raise ExtractEvent Return hNew End Note that VariantArray.Extract(), just like Variant[].Extract(), returns a new object which has, by default, no event name. So don't be surprised if the returned object doesn't fire any events. You have to manually assign it to an event observer using Object.Attach(). Another reason against giving events to data containers ;-) > > Thank you very much for your efforts coding on the interpreter. Well, that's pretty much the only thing I can do when Benoit is not around to answer those core questions (which is seldom the case anyway). Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk -------------- next part -------------- A non-text attachment was scrubbed... Name: looser-inheritance-signature-checking.patch Type: text/x-diff Size: 997 bytes Desc: not available URL: From kevinfishburne at ...1887... Sun Apr 20 07:02:17 2014 From: kevinfishburne at ...1887... (Kevin Fishburne) Date: Sun, 20 Apr 2014 01:02:17 -0400 Subject: [Gambas-user] odd error message upon application close Message-ID: <535354D9.2080509@...1887...> After upgrading to the current daily build from the PPA, upgrading to Kubuntu 14.04 and changing NVIDIA binary drivers I began receiving the error message "*** Error in `Sanctimonia': double free or corruption (fasttop): 0x000000003723b250 ***" when the program closes. Any idea what this means, or what could be causing it? I think it may be related to which NVIDIA binary driver I'm using and OpenGL. No issues are occurring on the "server" portion of the application, which also uses OpenGL but runs on Kubuntu 13.10 and nvidia-319-updates. The "client" portion of the application is using nvidia-331.38. -- Kevin Fishburne Eight Virtues www: http://sales.eightvirtues.com e-mail: sales at ...1887... phone: (770) 853-6271 From vuott at ...325... Mon Apr 21 04:17:32 2014 From: vuott at ...325... (Ru Vuott) Date: Mon, 21 Apr 2014 03:17:32 +0100 (BST) Subject: [Gambas-user] Declaration and use of external functions contained in a Structure Message-ID: <1398046652.50689.YahooMailBasic@...3271...> Hello, I'm transporting a C code in Gambas that provides some functions of "Libvo-aacenc" API. The peculiar thing is that a "header" file of "Libvo-aacenc" provides functions "contained in a Structure" ! Here the declaration in "voAudio.h": typedef struct VO_AUDIO_CODECAPI { VO_U32 (VO_API * Init) (VO_HANDLE * phCodec, VO_AUDIO_CODINGTYPE vType, VO_CODEC_INIT_USERDATA * pUserData ); VO_U32 (VO_API * SetParam) (VO_HANDLE hCodec, VO_S32 uParamID, VO_PTR pData); ...and so on.... } ---------------------------------------------------------------- In the C code those functions are used as follows: ********** int main(int argc, char *argv[]) { ... VO_AUDIO_CODECAPI codec_api = { 0 }; ... ... ... codec_api.Init(&handle, VO_AUDIO_CodingAAC, &user_data); codec_api.SetParam(handle, VO_PID_AAC_ENCPARAM, ¶ms) .... .... ...etc... } ************* How should I declare in Gambas those external functions contained in the structure? ...as Pointer ? But "where" ? In a Structure ? EXTERN will not be used ? And then "how" do I use those functions in Gambas code ? Best regards vuott From taboege at ...626... Mon Apr 21 11:19:42 2014 From: taboege at ...626... (Tobias Boege) Date: Mon, 21 Apr 2014 11:19:42 +0200 Subject: [Gambas-user] Declaration and use of external functions contained in a Structure In-Reply-To: <1398046652.50689.YahooMailBasic@...3271...> References: <1398046652.50689.YahooMailBasic@...3271...> Message-ID: <20140421091942.GA512@...2774...> On Mon, 21 Apr 2014, Ru Vuott wrote: > Hello, > > I'm transporting a C code in Gambas that provides some functions of "Libvo-aacenc" API. > The peculiar thing is that a "header" file of "Libvo-aacenc" provides functions "contained in a Structure" ! > > Here the declaration in "voAudio.h": > > typedef struct VO_AUDIO_CODECAPI > { > > VO_U32 (VO_API * Init) (VO_HANDLE * phCodec, VO_AUDIO_CODINGTYPE vType, VO_CODEC_INIT_USERDATA * pUserData ); > > VO_U32 (VO_API * SetParam) (VO_HANDLE hCodec, VO_S32 uParamID, VO_PTR pData); > > ...and so on.... > > } > > > ---------------------------------------------------------------- > > > In the C code those functions are used as follows: > > ********** > int main(int argc, char *argv[]) { > > ... > VO_AUDIO_CODECAPI codec_api = { 0 }; > ... > ... > ... > > codec_api.Init(&handle, VO_AUDIO_CodingAAC, &user_data); > > codec_api.SetParam(handle, VO_PID_AAC_ENCPARAM, ¶ms) > > .... > .... > ...etc... > > } > ************* > > > How should I declare in Gambas those external functions contained in the structure? ...as Pointer ? But "where" ? In a Structure ? EXTERN will not be used ? > Declaration is easy: Public Struct VoAudioCodecApi MyCallback As Pointer ' ... End Struct To initialise those callback fields, Gambas needs to know with what you initialise them, so you will need to declare those functions as Extern. Generally, it's OK to have functions assigned to Pointer fields in Structs. > And then "how" do I use those functions in Gambas code ? > You can't (AFAICS!). The only two things you can "call" in Gambas are objects that implement a _call() method or methods of objects (or intrinsic functions which are actually methods of a special hidden object). And Struct fields are neither. However, you could pass that structure to a C library which would be able to call either function type (C or Gambas) successfully but I think you already know that. Therefore, if you don't want to or cannot write a component for what you are doing, you could at least write a little component to work around this limitation: one that calls function pointers for you. That's at least the only solution I can think of... Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From gambas at ...1... Tue Apr 22 11:50:45 2014 From: gambas at ...1... (=?ISO-8859-1?Q?Beno=EEt_Minisini?=) Date: Tue, 22 Apr 2014 11:50:45 +0200 Subject: [Gambas-user] Advising methods of non-fixed argument tuple in a parent class In-Reply-To: <20140414225605.1f499874@...3316...> References: <20140414225605.1f499874@...3316...> Message-ID: <53563B75.1070408@...1...> Le 15/04/2014 03:56, Bruno F?lix Rezende Ribeiro a ?crit : > Hello all! > > Suppose we want an array of variants which has the nice property of > raising an event after any modification, like addition or removal of > ... Hi, I have just came back from "holidays", and I haven't read all the pending mails yet. I just want to say that if you have problem with Gambas inheritance and "SUPER" limitations, you can replace inheritance by "composition". I mean : instead of inheriting "Variant[]" or reimplementing it, you can create your own "MyVariantArray" class that embeds a Variant array as a private dynamic variable. Then you will be able to do almost everything you need. Another point: It's not a good idea to reimplement native array classes. These classes must be as fast as possible, they are used everywhere. I don't think that you need an "Update" event for every array in your application, do you? Regards, -- Beno?t Minisini From oitofelix at ...181... Tue Apr 22 17:28:41 2014 From: oitofelix at ...181... (Bruno =?UTF-8?B?RsOpbGl4?= Rezende Ribeiro) Date: Tue, 22 Apr 2014 12:28:41 -0300 Subject: [Gambas-user] Advising methods of non-fixed argument tuple in a parent class In-Reply-To: <53563B75.1070408@...1...> References: <20140414225605.1f499874@...3316...> <53563B75.1070408@...1...> Message-ID: <20140422122841.6845d50c@...3316...> Em Tue, 22 Apr 2014 11:50:45 +0200 Beno?t Minisini escreveu: > I have just came back from "holidays", and I haven't read all the > pending mails yet. > > I just want to say that if you have problem with Gambas inheritance > and "SUPER" limitations, you can replace inheritance by "composition". > > I mean : instead of inheriting "Variant[]" or reimplementing it, you > can create your own "MyVariantArray" class that embeds a Variant > array as a private dynamic variable. Then you will be able to do > almost everything you need. Indeed, "composition" is the best option given the current situation. Wise advice. Correct if I'm wrong, but I think that is best exploited when using '_unknown' and '_property' special methods to transparently deliver any method or property request directly to the private dynamic array. This way one don't have to wrap every possible array method or property and the class can be made agnostic of array type. > Another point: It's not a good idea to reimplement native array > classes. These classes must be as fast as possible, they are used > everywhere. I don't think that you need an "Update" event for every > array in your application, do you? No, I don't. It's a very specific use case. Thank you. Happy Hacking! -- ,= ,-_-. =. Bruno F?lix Rezende Ribeiro (oitofelix) [0x28D618AF] ((_/)o o(\_)) There is no system but GNU; `-'(. .)`-' GNU Linux-Libre is one of its official kernels; \_/ All software must be free as in freedom; -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 490 bytes Desc: not available URL: From pata.karlsson at ...626... Wed Apr 23 16:17:55 2014 From: pata.karlsson at ...626... (Patrik Karlsson) Date: Wed, 23 Apr 2014 16:17:55 +0200 Subject: [Gambas-user] .gitignore for a Gambas project Message-ID: Hi, What should a .gitignore look like? The one I am using contains: .lock *~ *.gambas .settings /Patrik From gambas at ...2524... Wed Apr 23 17:14:48 2014 From: gambas at ...2524... (gambas at ...2524...) Date: Wed, 23 Apr 2014 15:14:48 +0000 Subject: [Gambas-user] Issue 522 in gambas: Panels do not capture keypress events Message-ID: <0-6813199134517018827-8658170024389030899-gambas=googlecode.com@...2524...> Status: New Owner: ---- Labels: Version Type-Bug Priority-Medium OpSys-Any Dist-Any Arch-Any Desktop-Any GUI-Any New issue 522 by computer... at ...626...: Panels do not capture keypress events http://code.google.com/p/gambas/issues/detail?id=522 1) Describe the problem. Panels do not capture keypress events like Enter or Insert. This is unexpected behaviour. 2) Version information Version: 3.5.2 Operating system: Linux (Manjaro) GUI component: QT4 / GTK+ (generic GUI component) Desktop used: Xfce 3) Provide a little project that reproduces the bug or the crash. Public Sub Panel1_KeyPress() If Key.Code = Key.Enter Then Message("test") Endif End -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings From pata.karlsson at ...626... Wed Apr 23 17:38:49 2014 From: pata.karlsson at ...626... (Patrik Karlsson) Date: Wed, 23 Apr 2014 17:38:49 +0200 Subject: [Gambas-user] Music.Length part 2 Message-ID: Hi, it's almost 6 years since I wrote the first post [1] regarding Music.Length I recently picked up Gambas again and I am about to finish this little project now. :) As far as I can tell, there is still no easy "Gambas way" to get the length of an audio file, right? Would it be possible to implement such a function now? It would be really nice to have Music.Play return the length in seconds as float and a pure Music.Length function. In the previous thread I got some answers regarding command line tools, but in this case my audio files are bundled in the project. /patrik [1] http://sourceforge.net/p/gambas/mailman/gambas-user/thread/577069a50806200210i701ff536pf4e655c4cfc45ff9%40mail.gmail.com/#msg19733859 From gambas at ...1... Wed Apr 23 17:51:14 2014 From: gambas at ...1... (=?ISO-8859-1?Q?Beno=EEt_Minisini?=) Date: Wed, 23 Apr 2014 17:51:14 +0200 Subject: [Gambas-user] Music.Length part 2 In-Reply-To: References: Message-ID: <5357E172.2080405@...1...> Le 23/04/2014 17:38, Patrik Karlsson a ?crit : > Hi, > > it's almost 6 years since I wrote the first post [1] regarding Music.Length > I recently picked up Gambas again and I am about to finish this little > project now. :) > > As far as I can tell, there is still no easy "Gambas way" to get the length > of an audio file, right? > > Would it be possible to implement such a function now? > It would be really nice to have Music.Play return the length in seconds as > float and a pure Music.Length function. > > In the previous thread I got some answers regarding command line tools, but > in this case my audio files are bundled in the project. > > /patrik > > [1] > http://sourceforge.net/p/gambas/mailman/gambas-user/thread/577069a50806200210i701ff536pf4e655c4cfc45ff9%40mail.gmail.com/#msg19733859 You should use the gb.media component instead. Look at the "MediaPlayer" example, it displays the length of the video/audio file it plays. I admit that playing a file to know its length is a bit stupid. It should be possible to create a GStreamer pipe to just know the length of a multimedia file without playing it. -- Beno?t Minisini From taboege at ...626... Wed Apr 23 17:59:08 2014 From: taboege at ...626... (Tobias Boege) Date: Wed, 23 Apr 2014 17:59:08 +0200 Subject: [Gambas-user] .gitignore for a Gambas project In-Reply-To: References: Message-ID: <20140423155908.GC471@...2774...> On Wed, 23 Apr 2014, Patrik Karlsson wrote: > Hi, > > What should a .gitignore look like? > > The one I am using contains: > .lock > *~ > *.gambas > .settings > You can also safely ignore .action .directory .icon.png .startup as they can (and will) be regenerated by the IDE. You should ignore .gambas which contains compiled files. I'm not sure about .lang. Some of the files in there are surely also compiled out of other ones... Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From taboege at ...626... Wed Apr 23 18:18:34 2014 From: taboege at ...626... (Tobias Boege) Date: Wed, 23 Apr 2014 18:18:34 +0200 Subject: [Gambas-user] .gitignore for a Gambas project In-Reply-To: <20140423155908.GC471@...2774...> References: <20140423155908.GC471@...2774...> Message-ID: <20140423161834.GD471@...2774...> On Wed, 23 Apr 2014, Tobias Boege wrote: > On Wed, 23 Apr 2014, Patrik Karlsson wrote: > > Hi, > > > > What should a .gitignore look like? > > > > The one I am using contains: > > .lock > > *~ > > *.gambas > > .settings > > > > You can also safely ignore > > .action > .directory > .icon.png > .startup > Hum, of course, you shouldn't ignore .icon.png if you have set a special project icon (not the default one). -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From gambas at ...1... Wed Apr 23 18:32:11 2014 From: gambas at ...1... (=?ISO-8859-1?Q?Beno=EEt_Minisini?=) Date: Wed, 23 Apr 2014 18:32:11 +0200 Subject: [Gambas-user] .gitignore for a Gambas project In-Reply-To: References: Message-ID: <5357EB0B.1070508@...1...> Le 23/04/2014 16:17, Patrik Karlsson a ?crit : > Hi, > > What should a .gitignore look like? > > The one I am using contains: > .lock > *~ > *.gambas > .settings > > /Patrik Look at the Project.CleanUp() method in the IDE source code. That method removes all files that must not be controlled by subversion (and so git). Regards, -- Beno?t Minisini From gambas at ...2524... Wed Apr 23 19:20:25 2014 From: gambas at ...2524... (gambas at ...2524...) Date: Wed, 23 Apr 2014 17:20:25 +0000 Subject: [Gambas-user] Issue 523 in gambas: MediaPlayer example will not start on Elementary OS Luna GStreamer-CRITICAL Message-ID: <0-6813199134517018827-5376211475307414538-gambas=googlecode.com@...2524...> Status: New Owner: ---- Labels: Version-3.5.3 Type-Bug Priority-Medium OpSys-Any Dist-Any Arch-Any Desktop-Any GUI-Any New issue 523 by pata.kar... at ...626...: MediaPlayer example will not start on Elementary OS Luna GStreamer-CRITICAL http://code.google.com/p/gambas/issues/detail?id=523 1) Describe the problem. MediaPlayer example will not start. (MediaPlayer:5572): GStreamer-CRITICAL **: gst_element_set_state: assertion `GST_IS_ELEMENT (element)' failed 2) GIVE THE FOLLOWING INFORMATIONS (if they are appropriate): [System] Gambas=3.5.3 OperatingSystem=Linux Kernel=3.2.0-60-generic Architecture=x86_64 Distribution=elementary OS Luna Desktop=GNOME Theme=QGtk Language=C Memory=15991M [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.8.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 3) Provide a little project that reproduces the bug or the crash. MediaPlayer 3.4.90 5) Explain clearly how to reproduce the bug or the crash. Run MediaPlayer example on elementary OS Luna. It works just fine on NetRunner 13.12. -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings From vuott at ...325... Wed Apr 23 20:35:27 2014 From: vuott at ...325... (Ru Vuott) Date: Wed, 23 Apr 2014 19:35:27 +0100 (BST) Subject: [Gambas-user] Music.Length part 2 In-Reply-To: <5357E172.2080405@...1...> Message-ID: <1398278127.92963.YahooMailBasic@...3275...> ...he could get the audio file duration by using external resources of API SMPEG: ************************************************ Public Struct SMPEG_Info has_audio As Integer has_video As Integer width As Integer height As Integer current_frame As Integer current_fps As Float audio_string[80] As Byte audio_current_frame As Integer current_offset As Integer total_size As Integer current_time As Float total_time As Float End Struct Library "libsmpeg-0.4:0.1.4" Private Const audio As Integer = 1 ' SMPEG* SMPEG_new(const char *file, SMPEG_Info* info, int sdl_audio) ' Create a new SMPEG object from an MPEG file. This function returns a new SMPEG object. Private Extern SMPEG_new(file$ As String, infoP As SMPEG_Info, sdl_audio As Integer) As Pointer ' void SMPEG_delete( SMPEG* mpeg ) ' Delete an SMPEG object Private Extern SMPEG_delete(mp As Pointer) Public Sub Main() Dim info As New SMPEG_Info Dim smpeg As Pointer Dim fileMP3 As String fileMP3 = "/path/of/my/file.mp3" smpeg = SMPEG_new(fileMP3, info, audio) With info If .has_audio = 0 Then Error.Raise("Error: unable to load the file !") Print "Audio file: "; File.Name(fileMP3) Print "Principal characteristics: "; .audio_string.ToString() Print "Size: "; .total_size; " byte" Print "DURATION: "; Date(0, 0, 0, 0, 0, 0, .total_time * 1000) End With ' ...closing: SMPEG_delete(smpeg) End ********************************************** Regards vuottttttt -------------------------------------------- Mer 23/4/14, Beno?t Minisini ha scritto: Oggetto: Re: [Gambas-user] Music.Length part 2 A: "mailing list for gambas users" Data: Mercoled? 23 Aprile 2014, 17:51 Le 23/04/2014 17:38, Patrik Karlsson a ?crit : > Hi, > > it's almost 6 years since I wrote the first post [1] regarding Music.Length > I recently picked up Gambas again and I am about to finish this little > project now. :) > > As far as I can tell, there is still no easy "Gambas way" to get the length > of an audio file, right? > > Would it be possible to implement such a function now? > It would be really nice to have Music.Play return the length in seconds as > float and a pure Music.Length function. > > In the previous thread I got some answers regarding command line tools, but > in this case my audio files are bundled in the project. > > /patrik > > [1] > http://sourceforge.net/p/gambas/mailman/gambas-user/thread/577069a50806200210i701ff536pf4e655c4cfc45ff9%40mail.gmail.com/#msg19733859 You should use the gb.media component instead. Look at the "MediaPlayer" example, it displays the length of the video/audio file it plays. I admit that playing a file to know its length is a bit stupid. It should be possible to create a GStreamer pipe to just know the length of a multimedia file without playing it. -- Beno?t Minisini ------------------------------------------------------------------------------ Start Your Social Network Today - Download eXo Platform Build your Enterprise Intranet with eXo Platform Software Java Based Open Source Intranet - Social, Extensible, Cloud Ready Get Started Now And Turn Your Intranet Into A Collaboration Platform http://p.sf.net/sfu/ExoPlatform _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From epost at ...3323... Wed Apr 23 23:13:58 2014 From: epost at ...3323... (=?ISO-8859-1?Q?J=F8rn_Erik_M=F8rne?=) Date: Wed, 23 Apr 2014 23:13:58 +0200 Subject: [Gambas-user] TreeView: Change parent key Message-ID: <53582D16.2030008@...3323...> Hi! Is there a way with the TreeView component to change an item's parent key? Now, I have to clear out all elements, and reload them each time I want to move an item to another parent, and this also resets the current opened/closed status of each item, which clutters the users's experience a bit. Perhaps there's a good way I haven't thought of? Regards, Erik From gambas at ...2524... Thu Apr 24 00:20:33 2014 From: gambas at ...2524... (gambas at ...2524...) Date: Wed, 23 Apr 2014 22:20:33 +0000 Subject: [Gambas-user] Issue 520 in gambas: System.DataTypes is writeable In-Reply-To: <0-6813199134517018827-4762429888877162900-gambas=googlecode.com@...2524...> References: <0-6813199134517018827-4762429888877162900-gambas=googlecode.com@...2524...> Message-ID: <1-6813199134517018827-4762429888877162900-gambas=googlecode.com@...2524...> Updates: Status: Accepted Labels: -Version Version-3.5.0 Comment #1 on issue 520 by benoit.m... at ...626...: System.DataTypes is writeable http://code.google.com/p/gambas/issues/detail?id=520 The property is read-only, but not the returned array. Because it is created once, and because there is no read-only array datatype in Gambas. I have no good solution at the moment. I can modify the property so that it always create a new array. -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings From gambas at ...2524... Thu Apr 24 00:24:13 2014 From: gambas at ...2524... (gambas at ...2524...) Date: Wed, 23 Apr 2014 22:24:13 +0000 Subject: [Gambas-user] Issue 522 in gambas: Panels do not capture keypress events In-Reply-To: <0-6813199134517018827-8658170024389030899-gambas=googlecode.com@...2524...> References: <0-6813199134517018827-8658170024389030899-gambas=googlecode.com@...2524...> Message-ID: <1-6813199134517018827-8658170024389030899-gambas=googlecode.com@...2524...> Updates: Status: NeedsInfo Labels: -Version Version-3.5.0 Comment #1 on issue 522 by benoit.m... at ...626...: Panels do not capture keypress events http://code.google.com/p/gambas/issues/detail?id=522 1) Please provide the information displayed by the "System information" menu in the Gambas IDE. 2) Does it works if you set a specific background color to the Panel? -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings From pinozollo at ...626... Thu Apr 24 04:02:53 2014 From: pinozollo at ...626... (Pino Zollo) Date: Wed, 23 Apr 2014 22:02:53 -0400 Subject: [Gambas-user] UCase$() Message-ID: <535870CD.1000100@...626...> UCase$() does not work with ? and accented vowels. Try this: Debug UCase$("?"), UCase$("?"), UCase$("?"), UCase$("?"), UCase$("?"), UCase$("?"), UCase$("?") Regards Pino From rmorgan62 at ...626... Thu Apr 24 04:20:00 2014 From: rmorgan62 at ...626... (Randall Morgan) Date: Wed, 23 Apr 2014 19:20:00 -0700 Subject: [Gambas-user] UCase$() In-Reply-To: <535870CD.1000100@...626...> References: <535870CD.1000100@...626...> Message-ID: This is not a bug as the docs say that Ucase$ does not work with UTF-8 string encoding. Try String.Ucase(). On Wed, Apr 23, 2014 at 7:02 PM, Pino Zollo wrote: > UCase$() does not work with ? and accented vowels. > > Try this: > > Debug UCase$("?"), UCase$("?"), UCase$("?"), UCase$("?"), UCase$("?"), > UCase$("?"), UCase$("?") > > > Regards > > Pino > > > ------------------------------------------------------------------------------ > Start Your Social Network Today - Download eXo Platform > Build your Enterprise Intranet with eXo Platform Software > Java Based Open Source Intranet - Social, Extensible, Cloud Ready > Get Started Now And Turn Your Intranet Into A Collaboration Platform > http://p.sf.net/sfu/ExoPlatform > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- If you ask me if it can be done. The answer is YES, it can always be done. The correct questions however are... What will it cost, and how long will it take? From epost at ...3323... Thu Apr 24 11:08:30 2014 From: epost at ...3323... (=?ISO-8859-1?Q?J=F8rn_Erik_M=F8rne?=) Date: Thu, 24 Apr 2014 11:08:30 +0200 Subject: [Gambas-user] Possible bug with the QT4 TextBox component Message-ID: <5358D48E.9090802@...3323...> Hi! I do believe the following is a bug: If you enable the QT4 components in Gambas, drop a TextBox and then run the project. Enter some words in the TextBox and set the marker at the very beginning. If you now hit CTRL+Backspace it will act as if the Delete button was clicked, that is; it will erase characters on its right... I frequently use the CTRL+Backspace/Delete to quickly remove whole words, but it seems if I am to eager in the programs I currently make with Gambas I take out too much :) I tested this with other QT/GTK applications not made in Gambas and they do not behave in the same way. Wishing you all a good day! From gambas at ...2524... Thu Apr 24 11:08:37 2014 From: gambas at ...2524... (gambas at ...2524...) Date: Thu, 24 Apr 2014 09:08:37 +0000 Subject: [Gambas-user] Issue 522 in gambas: Panels do not capture keypress events In-Reply-To: <1-6813199134517018827-8658170024389030899-gambas=googlecode.com@...2524...> References: <1-6813199134517018827-8658170024389030899-gambas=googlecode.com@...2524...> <0-6813199134517018827-8658170024389030899-gambas=googlecode.com@...2524...> Message-ID: <2-6813199134517018827-8658170024389030899-gambas=googlecode.com@...2524...> Comment #2 on issue 522 by computer... at ...626...: Panels do not capture keypress events http://code.google.com/p/gambas/issues/detail?id=522 1) System Information [System] Gambas=3.5.2 OperatingSystem=Linux Kernel=3.13.10-1-MANJARO Architecture=x86_64 Distribution=Manjaro Linux Desktop=XFCE Theme=QGtk Language=en_GB.UTF-8 Memory=7909M [Libraries] Cairo=libcairo.so.2.11200.16 Curl=libcurl.so.4.3.0 DBus=libdbus-1.so.3.8.3 GStreamer=libgstreamer-0.10.so.0.30.0 GStreamer=libgstreamer-1.0.so.0.203.0 GTK+=libgtk-x11-2.0.so.0.2400.22 OpenGL=libGL.so.1.2.0 Poppler=libpoppler.so.44.0.0 Qt4=libQtCore.so.4.8.5 SDL=libSDL-1.2.so.0.11.4 2) No, still no Message("test") on my screen. -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings From vuott at ...325... Thu Apr 24 16:55:54 2014 From: vuott at ...325... (Ru Vuott) Date: Thu, 24 Apr 2014 15:55:54 +0100 (BST) Subject: [Gambas-user] How to know how many pages a pdf file has. Message-ID: <1398351354.18942.YahooMailBasic@...3269...> Hello, I "suppose", to know how many pages a pdf file has, I should use this line: pdf.Index.Count Where pdf is a "PdfDocument". I do not know if I'm wrong, but I can not run that line. ************************************* Public Sub Form_Open() Dim index As Short = 1 Dim pdf As New PdfDocument Dim pc As Picture With pdf .Open("/path/of/my/file.pdf") If .Ready = True Then ' It loads first page: pc = pdf[1].Image.Picture PictureBox1.Picture = pc PictureBox1.Resize(pdf[1].Width, pdf[1].Height) Else Message.Error("Unable loading file pdf !") Quit Endif End With Print pdf.Index.Count ' <======= End **************************************************** I obtain at that line this error notice: " Null object " I do not understand.... Regards vuott From taboege at ...626... Thu Apr 24 17:11:34 2014 From: taboege at ...626... (Tobias Boege) Date: Thu, 24 Apr 2014 17:11:34 +0200 Subject: [Gambas-user] How to know how many pages a pdf file has. In-Reply-To: <1398351354.18942.YahooMailBasic@...3269...> References: <1398351354.18942.YahooMailBasic@...3269...> Message-ID: <20140424151134.GG512@...2774...> On Thu, 24 Apr 2014, Ru Vuott wrote: > Hello, > > I "suppose", to know how many pages a pdf file has, I should use this line: > > pdf.Index.Count > > Where pdf is a "PdfDocument". > > I do not know if I'm wrong, but I can not run that line. > > ************************************* > > Public Sub Form_Open() > > Dim index As Short = 1 > Dim pdf As New PdfDocument > Dim pc As Picture > > > With pdf > .Open("/path/of/my/file.pdf") > If .Ready = True Then > ' It loads first page: > pc = pdf[1].Image.Picture > > PictureBox1.Picture = pc > PictureBox1.Resize(pdf[1].Width, pdf[1].Height) > > Else > Message.Error("Unable loading file pdf !") > Quit > Endif > > End With > > Print pdf.Index.Count ' <======= > > End > > **************************************************** > > I obtain at that line this error notice: > " Null object " > > I do not understand.... > Have you tried PdfDocument.Count? :-) -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From gambas at ...1... Thu Apr 24 17:25:32 2014 From: gambas at ...1... (=?ISO-8859-1?Q?Beno=EEt_Minisini?=) Date: Thu, 24 Apr 2014 17:25:32 +0200 Subject: [Gambas-user] Inheriting, wrapping and casting In-Reply-To: <20140419184039.GB800@...2774...> References: <20140417160151.1e6bcc3c@...3316...> <20140418225903.GD507@...2774...> <20140418230721.GE507@...2774...> <20140419021245.269353d3@...3316...> <20140419184039.GB800@...2774...> Message-ID: <53592CEC.4040306@...1...> Le 19/04/2014 20:40, Tobias Boege a ?crit : > On Sat, 19 Apr 2014, Bruno F??lix Rezende Ribeiro wrote: >> Em Sat, 19 Apr 2014 01:07:21 +0200 >> Tobias Boege escreveu: >> >>> Oh, I forgot to ask: do you want the patch that allows inheritance- >>> compatible[*] classes to be used in place of a class in method and >>> property signatures to test the above approach - even if it's >>> unlikely that it goes mainline? >> >> Sure! > > Attached. But be warned (again?): the interpreter is actually not my > business. Virtually, I don't even know what I've done to the code as an > entire with my patch but it worked in the single test case I had. > > ... The patch seems valid. I must check that it breaks nothing else... -- Beno?t Minisini From vuott at ...325... Thu Apr 24 19:16:04 2014 From: vuott at ...325... (Ru Vuott) Date: Thu, 24 Apr 2014 18:16:04 +0100 (BST) Subject: [Gambas-user] How to know how many pages a pdf file has. In-Reply-To: <20140424151134.GG512@...2774...> Message-ID: <1398359764.56031.YahooMailBasic@...3273...> Hello Tobias, If I try with " PdfDocument.Count " I obtain this error: " PdfDocument.Count is not static " bye -------------------------------------------- Gio 24/4/14, Tobias Boege ha scritto: Oggetto: Re: [Gambas-user] How to know how many pages a pdf file has. A: "mailing list for gambas users" Data: Gioved? 24 Aprile 2014, 17:11 On Thu, 24 Apr 2014, Ru Vuott wrote: > Hello, > > I "suppose", to know how many pages a pdf file has, I should use this line: > >? ? ???pdf.Index.Count > > Where pdf is a "PdfDocument". > > I do not know if I'm wrong, but I can not run that line. > > ************************************* > > Public Sub Form_Open() > >? Dim index As Short = 1 >? Dim pdf As New PdfDocument >? Dim pc As Picture >??? >??? >???With pdf >? ? ???.Open("/path/of/my/file.pdf") >? ? ???If .Ready = True Then > ' It loads first page: >? ? ? pc = pdf[1].Image.Picture > >? ? ? PictureBox1.Picture = pc >? ? ? PictureBox1.Resize(pdf[1].Width, pdf[1].Height) > >???Else >? ? ? Message.Error("Unable loading file pdf !") >? ???Quit >???Endif >? >???End With >??? >???Print pdf.Index.Count? '? <======= >??? > End > > **************************************************** > > I obtain at that line this error notice: > " Null object " > > I do not understand.... > Have you tried PdfDocument.Count? :-) -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk ------------------------------------------------------------------------------ Start Your Social Network Today - Download eXo Platform Build your Enterprise Intranet with eXo Platform Software Java Based Open Source Intranet - Social, Extensible, Cloud Ready Get Started Now And Turn Your Intranet Into A Collaboration Platform http://p.sf.net/sfu/ExoPlatform _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From taboege at ...626... Thu Apr 24 19:22:00 2014 From: taboege at ...626... (Tobias Boege) Date: Thu, 24 Apr 2014 19:22:00 +0200 Subject: [Gambas-user] How to know how many pages a pdf file has. In-Reply-To: <1398359764.56031.YahooMailBasic@...3273...> References: <20140424151134.GG512@...2774...> <1398359764.56031.YahooMailBasic@...3273...> Message-ID: <20140424172200.GH512@...2774...> On Thu, 24 Apr 2014, Ru Vuott wrote: > Hello Tobias, > > If I try with " PdfDocument.Count " > I obtain this error: > > " PdfDocument.Count is not static " > > bye Of course, you need to ask an actual object of the PdfDocument class to give you its Count: Dim hPdfDocument As New PdfDocument ' Open your document Print hPdfDocument.Count -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From vuott at ...325... Thu Apr 24 19:47:09 2014 From: vuott at ...325... (Ru Vuott) Date: Thu, 24 Apr 2014 18:47:09 +0100 (BST) Subject: [Gambas-user] How to know how many pages a pdf file has. In-Reply-To: <20140424172200.GH512@...2774...> Message-ID: <1398361629.84388.YahooMailBasic@...3271...> I used " pdf As New PdfDocument ", .........but I saw you used: hPdfDocument.Count Instead I used: pdf.Index.Count So, now, if I use " pdf.Count ", it's OK. Well, Tobias, thank you. Solved. bye vuott -------------------------------------------- Gio 24/4/14, Tobias Boege ha scritto: Oggetto: Re: [Gambas-user] How to know how many pages a pdf file has. A: "mailing list for gambas users" Data: Gioved? 24 Aprile 2014, 19:22 On Thu, 24 Apr 2014, Ru Vuott wrote: > Hello Tobias, > > If I try with? " PdfDocument.Count " > I obtain this error: > > " PdfDocument.Count is not static " > > bye Of course, you need to ask an actual object of the PdfDocument class to give you its Count: ? Dim hPdfDocument As New PdfDocument ? ' Open your document ? Print hPdfDocument.Count -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk ------------------------------------------------------------------------------ Start Your Social Network Today - Download eXo Platform Build your Enterprise Intranet with eXo Platform Software Java Based Open Source Intranet - Social, Extensible, Cloud Ready Get Started Now And Turn Your Intranet Into A Collaboration Platform http://p.sf.net/sfu/ExoPlatform _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From willy at ...2734... Thu Apr 24 18:13:35 2014 From: willy at ...2734... (Willy Raets) Date: Thu, 24 Apr 2014 18:13:35 +0200 Subject: [Gambas-user] Problem getting ReportVBox visible/invisible depending on condition Message-ID: <1398356015.2329.16.camel@...3024...> Hi, I have this situation where I have a one paged report that selects a certain record from a database, shows this data in the upper part of the report and then needs to show one out of two ReportVBoxes below that data, depending on an argument passed when instantiating the report. I have attached a simplified project source with only the ReportVBoxes and no data. In the IDE design of the report both ReportVBoxes have their property visible set to false. In the preview they will always show up!!? Am I missing something, I have tried different approaches. Anybody any suggestions? -- Kind regards, Willy (aka gbWilly) http://gambasshowcase.org/ http://howtogambas.org http://gambos.org -------------- next part -------------- A non-text attachment was scrubbed... Name: ReportVBox-0.0.1.tar.gz Type: application/x-compressed-tar Size: 7170 bytes Desc: not available URL: From gambas.fr at ...626... Thu Apr 24 21:45:12 2014 From: gambas.fr at ...626... (Fabien Bodard) Date: Thu, 24 Apr 2014 21:45:12 +0200 Subject: [Gambas-user] Problem getting ReportVBox visible/invisible depending on condition In-Reply-To: <1398356015.2329.16.camel@...3024...> References: <1398356015.2329.16.camel@...3024...> Message-ID: i think i have forgotten to manage invisible case 2014-04-24 18:13 GMT+02:00 Willy Raets : > Hi, > > I have this situation where I have a one paged report that selects a > certain record from a database, shows this data in the upper part of the > report and then needs to show one out of two ReportVBoxes below that > data, depending on an argument passed when instantiating the report. > > I have attached a simplified project source with only the ReportVBoxes > and no data. > > In the IDE design of the report both ReportVBoxes have their property > visible set to false. In the preview they will always show up!!? > > Am I missing something, I have tried different approaches. Anybody any > suggestions? > > -- > Kind regards, > > Willy (aka gbWilly) > > http://gambasshowcase.org/ > http://howtogambas.org > http://gambos.org > > > > > ------------------------------------------------------------------------------ > Start Your Social Network Today - Download eXo Platform > Build your Enterprise Intranet with eXo Platform Software > Java Based Open Source Intranet - Social, Extensible, Cloud Ready > Get Started Now And Turn Your Intranet Into A Collaboration Platform > http://p.sf.net/sfu/ExoPlatform > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Fabien Bodard From gambas at ...1... Thu Apr 24 22:57:45 2014 From: gambas at ...1... (=?ISO-8859-1?Q?Beno=EEt_Minisini?=) Date: Thu, 24 Apr 2014 22:57:45 +0200 Subject: [Gambas-user] Inheriting, wrapping and casting In-Reply-To: <53592CEC.4040306@...1...> References: <20140417160151.1e6bcc3c@...3316...> <20140418225903.GD507@...2774...> <20140418230721.GE507@...2774...> <20140419021245.269353d3@...3316...> <20140419184039.GB800@...2774...> <53592CEC.4040306@...1...> Message-ID: <53597AC9.1040707@...1...> Le 24/04/2014 17:25, Beno?t Minisini a ?crit : > Le 19/04/2014 20:40, Tobias Boege a ?crit : >> On Sat, 19 Apr 2014, Bruno F??lix Rezende Ribeiro wrote: >>> Em Sat, 19 Apr 2014 01:07:21 +0200 >>> Tobias Boege escreveu: >>> >>>> Oh, I forgot to ask: do you want the patch that allows inheritance- >>>> compatible[*] classes to be used in place of a class in method and >>>> property signatures to test the above approach - even if it's >>>> unlikely that it goes mainline? >>> >>> Sure! >> >> Attached. But be warned (again?): the interpreter is actually not my >> business. Virtually, I don't even know what I've done to the code as an >> entire with my patch but it worked in the single test case I had. >> > > ... > > The patch seems valid. I must check that it breaks nothing else... > I fixed your patch, as it didn't work when using the "Object" datatype. You get it in revision #6249. Regards, -- Beno?t Minisini From oitofelix at ...181... Fri Apr 25 00:33:58 2014 From: oitofelix at ...181... (Bruno =?UTF-8?B?RsOpbGl4?= Rezende Ribeiro) Date: Thu, 24 Apr 2014 19:33:58 -0300 Subject: [Gambas-user] Inheriting, wrapping and casting In-Reply-To: <53597AC9.1040707@...1...> References: <20140417160151.1e6bcc3c@...3316...> <20140418225903.GD507@...2774...> <20140418230721.GE507@...2774...> <20140419021245.269353d3@...3316...> <20140419184039.GB800@...2774...> <53592CEC.4040306@...1...> <53597AC9.1040707@...1...> Message-ID: <20140424193358.643ff395@...3316...> Em Thu, 24 Apr 2014 22:57:45 +0200 Beno?t Minisini escreveu: > I fixed your patch, as it didn't work when using the "Object" > datatype. You get it in revision #6249. Thank you very much, Beno?t! -- ,= ,-_-. =. Bruno F?lix Rezende Ribeiro (oitofelix) [0x28D618AF] ((_/)o o(\_)) There is no system but GNU; `-'(. .)`-' GNU Linux-Libre is one of its official kernels; \_/ All software must be free as in freedom; -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 490 bytes Desc: not available URL: From gambas at ...1... Fri Apr 25 01:20:58 2014 From: gambas at ...1... (=?ISO-8859-1?Q?Beno=EEt_Minisini?=) Date: Fri, 25 Apr 2014 01:20:58 +0200 Subject: [Gambas-user] odd error message upon application close In-Reply-To: <535354D9.2080509@...1887...> References: <535354D9.2080509@...1887...> Message-ID: <53599C5A.9090808@...1...> Le 20/04/2014 07:02, Kevin Fishburne a ?crit : > After upgrading to the current daily build from the PPA, upgrading to > Kubuntu 14.04 and changing NVIDIA binary drivers I began receiving the > error message "*** Error in `Sanctimonia': double free or corruption > (fasttop): 0x000000003723b250 ***" when the program closes. Any idea > what this means, or what could be causing it? > > I think it may be related to which NVIDIA binary driver I'm using and > OpenGL. No issues are occurring on the "server" portion of the > application, which also uses OpenGL but runs on Kubuntu 13.10 and > nvidia-319-updates. The "client" portion of the application is using > nvidia-331.38. > Valgrind will tell you where exactly you have an illegal memory access that lead to heap corruption. -- Beno?t Minisini From willy at ...2734... Fri Apr 25 14:28:22 2014 From: willy at ...2734... (Willy Raets) Date: Fri, 25 Apr 2014 14:28:22 +0200 Subject: [Gambas-user] Problem getting ReportVBox visible/invisible depending on condition In-Reply-To: References: <1398356015.2329.16.camel@...3024...> Message-ID: <1398428902.2298.8.camel@...3024...> On Thu, 2014-04-24 at 21:45 +0200, Fabien Bodard wrote: > i think i have forgotten to manage invisible case That explains a lot, hope this will be fixed in Gambas 3.6 release ( as I understood that 3.5.x releases don't get all that is changed in trunk version). Meanwhile I'll have to think of another approach as the application goes into use (at work) before my summer vacation. > > 2014-04-24 18:13 GMT+02:00 Willy Raets : > > Hi, > > > > I have this situation where I have a one paged report that selects a > > certain record from a database, shows this data in the upper part of the > > report and then needs to show one out of two ReportVBoxes below that > > data, depending on an argument passed when instantiating the report. > > > > I have attached a simplified project source with only the ReportVBoxes > > and no data. > > > > In the IDE design of the report both ReportVBoxes have their property > > visible set to false. In the preview they will always show up!!? > > > > Am I missing something, I have tried different approaches. Anybody any > > suggestions? > > > > -- > > Kind regards, > > > > Willy (aka gbWilly) > > > > http://gambasshowcase.org/I guess the fix will be for Gambas 3.6, right? > > http://howtogambas.org > > http://gambos.org > > > > > > > > > > ------------------------------------------------------------------------------ > > Start Your Social Network Today - Download eXo Platform > > Build your Enterprise Intranet with eXo Platform Software > > Java Based Open Source Intranet - Social, Extensible, Cloud Ready > > Get Started Now And Turn Your Intranet Into A Collaboration Platform > > http://p.sf.net/sfu/ExoPlatform > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > > -- Kind regards, Willy (aka gbWilly) http://gambasshowcase.org/ http://howtogambas.org http://gambos.org From oitofelix at ...181... Sat Apr 26 05:57:00 2014 From: oitofelix at ...181... (Bruno =?UTF-8?B?RsOpbGl4?= Rezende Ribeiro) Date: Sat, 26 Apr 2014 00:57:00 -0300 Subject: [Gambas-user] Feature request: absolute C data type equivalents and native type aliasing Message-ID: <20140426005700.34831fd4@...3316...> Hello Gambas users and developers! I'm working on a module for Gambas, fully written in Gambas language, which aims to provide full access to the X Window System's Xlib library through a high-level Gambas-ish interface. I'm in the very beginning, but I've been making progress and so far I've implemented 9% of the features of the C language X interface as described in [1]. However, I'm facing a major problem that needs to be addressed before I get too far. Let's take a look at a particular instance of it. Various Xlib functions accept or return a C 'long' data-type parameter. GCC reports that on my x86 machine 'long' is 4 bytes wide while on my x86_64 machine it's 8 bytes wide instead. AFAIK, Gambas 'Integer' and 'Long' data-type are always 4 and 8 bytes wide, respectively, regardless of architecture. How can I cope with that when declaring external functions and structures? The only solution I could think of is to use Gambas' preprocessor directives, but it isn't practical to put a preprocessor conditional again and again every time I'm declaring something which uses the same C language type: I'd have to do that several hundreds of times! So, I'd suggest to provide absolute C data type equivalents to 'char', 'short', 'int', 'long', 'long long', 'float', 'double' and 'long double', so we could interface smoothly with C libraries and write robust and easy to maintain components for Gambas, entirely in Gambas language. In this case the C compiler would decide what's the wideness of each data type at Gambas' compilation time. One suggestion for their names is: "CChar", "CShort", "CInt", "CLong", "CLongLong", "CFloat", "CDouble" and "CLongDouble". This feature alone would be a great improvement, but not enough. Within C libraries it's a common practice to define conditionally new data types in terms of the native ones. In order to have a complete environment to interface with external libraries inside Gambas, we also need a way to make aliases to native Gambas' data types conditionally. It could well be a preprocessor facility, but that isn't required at all. I'd suggest something that looks like: #If ARCH = "x86" # AliasType("CLong", "XID") #Else # AliasType("CInt", "XID") #Endif #AliasType("XID", "WindowID") #AliasType("XID", "FontID") Thanks in advance. Footnotes: [1] http://www.x.org/releases/X11R7.7/doc/libX11/libX11/libX11.html [2] Like 'Window', 'Font', 'Pixmap', 'Colormap', 'Cursor' and 'GContext'. -- ,= ,-_-. =. Bruno F?lix Rezende Ribeiro (oitofelix) [0x28D618AF] ((_/)o o(\_)) There is no system but GNU; `-'(. .)`-' GNU Linux-Libre is one of its official kernels; \_/ All software must be free as in freedom; -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 490 bytes Desc: not available URL: From pata.karlsson at ...626... Sat Apr 26 06:57:07 2014 From: pata.karlsson at ...626... (Patrik Karlsson) Date: Sat, 26 Apr 2014 06:57:07 +0200 Subject: [Gambas-user] MaskBox.Mask Message-ID: Hi, today I am using TextBox_Change event to reject | characters. Public Sub txtName_Change() If String.InStr(Last.Text, "|") > 0 Then Last.Text = Replace(Last.Text, "|", "") Endif End I guess MaskBox can do this much simplier, but how, what Mask? /Patrik From pata.karlsson at ...626... Sat Apr 26 07:34:22 2014 From: pata.karlsson at ...626... (Patrik Karlsson) Date: Sat, 26 Apr 2014 07:34:22 +0200 Subject: [Gambas-user] Dialog on top of FullScreen window Message-ID: Hi, Im having a problem with displaying forms on top of my main form when it's in full screen mode, even though I have set Form.Stacking=Above for my dialog form and called it with ShowModal. How ever, I noticed that when I use Message.Info("This one stays on top") its all ok. Can I change some property of my form to make it behave like Message.Infos form? /Patrik From gambas at ...1... Sat Apr 26 13:06:27 2014 From: gambas at ...1... (=?ISO-8859-1?Q?Beno=EEt_Minisini?=) Date: Sat, 26 Apr 2014 13:06:27 +0200 Subject: [Gambas-user] Feature request: absolute C data type equivalents and native type aliasing In-Reply-To: <20140426005700.34831fd4@...3316...> References: <20140426005700.34831fd4@...3316...> Message-ID: <535B9333.7000806@...1...> Le 26/04/2014 05:57, Bruno F?lix Rezende Ribeiro a ?crit : > Hello Gambas users and developers! > > I'm working on a module for Gambas, fully written in Gambas language, > which aims to provide full access to the X Window System's Xlib library > through a high-level Gambas-ish interface. I'm in the very beginning, > but I've been making progress and so far I've implemented 9% of the > features of the C language X interface as described in [1]. I don't want to discourage you, but I think XLib will not be used anymore in a few years because of Wayland. :-/ > > However, I'm facing a major problem that needs to be addressed before > I get too far. Let's take a look at a particular instance of it. > Various Xlib functions accept or return a C 'long' data-type > parameter. GCC reports that on my x86 machine 'long' is 4 bytes wide > while on my x86_64 machine it's 8 bytes wide instead. AFAIK, Gambas > 'Integer' and 'Long' data-type are always 4 and 8 bytes wide, > respectively, regardless of architecture. How can I cope with that > when declaring external functions and structures? This is one of many design errors of XLib. Use the "Pointer" datatype each time you see a long. It has the same behaviour. > > The only solution I could think of is to use Gambas' preprocessor > directives, but it isn't practical to put a preprocessor > conditional again and again every time I'm declaring something > which uses the same C language type: I'd have to do that several > hundreds of times! So, I'd suggest to provide absolute C data type > equivalents to 'char', 'short', 'int', 'long', 'long long', 'float', > 'double' and 'long double', so we could interface smoothly with C > libraries and write robust and easy to maintain components for Gambas, > entirely in Gambas language. In this case the C compiler would decide > what's the wideness of each data type at Gambas' compilation time. > One suggestion for their names is: "CChar", "CShort", "CInt", "CLong", > "CLongLong", "CFloat", "CDouble" and "CLongDouble". > > This feature alone would be a great improvement, but not enough. Within > C libraries it's a common practice to define conditionally new data > types in terms of the native ones. In order to have a complete > environment to interface with external libraries inside Gambas, we also > need a way to make aliases to native Gambas' data types conditionally. > It could well be a preprocessor facility, but that isn't required at > all. I'd suggest something that looks like: > > #If ARCH = "x86" > # AliasType("CLong", "XID") > #Else > # AliasType("CInt", "XID") > #Endif > #AliasType("XID", "WindowID") > #AliasType("XID", "FontID") > > > Thanks in advance. > > > Footnotes: > > [1] http://www.x.org/releases/X11R7.7/doc/libX11/libX11/libX11.html > [2] Like 'Window', 'Font', 'Pixmap', 'Colormap', 'Cursor' and > 'GContext'. > I can't add any native datatype to Gambas at the moment. You must wait for something like Gambas 4. :-) Regards, -- Beno?t Minisini From gambas at ...1... Sat Apr 26 13:07:02 2014 From: gambas at ...1... (=?ISO-8859-1?Q?Beno=EEt_Minisini?=) Date: Sat, 26 Apr 2014 13:07:02 +0200 Subject: [Gambas-user] Dialog on top of FullScreen window In-Reply-To: References: Message-ID: <535B9356.6080608@...1...> Le 26/04/2014 07:34, Patrik Karlsson a ?crit : > Hi, > > Im having a problem with displaying forms on top of my main form when it's > in full screen mode, even though I have set Form.Stacking=Above for my > dialog form and called it with ShowModal. > > How ever, I noticed that when I use Message.Info("This one stays on top") > its all ok. > > Can I change some property of my form to make it behave like Message.Infos > form? > > /Patrik Can you provide a little project that shows that behaviour? -- Beno?t Minisini From gambas at ...1... Sat Apr 26 16:32:37 2014 From: gambas at ...1... (=?ISO-8859-1?Q?Beno=EEt_Minisini?=) Date: Sat, 26 Apr 2014 16:32:37 +0200 Subject: [Gambas-user] TreeView: Change parent key In-Reply-To: <53582D16.2030008@...3323...> References: <53582D16.2030008@...3323...> Message-ID: <535BC385.3020009@...1...> Le 23/04/2014 23:13, J?rn Erik M?rne a ?crit : > Hi! > > Is there a way with the TreeView component to change an item's parent key? > > Now, I have to clear out all elements, and reload them each time I > want to move an item to another parent, and this also resets the > current opened/closed status of each item, which clutters the users's > experience a bit. > > Perhaps there's a good way I haven't thought of? > > Regards, > Erik > I added a Reparent() method to the TreeView items in revision #6250. Tell me if it works for you. I now leave and will come back from holidays next week, so I won't be able to answer before. Regards, -- Beno?t Minisini From fmfdario at ...626... Sun Apr 27 00:48:15 2014 From: fmfdario at ...626... (Francisco Martinez) Date: Sun, 27 Apr 2014 00:48:15 +0200 Subject: [Gambas-user] Valuebox. Property ReadOnly doesn't work? Message-ID: <535C37AF.6020602@...626...> Hi buddies. In running mode. I see that ValueBox's ReadOnly property is True, but I can write inside. It is a bug?. I'm using the development version: 3.5.99.1+svn20140424+build51~ubuntu12.10.1 Thanks From vuott at ...325... Sun Apr 27 02:13:23 2014 From: vuott at ...325... (Ru Vuott) Date: Sun, 27 Apr 2014 01:13:23 +0100 (BST) Subject: [Gambas-user] Downgraded to Gambas 3.5.2 with Ubuntu LTS 14:04 Message-ID: <1398557603.48638.YahooMailBasic@...3273...> Hello, two friends of the forum "www.gambas-it.org" have asked me to post this problem here in the Mailing List. They had updated and used normally the version 3.5.3 of Gambas. Well, not long ago they have updated their Ubuntu LTS distro at new 14:04 version. But, when they installed Gambas again, they have been downgraded to the "previous" Gambas version: 3.5.2 ! Obviously, They'ld like to obtain again the newest version of Gambas: 3.5.3 What can they do? Regards vuott From oitofelix at ...181... Sun Apr 27 02:23:14 2014 From: oitofelix at ...181... (Bruno =?UTF-8?B?RsOpbGl4?= Rezende Ribeiro) Date: Sat, 26 Apr 2014 21:23:14 -0300 Subject: [Gambas-user] Feature request: absolute C data type equivalents and native type aliasing In-Reply-To: <535B9333.7000806@...1...> References: <20140426005700.34831fd4@...3316...> <535B9333.7000806@...1...> Message-ID: <20140426212314.1c43dbe6@...3316...> Em Sat, 26 Apr 2014 13:06:27 +0200 Beno?t Minisini escreveu: > I don't want to discourage you, but I think XLib will not be used > anymore in a few years because of Wayland. :-/ Well, we can't be sure whether Xlib will fall into desuse. And even if that does happen I'll write a Wayland Gambas component when the time has come, and that's not now. ;-) Anyway, Xlib programs will still be runnable in Wayland environments for the foreseeable future by some compatibility layer. Also, at the unlikely worst possible case, maybe it's worth to write a component that will still be useful for a few years from now. Would you accept, in the main Gambas' distribution, a well written and documented Xlib component? > Use the "Pointer" datatype each time you see a long. It has the same > behaviour. I'd like to avoid such ugly hacks, but I guess I haven't many options. :-( > I can't add any native datatype to Gambas at the moment. You must > wait for something like Gambas 4. :-) How long do I have to wait? :-P How can I help you? Thank you for your time. -- ,= ,-_-. =. Bruno F?lix Rezende Ribeiro (oitofelix) [0x28D618AF] ((_/)o o(\_)) There is no system but GNU; `-'(. .)`-' GNU Linux-Libre is one of its official kernels; \_/ All software must be free as in freedom; -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 490 bytes Desc: not available URL: From dl7nb at ...17... Sun Apr 27 09:13:39 2014 From: dl7nb at ...17... (DL7NB) Date: Sun, 27 Apr 2014 09:13:39 +0200 Subject: [Gambas-user] Problem with TextArea in Gambas 3.5.3 In-Reply-To: <535A8B60.6020602@...17...> References: <535A8B60.6020602@...17...> Message-ID: <535CAE23.1010004@...17...> Hi, When trying to erase a textarea.text with the command: TextArea1.text = "" ..does not work and it throws the Gtk-Critical error message: (Textarea:9381): Gtk-CRITICAL **: IA__gtk_text_buffer_set_text: assertion `text != NULL' failed === Textarea1.clear works, without a warning. Why? What has changed? Wolfgang I have added a short example and here is my System-Information: [System] Gambas=3.5.3 OperatingSystem=Linux Kernel=3.5.0-48-generic Architecture=x86 Distribution=Ubuntu 12.04.4 LTS Desktop=GNOME Theme=QGtk Language=de_DE.UTF-8 Memory=2000M [Libraries] Cairo=libcairo.so.0.0.0 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 OpenGL=libGL.so.1.2.0 Poppler=libpoppler.so.19.0.0 Qt4=libQtCore.so.4.8.1 SDL=libSDL-1.2.so.0.11.3 -------------- next part -------------- A non-text attachment was scrubbed... Name: Textarea.tar.gz Type: application/x-gzip Size: 5517 bytes Desc: not available URL: From oitofelix at ...181... Sun Apr 27 10:14:24 2014 From: oitofelix at ...181... (Bruno =?UTF-8?B?RsOpbGl4?= Rezende Ribeiro) Date: Sun, 27 Apr 2014 05:14:24 -0300 Subject: [Gambas-user] Feature request: Make 'Pointer' a true integer type Message-ID: <20140427051424.4dcca655@...3316...> Hello again! It'd be very handy if 'Pointer' was considered by the interpreter as an integer data type like 'Byte', 'Short', 'Integer' and 'Long'. That way one could use any integer function indiscriminately on a Pointer as well, rather than converting it to 'Long' (using 'CLong' function) every time it's an argument for an integer function. That is specially relevant when interfacing with external C libraries, where to make portable Gambas programs one need to treat the C data type 'long' as the Gambas data type 'Pointer'. This means that 'Pointer' isn't meaningful only in pointer contexts but also in ordinary integer contexts. What do you think about this proposed change? Is there any way in which it can be harmful to existing code or interpreter's functionality? Thanks in advance. Ps: In order to make portable Gambas programs which interface with external C libraries, one needs to follow the correct equivalence between C and Gambas integer data types, which is given by the table: [C] [Gambas] char Byte short Short int Integer long Pointer void * Pointer long long Long However, the Gambas Wiki page [1], besides having an incomplete table which does not address 'char', 'short' and 'long long', says that the equivalent of C's 'long' is Gambas' 'Long', what is only true on some 64-bit architectures. Footnotes: [1] http://gambaswiki.org/wiki/howto/extern -- ,= ,-_-. =. Bruno F?lix Rezende Ribeiro (oitofelix) [0x28D618AF] ((_/)o o(\_)) There is no system but GNU; `-'(. .)`-' GNU Linux-Libre is one of its official kernels; \_/ All software must be free as in freedom; -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 490 bytes Desc: not available URL: From ea7dfh at ...2382... Sun Apr 27 11:09:03 2014 From: ea7dfh at ...2382... (Jesus) Date: Sun, 27 Apr 2014 11:09:03 +0200 Subject: [Gambas-user] Downgraded to Gambas 3.5.2 with Ubuntu LTS 14:04 In-Reply-To: <1398557603.48638.YahooMailBasic@...3273...> References: <1398557603.48638.YahooMailBasic@...3273...> Message-ID: <535CC92F.1090307@...2382...> El 27/04/14 02:13, Ru Vuott escribi?: > Hello, > > two friends of the forum "www.gambas-it.org" have asked me to post this problem here in the Mailing List. > > > They had updated and used normally the version 3.5.3 of Gambas. > > Well, not long ago they have updated their Ubuntu LTS distro at new 14:04 version. > But, when they installed Gambas again, they have been downgraded to the "previous" Gambas version: 3.5.2 ! > Obviously, They'ld like to obtain again the newest version of Gambas: 3.5.3 > > What can they do? > > Regards > vuott Hi Vuott To answer this question, one must first know which installation method has been followed. Either do they used "nemh" repository or official ones in the distribution? I think it's a matter of updating their repositories. Regards -- Jesus Guardon From ihaywood3 at ...626... Sun Apr 27 13:16:07 2014 From: ihaywood3 at ...626... (Ian Haywood) Date: Sun, 27 Apr 2014 11:16:07 +0000 Subject: [Gambas-user] Downgraded to Gambas 3.5.2 with Ubuntu LTS 14:04 In-Reply-To: <535CC92F.1090307@...2382...> References: <1398557603.48638.YahooMailBasic@...3273...> <535CC92F.1090307@...2382...> Message-ID: On Sun, Apr 27, 2014 at 9:09 AM, Jesus wrote: > El 27/04/14 02:13, Ru Vuott escribi?: >> Hello, >> >> two friends of the forum "www.gambas-it.org" have asked me to post this problem here in the Mailing List. >> >> >> They had updated and used normally the version 3.5.3 of Gambas. >> >> Well, not long ago they have updated their Ubuntu LTS distro at new 14:04 version. >> But, when they installed Gambas again, they have been downgraded to the "previous" Gambas version: 3.5.2 ! >> Obviously, They'ld like to obtain again the newest version of Gambas: 3.5.3 >> >> What can they do? sounds like they had a PPA configured but lost it when they reinstalled Ubuntu. Not sure where 3.5.2 came from: sadly ubuntu's stock version is still 3.1.1 from over two years ago. Hopefully this will be fixed in the next ubuntu version. They need to reinstall from kendek's PPA Ian From taboege at ...626... Sun Apr 27 16:26:28 2014 From: taboege at ...626... (Tobias Boege) Date: Sun, 27 Apr 2014 16:26:28 +0200 Subject: [Gambas-user] MaskBox.Mask In-Reply-To: References: Message-ID: <20140427142628.GA512@...2774...> On Sat, 26 Apr 2014, Patrik Karlsson wrote: > Hi, > > today I am using TextBox_Change event to reject | characters. > > Public Sub txtName_Change() > > If String.InStr(Last.Text, "|") > 0 Then > Last.Text = Replace(Last.Text, "|", "") > Endif > > End > > I guess MaskBox can do this much simplier, but how, what Mask? > No, MaskBox is there to force formatted input. But the Mask property is way weaker than regular expressions. The main point is that you can only describe fixed-length strings (plus/minus the finite number of #/9 fields in your Mask). So wherever you want to forbid "|", you would write "[^|]" but that also consumes any character but "|". So you cannot accept arbitrary strings but only strings of a length equal to the times you forbid the "|" character. Your initial approach was much better but one thing: if you use InStr() each time the TextBox changes, you will scan the whole contents each time they change but you only want to capture inputs, right? If you tell your user not to use Ctrl-V or stuff, you can do: Public Sub txtName_KeyPress() If Key.Text = "|" Then Stop Event End Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From epost at ...3323... Sun Apr 27 16:47:27 2014 From: epost at ...3323... (=?ISO-8859-1?Q?J=F8rn_Erik_M=F8rne?=) Date: Sun, 27 Apr 2014 16:47:27 +0200 Subject: [Gambas-user] TreeView: Change parent key In-Reply-To: References: Message-ID: <535D187F.5000805@...3323...> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Thanks! I am running Gambas 3.5.2 now, but perhaps I'll be able to pull the development version and try it out. Another feature request that I think would have been extremely great would be something like a .RichTextInsert() method for the TextEdit control. This way it would be very easy to insert HTML objects like tables, hyperlinks and so on at the cursor's current position. I may ask to much here now, but you don't get without asking :) I know that the QT TextEdit has methods for handling tables. Getting some basic table functionality like that in Gambas' TextEdit would be awesome, e.g. inserting/deleting tables, rows and columns, split and merging cells. I believe this is already built into QT, no? Best Regards Erik Den 27. april 2014 09:13, skrev gambas-user-request at lists.sourceforge.net: > Message: 2 Date: Sat, 26 Apr 2014 16:32:37 +0200 From: Beno?t > Minisini Subject: Re: [Gambas-user] > TreeView: Change parent key To: mailing list for gambas users > Message-ID: > <535BC385.3020009 at ...1...> Content-Type: text/plain; > charset=ISO-8859-1; format=flowed Le 23/04/2014 23:13, J?rn Erik > M?rne a ?crit : >>> Hi! >>> >>> Is there a way with the TreeView component to change an item's >>> parent key? >>> >>> Now, I have to clear out all elements, and reload them each >>> time I want to move an item to another parent, and this also >>> resets the current opened/closed status of each item, which >>> clutters the users's experience a bit. >>> >>> Perhaps there's a good way I haven't thought of? >>> >>> Regards, Erik >>> > I added a Reparent() method to the TreeView items in revision > #6250. > > Tell me if it works for you. > > I now leave and will come back from holidays next week, so I won't > be able to answer before. > > Regards, > > -- Beno?t Minisini -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJTXRh/AAoJEADmWD07BL0OhIcIAMNur2VrX1KkkcbavF2GHvS0 Q2O8ZqClkRPbSSLrTQEEg6+EHjrKvNDvdDucsWLQRr4E516pgy/aE5uYGBCVEOcE y/tBHn464+IZgB/KJ1CmnMJYw767v5VlGsvBSyodIgjcKBeUYSTw7agWK3WMQPb2 iEFzD4qOWkV/IGjdXx6GtAugpVuF7bbp5kFaSCiPJK0ldII0CRrk6kD8bSx4JH2P WLK0SHYLbfhiwbnNpmPONTZNTXWlflr2n6ixyEHNWPJwKiVDidO+A4Xjw/DdkaHa WtyVm31AdAgL+aUUwGUPrNx0F6OplsEFX/jGbIvia57a7JY6oHD9dmtXsfbuE5M= =/vnQ -----END PGP SIGNATURE----- From johny.provoost at ...27... Sun Apr 27 19:40:04 2014 From: johny.provoost at ...27... (Johny Provoost) Date: Sun, 27 Apr 2014 19:40:04 +0200 Subject: [Gambas-user] Downgraded to Gambas 3.5.2 with Ubuntu LTS 14:04 In-Reply-To: References: <1398557603.48638.YahooMailBasic@...3273...> <535CC92F.1090307@...2382...> Message-ID: <535D40F4.2040309@...27...> op 27-04-14 13:16, Ian Haywood schreef: > On Sun, Apr 27, 2014 at 9:09 AM, Jesus wrote: >> El 27/04/14 02:13, Ru Vuott escribi??: >>> Hello, >>> >>> two friends of the forum "www.gambas-it.org" have asked me to post this problem here in the Mailing List. >>> >>> >>> They had updated and used normally the version 3.5.3 of Gambas. >>> >>> Well, not long ago they have updated their Ubuntu LTS distro at new 14:04 version. >>> But, when they installed Gambas again, they have been downgraded to the "previous" Gambas version: 3.5.2 ! >>> Obviously, They'ld like to obtain again the newest version of Gambas: 3.5.3 >>> >>> What can they do? > sounds like they had a PPA configured but lost it when they reinstalled Ubuntu. > Not sure where 3.5.2 came from: sadly ubuntu's stock version is still > 3.1.1 from over two years ago. Hopefully this will be fixed in the > next ubuntu version. > They need to reinstall from kendek's PPA > > Ian > Well, I didn't notice it till now, but I got 3.5.2 to in Ubuntu 14.04 (clean install) , and I installed Gambas from ppa http://ppa.lauchpad.net/nemh/gambas3/ubuntu trusty main Johny Provoost From vuott at ...325... Sun Apr 27 23:37:04 2014 From: vuott at ...325... (Ru Vuott) Date: Sun, 27 Apr 2014 22:37:04 +0100 (BST) Subject: [Gambas-user] Downgraded to Gambas 3.5.2 with Ubuntu LTS 14:04 In-Reply-To: <535D40F4.2040309@...27...> Message-ID: <1398634624.44320.YahooMailBasic@...3271...> Hello, thanks for contributions. One of them said he "solved" by cleaning version 3.5.2, then: sudo add-apt-repository ppa:nemh/gambas3 sudo apt-get update sudo apt-get install gambas3 regards vuott -------------------------------------------- Dom 27/4/14, Johny Provoost ha scritto: Oggetto: Re: [Gambas-user] Downgraded to Gambas 3.5.2 with Ubuntu LTS 14:04 A: gambas-user at lists.sourceforge.net Data: Domenica 27 Aprile 2014, 19:40 op 27-04-14 13:16, Ian Haywood schreef: > On Sun, Apr 27, 2014 at 9:09 AM, Jesus wrote: >> El 27/04/14 02:13, Ru Vuott escribi??: >>> Hello, >>> >>> two friends of the forum "www.gambas-it.org" have asked me to post this problem here in the Mailing List. >>> >>> >>> They had updated and used normally the version 3.5.3 of Gambas. >>> >>> Well, not long ago they have updated their Ubuntu LTS distro? at new 14:04 version. >>> But, when they installed Gambas again, they have been downgraded to the "previous" Gambas version: 3.5.2 ! >>> Obviously, They'ld like to obtain again the newest version of Gambas: 3.5.3 >>> >>> What can they do? > sounds like they had a PPA configured but lost it when they reinstalled Ubuntu. > Not sure where 3.5.2 came from: sadly ubuntu's stock version is still > 3.1.1 from over two years ago. Hopefully this will be fixed in the > next ubuntu version. > They need to reinstall from kendek's PPA > > Ian > Well, I didn't notice it till now, but I got 3.5.2 to in Ubuntu 14.04 (clean install) , and I installed Gambas from ppa http://ppa.lauchpad.net/nemh/gambas3/ubuntu trusty main Johny Provoost ------------------------------------------------------------------------------ Start Your Social Network Today - Download eXo Platform Build your Enterprise Intranet with eXo Platform Software Java Based Open Source Intranet - Social, Extensible, Cloud Ready Get Started Now And Turn Your Intranet Into A Collaboration Platform http://p.sf.net/sfu/ExoPlatform _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From iss_boss at ...770... Sun Apr 27 23:57:58 2014 From: iss_boss at ...770... (ISS Boss) Date: Sun, 27 Apr 2014 17:57:58 -0400 Subject: [Gambas-user] Downgraded to Gambas 3.5.2 with Ubuntu LTS 14:04 In-Reply-To: <1398634624.44320.YahooMailBasic@...3271...> References: <1398634624.44320.YahooMailBasic@...3271...> Message-ID: <535D7D66.5050707@...770...> If I may butt in for a second. That is exactly what I had to do when my Ubuntu updated to 12.04. When I tried to "check for updates" the Update Manager told me that Gambas was "unauthorized" and refused to install it or upgrade it. I ran the commands you mention and upgraded myself to Gambas version 3.5.3. I suspect that where I had originally gotten version 3.5.2 was NOT the latest PPA. There was no reason to uninstall the old version of Gambas. The latest version seemed to install right "over" the old one. Bill Ru Vuott wrote, On 04/27/2014 17:37: Hello, thanks for contributions. One of them said he "solved" by cleaning version 3.5.2, then: sudo add-apt-repository ppa:nemh/gambas3 sudo apt-get update sudo apt-get install gambas3 regards vuott -------------------------------------------- Dom 27/4/14, Johny Provoost [1] ha scritto: Oggetto: Re: [Gambas-user] Downgraded to Gambas 3.5.2 with Ubuntu LTS 14:04 A: [2]gambas-user at lists.sourceforge.net Data: Domenica 27 Aprile 2014, 19:40 op 27-04-14 13:16, Ian Haywood schreef: > On Sun, Apr 27, 2014 at 9:09 AM, Jesus [3] wrote: >> El 27/04/14 02:13, Ru Vuott escribi????: >>> Hello, >>> >>> two friends of the forum "[4]www.gambas-it.org" have asked me to post this problem here in the Mailing List. >>> >>> >>> They had updated and used normally the version 3.5.3 of Gambas. >>> >>> Well, not long ago they have updated their Ubuntu LTS distro at new 14:04 version. >>> But, when they installed Gambas again, they have been downgraded to the "previous" Gambas version: 3.5.2 ! >>> Obviously, They'ld like to obtain again the newest version of Gambas: 3.5.3 >>> >>> What can they do? > sounds like they had a PPA configured but lost it when they reinstalled Ubuntu. > Not sure where 3.5.2 came from: sadly ubuntu's stock version is still > 3.1.1 from over two years ago. Hopefully this will be fixed in the > next ubuntu version. > They need to reinstall from kendek's PPA > > Ian > Well, I didn't notice it till now, but I got 3.5.2 to in Ubuntu 14.04 (clean install) , and I installed Gambas from ppa [5]http://ppa.lauchpad.net/nemh/gambas3/ubuntu trusty main Johny Provoost ------------------------------------------------------------------------------ Start Your Social Network Today - Download eXo Platform Build your Enterprise Intranet with eXo Platform Software Java Based Open Source Intranet - Social, Extensible, Cloud Ready Get Started Now And Turn Your Intranet Into A Collaboration Platform [6]http://p.sf.net/sfu/ExoPlatform _______________________________________________ Gambas-user mailing list [7]Gambas-user at lists.sourceforge.net [8]https://lists.sourceforge.net/lists/listinfo/gambas-user ------------------------------------------------------------------------------ Start Your Social Network Today - Download eXo Platform Build your Enterprise Intranet with eXo Platform Software Java Based Open Source Intranet - Social, Extensible, Cloud Ready Get Started Now And Turn Your Intranet Into A Collaboration Platform [9]http://p.sf.net/sfu/ExoPlatform _______________________________________________ Gambas-user mailing list [10]Gambas-user at lists.sourceforge.net [11]https://lists.sourceforge.net/lists/listinfo/gambas-user References 1. mailto:johny.provoost at ...27... 2. mailto:gambas-user at lists.sourceforge.net 3. mailto:ea7dfh at ...2382... 4. http://www.gambas-it.org/ 5. http://ppa.lauchpad.net/nemh/gambas3/ubuntu 6. http://p.sf.net/sfu/ExoPlatform 7. mailto:Gambas-user at lists.sourceforge.net 8. https://lists.sourceforge.net/lists/listinfo/gambas-user 9. http://p.sf.net/sfu/ExoPlatform 10. mailto:Gambas-user at lists.sourceforge.net 11. https://lists.sourceforge.net/lists/listinfo/gambas-user From abbat.81 at ...787... Mon Apr 28 09:54:33 2014 From: abbat.81 at ...787... (abbat81) Date: Mon, 28 Apr 2014 00:54:33 -0700 (PDT) Subject: [Gambas-user] Form.Show by name as string of form Message-ID: <1398671673888-46270.post@...3046...> Hi, I have a four forms in my project: Form_name_1 Form_name_2 Form_name_3 Form_name_4 Form_name_5 How can I show a form by name of a form by string. Public Sub Button1_Click() Dim Form_name As String = "Form_name_2" Form_name.Show End -- View this message in context: http://gambas.8142.n7.nabble.com/Form-Show-by-name-as-string-of-form-tp46270.html Sent from the gambas-user mailing list archive at Nabble.com. From vuott at ...325... Mon Apr 28 10:17:43 2014 From: vuott at ...325... (Ru Vuott) Date: Mon, 28 Apr 2014 09:17:43 +0100 (BST) Subject: [Gambas-user] R: Form.Show by name as string of form In-Reply-To: <1398671673888-46270.post@...3046...> Message-ID: <1398673063.97441.YahooMailBasic@...3273...> ...I would use a Form[ ] variable array, not string. bye vuott -------------------------------------------- Lun 28/4/14, abbat81 ha scritto: Oggetto: [Gambas-user] Form.Show by name as string of form A: gambas-user at lists.sourceforge.net Data: Luned? 28 Aprile 2014, 09:54 Hi, I have a four forms in my project: Form_name_1 Form_name_2 Form_name_3 Form_name_4 Form_name_5 How can I show a form by name of a form by string. Public Sub Button1_Click() ? ? Dim Form_name As String = "Form_name_2" ? Form_name.Show End -- View this message in context: http://gambas.8142.n7.nabble.com/Form-Show-by-name-as-string-of-form-tp46270.html Sent from the gambas-user mailing list archive at Nabble.com. ------------------------------------------------------------------------------ "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos.? Get unparalleled scalability from the best Selenium testing platform available. Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From abbat.81 at ...787... Mon Apr 28 10:56:46 2014 From: abbat.81 at ...787... (abbat81) Date: Mon, 28 Apr 2014 01:56:46 -0700 (PDT) Subject: [Gambas-user] R: Form.Show by name as string of form In-Reply-To: <1398673063.97441.YahooMailBasic@...3273...> References: <1398671673888-46270.post@...3046...> <1398673063.97441.YahooMailBasic@...3273...> Message-ID: <1398675406632-46272.post@...3046...> Hi Vuott, can you help me with a little sample? Thanks -- View this message in context: http://gambas.8142.n7.nabble.com/Form-Show-by-name-as-string-of-form-tp46270p46272.html Sent from the gambas-user mailing list archive at Nabble.com. From sbungay at ...3301... Mon Apr 28 11:07:35 2014 From: sbungay at ...3301... (Stephen) Date: Mon, 28 Apr 2014 05:07:35 -0400 Subject: [Gambas-user] R: Form.Show by name as string of form In-Reply-To: <1398673063.97441.YahooMailBasic@...3273...> References: <1398673063.97441.YahooMailBasic@...3273...> Message-ID: <535E1A57.7040006@...3301...> This will work, it might not be exactly what you had in mind but then this isn't BASIC of old :) Public Sub Button1_Click() ' the 'h' prefix is just my personal style... and is not ' requirement... use whatever you like to differentiate ' the variable from the actual form. Dim hForm_name_2 As New Form_Name_2 hForm_name_2.Show End Steve. On 04/28/2014 04:17 AM, Ru Vuott wrote: > ...I would use a Form[ ] variable array, not string. > > bye > vuott > > > -------------------------------------------- > Lun 28/4/14, abbat81 ha scritto: > > Oggetto: [Gambas-user] Form.Show by name as string of form > A: gambas-user at lists.sourceforge.net > Data: Luned? 28 Aprile 2014, 09:54 > > Hi, > > I have a four forms in my project: > Form_name_1 > Form_name_2 > Form_name_3 > Form_name_4 > Form_name_5 > > > How can I show a form by name of a form by string. > > Public Sub Button1_Click() > > Dim Form_name As String = "Form_name_2" > > Form_name.Show > > End > > > > -- > View this message in context: http://gambas.8142.n7.nabble.com/Form-Show-by-name-as-string-of-form-tp46270.html > Sent from the gambas-user mailing list archive at > Nabble.com. > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing > - For FREE > Instantly run your Selenium tests across 300+ browser/OS > combos. Get > unparalleled scalability from the best Selenium testing > platform available. > Simple to use. Nothing to install. Get started now for > free." > http://p.sf.net/sfu/SauceLabs > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. Get > unparalleled scalability from the best Selenium testing platform available. > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Kindest Regards Stephen A. Bungay, Prop. Smarts On Site From johny.provoost at ...27... Mon Apr 28 11:15:15 2014 From: johny.provoost at ...27... (Johny Provoost) Date: Mon, 28 Apr 2014 11:15:15 +0200 Subject: [Gambas-user] Downgraded to Gambas 3.5.2 with Ubuntu LTS 14:04 In-Reply-To: <535D7D66.5050707@...770...> References: <1398634624.44320.YahooMailBasic@...3271...> <535D7D66.5050707@...770...> Message-ID: <535E1C23.4070805@...27...> Yes it works with vuott's tips. No need to clean version 3.5.2. Don't know why it didn't worked when I installed Ubuntu 14.04. I added the ppa:nemh/gambas3, did a refresh of the sources, and installed gambas3 through synaptic. Johny op 27-04-14 23:57, ISS Boss schreef: If I may butt in for a second. That is exactly what I had to do when my Ubuntu updated to 12.04. When I tried to "check for updates" the Update Manager told me that Gambas was "unauthorized" and refused to install it or upgrade it. I ran the commands you mention and upgraded myself to Gambas version 3.5.3. I suspect that where I had originally gotten version 3.5.2 was NOT the latest PPA. There was no reason to uninstall the old version of Gambas. The latest version seemed to install right "over" the old one. Bill Ru Vuott wrote, On 04/27/2014 17:37: Hello, thanks for contributions. One of them said he "solved" by cleaning version 3.5.2, then: sudo add-apt-repository ppa:nemh/gambas3 sudo apt-get update sudo apt-get install gambas3 regards vuott -------------------------------------------- Dom 27/4/14, Johny Provoost [1][1] ha scritto: Oggetto: Re: [Gambas-user] Downgraded to Gambas 3.5.2 with Ubuntu LTS 14:04 A: [[2]2]gambas-user at lists.sourceforge.net Data: Domenica 27 Aprile 2014, 19:40 op 27-04-14 13:16, Ian Haywood schreef: > On Sun, Apr 27, 2014 at 9:09 AM, Jesus [3][3] wrote: >> El 27/04/14 02:13, Ru Vuott escribi????????: >>> Hello, >>> >>> two friends of the forum "[4]www.gambas-it.org" have asked me to post this problem here in the Mailing List. >>> >>> >>> They had updated and used normally the version 3.5.3 of Gambas. >>> >>> Well, not long ago they have updated their Ubuntu LTS distro at new 14:04 version. >>> But, when they installed Gambas again, they have been downgraded to the "previous" Gambas version: 3.5.2 ! >>> Obviously, They'ld like to obtain again the newest version of Gambas: 3.5.3 >>> >>> What can they do? > sounds like they had a PPA configured but lost it when they reinstalled Ubuntu. > Not sure where 3.5.2 came from: sadly ubuntu's stock version is still > 3.1.1 from over two years ago. Hopefully this will be fixed in the > next ubuntu version. > They need to reinstall from kendek's PPA > > Ian > Well, I didn't notice it till now, but I got 3.5.2 to in Ubuntu 14.04 (clean install) , and I installed Gambas from ppa [5][4]http://ppa.lauchpad.net/nemh/gambas3/ubuntu trusty main Johny Provoost ------------------------------------------------------------------------------ Start Your Social Network Today - Download eXo Platform Build your Enterprise Intranet with eXo Platform Software Java Based Open Source Intranet - Social, Extensible, Cloud Ready Get Started Now And Turn Your Intranet Into A Collaboration Platform [6][5]http://p.sf.net/sfu/ExoPlatform _______________________________________________ Gambas-user mailing list [[6]7]Gambas-user at lists.sourceforge.net [8][7]https://lists.sourceforge.net/lists/listinfo/gambas-user ------------------------------------------------------------------------------ Start Your Social Network Today - Download eXo Platform Build your Enterprise Intranet with eXo Platform Software Java Based Open Source Intranet - Social, Extensible, Cloud Ready Get Started Now And Turn Your Intranet Into A Collaboration Platform [9][8]http://p.sf.net/sfu/ExoPlatform _______________________________________________ Gambas-user mailing list [[9]10]Gambas-user at lists.sourceforge.net [11][10]https://lists.sourceforge.net/lists/listinfo/gambas-user References 1. [11]mailto:johny.provoost at ...27... 2. [12]mailto:gambas-user at lists.sourceforge.net 3. [13]mailto:ea7dfh at ...2382... 4. [14]http://www.gambas-it.org/ 5. [15]http://ppa.lauchpad.net/nemh/gambas3/ubuntu 6. [16]http://p.sf.net/sfu/ExoPlatform 7. [17]mailto:Gambas-user at lists.sourceforge.net 8. [18]https://lists.sourceforge.net/lists/listinfo/gambas-user 9. [19]http://p.sf.net/sfu/ExoPlatform 10. [20]mailto:Gambas-user at lists.sourceforge.net 11. [21]https://lists.sourceforge.net/lists/listinfo/gambas-user ------------------------------------------------------------------------------ Start Your Social Network Today - Download eXo Platform Build your Enterprise Intranet with eXo Platform Software Java Based Open Source Intranet - Social, Extensible, Cloud Ready Get Started Now And Turn Your Intranet Into A Collaboration Platform [22]http://p.sf.net/sfu/ExoPlatform _______________________________________________ Gambas-user mailing list [23]Gambas-user at lists.sourceforge.net [24]https://lists.sourceforge.net/lists/listinfo/gambas-user -- Vriendelijke Groeten Johny Provoost mailto: [25]johny.provoost at ...27... mailto: [26]johny.provoost at ...626... Website: [27]http://www.johnyprovoost.net References 1. mailto:johny.provoost at ...27... 2. mailto:2]gambas-user at lists.sourceforge.net 3. mailto:ea7dfh at ...2382... 4. http://ppa.lauchpad.net/nemh/gambas3/ubuntu 5. http://p.sf.net/sfu/ExoPlatform 6. mailto:7]Gambas-user at lists.sourceforge.net 7. https://lists.sourceforge.net/lists/listinfo/gambas-user 8. http://p.sf.net/sfu/ExoPlatform 9. mailto:10]Gambas-user at lists.sourceforge.net 10. https://lists.sourceforge.net/lists/listinfo/gambas-user 11. mailto:johny.provoost at ...27... 12. mailto:gambas-user at lists.sourceforge.net 13. mailto:ea7dfh at ...2382... 14. http://www.gambas-it.org/ 15. http://ppa.lauchpad.net/nemh/gambas3/ubuntu 16. http://p.sf.net/sfu/ExoPlatform 17. mailto:Gambas-user at lists.sourceforge.net 18. https://lists.sourceforge.net/lists/listinfo/gambas-user 19. http://p.sf.net/sfu/ExoPlatform 20. mailto:Gambas-user at lists.sourceforge.net 21. https://lists.sourceforge.net/lists/listinfo/gambas-user 22. http://p.sf.net/sfu/ExoPlatform 23. mailto:Gambas-user at lists.sourceforge.net 24. https://lists.sourceforge.net/lists/listinfo/gambas-user 25. mailto:johny.provoost at ...27... 26. mailto:johny.provoost at ...626... 27. http://www.johnyprovoost.net/ From abbat.81 at ...787... Mon Apr 28 11:43:19 2014 From: abbat.81 at ...787... (abbat81) Date: Mon, 28 Apr 2014 02:43:19 -0700 (PDT) Subject: [Gambas-user] R: Form.Show by name as string of form In-Reply-To: <535E1A57.7040006@...3301...> References: <1398671673888-46270.post@...3046...> <1398673063.97441.YahooMailBasic@...3273...> <535E1A57.7040006@...3301...> Message-ID: <1398678199657-46275.post@...3046...> Hi Stephen My forms already exists, so I can't use "As New Form_Name_2" I need to use name of forms -- View this message in context: http://gambas.8142.n7.nabble.com/Form-Show-by-name-as-string-of-form-tp46270p46275.html Sent from the gambas-user mailing list archive at Nabble.com. From vuott at ...325... Mon Apr 28 13:58:11 2014 From: vuott at ...325... (Ru Vuott) Date: Mon, 28 Apr 2014 12:58:11 +0100 (BST) Subject: [Gambas-user] R: Form.Show by name as string of form In-Reply-To: <1398675406632-46272.post@...3046...> Message-ID: <1398686291.49899.YahooMailBasic@...3273...> Hi, for example we have Main Form and 2 secondary Form, called: "Form1" and Form2". To open them at same time: Public Sub Form_Open() Dim f As New Form[] Dim f2 As Form f.Add(Form1) f.Add(Form2) For Each f2 In f f2.Show() Next End Bye -------------------------------------------- Lun 28/4/14, abbat81 ha scritto: Oggetto: Re: [Gambas-user] R: Form.Show by name as string of form A: gambas-user at lists.sourceforge.net Data: Luned? 28 Aprile 2014, 10:56 Hi Vuott, can you help me with a little sample? Thanks -- View this message in context: http://gambas.8142.n7.nabble.com/Form-Show-by-name-as-string-of-form-tp46270p46272.html Sent from the gambas-user mailing list archive at Nabble.com. ------------------------------------------------------------------------------ "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos.? Get unparalleled scalability from the best Selenium testing platform available. Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From sbungay at ...3301... Mon Apr 28 14:03:42 2014 From: sbungay at ...3301... (Stephen) Date: Mon, 28 Apr 2014 08:03:42 -0400 Subject: [Gambas-user] R: Form.Show by name as string of form In-Reply-To: <1398678199657-46275.post@...3046...> References: <1398671673888-46270.post@...3046...> <1398673063.97441.YahooMailBasic@...3273...> <535E1A57.7040006@...3301...> <1398678199657-46275.post@...3046...> Message-ID: <535E439E.3020205@...3301...> As many instances of Form_Name_2 can be created as you want/need. For example; If we create a single form application (I'll call it FormMain) with only one button on the form (Button1) and the click event of button one looks like this; PUBLIC SUB Button1_Click() DIM hFormMain AS NEW FormMain hFormMain.Show END SUB Each time you click on Button1 a new FormMain will appear on your screen, click on Button1 of the new form and another new form will appear. Now if you have a hidden window and want to bring it into view then that's a different problem. I've done this kind of thing and had my share of trouble with it, give me a bit more info regarding your situation and perhaps I can help you out like others helped me. On 04/28/2014 05:43 AM, abbat81 wrote: > Hi Stephen > > My forms already exists, so I can't use "As New Form_Name_2" > > I need to use name of forms > > > > -- > View this message in context: http://gambas.8142.n7.nabble.com/Form-Show-by-name-as-string-of-form-tp46270p46275.html > Sent from the gambas-user mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. Get > unparalleled scalability from the best Selenium testing platform available. > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Kindest Regards Stephen A. Bungay, Prop. Smarts On Site From abbat.81 at ...787... Mon Apr 28 14:27:13 2014 From: abbat.81 at ...787... (abbat81) Date: Mon, 28 Apr 2014 05:27:13 -0700 (PDT) Subject: [Gambas-user] R: Form.Show by name as string of form In-Reply-To: <1398686291.49899.YahooMailBasic@...3273...> References: <1398671673888-46270.post@...3046...> <1398673063.97441.YahooMailBasic@...3273...> <1398675406632-46272.post@...3046...> <1398686291.49899.YahooMailBasic@...3273...> Message-ID: <1398688033209-46278.post@...3046...> Thank you, and how can I show some of forms. I have a name of form "form2". So, how can I call that form2 in your example? Thanks -- View this message in context: http://gambas.8142.n7.nabble.com/Form-Show-by-name-as-string-of-form-tp46270p46278.html Sent from the gambas-user mailing list archive at Nabble.com. From vuott at ...325... Mon Apr 28 15:38:34 2014 From: vuott at ...325... (Ru Vuott) Date: Mon, 28 Apr 2014 14:38:34 +0100 (BST) Subject: [Gambas-user] R: Form.Show by name as string of form In-Reply-To: <1398688033209-46278.post@...3046...> Message-ID: <1398692314.40688.YahooMailBasic@...3273...> If you're referring to my example, you can call, having an array, you can call an its element via usual procedures: arrayForm[index].Show() bye vuott -------------------------------------------- Lun 28/4/14, abbat81 ha scritto: Oggetto: Re: [Gambas-user] R: Form.Show by name as string of form A: gambas-user at lists.sourceforge.net Data: Luned? 28 Aprile 2014, 14:27 Thank you, and how can I show some of forms. I have a name of form "form2". So, how can I call that form2 in your example? Thanks -- View this message in context: http://gambas.8142.n7.nabble.com/Form-Show-by-name-as-string-of-form-tp46270p46278.html Sent from the gambas-user mailing list archive at Nabble.com. ------------------------------------------------------------------------------ "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos.? Get unparalleled scalability from the best Selenium testing platform available. Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From abbat.81 at ...787... Mon Apr 28 16:21:07 2014 From: abbat.81 at ...787... (abbat81) Date: Mon, 28 Apr 2014 07:21:07 -0700 (PDT) Subject: [Gambas-user] String Functions give different values at cyrillic / not-cyrillic Message-ID: <1398694867866-46282.post@...3046...> Print Len("iiiiiiiiii") ' not cyrillic Print Len("??????????") ' cyrillic >10 >20 How can I get correct value with cyrillic symbols? Thanks -- View this message in context: http://gambas.8142.n7.nabble.com/String-Functions-give-different-values-at-cyrillic-not-cyrillic-tp46282.html Sent from the gambas-user mailing list archive at Nabble.com. From taboege at ...626... Mon Apr 28 16:23:07 2014 From: taboege at ...626... (Tobias Boege) Date: Mon, 28 Apr 2014 16:23:07 +0200 Subject: [Gambas-user] String Functions give different values at cyrillic / not-cyrillic In-Reply-To: <1398694867866-46282.post@...3046...> References: <1398694867866-46282.post@...3046...> Message-ID: <20140428142307.GC4463@...2774...> On Mon, 28 Apr 2014, abbat81 wrote: > Print Len("iiiiiiiiii") ' not cyrillic > Print Len("????????????????????") ' cyrillic > > >10 > >20 > > How can I get correct value with cyrillic symbols? > Thanks > Use String.Len() which can deal with UTF-8 characters. -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From jussi.lahtinen at ...626... Mon Apr 28 16:43:35 2014 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Mon, 28 Apr 2014 17:43:35 +0300 Subject: [Gambas-user] Form.Show by name as string of form In-Reply-To: <1398671673888-46270.post@...3046...> References: <1398671673888-46270.post@...3046...> Message-ID: Private hMyForms As New Collection() hMyForms.Add(Form_name_1,"Form_name_1") hMyForms.Add(Form_name_2,"Form_name_2") hMyForms.Add(Form_name_3,"Form_name_3") ... hMyForms["Form_name_1"].Show() Jussi On Mon, Apr 28, 2014 at 10:54 AM, abbat81 wrote: > Hi, > > I have a four forms in my project: > Form_name_1 > Form_name_2 > Form_name_3 > Form_name_4 > Form_name_5 > > > How can I show a form by name of a form by string. > > Public Sub Button1_Click() > > Dim Form_name As String = "Form_name_2" > > Form_name.Show > > End > > > > -- > View this message in context: > http://gambas.8142.n7.nabble.com/Form-Show-by-name-as-string-of-form-tp46270.html > Sent from the gambas-user mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. Get > unparalleled scalability from the best Selenium testing platform available. > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From sbungay at ...3301... Mon Apr 28 20:00:22 2014 From: sbungay at ...3301... (Stephen) Date: Mon, 28 Apr 2014 14:00:22 -0400 Subject: [Gambas-user] R: Form.Show by name as string of form In-Reply-To: <1398688033209-46278.post@...3046...> References: <1398671673888-46270.post@...3046...> <1398673063.97441.YahooMailBasic@...3273...> <1398675406632-46272.post@...3046...> <1398686291.49899.YahooMailBasic@...3273...> <1398688033209-46278.post@...3046...> Message-ID: <535E9736.2090206@...3301...> Hi; Were you asking me or Ru Vuott? On 04/28/2014 08:27 AM, abbat81 wrote: > Thank you, and > how can I show some of forms. > I have a name of form "form2". > So, how can I call that form2 in your example? > Thanks > > > > -- > View this message in context: http://gambas.8142.n7.nabble.com/Form-Show-by-name-as-string-of-form-tp46270p46278.html > Sent from the gambas-user mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. Get > unparalleled scalability from the best Selenium testing platform available. > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- Kindest Regards Stephen A. Bungay, Prop. Smarts On Site From avdiel1946 at ...626... Mon Apr 28 20:49:28 2014 From: avdiel1946 at ...626... (Larry Moore) Date: Mon, 28 Apr 2014 11:49:28 -0700 Subject: [Gambas-user] gambas 3.5.3 update Message-ID: Using ... sudo add-apt-repository ppa:nemh/gambas3 sudo apt-get update sudo apt-get install gambas3 ? ... I was? able to update the 3.1.1 that came with the unbuntu 14.04 upgrade. However there was one of the example programs that could not run due to needing "exiftool". Where and how do I get this missing piece? Love Gambas. It is more that VB can ever hope to be. From matti.eber at ...3240... Mon Apr 28 21:14:08 2014 From: matti.eber at ...3240... (Matti) Date: Mon, 28 Apr 2014 21:14:08 +0200 Subject: [Gambas-user] gambas 3.5.3 update In-Reply-To: References: Message-ID: <535EA880.20604@...3240...> If exiftools is not in your repositories, you can get it here: http://www.sno.phy.queensu.ca/~phil/exiftool/install.html#Unix Am 28.04.2014 20:49, schrieb Larry Moore: > Using ... > sudo add-apt-repository ppa:nemh/gambas3 > sudo apt-get update > sudo apt-get install gambas3 > ? > ... I was? able to update the 3.1.1 that came with the unbuntu 14.04 > upgrade. However there was one of the example programs that could not run > due to needing "exiftool". Where and how do I get this missing piece? Love > Gambas. It is more that VB can ever hope to be. > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. Get > unparalleled scalability from the best Selenium testing platform available. > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From herberthguzman at ...626... Mon Apr 28 22:12:55 2014 From: herberthguzman at ...626... (herberth guzman) Date: Mon, 28 Apr 2014 14:12:55 -0600 Subject: [Gambas-user] Help Taskbar(form_panel) Message-ID: Hi, I'm making a desktop in Gambas3 called Innova (everything was possible thanks to the help of Fabien Bodard) some widget (w_desktop, w_date, w_clock, w_calc, w_eject, w_PcInfo), Etc. I'm making a panel for my desktop and I need to know how to set a form type panel having top with the windows open. (EXAMPLE lxpanel, tint2, pypanel, razor-panel) my panel has show the window activates and active that you want closes the window that you want minimizes the window that you want embed systemtray (stalonetray) slope: form_panel pushes all the other windows down and its own system tray someone help me with the panel or please guide me. Beno?t Minisini Thanks for giving us Gambas3. Preview: https://sourceforge.net/projects/innovadesktop/ From gambas.fr at ...626... Tue Apr 29 09:54:35 2014 From: gambas.fr at ...626... (Fabien Bodard) Date: Tue, 29 Apr 2014 09:54:35 +0200 Subject: [Gambas-user] Feature request: absolute C data type equivalents and native type aliasing In-Reply-To: <20140426212314.1c43dbe6@...3316...> References: <20140426005700.34831fd4@...3316...> <535B9333.7000806@...1...> <20140426212314.1c43dbe6@...3316...> Message-ID: Hi Bruno I think the better way will be to make a C component that interface the xlib . This component will have it's own gb api. Not necessary a fully complient but something that allow to do simply simple things and to push if necessary more advanced flags. Xlib is hard and complex... Is there a way to have a high level gb api and maybe a common gb api interface for xlib wayland and maybe Mir. The better way to make this ... Will be to construct in the same time a simple windows manager... So you will see what is really need .. and less need. It's a great project and a good idea... From dl7nb at ...17... Tue Apr 29 10:53:14 2014 From: dl7nb at ...17... (Wolfgang, dl7nb) Date: Tue, 29 Apr 2014 10:53:14 +0200 Subject: [Gambas-user] Error in TextArea (GAmbas 3.5.3) Message-ID: <535F687A.7000200@...17...> Hello all, I have posted this under "Problem with TextArea in Gambas 3.5.3" but either it did not get through or I am the only one with this error... === When trying to erase a textarea.text with the command: TextArea1.text = "" it does not work and it throws the Gtk-Critical error message: (Textarea:9381): Gtk-CRITICAL **: IA__gtk_text_buffer_set_text: assertion `text != NULL' failed === Textarea1.clear works, without a warning. Why? === What has changed? Wolfgang I have added a short example and here is my System-Information: [System] Gambas=3.5.3 OperatingSystem=Linux Kernel=3.5.0-48-generic Architecture=x86 Distribution=Ubuntu 12.04.4 LTS Desktop=GNOME Theme=QGtk Language=de_DE.UTF-8 Memory=2000M [Libraries] Cairo=libcairo.so.0.0.0 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 OpenGL=libGL.so.1.2.0 Poppler=libpoppler.so.19.0.0 Qt4=libQtCore.so.4.8.1 SDL=libSDL-1.2.so.0.11.3 -------------- next part -------------- A non-text attachment was scrubbed... Name: Textarea.tar.gz Type: application/x-gzip Size: 5517 bytes Desc: not available URL: From vuott at ...325... Tue Apr 29 12:10:34 2014 From: vuott at ...325... (Ru Vuott) Date: Tue, 29 Apr 2014 11:10:34 +0100 (BST) Subject: [Gambas-user] Form.Show by name as string of form In-Reply-To: Message-ID: <1398766234.74851.YahooMailBasic@...3274...> Hello Jussi, I tried your suggestion, but an error-notice is raised: " Not an object " To use your Collection, I had to modify the code so: Private hMyForms As New Collection hMyForms.Add(Form_name_1,"Form_name_1") hMyForms.Add(Form_name_2,"Form_name_2") hMyForms.Add(Form_name_3,"Form_name_3") Object.Call(hMyForms["Form_name_1"], "Show", Null) Bye vuott -------------------------------------------- Lun 28/4/14, Jussi Lahtinen ha scritto: Oggetto: Re: [Gambas-user] Form.Show by name as string of form A: "mailing list for gambas users" Data: Luned? 28 Aprile 2014, 16:43 Private hMyForms As New Collection() hMyForms.Add(Form_name_1,"Form_name_1") hMyForms.Add(Form_name_2,"Form_name_2") hMyForms.Add(Form_name_3,"Form_name_3") ... hMyForms["Form_name_1"].Show() Jussi On Mon, Apr 28, 2014 at 10:54 AM, abbat81 wrote: > Hi, > > I have a four forms in my project: > Form_name_1 > Form_name_2 > Form_name_3 > Form_name_4 > Form_name_5 > > > How can I show a form by name of a form by string. > > Public Sub Button1_Click() > >???Dim Form_name As String = "Form_name_2" > >???Form_name.Show > > End > > > > -- > View this message in context: > http://gambas.8142.n7.nabble.com/Form-Show-by-name-as-string-of-form-tp46270.html > Sent from the gambas-user mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos.? Get > unparalleled scalability from the best Selenium testing platform available. > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > ------------------------------------------------------------------------------ "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos.? Get unparalleled scalability from the best Selenium testing platform available. Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From bagoneo at ...69... Tue Apr 29 12:19:07 2014 From: bagoneo at ...69... (gian) Date: Tue, 29 Apr 2014 12:19:07 +0200 Subject: [Gambas-user] Error in TextArea (GAmbas 3.5.3) In-Reply-To: <535F687A.7000200@...17...> References: <535F687A.7000200@...17...> Message-ID: <535F7C9B.7070003@...69...> Hello Wolfgang I confirm your results: With gb.gui: (F3:2853): Gtk-CRITICAL **: IA__gtk_text_buffer_set_text: assertion 'text != NULL' failed With gb.gtk TextArea1.Text is not static With gb.qt4 well works I have Ubuntu 14.04 LTS with Gambas3 3.5.3 Trusty3 Also point out that to me as to other Italian Gambas users the help does not work with gb.gui and gb.gtk. happens to you and to others? Regards gianluigi Il 29/04/2014 10:53, Wolfgang, dl7nb ha scritto: > Hello all, > > I have posted this under "Problem with TextArea in Gambas 3.5.3" but > either it did not get through or I am the only one with this error... > > === > > When trying to erase a textarea.text with the command: > > TextArea1.text = "" > > it does not work and it throws the Gtk-Critical error message: > > (Textarea:9381): Gtk-CRITICAL **: IA__gtk_text_buffer_set_text: > assertion `text != NULL' failed > > === > > Textarea1.clear > > works, without a warning. Why? > > === > > What has changed? > > Wolfgang > > I have added a short example and here is my System-Information: > > [System] > Gambas=3.5.3 > OperatingSystem=Linux > Kernel=3.5.0-48-generic > Architecture=x86 > Distribution=Ubuntu 12.04.4 LTS > Desktop=GNOME > Theme=QGtk > Language=de_DE.UTF-8 > Memory=2000M > [Libraries] > Cairo=libcairo.so.0.0.0 > 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 > OpenGL=libGL.so.1.2.0 > Poppler=libpoppler.so.19.0.0 > Qt4=libQtCore.so.4.8.1 > SDL=libSDL-1.2.so.0.11.3 > > > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. Get > unparalleled scalability from the best Selenium testing platform available. > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user From dl7nb at ...17... Tue Apr 29 12:36:20 2014 From: dl7nb at ...17... (Wolfgang, dl7nb) Date: Tue, 29 Apr 2014 12:36:20 +0200 Subject: [Gambas-user] Error in TextArea (Gambas 3.5.3) In-Reply-To: <535F7C9B.7070003@...69...> References: <535F687A.7000200@...17...> <535F7C9B.7070003@...69...> Message-ID: <535F80A4.6000107@...17...> Hello Gian, help does not work here, too. Well not with all code. Wait for example has its help-text - Textarea has not!! Greetings from Bavaria Wolfgang Am 29.04.2014 12:19, schrieb gian: > Hello Wolfgang > > > I confirm your results: > > > With gb.gui: > > (F3:2853): Gtk-CRITICAL **: IA__gtk_text_buffer_set_text: assertion > 'text != NULL' failed > > > With gb.gtk > > TextArea1.Text is not static > > > With gb.qt4 > > well works > > > I have Ubuntu 14.04 LTS with Gambas3 3.5.3 Trusty3 > > > > Also point out that to me as to other Italian Gambas users the help does > not work with gb.gui and gb.gtk. > > > happens to you and to others? > > > Regards gianluigi > > Il 29/04/2014 10:53, Wolfgang, dl7nb ha scritto: >> Hello all, >> >> I have posted this under "Problem with TextArea in Gambas 3.5.3" but >> either it did not get through or I am the only one with this error... >> >> === >> >> When trying to erase a textarea.text with the command: >> >> TextArea1.text = "" >> >> it does not work and it throws the Gtk-Critical error message: >> >> (Textarea:9381): Gtk-CRITICAL **: IA__gtk_text_buffer_set_text: >> assertion `text != NULL' failed >> >> === >> >> Textarea1.clear >> >> works, without a warning. Why? >> >> === >> >> What has changed? >> >> Wolfgang >> >> I have added a short example and here is my System-Information: >> >> [System] >> Gambas=3.5.3 >> OperatingSystem=Linux >> Kernel=3.5.0-48-generic >> Architecture=x86 >> Distribution=Ubuntu 12.04.4 LTS >> Desktop=GNOME >> Theme=QGtk >> Language=de_DE.UTF-8 >> Memory=2000M >> [Libraries] >> Cairo=libcairo.so.0.0.0 >> 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 >> OpenGL=libGL.so.1.2.0 >> Poppler=libpoppler.so.19.0.0 >> Qt4=libQtCore.so.4.8.1 >> SDL=libSDL-1.2.so.0.11.3 >> >> >> >> ------------------------------------------------------------------------------ >> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE >> Instantly run your Selenium tests across 300+ browser/OS combos. Get >> unparalleled scalability from the best Selenium testing platform available. >> Simple to use. Nothing to install. Get started now for free." >> http://p.sf.net/sfu/SauceLabs >> >> >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. Get > unparalleled scalability from the best Selenium testing platform available. > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From pinozollo at ...626... Tue Apr 29 12:41:39 2014 From: pinozollo at ...626... (Pino Zollo) Date: Tue, 29 Apr 2014 06:41:39 -0400 Subject: [Gambas-user] DBGridEdit Message-ID: <535F81E3.3080709@...626...> In http://gambaswiki.org/wiki/dev/gambas_components DBGridEdit http://encryptec.net/software/gambas-grideditor/ Points to nowhere Pino From jussi.lahtinen at ...626... Tue Apr 29 14:42:09 2014 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Tue, 29 Apr 2014 15:42:09 +0300 Subject: [Gambas-user] Form.Show by name as string of form In-Reply-To: <1398766234.74851.YahooMailBasic@...3274...> References: <1398766234.74851.YahooMailBasic@...3274...> Message-ID: > I tried your suggestion, but an error-notice is raised: > > " Not an object " > Where the error comes? I just tested the code and it works on my system. How do you declare the forms? > Object.Call(hMyForms["Form_name_1"], "Show", Null) > This should be same thing than hMyForms["Form_name_1"].Show. In both cases you need valid object... Jussi From vuott at ...325... Tue Apr 29 16:29:41 2014 From: vuott at ...325... (Ru Vuott) Date: Tue, 29 Apr 2014 15:29:41 +0100 (BST) Subject: [Gambas-user] Form.Show by name as string of form Message-ID: <1398781781.79074.YahooMailBasic@...3268...> Hi Jussi, I created the Forms via IDE and I attributed your names to them. With regard to error, I attached a file immage about it. bye vuottt P.S.: My system: [System] Gambas=3.5.90 OperatingSystem=Linux Kernel=3.11.0-12-generic Architecture=x86_64 Distribution=Linux Mint 16 Petra Desktop=GNOME Theme=QCleanlooks Language=it_IT.UTF-8 Memory=3954M [Libraries] Cairo=libcairo.so.2.11200.16 DBus=libdbus-1.so.3.7.4 GStreamer=libgstreamer-0.10.so.0.30.0 GStreamer=libgstreamer-1.0.so.0.200.0 GTK+3=libgtk-3.so.0.803.4 GTK+=libgtk-x11-2.0.so.0.2400.20 OpenGL=libGL.so.1.2.0 Poppler=libpoppler.so.43.0.0 Qt4=libQtCore.so.4.8.4 SDL=libSDL-1.2.so.0.11.4 -------------------------------------------- Mar 29/4/14, Jussi Lahtinen ha scritto: Oggetto: Re: [Gambas-user] Form.Show by name as string of form A: "mailing list for gambas users" Data: Marted? 29 Aprile 2014, 14:42 > I tried your suggestion, but an error-notice is raised: > >? ? " Not an object " > Where the error comes? I just tested the code and it works on my system. How do you declare the forms? >? ? Object.Call(hMyForms["Form_name_1"], "Show", Null) > This should be same thing than hMyForms["Form_name_1"].Show. In both cases you need valid object... Jussi ------------------------------------------------------------------------------ "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos.? Get unparalleled scalability from the best Selenium testing platform available. Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -------------- next part -------------- A non-text attachment was scrubbed... Name: error.png Type: image/png Size: 16436 bytes Desc: not available URL: From vuott at ...325... Tue Apr 29 16:41:23 2014 From: vuott at ...325... (Ru Vuott) Date: Tue, 29 Apr 2014 15:41:23 +0100 (BST) Subject: [Gambas-user] Form.Show... - BIS In-Reply-To: <1398781781.79074.YahooMailBasic@...3268...> Message-ID: <1398782483.29126.YahooMailBasic@...3268...> .....uhmmm, but if I create the three Forms by code, your suggestion works. well. ...solved. Bye vuott -------------------------------------------- Mar 29/4/14, Ru Vuott ha scritto: Oggetto: Re: [Gambas-user] Form.Show by name as string of form A: "mailing list for gambas users" Data: Marted? 29 Aprile 2014, 16:29 Hi Jussi, I created the Forms via IDE and I attributed your names to them. With regard to error, I attached a file immage about it. bye vuottt P.S.: My system: [System] Gambas=3.5.90 OperatingSystem=Linux Kernel=3.11.0-12-generic Architecture=x86_64 Distribution=Linux Mint 16 Petra Desktop=GNOME Theme=QCleanlooks Language=it_IT.UTF-8 Memory=3954M [Libraries] Cairo=libcairo.so.2.11200.16 DBus=libdbus-1.so.3.7.4 GStreamer=libgstreamer-0.10.so.0.30.0 GStreamer=libgstreamer-1.0.so.0.200.0 GTK+3=libgtk-3.so.0.803.4 GTK+=libgtk-x11-2.0.so.0.2400.20 OpenGL=libGL.so.1.2.0 Poppler=libpoppler.so.43.0.0 Qt4=libQtCore.so.4.8.4 SDL=libSDL-1.2.so.0.11.4 -------------------------------------------- Mar 29/4/14, Jussi Lahtinen ha scritto: Oggetto: Re: [Gambas-user] Form.Show by name as string of form A: "mailing list for gambas users" Data: Marted? 29 Aprile 2014, 14:42 > I tried your suggestion, but an error-notice is raised: > >? ? " Not an object " > Where the error comes? I just tested the code and it works on my system. How do you declare the forms? >? ? Object.Call(hMyForms["Form_name_1"], "Show", Null) > This should be same thing than hMyForms["Form_name_1"].Show. In both cases you need valid object... Jussi ------------------------------------------------------------------------------ "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos.? Get unparalleled scalability from the best Selenium testing platform available. Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -----Segue allegato----- ------------------------------------------------------------------------------ "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos.? Get unparalleled scalability from the best Selenium testing platform available. Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs -----Segue allegato----- _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From sammy_dadds at ...43... Tue Apr 29 16:50:11 2014 From: sammy_dadds at ...43... (sfdadds) Date: Tue, 29 Apr 2014 07:50:11 -0700 (PDT) Subject: [Gambas-user] Form.Show by name as string of form In-Reply-To: <1398671673888-46270.post@...3046...> References: <1398671673888-46270.post@...3046...> Message-ID: <1398783011043-46300.post@...3046...> ' As the class is specified by name, only exported classes can be instanciated. ' could try dynamic load of a form by name hButton = Object.New("Button", [hParent]) 'has exactly the same effect as: hButton = NEW Button(hParent) -- View this message in context: http://gambas.8142.n7.nabble.com/Form-Show-by-name-as-string-of-form-tp46270p46300.html Sent from the gambas-user mailing list archive at Nabble.com. From bagoneo at ...69... Tue Apr 29 20:57:49 2014 From: bagoneo at ...69... (gian) Date: Tue, 29 Apr 2014 20:57:49 +0200 Subject: [Gambas-user] Error in TextArea (Gambas 3.5.3) In-Reply-To: <535F80A4.6000107@...17...> References: <535F687A.7000200@...17...> <535F7C9B.7070003@...69...> <535F80A4.6000107@...17...> Message-ID: <535FF62D.4000707@...69...> Hello Wolfgang, Here Gambas experts recommend waiting, which is just a matter of passing. Recommend that, if possible, it is best to work with QT component. Also my greetings from Liguria gianluigi Il 29/04/2014 12:36, Wolfgang, dl7nb ha scritto: > Hello Gian, > > help does not work here, too. Well not with all code. > > Wait for example has its help-text - Textarea has not!! > > Greetings from Bavaria > > Wolfgang > > > > > > Am 29.04.2014 12:19, schrieb gian: >> Hello Wolfgang >> >> >> I confirm your results: >> >> >> With gb.gui: >> >> (F3:2853): Gtk-CRITICAL **: IA__gtk_text_buffer_set_text: assertion >> 'text != NULL' failed >> >> >> With gb.gtk >> >> TextArea1.Text is not static >> >> >> With gb.qt4 >> >> well works >> >> >> I have Ubuntu 14.04 LTS with Gambas3 3.5.3 Trusty3 >> >> >> >> Also point out that to me as to other Italian Gambas users the help does >> not work with gb.gui and gb.gtk. >> >> >> happens to you and to others? >> >> >> Regards gianluigi >> >> Il 29/04/2014 10:53, Wolfgang, dl7nb ha scritto: >>> Hello all, >>> >>> I have posted this under "Problem with TextArea in Gambas 3.5.3" but >>> either it did not get through or I am the only one with this error... >>> >>> === >>> >>> When trying to erase a textarea.text with the command: >>> >>> TextArea1.text = "" >>> >>> it does not work and it throws the Gtk-Critical error message: >>> >>> (Textarea:9381): Gtk-CRITICAL **: IA__gtk_text_buffer_set_text: >>> assertion `text != NULL' failed >>> >>> === >>> >>> Textarea1.clear >>> >>> works, without a warning. Why? >>> >>> === >>> >>> What has changed? >>> >>> Wolfgang >>> >>> I have added a short example and here is my System-Information: >>> >>> [System] >>> Gambas=3.5.3 >>> OperatingSystem=Linux >>> Kernel=3.5.0-48-generic >>> Architecture=x86 >>> Distribution=Ubuntu 12.04.4 LTS >>> Desktop=GNOME >>> Theme=QGtk >>> Language=de_DE.UTF-8 >>> Memory=2000M >>> [Libraries] >>> Cairo=libcairo.so.0.0.0 >>> 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 >>> OpenGL=libGL.so.1.2.0 >>> Poppler=libpoppler.so.19.0.0 >>> Qt4=libQtCore.so.4.8.1 >>> SDL=libSDL-1.2.so.0.11.3 >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE >>> Instantly run your Selenium tests across 300+ browser/OS combos. Get >>> unparalleled scalability from the best Selenium testing platform available. >>> Simple to use. Nothing to install. Get started now for free." >>> http://p.sf.net/sfu/SauceLabs >>> >>> >>> _______________________________________________ >>> Gambas-user mailing list >>> Gambas-user at lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/gambas-user >> ------------------------------------------------------------------------------ >> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE >> Instantly run your Selenium tests across 300+ browser/OS combos. Get >> unparalleled scalability from the best Selenium testing platform available. >> Simple to use. Nothing to install. Get started now for free." >> http://p.sf.net/sfu/SauceLabs >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. Get > unparalleled scalability from the best Selenium testing platform available. > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > From dl7nb at ...17... Tue Apr 29 21:16:00 2014 From: dl7nb at ...17... (Wolfgang (DL7NB)) Date: Tue, 29 Apr 2014 21:16:00 +0200 Subject: [Gambas-user] Error in TextArea (Gambas 3.5.3) In-Reply-To: <535FF62D.4000707@...69...> References: <535F687A.7000200@...17...> <535F7C9B.7070003@...69...> <535F80A4.6000107@...17...> <535FF62D.4000707@...69...> Message-ID: <2b03ef3d-fa71-4a26-b404-05ebafd6829f@...2550...> Hello Gianluigi, That is what I think, too. Will check if I can use th QT component. This problem is known now. As I know all the great code artists this will not be a problem for a long time. And I have a workaround for my code which was done fast. Compared to other compilers - even highly priced ones - Gambas is by far the best one I have used in years!!! Thank you for time! Greetings Wolfgang gian schrieb: >Hello Wolfgang, > > >Here Gambas experts recommend waiting, which is just a matter of >passing. > >Recommend that, if possible, it is best to work with QT component. > >Also my greetings from Liguria > > >gianluigi > > >Il 29/04/2014 12:36, Wolfgang, dl7nb ha scritto: >> Hello Gian, >> >> help does not work here, too. Well not with all code. >> >> Wait for example has its help-text - Textarea has not!! >> >> Greetings from Bavaria >> >> Wolfgang >> >> >> >> >> >> Am 29.04.2014 12:19, schrieb gian: >>> Hello Wolfgang >>> >>> >>> I confirm your results: >>> >>> >>> With gb.gui: >>> >>> (F3:2853): Gtk-CRITICAL **: IA__gtk_text_buffer_set_text: assertion >>> 'text != NULL' failed >>> >>> >>> With gb.gtk >>> >>> TextArea1.Text is not static >>> >>> >>> With gb.qt4 >>> >>> well works >>> >>> >>> I have Ubuntu 14.04 LTS with Gambas3 3.5.3 Trusty3 >>> >>> >>> >>> Also point out that to me as to other Italian Gambas users the help >does >>> not work with gb.gui and gb.gtk. >>> >>> >>> happens to you and to others? >>> >>> >>> Regards gianluigi >>> >>> Il 29/04/2014 10:53, Wolfgang, dl7nb ha scritto: >>>> Hello all, >>>> >>>> I have posted this under "Problem with TextArea in Gambas 3.5.3" >but >>>> either it did not get through or I am the only one with this >error... >>>> >>>> === >>>> >>>> When trying to erase a textarea.text with the command: >>>> >>>> TextArea1.text = "" >>>> >>>> it does not work and it throws the Gtk-Critical error message: >>>> >>>> (Textarea:9381): Gtk-CRITICAL **: >IA__gtk_text_buffer_set_text: >>>> assertion `text != NULL' failed >>>> >>>> === >>>> >>>> Textarea1.clear >>>> >>>> works, without a warning. Why? >>>> >>>> === >>>> >>>> What has changed? >>>> >>>> Wolfgang >>>> >>>> I have added a short example and here is my System-Information: >>>> >>>> [System] >>>> Gambas=3.5.3 >>>> OperatingSystem=Linux >>>> Kernel=3.5.0-48-generic >>>> Architecture=x86 >>>> Distribution=Ubuntu 12.04.4 LTS >>>> Desktop=GNOME >>>> Theme=QGtk >>>> Language=de_DE.UTF-8 >>>> Memory=2000M >>>> [Libraries] >>>> Cairo=libcairo.so.0.0.0 >>>> 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 >>>> OpenGL=libGL.so.1.2.0 >>>> Poppler=libpoppler.so.19.0.0 >>>> Qt4=libQtCore.so.4.8.1 >>>> SDL=libSDL-1.2.so.0.11.3 >>>> >>>> >>>> >>>> >------------------------------------------------------------------------------ >>>> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For >FREE >>>> Instantly run your Selenium tests across 300+ browser/OS combos. >Get >>>> unparalleled scalability from the best Selenium testing platform >available. >>>> Simple to use. Nothing to install. Get started now for free." >>>> http://p.sf.net/sfu/SauceLabs >>>> >>>> >>>> _______________________________________________ >>>> Gambas-user mailing list >>>> Gambas-user at lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>> >------------------------------------------------------------------------------ >>> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For >FREE >>> Instantly run your Selenium tests across 300+ browser/OS combos. >Get >>> unparalleled scalability from the best Selenium testing platform >available. >>> Simple to use. Nothing to install. Get started now for free." >>> http://p.sf.net/sfu/SauceLabs >>> _______________________________________________ >>> Gambas-user mailing list >>> Gambas-user at lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>> >> >> >------------------------------------------------------------------------------ >> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For >FREE >> Instantly run your Selenium tests across 300+ browser/OS combos. Get >> unparalleled scalability from the best Selenium testing platform >available. >> Simple to use. Nothing to install. Get started now for free." >> http://p.sf.net/sfu/SauceLabs >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> >> > >------------------------------------------------------------------------------ >"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE >Instantly run your Selenium tests across 300+ browser/OS combos. Get >unparalleled scalability from the best Selenium testing platform >available. >Simple to use. Nothing to install. Get started now for free." >http://p.sf.net/sfu/SauceLabs >_______________________________________________ >Gambas-user mailing list >Gambas-user at lists.sourceforge.net >https://lists.sourceforge.net/lists/listinfo/gambas-user From jussi.lahtinen at ...626... Tue Apr 29 23:50:51 2014 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Wed, 30 Apr 2014 00:50:51 +0300 Subject: [Gambas-user] Form.Show... - BIS In-Reply-To: <1398782483.29126.YahooMailBasic@...3268...> References: <1398781781.79074.YahooMailBasic@...3268...> <1398782483.29126.YahooMailBasic@...3268...> Message-ID: Yes, you need to instantiate them; class --> object. Forms are just static classes. Jussi On Tue, Apr 29, 2014 at 5:41 PM, Ru Vuott wrote: > .....uhmmm, but if I create the three Forms by code, your suggestion works. > > well. ...solved. > > Bye > vuott > > > > -------------------------------------------- > Mar 29/4/14, Ru Vuott ha scritto: > > Oggetto: Re: [Gambas-user] Form.Show by name as string of form > A: "mailing list for gambas users" > Data: Marted? 29 Aprile 2014, 16:29 > > Hi Jussi, > > I created the Forms via IDE and I attributed your names to > them. > > With regard to error, I attached a file immage about it. > > bye > vuottt > > P.S.: My system: > > [System] > Gambas=3.5.90 > OperatingSystem=Linux > Kernel=3.11.0-12-generic > Architecture=x86_64 > Distribution=Linux Mint 16 Petra > Desktop=GNOME > Theme=QCleanlooks > Language=it_IT.UTF-8 > Memory=3954M > [Libraries] > Cairo=libcairo.so.2.11200.16 > DBus=libdbus-1.so.3.7.4 > GStreamer=libgstreamer-0.10.so.0.30.0 > GStreamer=libgstreamer-1.0.so.0.200.0 > GTK+3=libgtk-3.so.0.803.4 > GTK+=libgtk-x11-2.0.so.0.2400.20 > OpenGL=libGL.so.1.2.0 > Poppler=libpoppler.so.43.0.0 > Qt4=libQtCore.so.4.8.4 > SDL=libSDL-1.2.so.0.11.4 > > > > > > -------------------------------------------- > Mar 29/4/14, Jussi Lahtinen > ha scritto: > > Oggetto: Re: [Gambas-user] Form.Show by name as string of > form > A: "mailing list for gambas users" > Data: Marted? 29 Aprile 2014, 14:42 > > > I tried your > suggestion, but an error-notice is raised: > > > > " Not an > object " > > > > Where the error comes? > I just > tested the code and it works on my system. > How do you declare the forms? > > > > > > > Object.Call(hMyForms["Form_name_1"], > "Show", Null) > > > > This should be same thing than > hMyForms["Form_name_1"].Show. In both cases > you need valid object... > > > > Jussi > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated > Cross-Browser Testing - For FREE > Instantly > run your Selenium tests across 300+ browser/OS combos. > Get > > unparalleled scalability from the best > Selenium testing platform available. > Simple > to use. Nothing to install. Get started now for > free." > http://p.sf.net/sfu/SauceLabs > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -----Segue allegato----- > > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing > - For FREE > Instantly run your Selenium tests across 300+ browser/OS > combos. Get > unparalleled scalability from the best Selenium testing > platform available. > Simple to use. Nothing to install. Get started now for > free." > http://p.sf.net/sfu/SauceLabs > -----Segue allegato----- > > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. Get > unparalleled scalability from the best Selenium testing platform available. > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > _______________________________________________ > Gambas-user mailing list > Gambas-user at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > From vuott at ...325... Wed Apr 30 21:41:53 2014 From: vuott at ...325... (Ru Vuott) Date: Wed, 30 Apr 2014 20:41:53 +0100 (BST) Subject: [Gambas-user] Isn't "Allegro" cheerful with Gambas ? Message-ID: <1398886913.16886.YahooMailBasic@...3268...> Hello, ...following "Allegro4" API guide, I wrote an little application in C language (here attached) to play an audio file WAV. ***The application works regularly.*** I tried to transpose that C code in "Gambas code" (here attached), but... it does not work. I don't understand why. What confuses me most is: if I compile that C code like a "shared library" .so, and then I use it by calling with Gambas, very strangely the "shared library" doesn't work. To sum up: - using via Terminal or via Gambas with "Shell" function the C compiled code, it works. - compiling that C code like a "shared library" .so and then calling it via Gambas with "Shell" function, it doesn't work; - using external "Allegro4" functions via pure Gambas code, it doesn't work; Maybe... has anyone an idea why... ? :-X regards vuott (European Union - Italia) -------------- next part -------------- A non-text attachment was scrubbed... Name: allegroWAV.c Type: text/x-csrc Size: 1243 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: allegroWAV_Gambas-0.0.1.tar.gz Type: application/gzip Size: 5367 bytes Desc: not available URL: From jussi.lahtinen at ...626... Wed Apr 30 21:55:18 2014 From: jussi.lahtinen at ...626... (Jussi Lahtinen) Date: Wed, 30 Apr 2014 22:55:18 +0300 Subject: [Gambas-user] Isn't "Allegro" cheerful with Gambas ? In-Reply-To: <1398886913.16886.YahooMailBasic@...3268...> References: <1398886913.16886.YahooMailBasic@...3268...> Message-ID: > - compiling that C code like a "shared library" .so and then calling it > via Gambas with "Shell" function, it doesn't work; > You cannot just compile it as shared library, because it doesn't export any functionality. IE it's program not library. - using external "Allegro4" functions via pure Gambas code, it doesn't work; > I will look this later. Jussi From taboege at ...626... Wed Apr 30 22:20:07 2014 From: taboege at ...626... (Tobias Boege) Date: Wed, 30 Apr 2014 22:20:07 +0200 Subject: [Gambas-user] Isn't "Allegro" cheerful with Gambas ? In-Reply-To: <1398886913.16886.YahooMailBasic@...3268...> References: <1398886913.16886.YahooMailBasic@...3268...> Message-ID: <20140430202007.GB525@...2774...> On Wed, 30 Apr 2014, Ru Vuott wrote: > Hello, > > ...following "Allegro4" API guide, I wrote an little application in C language (here attached) to play an audio file WAV. > ***The application works regularly.*** > > I tried to transpose that C code in "Gambas code" (here attached), but... it does not work. I don't understand why. > > What confuses me most is: if I compile that C code like a "shared library" .so, and then I use it by calling with Gambas, very strangely the "shared library" doesn't work. > > > To sum up: > - using via Terminal or via Gambas with "Shell" function the C compiled code, it works. > - compiling that C code like a "shared library" .so and then calling it via Gambas with "Shell" function, it doesn't work; As Jussi said, you need to give us the command you used to "compile like a shared library" because you may have done it wrong... > - using external "Allegro4" functions via pure Gambas code, it doesn't work; > > Maybe... has anyone an idea why... ? :-X > Concerning the general idea: I know allegro (version 5, though) a little bit and I think you should really write an actual C component for Gambas programs to interface with. That would save you one or the other problem in the long term. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From epost at ...3323... Wed Apr 30 22:47:06 2014 From: epost at ...3323... (=?ISO-8859-1?Q?J=F8rn_Erik_M=F8rne?=) Date: Wed, 30 Apr 2014 22:47:06 +0200 Subject: [Gambas-user] TreeView: Change parent key Message-ID: <5361614A.6050005@...3323...> I've got the newest Gambas development version now and can confirm that the .Reparent() works beautifully! Thanks a lot! ------------------------------ Message: 2 Date: Sat, 26 Apr 2014 16:32:37 +0200 From: Beno?t Minisini Subject: Re: [Gambas-user] TreeView: Change parent key To: mailing list for gambas users Message-ID: <535BC385.3020009 at ...1...> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Le 23/04/2014 23:13, J?rn Erik M?rne a ?crit : > Hi! > > Is there a way with the TreeView component to change an item's parent key? > > Now, I have to clear out all elements, and reload them each time I > want to move an item to another parent, and this also resets the > current opened/closed status of each item, which clutters the users's > experience a bit. > > Perhaps there's a good way I haven't thought of? > > Regards, > Erik > I added a Reparent() method to the TreeView items in revision #6250. Tell me if it works for you. I now leave and will come back from holidays next week, so I won't be able to answer before. Regards, -- Beno?t Minisini ------------------------------ From keithclark at ...2185... Wed Apr 30 23:03:09 2014 From: keithclark at ...2185... (Keith Clark) Date: Wed, 30 Apr 2014 17:03:09 -0400 Subject: [Gambas-user] Ubuntu 14.04 update and Gambas executables Message-ID: <5361650D.7080006@...2185...> After a recent update to Ubuntu 14.04 on a couple of my computers, I can no longer execute my GAMBAS programs. No errors are given, they are just not executable anymore. Ubuntu does not seem to know what to do with them. They are not project files, but executables. This happened on two different machines where those executables were used on a daily basis for years before this upgrade. Thanks for any help, Keith From iss_boss at ...770... Wed Apr 30 23:29:25 2014 From: iss_boss at ...770... (ISS Boss) Date: Wed, 30 Apr 2014 17:29:25 -0400 Subject: [Gambas-user] Ubuntu 14.04 update and Gambas executables In-Reply-To: <5361650D.7080006@...2185...> References: <5361650D.7080006@...2185...> Message-ID: <53616B35.8040006@...770...> Give this a try: sudo add-apt-repository ppa:nemh/gambas3 sudo apt-get update duso apt-get install gambas3 I got bit by the same thing when 12.04 came along. My original install of Gambas apparently came from a different source. When i did this, I got Gambas updated and my old executables started to work again. Bill Keith Clark wrote, On 04/30/2014 17:03: After a recent update to Ubuntu 14.04 on a couple of my computers, I can no longer execute my GAMBAS programs. No errors are given, they are just not executable anymore. Ubuntu does not seem to know what to do with them. They are not project files, but executables. This happened on two different machines where those executables were used on a daily basis for years before this upgrade. Thanks for any help, Keith ------------------------------------------------------------------------------ "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available. Simple to use. Nothing to install. Get started now for free." [1]http://p.sf.net/sfu/SauceLabs _______________________________________________ Gambas-user mailing list [2]Gambas-user at lists.sourceforge.net [3]https://lists.sourceforge.net/lists/listinfo/gambas-user References 1. http://p.sf.net/sfu/SauceLabs 2. mailto:Gambas-user at lists.sourceforge.net 3. https://lists.sourceforge.net/lists/listinfo/gambas-user From taboege at ...626... Wed Apr 30 23:28:39 2014 From: taboege at ...626... (Tobias Boege) Date: Wed, 30 Apr 2014 23:28:39 +0200 Subject: [Gambas-user] Ubuntu 14.04 update and Gambas executables In-Reply-To: <5361650D.7080006@...2185...> References: <5361650D.7080006@...2185...> Message-ID: <20140430212839.GD525@...2774...> On Wed, 30 Apr 2014, Keith Clark wrote: > After a recent update to Ubuntu 14.04 on a couple of my computers, I can > no longer execute my GAMBAS programs. No errors are given, they are > just not executable anymore. Ubuntu does not seem to know what to do > with them. > > They are not project files, but executables. This happened on two > different machines where those executables were used on a daily basis > for years before this upgrade. > Sorry, I have no idea about Ubuntu but I think a blind guess is better than nothing...? First: What do you mean by "no errors are given"? Did you click on some icon and nothing showed up? Or did you execute gbx3/gbr3 from terminal and it went away silently (because that would be really bad). Could you try to reinstall Gambas on top of that upgrade? Maybe some mime information got overwritten accidentally? Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From vuott at ...325... Wed Apr 30 23:33:43 2014 From: vuott at ...325... (Ru Vuott) Date: Wed, 30 Apr 2014 22:33:43 +0100 (BST) Subject: [Gambas-user] Isn't "Allegro" cheerful with Gambas ? In-Reply-To: Message-ID: <1398893623.22907.YahooMailBasic@...3273...> > You cannot just compile it as > shared library, because it doesn't export any > functionality. IE it's program not library. It's so strange that. I tranformed many C codes in shared library (i.e. "aplaymidi") and all worked ! > I will look this later. Thank you, Jussi Bye vuott ------------------------------------------------------------------------------ "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos.? Get unparalleled scalability from the best Selenium testing platform available. Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user From keithclark at ...2185... Wed Apr 30 23:46:16 2014 From: keithclark at ...2185... (Keith Clark) Date: Wed, 30 Apr 2014 17:46:16 -0400 Subject: [Gambas-user] Ubuntu 14.04 update and Gambas executables In-Reply-To: <53616B35.8040006@...770...> References: <5361650D.7080006@...2185...> <53616B35.8040006@...770...> Message-ID: <53616F28.2020101@...2185...> But I did do a fresh install from the Ubuntu repos of Gambas 3. Should that not have done the same thing? Keith On 14-04-30 05:29 PM, ISS Boss wrote: > Give this a try: > sudo add-apt-repository ppa:nemh/gambas3 > sudo apt-get update > duso apt-get install gambas3 > I got bit by the same thing when 12.04 came along. My original install of > Gambas apparently came from a different source. When i did this, I got > Gambas updated and my old executables started to work again. > Bill > > Keith Clark wrote, On 04/30/2014 17:03: > > After a recent update to Ubuntu 14.04 on a couple of my computers, I can > no longer execute my GAMBAS programs. No errors are given, they are > just not executable anymore. Ubuntu does not seem to know what to do > with them. > > They are not project files, but executables. This happened on two > different machines where those executables were used on a daily basis > for years before this upgrade. > > Thanks for any help, > > Keith > From vuott at ...325... Wed Apr 30 23:48:44 2014 From: vuott at ...325... (Ru Vuott) Date: Wed, 30 Apr 2014 22:48:44 +0100 (BST) Subject: [Gambas-user] Isn't "Allegro" cheerful with Gambas ? In-Reply-To: <20140430202007.GB525@...2774...> Message-ID: <1398894524.74701.YahooMailBasic@...3273...> > As Jussi said, you need to give us the command > you used to "compile like a shared > library" because you may have done it wrong... Hi Tobi, well, I used this line-command in Gambas code: Shell "gcc -o /tmp/allegroWAV.so " & Application.Path &/ "allegroWAV.c '/usr/lib/x86_64-linux-gnu/liballeg.so.4.4.2' -shared -fPIC" Wait > I think you should really write an actual C component for Gambas > programs to interface with. That would save you one or the other problem in the long term. Uhmmm... I understand. Thanks bye vuott