Hi, I removed that behaviour in revision #5871. The font and background of the DataControl are not modified anymore if the associated field is mandatory or is a primary key field.
Regards, -- Beno?t Minisini Thank you Benoit. I installed Gambas from a ppa so I'm not familiar with updating to a specific revision. I've got a lot of work on several projects that I do not want to lose. So maybe you can tell me how to upgrade. I'm also a new linux user. Regards, Marty -----Original Message----- From: gambas-user-requ...@lists.sourceforge.net [mailto:gambas-user-requ...@lists.sourceforge.net] Sent: Friday, October 11, 2013 17:30 To: gambas-user@lists.sourceforge.net Subject: Gambas-user Digest, Vol 89, Issue 24 Send Gambas-user mailing list submissions to gambas-user@lists.sourceforge.net To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/gambas-user or, via email, send a message with subject or body 'help' to gambas-user-requ...@lists.sourceforge.net You can reach the person managing the list at gambas-user-ow...@lists.sourceforge.net When replying, please edit your Subject line so it is more specific than "Re: Contents of Gambas-user digest..." Today's Topics: 1. Re: "wrapping" function based on recent Mod thread (Jussi Lahtinen) 2. Re: "Strange" results from Time( ) function ? (Jussi Lahtinen) 3. Re: Is there a way to contrain a picturebox stretch to the original aspect? (Bruce) 4. Re: No Spacing property in splitter controls (Beno?t Minisini) 5. Re: Problem with datacontrol font and background (Beno?t Minisini) 6. Re: Issue 367 in gambas: Crash in Properties...Environment - Gambas 3.3.4 (gam...@googlecode.com) 7. Re: Issue 367 in gambas: Crash in Properties...Environment - Gambas 3.3.4 (gam...@googlecode.com) ---------------------------------------------------------------------- Message: 1 Date: Fri, 11 Oct 2013 15:20:26 +0300 From: Jussi Lahtinen <jussi.lahti...@gmail.com> Subject: Re: [Gambas-user] "wrapping" function based on recent Mod thread To: mailing list for gambas users <gambas-user@lists.sourceforge.net> Message-ID: <cafjme7snyv0goey-t0jfj9d3yjjx3xtwjokmilybxfdicpf...@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 My brains jammed to think about that wrap function, and I think if you want function that wraps screen like in old video games, then is that C implementation really correct? They say that Wrap(-1, 1, 4) should return 3, but if you have traveled two steps over border of the screen (1 -> 0, 0 -> -1), then you should come up two steps from other border (4 -> 3, 3 -> 2). So Wrap(-1, 1, 4) should be 2. C implementation is only for integers, but if you also need to use floats then, Wrap(0.5, 1, 4) should be 3.5, and Wrap(4.5, 1, 4) should be 1.5. Because if Wrap(0, 1, 4) = 4, then what would be Wrap(0.5, 1, 4) and Wrap(-0.5, 1, 4)? They cannot both be 3.5!! C implementation connects borders with one step between them, my implementation connects the borders with zero steps. So that Wrap(0.999, 1, 4) = 3.999, Wrap(4.001, 1, 4) = 1.001, Wrap(1,1,4) = 1 and Wrap(4,1,4)=4. So I think this gives correct answers: Private Function MyWrap(fX As Float, fLowerBound As Float, fUpperBound As Float) As Float Dim fRange As Float = fUpperBound - fLowerBound If fX < fLowerBound Then Return fUpperBound - Abs(fmod((fX - fLowerBound), fRange)) Else If fX > fUpperBound Then Return fmod(fX - fLowerBound, fRange) + fLowerBound Else Return fX Endif End It needs declaration of fmod: Private Extern fmod(fNumber As Float, fDenom As Float) As Float In "libm:6" Jussi On Fri, Oct 11, 2013 at 12:50 AM, Kevin Fishburne < kevinfishbu...@eightvirtues.com> wrote: > On 10/10/2013 05:07 AM, Fabien Bodard wrote: > >> Maybe some parts of your rendering engine must in final be in a lib >> like gb.sge >> > > Is there a reference doc for that component? I don't see it in the > wiki, but seem to remember someone mentioning it on the list before. > > My code's pretty specialized for my project, but some of it could > conceivably be made more friendly for general purpose game engine use. > I've attached the Audio, Calculate, Render and Wisp modules. There are > some bugs in there (and some logic craziness) but what else is new? > The Wrap_Single procedure in the Calculate module is messed up, FYI. I > tried to adapt the Wrap_Short code to it by truncating the fractional > part then adding it back in at the end, but apparently it creates some > imprecision and makes my camera orientation twitch. :/ > > > -- > Kevin Fishburne > Eight Virtues > www: http://sales.eightvirtues.com > e-mail: sa...@eightvirtues.com > phone: (770) 853-6271 > > > > ---------------------------------------------------------------------- > -------- October Webinars: Code for Performance Free Intel webinars > can help you accelerate application performance. > Explore tips for MPI, OpenMP, advanced profiling, and more. Get the > most from the latest Intel processors and coprocessors. See abstracts > and register > > http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.c > lktrk _______________________________________________ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > > ------------------------------ Message: 2 Date: Fri, 11 Oct 2013 15:47:22 +0300 From: Jussi Lahtinen <jussi.lahti...@gmail.com> Subject: Re: [Gambas-user] "Strange" results from Time( ) function ? To: mailing list for gambas users <gambas-user@lists.sourceforge.net> Cc: Benoit <gam...@users.sourceforge.net> Message-ID: <cafjme7tpfjwoonqgsvw_owptyhwltrn5f_f-mnmpk-73fo+...@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 I took a look into source code and I think this is because seconds are stored in memory as short. And this confirms I understand correctly: ? time(0,0,32766) 09.06.06 ? time(0,0,32767) <--- last good value for signed short 09.06.07 ? time(0,0,32768) 14.53.52 1. So, one simple correction is just change documentation "as integer" --> "as short". 2. Or do conversion from seconds to minutes (if they are over 32767) before asserting them to; date.hour = PARAM->_integer.value; date.min = PARAM[1]._integer.value; date.sec = PARAM[2]._integer.value; 3. Or change declaration of date, short --> integer. However, I don't think I know enough about internal work of Gambas to really make that decision. What do you think Benoit? Jussi On Wed, Oct 9, 2013 at 8:28 PM, Jussi Lahtinen <jussi.lahti...@gmail.com>wrote: > Confirmed with latest revision (5870) @ Xubuntu 13.04 64 bit. > > Jussi > > > On Fri, Sep 13, 2013 at 8:44 PM, Ru Vuott <vu...@yahoo.it> wrote: > >> Hello, >> >> I tried this code: >> >> >> Public Sub Form_Open() >> >> Dim i As Integer >> >> For i = 1 To 24 >> >> Print Time(0, 0, 3600 * i), 3600 * i >> >> Next >> >> End >> >> >> and here its results : >> >> 01:00:00 3600 >> 02:00:00 7200 >> 03:00:00 10800 >> 04:00:00 14400 >> 05:00:00 18000 >> 06:00:00 21600 >> 07:00:00 25200 >> 08:00:00 28800 >> 09:00:00 32400 >> 15:47:44 36000 >> 16:47:44 39600 >> 17:47:44 43200 >> 18:47:44 46800 >> 19:47:44 50400 >> 20:47:44 54000 >> 21:47:44 57600 >> 22:47:44 61200 >> 23:47:44 64800 >> 00:47:44 68400 >> 01:47:44 72000 >> 02:47:44 75600 >> 03:47:44 79200 >> 04:47:44 82800 >> 05:47:44 86400 >> >> >> ......Do not it seem to you that there is something strange in the >> results? :-O >> >> Regards >> >> vuott >> >> >> --------------------------------------------------------------------- >> --------- How ServiceNow helps IT people transform IT departments: >> 1. Consolidate legacy IT systems to a single system of record for IT >> 2. Standardize and globalize service processes across IT 3. Implement >> zero-touch automation to replace manual, redundant tasks >> >> http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg. >> clktrk _______________________________________________ >> Gambas-user mailing list >> Gambas-user@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > ------------------------------ Message: 3 Date: Sat, 12 Oct 2013 06:52:48 +1030 From: Bruce <bbr...@paddys-hill.net> Subject: Re: [Gambas-user] Is there a way to contrain a picturebox stretch to the original aspect? To: mailing list for gambas users <gambas-user@lists.sourceforge.net> Message-ID: <1381522968.19377.8.camel@bluecow.phnet> Content-Type: text/plain; charset="UTF-8" On Fri, 2013-10-11 at 11:29 +0200, Tobias Boege wrote: > On Fri, 11 Oct 2013, Bruce wrote: > > I have a picturebox within a vsplit which is in turn inside a hsplit. > > > > The gist of what I need is to control the stretch so that the > > original aspect ratio of the picture is maintained no matter which > > splitter they expand/reduce. > > > > tia > > Bruce > > > > I can't think of any built-in way to do that. However, you could at > least replace the PictureBox by a DrawingArea and do the stretching > manually in DrawingArea_Draw(). I have attached a simple project to > show how it could be done. > > Regards, > Tobi > Thanks Tobi, That does the trick! Bruce ------------------------------ Message: 4 Date: Fri, 11 Oct 2013 23:07:46 +0200 From: Beno?t Minisini <gam...@users.sourceforge.net> Subject: Re: [Gambas-user] No Spacing property in splitter controls To: mailing list for gambas users <gambas-user@lists.sourceforge.net> Message-ID: <525868a2.5070...@users.sourceforge.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Le 11/10/2013 04:06, Bruce a ?crit : > I've never noticed before but is there a reason why the splitter > controls lack a Spacing property. > > The reason I need it is that the vsplit only contains two simple > controls, a picturebox and a tableview. This looks quite cramped. > > Is the solution to include each of those controls in a panel with a > margin? Seems a bit of an overkill. > > Bruce > I added the Spacing property to the splitter controls in revision #5871. Regards, -- Beno?t Minisini ------------------------------ Message: 5 Date: Fri, 11 Oct 2013 23:09:00 +0200 From: Beno?t Minisini <gam...@users.sourceforge.net> Subject: Re: [Gambas-user] Problem with datacontrol font and background To: mailing list for gambas users <gambas-user@lists.sourceforge.net> Message-ID: <525868ec.1090...@users.sourceforge.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Le 03/10/2013 14:56, Marty McGlensey a ?crit : > Good morning all, > > > > I'm running Gambas version 3.4.2. I have a form containing a datasource. The > datasource is linked to a table containing a primary index field. I've > placed datacontrols on the datasource. All controls contain appropriate > data. The problem is that the datacontrol linked to the primary index field > has a different font and background than the other datacontrols. The cursor > function is also different. This datacontrol's font is bolded; the > background is medium gray. All other datacontrol text is not bold and the > background is white and the cursor works as expected. > > > > I have three instances of this behavior, each in a different table. Each one > is linked to the primary index in that table. The datacontrol properties are > set to the defaults except for the field name. Yes the datacontrol is > enabled and visible. I've tried changing the background manually but that > has no effect. Why is this happening? Looks like it has to do with the > underlying field. I would like to have this field displayed like the others > and accept user input to be saved to the datatable. > > > > Thanks, > > Marty > Hi, I removed that behaviour in revision #5871. The font and background of the DataControl are not modified anymore if the associated field is mandatory or is a primary key field. Regards, -- Beno?t Minisini ------------------------------ Message: 6 Date: Fri, 11 Oct 2013 21:16:26 +0000 From: gam...@googlecode.com Subject: Re: [Gambas-user] Issue 367 in gambas: Crash in Properties...Environment - Gambas 3.3.4 To: gambas-user@lists.sourceforge.net Message-ID: <5-6813199134517018827-570553192276410361-gambas=googlecode.com@googlecode.c om> Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Comment #5 on issue 367 by jussi.la...@gmail.com: Crash in Properties...Environment - Gambas 3.3.4 http://code.google.com/p/gambas/issues/detail?id=367 I cannot reproduce this with revision 5870, is this bug still valid? -- 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 ------------------------------ Message: 7 Date: Fri, 11 Oct 2013 21:30:20 +0000 From: gam...@googlecode.com Subject: Re: [Gambas-user] Issue 367 in gambas: Crash in Properties...Environment - Gambas 3.3.4 To: gambas-user@lists.sourceforge.net Message-ID: <6-6813199134517018827-570553192276410361-gambas=googlecode.com@googlecode.c om> Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Updates: Status: Fixed Comment #6 on issue 367 by benoit.m...@gmail.com: Crash in Properties...Environment - Gambas 3.3.4 http://code.google.com/p/gambas/issues/detail?id=367 OK, so I close it. -- 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 ------------------------------ ---------------------------------------------------------------------------- -- October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk ------------------------------ _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user End of Gambas-user Digest, Vol 89, Issue 24 ******************************************* ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user