From gambas at ...1... Sun Nov 1 14:26:43 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sun, 1 Nov 2009 14:26:43 +0100 Subject: [Gambas-devel] Problem with MoveScale saved into .form files on gambas2 In-Reply-To: <4a173bfc0910291542k651d399k7f816ab7b79dce30@...178...> References: <4a173bfc0910291542k651d399k7f816ab7b79dce30@...178...> Message-ID: <200911011426.43528.gambas@...1...> > Hi > > Some days ago a FreeBSD user report to me about a problem with gambas2 > forms. The main problem was that forms were not displayed any controls > in there, but if we open a project from gambas2-examples it works > without problems. I tested with 2.15.2, 2.16 and 2.17 and It doesn't > work in those versions too. > > I was investigating about that and I found that MoveScaled value into > .form files are saved like zero ( MoveScaled(0,0,0,0) ). It is not > working fine in FreeBSD. My question is what is the component of > gambas2 used for save MoveScaled value to .form files? and what files > could I see for fix the problem? > > Greetings > ACM > I am almost sure that it is a bug in the Round() function on FreeBSD. Can you confirm that by running: gbx2 -e "Round(100 / 7, -4)" ? It must return 14.2857. Regards, -- Beno?t Minisini From gambas at ...1... Sun Nov 1 14:53:18 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sun, 1 Nov 2009 14:53:18 +0100 Subject: [Gambas-devel] Issue with menus in GB3 last svn In-Reply-To: <200910170056.07256.gambas@...1...> References: <83453ff10909301011q433607c9v45ea7bbff1404cdc@...178...> <200910170056.07256.gambas@...1...> Message-ID: <200911011453.18266.gambas@...1...> > > Hi Benoit, > > > > I saw when you create a menu, in the form editor the menu doesn't appear. > > We can see the "menu bar" without its elements. > > > > However, when you quit the IDE and re-open the current project (which > > contains menus), the menu appears well afterwards. > > > > Fran?ois. > > I fixed that in the last /trunk, but I introduced a new bug (quitting the > IDE can crash or enter an infinite loop). Because of theatre, I didn't > have the time to fix it yet. > > Regards, > The issue should have been fixed now. Regards, -- Beno?t Minisini From gambas at ...1... Sun Nov 1 15:03:10 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sun, 1 Nov 2009 15:03:10 +0100 Subject: [Gambas-devel] New feature?? In-Reply-To: <26032442.post@...565...> References: <25968980.post@...565...> <26032442.post@...565...> Message-ID: <200911011503.10071.gambas@...1...> > gene1943 wrote: > > Benoit > > I would like to see a collapse all expand all menu item on the > > ide popup menu to manaage subs display > > > > thanks > > Iwas talking about the editor > the feature that allows programmer to display or hide each sub's contents > > I nroke my glasses and am almost blind for the present/ > You have the CTRL+SHIFT+RETURN shortcut that does what you want I think. Or you can double-click on the little arrow displayed beside the procedure name. Regards, -- Beno?t Minisini From gambas at ...1... Sun Nov 1 15:23:15 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sun, 1 Nov 2009 15:23:15 +0100 Subject: [Gambas-devel] Suggestiong for colour picker in IDE In-Reply-To: <200910271000.21136.rterry@...627...> References: <200910271000.21136.rterry@...627...> Message-ID: <200911011523.15727.gambas@...1...> > Benoit, > > Remember I asked you about getting finer control of the color values and > you mentioned that holding down the shift key was the answer. > > You could put a little label to the left of the buttons down the bottom so > that everyone could pick up that little hint. > > Regards > > Richard > You should be satisfied with the revision #2404. Regards, -- Beno?t Minisini From gambas at ...1... Sun Nov 1 15:24:14 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sun, 1 Nov 2009 15:24:14 +0100 Subject: [Gambas-devel] Feature request In-Reply-To: <773248.18357.qm@...587...> References: <569913.79859.qm@...587...> <200910022156.27891.gambas@...1...> <773248.18357.qm@...587...> Message-ID: <200911011524.14157.gambas@...1...> > mmmm interesting, Hope this means we will have the feature soon :) > > Regards > > > -- > David > > Done in revision #2403, for Gambas 3. Regards, -- Beno?t Minisini From acm at ...641... Mon Nov 2 19:24:54 2009 From: acm at ...641... (=?ISO-8859-1?Q?Alonso_C=E1rdenas_M=E1rquez?=) Date: Mon, 2 Nov 2009 13:24:54 -0500 Subject: [Gambas-devel] Problem with MoveScale saved into .form files on gambas2 In-Reply-To: <200911011426.43528.gambas@...1...> References: <4a173bfc0910291542k651d399k7f816ab7b79dce30@...178...> <200911011426.43528.gambas@...1...> Message-ID: <4a173bfc0911021024y5c86c428jebf0d0512956d3d2@...178...> 2009/11/1 Beno?t Minisini : >> Hi >> >> Some days ago a FreeBSD user report to me about a problem with gambas2 >> forms. The main problem was that forms were not displayed any controls >> in there, but if we open a project from gambas2-examples it works >> without problems. I tested with 2.15.2, 2.16 and 2.17 and It doesn't >> work in those versions too. >> >> I was investigating about that and I found that MoveScaled value into >> .form files are saved like zero ( MoveScaled(0,0,0,0) ). It is not >> working fine in FreeBSD. My question is what is the component of >> gambas2 used for save MoveScaled value to .form files? and what files >> could I see for fix the problem? >> >> Greetings >> ACM >> > > I am almost sure that it is a bug in the Round() function on FreeBSD. > > Can you confirm that by running: gbx2 -e "Round(100 / 7, -4)" ? > > It must return 14.2857. > > Regards, > > -- > Beno?t Minisini > It is 1,42857 here. -3 -> 1,4286 -2 -> 1,429 -1 -> 1,43 0 -> 1,4 well, you are right it is a problem in the round function. where could I see for try fix the problem? Greetings ACM From Karl.Reinl at ...16... Fri Nov 13 21:03:10 2009 From: Karl.Reinl at ...16... (Charlie Reinl) Date: Fri, 13 Nov 2009 21:03:10 +0100 Subject: [Gambas-devel] minor IDE-Bug concerning svn Message-ID: <1258142590.6404.12.camel@...102...> Salut, found a minor IDE-Bug concerning svn: if the "project is translatable" and you delete a Form, after the .lang/.pot is show with a !, but no more on the disc, So I think it it is still registered in svn. Seen in gambas2 2.17.xx -- Amicalment Charlie [OperatingSystem] OperatingSystem=Linux KernelRelease=2.6.24-25-generic DistributionVendor=ubuntu DistributionRelease="Ubuntu 8.04.3 LTS" [System] CPUArchitecture=i686 TotalRam=506932 kB [Gambas] Gambas1=gbx-1.0.17 Gambas1Path=/usr/bin/gbx Gambas2=2.17.0 Gambas2Path=/usr/local/bin/gbx2 Gambas3=2.99.0 Gambas3Path=/usr/local/bin/gbx3 From Karl.Reinl at ...16... Sat Nov 14 17:02:38 2009 From: Karl.Reinl at ...16... (Charlie Reinl) Date: Sat, 14 Nov 2009 17:02:38 +0100 Subject: [Gambas-devel] two minor ++ IDE-Bugs Message-ID: <1258214558.9149.14.camel@...102...> Salut, two minor ++ IDE-Bugs (seen in gambas2-IDE). 1. in the IDE, make an Executable (Ctrl+Alt+M) which is a component. Then load a "normal" project and make an Executable (Ctrl+Alt+M). The component dialog is still there "Install in the user component directory" 2. gambas2 user-components If your project (which is a component) moves, you have to delete the 4 links concerned, because and bad MakeLink procedure in the IDE. 'PRIVATE SUB MakeLink_OLD(sSrc AS String, sDst AS String) ' IF NOT Exist(sDst) THEN LINK sSrc TO sDst 'END ' -- Amicalment Charlie [OperatingSystem] OperatingSystem=Linux KernelRelease=2.6.24-25-generic DistributionVendor=ubuntu DistributionRelease="Ubuntu 8.04.3 LTS" [System] CPUArchitecture=i686 TotalRam=506932 kB [Gambas] Gambas1=gbx-1.0.17 Gambas1Path=/usr/bin/gbx Gambas2=2.17.0 Gambas2Path=/usr/local/bin/gbx2 Gambas3=2.99.0 Gambas3Path=/usr/local/bin/gbx3 From gambas at ...1... Sun Nov 15 03:02:03 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sun, 15 Nov 2009 03:02:03 +0100 Subject: [Gambas-devel] un-added svn files moving to another directory In-Reply-To: <200910202031.16211.rterry@...627...> References: <200910202031.16211.rterry@...627...> Message-ID: <200911150302.03477.gambas@...1...> > I just noticed that if one adds files to the gambas ide from outside, and > then drags them to another directory the little icon which normally > notifies the user that the file is not yet added to svn disappears. The > files then appear to be already placed under version control even though > one hasn't told gambas to do that. > > Nothing greatly important I guess. > > Regards > > richard > Because then the file is then placed under version control automatically. As files not under version control are normally a mistake, is it a problem? -- Beno?t Minisini From gambas at ...1... Sun Nov 15 02:40:10 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sun, 15 Nov 2009 02:40:10 +0100 Subject: [Gambas-devel] two minor ++ IDE-Bugs In-Reply-To: <1258214558.9149.14.camel@...102...> References: <1258214558.9149.14.camel@...102...> Message-ID: <200911150240.10978.gambas@...1...> > Salut, > > two minor ++ IDE-Bugs (seen in gambas2-IDE). > > 1. in the IDE, make an Executable (Ctrl+Alt+M) which is a component. > Then load a "normal" project and make an Executable (Ctrl+Alt+M). > The component dialog is still there "Install in the user component > directory" > OK, I will fix that in the next commit. > 2. gambas2 user-components > > If your project (which is a component) moves, you have to delete > the 4 links concerned, I don't understand the following sentences: > because and bad MakeLink procedure in the IDE. > > 'PRIVATE SUB MakeLink_OLD(sSrc AS String, sDst AS String) > ' IF NOT Exist(sDst) THEN LINK sSrc TO sDst > 'END > ' > Can you explain again? -- Beno?t Minisini From Karl.Reinl at ...16... Sun Nov 15 11:46:02 2009 From: Karl.Reinl at ...16... (Charlie Reinl) Date: Sun, 15 Nov 2009 11:46:02 +0100 Subject: [Gambas-devel] two minor ++ IDE-Bugs In-Reply-To: <200911150240.10978.gambas@...1...> References: <1258214558.9149.14.camel@...102...> <200911150240.10978.gambas@...1...> Message-ID: <1258281963.6408.14.camel@...102...> Am Sonntag, den 15.11.2009, 02:40 +0100 schrieb Beno?t Minisini: > > Salut, > > > > two minor ++ IDE-Bugs (seen in gambas2-IDE). > > > > 1. in the IDE, make an Executable (Ctrl+Alt+M) which is a component. > > Then load a "normal" project and make an Executable (Ctrl+Alt+M). > > The component dialog is still there "Install in the user component > > directory" > > > > OK, I will fix that in the next commit. > > > 2. gambas2 user-components > > > > If your project (which is a component) moves, you have to delete > > the 4 links concerned, > > I don't understand the following sentences: > > > because and bad MakeLink procedure in the IDE. > > > > 'PRIVATE SUB MakeLink_OLD(sSrc AS String, sDst AS String) > > ' IF NOT Exist(sDst) THEN LINK sSrc TO sDst > > 'END > > ' > > > > Can you explain again? Salut, the shown MakeLink out of gambas IDE does not create a link if the link (file) exists. Sometimes for testing matters, I make a copy of the project. Then the .gambas2 is no more the one who's pointed by the link (which exists), but the link is not created, because the link exists. Attached a test project. -- Amicalment Charlie [OperatingSystem] OperatingSystem=Linux KernelRelease=2.6.24-25-generic DistributionVendor=ubuntu DistributionRelease="Ubuntu 8.04.3 LTS" [System] CPUArchitecture=i686 TotalRam=506932 kB [Gambas] Gambas1=gbx-1.0.17 Gambas1Path=/usr/bin/gbx Gambas2=2.17.0 Gambas2Path=/usr/local/bin/gbx2 Gambas3=2.99.0 Gambas3Path=/usr/local/bin/gbx3 -------------- next part -------------- A non-text attachment was scrubbed... Name: firstTry-0.0.1.MakeLink.tar.gz Type: application/x-compressed-tar Size: 8575 bytes Desc: not available URL: From gambas at ...1... Sun Nov 15 15:10:03 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sun, 15 Nov 2009 15:10:03 +0100 Subject: [Gambas-devel] minor IDE-Bug concerning svn In-Reply-To: <1258142590.6404.12.camel@...102...> References: <1258142590.6404.12.camel@...102...> Message-ID: <200911151510.03918.gambas@...1...> > Salut, > > found a minor IDE-Bug concerning svn: > if the "project is translatable" and you delete a Form, after the > .lang/.pot is show with a !, but no more on the disc, > So I think it it is still registered in svn. > > Seen in gambas2 2.17.xx > Fixed in revision #2420. Regards, -- Beno?t Minisini From david_villalobos_c at ...7... Thu Nov 19 14:56:41 2009 From: david_villalobos_c at ...7... (David Villalobos Cambronero) Date: Thu, 19 Nov 2009 05:56:41 -0800 (PST) Subject: [Gambas-devel] TimePicker Message-ID: <463891.8352.qm@...596...> Hi Beno?t, days ago I was theaching Gambas and my students tell me that it will be nice to have a TimePicker. Here is a first try to do that. I would like to know you comments. I think is a nice control to add to gb.form. Regards -- David -------------- next part -------------- A non-text attachment was scrubbed... Name: TimePicker-0.0.1.tar.gz Type: application/x-gzip Size: 10358 bytes Desc: not available URL: From sanyaade at ...255... Thu Nov 19 14:57:15 2009 From: sanyaade at ...255... (sanyaade at ...255...) Date: Thu, 19 Nov 2009 05:57:15 -0800 Subject: [Gambas-devel] [SPAM] Vacation reply In-Reply-To: <463891.8352.qm@...596...> Message-ID: An HTML attachment was scrubbed... URL: From gambas at ...1... Thu Nov 19 15:34:42 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Thu, 19 Nov 2009 15:34:42 +0100 Subject: [Gambas-devel] TimePicker In-Reply-To: <463891.8352.qm@...596...> References: <463891.8352.qm@...596...> Message-ID: <200911191534.42596.gambas@...1...> > Hi Beno?t, days ago I was theaching Gambas and my students tell me that it > will be nice to have a TimePicker. Here is a first try to do that. > > I would like to know you comments. I think is a nice control to add to > gb.form. > > > > Regards > > > -- > David > OK, but: - Why making a popup? Put the three SpinBox directly inside the control. And create a ReadOnly property. - If you prefer making a popup because you find that nicer, align its left to the left of the control, I think it's better. You should add a panel with a plain border as first popup child, so that the popup is clearly visible. And you should hide the popup as soon as it loose focus. Alas, there is a weird behaviour in gb.qt4: borderless windows prevent their children controls from raising focus events! As soon as it is fixed, you will be able to hide the popup correctly. - The Value property seems to be a string. It must be a Date. The Date datatype includes both date and time, so you should use it for time values too. - The time format is usually "hh:nn:ss" (Gambas Format$ syntax), but is it true in all languages? The control should analyze: Format(CDate("01:02:03"), gb.LongTime) to see in which order it gets hours, minutes and seconds. And adapt the order of SpinBox controls accordingly. - In the same way, you should follow the System.RightToLeft property, which tells you if the current language is right to left written. For such languages, the order of SpinBox will be reversed, as well as the alignment of the popup. - The Format property should use two constants, not the 12 and 24 integer values. - The ToSeconds/ToMinutes/ToHours properties should be removed. They are actually helper functions related to the Date datatype, not really related to the control itself. I don't say that they are not useful, but putting them inside the control source code is not a good idea. Regards, -- Beno?t Minisini From sanyaade at ...255... Thu Nov 19 15:35:17 2009 From: sanyaade at ...255... (sanyaade at ...255...) Date: Thu, 19 Nov 2009 06:35:17 -0800 Subject: [Gambas-devel] [SPAM] Vacation reply In-Reply-To: <200911191534.42596.gambas@...1...> Message-ID: An HTML attachment was scrubbed... URL: From david_villalobos_c at ...7... Thu Nov 19 15:58:53 2009 From: david_villalobos_c at ...7... (David Villalobos Cambronero) Date: Thu, 19 Nov 2009 06:58:53 -0800 (PST) Subject: [Gambas-devel] TimePicker In-Reply-To: <200911191534.42596.gambas@...1...> References: <463891.8352.qm@...596...> <200911191534.42596.gambas@...1...> Message-ID: <314051.13656.qm@...566...> Thanks, Im prefer to leave the popup, the rest of things I will make them and send it back. Reagards. -- David ----- Original Message ---- From: Beno?t Minisini To: mailing list for gambas developers Sent: Thu, November 19, 2009 8:34:42 AM Subject: Re: [Gambas-devel] TimePicker > Hi Beno?t, days ago I was theaching Gambas and my students tell me that it > will be nice to have a TimePicker. Here is a first try to do that. > > I would like to know you comments. I think is a nice control to add to > gb.form. > > > > Regards > > > -- > David > OK, but: - Why making a popup? Put the three SpinBox directly inside the control. And create a ReadOnly property. - If you prefer making a popup because you find that nicer, align its left to the left of the control, I think it's better. You should add a panel with a plain border as first popup child, so that the popup is clearly visible. And you should hide the popup as soon as it loose focus. Alas, there is a weird behaviour in gb.qt4: borderless windows prevent their children controls from raising focus events! As soon as it is fixed, you will be able to hide the popup correctly. - The Value property seems to be a string. It must be a Date. The Date datatype includes both date and time, so you should use it for time values too. - The time format is usually "hh:nn:ss" (Gambas Format$ syntax), but is it true in all languages? The control should analyze: Format(CDate("01:02:03"), gb.LongTime) to see in which order it gets hours, minutes and seconds. And adapt the order of SpinBox controls accordingly. - In the same way, you should follow the System.RightToLeft property, which tells you if the current language is right to left written. For such languages, the order of SpinBox will be reversed, as well as the alignment of the popup. - The Format property should use two constants, not the 12 and 24 integer values. - The ToSeconds/ToMinutes/ToHours properties should be removed. They are actually helper functions related to the Date datatype, not really related to the control itself. I don't say that they are not useful, but putting them inside the control source code is not a good idea. Regards, -- Beno?t Minisini ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Gambas-devel mailing list Gambas-devel at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-devel From tcallawa at ...360... Fri Nov 20 21:04:01 2009 From: tcallawa at ...360... (Tom "spot" Callaway) Date: Fri, 20 Nov 2009 15:04:01 -0500 Subject: [Gambas-devel] LGPL COPYING file? Message-ID: <4B06F631.8090905@...360...> The changelog for 2.18.0 says: GB.NET.SMTP * BUG: Add the GNU LGPL 2.1 license file. Except that the COPYING file in gb.net.smtp/ is still GPL, not LGPL, nor is COPYING.LIB present... ~spot From sanyaade at ...255... Fri Nov 20 21:05:16 2009 From: sanyaade at ...255... (sanyaade at ...255...) Date: Fri, 20 Nov 2009 12:05:16 -0800 Subject: [Gambas-devel] [SPAM] Vacation reply In-Reply-To: <4B06F631.8090905@...360...> Message-ID: An HTML attachment was scrubbed... URL: From Karl.Reinl at ...16... Fri Nov 20 21:26:34 2009 From: Karl.Reinl at ...16... (Charlie Reinl) Date: Fri, 20 Nov 2009 21:26:34 +0100 Subject: [Gambas-devel] boring, and certainly not necessary! Message-ID: <1258748794.11213.10.camel@...102...> Salut, I remarked, if I delete the gambas3/Trunk, that I need to root, because of two directories ".action" (see attachment) certainly created during "make install". Is it possible to remove them before "make install" finishes? I ask because that's needs su/sudo more in my script if I want compile from scratch. -- Amicalement Charlie -------------- next part -------------- A non-text attachment was scrubbed... Name: Bildschirmfoto-gambas-svn30 - Datei-Browser.png Type: image/png Size: 63269 bytes Desc: not available URL: From sanyaade at ...255... Fri Nov 20 21:27:06 2009 From: sanyaade at ...255... (sanyaade at ...255...) Date: Fri, 20 Nov 2009 12:27:06 -0800 Subject: [Gambas-devel] [SPAM] Vacation reply In-Reply-To: <1258748794.11213.10.camel@...102...> Message-ID: An HTML attachment was scrubbed... URL: From gambas at ...1... Sun Nov 22 19:20:20 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sun, 22 Nov 2009 19:20:20 +0100 Subject: [Gambas-devel] Problem with MoveScale saved into .form files on gambas2 In-Reply-To: <4a173bfc0911211102q55260852ra6678426363202a8@...178...> References: <4a173bfc0910291542k651d399k7f816ab7b79dce30@...178...> <4a173bfc0911101702h22e8afe8o8dee0f4108146154@...178...> <4a173bfc0911211102q55260852ra6678426363202a8@...178...> Message-ID: <200911221920.20838.gambas@...1...> > El d?a 10 de noviembre de 2009 20:02, Alonso C?rdenas M?rquez > > escribi?: > > 2009/11/2 Beno?t Minisini : > >> The Round() function is defined in the subr_math.c source file in the > >> /main/gbx directory. > >> > >> Here is the code, with comments added: > >> > >> void SUBR_round(void) > >> { > >> // 'val' is the value of the Round second argument, 0 by default. > >> > >> int val = 0; > >> double power; > >> > >> // Starts the subroutine. Actually just initializes a variable named > >> // 'NPARAM' with the number of arguments passed to the subroutine, and > >> a // variable named 'PARAM', that points at the first argument on the // > >> interpreter stack. > >> > >> SUBR_ENTER(); > >> > >> // NPARAM is either 1 or 2 (this is checked by the compiler). If there > >> is 2 // arguments, extract it from the stack and put it in the 'val' > >> variable. > >> > >> if (NPARAM == 2) > >> val = SUBR_get_integer(&PARAM[1]); > >> > >> // Put 10^'val' inside the power variable. According to your test, the > >> value // returned by Round() is 1/10th the true value. So the value of > >> 'power' // should be checked with a debugger. > >> > >> power = pow(10, val); > >> > >> // Converts the first argument of Round() to a floating point value. > >> > >> VALUE_conv(&PARAM[0], T_FLOAT); > >> > >> // Defines the return value > >> > >> RETURN->type = T_FLOAT; > >> > >> // Do not use rint(), it does not do what I need. > >> > >> /*RETURN->_float.value = rint(PARAM->_float.value / power) * power;*/ > >> > >> // The floor() function returns the largest integer value less than > >> // or equal to its argument. By adding 0.5 first, we are actually > >> rounded // the value to the nearest integer. > >> > >> // The following keeps the number of digits after the decimal point > >> defined // by the 'val' variable. > >> > >> RETURN->_float.value = floor(PARAM->_float.value / power + 0.5) * > >> power; > >> > >> // Exit the subroutine by removing the arguments from the interpreter > >> stack. > >> > >> SUBR_LEAVE(); > >> } > >> > >> If you are able to trace the subr_round() function with a debugger, and > >> see what really happens, you are welcome! > >> > >> Regards, > >> > >> -- > >> Beno?t Minisini > > > > Hi :) > > > > I was doing some tests with Round function. I saw that current > > subr_round() function is calculating the value correctly. The problem > > is when you assign the value to > > > > RETURN->_float.value = floor(PARAM->_float.value / power + 0.5) * power; > > > > For example, If you print the same value assigned to a double variable > > > > double temp; > > > > temp = floor(PARAM->_float.value / power + 0.5) * power; > > > > printf("Value: %f", temp); > > > > This will show the right value. > > > > In another case, I assigned a value of 492,857 to RETURN->_float.value > > on SUBR_round function (I assigned the value directly into > > gbx_subr_math.c file). I compiled gbx2 and I called Round function > > after and I saw that it is showing me the value of 4,92. > > > > Maybe it could give you an idea about where I could search for fix the > > problem. > > > > Greetings > > ACM > > Any news about that? > > Greetings > ACM > Not really. But it seems something really weird : RETURN->_float.value is already a "double", so how setting something in it can change the value? What architecture do you use exactly? -- Beno?t Minisini From gambas at ...1... Sun Nov 22 20:10:51 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sun, 22 Nov 2009 20:10:51 +0100 Subject: [Gambas-devel] LGPL COPYING file? In-Reply-To: <4B06F631.8090905@...360...> References: <4B06F631.8090905@...360...> Message-ID: <200911222010.51665.gambas@...1...> > The changelog for 2.18.0 says: > > GB.NET.SMTP > > * BUG: Add the GNU LGPL 2.1 license file. > > Except that the COPYING file in gb.net.smtp/ is still GPL, not LGPL, nor > is COPYING.LIB present... > > ~spot > I didn't realize on the moment that the COPYING file is the license! I fixed it in revision #2432 and #2433. Regards, -- Beno?t Minisini From gambas at ...1... Sun Nov 22 20:19:48 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sun, 22 Nov 2009 20:19:48 +0100 Subject: [Gambas-devel] boring, and certainly not necessary! In-Reply-To: <1258748794.11213.10.camel@...102...> References: <1258748794.11213.10.camel@...102...> Message-ID: <200911222019.48744.gambas@...1...> > Salut, > > I remarked, if I delete the gambas3/Trunk, that I need to root, > because of two directories ".action" (see attachment) certainly created > during "make install". > > Is it possible to remove them before "make install" finishes? > > I ask because that's needs su/sudo more in my script if I want compile > from scratch. > The bug should be fixed in revision #2435. I forgot to set the owner of the .action directory to the same owner as the project directory. Can you try it and confirm ? Thanks in advance. Regards, -- Beno?t Minisini From Karl.Reinl at ...16... Sun Nov 22 21:06:50 2009 From: Karl.Reinl at ...16... (Charlie Reinl) Date: Sun, 22 Nov 2009 21:06:50 +0100 Subject: [Gambas-devel] boring, and certainly not necessary! In-Reply-To: <200911222019.48744.gambas@...1...> References: <1258748794.11213.10.camel@...102...> <200911222019.48744.gambas@...1...> Message-ID: <1258920410.13725.4.camel@...102...> Am Sonntag, den 22.11.2009, 20:19 +0100 schrieb Beno?t Minisini: > > Salut, > > > > I remarked, if I delete the gambas3/Trunk, that I need to root, > > because of two directories ".action" (see attachment) certainly created > > during "make install". > > > > Is it possible to remove them before "make install" finishes? > > > > I ask because that's needs su/sudo more in my script if I want compile > > from scratch. > > > > The bug should be fixed in revision #2435. I forgot to set the owner of the > .action directory to the same owner as the project directory. > > Can you try it and confirm ? > > Thanks in advance. > > Regards, > Salut Beno?t, when I started the second time my script with option "from scratch" I had left the sudo in front of the rm, and had NO access problems. So I confirm the changed owner at the .action directories. -- Amicalement Charlie From rterry at ...627... Mon Nov 23 03:32:36 2009 From: rterry at ...627... (richard terry) Date: Mon, 23 Nov 2009 13:32:36 +1100 Subject: [Gambas-devel] Empty string sets controls and collections members to null Question In-Reply-To: <200908271955.01499.rterry@...627...> References: <200908271955.01499.rterry@...627...> Message-ID: <200911231332.36791.rterry@...627...> On Thursday 27 August 2009 19:55:01 you wrote: I asked this before (text below) and to my recollection (maybe faulty) Benoit said that the behaviour causing me problems was normal, however I really need to find a solution. In a nutshell again it is this: I use collections to transfer data to-from my database to add/update records (don't use the gambas datacontrol). If an existing collection has a member containing text eg MyCollection!my_value = "a dog", and I'm updating the record, lets say I've deleted the text in the input field, and the value in the backend for that field in a table now has to be an empty sting or null, if I do this: MyCollectioni!my_value = "", effectively removes the 'my_value' key from the collection, dosn't set its string to null. I would have thought that "" = empty string, not null, but I think Benoit said that this was equivalent in gambas. I can't think how to get around this and wondered if anyone could think of a solution. Regards Richard > This question is really around how to set a collection member to an empty > string without destroying it. > > > I've noticed (forever) that this code > > textbox1 = "" when one accidentally forgot to write > > textbox1.text ="", actually sets the control to null. > > But I've also I just noticed this: > > > Lets say you have a collection > > dim aCollection as new collection > > aCollection!value = "hi there" > > is a valid statement > > aCollection.Remove("value") - removes the item > > aCollecton!value = "" actually works like aCollection.Remove("value") > > which is sort of inconvenient if you want the collection member to be an > empty string > > Am I wrong ?any suggestions/observations. > > regards > > richard > From sanyaade at ...255... Mon Nov 23 03:35:39 2009 From: sanyaade at ...255... (sanyaade at ...255...) Date: Sun, 22 Nov 2009 18:35:39 -0800 Subject: [Gambas-devel] [SPAM] Vacation reply In-Reply-To: <200911231332.36791.rterry@...627...> Message-ID: An HTML attachment was scrubbed... URL: From gambas at ...1... Mon Nov 23 11:49:56 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 23 Nov 2009 11:49:56 +0100 Subject: [Gambas-devel] Empty string sets controls and collections members to null Question In-Reply-To: <200911231332.36791.rterry@...627...> References: <200908271955.01499.rterry@...627...> <200911231332.36791.rterry@...627...> Message-ID: <200911231149.56682.gambas@...1...> > On Thursday 27 August 2009 19:55:01 you wrote: > > I asked this before (text below) and to my recollection (maybe faulty) > Benoit said that the behaviour causing me problems was normal, however I > really need to find a solution. > > In a nutshell again it is this: > > I use collections to transfer data to-from my database to add/update > records (don't use the gambas datacontrol). > > If an existing collection has a member containing text eg > > MyCollection!my_value = "a dog", and I'm updating the record, lets say I've > deleted the text in the input field, and the value in the backend for that > field in a table now has to be an empty sting or null, if I do this: > > MyCollectioni!my_value = "", effectively removes the 'my_value' key from > the collection, dosn't set its string to null. > > I would have thought that "" = empty string, not null, but I think Benoit > said that this was equivalent in gambas. I can't think how to get around > this and wondered if anyone could think of a solution. > > Regards > > Richard > I've never seen any need to make a difference between an empty string and a null string. Why do you make this difference? -- Beno?t Minisini From rterry at ...627... Mon Nov 23 11:48:47 2009 From: rterry at ...627... (richard terry) Date: Mon, 23 Nov 2009 21:48:47 +1100 Subject: [Gambas-devel] Postgres lo_import question Message-ID: <200911232148.47324.rterry@...627...> Bit off list I guess, but here goes. Wondered if anyone knows how to use lo_import to import large bobs of data when one is just logged onto postgres as a normal user. any help/experience, ideas appreciated. Yes I've read the postgres docs. Regards Richard From gambas at ...1... Mon Nov 23 12:17:53 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 23 Nov 2009 12:17:53 +0100 Subject: [Gambas-devel] Empty string sets controls and collections members to null Question In-Reply-To: <200911232205.20124.rterry@...627...> References: <200908271955.01499.rterry@...627...> <200911231149.56682.gambas@...1...> <200911232205.20124.rterry@...627...> Message-ID: <200911231217.53297.gambas@...1...> > On Monday 23 November 2009 21:49:56 you wrote: > > > On Thursday 27 August 2009 19:55:01 you wrote: > > > > > > I asked this before (text below) and to my recollection (maybe faulty) > > > Benoit said that the behaviour causing me problems was normal, however > > > I really need to find a solution. > > > > > > In a nutshell again it is this: > > > > > > I use collections to transfer data to-from my database to add/update > > > records (don't use the gambas datacontrol). > > > > > > If an existing collection has a member containing text eg > > > > > > MyCollection!my_value = "a dog", and I'm updating the record, lets say > > > I've deleted the text in the input field, and the value in the backend > > > for that field in a table now has to be an empty sting or null, if I > > > do this: > > > > > > MyCollectioni!my_value = "", effectively removes the 'my_value' key > > > from the collection, dosn't set its string to null. > > > > > > I would have thought that "" = empty string, not null, but I think > > > Benoit said that this was equivalent in gambas. I can't think how to > > > get around this and wondered if anyone could think of a solution. > > > > > > Regards > > > > > > Richard > > > > I've never seen any need to make a difference between an empty string and > > a null string. Why do you make this difference? > > Maybe its because of the way I'm updating data. > > lets say I have this table. > > Create table test > (pk serial primary key, > type text, > name text > ); > > I'm using collections of data, so say I have a collection I called animals > animal!type = "dog" > animal!name = "blackie" > > I then put data into it and the row ends up say 1,"dog", "blackie" > > I then want to change this and delete the name, but this time I have a > primary key, so the collection when retreived prior to the change looks > like this: animal("pk") = 1 > animal ("type")="dog" > animal("name:) ="blackie" > > in the textbox fields, the user removes the name "blackie", so I need to > re- save the data, so now > animal!pk= 1 > animal!type = "dog" > animal!name = "" > > An hey presto , I've removed animal!name from the collection, whereas I > want animal!name = '"" to remain, so that the database field is set to an > empty string. > > Now, there may be a different way to do this, for example, if I knew how to > set animal!name to null, maybe that would work, but as gb.null = 15, it > dosn't seem to work. > > Maybe I've confused you? > > Regards > > Richard > I don't see the problem : the Gambas database component makes no difference between NULL and an empty string too. And you should better post on the user mailing-list for that. Regards, -- Beno?t Minisini From christophe at ...644... Mon Nov 23 14:21:59 2009 From: christophe at ...644... (Christophe) Date: Mon, 23 Nov 2009 14:21:59 +0100 Subject: [Gambas-devel] Postgres lo_import question In-Reply-To: <200911232148.47324.rterry@...627...> References: <200911232148.47324.rterry@...627...> Message-ID: <4B0A8C77.8080903@...644...> Hi To use large object, you must create a column type oid (eg: my_column) To import a file, it must be store on the PostgreSQL Server (eg /tmp) and use the same method as standard insert in Gambas INSERT INTO my_table (my_column) VALUES ( lo_import('/tmp/my_image.png')); postgres (unix user) must have the right to read on /tmp Regards, Le 23/11/09 11:48, richard terry a ?crit : > Bit off list I guess, but here goes. > > Wondered if anyone knows how to use lo_import to import large bobs of data > when one is just logged onto postgres as a normal user. > > any help/experience, ideas appreciated. > > Yes I've read the postgres docs. > > Regards > > Richard > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-devel mailing list > Gambas-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-devel > From sanyaade at ...255... Mon Nov 23 15:14:41 2009 From: sanyaade at ...255... (sanyaade at ...255...) Date: Mon, 23 Nov 2009 06:14:41 -0800 Subject: [Gambas-devel] [SPAM] Vacation reply In-Reply-To: <4B0A8C77.8080903@...644...> Message-ID: An HTML attachment was scrubbed... URL: From ronstk at ...124... Tue Nov 24 07:51:12 2009 From: ronstk at ...124... (Ron_1st) Date: Tue, 24 Nov 2009 07:51:12 +0100 Subject: [Gambas-devel] Empty string sets controls and collections members to null Question In-Reply-To: <200911231217.53297.gambas@...1...> References: <200908271955.01499.rterry@...627...> <200911232205.20124.rterry@...627...> <200911231217.53297.gambas@...1...> Message-ID: <200911240751.13153.ronstk@...124...> On Monday 23 November 2009, Beno?t Minisini wrote: > > On Monday 23 November 2009 21:49:56 you wrote: > > > > On Thursday 27 August 2009 19:55:01 you wrote: > > > > > > > > I asked this before (text below) and to my recollection (maybe faulty) > > > > Benoit said that the behaviour causing me problems was normal, however > > > > I really need to find a solution. > > > > > > > > In a nutshell again it is this: > > > > > > > > I use collections to transfer data to-from my database to add/update > > > > records (don't use the gambas datacontrol). > > > > > > > > If an existing collection has a member containing text eg > > > > > > > > MyCollection!my_value = "a dog", and I'm updating the record, lets say > > > > I've deleted the text in the input field, and the value in the backend > > > > for that field in a table now has to be an empty sting or null, if I > > > > do this: > > > > > > > > MyCollectioni!my_value = "", effectively removes the 'my_value' key > > > > from the collection, dosn't set its string to null. The problem is not the database but the collection object. He is using a collection where the index name is the field name in the database. Setting the his_collection(db_field') = "" removes the item from the collection instead of having his_collection('db_field') = "" This is what I understand here. > > > > > > > > I would have thought that "" = empty string, not null, but I think > > > > Benoit said that this was equivalent in gambas. I can't think how to > > > > get around this and wondered if anyone could think of a solution. > > > > > > > > Regards > > > > > > > > Richard > > > ----8<---- > I don't see the problem : the Gambas database component makes no difference > between NULL and an empty string too. > > And you should better post on the user mailing-list for that. > > Regards, > Best regards, Ron_1st -- From sanyaade at ...255... Tue Nov 24 07:50:03 2009 From: sanyaade at ...255... (sanyaade at ...255...) Date: Mon, 23 Nov 2009 22:50:03 -0800 Subject: [Gambas-devel] [SPAM] Vacation reply In-Reply-To: <200911240751.13153.ronstk@...124...> Message-ID: An HTML attachment was scrubbed... URL: From rterry at ...627... Tue Nov 24 08:11:53 2009 From: rterry at ...627... (richard terry) Date: Tue, 24 Nov 2009 18:11:53 +1100 Subject: [Gambas-devel] Empty string sets controls and collections members to null Question In-Reply-To: <200911240751.13153.ronstk@...124...> References: <200908271955.01499.rterry@...627...> <200911231217.53297.gambas@...1...> <200911240751.13153.ronstk@...124...> Message-ID: <200911241811.53497.rterry@...627...> On Tuesday 24 November 2009 17:51:12 Ron_1st wrote: > On Monday 23 November 2009, Beno?t Minisini wrote: > > > On Monday 23 November 2009 21:49:56 you wrote: > > > > > On Thursday 27 August 2009 19:55:01 you wrote: > > > > > > > > > > I asked this before (text below) and to my recollection (maybe > > > > > faulty) Benoit said that the behaviour causing me problems was > > > > > normal, however I really need to find a solution. > > > > > > > > > > In a nutshell again it is this: > > > > > > > > > > I use collections to transfer data to-from my database to > > > > > add/update records (don't use the gambas datacontrol). > > > > > > > > > > If an existing collection has a member containing text eg > > > > > > > > > > MyCollection!my_value = "a dog", and I'm updating the record, lets > > > > > say I've deleted the text in the input field, and the value in the > > > > > backend for that field in a table now has to be an empty sting or > > > > > null, if I do this: > > > > > > > > > > MyCollectioni!my_value = "", effectively removes the 'my_value' key > > > > > from the collection, dosn't set its string to null. > > The problem is not the database but the collection object. > He is using a collection where the index name is the field name in the > database. Setting the his_collection(db_field') = "" removes the item from > the collection instead of having his_collection('db_field') = "" > > This is what I understand here. ah, at last someone who understands the problem, ?any solution? Regards Richard > > > > > > I would have thought that "" = empty string, not null, but I think > > > > > Benoit said that this was equivalent in gambas. I can't think how > > > > > to get around this and wondered if anyone could think of a > > > > > solution. > > > > > > > > > > Regards > > > > > > > > > > Richard > > ----8<---- > > > I don't see the problem : the Gambas database component makes no > > difference between NULL and an empty string too. > > > > And you should better post on the user mailing-list for that. > > > > Regards, > > Best regards, > > Ron_1st > From ronstk at ...124... Tue Nov 24 18:21:49 2009 From: ronstk at ...124... (Ron_1st) Date: Tue, 24 Nov 2009 18:21:49 +0100 Subject: [Gambas-devel] Empty string sets controls and collections members to null Question In-Reply-To: <200911241811.53497.rterry@...627...> References: <200908271955.01499.rterry@...627...> <200911240751.13153.ronstk@...124...> <200911241811.53497.rterry@...627...> Message-ID: <200911241821.49674.ronstk@...124...> On Tuesday 24 November 2009, richard terry wrote: > On Tuesday 24 November 2009 17:51:12 Ron_1st wrote: > > On Monday 23 November 2009, Beno?t Minisini wrote: > > > > On Monday 23 November 2009 21:49:56 you wrote: > > > > > > On Thursday 27 August 2009 19:55:01 you wrote: > > > > > > > > > > > > I asked this before (text below) and to my recollection (maybe > > > > > > faulty) Benoit said that the behaviour causing me problems was > > > > > > normal, however I really need to find a solution. > > > > > > > > > > > > In a nutshell again it is this: > > > > > > > > > > > > I use collections to transfer data to-from my database to > > > > > > add/update records (don't use the gambas datacontrol). > > > > > > > > > > > > If an existing collection has a member containing text eg > > > > > > > > > > > > MyCollection!my_value = "a dog", and I'm updating the record, lets > > > > > > say I've deleted the text in the input field, and the value in the > > > > > > backend for that field in a table now has to be an empty sting or > > > > > > null, if I do this: > > > > > > > > > > > > MyCollectioni!my_value = "", effectively removes the 'my_value' key > > > > > > from the collection, dosn't set its string to null. > > > > The problem is not the database but the collection object. > > He is using a collection where the index name is the field name in the > > database. Setting the his_collection(db_field') = "" removes the item from > > the collection instead of having his_collection('db_field') = "" > > > > This is what I understand here. > > ah, at last someone who understands the problem, ?any solution? > > Regards > > Richard > > > > > > > > > I would have thought that "" = empty string, not null, but I think > > > > > > Benoit said that this was equivalent in gambas. I can't think how > > > > > > to get around this and wondered if anyone could think of a > > > > > > solution. > > > > > > > > > > > > Regards > > > > > > > > > > > > Richard > > > > ----8<---- > > > > > I don't see the problem : the Gambas database component makes no > > > difference between NULL and an empty string too. > > > > > > And you should better post on the user mailing-list for that. > > > > > > Regards, > > > > Best regards, > > > > Ron_1st > > IMHO its a bug to remove the collection object if the value is set to null or empty string as "" Why do we have the .add and .remove? For now you could store a leading or trailing space and this result in at least one space for the value. Also a predefinied dummy value as i.e. "@@@@" for empty entries and if with .Replace('@@@@','') clean for the form display. Best regards, Ron_1st -- 111.111111 x 111.111111 = 12345.678987654321 -- A: Delete the text you reply on. Q: What to do to get my post on top? --- A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? --- A: Top-posting. Q: What is the most annoying thing in e-mail? From gambas at ...1... Tue Nov 24 18:57:27 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 24 Nov 2009 18:57:27 +0100 Subject: [Gambas-devel] Empty string sets controls and collections members to null Question In-Reply-To: <200911241811.53497.rterry@...627...> References: <200908271955.01499.rterry@...627...> <200911240751.13153.ronstk@...124...> <200911241811.53497.rterry@...627...> Message-ID: <200911241857.27724.gambas@...1...> > On Tuesday 24 November 2009 17:51:12 Ron_1st wrote: > > On Monday 23 November 2009, Beno?t Minisini wrote: > > > > On Monday 23 November 2009 21:49:56 you wrote: > > > > > > On Thursday 27 August 2009 19:55:01 you wrote: > > > > > > > > > > > > I asked this before (text below) and to my recollection (maybe > > > > > > faulty) Benoit said that the behaviour causing me problems was > > > > > > normal, however I really need to find a solution. > > > > > > > > > > > > In a nutshell again it is this: > > > > > > > > > > > > I use collections to transfer data to-from my database to > > > > > > add/update records (don't use the gambas datacontrol). > > > > > > > > > > > > If an existing collection has a member containing text eg > > > > > > > > > > > > MyCollection!my_value = "a dog", and I'm updating the record, > > > > > > lets say I've deleted the text in the input field, and the value > > > > > > in the backend for that field in a table now has to be an empty > > > > > > sting or null, if I do this: > > > > > > > > > > > > MyCollectioni!my_value = "", effectively removes the 'my_value' > > > > > > key from the collection, dosn't set its string to null. > > > > The problem is not the database but the collection object. > > He is using a collection where the index name is the field name in the > > database. Setting the his_collection(db_field') = "" removes the item > > from the collection instead of having his_collection('db_field') = "" > > > > This is what I understand here. > > ah, at last someone who understands the problem, ?any solution? > > Regards > > Richard > I don't see any problem at all. MyCollection!my_value = "" will remove the my_value from the collection. So MyCollection!my_value will return NULL (which is the same thing as ""), and so you can store it into the database record without special code. Again: why do you want/need to make a difference between NULL and ""? -- Beno?t Minisini From ronstk at ...124... Tue Nov 24 20:37:49 2009 From: ronstk at ...124... (Ron_1st) Date: Tue, 24 Nov 2009 20:37:49 +0100 Subject: [Gambas-devel] Empty string sets controls and collections members to null Question In-Reply-To: <200911241857.27724.gambas@...1...> References: <200908271955.01499.rterry@...627...> <200911241811.53497.rterry@...627...> <200911241857.27724.gambas@...1...> Message-ID: <200911242037.50185.ronstk@...124...> On Tuesday 24 November 2009, Beno?t Minisini wrote: > > On Tuesday 24 November 2009 17:51:12 Ron_1st wrote: > > > On Monday 23 November 2009, Beno?t Minisini wrote: > > > > > On Monday 23 November 2009 21:49:56 you wrote: > > > > > > > On Thursday 27 August 2009 19:55:01 you wrote: > > > > > > > > > > > > > > I asked this before (text below) and to my recollection (maybe > > > > > > > faulty) Benoit said that the behaviour causing me problems was > > > > > > > normal, however I really need to find a solution. > > > > > > > > > > > > > > In a nutshell again it is this: > > > > > > > > > > > > > > I use collections to transfer data to-from my database to > > > > > > > add/update records (don't use the gambas datacontrol). > > > > > > > > > > > > > > If an existing collection has a member containing text eg > > > > > > > > > > > > > > MyCollection!my_value = "a dog", and I'm updating the record, > > > > > > > lets say I've deleted the text in the input field, and the value > > > > > > > in the backend for that field in a table now has to be an empty > > > > > > > sting or null, if I do this: > > > > > > > > > > > > > > MyCollectioni!my_value = "", effectively removes the 'my_value' > > > > > > > key from the collection, dosn't set its string to null. > > > > > > The problem is not the database but the collection object. > > > He is using a collection where the index name is the field name in the > > > database. Setting the his_collection(db_field') = "" removes the item > > > from the collection instead of having his_collection('db_field') = "" > > > > > > This is what I understand here. > > > > ah, at last someone who understands the problem, ?any solution? > > > > Regards > > > > Richard > > > > I don't see any problem at all. > > MyCollection!my_value = "" will remove the my_value from the collection. So > MyCollection!my_value will return NULL (which is the same thing as ""), and so > you can store it into the database record without special code. > > Again: why do you want/need to make a difference between NULL and ""? > It's not the question the are equal or not. Its looks to be the problem the object in the collection is distroyed. Again, that is how I understand Richards problem !!!. Sometimes it can be nice to remove empty but it's logical IMHO. Suppose a street with house. Let us remove Benou from the fifth house numbered as 'Vila Minisini'. How do you feel your when house is destructed and you comming back to reenter your live. You can say add a new house 'Vila Minisini' but it is not between your old neighbours you did like so much. Its now destructing your wel designed structure of the collection. :) from me previous answer to Richard > He is using a collection where the *_INDEX_* name is the *_FIELD_* name in the database. > Setting the MyCollection!my_value = "" removes the item > from the collection instead of having MyCollection!my_value = "" So if he set MyCollection!my_value = "" and it is removed then how do you change the database if the field name is unknown. A street with 10 houses hat 10 houses, with people living in or not. Houses.remove('Vila Minisini') is used to demolish the house. Best regards, Ron_1st -- From gambas at ...1... Wed Nov 25 00:16:23 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 25 Nov 2009 00:16:23 +0100 Subject: [Gambas-devel] Empty string sets controls and collections members to null Question In-Reply-To: <200911242037.50185.ronstk@...124...> References: <200908271955.01499.rterry@...627...> <200911241857.27724.gambas@...1...> <200911242037.50185.ronstk@...124...> Message-ID: <200911250016.23934.gambas@...1...> > It's not the question the are equal or not. > Its looks to be the problem the object in the collection is distroyed. > Again, that is how I understand Richards problem !!!. > > Sometimes it can be nice to remove empty but it's logical IMHO. > OK, I see. You can use the destination Record to get the field list, like that: Dim hField As ResultField For Each hField in MyResult.Fields MyResult[hField.Name] = MyCollection[hField.Name] Next Regards, -- Beno?t Minisini From gambas at ...1... Wed Nov 25 03:45:07 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Wed, 25 Nov 2009 03:45:07 +0100 Subject: [Gambas-devel] Support for PostgreSQL schemas Message-ID: <200911250345.07515.gambas@...1...> The support has landed in the revision 2438. It was not that simple, and at the moment there is a workaround in the IDE because the DB.Quote() function cannot handle them. Allowing DB.Quote() to correctly quote table names with a schema name inside needs a little change in the database driver interface, so I will do that later. Maybe with the DB.QuoteBlob() function. Regards, -- Beno?t Minisini From rterry at ...627... Wed Nov 25 04:15:34 2009 From: rterry at ...627... (richard terry) Date: Wed, 25 Nov 2009 14:15:34 +1100 Subject: [Gambas-devel] Support for PostgreSQL schemas In-Reply-To: <200911250345.07515.gambas@...1...> References: <200911250345.07515.gambas@...1...> Message-ID: <200911251415.34824.rterry@...627...> On Wednesday 25 November 2009 13:45:07 Beno?t Minisini wrote: > The support has landed in the revision 2438. > > It was not that simple, and at the moment there is a workaround in the IDE > because the DB.Quote() function cannot handle them. > > Allowing DB.Quote() to correctly quote table names with a schema name > inside needs a little change in the database driver interface, so I will > do that later. Maybe with the DB.QuoteBlob() function. > > Regards, > Thanks Benoit as always I'm impressed. Regards Richard From david_villalobos_c at ...7... Thu Nov 26 20:52:02 2009 From: david_villalobos_c at ...7... (David Villalobos Cambronero) Date: Thu, 26 Nov 2009 11:52:02 -0800 (PST) Subject: [Gambas-devel] Gambas on MAC Message-ID: <112357.95605.qm@...587...> Hi Benoit, I got a MAC-Intel, if you want I can open a ssh connection for you to make some test. I think in some time I will have aviable a MAC for you to make more test. What do you think? Regards. -- David From sanyaade at ...255... Thu Nov 26 20:52:35 2009 From: sanyaade at ...255... (sanyaade at ...255...) Date: Thu, 26 Nov 2009 11:52:35 -0800 Subject: [Gambas-devel] [SPAM] Vacation reply In-Reply-To: <112357.95605.qm@...587...> Message-ID: An HTML attachment was scrubbed... URL: From gambas at ...1... Thu Nov 26 23:09:50 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Thu, 26 Nov 2009 23:09:50 +0100 Subject: [Gambas-devel] Gambas on MAC In-Reply-To: <112357.95605.qm@...587...> References: <112357.95605.qm@...587...> Message-ID: <200911262309.50106.gambas@...1...> > Hi Benoit, I got a MAC-Intel, if you want I can open a ssh connection for > you to make some test. Yes it could be useful! With Mac/Intel, there is no endianness problem anymore. And the Unix part is based on FreeBSD, where Gambas compiles as far as I know. There is just a recent problem on FreeBSD (with the Round() function), but I have not enough information to understand what happens. Maybe I will see the same problem on Mac and will be able to fix it. The big problem is: I have no idea how GUI component will run. - How Qt and GTK+ work on Mac-OSX? - The gambas GUI components use many X11 specific stuff. Is there some sort of X11 emulation on Mac-OSX? If you have some answer about that, i.e. you can successfully compile the Gambas sources on Mac (which will mean that X11 libraries are present, and that Qt or GTK+ have no problem with Mac OSX), it will be a huge step! > I think in some time I will have aviable a MAC for > you to make more test. What do you mean exactly? -- Beno?t Minisini From david_villalobos_c at ...7... Fri Nov 27 14:58:44 2009 From: david_villalobos_c at ...7... (David Villalobos Cambronero) Date: Fri, 27 Nov 2009 05:58:44 -0800 (PST) Subject: [Gambas-devel] Gambas on MAC In-Reply-To: <200911262309.50106.gambas@...1...> References: <112357.95605.qm@...587...> <200911262309.50106.gambas@...1...> Message-ID: <163015.31395.qm@...556...> I mean a MAC/Power PC not a MAC/Intel. And really I don't know if there is X11 in MAC. I'll send you the IP, User & Pass soon, to your personal account, of course. :) Regards -- David ----- Original Message ---- From: Beno?t Minisini To: mailing list for gambas developers Sent: Thu, November 26, 2009 4:09:50 PM Subject: Re: [Gambas-devel] Gambas on MAC > Hi Benoit, I got a MAC-Intel, if you want I can open a ssh connection for > you to make some test. Yes it could be useful! With Mac/Intel, there is no endianness problem anymore. And the Unix part is based on FreeBSD, where Gambas compiles as far as I know. There is just a recent problem on FreeBSD (with the Round() function), but I have not enough information to understand what happens. Maybe I will see the same problem on Mac and will be able to fix it. The big problem is: I have no idea how GUI component will run. - How Qt and GTK+ work on Mac-OSX? - The gambas GUI components use many X11 specific stuff. Is there some sort of X11 emulation on Mac-OSX? If you have some answer about that, i.e. you can successfully compile the Gambas sources on Mac (which will mean that X11 libraries are present, and that Qt or GTK+ have no problem with Mac OSX), it will be a huge step! > I think in some time I will have aviable a MAC for > you to make more test. What do you mean exactly? -- Beno?t Minisini ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Gambas-devel mailing list Gambas-devel at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-devel From david_villalobos_c at ...7... Fri Nov 27 15:05:36 2009 From: david_villalobos_c at ...7... (David Villalobos Cambronero) Date: Fri, 27 Nov 2009 06:05:36 -0800 (PST) Subject: [Gambas-devel] TimePicker Updated Message-ID: <637271.84358.qm@...587...> Hi, here is the "new" version of the control. Please let me know any comment. Regards -- David -------------- next part -------------- A non-text attachment was scrubbed... Name: TimePicker-0.0.1.tar.gz Type: application/x-gzip Size: 9047 bytes Desc: not available URL: From gambas at ...1... Sat Nov 28 02:24:42 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sat, 28 Nov 2009 02:24:42 +0100 Subject: [Gambas-devel] Support for PostgreSQL schemas In-Reply-To: <200911250345.07515.gambas@...1...> References: <200911250345.07515.gambas@...1...> Message-ID: <200911280224.42701.gambas@...1...> > The support has landed in the revision 2438. > > It was not that simple, and at the moment there is a workaround in the IDE > because the DB.Quote() function cannot handle them. > > Allowing DB.Quote() to correctly quote table names with a schema name > inside needs a little change in the database driver interface, so I will > do that later. Maybe with the DB.QuoteBlob() function. > > Regards, > In revision #2442, the support for postgresql schema is now far better. Moreover, I added a FormatBlob() function to the Connection class to get the SQL string representation of binary data that you should use inside a blob. It's up to Richard and Jean-Yves to tell me if all that work as expected. Note: this is for Gambas 3 only, because of the changes in the interface. Regards, -- Beno?t Minisini From gambas at ...1... Sun Nov 29 01:45:28 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sun, 29 Nov 2009 01:45:28 +0100 Subject: [Gambas-devel] TimePicker Updated In-Reply-To: <637271.84358.qm@...587...> References: <637271.84358.qm@...587...> Message-ID: <200911290145.28613.gambas@...1...> > Hi, here is the "new" version of the control. Please let me know any > comment. > > Regards > > > -- > David > Ane here are my comments: - The Format property constants should be 0 and 1. - If you can only enter an hour between 0 and 11, you should be able to enter AM/PM too somewhere. - The border must be optional, by making a Border property. You can decide if you want a boolean Border property, or an integer one taking one of the constants of the Border class. - When a SpinBox gets focus, maybe it would be better to select all its text. - You must not set the font of the spinboxes. It must be the font of the control. I will implement a SpinBox.Border property to be able to not display its border, like TextBox. Regards, -- Beno?t Minisini From gambas at ...1... Sun Nov 29 17:23:50 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sun, 29 Nov 2009 17:23:50 +0100 Subject: [Gambas-devel] Gambas wiki license Message-ID: <200911291723.50376.gambas@...1...> Hi world, So that Gambas can be registered in the gnu.org free software repository, the license of the documentation must be clearly defined. So I decided to put the entire wiki under the Creative Commons Attribution- ShareAlike (CC-BY-SA) 3.0 license : http://creativecommons.org/licenses/by-sa/3.0/ I don't want to use different licenses for different part of the wiki, as it will be a nightmare to manage. So if some people that have written some pieces of the documentation do not agree, just tell me, and I will remove their contribution. I am not a free license guru, so if you have remarks, advices, and so on, please tell me. Regards, -- Beno?t Minisini From nospam.nospam.nospam at ...176... Mon Nov 30 09:47:39 2009 From: nospam.nospam.nospam at ...176... (Kadaitcha Man) Date: Mon, 30 Nov 2009 19:47:39 +1100 Subject: [Gambas-devel] Well, I think it's a good change... Message-ID: G'day, I implemented a change in the gambas2 IDE. I have two questions: 1) Do you want it? 2) If so, how do I get it to you? The tab implements the X11 colour names. Duplicate colour values have been removed. -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot-Select a color.png Type: image/png Size: 20434 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot-Select a color-1.png Type: image/png Size: 19635 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot-Select a color-2.png Type: image/png Size: 21105 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot-Select a color-3.png Type: image/png Size: 20826 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot-Select a color-4.png Type: image/png Size: 19694 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot-Select a color-5.png Type: image/png Size: 17924 bytes Desc: not available URL: From sanyaade at ...255... Mon Nov 30 09:48:14 2009 From: sanyaade at ...255... (sanyaade at ...255...) Date: Mon, 30 Nov 2009 00:48:14 -0800 Subject: [Gambas-devel] [SPAM] Vacation reply In-Reply-To: Message-ID: An HTML attachment was scrubbed... URL: From gambas at ...1... Mon Nov 30 12:19:40 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 30 Nov 2009 12:19:40 +0100 Subject: [Gambas-devel] Well, I think it's a good change... In-Reply-To: References: Message-ID: <200911301219.40302.gambas@...1...> > G'day, > > I implemented a change in the gambas2 IDE. I have two questions: > > 1) Do you want it? > 2) If so, how do I get it to you? > > The tab implements the X11 colour names. Duplicate colour values have > been removed. > Wouldn't it better to implement such a thing into the gb.form ColorChooser control directly? It is more difficult, as you must find a GUI that is not too disturbing. But all programs choosing color will benefit from this - Even if personnaly, I've never used X11 colour names in my entire life. :-) And, more important, you should better develop on Gambas 3 than Gambas 2. I mean, I won't merge a change in Gambas 2 if I don't have the equivalent for Gambas 3. If you agree, tell me, I will grant you a write access to the svn repository. Regards, -- Beno?t Minisini From gambas at ...1... Mon Nov 30 12:41:00 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 30 Nov 2009 12:41:00 +0100 Subject: [Gambas-devel] Arguments of inherited constructors Message-ID: <200911301241.00593.gambas@...1...> Hi, There is a change in the Gambas object model in the last revision, about arguments passed to inherited constructors. Let's suppose that you have the following inheritance tree: A --> B --> C When instanciating C, the constructor of A (its _new method) is automatically called, then the constructor of B, and finally the constructor of C. If constructors have arguments, they must be passed to the NEW instruction. Before the last change, the arguments had to be sent in reverse order: New C(Arguments for C._new, Arguments for B._new, Arguments for A._new) Now, they have to be sent in normal order: New C(Arguments for A._new, Arguments for B._new, Arguments for C._new) They are three consequences: 1) You can now have optional arguments in the C constructor. 2) Optional arguments in inherited constructors become mandatory. Note that only the initial constructor could have optional argument before, which I found finally illogical. 3) You must check your code! For example, if you created a form whose constructor has a string arguments, you had to do that before: MyForm = New MyForm(StringArgument) And now you must do: MyForm = New MyForm(Null, StringArgument) 'Null' is actually the argument of the Window constructor, which is the parent of the Window. Moreover, with that change, I may be able to fix the constructor signature that didn't take inheritance into account until now. Regards, -- Beno?t Minisini From nospam.nospam.nospam at ...176... Mon Nov 30 13:04:10 2009 From: nospam.nospam.nospam at ...176... (Kadaitcha Man) Date: Mon, 30 Nov 2009 23:04:10 +1100 Subject: [Gambas-devel] Well, I think it's a good change... In-Reply-To: <200911301219.40302.gambas@...1...> References: <200911301219.40302.gambas@...1...> Message-ID: 2009/11/30 Beno?t Minisini : >> G'day, >> >> I implemented a change in the gambas2 IDE. I have two questions: >> >> 1) Do you want it? >> 2) If so, how do I get it to you? >> >> The tab implements the X11 colour names. Duplicate colour values have >> been removed. >> > > Wouldn't it better to implement such a thing into the gb.form ColorChooser > control directly? HA! I was hoping you'd say that. > It is more difficult, as you must find a GUI that is not too > disturbing. But all programs choosing color will benefit from this - That was my thought too. > Even if personnaly, > I've never used X11 colour names in my entire life. :-) I use X11 colour names in the format presented by the pngs I attached because, to me, the whole structure is artistic, attractive, and provides a better view of what to expect from various colour choices. X11 names offer a much nicer user experience, IMO. Between you and me, don't tell anyone, please, I'm all for the best possible user experience. > And, more important, you should better develop on Gambas 3 than Gambas 2. I > mean, I won't merge a change in Gambas 2 if I don't have the equivalent for > Gambas 3. > If you agree, tell me, I will grant you a write access to the svn repository. I gave g3 away because it seemed too unstable for what I want to achieve. However that said, I'll look at pulling in the g3 source and seeing what I can do with gb.form for both versions. At this stage, I will decline the offer of write access to svn on the grounds that I want to establish a genuine trust first. I would be pleased if you offer me write access based on my efforts, not just on the agreements I can make. Besides that, being new to Linux, I'll have to check what review and reversion options you have at your disposal if I mess something up. I also noticed a bug in the current IDE colour chooser so I'll take a look at that at the same time. On a different note, I do speak a little French too. Je suis une grande cochon! Merde! Je peut! Of course, I don't know what the heck I just said about you, but I think Je should be Il. :) From nospam.nospam.nospam at ...176... Mon Nov 30 14:51:59 2009 From: nospam.nospam.nospam at ...176... (nospam.nospam.nospam at ...176...) Date: Tue, 1 Dec 2009 00:51:59 +1100 Subject: [Gambas-devel] Arguments of inherited constructors References: <200911301241.00593.gambas@...1...> Message-ID: Beno?t Minisini wrote: > There is a change in the Gambas object model in the last revision, > about arguments passed to inherited constructors. > > Let's suppose that you have the following inheritance tree: > > A --> B --> C > > When instanciating C, Your English is excellent but the correct spelling of 'instanciating" is actually "instantiating" :) I made a mental note to fiks that in the documentation. (If your English is as good as know it is, you'll get the joke about fiks.) > the constructor of A (its _new method) is > automatically called, then the constructor of B, and finally the > constructor of C. > > If constructors have arguments, they must be passed to the NEW > instruction. > > Before the last change, the arguments had to be sent in reverse order: > > New C(Arguments for C._new, Arguments for B._new, Arguments for > A._new) > > Now, they have to be sent in normal order: > > New C(Arguments for A._new, Arguments for B._new, Arguments for > C._new) > > They are three consequences: > > 1) You can now have optional arguments in the C constructor. > > 2) Optional arguments in inherited constructors become mandatory. > Note that only the initial constructor could have optional argument > before, which I found finally illogical. > > 3) You must check your code! For example, if you created a form whose > constructor has a string arguments, you had to do that before: The difference between that and this is another thing I have made a note of to ficks in the doco :) > MyForm = New MyForm(StringArgument) > > And now you must do: > > MyForm = New MyForm(Null, StringArgument) > > 'Null' is actually the argument of the Window constructor, which is > the parent of the Window. > > Moreover, with that change, I may be able to fix the constructor > signature that didn't take inheritance into account until now. Ok, serious questions.... Is there anything at all that the programmer could pass in place of Null? If there is, what is it about that formerly Null parameter that distinguishes it from StringArgument? In other words, is there anything that will enable your code make a decision that "StringArgument" on its own really means "Null, StringArgument"? If there is, why force the programmer to pass a null if that null is unnecessary? That is, does it make sense for a programmer to be forced to pass Null if there are codeable rules that can decide what "StringArgument" actually means in the absence of the Null in "Null, StringArgument"? If that series of questions doesn't make any sense then I promise to crack open fewer beers tomorrow. As an example, assume A --> B --> C If A can't deal with the parameters, then A passes them onto B. If B can't deal with the parameters, then B passes them onto C. If C can't deal with the parameters, then C says to B, "Yer wot?" And B says says to A, "Yer wot?" A asks the programmer, "Yer wot?" Of course, all of that makes absolutely no sense to me after an hour or more of trying to get it to make sense, and having polished off a dozen or more Aussie beers inbetween, I'm in no sit ftate to get it to make sense. What I'm asking here is probably two-fold: 1) Can you make it easier for the programmer by making code-based decisions without the need to pass nulls? 2) If so, why not make code-based decisions about what the parameters mean? That is, essentailly, what the .NET Overrides statement does; It says, "I can't deal with these parameters, perhaps you can?" From gambas at ...1... Mon Nov 30 15:08:33 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 30 Nov 2009 15:08:33 +0100 Subject: [Gambas-devel] Arguments of inherited constructors In-Reply-To: References: <200911301241.00593.gambas@...1...> Message-ID: <200911301508.34010.gambas@...1...> > Beno?t Minisini wrote: > > There is a change in the Gambas object model in the last revision, > > about arguments passed to inherited constructors. > > > > Let's suppose that you have the following inheritance tree: > > > > A --> B --> C > > > > When instanciating C, > > Your English is excellent but the correct spelling of 'instanciating" is > actually "instantiating" :) My English is not very good: I have a good dictionnary. You never hear me trying to speak english. > > I made a mental note to fiks that in the documentation. > > (If your English is as good as know it is, you'll get the joke about fiks.) > > > the constructor of A (its _new method) is > > automatically called, then the constructor of B, and finally the > > constructor of C. > > > > If constructors have arguments, they must be passed to the NEW > > instruction. > > > > Before the last change, the arguments had to be sent in reverse order: > > > > New C(Arguments for C._new, Arguments for B._new, Arguments for > > A._new) > > > > Now, they have to be sent in normal order: > > > > New C(Arguments for A._new, Arguments for B._new, Arguments for > > C._new) > > > > They are three consequences: > > > > 1) You can now have optional arguments in the C constructor. > > > > 2) Optional arguments in inherited constructors become mandatory. > > Note that only the initial constructor could have optional argument > > before, which I found finally illogical. > > > > 3) You must check your code! For example, if you created a form whose > > constructor has a string arguments, you had to do that before: > > The difference between that and this is another thing I have made a note of > to ficks in the doco :) > > > MyForm = New MyForm(StringArgument) > > > > And now you must do: > > > > MyForm = New MyForm(Null, StringArgument) > > > > 'Null' is actually the argument of the Window constructor, which is > > the parent of the Window. > > > > Moreover, with that change, I may be able to fix the constructor > > signature that didn't take inheritance into account until now. > > Ok, serious questions.... > > Is there anything at all that the programmer could pass in place of Null? > > If there is, what is it about that formerly Null parameter that > distinguishes it from StringArgument? In other words, is there anything > that will enable your code make a decision that "StringArgument" on its > own really means "Null, StringArgument"? If there is, why force the > programmer to pass a null if that null is unnecessary? > > That is, does it make sense for a programmer to be forced to pass Null if > there are codeable rules that can decide what "StringArgument" actually > means in the absence of the Null in "Null, StringArgument"? > > If that series of questions doesn't make any sense then I promise to crack > open fewer beers tomorrow. > > As an example, assume A --> B --> C > > If A can't deal with the parameters, then A passes them onto B. If B can't > deal with the parameters, then B passes them onto C. > > If C can't deal with the parameters, then C says to B, "Yer wot?" And B > says says to A, "Yer wot?" > > A asks the programmer, "Yer wot?" > > Of course, all of that makes absolutely no sense to me after an hour or > more of trying to get it to make sense, and having polished off a dozen or > more Aussie beers inbetween, I'm in no sit ftate to get it to make sense. > > What I'm asking here is probably two-fold: > > 1) Can you make it easier for the programmer by making code-based decisions > without the need to pass nulls? > > 2) If so, why not make code-based decisions about what the parameters mean? > > That is, essentailly, what the .NET Overrides statement does; It says, "I > can't deal with these parameters, perhaps you can?" > Some remarks: Optional arguments must be the last ones in Gambas. A constructor cannot tell the inherited constructor "finally I won't use this argument, take it". Moreover, it breaks the encapsulation. The interpreter cannot know if an optional argument will be used or not by a method. So, when calling inherited constructors one by one, it must assume that all arguments are mandatory, except for the last constructor. How could it know that, for example, the second argument is an optional argument of the first constructor, and not a mandatory argument for the second one? Maybe doing 'New MyForm(Null, MyArgs)' is a bit "brain-fucking", but at least it is not ambiguous. Regards, -- Beno?t Minisini From nospam.nospam.nospam at ...176... Mon Nov 30 21:17:18 2009 From: nospam.nospam.nospam at ...176... (nospam.nospam.nospam at ...176...) Date: Tue, 1 Dec 2009 07:17:18 +1100 Subject: [Gambas-devel] Arguments of inherited constructors References: <200911301241.00593.gambas@...1...> <200911301508.34010.gambas@...1...> Message-ID: <61E26B9463654375B59B0074E3089453@...645...> Beno?t Minisini wrote: > A constructor cannot tell the inherited constructor "finally I won't > use this argument, take it". Moreover, it breaks the encapsulation. Ah. I see the problem. > Maybe doing 'New MyForm(Null, MyArgs)' is a bit "brain-fucking", but > at least it is not ambiguous. lol From david_villalobos_c at ...7... Mon Nov 30 21:24:40 2009 From: david_villalobos_c at ...7... (David Villalobos Cambronero) Date: Mon, 30 Nov 2009 12:24:40 -0800 (PST) Subject: [Gambas-devel] Arguments of inherited constructors In-Reply-To: <200911301508.34010.gambas@...1...> References: <200911301241.00593.gambas@...1...> <200911301508.34010.gambas@...1...> Message-ID: <906293.35633.qm@...587...> I have this line in my app, and it used to work, but with the new commit it does not: $hFBrowser = New FBrowser(Settings["/Browser/Width", $Width], Settings["/Browser/Height", $Height], Settings["/Browser/X", $X], Settings["/Browser/Y", $Y]) I'm missing something? Or there is new syntax? Regards -- David ----- Original Message ---- From: Beno?t Minisini To: mailing list for gambas developers Sent: Mon, November 30, 2009 8:08:33 AM Subject: Re: [Gambas-devel] Arguments of inherited constructors > Beno?t Minisini wrote: > > There is a change in the Gambas object model in the last revision, > > about arguments passed to inherited constructors. > > > > Let's suppose that you have the following inheritance tree: > > > > A --> B --> C > > > > When instanciating C, > > Your English is excellent but the correct spelling of 'instanciating" is > actually "instantiating" :) My English is not very good: I have a good dictionnary. You never hear me trying to speak english. > > I made a mental note to fiks that in the documentation. > > (If your English is as good as know it is, you'll get the joke about fiks.) > > > the constructor of A (its _new method) is > > automatically called, then the constructor of B, and finally the > > constructor of C. > > > > If constructors have arguments, they must be passed to the NEW > > instruction. > > > > Before the last change, the arguments had to be sent in reverse order: > > > > New C(Arguments for C._new, Arguments for B._new, Arguments for > > A._new) > > > > Now, they have to be sent in normal order: > > > > New C(Arguments for A._new, Arguments for B._new, Arguments for > > C._new) > > > > They are three consequences: > > > > 1) You can now have optional arguments in the C constructor. > > > > 2) Optional arguments in inherited constructors become mandatory. > > Note that only the initial constructor could have optional argument > > before, which I found finally illogical. > > > > 3) You must check your code! For example, if you created a form whose > > constructor has a string arguments, you had to do that before: > > The difference between that and this is another thing I have made a note of > to ficks in the doco :) > > > MyForm = New MyForm(StringArgument) > > > > And now you must do: > > > > MyForm = New MyForm(Null, StringArgument) > > > > 'Null' is actually the argument of the Window constructor, which is > > the parent of the Window. > > > > Moreover, with that change, I may be able to fix the constructor > > signature that didn't take inheritance into account until now. > > Ok, serious questions.... > > Is there anything at all that the programmer could pass in place of Null? > > If there is, what is it about that formerly Null parameter that > distinguishes it from StringArgument? In other words, is there anything > that will enable your code make a decision that "StringArgument" on its > own really means "Null, StringArgument"? If there is, why force the > programmer to pass a null if that null is unnecessary? > > That is, does it make sense for a programmer to be forced to pass Null if > there are codeable rules that can decide what "StringArgument" actually > means in the absence of the Null in "Null, StringArgument"? > > If that series of questions doesn't make any sense then I promise to crack > open fewer beers tomorrow. > > As an example, assume A --> B --> C > > If A can't deal with the parameters, then A passes them onto B. If B can't > deal with the parameters, then B passes them onto C. > > If C can't deal with the parameters, then C says to B, "Yer wot?" And B > says says to A, "Yer wot?" > > A asks the programmer, "Yer wot?" > > Of course, all of that makes absolutely no sense to me after an hour or > more of trying to get it to make sense, and having polished off a dozen or > more Aussie beers inbetween, I'm in no sit ftate to get it to make sense. > > What I'm asking here is probably two-fold: > > 1) Can you make it easier for the programmer by making code-based decisions > without the need to pass nulls? > > 2) If so, why not make code-based decisions about what the parameters mean? > > That is, essentailly, what the .NET Overrides statement does; It says, "I > can't deal with these parameters, perhaps you can?" > Some remarks: Optional arguments must be the last ones in Gambas. A constructor cannot tell the inherited constructor "finally I won't use this argument, take it". Moreover, it breaks the encapsulation. The interpreter cannot know if an optional argument will be used or not by a method. So, when calling inherited constructors one by one, it must assume that all arguments are mandatory, except for the last constructor. How could it know that, for example, the second argument is an optional argument of the first constructor, and not a mandatory argument for the second one? Maybe doing 'New MyForm(Null, MyArgs)' is a bit "brain-fucking", but at least it is not ambiguous. Regards, -- Beno?t Minisini ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Gambas-devel mailing list Gambas-devel at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-devel From gambas at ...1... Mon Nov 30 21:40:49 2009 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 30 Nov 2009 21:40:49 +0100 Subject: [Gambas-devel] Arguments of inherited constructors In-Reply-To: <906293.35633.qm@...587...> References: <200911301241.00593.gambas@...1...> <200911301508.34010.gambas@...1...> <906293.35633.qm@...587...> Message-ID: <200911302140.49752.gambas@...1...> > I have this line in my app, and it used to work, but with the new commit it > does not: > > $hFBrowser = New FBrowser(Settings["/Browser/Width", $Width], > Settings["/Browser/Height", $Height], Settings["/Browser/X", $X], > Settings["/Browser/Y", $Y]) > > I'm missing something? Or there is new syntax? > > Regards > > > -- > David > You must now pass the optional argument of the Window constructor first: $hFBrowser = New FBrowser(Null, Settings["/Browser/Width", $Width], Settings["/Browser/Height", $Height], Settings["/Browser/X", $X], Settings["/Browser/Y", $Y]) Regards, -- Beno?t Minisini